Add array types
This commit is contained in:
parent
dd0af53fa0
commit
1e5f7cd5d5
5 changed files with 1529 additions and 1378 deletions
|
|
@ -1118,6 +1118,10 @@
|
|||
{
|
||||
"type": "SYMBOL",
|
||||
"name": "record_type"
|
||||
},
|
||||
{
|
||||
"type": "SYMBOL",
|
||||
"name": "array_type"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
@ -1196,6 +1200,27 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
"array_type": {
|
||||
"type": "SEQ",
|
||||
"members": [
|
||||
{
|
||||
"type": "STRING",
|
||||
"value": "array"
|
||||
},
|
||||
{
|
||||
"type": "STRING",
|
||||
"value": "of"
|
||||
},
|
||||
{
|
||||
"type": "FIELD",
|
||||
"name": "element_type",
|
||||
"content": {
|
||||
"type": "SYMBOL",
|
||||
"name": "identifier"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"function_declaration": {
|
||||
"type": "SEQ",
|
||||
"members": [
|
||||
|
|
|
|||
|
|
@ -171,6 +171,22 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "array_type",
|
||||
"named": true,
|
||||
"fields": {
|
||||
"element_type": {
|
||||
"multiple": false,
|
||||
"required": true,
|
||||
"types": [
|
||||
{
|
||||
"type": "identifier",
|
||||
"named": true
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "array_value",
|
||||
"named": true,
|
||||
|
|
@ -1837,6 +1853,10 @@
|
|||
"multiple": false,
|
||||
"required": true,
|
||||
"types": [
|
||||
{
|
||||
"type": "array_type",
|
||||
"named": true
|
||||
},
|
||||
{
|
||||
"type": "record_type",
|
||||
"named": true
|
||||
|
|
@ -2253,6 +2273,10 @@
|
|||
"type": "]",
|
||||
"named": false
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"named": false
|
||||
},
|
||||
{
|
||||
"type": "break_expression",
|
||||
"named": true
|
||||
|
|
|
|||
2820
src/parser.c
2820
src/parser.c
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue