summaryrefslogtreecommitdiff
path: root/xfa/fxfa/fm2js/cxfa_fmlexer.h
diff options
context:
space:
mode:
authordan sinclair <dsinclair@chromium.org>2018-02-19 15:18:02 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-02-19 15:18:02 +0000
commit03632fb7fd1f6924f464708155ed0338d46f9862 (patch)
tree9b0863b05a676f8e1ed48b8634d8b792a00af520 /xfa/fxfa/fm2js/cxfa_fmlexer.h
parentf51cdbd2bddde1de314b69280c97e57ab07dfdc8 (diff)
downloadpdfium-03632fb7fd1f6924f464708155ed0338d46f9862.tar.xz
Simplify formcalc token list
The keyword list in the formcalc lexer is only used to match identifiers. We don't need to store the non-identifier tokens in the list, so they're removed. The hash is removed and the list is compared by string instead. The token names have been moved to DEBUG so they won't be included in Release builds. Change-Id: Ieec00e9944960e559079083a605e3249c4128841 Reviewed-on: https://pdfium-review.googlesource.com/27190 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'xfa/fxfa/fm2js/cxfa_fmlexer.h')
-rw-r--r--xfa/fxfa/fm2js/cxfa_fmlexer.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/xfa/fxfa/fm2js/cxfa_fmlexer.h b/xfa/fxfa/fm2js/cxfa_fmlexer.h
index b9764c5aba..c94f2a901f 100644
--- a/xfa/fxfa/fm2js/cxfa_fmlexer.h
+++ b/xfa/fxfa/fm2js/cxfa_fmlexer.h
@@ -85,7 +85,6 @@ enum XFA_FM_TOKEN {
struct XFA_FMKeyword {
XFA_FM_TOKEN m_type;
- uint32_t m_hash;
const wchar_t* m_keyword;
};
@@ -95,7 +94,9 @@ class CXFA_FMToken {
explicit CXFA_FMToken(uint32_t line_num);
~CXFA_FMToken();
+#ifndef NDEBUG
WideString ToDebugString() const;
+#endif // NDEBUG
WideStringView m_string;
XFA_FM_TOKEN m_type;