tree-sitter-omega
aien-dev/tree-sitter-omega
Brought by drakestapleton
tree-sitter-omega / test / corpus / errors.txt
| 1 | ================================================================================ |
| 2 | Missing end is an error |
| 3 | :error |
| 4 | ================================================================================ |
| 5 | |
| 6 | fn main to int |
| 7 | ret 0 |
| 8 | |
| 9 | -------------------------------------------------------------------------------- |
| 10 | |
| 11 | (ERROR) |
| 12 | |
| 13 | ================================================================================ |
| 14 | Unclosed group is an error |
| 15 | :error |
| 16 | ================================================================================ |
| 17 | |
| 18 | fn main to int |
| 19 | ret (int 0 |
| 20 | end |
| 21 | |
| 22 | -------------------------------------------------------------------------------- |
| 23 | |
| 24 | (ERROR) |
| 25 | |
| 26 | ================================================================================ |
| 27 | Unterminated text is an error |
| 28 | :error |
| 29 | ================================================================================ |
| 30 | |
| 31 | text t "abc |
| 32 | fn main to int |
| 33 | ret 0 |
| 34 | end |
| 35 | |
| 36 | -------------------------------------------------------------------------------- |
| 37 | |
| 38 | (ERROR) |
| 39 | |
| 40 | ================================================================================ |
| 41 | A statement outside a function is an error |
| 42 | :error |
| 43 | ================================================================================ |
| 44 | |
| 45 | x = 5 |
| 46 | fn main to int |
| 47 | ret 0 |
| 48 | end |
| 49 | |
| 50 | -------------------------------------------------------------------------------- |
| 51 | |
| 52 | (ERROR) |