diff options
author | Ryan Harrison <rharrison@chromium.org> | 2017-07-24 14:30:50 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-07-24 18:53:44 +0000 |
commit | 585f4f0828d2bef2ea132a19e28f21af67bb6bdd (patch) | |
tree | 0f24f348387b52e996e21f2f7edaab0d6f9261f4 /xfa/fxfa/fm2js/cxfa_fmlexer.h | |
parent | 24ef63300f167ac63fb1f7fe8d3323ed6bce1695 (diff) | |
download | pdfium-585f4f0828d2bef2ea132a19e28f21af67bb6bdd.tar.xz |
Remove extracting characters from input
Throughout the lexer there is use of a pattern where a character is
extracted from the location currently being pointed at in the input
and tests are done on this value. This is uneeded, since normally the
pointer isn't being modified while the character is stored, so the
pointer can be dereferenced directly.
This CL also cleans ups the implementation of string extraction from
the input to be easier to read, since it did depend on the character
being extracted to work. The IsFooCharacter methods are also
changed to take in a character instead of a pointer, since they are
only testing the character value not the pointer.
BUG=pdfium:814
Change-Id: I8eda01e0af59ff1f6c6e97d6fb504856c7a08a24
Reviewed-on: https://pdfium-review.googlesource.com/8690
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fxfa/fm2js/cxfa_fmlexer.h')
-rw-r--r-- | xfa/fxfa/fm2js/cxfa_fmlexer.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xfa/fxfa/fm2js/cxfa_fmlexer.h b/xfa/fxfa/fm2js/cxfa_fmlexer.h index 3b5b3727e7..11076f8d72 100644 --- a/xfa/fxfa/fm2js/cxfa_fmlexer.h +++ b/xfa/fxfa/fm2js/cxfa_fmlexer.h @@ -123,8 +123,8 @@ class CXFA_FMLexer { const wchar_t* String(CXFA_FMToken* t, const wchar_t* p); const wchar_t* Identifiers(CXFA_FMToken* t, const wchar_t* p); const wchar_t* Comment(const wchar_t* p); + XFA_FM_TOKEN IsKeyword(const CFX_WideStringC& p); - std::unique_ptr<CXFA_FMToken> Scan(); const wchar_t* m_ptr; const wchar_t* const m_end; |