tree-sitter-omega
aien-dev/tree-sitter-omega
Brought by drakestapleton
tree-sitter-omega / test / corpus / notes.txt
| 1 | ================================================================================ |
| 2 | The word note inside text is text, not a note |
| 3 | ================================================================================ |
| 4 | |
| 5 | text a " note " |
| 6 | text b "x\nnote add three\nfn" |
| 7 | text c "note" |
| 8 | |
| 9 | -------------------------------------------------------------------------------- |
| 10 | |
| 11 | (source_file |
| 12 | (text_declaration |
| 13 | (identifier) |
| 14 | (string |
| 15 | (string_content))) |
| 16 | (text_declaration |
| 17 | (identifier) |
| 18 | (string |
| 19 | (string_content) |
| 20 | (escape_sequence) |
| 21 | (string_content) |
| 22 | (escape_sequence) |
| 23 | (string_content))) |
| 24 | (text_declaration |
| 25 | (identifier) |
| 26 | (string |
| 27 | (string_content)))) |
| 28 | |
| 29 | ================================================================================ |
| 30 | A bare note line inside a block, a note with a parenthesis, and names that start with note |
| 31 | ================================================================================ |
| 32 | |
| 33 | fn main to int |
| 34 | note |
| 35 | note(x) y |
| 36 | noted = int 2 |
| 37 | ret noted |
| 38 | end |
| 39 | note |
| 40 | |
| 41 | -------------------------------------------------------------------------------- |
| 42 | |
| 43 | (source_file |
| 44 | (function_definition |
| 45 | (identifier) |
| 46 | (return_type |
| 47 | (identifier)) |
| 48 | (comment) |
| 49 | (comment) |
| 50 | (block |
| 51 | (assignment |
| 52 | (identifier) |
| 53 | (expression |
| 54 | (identifier) |
| 55 | (integer))) |
| 56 | (return_statement |
| 57 | (expression |
| 58 | (identifier))))) |
| 59 | (comment)) |