diff options
Diffstat (limited to 'src/parser/lexer.h')
-rw-r--r-- | src/parser/lexer.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/parser/lexer.h b/src/parser/lexer.h index 1a93d3e99..e601091db 100644 --- a/src/parser/lexer.h +++ b/src/parser/lexer.h @@ -157,12 +157,13 @@ extern Name srcAnnotationKind; struct Lexer { private: - std::string_view buffer; size_t index = 0; std::optional<Token> curr; std::vector<Annotation> annotations; public: + std::string_view buffer; + Lexer(std::string_view buffer) : buffer(buffer) { setIndex(0); } size_t getIndex() const { return index; } |