Start fixing error outputs

Signed-off-by: Marcel Müller <neikos@neikos.email>
This commit is contained in:
Marcel Müller 2026-03-16 11:22:29 +01:00
parent d6ac7af36b
commit 7f7bf5c98d
16 changed files with 319 additions and 21 deletions

View file

@ -0,0 +1,32 @@
---
source: tests/file_tests.rs
expression: ast
info:
input: "{{ if }} {{ end }}\n{{ if if }} {{ end }}\n{{ if if }} {{ for foo in bar }} {{ end }} {{ end }}\n{{ for in bar }} {{ end }}\n{{ for blah bar }} {{ end }}\n{{ else }}"
context: {}
---
error: Expected an expression after 'if'
 ╭▸ 
1 │ {{ if }} {{ end }}
│ ━━
╰╴
error: Expected an expression after 'if'
 ╭▸ 
2 │ {{ if if }} {{ end }}
╰╴ ━━
error: Expected an expression after 'if'
 ╭▸ 
3 │ {{ if if }} {{ for foo in bar }} {{ end }} {{ end }}
╰╴ ━━
error: Expected identifier here
 ╭▸ 
4 │ {{ for in bar }} {{ end }}
╰╴ ━━━━━━
error: Missing `in` in `for _ in <expr>`
 ╭▸ 
5 │ {{ for blah bar }} {{ end }}
╰╴ ━━━━━━━━
error: An error occurred while producing an Ast
 ╭▸ 
6 │ {{ else }}
╰╴ ━━━━━━━