mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 06:58:11 +00:00
![]() This is a bit nicer for two reasons: - The absence of line number/column information isn't based on 'values are zero' anymore but on Optional's value - When reporting syntax errors with position information other than the current token's position we had to store line and column ourselves, like this: auto foo_start_line = m_parser_state.m_current_token.line_number(); auto foo_start_column = m_parser_state.m_current_token.line_column(); ... syntax_error("...", foo_start_line, foo_start_column); Which now becomes: auto foo_start= position(); ... syntax_error("...", foo_start); This makes it easier to report correct positions for syntax errors that only emerge a few tokens later :^) |
||
---|---|---|
.. | ||
Heap | ||
Runtime | ||
Tests | ||
AST.cpp | ||
AST.h | ||
CMakeLists.txt | ||
Console.cpp | ||
Console.h | ||
Forward.h | ||
Interpreter.cpp | ||
Interpreter.h | ||
Lexer.cpp | ||
Lexer.h | ||
MarkupGenerator.cpp | ||
MarkupGenerator.h | ||
Parser.cpp | ||
Parser.h | ||
Token.cpp | ||
Token.h |