| 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 #include "xfa/fxfa/fm2js/xfa_fmparse.h" | 7 #include "xfa/fxfa/fm2js/xfa_fmparse.h" |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 946 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 957 XFA_FM_KeywordToString(m_pToken->m_type), ws_TempString.c_str()); | 957 XFA_FM_KeywordToString(m_pToken->m_type), ws_TempString.c_str()); |
| 958 } | 958 } |
| 959 int32_t iDirection = 0; | 959 int32_t iDirection = 0; |
| 960 if (m_pToken->m_type == TOKupto) { | 960 if (m_pToken->m_type == TOKupto) { |
| 961 iDirection = 1; | 961 iDirection = 1; |
| 962 } else if (m_pToken->m_type == TOKdownto) { | 962 } else if (m_pToken->m_type == TOKdownto) { |
| 963 iDirection = -1; | 963 iDirection = -1; |
| 964 } else { | 964 } else { |
| 965 CFX_WideString ws_TempString = m_pToken->m_wstring; | 965 CFX_WideString ws_TempString = m_pToken->m_wstring; |
| 966 Error(m_pToken->m_uLinenum, FMERR_EXPECTED_TOKEN, L"upto or downto", | 966 Error(m_pToken->m_uLinenum, FMERR_EXPECTED_TOKEN, L"upto or downto", |
| 967 (const FX_WCHAR*)ws_TempString); | 967 ws_TempString.c_str()); |
| 968 } | 968 } |
| 969 NextToken(); | 969 NextToken(); |
| 970 std::unique_ptr<CXFA_FMSimpleExpression> pAccessor(ParseSimpleExpression()); | 970 std::unique_ptr<CXFA_FMSimpleExpression> pAccessor(ParseSimpleExpression()); |
| 971 std::unique_ptr<CXFA_FMSimpleExpression> pStep; | 971 std::unique_ptr<CXFA_FMSimpleExpression> pStep; |
| 972 if (m_pToken->m_type == TOKstep) { | 972 if (m_pToken->m_type == TOKstep) { |
| 973 NextToken(); | 973 NextToken(); |
| 974 pStep.reset(ParseSimpleExpression()); | 974 pStep.reset(ParseSimpleExpression()); |
| 975 } | 975 } |
| 976 Check(TOKdo); | 976 Check(TOKdo); |
| 977 std::unique_ptr<CXFA_FMExpression> pList(ParseBlockExpression()); | 977 std::unique_ptr<CXFA_FMExpression> pList(ParseBlockExpression()); |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1042 NextToken(); | 1042 NextToken(); |
| 1043 e.reset(ParseBlockExpression()); | 1043 e.reset(ParseBlockExpression()); |
| 1044 Check(TOKend); | 1044 Check(TOKend); |
| 1045 if (m_pErrorInfo->message.IsEmpty()) { | 1045 if (m_pErrorInfo->message.IsEmpty()) { |
| 1046 e.reset(new CXFA_FMDoExpression(line, e.release())); | 1046 e.reset(new CXFA_FMDoExpression(line, e.release())); |
| 1047 } else { | 1047 } else { |
| 1048 e.reset(); | 1048 e.reset(); |
| 1049 } | 1049 } |
| 1050 return e.release(); | 1050 return e.release(); |
| 1051 } | 1051 } |
| OLD | NEW |