Implement while loops
This commit is contained in:
parent
b55420d51b
commit
3df0f5b37c
@ -15,13 +15,14 @@ while true {
|
|||||||
(expression
|
(expression
|
||||||
(value
|
(value
|
||||||
(boolean)))
|
(boolean)))
|
||||||
|
(item
|
||||||
(statement
|
(statement
|
||||||
(expression
|
(expression
|
||||||
(tool_call
|
(tool_call
|
||||||
(output
|
(output
|
||||||
(expression
|
(expression
|
||||||
(value
|
(value
|
||||||
(string)))))))))))
|
(string))))))))))))
|
||||||
|
|
||||||
==================
|
==================
|
||||||
While Assignment
|
While Assignment
|
||||||
@ -43,10 +44,8 @@ foo = while true {
|
|||||||
(expression
|
(expression
|
||||||
(value
|
(value
|
||||||
(boolean)))
|
(boolean)))
|
||||||
|
(item
|
||||||
(statement
|
(statement
|
||||||
(expression
|
|
||||||
(tool_call
|
|
||||||
(output
|
|
||||||
(expression
|
(expression
|
||||||
(value
|
(value
|
||||||
(string)))))))))))))
|
(integer)))))))))))
|
@ -168,7 +168,7 @@ module.exports = grammar({
|
|||||||
'while',
|
'while',
|
||||||
$.expression,
|
$.expression,
|
||||||
'{',
|
'{',
|
||||||
$.statement,
|
$.item,
|
||||||
'}',
|
'}',
|
||||||
),
|
),
|
||||||
|
|
||||||
|
@ -737,7 +737,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "statement"
|
"name": "item"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "STRING",
|
"type": "STRING",
|
||||||
|
@ -487,7 +487,7 @@
|
|||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "statement",
|
"type": "item",
|
||||||
"named": true
|
"named": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
6375
src/parser.c
6375
src/parser.c
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user