diff options
author | Mike Buland <eichlan@xagasoft.com> | 2011-12-29 22:27:59 -0700 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2011-12-29 22:27:59 -0700 |
commit | f66458278ce3663397fc985a1253c85b74f011e6 (patch) | |
tree | 785e2fb51a91fe277c698ea84009e0052ef6555e /test.stage | |
parent | f404d991aa53ed81855e51b597bfe1d5c2288b42 (diff) | |
download | stage-f66458278ce3663397fc985a1253c85b74f011e6.tar.gz stage-f66458278ce3663397fc985a1253c85b74f011e6.tar.bz2 stage-f66458278ce3663397fc985a1253c85b74f011e6.tar.xz stage-f66458278ce3663397fc985a1253c85b74f011e6.zip |
Most AstNodes work now.
Next up: loops, proper variable references with scopes, and gotos.
Diffstat (limited to 'test.stage')
-rw-r--r-- | test.stage | 23 |
1 files changed, 17 insertions, 6 deletions
@@ -13,6 +13,19 @@ global | |||
13 | } | 13 | } |
14 | } | 14 | } |
15 | 15 | ||
16 | function sillyDisplay( txt, extra ) | ||
17 | { | ||
18 | display("!~! " + txt + " !~!"); | ||
19 | if extra then | ||
20 | { | ||
21 | display("And then some extra!"); | ||
22 | } | ||
23 | else | ||
24 | { | ||
25 | display("...no extra for you"); | ||
26 | } | ||
27 | } | ||
28 | |||
16 | situation <<start>> | 29 | situation <<start>> |
17 | { | 30 | { |
18 | setup | 31 | setup |
@@ -20,17 +33,15 @@ situation <<start>> | |||
20 | name = "Bob"; | 33 | name = "Bob"; |
21 | name += " The Man"; | 34 | name += " The Man"; |
22 | display("This is the setup phase for start, " + name); | 35 | display("This is the setup phase for start, " + name); |
23 | display( 5 == 6 ); | 36 | display( 5 <= 1 ); |
24 | display( 5 == 5 ); | 37 | display( 1 <= 1 ); |
38 | display( 0 <= 1 ); | ||
39 | sillyDisplay( "Hello", true ); | ||
25 | 40 | ||
26 | if name == "Bob The Man" then | 41 | if name == "Bob The Man" then |
27 | { | 42 | { |
28 | display("You are bob"); | 43 | display("You are bob"); |
29 | } | 44 | } |
30 | else | ||
31 | { | ||
32 | display("You are not bob"); | ||
33 | } | ||
34 | } | 45 | } |
35 | 46 | ||
36 | enter | 47 | enter |