Skip to content

Commit

Permalink
chore: doc example to match source file
Browse files Browse the repository at this point in the history
  • Loading branch information
Eddie authored and Eddie committed Jun 19, 2024
1 parent 60e8f45 commit 186b23f
Showing 3 changed files with 12 additions and 14 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -68,9 +68,10 @@ echo '
loop (greaterThan i 0) {
print i
print "...\n"
sleep 1000
i = - i 1
}
print("Blast off!\n")
print "Blast off!\n"
' | jungle run
```

6 changes: 3 additions & 3 deletions programs/loop.source
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
i = 3
loop (greaterThan i 0) {
print(i)
print('...\n')
print i
print "...\n"
sleep 1000
i = - i 1
}
print("Blast off!\n")
print "Blast off!\n"
17 changes: 7 additions & 10 deletions programs/loop.tokens
Original file line number Diff line number Diff line change
@@ -19,17 +19,15 @@
3 1 SPACE
3 2 SPACE
3 3 KEYWORD print
3 8 BRACKET_ROUND_OPEN
3 8 SPACE
3 9 SYMBOL i
3 10 BRACKET_ROUND_CLOSE
3 11 NEWLINE
3 10 NEWLINE
4 1 SPACE
4 2 SPACE
4 3 KEYWORD print
4 8 BRACKET_ROUND_OPEN
4 8 SPACE
4 9 TEXT ...\\n
4 16 BRACKET_ROUND_CLOSE
4 17 NEWLINE
4 16 NEWLINE
5 1 SPACE
5 2 SPACE
5 3 KEYWORD sleep
@@ -51,8 +49,7 @@
7 1 BRACKET_CURLY_CLOSE
7 2 NEWLINE
8 1 KEYWORD print
8 6 BRACKET_ROUND_OPEN
8 6 SPACE
8 7 TEXT Blast off!\\n
8 21 BRACKET_ROUND_CLOSE
8 22 NEWLINE
8 23 TERMINAL
8 21 NEWLINE
8 22 TERMINAL

0 comments on commit 186b23f

Please sign in to comment.