Skip to content

Latest commit

 

History

History
68 lines (57 loc) · 1.03 KB

gramar.org

File metadata and controls

68 lines (57 loc) · 1.03 KB

Gramar

adding a variable

<ident> let

adding a global

<ident> global

setting a variable

<var> <value> =

defining a function

jort let ( a b ) {
    a b - println
} fn =

calling a function

<args> <fn> @

example:

4 3 jort @

indexing an array

<array> <index> # (maybe with # or @)

example:

test 2 #

defining tuples (only really good for fns at this point)

( <contents> ) the spaces are important

defining a block

{ <contents> } the spaces are important here too

defining an array

[ <contents> ] as always, the spaces are important (i gotta change that but yk (or maybe even not because its consistent))

example

among let [ 1 2 3 4 ] =

for loop

<iterator> <ident> <block> for

example

among i { i println } for

if statement

<condition> <block> if

example

0 { "chud" println } if