| 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_LEXER_H_ | 7 #ifndef XFA_FXFA_FM2JS_XFA_LEXER_H_ |
| 8 #define XFA_FXFA_FM2JS_XFA_LEXER_H_ | 8 #define XFA_FXFA_FM2JS_XFA_LEXER_H_ |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 void Comment(const FX_WCHAR* p, const FX_WCHAR*& pEnd); | 115 void Comment(const FX_WCHAR* p, const FX_WCHAR*& pEnd); |
| 116 XFA_FM_TOKEN IsKeyword(const CFX_WideStringC& p); | 116 XFA_FM_TOKEN IsKeyword(const CFX_WideStringC& p); |
| 117 void SetCurrentLine(uint32_t line) { m_uCurrentLine = line; } | 117 void SetCurrentLine(uint32_t line) { m_uCurrentLine = line; } |
| 118 void SetToken(CXFA_FMToken* pToken) { | 118 void SetToken(CXFA_FMToken* pToken) { |
| 119 if (m_pToken.get() != pToken) | 119 if (m_pToken.get() != pToken) |
| 120 m_pToken.reset(pToken); | 120 m_pToken.reset(pToken); |
| 121 } | 121 } |
| 122 const FX_WCHAR* SavePos() { return m_ptr; } | 122 const FX_WCHAR* SavePos() { return m_ptr; } |
| 123 void RestorePos(const FX_WCHAR* pPos) { m_ptr = pPos; } | 123 void RestorePos(const FX_WCHAR* pPos) { m_ptr = pPos; } |
| 124 void Error(const FX_WCHAR* msg, ...); | 124 void Error(const FX_WCHAR* msg, ...); |
| 125 FX_BOOL HasError() const; | 125 bool HasError() const; |
| 126 | 126 |
| 127 protected: | 127 protected: |
| 128 CXFA_FMToken* Scan(); | 128 CXFA_FMToken* Scan(); |
| 129 | 129 |
| 130 const FX_WCHAR* m_ptr; | 130 const FX_WCHAR* m_ptr; |
| 131 uint32_t m_uCurrentLine; | 131 uint32_t m_uCurrentLine; |
| 132 std::unique_ptr<CXFA_FMToken> m_pToken; | 132 std::unique_ptr<CXFA_FMToken> m_pToken; |
| 133 CXFA_FMErrorInfo* m_pErrorInfo; | 133 CXFA_FMErrorInfo* m_pErrorInfo; |
| 134 }; | 134 }; |
| 135 | 135 |
| 136 #endif // XFA_FXFA_FM2JS_XFA_LEXER_H_ | 136 #endif // XFA_FXFA_FM2JS_XFA_LEXER_H_ |
| OLD | NEW |