Implement while loops

This commit is contained in:
Jeff 2023-10-06 22:51:04 -04:00
parent b55420d51b
commit 3df0f5b37c
5 changed files with 3212 additions and 3196 deletions

View File

@ -15,13 +15,14 @@ while true {
(expression
(value
(boolean)))
(statement
(expression
(tool_call
(output
(expression
(value
(string)))))))))))
(item
(statement
(expression
(tool_call
(output
(expression
(value
(string))))))))))))
==================
While Assignment
@ -43,10 +44,8 @@ foo = while true {
(expression
(value
(boolean)))
(statement
(expression
(tool_call
(output
(expression
(value
(string)))))))))))))
(item
(statement
(expression
(value
(integer)))))))))))

View File

@ -168,7 +168,7 @@ module.exports = grammar({
'while',
$.expression,
'{',
$.statement,
$.item,
'}',
),

View File

@ -737,7 +737,7 @@
},
{
"type": "SYMBOL",
"name": "statement"
"name": "item"
},
{
"type": "STRING",

View File

@ -487,7 +487,7 @@
"named": true
},
{
"type": "statement",
"type": "item",
"named": true
}
]

File diff suppressed because it is too large Load Diff