The lexer can tokenize: * variable declarations * assignment to variables * function declarations * function calls * while loop * if statement minion is strongly typed and all variables MUST have a type declarations
27 lines
269 B
Text
27 lines
269 B
Text
float: x = 10.1
|
|
|
|
func: hello(float: x) = {
|
|
stdout: out = x * 10
|
|
}
|
|
|
|
{
|
|
str: name
|
|
int: var = 1
|
|
name = hej hopp
|
|
}
|
|
|
|
|
|
hello(x)
|
|
|
|
func: good_bye(void: none) = int: getout = 0
|
|
|
|
good_bye()
|
|
|
|
if (x ? 1) {
|
|
hello(x)
|
|
}
|
|
|
|
while (x < 1) {
|
|
x = x -1
|
|
hello(x)
|
|
}
|