diff options
author | Jo-Philipp Wich <jo@mein.io> | 2022-07-14 14:33:12 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2022-07-28 13:18:30 +0200 |
commit | 03c8e4b465c8cffd2596d2741b29ad2ba4ec1765 (patch) | |
tree | 6a43c9f54be5e3de4fcbc73b5ebaa518e642d3ad /tests | |
parent | 1219d7efa170bf38fb1bf6a10fa0d1f96e62f091 (diff) |
lexer: rewrite token scanner
- Use nested switches instead of lookup tables to detect tokens
- Simplify input buffer logic
- Reduce amount of intermediate states
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/custom/04_bugs/17_hang_on_unclosed_expression_block | 2 | ||||
-rw-r--r-- | tests/custom/04_bugs/18_hang_on_line_comments_at_eof | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/custom/04_bugs/17_hang_on_unclosed_expression_block b/tests/custom/04_bugs/17_hang_on_unclosed_expression_block index 25128bb..29553ab 100644 --- a/tests/custom/04_bugs/17_hang_on_unclosed_expression_block +++ b/tests/custom/04_bugs/17_hang_on_unclosed_expression_block @@ -3,7 +3,7 @@ infinite loop. -- Expect stderr -- Syntax error: Unterminated template block -In line 1, byte 6: +In line 1, byte 5: `{{ 1` ^-- Near here diff --git a/tests/custom/04_bugs/18_hang_on_line_comments_at_eof b/tests/custom/04_bugs/18_hang_on_line_comments_at_eof index 957ed47..5fc811e 100644 --- a/tests/custom/04_bugs/18_hang_on_line_comments_at_eof +++ b/tests/custom/04_bugs/18_hang_on_line_comments_at_eof @@ -2,7 +2,7 @@ When parsing a comment near EOF, or a comment escaping the end of an expression block, the lexer did end up in an infinite loop. -- Expect stderr -- -Syntax error: Expecting expression +Syntax error: Unterminated template block In line 1, byte 9: `{{ // }}` |