summaryrefslogtreecommitdiff
path: root/test/bigswitch.cpp
diff options
context:
space:
mode:
authorThomas Lively <7121787+tlively@users.noreply.github.com>2022-06-01 13:00:54 -0700
committerGitHub <noreply@github.com>2022-06-01 20:00:54 +0000
commite74f66e92affd637cb19af2ad5f3d015ba86aa1c (patch)
tree75bd835941c2f9cf72f0b29814f114fe0159272d /test/bigswitch.cpp
parent623e08e88db3ebc913fe76e7f60e89fa030f884d (diff)
downloadbinaryen-e74f66e92affd637cb19af2ad5f3d015ba86aa1c.tar.gz
binaryen-e74f66e92affd637cb19af2ad5f3d015ba86aa1c.tar.bz2
binaryen-e74f66e92affd637cb19af2ad5f3d015ba86aa1c.zip
[Parser] Token classification (#4699)
Add methods to `Token` for determining whether the token can be interpreted as a particular token type, returning the interpreted value as appropriate. These methods perform additional bounds checks for integers and NaN payloads that could not be done during the initial lexing because the lexer did not know what the intended token type was. The float methods also reinterpret integer tokens as floating point tokens since the float grammar is a superset of the integer grammar and inject the NaN payloads into parsed NaN values. Move all bounds checking to these new classifier functions to have it in one place.
Diffstat (limited to 'test/bigswitch.cpp')
0 files changed, 0 insertions, 0 deletions