1101 lines
17 KiB
JSON
1101 lines
17 KiB
JSON
[
|
|
{
|
|
"type": "as",
|
|
"named": true,
|
|
"fields": {},
|
|
"children": {
|
|
"multiple": true,
|
|
"required": true,
|
|
"types": [
|
|
{
|
|
"type": "expression",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "type",
|
|
"named": true
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "assignment",
|
|
"named": true,
|
|
"fields": {},
|
|
"children": {
|
|
"multiple": true,
|
|
"required": true,
|
|
"types": [
|
|
{
|
|
"type": "assignment_operator",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "identifier",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "statement",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "type_specification",
|
|
"named": true
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "assignment_operator",
|
|
"named": true,
|
|
"fields": {}
|
|
},
|
|
{
|
|
"type": "block",
|
|
"named": true,
|
|
"fields": {},
|
|
"children": {
|
|
"multiple": true,
|
|
"required": false,
|
|
"types": [
|
|
{
|
|
"type": "statement",
|
|
"named": true
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "boolean",
|
|
"named": true,
|
|
"fields": {}
|
|
},
|
|
{
|
|
"type": "command",
|
|
"named": true,
|
|
"fields": {},
|
|
"children": {
|
|
"multiple": true,
|
|
"required": true,
|
|
"types": [
|
|
{
|
|
"type": "command_argument",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "command_text",
|
|
"named": true
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "command_argument",
|
|
"named": true,
|
|
"fields": {}
|
|
},
|
|
{
|
|
"type": "else",
|
|
"named": true,
|
|
"fields": {},
|
|
"children": {
|
|
"multiple": false,
|
|
"required": true,
|
|
"types": [
|
|
{
|
|
"type": "block",
|
|
"named": true
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "else_if",
|
|
"named": true,
|
|
"fields": {},
|
|
"children": {
|
|
"multiple": true,
|
|
"required": true,
|
|
"types": [
|
|
{
|
|
"type": "block",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "expression",
|
|
"named": true
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "enum_definition",
|
|
"named": true,
|
|
"fields": {},
|
|
"children": {
|
|
"multiple": true,
|
|
"required": true,
|
|
"types": [
|
|
{
|
|
"type": "identifier",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "type",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "type_definition",
|
|
"named": true
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "enum_instance",
|
|
"named": true,
|
|
"fields": {},
|
|
"children": {
|
|
"multiple": true,
|
|
"required": true,
|
|
"types": [
|
|
{
|
|
"type": "expression",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "identifier",
|
|
"named": true
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "enum_pattern",
|
|
"named": true,
|
|
"fields": {},
|
|
"children": {
|
|
"multiple": true,
|
|
"required": true,
|
|
"types": [
|
|
{
|
|
"type": "identifier",
|
|
"named": true
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "expression",
|
|
"named": true,
|
|
"fields": {},
|
|
"children": {
|
|
"multiple": false,
|
|
"required": true,
|
|
"types": [
|
|
{
|
|
"type": "as",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "command",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "function_call",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "identifier",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "index",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "logic",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "math",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "value",
|
|
"named": true
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "float",
|
|
"named": true,
|
|
"fields": {}
|
|
},
|
|
{
|
|
"type": "for",
|
|
"named": true,
|
|
"fields": {},
|
|
"children": {
|
|
"multiple": true,
|
|
"required": true,
|
|
"types": [
|
|
{
|
|
"type": "block",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "expression",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "identifier",
|
|
"named": true
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "function",
|
|
"named": true,
|
|
"fields": {},
|
|
"children": {
|
|
"multiple": true,
|
|
"required": true,
|
|
"types": [
|
|
{
|
|
"type": "block",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "identifier",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "type_specification",
|
|
"named": true
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "function_call",
|
|
"named": true,
|
|
"fields": {},
|
|
"children": {
|
|
"multiple": true,
|
|
"required": true,
|
|
"types": [
|
|
{
|
|
"type": "expression",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "function_expression",
|
|
"named": true
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "function_expression",
|
|
"named": true,
|
|
"fields": {},
|
|
"children": {
|
|
"multiple": false,
|
|
"required": true,
|
|
"types": [
|
|
{
|
|
"type": "function_call",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "identifier",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "index",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "value",
|
|
"named": true
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "if",
|
|
"named": true,
|
|
"fields": {},
|
|
"children": {
|
|
"multiple": true,
|
|
"required": true,
|
|
"types": [
|
|
{
|
|
"type": "block",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "expression",
|
|
"named": true
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "if_else",
|
|
"named": true,
|
|
"fields": {},
|
|
"children": {
|
|
"multiple": true,
|
|
"required": true,
|
|
"types": [
|
|
{
|
|
"type": "else",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "else_if",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "if",
|
|
"named": true
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "index",
|
|
"named": true,
|
|
"fields": {},
|
|
"children": {
|
|
"multiple": true,
|
|
"required": true,
|
|
"types": [
|
|
{
|
|
"type": "index_expression",
|
|
"named": true
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "index_assignment",
|
|
"named": true,
|
|
"fields": {},
|
|
"children": {
|
|
"multiple": true,
|
|
"required": true,
|
|
"types": [
|
|
{
|
|
"type": "assignment_operator",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "index",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "statement",
|
|
"named": true
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "index_expression",
|
|
"named": true,
|
|
"fields": {},
|
|
"children": {
|
|
"multiple": false,
|
|
"required": true,
|
|
"types": [
|
|
{
|
|
"type": "function_call",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "identifier",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "index",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "range",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "value",
|
|
"named": true
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "list",
|
|
"named": true,
|
|
"fields": {},
|
|
"children": {
|
|
"multiple": true,
|
|
"required": false,
|
|
"types": [
|
|
{
|
|
"type": "expression",
|
|
"named": true
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "logic",
|
|
"named": true,
|
|
"fields": {},
|
|
"children": {
|
|
"multiple": true,
|
|
"required": true,
|
|
"types": [
|
|
{
|
|
"type": "expression",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "logic_operator",
|
|
"named": true
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "logic_operator",
|
|
"named": true,
|
|
"fields": {}
|
|
},
|
|
{
|
|
"type": "map",
|
|
"named": true,
|
|
"fields": {},
|
|
"children": {
|
|
"multiple": true,
|
|
"required": false,
|
|
"types": [
|
|
{
|
|
"type": "identifier",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "statement",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "type_specification",
|
|
"named": true
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "match",
|
|
"named": true,
|
|
"fields": {},
|
|
"children": {
|
|
"multiple": true,
|
|
"required": true,
|
|
"types": [
|
|
{
|
|
"type": "expression",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "match_pattern",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "statement",
|
|
"named": true
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "match_pattern",
|
|
"named": true,
|
|
"fields": {},
|
|
"children": {
|
|
"multiple": false,
|
|
"required": false,
|
|
"types": [
|
|
{
|
|
"type": "enum_pattern",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "value",
|
|
"named": true
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "math",
|
|
"named": true,
|
|
"fields": {},
|
|
"children": {
|
|
"multiple": true,
|
|
"required": true,
|
|
"types": [
|
|
{
|
|
"type": "expression",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "math_operator",
|
|
"named": true
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "math_operator",
|
|
"named": true,
|
|
"fields": {}
|
|
},
|
|
{
|
|
"type": "pipe",
|
|
"named": true,
|
|
"fields": {},
|
|
"children": {
|
|
"multiple": true,
|
|
"required": true,
|
|
"types": [
|
|
{
|
|
"type": "command",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "function_call",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "pipe",
|
|
"named": true
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "root",
|
|
"named": true,
|
|
"fields": {},
|
|
"children": {
|
|
"multiple": true,
|
|
"required": true,
|
|
"types": [
|
|
{
|
|
"type": "statement",
|
|
"named": true
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "statement",
|
|
"named": true,
|
|
"fields": {},
|
|
"children": {
|
|
"multiple": false,
|
|
"required": true,
|
|
"types": [
|
|
{
|
|
"type": "statement_kind",
|
|
"named": true
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "statement_kind",
|
|
"named": true,
|
|
"fields": {},
|
|
"children": {
|
|
"multiple": false,
|
|
"required": true,
|
|
"types": [
|
|
{
|
|
"type": "assignment",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "block",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "expression",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "for",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "if_else",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "index_assignment",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "match",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "pipe",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "type_definition",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "while",
|
|
"named": true
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "string",
|
|
"named": true,
|
|
"fields": {}
|
|
},
|
|
{
|
|
"type": "struct_definition",
|
|
"named": true,
|
|
"fields": {},
|
|
"children": {
|
|
"multiple": true,
|
|
"required": true,
|
|
"types": [
|
|
{
|
|
"type": "identifier",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "statement",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "type_specification",
|
|
"named": true
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "struct_instance",
|
|
"named": true,
|
|
"fields": {},
|
|
"children": {
|
|
"multiple": true,
|
|
"required": true,
|
|
"types": [
|
|
{
|
|
"type": "identifier",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "map",
|
|
"named": true
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "type",
|
|
"named": true,
|
|
"fields": {},
|
|
"children": {
|
|
"multiple": true,
|
|
"required": false,
|
|
"types": [
|
|
{
|
|
"type": "identifier",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "type",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "type_specification",
|
|
"named": true
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "type_definition",
|
|
"named": true,
|
|
"fields": {},
|
|
"children": {
|
|
"multiple": false,
|
|
"required": true,
|
|
"types": [
|
|
{
|
|
"type": "enum_definition",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "struct_definition",
|
|
"named": true
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "type_specification",
|
|
"named": true,
|
|
"fields": {},
|
|
"children": {
|
|
"multiple": false,
|
|
"required": true,
|
|
"types": [
|
|
{
|
|
"type": "type",
|
|
"named": true
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "value",
|
|
"named": true,
|
|
"fields": {},
|
|
"children": {
|
|
"multiple": false,
|
|
"required": true,
|
|
"types": [
|
|
{
|
|
"type": "boolean",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "enum_instance",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "float",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "function",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "list",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "map",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "range",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "struct_instance",
|
|
"named": true
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "while",
|
|
"named": true,
|
|
"fields": {},
|
|
"children": {
|
|
"multiple": true,
|
|
"required": true,
|
|
"types": [
|
|
{
|
|
"type": "block",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "expression",
|
|
"named": true
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "!=",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": "%",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": "&&",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": "(",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": ")",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": "*",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": "+",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": "+=",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": ",",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": "-",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": "-=",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": "->",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": "/",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": ":",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": "::",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": ";",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": "<",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": "<=",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": "=",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": "==",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": "=>",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": ">",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": ">=",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": "Infinity",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": "NaN",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": "[",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": "]",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": "^",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": "any",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": "as",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": "async",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": "async for",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": "bool",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": "break",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": "collection",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": "command_text",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "else",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": "else if",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": "enum",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": "false",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": "float",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": "for",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": "identifier",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "if",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": "in",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": "infinity",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": "int",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "map",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": "match",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": "nan",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": "new",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": "none",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": "num",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": "range",
|
|
"named": true
|
|
},
|
|
{
|
|
"type": "return",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": "str",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": "struct",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": "true",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": "while",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": "{",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": "|",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": "||",
|
|
"named": false
|
|
},
|
|
{
|
|
"type": "}",
|
|
"named": false
|
|
}
|
|
] |