Chromium Code Reviews| Index: xfa/src/fxfa/src/fm2js/xfa_lexer.cpp |
| diff --git a/xfa/src/fxfa/src/fm2js/xfa_lexer.cpp b/xfa/src/fxfa/src/fm2js/xfa_lexer.cpp |
| index 957c21b87418d0c5ddf895aaeab596bba7128084..2902f8c70b97785212cf26e5707f9e5a74453e78 100644 |
| --- a/xfa/src/fxfa/src/fm2js/xfa_lexer.cpp |
| +++ b/xfa/src/fxfa/src/fm2js/xfa_lexer.cpp |
| @@ -83,7 +83,7 @@ inline FX_BOOL XFA_FMDChar::isUnicodeAlpha(uint16_t ch) { |
| return TRUE; |
| } |
| -XFA_FMKeyword keyWords[] = { |
| +const XFA_FMKeyword keyWords[] = { |
| {TOKand, 0x00000026, L"&"}, |
| {TOKlparen, 0x00000028, L"("}, |
| {TOKrparen, 0x00000029, L")"}, |
| @@ -145,13 +145,15 @@ XFA_FMKeyword keyWords[] = { |
| {TOKendif, 0xe0e8fee6, L"endif"}, |
| }; |
| -const FX_WORD KEYWORD_START = TOKdo; |
| -const FX_WORD KEYWORD_END = TOKendif; |
| +const XFA_FM_TOKEN KEYWORD_START = TOKdo; |
| +const XFA_FM_TOKEN KEYWORD_END = TOKendif; |
| } // namespace |
| const FX_WCHAR* XFA_FM_KeywordToString(XFA_FM_TOKEN op) { |
| - return keyWords[op].m_keword; |
| + if (op < KEYWORD_START || op > KEYWORD_END) |
|
Tom Sepez
2016/02/19 23:09:45
TOKdo isn't the first enum value, are you sure you
Oliver Chang
2016/02/19 23:12:57
I assume this is the intention of this function, s
Tom Sepez
2016/02/19 23:17:51
Acknowledged.
|
| + return L""; |
| + return keyWords[op].m_keyword; |
| } |
| CXFA_FMToken::CXFA_FMToken() : m_type(TOKreserver), m_uLinenum(1) {} |