nomo/tests/errors/invalid_controls.2-ast.snap
Marcel Müller 42698bb219 Work on error messages
Signed-off-by: Marcel Müller <neikos@neikos.email>
2026-03-18 09:59:36 +01:00

51 lines
2 KiB
Text
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
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{{ for blah}} {{ 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: Missing ident here
 ╭▸ 
4 │ {{ for in bar }} {{ end }}
╰╴ ━━━━━━
error: Missing `in` in `for .. in ` loop
 ╭▸ 
5 │ {{ for blah bar }} {{ end }}
│ ━━━━━━━━
╰╴
note: Try adding it
╭╴
5 │ {{ for blah in bar }} {{ end }}
╰╴ ++
error: Missing `in` in `for .. in ` loop
 ╭▸ 
6 │ {{ for blah}} {{ end }}
│ ━━━━
╰╴
note: Try adding it
╭╴
6 │ {{ for blah in}} {{ end }}
╰╴ ++
error: Unexpected keyword
 ╭▸ 
7 │ {{ else }}
╰╴ ━━━━