diff options
author | Ben Smith <binji@chromium.org> | 2018-09-02 18:22:35 -0700 |
---|---|---|
committer | Ben Smith <binjimin@gmail.com> | 2018-09-04 15:13:23 -0700 |
commit | b4125e90c70a6b1bef4480e33f3c838ab4c7cfcb (patch) | |
tree | 20c6e46776e5038ac3c97365a9a0435cb81ad340 /src/tools/wast2json.cc | |
parent | 4a54eb34d3e362c8a49316aff6e989f7c9743ed9 (diff) | |
download | wabt-b4125e90c70a6b1bef4480e33f3c838ab4c7cfcb.tar.gz wabt-b4125e90c70a6b1bef4480e33f3c838ab4c7cfcb.tar.bz2 wabt-b4125e90c70a6b1bef4480e33f3c838ab4c7cfcb.zip |
Move WastLexer out of NameResolver, Validator, etc.
Also remove wast-parser-lexer-shared.{cc,h}.
Diffstat (limited to 'src/tools/wast2json.cc')
-rw-r--r-- | src/tools/wast2json.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/tools/wast2json.cc b/src/tools/wast2json.cc index ca047ec3..f82a493d 100644 --- a/src/tools/wast2json.cc +++ b/src/tools/wast2json.cc @@ -100,19 +100,18 @@ int ProgramMain(int argc, char** argv) { WABT_FATAL("unable to read file: %s\n", s_infile); } - ErrorHandlerFile error_handler(Location::Type::Text); + ErrorHandlerFile error_handler(Location::Type::Text, lexer->MakeLineFinder()); std::unique_ptr<Script> script; WastParseOptions parse_wast_options(s_features); Result result = ParseWastScript(lexer.get(), &script, &error_handler, &parse_wast_options); if (Succeeded(result)) { - result = ResolveNamesScript(lexer.get(), script.get(), &error_handler); + result = ResolveNamesScript(script.get(), &error_handler); if (Succeeded(result) && s_validate) { ValidateOptions options(s_features); - result = - ValidateScript(lexer.get(), script.get(), &error_handler, options); + result = ValidateScript(script.get(), &error_handler, options); } if (Succeeded(result)) { |