Skip to content

Commit 2ee982f

Browse files
committed
minimal working BareBones interpreter
1 parent 7558714 commit 2ee982f

File tree

18 files changed

+152
-21
lines changed

18 files changed

+152
-21
lines changed

.idea/workspace.xml

Lines changed: 14 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

inputs/basic.bb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ incr i;
22
incr i;
33
incr i;
44
# now let's start decreasing
5-
decr i;
5+
decr i;

inputs/depthTest.bb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# test this with AST.analyze(lines, 1);
2+
incr a;
3+
clear a;
4+
incr a;

inputs/hard.bb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
incr i;
2+
incr i;
3+
incr i;
4+
incr a;
5+
while i not 0 do;
6+
incr a;
7+
incr a;
8+
incr a;
9+
incr x;
10+
while x not 0 do;
11+
incr a;
12+
decr x;
13+
end;
14+
decr i;
15+
end;
16+
incr a;

inputs/moderate.bb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,7 @@ while i not 0 do;
55
incr a;
66
incr a;
77
incr a;
8+
decr i;
89
end;
9-
incr a;
10+
incr a;
11+
# a is now 10!
2.11 KB
Binary file not shown.
44 Bytes
Binary file not shown.
341 Bytes
Binary file not shown.
Binary file not shown.
-617 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)