diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/const-function-if.mnml | 9 | ||||
-rw-r--r-- | test/const-function.mnml | 4 | ||||
-rw-r--r-- | test/if.mnml | 11 | ||||
-rw-r--r-- | test/test.mnml | 8 |
4 files changed, 27 insertions, 5 deletions
diff --git a/test/const-function-if.mnml b/test/const-function-if.mnml new file mode 100644 index 0000000..48fc4fb --- /dev/null +++ b/test/const-function-if.mnml @@ -0,0 +1,9 @@ +const main: function = (input: string): void { + if (input == "hello") { + const bye: string = "bye" + } + + return input +} + +main(input = "hello") diff --git a/test/const-function.mnml b/test/const-function.mnml index 1f77a73..9630dd8 100644 --- a/test/const-function.mnml +++ b/test/const-function.mnml @@ -1,6 +1,8 @@ -const main: function = (input: string or integer): void { +const main: function = (input: string or integer, default: integer = 1): void { const hello: string = input + " world!" const bye: string = "bye!" return hello + " " + bye } + +main(input = "hey", 2) diff --git a/test/if.mnml b/test/if.mnml new file mode 100644 index 0000000..1d273b3 --- /dev/null +++ b/test/if.mnml @@ -0,0 +1,11 @@ +if (1 == 2) { + main1() +} + +else if (true != false) { + main2() +} + +else { + main3() +} diff --git a/test/test.mnml b/test/test.mnml index 9659081..a14bdec 100644 --- a/test/test.mnml +++ b/test/test.mnml @@ -1,7 +1,7 @@ const henshin: integer = 2 // comment // next comment -var ply: string = "abc" -ply = "way cooler!!" +/*var ply: string = "abc" +ply = "way cooler!!"*/ const new: integer = henshin + 5 * 10 @@ -18,9 +18,9 @@ main()/* main("pipe1!") => print($) -var mls: string = "alphabet +/*var mls: string = "alphabet ende -gelände" +gelände"*/ const array: [integer] = [1, 2, 3] const map: [string][string or integer or bool] = [ |