Files
beginner-friendly-lang/tree-sitter/example.crr

44 lines
767 B
Plaintext

def tricky =
let ab = funct(1)
let cd = 3
ab + cd
## doc comment
type [a,b] list = [a,b] List option
# comment
def xa =
let data = 2
if data then
data and other and more
else 'MyTag myList ++ [4 + 2 * -(4) - 1] = 2^2
## adds two numbers
## together
def add : int -> int -> int =
a -> b : int -> a + b
def lol =
let data = 2
match x with
a | b -> (match c with y -> 3 | z ->5)
| c -> 3
def main =
let x = 2 ( 5 )
[6 :: int,7,8,"helo world"]
def example = a -> b -> 1:x => y
extensible union io.Plan
extend io.Plan with 'WriteFile Unit
type a b = {a:Int,b: (Array Of Integ), c: a3}
type ?lol.FullPartial = {}
type t List = with lol: &t2 with cursed: 'Tag [t,t2] List option | 'Case2 | 'Case3 | ...?rem -> int -> float