summaryrefslogtreecommitdiff
path: root/src/wasm/wat-parser.cpp
diff options
context:
space:
mode:
authorThomas Lively <7121787+tlively@users.noreply.github.com>2022-06-14 18:46:42 -0700
committerGitHub <noreply@github.com>2022-06-14 18:46:42 -0700
commit96923f19eb0e7233fd1c7f438d3ebcf97690fd53 (patch)
treeab20ee27bdebccf367342119e86fc6aab7efab40 /src/wasm/wat-parser.cpp
parentee5e48d5c1408dfb291c4b9bfa4804dbe5ba1520 (diff)
downloadbinaryen-96923f19eb0e7233fd1c7f438d3ebcf97690fd53.tar.gz
binaryen-96923f19eb0e7233fd1c7f438d3ebcf97690fd53.tar.bz2
binaryen-96923f19eb0e7233fd1c7f438d3ebcf97690fd53.zip
[Parser][NFC] Small code cleanups (#4729)
Apply cleanups suggested by aheejin in post-merge code review of previous parser PRs.
Diffstat (limited to 'src/wasm/wat-parser.cpp')
-rw-r--r--src/wasm/wat-parser.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/wasm/wat-parser.cpp b/src/wasm/wat-parser.cpp
index aafb66019..caeccfd76 100644
--- a/src/wasm/wat-parser.cpp
+++ b/src/wasm/wat-parser.cpp
@@ -32,11 +32,11 @@
// definitions. This phase establishes the indices and names of each module
// element so that subsequent phases can look them up.
//
-// The second phase, not yet implemented, parses type definitions to construct
-// the types used in the module. This has to be its own phase because we have no
-// way to refer to a type before it has been built along with all the other
-// types, unlike for other module elements that can be referred to by name
-// before their definitions have been parsed.
+// The second phase parses type definitions to construct the types used in the
+// module. This has to be its own phase because we have no way to refer to a
+// type before it has been built along with all the other types, unlike for
+// other module elements that can be referred to by name before their
+// definitions have been parsed.
//
// The third phase, not yet implemented, further parses and constructs types
// implicitly defined by type uses in functions, blocks, and call_indirect
@@ -89,7 +89,7 @@ struct ParseInput {
lexer.setIndex(index);
}
- bool empty() { return lexer == lexer.end(); }
+ bool empty() { return lexer.empty(); }
std::optional<Token> peek() {
if (!empty()) {