diff options
Diffstat (limited to 'src/wasm')
-rw-r--r-- | src/wasm/wasm-io.cpp | 2 | ||||
-rw-r--r-- | src/wasm/wat-lexer.cpp | 2 | ||||
-rw-r--r-- | src/wasm/wat-parser.cpp | 12 |
3 files changed, 8 insertions, 8 deletions
diff --git a/src/wasm/wasm-io.cpp b/src/wasm/wasm-io.cpp index 55892975b..90f267e9b 100644 --- a/src/wasm/wasm-io.cpp +++ b/src/wasm/wasm-io.cpp @@ -24,12 +24,12 @@ // binary. // +#include "wasm-io.h" #include "support/debug.h" #include "wasm-binary.h" #include "wasm-s-parser.h" #include "wat-parser.h" -#include "wasm-io.h" namespace wasm { diff --git a/src/wasm/wat-lexer.cpp b/src/wasm/wat-lexer.cpp index 0d1dc2794..c7959295c 100644 --- a/src/wasm/wat-lexer.cpp +++ b/src/wasm/wat-lexer.cpp @@ -942,7 +942,7 @@ void Lexer::lexToken() { curr = {tok}; } -TextPos Lexer::position(const char* c) { +TextPos Lexer::position(const char* c) const { assert(size_t(c - buffer.data()) < buffer.size()); TextPos pos{1, 0}; for (const char* p = buffer.data(); p != c; ++p) { 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()) { |