interplane.Get Omega
Read in your language

tree-sitter-omega

aien-dev/tree-sitter-omega

Brought by drakestapleton

branch main Branches Tags History

tree-sitter-omega / test / highlight / basics.om

36 lines · 663 bytes Raw Blame History
1note a highlight test; assertion lines are note lines
2note <- comment
3fn gcd a uint b uint to uint
4note <- keyword
5note ^ function
6note ^ variable.parameter
7note ^ type.builtin
8note ^ keyword
9while ne b 0 bound 100
10note <- keyword.repeat
11note ^ keyword.operator
12note ^ number
13note ^ keyword.repeat
14t = rem a b
15note <- variable
16note ^ keyword.operator
17end
18ret a
19note <- keyword.return
20end
21fn main to int
22x = f64 2.5
23note ^ number.float
24s = fsqrt ( x )
25note ^ keyword.operator
26note ^ punctuation.bracket
27show x
28note <- function.call
29if eq s x
30note <- keyword.conditional
31ret 0
32else
33trap 4
34note <- keyword.return
35end
36end