Stub in an until statement.

pull/70/head
Rob Rix 2016-02-18 20:17:09 +07:00
parent fdc8a97400
commit cbb5e87f18
4 changed files with 304 additions and 198 deletions

@ -19,6 +19,7 @@ module.exports = grammar({
seq($._statement, "if", $._expression),
seq($._statement, "while", $._expression),
seq($._statement, "unless", $._expression),
seq($._statement, "until", $._expression),
$._expression
),

@ -27,3 +27,13 @@ foo unless bar
---
(program (identifier) (identifier))
================
until statement
================
foo until bar
---
(program (identifier) (identifier))

17
src/grammar.json vendored

@ -146,6 +146,23 @@
}
]
},
{
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "_statement"
},
{
"type": "STRING",
"value": "until"
},
{
"type": "SYMBOL",
"name": "_expression"
}
]
},
{
"type": "SYMBOL",
"name": "_expression"

474
src/parser.c vendored

File diff suppressed because it is too large Load Diff