Skip to content

Latest commit

 

History

History
53 lines (42 loc) · 808 Bytes

LANGUAGESPEC.md

File metadata and controls

53 lines (42 loc) · 808 Bytes

Legend

< > denotes mandatory ( ) denotes optional

Variable Declaration

var (= value | expr) <;> gbl <= value | expr> <;>

If Declaration

if <{> <}>

If statements also have else conditionals

if <{> <;> <}> else <{> (else-body) <}>

else if's can be chained infinitely.

Function Declaration

def <(>(args ...)<)> <{> <}>

Function calls

How to call a Luna function:

functionname("this-is-an-arg-string");

Loops

Luna has two types of loops, for, and while

While loop declaration

while<(><)> <{> <}>

For loop declaration

for <(>, , <)> <{> <}>