plum
git clone https://git.pyrossh.dev/plum
A statically typed, imperative programming language inspired by rust, python
plum-tooling/tree-sitter-plum/test/corpus/while.txt
| 1910cfc | 1 | ================================================================================ |
| 1910cfc | 2 | while |
| 1910cfc | 3 | ================================================================================ |
| 1910cfc | 4 | |
| c06ddba | 5 | fun main() = |
| 1910cfc | 6 | i = 0 |
| 1910cfc | 7 | while i < 10 |
| 1910cfc | 8 | i = i + 1 |
| 1910cfc | 9 | printLn("{i}") |
| 1910cfc | 10 | |
| 1910cfc | 11 | -------------------------------------------------------------------------------- |
| 1910cfc | 12 | |
| 1910cfc | 13 | (source |
| 1910cfc | 14 | (fn |
| 1910cfc | 15 | (fn_identifier) |
| 1910cfc | 16 | (body |
| 1910cfc | 17 | (assign |
| 1910cfc | 18 | (var_identifier) |
| 1910cfc | 19 | (expression |
| 1910cfc | 20 | (primary_expression |
| 1910cfc | 21 | (integer)))) |
| 1910cfc | 22 | (while |
| 1910cfc | 23 | (expression |
| 1910cfc | 24 | (comparison_operator |
| 1910cfc | 25 | (primary_expression |
| 1910cfc | 26 | (var_identifier)) |
| 1910cfc | 27 | (primary_expression |
| 1910cfc | 28 | (integer)))) |
| 1910cfc | 29 | (body |
| 1910cfc | 30 | (assign |
| 1910cfc | 31 | (var_identifier) |
| 1910cfc | 32 | (expression |
| 1910cfc | 33 | (primary_expression |
| 1910cfc | 34 | (binary_operator |
| 1910cfc | 35 | (primary_expression |
| 1910cfc | 36 | (var_identifier)) |
| 1910cfc | 37 | (primary_expression |
| 1910cfc | 38 | (integer)))))) |
| aeaba6f | 39 | (expression |
| aeaba6f | 40 | (primary_expression |
| aeaba6f | 41 | (fn_call |
| aeaba6f | 42 | (var_identifier) |
| aeaba6f | 43 | (fn_argument_list |
| aeaba6f | 44 | (expression |
| aeaba6f | 45 | (primary_expression |
| aeaba6f | 46 | (string |
| aeaba6f | 47 | (string_start) |
| aeaba6f | 48 | (interpolation |
| 2ec05c8 | 49 | (expression |
| 2ec05c8 | 50 | (primary_expression |
| 2ec05c8 | 51 | (var_identifier)))) |
| aeaba6f | 52 | (string_end))))))))))))) |