Skip to content

Commit 8c137b1

Browse files
authored
Merge pull request #10 from callisto-lang/CallistoScript
add CallistoScript
2 parents 4376219 + ea47332 commit 8c137b1

File tree

8 files changed

+951
-29
lines changed

8 files changed

+951
-29
lines changed

examples/initDeinit.cal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ implement meow deinit
1515
end
1616

1717
let meow myMeow
18-
myMeow @ printdec new_line
18+
&myMeow @ printdec new_line

examples/sierpinski.cal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ func sierpinski begin
2020

2121
0 -> x
2222

23-
while x n < do
23+
while x n 2 / < do
2424
if x n y 1 + - and then
2525
' ' printch
2626
else

examples/unions.cal

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ end
1010

1111
let MyUnion foo
1212

13-
65 -> foo
13+
65 &foo !
1414
&foo @ printdec new_line
1515

16-
"Hello, world!\n" foo a<
17-
foo printstr
16+
"Hello, world!\n" &foo a<
17+
&foo printstr

source/app.d

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import callisto.compiler;
1010
import callisto.language;
1111
import callisto.codeRemover;
1212
import callisto.preprocessor;
13+
import callisto.backends.lua;
1314
import callisto.backends.uxn;
1415
import callisto.backends.rm86;
1516
import callisto.backends.x86_64;
@@ -163,6 +164,11 @@ int main(string[] args) {
163164
backend = new BackendUXN();
164165
break;
165166
}
167+
case "lua": {
168+
writeln("Language subset 'CallistoScript' in use");
169+
backend = new BackendLua();
170+
break;
171+
}
166172
default: {
167173
stderr.writefln("Unknown backend '%s'", args[i]);
168174
return 1;

0 commit comments

Comments
 (0)