minion/prog.mn
Micke Nordin 9b1ff4c361
Start of minion programming language
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
2022-06-07 12:01:39 +02:00

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)
}