summaryrefslogtreecommitdiff
path: root/xfa/fxfa/fm2js/cxfa_fmexpression.h
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/fm2js/cxfa_fmexpression.h')
-rw-r--r--xfa/fxfa/fm2js/cxfa_fmexpression.h42
1 files changed, 16 insertions, 26 deletions
diff --git a/xfa/fxfa/fm2js/cxfa_fmexpression.h b/xfa/fxfa/fm2js/cxfa_fmexpression.h
index cfbba3af22..104b8976a5 100644
--- a/xfa/fxfa/fm2js/cxfa_fmexpression.h
+++ b/xfa/fxfa/fm2js/cxfa_fmexpression.h
@@ -31,8 +31,7 @@ class CXFA_FMExpression {
CXFA_FMExpression(uint32_t line, XFA_FM_EXPTYPE type);
virtual ~CXFA_FMExpression() {}
- virtual bool ToJavaScript(CFX_WideTextBuf& javascript);
- virtual bool ToImpliedReturnJS(CFX_WideTextBuf&);
+ virtual bool ToJavaScript(CFX_WideTextBuf& javascript, ReturnType type);
uint32_t GetLine() { return m_line; }
XFA_FM_EXPTYPE GetExpType() const { return m_type; }
@@ -52,8 +51,7 @@ class CXFA_FMFunctionDefinition : public CXFA_FMExpression {
std::vector<std::unique_ptr<CXFA_FMExpression>>&& expressions);
~CXFA_FMFunctionDefinition() override;
- bool ToJavaScript(CFX_WideTextBuf& javascript) override;
- bool ToImpliedReturnJS(CFX_WideTextBuf&) override;
+ bool ToJavaScript(CFX_WideTextBuf& javascript, ReturnType type) override;
private:
WideStringView m_wsName;
@@ -69,8 +67,7 @@ class CXFA_FMVarExpression : public CXFA_FMExpression {
std::unique_ptr<CXFA_FMExpression> pInit);
~CXFA_FMVarExpression() override;
- bool ToJavaScript(CFX_WideTextBuf& javascript) override;
- bool ToImpliedReturnJS(CFX_WideTextBuf&) override;
+ bool ToJavaScript(CFX_WideTextBuf& javascript, ReturnType type) override;
private:
WideStringView m_wsName;
@@ -83,8 +80,7 @@ class CXFA_FMExpExpression : public CXFA_FMExpression {
std::unique_ptr<CXFA_FMSimpleExpression> pExpression);
~CXFA_FMExpExpression() override;
- bool ToJavaScript(CFX_WideTextBuf& javascript) override;
- bool ToImpliedReturnJS(CFX_WideTextBuf&) override;
+ bool ToJavaScript(CFX_WideTextBuf& javascript, ReturnType type) override;
private:
std::unique_ptr<CXFA_FMSimpleExpression> m_pExpression;
@@ -97,8 +93,7 @@ class CXFA_FMBlockExpression : public CXFA_FMExpression {
std::vector<std::unique_ptr<CXFA_FMExpression>>&& pExpressionList);
~CXFA_FMBlockExpression() override;
- bool ToJavaScript(CFX_WideTextBuf& javascript) override;
- bool ToImpliedReturnJS(CFX_WideTextBuf&) override;
+ bool ToJavaScript(CFX_WideTextBuf& javascript, ReturnType type) override;
private:
std::vector<std::unique_ptr<CXFA_FMExpression>> m_ExpressionList;
@@ -109,8 +104,7 @@ class CXFA_FMDoExpression : public CXFA_FMExpression {
CXFA_FMDoExpression(uint32_t line, std::unique_ptr<CXFA_FMExpression> pList);
~CXFA_FMDoExpression() override;
- bool ToJavaScript(CFX_WideTextBuf& javascript) override;
- bool ToImpliedReturnJS(CFX_WideTextBuf&) override;
+ bool ToJavaScript(CFX_WideTextBuf& javascript, ReturnType type) override;
private:
std::unique_ptr<CXFA_FMExpression> m_pList;
@@ -124,8 +118,7 @@ class CXFA_FMIfExpression : public CXFA_FMExpression {
std::unique_ptr<CXFA_FMExpression> pElseExpression);
~CXFA_FMIfExpression() override;
- bool ToJavaScript(CFX_WideTextBuf& javascript) override;
- bool ToImpliedReturnJS(CFX_WideTextBuf&) override;
+ bool ToJavaScript(CFX_WideTextBuf& javascript, ReturnType type) override;
private:
std::unique_ptr<CXFA_FMSimpleExpression> m_pExpression;
@@ -137,8 +130,8 @@ class CXFA_FMLoopExpression : public CXFA_FMExpression {
public:
explicit CXFA_FMLoopExpression(uint32_t line) : CXFA_FMExpression(line) {}
~CXFA_FMLoopExpression() override;
- bool ToJavaScript(CFX_WideTextBuf& javascript) override;
- bool ToImpliedReturnJS(CFX_WideTextBuf&) override;
+
+ bool ToJavaScript(CFX_WideTextBuf& javascript, ReturnType type) override;
};
class CXFA_FMWhileExpression : public CXFA_FMLoopExpression {
@@ -148,8 +141,7 @@ class CXFA_FMWhileExpression : public CXFA_FMLoopExpression {
std::unique_ptr<CXFA_FMExpression> pExpression);
~CXFA_FMWhileExpression() override;
- bool ToJavaScript(CFX_WideTextBuf& javascript) override;
- bool ToImpliedReturnJS(CFX_WideTextBuf&) override;
+ bool ToJavaScript(CFX_WideTextBuf& javascript, ReturnType type) override;
private:
std::unique_ptr<CXFA_FMSimpleExpression> m_pCondition;
@@ -160,16 +152,16 @@ class CXFA_FMBreakExpression : public CXFA_FMExpression {
public:
explicit CXFA_FMBreakExpression(uint32_t line);
~CXFA_FMBreakExpression() override;
- bool ToJavaScript(CFX_WideTextBuf& javascript) override;
- bool ToImpliedReturnJS(CFX_WideTextBuf&) override;
+
+ bool ToJavaScript(CFX_WideTextBuf& javascript, ReturnType type) override;
};
class CXFA_FMContinueExpression : public CXFA_FMExpression {
public:
explicit CXFA_FMContinueExpression(uint32_t line);
~CXFA_FMContinueExpression() override;
- bool ToJavaScript(CFX_WideTextBuf& javascript) override;
- bool ToImpliedReturnJS(CFX_WideTextBuf&) override;
+
+ bool ToJavaScript(CFX_WideTextBuf& javascript, ReturnType type) override;
};
class CXFA_FMForExpression : public CXFA_FMLoopExpression {
@@ -183,8 +175,7 @@ class CXFA_FMForExpression : public CXFA_FMLoopExpression {
std::unique_ptr<CXFA_FMExpression> pList);
~CXFA_FMForExpression() override;
- bool ToJavaScript(CFX_WideTextBuf& javascript) override;
- bool ToImpliedReturnJS(CFX_WideTextBuf&) override;
+ bool ToJavaScript(CFX_WideTextBuf& javascript, ReturnType type) override;
private:
WideStringView m_wsVariant;
@@ -205,8 +196,7 @@ class CXFA_FMForeachExpression : public CXFA_FMLoopExpression {
std::unique_ptr<CXFA_FMExpression> pList);
~CXFA_FMForeachExpression() override;
- bool ToJavaScript(CFX_WideTextBuf& javascript) override;
- bool ToImpliedReturnJS(CFX_WideTextBuf&) override;
+ bool ToJavaScript(CFX_WideTextBuf& javascript, ReturnType type) override;
private:
WideStringView m_wsIdentifier;