OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #ifndef XFA_FXFA_FM2JS_XFA_FMPARSE_H_ | 7 #ifndef XFA_FXFA_FM2JS_XFA_FMPARSE_H_ |
8 #define XFA_FXFA_FM2JS_XFA_FMPARSE_H_ | 8 #define XFA_FXFA_FM2JS_XFA_FMPARSE_H_ |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 | 11 |
12 #include "xfa/fxfa/fm2js/xfa_expression.h" | 12 #include "xfa/fxfa/fm2js/xfa_expression.h" |
13 #include "xfa/fxfa/fm2js/xfa_lexer.h" | 13 #include "xfa/fxfa/fm2js/xfa_lexer.h" |
14 | 14 |
15 class CXFA_FMParse { | 15 class CXFA_FMParse { |
16 public: | 16 public: |
17 CXFA_FMParse(); | 17 CXFA_FMParse(); |
18 int32_t Init(const CFX_WideStringC& wsFormcalc, CXFA_FMErrorInfo* pErrorInfo); | 18 int32_t Init(const CFX_WideStringC& wsFormcalc, CXFA_FMErrorInfo* pErrorInfo); |
19 void NextToken(); | 19 void NextToken(); |
20 void Check(XFA_FM_TOKEN op); | 20 void Check(XFA_FM_TOKEN op); |
21 void Error(FX_DWORD lineNum, XFA_FM_ERRMSG msg, ...); | 21 void Error(uint32_t lineNum, XFA_FM_ERRMSG msg, ...); |
22 CFX_PtrArray* ParseTopExpression(); | 22 CFX_PtrArray* ParseTopExpression(); |
23 CXFA_FMExpression* ParseFunction(); | 23 CXFA_FMExpression* ParseFunction(); |
24 CXFA_FMExpression* ParseExpression(); | 24 CXFA_FMExpression* ParseExpression(); |
25 CXFA_FMExpression* ParseVarExpression(); | 25 CXFA_FMExpression* ParseVarExpression(); |
26 CXFA_FMExpression* ParseExpExpression(); | 26 CXFA_FMExpression* ParseExpExpression(); |
27 CXFA_FMExpression* ParseBlockExpression(); | 27 CXFA_FMExpression* ParseBlockExpression(); |
28 CXFA_FMExpression* ParseIfExpression(); | 28 CXFA_FMExpression* ParseIfExpression(); |
29 CXFA_FMExpression* ParseWhileExpression(); | 29 CXFA_FMExpression* ParseWhileExpression(); |
30 CXFA_FMExpression* ParseForExpression(); | 30 CXFA_FMExpression* ParseForExpression(); |
31 CXFA_FMExpression* ParseForeachExpression(); | 31 CXFA_FMExpression* ParseForeachExpression(); |
(...skipping 12 matching lines...) Expand all Loading... |
44 CXFA_FMSimpleExpression* ParsePostExpression(CXFA_FMSimpleExpression* e); | 44 CXFA_FMSimpleExpression* ParsePostExpression(CXFA_FMSimpleExpression* e); |
45 CXFA_FMSimpleExpression* ParseIndexExpression(); | 45 CXFA_FMSimpleExpression* ParseIndexExpression(); |
46 | 46 |
47 private: | 47 private: |
48 std::unique_ptr<CXFA_FMLexer> m_lexer; | 48 std::unique_ptr<CXFA_FMLexer> m_lexer; |
49 CXFA_FMToken* m_pToken; | 49 CXFA_FMToken* m_pToken; |
50 CXFA_FMErrorInfo* m_pErrorInfo; | 50 CXFA_FMErrorInfo* m_pErrorInfo; |
51 }; | 51 }; |
52 | 52 |
53 #endif // XFA_FXFA_FM2JS_XFA_FMPARSE_H_ | 53 #endif // XFA_FXFA_FM2JS_XFA_FMPARSE_H_ |
OLD | NEW |