Improve AST

This commit is contained in:
Jeff 2023-10-01 12:17:52 -04:00
parent 63d495c1e1
commit 80f5fce14a
5 changed files with 8502 additions and 8371 deletions

@ -1 +1 @@
Subproject commit e9db34be8bf38f1d636ffac82e4bc3db5c727524 Subproject commit 597d6bd8b8aed37512ef8b27a4e2d5dea52d7cad

View File

@ -1,4 +1,4 @@
numbers = [1, 2 3] numbers = [1, 2, 3]
x = numbers.0 x = numbers.0
y = numbers.1 y = numbers.1

View File

@ -164,7 +164,7 @@ module.exports = grammar({
function_call: $ => prec.right(seq( function_call: $ => prec.right(seq(
$.identifier, $.identifier,
'<', '<',
repeat($.expression), repeat(seq($.expression, optional(','))),
'>', '>',
)), )),

View File

@ -733,8 +733,25 @@
{ {
"type": "REPEAT", "type": "REPEAT",
"content": { "content": {
"type": "SYMBOL", "type": "SEQ",
"name": "expression" "members": [
{
"type": "SYMBOL",
"name": "expression"
},
{
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": ","
},
{
"type": "BLANK"
}
]
}
]
} }
}, },
{ {

16846
src/parser.c

File diff suppressed because it is too large Load Diff