[ { "type": "array_expression", "named": true, "fields": { "init": { "multiple": false, "required": true, "types": [ { "type": "array_expression", "named": true }, { "type": "array_value", "named": true }, { "type": "assignment_expression", "named": true }, { "type": "binary_expression", "named": true }, { "type": "break_expression", "named": true }, { "type": "for_expression", "named": true }, { "type": "function_call", "named": true }, { "type": "identifier", "named": true }, { "type": "if_expression", "named": true }, { "type": "integer_literal", "named": true }, { "type": "let_expression", "named": true }, { "type": "nil_literal", "named": true }, { "type": "record_expression", "named": true }, { "type": "record_value", "named": true }, { "type": "sequence_expression", "named": true }, { "type": "string_literal", "named": true }, { "type": "unary_expression", "named": true }, { "type": "while_expression", "named": true } ] }, "size": { "multiple": false, "required": true, "types": [ { "type": "array_expression", "named": true }, { "type": "array_value", "named": true }, { "type": "assignment_expression", "named": true }, { "type": "binary_expression", "named": true }, { "type": "break_expression", "named": true }, { "type": "for_expression", "named": true }, { "type": "function_call", "named": true }, { "type": "identifier", "named": true }, { "type": "if_expression", "named": true }, { "type": "integer_literal", "named": true }, { "type": "let_expression", "named": true }, { "type": "nil_literal", "named": true }, { "type": "record_expression", "named": true }, { "type": "record_value", "named": true }, { "type": "sequence_expression", "named": true }, { "type": "string_literal", "named": true }, { "type": "unary_expression", "named": true }, { "type": "while_expression", "named": true } ] }, "type": { "multiple": false, "required": true, "types": [ { "type": "identifier", "named": true } ] } } }, { "type": "array_value", "named": true, "fields": { "array": { "multiple": false, "required": true, "types": [ { "type": "array_value", "named": true }, { "type": "identifier", "named": true }, { "type": "record_value", "named": true } ] }, "index": { "multiple": false, "required": true, "types": [ { "type": "array_expression", "named": true }, { "type": "array_value", "named": true }, { "type": "assignment_expression", "named": true }, { "type": "binary_expression", "named": true }, { "type": "break_expression", "named": true }, { "type": "for_expression", "named": true }, { "type": "function_call", "named": true }, { "type": "identifier", "named": true }, { "type": "if_expression", "named": true }, { "type": "integer_literal", "named": true }, { "type": "let_expression", "named": true }, { "type": "nil_literal", "named": true }, { "type": "record_expression", "named": true }, { "type": "record_value", "named": true }, { "type": "sequence_expression", "named": true }, { "type": "string_literal", "named": true }, { "type": "unary_expression", "named": true }, { "type": "while_expression", "named": true } ] } } }, { "type": "assignment_expression", "named": true, "fields": { "left": { "multiple": false, "required": true, "types": [ { "type": "array_value", "named": true }, { "type": "identifier", "named": true }, { "type": "record_value", "named": true } ] }, "right": { "multiple": false, "required": true, "types": [ { "type": "array_expression", "named": true }, { "type": "array_value", "named": true }, { "type": "assignment_expression", "named": true }, { "type": "binary_expression", "named": true }, { "type": "break_expression", "named": true }, { "type": "for_expression", "named": true }, { "type": "function_call", "named": true }, { "type": "identifier", "named": true }, { "type": "if_expression", "named": true }, { "type": "integer_literal", "named": true }, { "type": "let_expression", "named": true }, { "type": "nil_literal", "named": true }, { "type": "record_expression", "named": true }, { "type": "record_value", "named": true }, { "type": "sequence_expression", "named": true }, { "type": "string_literal", "named": true }, { "type": "unary_expression", "named": true }, { "type": "while_expression", "named": true } ] } } }, { "type": "binary_expression", "named": true, "fields": { "left": { "multiple": false, "required": true, "types": [ { "type": "array_expression", "named": true }, { "type": "array_value", "named": true }, { "type": "assignment_expression", "named": true }, { "type": "binary_expression", "named": true }, { "type": "break_expression", "named": true }, { "type": "for_expression", "named": true }, { "type": "function_call", "named": true }, { "type": "identifier", "named": true }, { "type": "if_expression", "named": true }, { "type": "integer_literal", "named": true }, { "type": "let_expression", "named": true }, { "type": "nil_literal", "named": true }, { "type": "record_expression", "named": true }, { "type": "record_value", "named": true }, { "type": "sequence_expression", "named": true }, { "type": "string_literal", "named": true }, { "type": "unary_expression", "named": true }, { "type": "while_expression", "named": true } ] }, "operator": { "multiple": false, "required": true, "types": [ { "type": "operator", "named": true } ] }, "right": { "multiple": false, "required": true, "types": [ { "type": "array_expression", "named": true }, { "type": "array_value", "named": true }, { "type": "assignment_expression", "named": true }, { "type": "binary_expression", "named": true }, { "type": "break_expression", "named": true }, { "type": "for_expression", "named": true }, { "type": "function_call", "named": true }, { "type": "identifier", "named": true }, { "type": "if_expression", "named": true }, { "type": "integer_literal", "named": true }, { "type": "let_expression", "named": true }, { "type": "nil_literal", "named": true }, { "type": "record_expression", "named": true }, { "type": "record_value", "named": true }, { "type": "sequence_expression", "named": true }, { "type": "string_literal", "named": true }, { "type": "unary_expression", "named": true }, { "type": "while_expression", "named": true } ] } } }, { "type": "for_expression", "named": true, "fields": { "body": { "multiple": false, "required": true, "types": [ { "type": "array_expression", "named": true }, { "type": "array_value", "named": true }, { "type": "assignment_expression", "named": true }, { "type": "binary_expression", "named": true }, { "type": "break_expression", "named": true }, { "type": "for_expression", "named": true }, { "type": "function_call", "named": true }, { "type": "identifier", "named": true }, { "type": "if_expression", "named": true }, { "type": "integer_literal", "named": true }, { "type": "let_expression", "named": true }, { "type": "nil_literal", "named": true }, { "type": "record_expression", "named": true }, { "type": "record_value", "named": true }, { "type": "sequence_expression", "named": true }, { "type": "string_literal", "named": true }, { "type": "unary_expression", "named": true }, { "type": "while_expression", "named": true } ] }, "end": { "multiple": false, "required": true, "types": [ { "type": "array_expression", "named": true }, { "type": "array_value", "named": true }, { "type": "assignment_expression", "named": true }, { "type": "binary_expression", "named": true }, { "type": "break_expression", "named": true }, { "type": "for_expression", "named": true }, { "type": "function_call", "named": true }, { "type": "identifier", "named": true }, { "type": "if_expression", "named": true }, { "type": "integer_literal", "named": true }, { "type": "let_expression", "named": true }, { "type": "nil_literal", "named": true }, { "type": "record_expression", "named": true }, { "type": "record_value", "named": true }, { "type": "sequence_expression", "named": true }, { "type": "string_literal", "named": true }, { "type": "unary_expression", "named": true }, { "type": "while_expression", "named": true } ] }, "index": { "multiple": false, "required": true, "types": [ { "type": "identifier", "named": true } ] }, "start": { "multiple": false, "required": true, "types": [ { "type": "array_expression", "named": true }, { "type": "array_value", "named": true }, { "type": "assignment_expression", "named": true }, { "type": "binary_expression", "named": true }, { "type": "break_expression", "named": true }, { "type": "for_expression", "named": true }, { "type": "function_call", "named": true }, { "type": "identifier", "named": true }, { "type": "if_expression", "named": true }, { "type": "integer_literal", "named": true }, { "type": "let_expression", "named": true }, { "type": "nil_literal", "named": true }, { "type": "record_expression", "named": true }, { "type": "record_value", "named": true }, { "type": "sequence_expression", "named": true }, { "type": "string_literal", "named": true }, { "type": "unary_expression", "named": true }, { "type": "while_expression", "named": true } ] } } }, { "type": "function_call", "named": true, "fields": { "arguments": { "multiple": true, "required": false, "types": [ { "type": ",", "named": false }, { "type": "array_expression", "named": true }, { "type": "array_value", "named": true }, { "type": "assignment_expression", "named": true }, { "type": "binary_expression", "named": true }, { "type": "break_expression", "named": true }, { "type": "for_expression", "named": true }, { "type": "function_call", "named": true }, { "type": "identifier", "named": true }, { "type": "if_expression", "named": true }, { "type": "integer_literal", "named": true }, { "type": "let_expression", "named": true }, { "type": "nil_literal", "named": true }, { "type": "record_expression", "named": true }, { "type": "record_value", "named": true }, { "type": "sequence_expression", "named": true }, { "type": "string_literal", "named": true }, { "type": "unary_expression", "named": true }, { "type": "while_expression", "named": true } ] }, "function": { "multiple": false, "required": true, "types": [ { "type": "identifier", "named": true } ] } } }, { "type": "function_declaration", "named": true, "fields": { "body": { "multiple": false, "required": true, "types": [ { "type": "array_expression", "named": true }, { "type": "array_value", "named": true }, { "type": "assignment_expression", "named": true }, { "type": "binary_expression", "named": true }, { "type": "break_expression", "named": true }, { "type": "for_expression", "named": true }, { "type": "function_call", "named": true }, { "type": "identifier", "named": true }, { "type": "if_expression", "named": true }, { "type": "integer_literal", "named": true }, { "type": "let_expression", "named": true }, { "type": "nil_literal", "named": true }, { "type": "record_expression", "named": true }, { "type": "record_value", "named": true }, { "type": "sequence_expression", "named": true }, { "type": "string_literal", "named": true }, { "type": "unary_expression", "named": true }, { "type": "while_expression", "named": true } ] }, "name": { "multiple": false, "required": true, "types": [ { "type": "identifier", "named": true } ] }, "parameters": { "multiple": false, "required": true, "types": [ { "type": "parameters", "named": true } ] } } }, { "type": "if_expression", "named": true, "fields": { "alternative": { "multiple": false, "required": false, "types": [ { "type": "array_expression", "named": true }, { "type": "array_value", "named": true }, { "type": "assignment_expression", "named": true }, { "type": "binary_expression", "named": true }, { "type": "break_expression", "named": true }, { "type": "for_expression", "named": true }, { "type": "function_call", "named": true }, { "type": "identifier", "named": true }, { "type": "if_expression", "named": true }, { "type": "integer_literal", "named": true }, { "type": "let_expression", "named": true }, { "type": "nil_literal", "named": true }, { "type": "record_expression", "named": true }, { "type": "record_value", "named": true }, { "type": "sequence_expression", "named": true }, { "type": "string_literal", "named": true }, { "type": "unary_expression", "named": true }, { "type": "while_expression", "named": true } ] }, "condition": { "multiple": false, "required": true, "types": [ { "type": "array_expression", "named": true }, { "type": "array_value", "named": true }, { "type": "assignment_expression", "named": true }, { "type": "binary_expression", "named": true }, { "type": "break_expression", "named": true }, { "type": "for_expression", "named": true }, { "type": "function_call", "named": true }, { "type": "identifier", "named": true }, { "type": "if_expression", "named": true }, { "type": "integer_literal", "named": true }, { "type": "let_expression", "named": true }, { "type": "nil_literal", "named": true }, { "type": "record_expression", "named": true }, { "type": "record_value", "named": true }, { "type": "sequence_expression", "named": true }, { "type": "string_literal", "named": true }, { "type": "unary_expression", "named": true }, { "type": "while_expression", "named": true } ] }, "consequence": { "multiple": false, "required": true, "types": [ { "type": "array_expression", "named": true }, { "type": "array_value", "named": true }, { "type": "assignment_expression", "named": true }, { "type": "binary_expression", "named": true }, { "type": "break_expression", "named": true }, { "type": "for_expression", "named": true }, { "type": "function_call", "named": true }, { "type": "identifier", "named": true }, { "type": "if_expression", "named": true }, { "type": "integer_literal", "named": true }, { "type": "let_expression", "named": true }, { "type": "nil_literal", "named": true }, { "type": "record_expression", "named": true }, { "type": "record_value", "named": true }, { "type": "sequence_expression", "named": true }, { "type": "string_literal", "named": true }, { "type": "unary_expression", "named": true }, { "type": "while_expression", "named": true } ] } } }, { "type": "import_declaration", "named": true, "fields": { "file": { "multiple": false, "required": true, "types": [ { "type": "string_literal", "named": true } ] } } }, { "type": "let_expression", "named": true, "fields": { "body": { "multiple": true, "required": false, "types": [ { "type": ";", "named": false }, { "type": "array_expression", "named": true }, { "type": "array_value", "named": true }, { "type": "assignment_expression", "named": true }, { "type": "binary_expression", "named": true }, { "type": "break_expression", "named": true }, { "type": "for_expression", "named": true }, { "type": "function_call", "named": true }, { "type": "identifier", "named": true }, { "type": "if_expression", "named": true }, { "type": "integer_literal", "named": true }, { "type": "let_expression", "named": true }, { "type": "nil_literal", "named": true }, { "type": "record_expression", "named": true }, { "type": "record_value", "named": true }, { "type": "sequence_expression", "named": true }, { "type": "string_literal", "named": true }, { "type": "unary_expression", "named": true }, { "type": "while_expression", "named": true } ] }, "declarations": { "multiple": true, "required": false, "types": [ { "type": "function_declaration", "named": true }, { "type": "import_declaration", "named": true }, { "type": "primitive_declaration", "named": true }, { "type": "type_declaration", "named": true }, { "type": "variable_declaration", "named": true } ] } } }, { "type": "parameters", "named": true, "fields": { "name": { "multiple": true, "required": false, "types": [ { "type": "identifier", "named": true } ] }, "parameters": { "multiple": true, "required": false, "types": [ { "type": ",", "named": false }, { "type": ":", "named": false }, { "type": "identifier", "named": true } ] }, "type": { "multiple": true, "required": false, "types": [ { "type": "identifier", "named": true } ] } } }, { "type": "primitive_declaration", "named": true, "fields": { "name": { "multiple": false, "required": true, "types": [ { "type": "identifier", "named": true } ] }, "parameters": { "multiple": false, "required": true, "types": [ { "type": "parameters", "named": true } ] } } }, { "type": "record_expression", "named": true, "fields": { "field": { "multiple": true, "required": false, "types": [ { "type": "identifier", "named": true } ] }, "init": { "multiple": true, "required": false, "types": [ { "type": "array_expression", "named": true }, { "type": "array_value", "named": true }, { "type": "assignment_expression", "named": true }, { "type": "binary_expression", "named": true }, { "type": "break_expression", "named": true }, { "type": "for_expression", "named": true }, { "type": "function_call", "named": true }, { "type": "identifier", "named": true }, { "type": "if_expression", "named": true }, { "type": "integer_literal", "named": true }, { "type": "let_expression", "named": true }, { "type": "nil_literal", "named": true }, { "type": "record_expression", "named": true }, { "type": "record_value", "named": true }, { "type": "sequence_expression", "named": true }, { "type": "string_literal", "named": true }, { "type": "unary_expression", "named": true }, { "type": "while_expression", "named": true } ] }, "type": { "multiple": false, "required": true, "types": [ { "type": "identifier", "named": true } ] } } }, { "type": "record_type", "named": true, "fields": { "name": { "multiple": true, "required": false, "types": [ { "type": "identifier", "named": true } ] }, "type": { "multiple": true, "required": false, "types": [ { "type": "identifier", "named": true } ] } } }, { "type": "record_value", "named": true, "fields": { "field": { "multiple": false, "required": true, "types": [ { "type": "identifier", "named": true } ] }, "record": { "multiple": false, "required": true, "types": [ { "type": "array_value", "named": true }, { "type": "identifier", "named": true }, { "type": "record_value", "named": true } ] } } }, { "type": "sequence_expression", "named": true, "fields": {}, "children": { "multiple": true, "required": false, "types": [ { "type": "array_expression", "named": true }, { "type": "array_value", "named": true }, { "type": "assignment_expression", "named": true }, { "type": "binary_expression", "named": true }, { "type": "break_expression", "named": true }, { "type": "for_expression", "named": true }, { "type": "function_call", "named": true }, { "type": "identifier", "named": true }, { "type": "if_expression", "named": true }, { "type": "integer_literal", "named": true }, { "type": "let_expression", "named": true }, { "type": "nil_literal", "named": true }, { "type": "record_expression", "named": true }, { "type": "record_value", "named": true }, { "type": "sequence_expression", "named": true }, { "type": "string_literal", "named": true }, { "type": "unary_expression", "named": true }, { "type": "while_expression", "named": true } ] } }, { "type": "source_file", "named": true, "fields": {}, "children": { "multiple": true, "required": false, "types": [ { "type": "array_expression", "named": true }, { "type": "array_value", "named": true }, { "type": "assignment_expression", "named": true }, { "type": "binary_expression", "named": true }, { "type": "break_expression", "named": true }, { "type": "for_expression", "named": true }, { "type": "function_call", "named": true }, { "type": "function_declaration", "named": true }, { "type": "identifier", "named": true }, { "type": "if_expression", "named": true }, { "type": "import_declaration", "named": true }, { "type": "integer_literal", "named": true }, { "type": "let_expression", "named": true }, { "type": "nil_literal", "named": true }, { "type": "primitive_declaration", "named": true }, { "type": "record_expression", "named": true }, { "type": "record_value", "named": true }, { "type": "sequence_expression", "named": true }, { "type": "string_literal", "named": true }, { "type": "type_declaration", "named": true }, { "type": "unary_expression", "named": true }, { "type": "variable_declaration", "named": true }, { "type": "while_expression", "named": true } ] } }, { "type": "string_literal", "named": true, "fields": {}, "children": { "multiple": true, "required": false, "types": [ { "type": "escape_sequence", "named": true } ] } }, { "type": "type_alias", "named": true, "fields": {}, "children": { "multiple": false, "required": true, "types": [ { "type": "identifier", "named": true } ] } }, { "type": "type_declaration", "named": true, "fields": { "name": { "multiple": false, "required": true, "types": [ { "type": "identifier", "named": true } ] }, "value": { "multiple": false, "required": true, "types": [ { "type": "record_type", "named": true }, { "type": "type_alias", "named": true } ] } } }, { "type": "unary_expression", "named": true, "fields": { "expression": { "multiple": false, "required": true, "types": [ { "type": "array_expression", "named": true }, { "type": "array_value", "named": true }, { "type": "assignment_expression", "named": true }, { "type": "binary_expression", "named": true }, { "type": "break_expression", "named": true }, { "type": "for_expression", "named": true }, { "type": "function_call", "named": true }, { "type": "identifier", "named": true }, { "type": "if_expression", "named": true }, { "type": "integer_literal", "named": true }, { "type": "let_expression", "named": true }, { "type": "nil_literal", "named": true }, { "type": "record_expression", "named": true }, { "type": "record_value", "named": true }, { "type": "sequence_expression", "named": true }, { "type": "string_literal", "named": true }, { "type": "unary_expression", "named": true }, { "type": "while_expression", "named": true } ] }, "operator": { "multiple": false, "required": true, "types": [ { "type": "operator", "named": true } ] } } }, { "type": "variable_declaration", "named": true, "fields": { "name": { "multiple": false, "required": true, "types": [ { "type": "identifier", "named": true } ] }, "type": { "multiple": false, "required": false, "types": [ { "type": "identifier", "named": true } ] }, "value": { "multiple": false, "required": true, "types": [ { "type": "array_expression", "named": true }, { "type": "array_value", "named": true }, { "type": "assignment_expression", "named": true }, { "type": "binary_expression", "named": true }, { "type": "break_expression", "named": true }, { "type": "for_expression", "named": true }, { "type": "function_call", "named": true }, { "type": "identifier", "named": true }, { "type": "if_expression", "named": true }, { "type": "integer_literal", "named": true }, { "type": "let_expression", "named": true }, { "type": "nil_literal", "named": true }, { "type": "record_expression", "named": true }, { "type": "record_value", "named": true }, { "type": "sequence_expression", "named": true }, { "type": "string_literal", "named": true }, { "type": "unary_expression", "named": true }, { "type": "while_expression", "named": true } ] } } }, { "type": "while_expression", "named": true, "fields": { "body": { "multiple": false, "required": true, "types": [ { "type": "array_expression", "named": true }, { "type": "array_value", "named": true }, { "type": "assignment_expression", "named": true }, { "type": "binary_expression", "named": true }, { "type": "break_expression", "named": true }, { "type": "for_expression", "named": true }, { "type": "function_call", "named": true }, { "type": "identifier", "named": true }, { "type": "if_expression", "named": true }, { "type": "integer_literal", "named": true }, { "type": "let_expression", "named": true }, { "type": "nil_literal", "named": true }, { "type": "record_expression", "named": true }, { "type": "record_value", "named": true }, { "type": "sequence_expression", "named": true }, { "type": "string_literal", "named": true }, { "type": "unary_expression", "named": true }, { "type": "while_expression", "named": true } ] }, "condition": { "multiple": false, "required": true, "types": [ { "type": "array_expression", "named": true }, { "type": "array_value", "named": true }, { "type": "assignment_expression", "named": true }, { "type": "binary_expression", "named": true }, { "type": "break_expression", "named": true }, { "type": "for_expression", "named": true }, { "type": "function_call", "named": true }, { "type": "identifier", "named": true }, { "type": "if_expression", "named": true }, { "type": "integer_literal", "named": true }, { "type": "let_expression", "named": true }, { "type": "nil_literal", "named": true }, { "type": "record_expression", "named": true }, { "type": "record_value", "named": true }, { "type": "sequence_expression", "named": true }, { "type": "string_literal", "named": true }, { "type": "unary_expression", "named": true }, { "type": "while_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": "break_expression", "named": true }, { "type": "do", "named": false }, { "type": "else", "named": false }, { "type": "end", "named": false }, { "type": "escape_sequence", "named": true }, { "type": "for", "named": false }, { "type": "function", "named": false }, { "type": "identifier", "named": true }, { "type": "if", "named": false }, { "type": "import", "named": false }, { "type": "in", "named": false }, { "type": "integer_literal", "named": true }, { "type": "let", "named": false }, { "type": "nil_literal", "named": true }, { "type": "of", "named": false }, { "type": "operator", "named": true }, { "type": "primitive", "named": false }, { "type": "then", "named": false }, { "type": "to", "named": false }, { "type": "type", "named": false }, { "type": "var", "named": false }, { "type": "while", "named": false }, { "type": "{", "named": false }, { "type": "}", "named": false } ]