tree-sitter-quik
Version:
Quik grammar for tree-sitter
2,289 lines (2,288 loc) • 108 kB
JSON
{
"name": "quik",
"word": "_identifier_without_operators",
"rules": {
"program": {
"type": "SEQ",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "hash_bang_line"
},
{
"type": "BLANK"
}
]
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_statement_seq"
},
{
"type": "BLANK"
}
]
}
]
},
"_statement": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_simple_statement"
},
{
"type": "SYMBOL",
"name": "_compound_statement"
}
]
},
"_statement_seq": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_statement"
},
{
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "_simple_statement"
},
{
"type": "SYMBOL",
"name": "_newline"
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_statement_seq"
},
{
"type": "BLANK"
}
]
}
]
},
{
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "_compound_statement"
},
{
"type": "SYMBOL",
"name": "_statement_seq"
}
]
}
]
},
"_simple_statement": {
"type": "CHOICE",
"members": [
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "default_import"
},
"named": true,
"value": "import"
},
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "named_import"
},
"named": true,
"value": "import"
},
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "external_import"
},
"named": true,
"value": "import"
},
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "single_named_export"
},
"named": true,
"value": "export"
},
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "named_export"
},
"named": true,
"value": "export"
},
{
"type": "SYMBOL",
"name": "_simple_expression"
}
]
},
"_compound_statement": {
"type": "CHOICE",
"members": [
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "compound_export"
},
"named": true,
"value": "export"
},
{
"type": "SYMBOL",
"name": "_compound_expression"
}
]
},
"type_pair_or_type_list": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "_type_pair_or_type"
},
{
"type": "REPEAT",
"content": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": ","
},
{
"type": "SYMBOL",
"name": "_type_pair_or_type"
}
]
}
}
]
},
"type_hint_list": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "type_hint"
},
{
"type": "REPEAT",
"content": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": ","
},
{
"type": "SYMBOL",
"name": "type_hint"
}
]
}
}
]
},
"default_import": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "import"
},
{
"type": "FIELD",
"name": "type",
"content": {
"type": "SYMBOL",
"name": "type"
}
},
{
"type": "CHOICE",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "from"
},
{
"type": "FIELD",
"name": "source",
"content": {
"type": "SYMBOL",
"name": "string"
}
}
]
},
{
"type": "BLANK"
}
]
}
]
},
"named_import": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "import"
},
{
"type": "STRING",
"value": "{"
},
{
"type": "FIELD",
"name": "types",
"content": {
"type": "SYMBOL",
"name": "type_pair_or_type_list"
}
},
{
"type": "STRING",
"value": "}"
},
{
"type": "STRING",
"value": "from"
},
{
"type": "FIELD",
"name": "source",
"content": {
"type": "SYMBOL",
"name": "string"
}
}
]
},
"external_import": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "import"
},
{
"type": "STRING",
"value": "extern"
},
{
"type": "STRING",
"value": "{"
},
{
"type": "FIELD",
"name": "type_hints",
"content": {
"type": "SYMBOL",
"name": "type_hint_list"
}
},
{
"type": "STRING",
"value": "}"
},
{
"type": "STRING",
"value": "from"
},
{
"type": "FIELD",
"name": "source",
"content": {
"type": "SYMBOL",
"name": "string"
}
}
]
},
"single_named_export": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "export"
},
{
"type": "CHOICE",
"members": [
{
"type": "FIELD",
"name": "default",
"content": {
"type": "STRING",
"value": "default"
}
},
{
"type": "BLANK"
}
]
},
{
"type": "FIELD",
"name": "type",
"content": {
"type": "SYMBOL",
"name": "type"
}
},
{
"type": "CHOICE",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "from"
},
{
"type": "FIELD",
"name": "source",
"content": {
"type": "SYMBOL",
"name": "string"
}
}
]
},
{
"type": "BLANK"
}
]
}
]
},
"named_export": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "export"
},
{
"type": "STRING",
"value": "{"
},
{
"type": "FIELD",
"name": "types",
"content": {
"type": "SYMBOL",
"name": "type_pair_or_type_list"
}
},
{
"type": "STRING",
"value": "}"
},
{
"type": "CHOICE",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "from"
},
{
"type": "FIELD",
"name": "source",
"content": {
"type": "SYMBOL",
"name": "string"
}
}
]
},
{
"type": "BLANK"
}
]
}
]
},
"compound_export": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "export"
},
{
"type": "CHOICE",
"members": [
{
"type": "FIELD",
"name": "default",
"content": {
"type": "STRING",
"value": "default"
}
},
{
"type": "BLANK"
}
]
},
{
"type": "FIELD",
"name": "declaration",
"content": {
"type": "SYMBOL",
"name": "_compound_declaration"
}
}
]
},
"block": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "_indent"
},
{
"type": "SYMBOL",
"name": "_expression_seq"
},
{
"type": "SYMBOL",
"name": "_dedent"
}
]
},
"refinement_block": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "_indent"
},
{
"type": "REPEAT1",
"content": {
"type": "SYMBOL",
"name": "refinement_clause"
}
},
{
"type": "CHOICE",
"members": [
{
"type": "FIELD",
"name": "default",
"content": {
"type": "SYMBOL",
"name": "refinement_else_clause"
}
},
{
"type": "BLANK"
}
]
},
{
"type": "SYMBOL",
"name": "_dedent"
}
]
},
"_refinement_condition": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "|"
},
{
"type": "SYMBOL",
"name": "_simple_expression"
}
]
},
"refinement_clause": {
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "condition",
"content": {
"type": "SYMBOL",
"name": "_refinement_condition"
}
},
{
"type": "STRING",
"value": "=>"
},
{
"type": "FIELD",
"name": "body",
"content": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_simple_expression"
},
{
"type": "SYMBOL",
"name": "block"
}
]
}
}
]
},
"refinement_else_clause": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "|"
},
{
"type": "STRING",
"value": "else"
},
{
"type": "STRING",
"value": "=>"
},
{
"type": "FIELD",
"name": "body",
"content": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_simple_expression"
},
{
"type": "SYMBOL",
"name": "block"
}
]
}
}
]
},
"type_pair": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "type"
},
{
"type": "STRING",
"value": "=>"
},
{
"type": "SYMBOL",
"name": "type"
}
]
},
"_type_pair_or_type": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "type_pair"
},
{
"type": "SYMBOL",
"name": "type"
}
]
},
"type_arguments": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "generic_type"
},
{
"type": "REPEAT",
"content": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": ","
},
{
"type": "SYMBOL",
"name": "generic_type"
}
]
}
}
]
},
"type_parameters": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "polymorphic_type"
},
{
"type": "REPEAT",
"content": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": ","
},
{
"type": "SYMBOL",
"name": "polymorphic_type"
}
]
}
}
]
},
"intersection_type": {
"type": "PREC_RIGHT",
"value": 14,
"content": {
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "left",
"content": {
"type": "SYMBOL",
"name": "generic_type"
}
},
{
"type": "STRING",
"value": "&"
},
{
"type": "FIELD",
"name": "right",
"content": {
"type": "SYMBOL",
"name": "generic_type"
}
}
]
}
},
"union_type": {
"type": "PREC_RIGHT",
"value": 14,
"content": {
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "left",
"content": {
"type": "SYMBOL",
"name": "generic_type"
}
},
{
"type": "STRING",
"value": "|"
},
{
"type": "FIELD",
"name": "right",
"content": {
"type": "SYMBOL",
"name": "generic_type"
}
}
]
}
},
"map_type": {
"type": "PREC",
"value": 14,
"content": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "{"
},
{
"type": "FIELD",
"name": "key",
"content": {
"type": "SYMBOL",
"name": "generic_type"
}
},
{
"type": "STRING",
"value": "=>"
},
{
"type": "FIELD",
"name": "value",
"content": {
"type": "SYMBOL",
"name": "generic_type"
}
},
{
"type": "STRING",
"value": "}"
}
]
}
},
"tuple_type": {
"type": "PREC",
"value": 14,
"content": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "("
},
{
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "generic_type"
},
{
"type": "REPEAT1",
"content": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": ","
},
{
"type": "SYMBOL",
"name": "generic_type"
}
]
}
}
]
},
{
"type": "STRING",
"value": ")"
}
]
}
},
"list_type": {
"type": "PREC",
"value": 14,
"content": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "["
},
{
"type": "SYMBOL",
"name": "generic_type"
},
{
"type": "STRING",
"value": "]"
}
]
}
},
"refinement_type": {
"type": "PREC",
"value": 14,
"content": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "["
},
{
"type": "FIELD",
"name": "variable",
"content": {
"type": "SYMBOL",
"name": "identifier"
}
},
{
"type": "STRING",
"value": "in"
},
{
"type": "FIELD",
"name": "type",
"content": {
"type": "SYMBOL",
"name": "generic_type"
}
},
{
"type": "STRING",
"value": "|"
},
{
"type": "FIELD",
"name": "condition",
"content": {
"type": "SYMBOL",
"name": "_simple_expression"
}
},
{
"type": "STRING",
"value": "]"
}
]
}
},
"type_constructor": {
"type": "PREC_RIGHT",
"value": 14,
"content": {
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "base",
"content": {
"type": "SYMBOL",
"name": "type"
}
},
{
"type": "CHOICE",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "<"
},
{
"type": "FIELD",
"name": "arguments",
"content": {
"type": "SYMBOL",
"name": "type_arguments"
}
},
{
"type": "STRING",
"value": ">"
}
]
},
{
"type": "BLANK"
}
]
}
]
}
},
"_grouped_type": {
"type": "PREC",
"value": 14,
"content": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "("
},
{
"type": "SYMBOL",
"name": "generic_type"
},
{
"type": "STRING",
"value": ")"
}
]
}
},
"_atomic_type": {
"type": "PREC",
"value": 14,
"content": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "intersection_type"
},
{
"type": "SYMBOL",
"name": "union_type"
},
{
"type": "SYMBOL",
"name": "map_type"
},
{
"type": "SYMBOL",
"name": "tuple_type"
},
{
"type": "SYMBOL",
"name": "list_type"
},
{
"type": "SYMBOL",
"name": "refinement_type"
},
{
"type": "SYMBOL",
"name": "type_constructor"
},
{
"type": "SYMBOL",
"name": "_grouped_type"
}
]
}
},
"_curried_type": {
"type": "PREC_LEFT",
"value": 0,
"content": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_atomic_type"
},
{
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "_atomic_type"
},
{
"type": "STRING",
"value": "->"
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_curried_type"
},
{
"type": "BLANK"
}
]
}
]
}
]
}
},
"generic_type": {
"type": "PREC",
"value": 14,
"content": {
"type": "SYMBOL",
"name": "_curried_type"
}
},
"polymorphic_intersection_type": {
"type": "PREC_RIGHT",
"value": 14,
"content": {
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "left",
"content": {
"type": "SYMBOL",
"name": "polymorphic_type"
}
},
{
"type": "STRING",
"value": "&"
},
{
"type": "FIELD",
"name": "right",
"content": {
"type": "SYMBOL",
"name": "polymorphic_type"
}
}
]
}
},
"polymorphic_union_type": {
"type": "PREC_RIGHT",
"value": 14,
"content": {
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "left",
"content": {
"type": "SYMBOL",
"name": "polymorphic_type"
}
},
{
"type": "STRING",
"value": "|"
},
{
"type": "FIELD",
"name": "right",
"content": {
"type": "SYMBOL",
"name": "polymorphic_type"
}
}
]
}
},
"polymorphic_map_type": {
"type": "PREC",
"value": 14,
"content": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "{"
},
{
"type": "FIELD",
"name": "key",
"content": {
"type": "SYMBOL",
"name": "polymorphic_type"
}
},
{
"type": "STRING",
"value": "=>"
},
{
"type": "FIELD",
"name": "value",
"content": {
"type": "SYMBOL",
"name": "polymorphic_type"
}
},
{
"type": "STRING",
"value": "}"
}
]
}
},
"polymorphic_tuple_type": {
"type": "PREC",
"value": 14,
"content": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "("
},
{
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "polymorphic_type"
},
{
"type": "REPEAT1",
"content": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": ","
},
{
"type": "SYMBOL",
"name": "polymorphic_type"
}
]
}
}
]
},
{
"type": "STRING",
"value": ")"
}
]
}
},
"polymorphic_list_type": {
"type": "PREC",
"value": 14,
"content": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "["
},
{
"type": "SYMBOL",
"name": "polymorphic_type"
},
{
"type": "STRING",
"value": "]"
}
]
}
},
"polymorphic_refinement_type": {
"type": "PREC",
"value": 14,
"content": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "["
},
{
"type": "FIELD",
"name": "variable",
"content": {
"type": "SYMBOL",
"name": "identifier"
}
},
{
"type": "STRING",
"value": "in"
},
{
"type": "FIELD",
"name": "type",
"content": {
"type": "SYMBOL",
"name": "polymorphic_type"
}
},
{
"type": "STRING",
"value": "|"
},
{
"type": "FIELD",
"name": "condition",
"content": {
"type": "SYMBOL",
"name": "_simple_expression"
}
},
{
"type": "STRING",
"value": "]"
}
]
}
},
"polymorphic_type_constructor": {
"type": "PREC_RIGHT",
"value": 14,
"content": {
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "base",
"content": {
"type": "SYMBOL",
"name": "type"
}
},
{
"type": "CHOICE",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "<"
},
{
"type": "FIELD",
"name": "parameters",
"content": {
"type": "SYMBOL",
"name": "type_parameters"
}
},
{
"type": "STRING",
"value": ">"
}
]
},
{
"type": "BLANK"
}
]
}
]
}
},
"_grouped_polymorphic_type": {
"type": "PREC",
"value": 14,
"content": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "("
},
{
"type": "SYMBOL",
"name": "polymorphic_type"
},
{
"type": "STRING",
"value": ")"
}
]
}
},
"polymorphic_type_condition": {
"type": "PREC",
"value": 14,
"content": {
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "interface",
"content": {
"type": "SYMBOL",
"name": "generic_type"
}
},
{
"type": "FIELD",
"name": "variable",
"content": {
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "identifier"
},
"named": true,
"value": "type_variable"
}
}
]
}
},
"polymorphic_type_conditions": {
"type": "PREC",
"value": 14,
"content": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "polymorphic_type_condition"
},
{
"type": "REPEAT",
"content": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": ","
},
{
"type": "SYMBOL",
"name": "polymorphic_type_condition"
}
]
}
}
]
}
},
"_atomic_polymorphic_type": {
"type": "PREC",
"value": 14,
"content": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "polymorphic_intersection_type"
},
{
"type": "SYMBOL",
"name": "polymorphic_union_type"
},
{
"type": "SYMBOL",
"name": "polymorphic_map_type"
},
{
"type": "SYMBOL",
"name": "polymorphic_tuple_type"
},
{
"type": "SYMBOL",
"name": "polymorphic_list_type"
},
{
"type": "SYMBOL",
"name": "polymorphic_refinement_type"
},
{
"type": "SYMBOL",
"name": "polymorphic_type_constructor"
},
{
"type": "SYMBOL",
"name": "_grouped_polymorphic_type"
},
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "identifier"
},
"named": true,
"value": "type_variable"
}
]
}
},
"_polymorphic_curried_type": {
"type": "PREC_LEFT",
"value": 0,
"content": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_atomic_polymorphic_type"
},
{
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "_atomic_polymorphic_type"
},
{
"type": "STRING",
"value": "->"
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_polymorphic_curried_type"
},
{
"type": "BLANK"
}
]
}
]
}
]
}
},
"polymorphic_type": {
"type": "PREC",
"value": 14,
"content": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_polymorphic_curried_type"
},
{
"type": "SEQ",
"members": [
{
"type": "FIELD",
"name": "conditions",
"content": {
"type": "SYMBOL",
"name": "polymorphic_type_conditions"
}
},
{
"type": "STRING",
"value": "=>"
},
{
"type": "SYMBOL",
"name": "_polymorphic_curried_type"
}
]
}
]
}
},
"parameter": {
"type": "PREC",
"value": 13,
"content": {
"type": "CHOICE",
"members": [
{
"type": "FIELD",
"name": "value",
"content": {
"type": "SYMBOL",
"name": "_literal"
}
},
{
"type": "SEQ",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "FIELD",
"name": "name",
"content": {
"type": "SYMBOL",
"name": "identifier"
}
},
{
"type": "FIELD",
"name": "pattern",
"content": {
"type": "SYMBOL",
"name": "_destructuring_pattern"
}
}
]
},
{
"type": "CHOICE",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": ":"
},
{
"type": "FIELD",
"name": "type",
"content": {
"type": "SYMBOL",
"name": "polymorphic_type"
}
}
]
},
{
"type": "BLANK"
}
]
},
{
"type": "CHOICE",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "="
},
{
"type": "FIELD",
"name": "default",
"content": {
"type": "SYMBOL",
"name": "_simple_expression"
}
}
]
},
{
"type": "BLANK"
}
]
}
]
}
]
}
},
"rest_parameter": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "..."
},
{
"type": "FIELD",
"name": "name",
"content": {
"type": "SYMBOL",
"name": "identifier"
}
},
{
"type": "CHOICE",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": ":"
},
{
"type": "FIELD",
"name": "type",
"content": {
"type": "SYMBOL",
"name": "polymorphic_type"
}
}
]
},
{
"type": "BLANK"
}
]
},
{
"type": "CHOICE",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "="
},
{
"type": "FIELD",
"name": "default",
"content": {
"type": "SYMBOL",
"name": "_simple_expression"
}
}
]
},
{
"type": "BLANK"
}
]
}
]
},
"parameters": {
"type": "CHOICE",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "parameter"
},
{
"type": "REPEAT",
"content": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": ","
},
{
"type": "SYMBOL",
"name": "parameter"
}
]
}
}
]
},
{
"type": "CHOICE",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": ","
},
{
"type": "FIELD",
"name": "rest",
"content": {
"type": "SYMBOL",
"name": "rest_parameter"
}
}
]
},
{
"type": "BLANK"
}
]
}
]
},
{
"type": "FIELD",
"name": "rest",
"content": {
"type": "SYMBOL",
"name": "rest_parameter"
}
}
]
},
"argument": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_expression"
},
{
"type": "STRING",
"value": "?"
}
]
},
"arguments": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "argument"
},
{
"type": "REPEAT",
"content": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": ","
},
{
"type": "SYMBOL",
"name": "argument"
}
]
}
}
]
},
"_destructuring_pattern": {
"type": "PREC",
"value": 17,
"content": {
"type": "CHOICE",
"members": [
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "map"
},
"named": true,
"value": "map_pattern"
},
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "list"
},
"named": true,
"value": "list_pattern"
}
]
}
},
"_expression": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_simple_expression"
},
{
"type": "SYMBOL",
"name": "_compound_expression"
}
]
},
"_expression_seq": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_expression"
},
{
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "_simple_expression"
},
{
"type": "SYMBOL",
"name": "_newline"
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_expression_seq"
},
{
"type": "BLANK"
}
]
}
]
},
{
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "_compound_expression"
},
{
"type": "SYMBOL",
"name": "_expression_seq"
}
]
}
]
},
"expression_pair": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "_expression"
},
{
"type": "STRING",
"value": "=>"
},
{
"type": "SYMBOL",
"name": "_expression"
}
]
},
"_compound_expression": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_compound_declaration"
},
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "compound_function"
},
"named": true,
"value": "function"
},
{
"type": "SYMBOL",
"name": "if"
},
{
"type": "SYMBOL",
"name": "case"
},
{
"type": "SYMBOL",
"name": "atomic"
},
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "compound_return"
},
"named": true,
"value": "return"
},
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "compound_hold"
},
"named": true,
"value": "hold"
},
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "compound_do"
},
"named": true,
"value": "do"
},
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "compound_include"
},
"named": true,
"value": "include"
},
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "compound_assignment"
},
"named": true,
"value": "assignment"
}
]
},
"_compound_declaration": {
"type": "CHOICE",
"members": [
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "compound_struct"
},
"named": true,
"value": "struct"
},
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "compound_module"
},
"named": true,
"value": "module"
},
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "compound_interface"
},
"named": true,
"value": "interface"
}
]
},
"compound_struct": {
"type": "SEQ",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "FIELD",
"name": "mutable",
"content": {
"type": "STRING",
"value": "mutable"
}
},
{
"type": "BLANK"
}
]
},
{
"type": "STRING",
"value": "struct"
},
{
"type": "FIELD",
"name": "name",
"content": {
"type": "SYMBOL",
"name": "polymorphic_type"
}
},
{
"type": "FIELD",
"name": "body",
"content": {
"type": "SYMBOL",
"name": "block"
}
}
]
},
"compound_module": {
"type": "SEQ",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "FIELD",
"name": "mutable",
"content": {
"type": "STRING",
"value": "mutable"
}
},
{
"type": "BLANK"
}
]
},
{
"type": "STRING",
"value": "module"
},
{
"type": "FIELD",
"name": "name",
"content": {
"type": "SYMBOL",
"name": "polymorphic_type"
}
},
{
"type": "FIELD",
"name": "body",
"content": {
"type": "SYMBOL",
"name": "block"
}
}
]
},
"interface_block": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "_indent"
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "pass"
},
{
"type": "REPEAT1",
"content": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "type_hint"
},
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "compound_include"
},
"named": true,
"value": "include"
},
{
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "simple_include"
},
"named": true,
"value": "include"
}
]
}
}
]
},
{
"type": "SYMBOL",
"name": "_dedent"
}
]
},
"compound_interface": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "interface"
},
{
"type": "FIELD",
"name": "name",
"content": {
"type": "SYMBOL",
"name": "polymorphic_type"
}
},
{
"type": "FIELD",
"name": "body",
"content": {
"type": "SYMBOL",
"name": "interface_block"
}
}
]
},
"compound_function": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "("
},
{
"type": "CHOICE",
"members": [
{
"type": "FIELD",
"name": "parameters",
"content": {
"type": "SYMBOL",
"name": "parameters"
}
},
{
"type": "BLANK"
}
]
},
{
"type": "STRING",
"value": ")"
},
{
"type": "CHOICE",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "=>"
},
{
"type": "FIELD",
"name": "body",
"content": {
"type": "SYMBOL",
"name": "block"
}
}
]
},
{
"type": "FIELD",
"name": "clauses",
"content": {
"type": "SYMBOL",
"name": "refinement_block"
}
}
]
}
]
},
"else_clause": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "else"
},
{
"type": "FIELD",
"name": "body",
"content": {
"type": "SYMBOL",
"name": "block"
}
}
]
},
"else_if_clause": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "else if"
},
{
"type": "FIELD",
"name": "condition",
"content": {
"type": "SYMBOL",
"name": "_simple_expression"
}
},
{
"type": "FIELD",
"name": "body",
"content": {
"type": "SYMBOL",
"name": "block"
}
}
]
},
"else_if_clauses": {
"type": "REPEAT1",
"content": {
"type": "SYMBOL",
"name": "else_if_clause"
}
},
"if": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "if"
},
{
"type": "FIELD",
"name": "condition",
"content": {
"type": "SYMBOL",
"name": "_simple_expression"
}
},
{
"type": "FIELD",
"name": "body",
"content": {
"type": "SYMBOL",
"name": "block"
}
},
{
"type": "CHOICE",
"members": [
{
"type": "FIELD",
"name": "else_if_clauses",
"content": {
"type": "SYMBOL",
"name": "else_if_clauses"
}
},
{
"type": "BLANK"
}
]