Skip to content

Commit

Permalink
Make certain keywords reserved
Browse files Browse the repository at this point in the history
  • Loading branch information
appcypher committed Jun 18, 2018
1 parent f8151cb commit 527a9c3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/language/summary.ast
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ WHILE LOOP & LOOP
print file.next()

# Unconditional loop. Synonymous to `while true`.
loop: # Note, `loop` is not a reserved keyword.
loop:
let input = scan '>>> '
let tokens = lex input
let ast = parse tokens
Expand All @@ -702,7 +702,7 @@ WHILE LOOP & LOOP
print result

# A do-while loop block is evaluated at least once.
do: # Note, `do` is not a reserved keyword.
do:
print x
x += 1
while x < 50
Expand All @@ -715,7 +715,7 @@ WHILE LOOP & LOOP
title = choose_title_randomly()
..

# Like `for` loops, `while` and `loop` can have a closing `end` block.
# Like `for` loops, `while` and `loop` can have a closing `else` block.
while file.has_next() where /\t+/ in file.next():
break 'File contains tabs!'
else: 'File is clean!'
Expand Down

0 comments on commit 527a9c3

Please sign in to comment.