diff options
author | Thomas Lively <tlively@google.com> | 2022-10-12 14:56:56 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-12 12:56:56 -0700 |
commit | c47febe1273d8c5d8db9f80d30eb65405ced0b18 (patch) | |
tree | 94e6ba80cbf0ae65ea9336073124bf3b37b4483a /src/wasm-stack.h | |
parent | 871bf6d1d76e8af3c51b47f77875dfe695904bbe (diff) | |
download | binaryen-c47febe1273d8c5d8db9f80d30eb65405ced0b18.tar.gz binaryen-c47febe1273d8c5d8db9f80d30eb65405ced0b18.tar.bz2 binaryen-c47febe1273d8c5d8db9f80d30eb65405ced0b18.zip |
[Parser][NFC] Move `ParseInput` into the parser context (#5132)
Rather than passing both a `Ctx` and a `ParseInput` to every parsing function,
pass only a `Ctx` with a `ParseInput` inside of it. This significantly reduces
verbosity in the parser. To handle cases where parsing needs to happen at
specific locations, which used to be handled by constructing a new `ParseInput`
independent from the ctx, introduce a new RAII utility for temporarily changing
the location of the `ParseInput` inside a context.
Also add a utility for generating an error at a particular location to avoid
having to construct new `ParseInput` objects just for that purpose. This
resolves a few TODOs about correcting error locations, but since we don't test
those yet, I still consider this NFC.
Diffstat (limited to 'src/wasm-stack.h')
0 files changed, 0 insertions, 0 deletions