From c4444e15493a6e25a8b07e33dbc5c0040e6230a5 Mon Sep 17 00:00:00 2001 From: Aymeric Wibo Date: Mon, 12 Aug 2024 19:19:55 +0200 Subject: [PATCH] grammar: Imports --- grammar.js | 4 +- src/grammar.json | 2174 +++++++++++++-------------- src/node-types.json | 1752 +++++++++++----------- src/parser.c | 3162 +++++++++++++++++++++------------------- test/corpus/import.txt | 55 + 5 files changed, 3729 insertions(+), 3418 deletions(-) create mode 100644 test/corpus/import.txt diff --git a/grammar.js b/grammar.js index 94a4c31..c5e285c 100644 --- a/grammar.js +++ b/grammar.js @@ -33,7 +33,9 @@ module.exports = grammar({ block: $ => seq("{", field("body", repeat($.statement)), "}"), - import: $ => seq("import", field("path", $.identifier)), + import: $ => seq("import", optional($.import_relative_dot), field("path", $.import_path)), + import_path: $ => choice($.identifier, seq($.identifier, ".", $.import_path)), + import_relative_dot: _ => ".", qualifier: _ => choice("extern", "pure"), qualifier_list: $ => choice($.qualifier, seq($.qualifier, $.qualifier_list)), diff --git a/src/grammar.json b/src/grammar.json index 2460418..792ea10 100644 --- a/src/grammar.json +++ b/src/grammar.json @@ -1,1068 +1,1110 @@ { - "name": "flamingo", - "rules": { - "source_file": { - "type": "REPEAT", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "statement" - }, - { - "type": "SYMBOL", - "name": "doc_comment" - }, - { - "type": "SYMBOL", - "name": "comment" - } - ] - } - }, - "comment": { - "type": "TOKEN", - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "#" - }, - { - "type": "PATTERN", - "value": "[^#].*" - } - ] - } - }, - "doc_comment": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "##" - }, - { - "type": "SYMBOL", - "name": "doc_comment_content" - } - ] - }, - "doc_comment_content": { - "type": "PATTERN", - "value": ".*" - }, - "statement": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "block" - }, - { - "type": "SYMBOL", - "name": "expression" - }, - { - "type": "SYMBOL", - "name": "print" - }, - { - "type": "SYMBOL", - "name": "assert" - }, - { - "type": "SYMBOL", - "name": "assignment" - }, - { - "type": "SYMBOL", - "name": "var_declaration" - }, - { - "type": "SYMBOL", - "name": "import" - }, - { - "type": "SYMBOL", - "name": "function_declaration" - }, - { - "type": "SYMBOL", - "name": "class_declaration" - }, - { - "type": "SYMBOL", - "name": "return" - } - ] - }, - "block": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "{" - }, - { - "type": "FIELD", - "name": "body", - "content": { - "type": "REPEAT", - "content": { - "type": "SYMBOL", - "name": "statement" - } - } - }, - { - "type": "STRING", - "value": "}" - } - ] - }, - "import": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "import" - }, - { - "type": "FIELD", - "name": "path", - "content": { - "type": "SYMBOL", - "name": "identifier" - } - } - ] - }, - "qualifier": { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "extern" - }, - { - "type": "STRING", - "value": "pure" - } - ] - }, - "qualifier_list": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "qualifier" - }, - { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "qualifier" - }, - { - "type": "SYMBOL", - "name": "qualifier_list" - } - ] - } - ] - }, - "function_declaration": { - "type": "PREC", - "value": 100, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "qualifiers", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "qualifier_list" - }, - { - "type": "BLANK" - } - ] - } - }, - { - "type": "STRING", - "value": "fn" - }, - { - "type": "FIELD", - "name": "name", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "identifier" - }, - { - "type": "SYMBOL", - "name": "overloadable_operator" - } - ] - } - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "(" - }, - { - "type": "CHOICE", - "members": [ - { - "type": "FIELD", - "name": "params", - "content": { - "type": "SYMBOL", - "name": "param_list" - } - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "STRING", - "value": ")" - } - ] - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "FIELD", - "name": "body", - "content": { - "type": "SYMBOL", - "name": "statement" - } - } - ] - } - }, - "function_expression": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "fn" - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "(" - }, - { - "type": "CHOICE", - "members": [ - { - "type": "FIELD", - "name": "params", - "content": { - "type": "SYMBOL", - "name": "param_list" - } - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "STRING", - "value": ")" - } - ] - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "FIELD", - "name": "body", - "content": { - "type": "SYMBOL", - "name": "statement" - } - } - ] - }, - "class_declaration": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "qualifiers", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "qualifier_list" - }, - { - "type": "BLANK" - } - ] - } - }, - { - "type": "STRING", - "value": "class" - }, - { - "type": "FIELD", - "name": "name", - "content": { - "type": "SYMBOL", - "name": "identifier" - } - }, - { - "type": "STRING", - "value": "{" - }, - { - "type": "FIELD", - "name": "body", - "content": { - "type": "REPEAT", - "content": { - "type": "SYMBOL", - "name": "statement" - } - } - }, - { - "type": "STRING", - "value": "}" - } - ] - }, - "print": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "print" - }, - { - "type": "FIELD", - "name": "msg", - "content": { - "type": "SYMBOL", - "name": "expression" - } - } - ] - }, - "assert": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "assert" - }, - { - "type": "FIELD", - "name": "test", - "content": { - "type": "SYMBOL", - "name": "expression" - } - } - ] - }, - "expression": { - "type": "PREC", - "value": -1, - "content": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "identifier" - }, - { - "type": "SYMBOL", - "name": "literal" - }, - { - "type": "SYMBOL", - "name": "call" - }, - { - "type": "SYMBOL", - "name": "access_list" - }, - { - "type": "SYMBOL", - "name": "parenthesized_expression" - }, - { - "type": "SYMBOL", - "name": "vec" - }, - { - "type": "SYMBOL", - "name": "map" - }, - { - "type": "SYMBOL", - "name": "binary_expression" - } - ] - } - }, - "parenthesized_expression": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "(" - }, - { - "type": "FIELD", - "name": "expression", - "content": { - "type": "SYMBOL", - "name": "expression" - } - }, - { - "type": "STRING", - "value": ")" - } - ] - }, - "access_list": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "accessed", - "content": { - "type": "SYMBOL", - "name": "expression" - } - }, - { - "type": "STRING", - "value": "." - }, - { - "type": "FIELD", - "name": "accessor", - "content": { - "type": "SYMBOL", - "name": "identifier" - } - } - ] - }, - "call": { - "type": "PREC", - "value": 99, - "content": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "callable", - "content": { - "type": "SYMBOL", - "name": "expression" - } - }, - { - "type": "STRING", - "value": "(" - }, - { - "type": "FIELD", - "name": "args", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "argument_list" - }, - { - "type": "BLANK" - } - ] - } - }, - { - "type": "STRING", - "value": ")" - } - ] - } - }, - "template_type": { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "vec" - }, - { - "type": "STRING", - "value": "map" - } - ] - }, - "type_name": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "identifier" - }, - { - "type": "STRING", - "value": "vec" - }, - { - "type": "STRING", - "value": "map" - } - ] - }, - "type": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "type_name" - }, - { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "vec" - }, - { - "type": "STRING", - "value": "<" - }, - { - "type": "SYMBOL", - "name": "type" - }, - { - "type": "STRING", - "value": ">" - } - ] - }, - { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "map" - }, - { - "type": "STRING", - "value": "<" - }, - { - "type": "SYMBOL", - "name": "type" - }, - { - "type": "STRING", - "value": "," - }, - { - "type": "SYMBOL", - "name": "type" - }, - { - "type": "STRING", - "value": ">" - } - ] - } - ] - }, - "param": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "identifier" - }, - { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "identifier" - }, - { - "type": "STRING", - "value": ":" - }, - { - "type": "SYMBOL", - "name": "type" - } - ] - } - ] - }, - "param_list": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "param" - }, - { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "param" - }, - { - "type": "STRING", - "value": "," - }, - { - "type": "SYMBOL", - "name": "param_list" - } - ] - } - ] - }, - "argument_list": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "expression" - }, - { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "expression" - }, - { - "type": "STRING", - "value": "," - }, - { - "type": "SYMBOL", - "name": "argument_list" - } - ] - } - ] - }, - "literal": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "number" - }, - { - "type": "SYMBOL", - "name": "string" - }, - { - "type": "SYMBOL", - "name": "bool" - } - ] - }, - "var_declaration": { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "identifier" - }, - { - "type": "STRING", - "value": ":" - }, - { - "type": "SYMBOL", - "name": "type" - } - ] - }, - "assignment": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "var_declaration" - }, - { - "type": "SYMBOL", - "name": "identifier" - } - ] - } - }, - { - "type": "STRING", - "value": "=" - }, - { - "type": "FIELD", - "name": "right", - "content": { - "type": "SYMBOL", - "name": "expression" - } - } - ] - }, - "return": { - "type": "PREC_LEFT", - "value": 100, - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "return" - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "expression" - }, - { - "type": "BLANK" - } - ] - } - ] - } - }, - "unary_expression": { - "type": "CHOICE", - "members": [ - { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "-" - }, - { - "type": "SYMBOL", - "name": "expression" - } - ] - }, - { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "!" - }, - { - "type": "SYMBOL", - "name": "expression" - } - ] - } - ] - }, - "binary_expression": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "left", - "content": { - "type": "SYMBOL", - "name": "expression" - } - }, - { - "type": "FIELD", - "name": "operator", - "content": { - "type": "SYMBOL", - "name": "overloadable_operator" - } - } - ] - }, - "expression_list": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "expression" - }, - { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "expression" - }, - { - "type": "STRING", - "value": "," - }, - { - "type": "SYMBOL", - "name": "expression_list" - } - ] - } - ] - }, - "vec": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "[" - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "expression_list" - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "STRING", - "value": "]" - } - ] - }, - "map_item": { - "type": "SEQ", - "members": [ - { - "type": "FIELD", - "name": "key", - "content": { - "type": "SYMBOL", - "name": "expression" - } - }, - { - "type": "STRING", - "value": ":" - }, - { - "type": "FIELD", - "name": "value", - "content": { - "type": "SYMBOL", - "name": "expression" - } - } - ] - }, - "map_item_list": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "map_item" - }, - { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "map_item" - }, - { - "type": "STRING", - "value": "," - }, - { - "type": "SYMBOL", - "name": "map_item_list" - } - ] - } - ] - }, - "map": { - "type": "PREC", - "value": -1, - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "{" - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "map_item_list" - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "STRING", - "value": "}" - } - ] - } - }, - "overloadable_operator": { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "++" - }, - { - "type": "STRING", - "value": "===" - } - ] - }, - "primitive_type": { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "any" - }, - { - "type": "STRING", - "value": "int" - }, - { - "type": "STRING", - "value": "str" - }, - { - "type": "STRING", - "value": "bool" - }, - { - "type": "STRING", - "value": "void" - } - ] - }, - "identifier": { - "type": "CHOICE", - "members": [ - { - "type": "PATTERN", - "value": "[_A-z][_A-z0-9]*" - }, - { - "type": "SYMBOL", - "name": "primitive_type" - } - ] - }, - "number": { - "type": "PATTERN", - "value": "\\d+" - }, - "string": { - "type": "PATTERN", - "value": "\"([^\"\\\\]|\\\\.)*\"" - }, - "bool": { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "true" - }, - { - "type": "STRING", - "value": "false" - }, - { - "type": "STRING", - "value": "error" - } - ] - } - }, - "extras": [ - { - "type": "PATTERN", - "value": "\\s" - } - ], - "conflicts": [], - "precedences": [], - "externals": [], - "inline": [], - "supertypes": [] + "name": "flamingo", + "rules": { + "source_file": { + "type": "REPEAT", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "statement" + }, + { + "type": "SYMBOL", + "name": "doc_comment" + }, + { + "type": "SYMBOL", + "name": "comment" + } + ] + } + }, + "comment": { + "type": "TOKEN", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "#" + }, + { + "type": "PATTERN", + "value": "[^#].*" + } + ] + } + }, + "doc_comment": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "##" + }, + { + "type": "SYMBOL", + "name": "doc_comment_content" + } + ] + }, + "doc_comment_content": { + "type": "PATTERN", + "value": ".*" + }, + "statement": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "block" + }, + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "SYMBOL", + "name": "print" + }, + { + "type": "SYMBOL", + "name": "assert" + }, + { + "type": "SYMBOL", + "name": "assignment" + }, + { + "type": "SYMBOL", + "name": "var_declaration" + }, + { + "type": "SYMBOL", + "name": "import" + }, + { + "type": "SYMBOL", + "name": "function_declaration" + }, + { + "type": "SYMBOL", + "name": "class_declaration" + }, + { + "type": "SYMBOL", + "name": "return" + } + ] + }, + "block": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "statement" + } + } + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "import": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "import" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "import_relative_dot" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "FIELD", + "name": "path", + "content": { + "type": "SYMBOL", + "name": "import_path" + } + } + ] + }, + "import_path": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "SYMBOL", + "name": "import_path" + } + ] + } + ] + }, + "import_relative_dot": { + "type": "STRING", + "value": "." + }, + "qualifier": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "extern" + }, + { + "type": "STRING", + "value": "pure" + } + ] + }, + "qualifier_list": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "qualifier" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "qualifier" + }, + { + "type": "SYMBOL", + "name": "qualifier_list" + } + ] + } + ] + }, + "function_declaration": { + "type": "PREC", + "value": 100, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "qualifiers", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "qualifier_list" + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "STRING", + "value": "fn" + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "SYMBOL", + "name": "overloadable_operator" + } + ] + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "FIELD", + "name": "params", + "content": { + "type": "SYMBOL", + "name": "param_list" + } + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "statement" + } + } + ] + } + }, + "function_expression": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "fn" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "FIELD", + "name": "params", + "content": { + "type": "SYMBOL", + "name": "param_list" + } + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "statement" + } + } + ] + }, + "class_declaration": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "qualifiers", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "qualifier_list" + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "STRING", + "value": "class" + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + }, + { + "type": "STRING", + "value": "{" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "statement" + } + } + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "print": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "print" + }, + { + "type": "FIELD", + "name": "msg", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + }, + "assert": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "assert" + }, + { + "type": "FIELD", + "name": "test", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + }, + "expression": { + "type": "PREC", + "value": -1, + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "SYMBOL", + "name": "literal" + }, + { + "type": "SYMBOL", + "name": "call" + }, + { + "type": "SYMBOL", + "name": "access_list" + }, + { + "type": "SYMBOL", + "name": "parenthesized_expression" + }, + { + "type": "SYMBOL", + "name": "vec" + }, + { + "type": "SYMBOL", + "name": "map" + }, + { + "type": "SYMBOL", + "name": "binary_expression" + } + ] + } + }, + "parenthesized_expression": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "FIELD", + "name": "expression", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "access_list": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "accessed", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "FIELD", + "name": "accessor", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + } + ] + }, + "call": { + "type": "PREC", + "value": 99, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "callable", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "STRING", + "value": "(" + }, + { + "type": "FIELD", + "name": "args", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "arg_list" + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "STRING", + "value": ")" + } + ] + } + }, + "template_type": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "vec" + }, + { + "type": "STRING", + "value": "map" + } + ] + }, + "type_name": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "STRING", + "value": "vec" + }, + { + "type": "STRING", + "value": "map" + } + ] + }, + "type": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "type_name" + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "vec" + }, + { + "type": "STRING", + "value": "<" + }, + { + "type": "SYMBOL", + "name": "type" + }, + { + "type": "STRING", + "value": ">" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "map" + }, + { + "type": "STRING", + "value": "<" + }, + { + "type": "SYMBOL", + "name": "type" + }, + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "type" + }, + { + "type": "STRING", + "value": ">" + } + ] + } + ] + }, + "param": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "SYMBOL", + "name": "type" + } + ] + } + ] + }, + "param_list": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "param" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "param" + }, + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "param_list" + } + ] + } + ] + }, + "arg_list": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "arg_list" + } + ] + } + ] + }, + "literal": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "number" + }, + { + "type": "SYMBOL", + "name": "string" + }, + { + "type": "SYMBOL", + "name": "bool" + } + ] + }, + "var_declaration": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "SYMBOL", + "name": "type" + } + ] + }, + "assignment": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "var_declaration" + }, + { + "type": "SYMBOL", + "name": "identifier" + } + ] + } + }, + { + "type": "STRING", + "value": "=" + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + }, + "return": { + "type": "PREC_LEFT", + "value": 100, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "return" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "BLANK" + } + ] + } + ] + } + }, + "unary_expression": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "-" + }, + { + "type": "SYMBOL", + "name": "expression" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "!" + }, + { + "type": "SYMBOL", + "name": "expression" + } + ] + } + ] + }, + "binary_expression": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "SYMBOL", + "name": "overloadable_operator" + } + } + ] + }, + "expression_list": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "expression_list" + } + ] + } + ] + }, + "vec": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "expression_list" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "]" + } + ] + }, + "map_item": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "key", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "FIELD", + "name": "value", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + }, + "map_item_list": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "map_item" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "map_item" + }, + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "map_item_list" + } + ] + } + ] + }, + "map": { + "type": "PREC", + "value": -1, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "map_item_list" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "}" + } + ] + } + }, + "overloadable_operator": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "++" + }, + { + "type": "STRING", + "value": "===" + } + ] + }, + "primitive_type": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "any" + }, + { + "type": "STRING", + "value": "int" + }, + { + "type": "STRING", + "value": "str" + }, + { + "type": "STRING", + "value": "bool" + }, + { + "type": "STRING", + "value": "void" + } + ] + }, + "identifier": { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "[_A-z][_A-z0-9]*" + }, + { + "type": "SYMBOL", + "name": "primitive_type" + } + ] + }, + "number": { + "type": "PATTERN", + "value": "\\d+" + }, + "string": { + "type": "PATTERN", + "value": "\"([^\"\\\\]|\\\\.)*\"" + }, + "bool": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "true" + }, + { + "type": "STRING", + "value": "false" + }, + { + "type": "STRING", + "value": "error" + } + ] + } + }, + "extras": [ + { + "type": "PATTERN", + "value": "\\s" + } + ], + "conflicts": [], + "precedences": [], + "externals": [], + "inline": [], + "supertypes": [] } diff --git a/src/node-types.json b/src/node-types.json index 2a6d353..35a4d5f 100644 --- a/src/node-types.json +++ b/src/node-types.json @@ -1,860 +1,894 @@ [ - { - "type": "access_list", - "named": true, - "fields": { - "accessed": { - "multiple": false, - "required": true, - "types": [ - { - "type": "expression", - "named": true - } - ] - }, - "accessor": { - "multiple": false, - "required": true, - "types": [ - { - "type": "identifier", - "named": true - } - ] - } - } - }, - { - "type": "argument_list", - "named": true, - "fields": {}, - "children": { - "multiple": true, - "required": true, - "types": [ - { - "type": "argument_list", - "named": true - }, - { - "type": "expression", - "named": true - } - ] - } - }, - { - "type": "assert", - "named": true, - "fields": { - "test": { - "multiple": false, - "required": true, - "types": [ - { - "type": "expression", - "named": true - } - ] - } - } - }, - { - "type": "assignment", - "named": true, - "fields": { - "left": { - "multiple": false, - "required": true, - "types": [ - { - "type": "identifier", - "named": true - }, - { - "type": "var_declaration", - "named": true - } - ] - }, - "right": { - "multiple": false, - "required": true, - "types": [ - { - "type": "expression", - "named": true - } - ] - } - } - }, - { - "type": "binary_expression", - "named": true, - "fields": { - "left": { - "multiple": false, - "required": true, - "types": [ - { - "type": "expression", - "named": true - } - ] - }, - "operator": { - "multiple": false, - "required": true, - "types": [ - { - "type": "overloadable_operator", - "named": true - } - ] - } - } - }, - { - "type": "block", - "named": true, - "fields": { - "body": { - "multiple": true, - "required": false, - "types": [ - { - "type": "statement", - "named": true - } - ] - } - } - }, - { - "type": "bool", - "named": true, - "fields": {} - }, - { - "type": "call", - "named": true, - "fields": { - "args": { - "multiple": false, - "required": false, - "types": [ - { - "type": "argument_list", - "named": true - } - ] - }, - "callable": { - "multiple": false, - "required": true, - "types": [ - { - "type": "expression", - "named": true - } - ] - } - } - }, - { - "type": "class_declaration", - "named": true, - "fields": { - "body": { - "multiple": true, - "required": false, - "types": [ - { - "type": "statement", - "named": true - } - ] - }, - "name": { - "multiple": false, - "required": true, - "types": [ - { - "type": "identifier", - "named": true - } - ] - }, - "qualifiers": { - "multiple": false, - "required": false, - "types": [ - { - "type": "qualifier_list", - "named": true - } - ] - } - } - }, - { - "type": "doc_comment", - "named": true, - "fields": {}, - "children": { - "multiple": false, - "required": true, - "types": [ - { - "type": "doc_comment_content", - "named": true - } - ] - } - }, - { - "type": "expression", - "named": true, - "fields": {}, - "children": { - "multiple": false, - "required": true, - "types": [ - { - "type": "access_list", - "named": true - }, - { - "type": "binary_expression", - "named": true - }, - { - "type": "call", - "named": true - }, - { - "type": "identifier", - "named": true - }, - { - "type": "literal", - "named": true - }, - { - "type": "map", - "named": true - }, - { - "type": "parenthesized_expression", - "named": true - }, - { - "type": "vec", - "named": true - } - ] - } - }, - { - "type": "expression_list", - "named": true, - "fields": {}, - "children": { - "multiple": true, - "required": true, - "types": [ - { - "type": "expression", - "named": true - }, - { - "type": "expression_list", - "named": true - } - ] - } - }, - { - "type": "function_declaration", - "named": true, - "fields": { - "body": { - "multiple": false, - "required": true, - "types": [ - { - "type": "statement", - "named": true - } - ] - }, - "name": { - "multiple": false, - "required": true, - "types": [ - { - "type": "identifier", - "named": true - }, - { - "type": "overloadable_operator", - "named": true - } - ] - }, - "params": { - "multiple": false, - "required": false, - "types": [ - { - "type": "param_list", - "named": true - } - ] - }, - "qualifiers": { - "multiple": false, - "required": false, - "types": [ - { - "type": "qualifier_list", - "named": true - } - ] - } - } - }, - { - "type": "identifier", - "named": true, - "fields": {}, - "children": { - "multiple": false, - "required": false, - "types": [ - { - "type": "primitive_type", - "named": true - } - ] - } - }, - { - "type": "import", - "named": true, - "fields": { - "path": { - "multiple": false, - "required": true, - "types": [ - { - "type": "identifier", - "named": true - } - ] - } - } - }, - { - "type": "literal", - "named": true, - "fields": {}, - "children": { - "multiple": false, - "required": true, - "types": [ - { - "type": "bool", - "named": true - }, - { - "type": "number", - "named": true - }, - { - "type": "string", - "named": true - } - ] - } - }, - { - "type": "map", - "named": true, - "fields": {}, - "children": { - "multiple": false, - "required": false, - "types": [ - { - "type": "map_item_list", - "named": true - } - ] - } - }, - { - "type": "map_item", - "named": true, - "fields": { - "key": { - "multiple": false, - "required": true, - "types": [ - { - "type": "expression", - "named": true - } - ] - }, - "value": { - "multiple": false, - "required": true, - "types": [ - { - "type": "expression", - "named": true - } - ] - } - } - }, - { - "type": "map_item_list", - "named": true, - "fields": {}, - "children": { - "multiple": true, - "required": true, - "types": [ - { - "type": "map_item", - "named": true - }, - { - "type": "map_item_list", - "named": true - } - ] - } - }, - { - "type": "overloadable_operator", - "named": true, - "fields": {} - }, - { - "type": "param", - "named": true, - "fields": {}, - "children": { - "multiple": true, - "required": true, - "types": [ - { - "type": "identifier", - "named": true - }, - { - "type": "type", - "named": true - } - ] - } - }, - { - "type": "param_list", - "named": true, - "fields": {}, - "children": { - "multiple": true, - "required": true, - "types": [ - { - "type": "param", - "named": true - }, - { - "type": "param_list", - "named": true - } - ] - } - }, - { - "type": "parenthesized_expression", - "named": true, - "fields": { - "expression": { - "multiple": false, - "required": true, - "types": [ - { - "type": "expression", - "named": true - } - ] - } - } - }, - { - "type": "primitive_type", - "named": true, - "fields": {} - }, - { - "type": "print", - "named": true, - "fields": { - "msg": { - "multiple": false, - "required": true, - "types": [ - { - "type": "expression", - "named": true - } - ] - } - } - }, - { - "type": "qualifier", - "named": true, - "fields": {} - }, - { - "type": "qualifier_list", - "named": true, - "fields": {}, - "children": { - "multiple": true, - "required": true, - "types": [ - { - "type": "qualifier", - "named": true - }, - { - "type": "qualifier_list", - "named": true - } - ] - } - }, - { - "type": "return", - "named": true, - "fields": {}, - "children": { - "multiple": false, - "required": false, - "types": [ - { - "type": "expression", - "named": true - } - ] - } - }, - { - "type": "source_file", - "named": true, - "fields": {}, - "children": { - "multiple": true, - "required": false, - "types": [ - { - "type": "comment", - "named": true - }, - { - "type": "doc_comment", - "named": true - }, - { - "type": "statement", - "named": true - } - ] - } - }, - { - "type": "statement", - "named": true, - "fields": {}, - "children": { - "multiple": false, - "required": true, - "types": [ - { - "type": "assert", - "named": true - }, - { - "type": "assignment", - "named": true - }, - { - "type": "block", - "named": true - }, - { - "type": "class_declaration", - "named": true - }, - { - "type": "expression", - "named": true - }, - { - "type": "function_declaration", - "named": true - }, - { - "type": "import", - "named": true - }, - { - "type": "print", - "named": true - }, - { - "type": "return", - "named": true - }, - { - "type": "var_declaration", - "named": true - } - ] - } - }, - { - "type": "type", - "named": true, - "fields": {}, - "children": { - "multiple": true, - "required": true, - "types": [ - { - "type": "type", - "named": true - }, - { - "type": "type_name", - "named": true - } - ] - } - }, - { - "type": "type_name", - "named": true, - "fields": {}, - "children": { - "multiple": false, - "required": false, - "types": [ - { - "type": "identifier", - "named": true - } - ] - } - }, - { - "type": "var_declaration", - "named": true, - "fields": {}, - "children": { - "multiple": true, - "required": true, - "types": [ - { - "type": "identifier", - "named": true - }, - { - "type": "type", - "named": true - } - ] - } - }, - { - "type": "vec", - "named": true, - "fields": {}, - "children": { - "multiple": false, - "required": false, - "types": [ - { - "type": "expression_list", - "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": "any", - "named": false - }, - { - "type": "assert", - "named": false - }, - { - "type": "bool", - "named": false - }, - { - "type": "class", - "named": false - }, - { - "type": "comment", - "named": true - }, - { - "type": "doc_comment_content", - "named": true - }, - { - "type": "error", - "named": false - }, - { - "type": "extern", - "named": false - }, - { - "type": "false", - "named": false - }, - { - "type": "fn", - "named": false - }, - { - "type": "import", - "named": false - }, - { - "type": "int", - "named": false - }, - { - "type": "map", - "named": false - }, - { - "type": "number", - "named": true - }, - { - "type": "print", - "named": false - }, - { - "type": "pure", - "named": false - }, - { - "type": "return", - "named": false - }, - { - "type": "str", - "named": false - }, - { - "type": "string", - "named": true - }, - { - "type": "true", - "named": false - }, - { - "type": "vec", - "named": false - }, - { - "type": "void", - "named": false - }, - { - "type": "{", - "named": false - }, - { - "type": "}", - "named": false - } -] + { + "type": "access_list", + "named": true, + "fields": { + "accessed": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + }, + "accessor": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + } + } + }, + { + "type": "arg_list", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "arg_list", + "named": true + }, + { + "type": "expression", + "named": true + } + ] + } + }, + { + "type": "assert", + "named": true, + "fields": { + "test": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + } + }, + { + "type": "assignment", + "named": true, + "fields": { + "left": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + }, + { + "type": "var_declaration", + "named": true + } + ] + }, + "right": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + } + }, + { + "type": "binary_expression", + "named": true, + "fields": { + "left": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + }, + "operator": { + "multiple": false, + "required": true, + "types": [ + { + "type": "overloadable_operator", + "named": true + } + ] + } + } + }, + { + "type": "block", + "named": true, + "fields": { + "body": { + "multiple": true, + "required": false, + "types": [ + { + "type": "statement", + "named": true + } + ] + } + } + }, + { + "type": "bool", + "named": true, + "fields": {} + }, + { + "type": "call", + "named": true, + "fields": { + "args": { + "multiple": false, + "required": false, + "types": [ + { + "type": "arg_list", + "named": true + } + ] + }, + "callable": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + } + }, + { + "type": "class_declaration", + "named": true, + "fields": { + "body": { + "multiple": true, + "required": false, + "types": [ + { + "type": "statement", + "named": true + } + ] + }, + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + }, + "qualifiers": { + "multiple": false, + "required": false, + "types": [ + { + "type": "qualifier_list", + "named": true + } + ] + } + } + }, + { + "type": "doc_comment", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "doc_comment_content", + "named": true + } + ] + } + }, + { + "type": "expression", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "access_list", + "named": true + }, + { + "type": "binary_expression", + "named": true + }, + { + "type": "call", + "named": true + }, + { + "type": "identifier", + "named": true + }, + { + "type": "literal", + "named": true + }, + { + "type": "map", + "named": true + }, + { + "type": "parenthesized_expression", + "named": true + }, + { + "type": "vec", + "named": true + } + ] + } + }, + { + "type": "expression_list", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "expression", + "named": true + }, + { + "type": "expression_list", + "named": true + } + ] + } + }, + { + "type": "function_declaration", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "statement", + "named": true + } + ] + }, + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + }, + { + "type": "overloadable_operator", + "named": true + } + ] + }, + "params": { + "multiple": false, + "required": false, + "types": [ + { + "type": "param_list", + "named": true + } + ] + }, + "qualifiers": { + "multiple": false, + "required": false, + "types": [ + { + "type": "qualifier_list", + "named": true + } + ] + } + } + }, + { + "type": "identifier", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": false, + "types": [ + { + "type": "primitive_type", + "named": true + } + ] + } + }, + { + "type": "import", + "named": true, + "fields": { + "path": { + "multiple": false, + "required": true, + "types": [ + { + "type": "import_path", + "named": true + } + ] + } + }, + "children": { + "multiple": false, + "required": false, + "types": [ + { + "type": "import_relative_dot", + "named": true + } + ] + } + }, + { + "type": "import_path", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + }, + { + "type": "import_path", + "named": true + } + ] + } + }, + { + "type": "import_relative_dot", + "named": true, + "fields": {} + }, + { + "type": "literal", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "bool", + "named": true + }, + { + "type": "number", + "named": true + }, + { + "type": "string", + "named": true + } + ] + } + }, + { + "type": "map", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": false, + "types": [ + { + "type": "map_item_list", + "named": true + } + ] + } + }, + { + "type": "map_item", + "named": true, + "fields": { + "key": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + }, + "value": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + } + }, + { + "type": "map_item_list", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "map_item", + "named": true + }, + { + "type": "map_item_list", + "named": true + } + ] + } + }, + { + "type": "overloadable_operator", + "named": true, + "fields": {} + }, + { + "type": "param", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + }, + { + "type": "type", + "named": true + } + ] + } + }, + { + "type": "param_list", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "param", + "named": true + }, + { + "type": "param_list", + "named": true + } + ] + } + }, + { + "type": "parenthesized_expression", + "named": true, + "fields": { + "expression": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + } + }, + { + "type": "primitive_type", + "named": true, + "fields": {} + }, + { + "type": "print", + "named": true, + "fields": { + "msg": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + } + }, + { + "type": "qualifier", + "named": true, + "fields": {} + }, + { + "type": "qualifier_list", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "qualifier", + "named": true + }, + { + "type": "qualifier_list", + "named": true + } + ] + } + }, + { + "type": "return", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": false, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + }, + { + "type": "source_file", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "comment", + "named": true + }, + { + "type": "doc_comment", + "named": true + }, + { + "type": "statement", + "named": true + } + ] + } + }, + { + "type": "statement", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "assert", + "named": true + }, + { + "type": "assignment", + "named": true + }, + { + "type": "block", + "named": true + }, + { + "type": "class_declaration", + "named": true + }, + { + "type": "expression", + "named": true + }, + { + "type": "function_declaration", + "named": true + }, + { + "type": "import", + "named": true + }, + { + "type": "print", + "named": true + }, + { + "type": "return", + "named": true + }, + { + "type": "var_declaration", + "named": true + } + ] + } + }, + { + "type": "type", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "type", + "named": true + }, + { + "type": "type_name", + "named": true + } + ] + } + }, + { + "type": "type_name", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": false, + "types": [ + { + "type": "identifier", + "named": true + } + ] + } + }, + { + "type": "var_declaration", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + }, + { + "type": "type", + "named": true + } + ] + } + }, + { + "type": "vec", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": false, + "types": [ + { + "type": "expression_list", + "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": "any", + "named": false + }, + { + "type": "assert", + "named": false + }, + { + "type": "bool", + "named": false + }, + { + "type": "class", + "named": false + }, + { + "type": "comment", + "named": true + }, + { + "type": "doc_comment_content", + "named": true + }, + { + "type": "error", + "named": false + }, + { + "type": "extern", + "named": false + }, + { + "type": "false", + "named": false + }, + { + "type": "fn", + "named": false + }, + { + "type": "import", + "named": false + }, + { + "type": "int", + "named": false + }, + { + "type": "map", + "named": false + }, + { + "type": "number", + "named": true + }, + { + "type": "print", + "named": false + }, + { + "type": "pure", + "named": false + }, + { + "type": "return", + "named": false + }, + { + "type": "str", + "named": false + }, + { + "type": "string", + "named": true + }, + { + "type": "true", + "named": false + }, + { + "type": "vec", + "named": false + }, + { + "type": "void", + "named": false + }, + { + "type": "{", + "named": false + }, + { + "type": "}", + "named": false + } +] \ No newline at end of file diff --git a/src/parser.c b/src/parser.c index 2fe44ef..d5637d5 100644 --- a/src/parser.c +++ b/src/parser.c @@ -6,15 +6,15 @@ #endif #define LANGUAGE_VERSION 14 -#define STATE_COUNT 142 +#define STATE_COUNT 148 #define LARGE_STATE_COUNT 17 -#define SYMBOL_COUNT 77 +#define SYMBOL_COUNT 79 #define ALIAS_COUNT 0 #define TOKEN_COUNT 41 #define EXTERNAL_TOKEN_COUNT 0 #define FIELD_COUNT 17 #define MAX_ALIAS_SEQUENCE_LENGTH 7 -#define PRODUCTION_ID_COUNT 22 +#define PRODUCTION_ID_COUNT 23 enum ts_symbol_identifiers { sym_comment = 1, @@ -23,15 +23,15 @@ enum ts_symbol_identifiers { anon_sym_LBRACE = 4, anon_sym_RBRACE = 5, anon_sym_import = 6, - anon_sym_extern = 7, - anon_sym_pure = 8, - anon_sym_fn = 9, - anon_sym_LPAREN = 10, - anon_sym_RPAREN = 11, - anon_sym_class = 12, - anon_sym_print = 13, - anon_sym_assert = 14, - anon_sym_DOT = 15, + anon_sym_DOT = 7, + anon_sym_extern = 8, + anon_sym_pure = 9, + anon_sym_fn = 10, + anon_sym_LPAREN = 11, + anon_sym_RPAREN = 12, + anon_sym_class = 13, + anon_sym_print = 14, + anon_sym_assert = 15, anon_sym_vec = 16, anon_sym_map = 17, anon_sym_LT = 18, @@ -62,37 +62,39 @@ enum ts_symbol_identifiers { sym_statement = 43, sym_block = 44, sym_import = 45, - sym_qualifier = 46, - sym_qualifier_list = 47, - sym_function_declaration = 48, - sym_class_declaration = 49, - sym_print = 50, - sym_assert = 51, - sym_expression = 52, - sym_parenthesized_expression = 53, - sym_access_list = 54, - sym_call = 55, - sym_type_name = 56, - sym_type = 57, - sym_param = 58, - sym_param_list = 59, - sym_argument_list = 60, - sym_literal = 61, - sym_var_declaration = 62, - sym_assignment = 63, - sym_return = 64, - sym_binary_expression = 65, - sym_expression_list = 66, - sym_vec = 67, - sym_map_item = 68, - sym_map_item_list = 69, - sym_map = 70, - sym_overloadable_operator = 71, - sym_primitive_type = 72, - sym_identifier = 73, - sym_bool = 74, - aux_sym_source_file_repeat1 = 75, - aux_sym_block_repeat1 = 76, + sym_import_path = 46, + sym_import_relative_dot = 47, + sym_qualifier = 48, + sym_qualifier_list = 49, + sym_function_declaration = 50, + sym_class_declaration = 51, + sym_print = 52, + sym_assert = 53, + sym_expression = 54, + sym_parenthesized_expression = 55, + sym_access_list = 56, + sym_call = 57, + sym_type_name = 58, + sym_type = 59, + sym_param = 60, + sym_param_list = 61, + sym_arg_list = 62, + sym_literal = 63, + sym_var_declaration = 64, + sym_assignment = 65, + sym_return = 66, + sym_binary_expression = 67, + sym_expression_list = 68, + sym_vec = 69, + sym_map_item = 70, + sym_map_item_list = 71, + sym_map = 72, + sym_overloadable_operator = 73, + sym_primitive_type = 74, + sym_identifier = 75, + sym_bool = 76, + aux_sym_source_file_repeat1 = 77, + aux_sym_block_repeat1 = 78, }; static const char * const ts_symbol_names[] = { @@ -103,6 +105,7 @@ static const char * const ts_symbol_names[] = { [anon_sym_LBRACE] = "{", [anon_sym_RBRACE] = "}", [anon_sym_import] = "import", + [anon_sym_DOT] = ".", [anon_sym_extern] = "extern", [anon_sym_pure] = "pure", [anon_sym_fn] = "fn", @@ -111,7 +114,6 @@ static const char * const ts_symbol_names[] = { [anon_sym_class] = "class", [anon_sym_print] = "print", [anon_sym_assert] = "assert", - [anon_sym_DOT] = ".", [anon_sym_vec] = "vec", [anon_sym_map] = "map", [anon_sym_LT] = "<", @@ -142,6 +144,8 @@ static const char * const ts_symbol_names[] = { [sym_statement] = "statement", [sym_block] = "block", [sym_import] = "import", + [sym_import_path] = "import_path", + [sym_import_relative_dot] = "import_relative_dot", [sym_qualifier] = "qualifier", [sym_qualifier_list] = "qualifier_list", [sym_function_declaration] = "function_declaration", @@ -156,7 +160,7 @@ static const char * const ts_symbol_names[] = { [sym_type] = "type", [sym_param] = "param", [sym_param_list] = "param_list", - [sym_argument_list] = "argument_list", + [sym_arg_list] = "arg_list", [sym_literal] = "literal", [sym_var_declaration] = "var_declaration", [sym_assignment] = "assignment", @@ -183,6 +187,7 @@ static const TSSymbol ts_symbol_map[] = { [anon_sym_LBRACE] = anon_sym_LBRACE, [anon_sym_RBRACE] = anon_sym_RBRACE, [anon_sym_import] = anon_sym_import, + [anon_sym_DOT] = anon_sym_DOT, [anon_sym_extern] = anon_sym_extern, [anon_sym_pure] = anon_sym_pure, [anon_sym_fn] = anon_sym_fn, @@ -191,7 +196,6 @@ static const TSSymbol ts_symbol_map[] = { [anon_sym_class] = anon_sym_class, [anon_sym_print] = anon_sym_print, [anon_sym_assert] = anon_sym_assert, - [anon_sym_DOT] = anon_sym_DOT, [anon_sym_vec] = anon_sym_vec, [anon_sym_map] = anon_sym_map, [anon_sym_LT] = anon_sym_LT, @@ -222,6 +226,8 @@ static const TSSymbol ts_symbol_map[] = { [sym_statement] = sym_statement, [sym_block] = sym_block, [sym_import] = sym_import, + [sym_import_path] = sym_import_path, + [sym_import_relative_dot] = sym_import_relative_dot, [sym_qualifier] = sym_qualifier, [sym_qualifier_list] = sym_qualifier_list, [sym_function_declaration] = sym_function_declaration, @@ -236,7 +242,7 @@ static const TSSymbol ts_symbol_map[] = { [sym_type] = sym_type, [sym_param] = sym_param, [sym_param_list] = sym_param_list, - [sym_argument_list] = sym_argument_list, + [sym_arg_list] = sym_arg_list, [sym_literal] = sym_literal, [sym_var_declaration] = sym_var_declaration, [sym_assignment] = sym_assignment, @@ -284,6 +290,10 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = true, .named = false, }, + [anon_sym_DOT] = { + .visible = true, + .named = false, + }, [anon_sym_extern] = { .visible = true, .named = false, @@ -316,10 +326,6 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = true, .named = false, }, - [anon_sym_DOT] = { - .visible = true, - .named = false, - }, [anon_sym_vec] = { .visible = true, .named = false, @@ -440,6 +446,14 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = true, .named = true, }, + [sym_import_path] = { + .visible = true, + .named = true, + }, + [sym_import_relative_dot] = { + .visible = true, + .named = true, + }, [sym_qualifier] = { .visible = true, .named = true, @@ -496,7 +510,7 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = true, .named = true, }, - [sym_argument_list] = { + [sym_arg_list] = { .visible = true, .named = true, }, @@ -613,22 +627,23 @@ static const TSFieldMapSlice ts_field_map_slices[PRODUCTION_ID_COUNT] = { [3] = {.index = 2, .length = 1}, [4] = {.index = 3, .length = 2}, [5] = {.index = 5, .length = 1}, - [6] = {.index = 6, .length = 2}, - [7] = {.index = 8, .length = 1}, + [6] = {.index = 6, .length = 1}, + [7] = {.index = 7, .length = 2}, [8] = {.index = 9, .length = 1}, [9] = {.index = 10, .length = 2}, - [10] = {.index = 12, .length = 2}, - [11] = {.index = 14, .length = 2}, - [12] = {.index = 16, .length = 1}, - [13] = {.index = 17, .length = 3}, - [14] = {.index = 20, .length = 2}, - [15] = {.index = 22, .length = 2}, - [16] = {.index = 24, .length = 2}, - [17] = {.index = 26, .length = 2}, - [18] = {.index = 28, .length = 3}, - [19] = {.index = 31, .length = 3}, - [20] = {.index = 34, .length = 3}, - [21] = {.index = 37, .length = 4}, + [10] = {.index = 12, .length = 1}, + [11] = {.index = 13, .length = 2}, + [12] = {.index = 15, .length = 2}, + [13] = {.index = 17, .length = 1}, + [14] = {.index = 18, .length = 3}, + [15] = {.index = 21, .length = 2}, + [16] = {.index = 23, .length = 2}, + [17] = {.index = 25, .length = 2}, + [18] = {.index = 27, .length = 2}, + [19] = {.index = 29, .length = 3}, + [20] = {.index = 32, .length = 3}, + [21] = {.index = 35, .length = 3}, + [22] = {.index = 38, .length = 4}, }; static const TSFieldMapEntry ts_field_map_entries[] = { @@ -644,52 +659,54 @@ static const TSFieldMapEntry ts_field_map_entries[] = { [5] = {field_body, 1}, [6] = + {field_path, 2}, + [7] = {field_body, 2}, {field_name, 1}, - [8] = - {field_expression, 1}, [9] = - {field_callable, 0}, + {field_expression, 1}, [10] = {field_accessed, 0}, {field_accessor, 2}, [12] = + {field_callable, 0}, + [13] = {field_left, 0}, {field_right, 2}, - [14] = + [15] = {field_key, 0}, {field_value, 2}, - [16] = - {field_name, 1}, [17] = + {field_name, 1}, + [18] = {field_body, 3}, {field_name, 2}, {field_qualifiers, 0}, - [20] = + [21] = {field_args, 2}, {field_callable, 0}, - [22] = + [23] = {field_body, 4}, {field_name, 1}, - [24] = + [25] = {field_body, 3}, {field_name, 1}, - [26] = + [27] = {field_name, 2}, {field_qualifiers, 0}, - [28] = + [29] = {field_body, 5}, {field_name, 1}, {field_params, 3}, - [31] = + [32] = {field_body, 5}, {field_name, 2}, {field_qualifiers, 0}, - [34] = + [35] = {field_body, 4}, {field_name, 2}, {field_qualifiers, 0}, - [37] = + [38] = {field_body, 6}, {field_name, 2}, {field_params, 4}, @@ -755,13 +772,13 @@ static const TSStateId ts_primary_state_ids[STATE_COUNT] = { [47] = 47, [48] = 48, [49] = 49, - [50] = 47, + [50] = 46, [51] = 51, - [52] = 51, + [52] = 52, [53] = 53, - [54] = 53, + [54] = 51, [55] = 55, - [56] = 56, + [56] = 55, [57] = 57, [58] = 58, [59] = 59, @@ -783,11 +800,11 @@ static const TSStateId ts_primary_state_ids[STATE_COUNT] = { [75] = 75, [76] = 76, [77] = 77, - [78] = 74, + [78] = 78, [79] = 79, [80] = 80, [81] = 81, - [82] = 82, + [82] = 81, [83] = 83, [84] = 84, [85] = 85, @@ -797,36 +814,36 @@ static const TSStateId ts_primary_state_ids[STATE_COUNT] = { [89] = 89, [90] = 90, [91] = 91, - [92] = 89, + [92] = 92, [93] = 93, [94] = 94, [95] = 95, [96] = 96, - [97] = 23, - [98] = 18, + [97] = 96, + [98] = 98, [99] = 99, [100] = 100, - [101] = 25, - [102] = 20, - [103] = 31, - [104] = 24, - [105] = 21, - [106] = 26, - [107] = 19, - [108] = 27, - [109] = 28, - [110] = 29, + [101] = 101, + [102] = 24, + [103] = 18, + [104] = 26, + [105] = 105, + [106] = 106, + [107] = 22, + [108] = 31, + [109] = 20, + [110] = 32, [111] = 30, - [112] = 32, - [113] = 99, - [114] = 22, + [112] = 28, + [113] = 19, + [114] = 29, [115] = 115, - [116] = 116, + [116] = 27, [117] = 117, - [118] = 118, - [119] = 119, - [120] = 120, - [121] = 121, + [118] = 21, + [119] = 25, + [120] = 105, + [121] = 23, [122] = 122, [123] = 123, [124] = 124, @@ -840,13 +857,19 @@ static const TSStateId ts_primary_state_ids[STATE_COUNT] = { [132] = 132, [133] = 133, [134] = 134, - [135] = 134, + [135] = 135, [136] = 136, [137] = 137, - [138] = 127, + [138] = 138, [139] = 139, - [140] = 136, + [140] = 140, [141] = 141, + [142] = 141, + [143] = 143, + [144] = 133, + [145] = 145, + [146] = 140, + [147] = 147, }; static bool ts_lex(TSLexer *lexer, TSStateId state) { @@ -858,12 +881,12 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { if (lookahead == '!') ADVANCE(56); if (lookahead == '"') ADVANCE(3); if (lookahead == '#') ADVANCE(4); - if (lookahead == '(') ADVANCE(40); - if (lookahead == ')') ADVANCE(41); + if (lookahead == '(') ADVANCE(41); + if (lookahead == ')') ADVANCE(42); if (lookahead == '+') ADVANCE(7); if (lookahead == ',') ADVANCE(51); if (lookahead == '-') ADVANCE(55); - if (lookahead == '.') ADVANCE(46); + if (lookahead == '.') ADVANCE(34); if (lookahead == ':') ADVANCE(52); if (lookahead == '<') ADVANCE(49); if (lookahead == '=') ADVANCE(53); @@ -891,8 +914,8 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { END_STATE(); case 1: if (lookahead == '"') ADVANCE(3); - if (lookahead == '(') ADVANCE(40); - if (lookahead == ')') ADVANCE(41); + if (lookahead == '(') ADVANCE(41); + if (lookahead == ')') ADVANCE(42); if (lookahead == '[') ADVANCE(57); if (lookahead == 'a') ADVANCE(87); if (lookahead == 'b') ADVANCE(92); @@ -911,7 +934,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { END_STATE(); case 2: if (lookahead == '"') ADVANCE(3); - if (lookahead == '(') ADVANCE(40); + if (lookahead == '(') ADVANCE(41); if (lookahead == '[') ADVANCE(57); if (lookahead == ']') ADVANCE(59); if (lookahead == 'a') ADVANCE(87); @@ -938,10 +961,10 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { if (lookahead != 0) ADVANCE(27); END_STATE(); case 5: - if (lookahead == '(') ADVANCE(40); + if (lookahead == '(') ADVANCE(41); if (lookahead == '+') ADVANCE(7); if (lookahead == ',') ADVANCE(51); - if (lookahead == '.') ADVANCE(46); + if (lookahead == '.') ADVANCE(34); if (lookahead == '=') ADVANCE(8); if (lookahead == ']') ADVANCE(58); if (lookahead == 'c') ADVANCE(14); @@ -953,6 +976,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { END_STATE(); case 6: if (lookahead == '+') ADVANCE(7); + if (lookahead == '.') ADVANCE(34); if (lookahead == '=') ADVANCE(8); if (lookahead == 'a') ADVANCE(87); if (lookahead == 'b') ADVANCE(92); @@ -987,7 +1011,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { if (('A' <= lookahead && lookahead <= 'z')) ADVANCE(125); END_STATE(); case 12: - if (lookahead == 'e') ADVANCE(36); + if (lookahead == 'e') ADVANCE(37); END_STATE(); case 13: if (lookahead == 'e') ADVANCE(17); @@ -996,10 +1020,10 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { if (lookahead == 'l') ADVANCE(10); END_STATE(); case 15: - if (lookahead == 'n') ADVANCE(38); + if (lookahead == 'n') ADVANCE(39); END_STATE(); case 16: - if (lookahead == 'n') ADVANCE(34); + if (lookahead == 'n') ADVANCE(35); END_STATE(); case 17: if (lookahead == 'r') ADVANCE(16); @@ -1008,7 +1032,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { if (lookahead == 'r') ADVANCE(12); END_STATE(); case 19: - if (lookahead == 's') ADVANCE(42); + if (lookahead == 's') ADVANCE(43); END_STATE(); case 20: if (lookahead == 's') ADVANCE(19); @@ -1030,11 +1054,11 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { if (eof) ADVANCE(26); if (lookahead == '"') ADVANCE(3); if (lookahead == '#') ADVANCE(4); - if (lookahead == '(') ADVANCE(40); - if (lookahead == ')') ADVANCE(41); + if (lookahead == '(') ADVANCE(41); + if (lookahead == ')') ADVANCE(42); if (lookahead == '+') ADVANCE(7); if (lookahead == ',') ADVANCE(51); - if (lookahead == '.') ADVANCE(46); + if (lookahead == '.') ADVANCE(34); if (lookahead == ':') ADVANCE(52); if (lookahead == '<') ADVANCE(49); if (lookahead == '=') ADVANCE(53); @@ -1094,56 +1118,56 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { ('A' <= lookahead && lookahead <= 'z')) ADVANCE(125); END_STATE(); case 34: - ACCEPT_TOKEN(anon_sym_extern); + ACCEPT_TOKEN(anon_sym_DOT); END_STATE(); case 35: + ACCEPT_TOKEN(anon_sym_extern); + END_STATE(); + case 36: ACCEPT_TOKEN(anon_sym_extern); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'z')) ADVANCE(125); END_STATE(); - case 36: + case 37: ACCEPT_TOKEN(anon_sym_pure); END_STATE(); - case 37: + case 38: ACCEPT_TOKEN(anon_sym_pure); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'z')) ADVANCE(125); END_STATE(); - case 38: + case 39: ACCEPT_TOKEN(anon_sym_fn); END_STATE(); - case 39: + case 40: ACCEPT_TOKEN(anon_sym_fn); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'z')) ADVANCE(125); END_STATE(); - case 40: + case 41: ACCEPT_TOKEN(anon_sym_LPAREN); END_STATE(); - case 41: + case 42: ACCEPT_TOKEN(anon_sym_RPAREN); END_STATE(); - case 42: + case 43: ACCEPT_TOKEN(anon_sym_class); END_STATE(); - case 43: + case 44: ACCEPT_TOKEN(anon_sym_class); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'z')) ADVANCE(125); END_STATE(); - case 44: + case 45: ACCEPT_TOKEN(anon_sym_print); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'z')) ADVANCE(125); END_STATE(); - case 45: + case 46: ACCEPT_TOKEN(anon_sym_assert); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'z')) ADVANCE(125); END_STATE(); - case 46: - ACCEPT_TOKEN(anon_sym_DOT); - END_STATE(); case 47: ACCEPT_TOKEN(anon_sym_vec); if (('0' <= lookahead && lookahead <= '9') || @@ -1228,7 +1252,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { case 67: ACCEPT_TOKEN(aux_sym_identifier_token1); if (lookahead == 'a') ADVANCE(84); - if (lookahead == 'n') ADVANCE(39); + if (lookahead == 'n') ADVANCE(40); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'z')) ADVANCE(125); END_STATE(); @@ -1271,7 +1295,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { END_STATE(); case 74: ACCEPT_TOKEN(aux_sym_identifier_token1); - if (lookahead == 'e') ADVANCE(37); + if (lookahead == 'e') ADVANCE(38); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'z')) ADVANCE(125); END_STATE(); @@ -1357,7 +1381,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { END_STATE(); case 88: ACCEPT_TOKEN(aux_sym_identifier_token1); - if (lookahead == 'n') ADVANCE(35); + if (lookahead == 'n') ADVANCE(36); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'z')) ADVANCE(125); END_STATE(); @@ -1497,7 +1521,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { END_STATE(); case 111: ACCEPT_TOKEN(aux_sym_identifier_token1); - if (lookahead == 's') ADVANCE(43); + if (lookahead == 's') ADVANCE(44); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'z')) ADVANCE(125); END_STATE(); @@ -1527,13 +1551,13 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { END_STATE(); case 116: ACCEPT_TOKEN(aux_sym_identifier_token1); - if (lookahead == 't') ADVANCE(44); + if (lookahead == 't') ADVANCE(45); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'z')) ADVANCE(125); END_STATE(); case 117: ACCEPT_TOKEN(aux_sym_identifier_token1); - if (lookahead == 't') ADVANCE(45); + if (lookahead == 't') ADVANCE(46); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'z')) ADVANCE(125); END_STATE(); @@ -1658,18 +1682,18 @@ static const TSLexMode ts_lex_modes[STATE_COUNT] = { [43] = {.lex_state = 25}, [44] = {.lex_state = 25}, [45] = {.lex_state = 25}, - [46] = {.lex_state = 25}, + [46] = {.lex_state = 1}, [47] = {.lex_state = 1}, [48] = {.lex_state = 1}, - [49] = {.lex_state = 1}, + [49] = {.lex_state = 25}, [50] = {.lex_state = 1}, [51] = {.lex_state = 1}, - [52] = {.lex_state = 1}, - [53] = {.lex_state = 2}, - [54] = {.lex_state = 2}, - [55] = {.lex_state = 1}, - [56] = {.lex_state = 25}, - [57] = {.lex_state = 25}, + [52] = {.lex_state = 25}, + [53] = {.lex_state = 25}, + [54] = {.lex_state = 1}, + [55] = {.lex_state = 2}, + [56] = {.lex_state = 2}, + [57] = {.lex_state = 1}, [58] = {.lex_state = 25}, [59] = {.lex_state = 25}, [60] = {.lex_state = 25}, @@ -1677,83 +1701,89 @@ static const TSLexMode ts_lex_modes[STATE_COUNT] = { [62] = {.lex_state = 25}, [63] = {.lex_state = 25}, [64] = {.lex_state = 1}, - [65] = {.lex_state = 1}, + [65] = {.lex_state = 25}, [66] = {.lex_state = 25}, [67] = {.lex_state = 25}, [68] = {.lex_state = 25}, - [69] = {.lex_state = 25}, + [69] = {.lex_state = 1}, [70] = {.lex_state = 25}, [71] = {.lex_state = 25}, [72] = {.lex_state = 25}, - [73] = {.lex_state = 1}, - [74] = {.lex_state = 1}, + [73] = {.lex_state = 25}, + [74] = {.lex_state = 25}, [75] = {.lex_state = 25}, [76] = {.lex_state = 1}, - [77] = {.lex_state = 1}, + [77] = {.lex_state = 25}, [78] = {.lex_state = 1}, [79] = {.lex_state = 1}, - [80] = {.lex_state = 11}, - [81] = {.lex_state = 11}, - [82] = {.lex_state = 11}, + [80] = {.lex_state = 1}, + [81] = {.lex_state = 1}, + [82] = {.lex_state = 1}, [83] = {.lex_state = 11}, [84] = {.lex_state = 11}, - [85] = {.lex_state = 6}, - [86] = {.lex_state = 6}, - [87] = {.lex_state = 6}, + [85] = {.lex_state = 11}, + [86] = {.lex_state = 11}, + [87] = {.lex_state = 11}, [88] = {.lex_state = 6}, [89] = {.lex_state = 6}, [90] = {.lex_state = 6}, [91] = {.lex_state = 6}, [92] = {.lex_state = 6}, - [93] = {.lex_state = 0}, - [94] = {.lex_state = 0}, - [95] = {.lex_state = 0}, - [96] = {.lex_state = 5}, - [97] = {.lex_state = 5}, - [98] = {.lex_state = 5}, + [93] = {.lex_state = 6}, + [94] = {.lex_state = 6}, + [95] = {.lex_state = 6}, + [96] = {.lex_state = 6}, + [97] = {.lex_state = 6}, + [98] = {.lex_state = 0}, [99] = {.lex_state = 0}, [100] = {.lex_state = 5}, - [101] = {.lex_state = 5}, + [101] = {.lex_state = 0}, [102] = {.lex_state = 5}, [103] = {.lex_state = 5}, [104] = {.lex_state = 5}, - [105] = {.lex_state = 5}, - [106] = {.lex_state = 5}, + [105] = {.lex_state = 0}, + [106] = {.lex_state = 6}, [107] = {.lex_state = 5}, [108] = {.lex_state = 5}, [109] = {.lex_state = 5}, [110] = {.lex_state = 5}, [111] = {.lex_state = 5}, [112] = {.lex_state = 5}, - [113] = {.lex_state = 0}, + [113] = {.lex_state = 5}, [114] = {.lex_state = 5}, - [115] = {.lex_state = 0}, + [115] = {.lex_state = 5}, [116] = {.lex_state = 5}, [117] = {.lex_state = 0}, - [118] = {.lex_state = 0}, - [119] = {.lex_state = 0}, - [120] = {.lex_state = 5}, - [121] = {.lex_state = 0}, + [118] = {.lex_state = 5}, + [119] = {.lex_state = 5}, + [120] = {.lex_state = 0}, + [121] = {.lex_state = 5}, [122] = {.lex_state = 5}, [123] = {.lex_state = 0}, [124] = {.lex_state = 0}, - [125] = {.lex_state = 5}, - [126] = {.lex_state = 0}, - [127] = {.lex_state = 5}, - [128] = {.lex_state = 0}, + [125] = {.lex_state = 0}, + [126] = {.lex_state = 5}, + [127] = {.lex_state = 0}, + [128] = {.lex_state = 5}, [129] = {.lex_state = 0}, - [130] = {.lex_state = 0}, + [130] = {.lex_state = 5}, [131] = {.lex_state = 0}, [132] = {.lex_state = 0}, - [133] = {.lex_state = 0}, - [134] = {.lex_state = 0}, + [133] = {.lex_state = 5}, + [134] = {.lex_state = 29}, [135] = {.lex_state = 0}, [136] = {.lex_state = 0}, - [137] = {.lex_state = 29}, - [138] = {.lex_state = 5}, + [137] = {.lex_state = 0}, + [138] = {.lex_state = 0}, [139] = {.lex_state = 0}, [140] = {.lex_state = 0}, [141] = {.lex_state = 0}, + [142] = {.lex_state = 0}, + [143] = {.lex_state = 0}, + [144] = {.lex_state = 5}, + [145] = {.lex_state = 0}, + [146] = {.lex_state = 0}, + [147] = {.lex_state = 0}, }; static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { @@ -1764,6 +1794,7 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [anon_sym_LBRACE] = ACTIONS(1), [anon_sym_RBRACE] = ACTIONS(1), [anon_sym_import] = ACTIONS(1), + [anon_sym_DOT] = ACTIONS(1), [anon_sym_extern] = ACTIONS(1), [anon_sym_pure] = ACTIONS(1), [anon_sym_fn] = ACTIONS(1), @@ -1772,7 +1803,6 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [anon_sym_class] = ACTIONS(1), [anon_sym_print] = ACTIONS(1), [anon_sym_assert] = ACTIONS(1), - [anon_sym_DOT] = ACTIONS(1), [anon_sym_vec] = ACTIONS(1), [anon_sym_map] = ACTIONS(1), [anon_sym_LT] = ACTIONS(1), @@ -1800,32 +1830,32 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [anon_sym_error] = ACTIONS(1), }, [1] = { - [sym_source_file] = STATE(139), - [sym_doc_comment] = STATE(3), - [sym_statement] = STATE(3), - [sym_block] = STATE(66), - [sym_import] = STATE(66), - [sym_qualifier] = STATE(100), - [sym_qualifier_list] = STATE(120), - [sym_function_declaration] = STATE(66), - [sym_class_declaration] = STATE(66), - [sym_print] = STATE(66), - [sym_assert] = STATE(66), - [sym_expression] = STATE(37), - [sym_parenthesized_expression] = STATE(22), - [sym_access_list] = STATE(22), - [sym_call] = STATE(22), - [sym_literal] = STATE(22), - [sym_var_declaration] = STATE(57), - [sym_assignment] = STATE(66), - [sym_return] = STATE(66), - [sym_binary_expression] = STATE(22), - [sym_vec] = STATE(22), - [sym_map] = STATE(22), + [sym_source_file] = STATE(145), + [sym_doc_comment] = STATE(2), + [sym_statement] = STATE(2), + [sym_block] = STATE(71), + [sym_import] = STATE(71), + [sym_qualifier] = STATE(115), + [sym_qualifier_list] = STATE(128), + [sym_function_declaration] = STATE(71), + [sym_class_declaration] = STATE(71), + [sym_print] = STATE(71), + [sym_assert] = STATE(71), + [sym_expression] = STATE(38), + [sym_parenthesized_expression] = STATE(26), + [sym_access_list] = STATE(26), + [sym_call] = STATE(26), + [sym_literal] = STATE(26), + [sym_var_declaration] = STATE(53), + [sym_assignment] = STATE(71), + [sym_return] = STATE(71), + [sym_binary_expression] = STATE(26), + [sym_vec] = STATE(26), + [sym_map] = STATE(26), [sym_primitive_type] = STATE(19), - [sym_identifier] = STATE(33), - [sym_bool] = STATE(29), - [aux_sym_source_file_repeat1] = STATE(3), + [sym_identifier] = STATE(34), + [sym_bool] = STATE(31), + [aux_sym_source_file_repeat1] = STATE(2), [ts_builtin_sym_end] = ACTIONS(3), [sym_comment] = ACTIONS(5), [anon_sym_POUND_POUND] = ACTIONS(7), @@ -1853,85 +1883,33 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [anon_sym_error] = ACTIONS(35), }, [2] = { - [sym_doc_comment] = STATE(2), - [sym_statement] = STATE(2), - [sym_block] = STATE(66), - [sym_import] = STATE(66), - [sym_qualifier] = STATE(100), - [sym_qualifier_list] = STATE(120), - [sym_function_declaration] = STATE(66), - [sym_class_declaration] = STATE(66), - [sym_print] = STATE(66), - [sym_assert] = STATE(66), - [sym_expression] = STATE(37), - [sym_parenthesized_expression] = STATE(22), - [sym_access_list] = STATE(22), - [sym_call] = STATE(22), - [sym_literal] = STATE(22), - [sym_var_declaration] = STATE(57), - [sym_assignment] = STATE(66), - [sym_return] = STATE(66), - [sym_binary_expression] = STATE(22), - [sym_vec] = STATE(22), - [sym_map] = STATE(22), + [sym_doc_comment] = STATE(3), + [sym_statement] = STATE(3), + [sym_block] = STATE(71), + [sym_import] = STATE(71), + [sym_qualifier] = STATE(115), + [sym_qualifier_list] = STATE(128), + [sym_function_declaration] = STATE(71), + [sym_class_declaration] = STATE(71), + [sym_print] = STATE(71), + [sym_assert] = STATE(71), + [sym_expression] = STATE(38), + [sym_parenthesized_expression] = STATE(26), + [sym_access_list] = STATE(26), + [sym_call] = STATE(26), + [sym_literal] = STATE(26), + [sym_var_declaration] = STATE(53), + [sym_assignment] = STATE(71), + [sym_return] = STATE(71), + [sym_binary_expression] = STATE(26), + [sym_vec] = STATE(26), + [sym_map] = STATE(26), [sym_primitive_type] = STATE(19), - [sym_identifier] = STATE(33), - [sym_bool] = STATE(29), - [aux_sym_source_file_repeat1] = STATE(2), + [sym_identifier] = STATE(34), + [sym_bool] = STATE(31), + [aux_sym_source_file_repeat1] = STATE(3), [ts_builtin_sym_end] = ACTIONS(37), [sym_comment] = ACTIONS(39), - [anon_sym_POUND_POUND] = ACTIONS(42), - [anon_sym_LBRACE] = ACTIONS(45), - [anon_sym_import] = ACTIONS(48), - [anon_sym_extern] = ACTIONS(51), - [anon_sym_pure] = ACTIONS(51), - [anon_sym_fn] = ACTIONS(54), - [anon_sym_LPAREN] = ACTIONS(57), - [anon_sym_class] = ACTIONS(60), - [anon_sym_print] = ACTIONS(63), - [anon_sym_assert] = ACTIONS(66), - [anon_sym_return] = ACTIONS(69), - [anon_sym_LBRACK] = ACTIONS(72), - [anon_sym_any] = ACTIONS(75), - [anon_sym_int] = ACTIONS(75), - [anon_sym_str] = ACTIONS(75), - [anon_sym_bool] = ACTIONS(75), - [anon_sym_void] = ACTIONS(75), - [aux_sym_identifier_token1] = ACTIONS(78), - [sym_number] = ACTIONS(81), - [sym_string] = ACTIONS(81), - [anon_sym_true] = ACTIONS(84), - [anon_sym_false] = ACTIONS(84), - [anon_sym_error] = ACTIONS(84), - }, - [3] = { - [sym_doc_comment] = STATE(2), - [sym_statement] = STATE(2), - [sym_block] = STATE(66), - [sym_import] = STATE(66), - [sym_qualifier] = STATE(100), - [sym_qualifier_list] = STATE(120), - [sym_function_declaration] = STATE(66), - [sym_class_declaration] = STATE(66), - [sym_print] = STATE(66), - [sym_assert] = STATE(66), - [sym_expression] = STATE(37), - [sym_parenthesized_expression] = STATE(22), - [sym_access_list] = STATE(22), - [sym_call] = STATE(22), - [sym_literal] = STATE(22), - [sym_var_declaration] = STATE(57), - [sym_assignment] = STATE(66), - [sym_return] = STATE(66), - [sym_binary_expression] = STATE(22), - [sym_vec] = STATE(22), - [sym_map] = STATE(22), - [sym_primitive_type] = STATE(19), - [sym_identifier] = STATE(33), - [sym_bool] = STATE(29), - [aux_sym_source_file_repeat1] = STATE(2), - [ts_builtin_sym_end] = ACTIONS(87), - [sym_comment] = ACTIONS(89), [anon_sym_POUND_POUND] = ACTIONS(7), [anon_sym_LBRACE] = ACTIONS(9), [anon_sym_import] = ACTIONS(11), @@ -1956,33 +1934,85 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [anon_sym_false] = ACTIONS(35), [anon_sym_error] = ACTIONS(35), }, + [3] = { + [sym_doc_comment] = STATE(3), + [sym_statement] = STATE(3), + [sym_block] = STATE(71), + [sym_import] = STATE(71), + [sym_qualifier] = STATE(115), + [sym_qualifier_list] = STATE(128), + [sym_function_declaration] = STATE(71), + [sym_class_declaration] = STATE(71), + [sym_print] = STATE(71), + [sym_assert] = STATE(71), + [sym_expression] = STATE(38), + [sym_parenthesized_expression] = STATE(26), + [sym_access_list] = STATE(26), + [sym_call] = STATE(26), + [sym_literal] = STATE(26), + [sym_var_declaration] = STATE(53), + [sym_assignment] = STATE(71), + [sym_return] = STATE(71), + [sym_binary_expression] = STATE(26), + [sym_vec] = STATE(26), + [sym_map] = STATE(26), + [sym_primitive_type] = STATE(19), + [sym_identifier] = STATE(34), + [sym_bool] = STATE(31), + [aux_sym_source_file_repeat1] = STATE(3), + [ts_builtin_sym_end] = ACTIONS(41), + [sym_comment] = ACTIONS(43), + [anon_sym_POUND_POUND] = ACTIONS(46), + [anon_sym_LBRACE] = ACTIONS(49), + [anon_sym_import] = ACTIONS(52), + [anon_sym_extern] = ACTIONS(55), + [anon_sym_pure] = ACTIONS(55), + [anon_sym_fn] = ACTIONS(58), + [anon_sym_LPAREN] = ACTIONS(61), + [anon_sym_class] = ACTIONS(64), + [anon_sym_print] = ACTIONS(67), + [anon_sym_assert] = ACTIONS(70), + [anon_sym_return] = ACTIONS(73), + [anon_sym_LBRACK] = ACTIONS(76), + [anon_sym_any] = ACTIONS(79), + [anon_sym_int] = ACTIONS(79), + [anon_sym_str] = ACTIONS(79), + [anon_sym_bool] = ACTIONS(79), + [anon_sym_void] = ACTIONS(79), + [aux_sym_identifier_token1] = ACTIONS(82), + [sym_number] = ACTIONS(85), + [sym_string] = ACTIONS(85), + [anon_sym_true] = ACTIONS(88), + [anon_sym_false] = ACTIONS(88), + [anon_sym_error] = ACTIONS(88), + }, [4] = { - [sym_statement] = STATE(7), - [sym_block] = STATE(66), - [sym_import] = STATE(66), - [sym_qualifier] = STATE(100), - [sym_qualifier_list] = STATE(120), - [sym_function_declaration] = STATE(66), - [sym_class_declaration] = STATE(66), - [sym_print] = STATE(66), - [sym_assert] = STATE(66), - [sym_expression] = STATE(46), - [sym_parenthesized_expression] = STATE(22), - [sym_access_list] = STATE(22), - [sym_call] = STATE(22), - [sym_literal] = STATE(22), - [sym_var_declaration] = STATE(57), - [sym_assignment] = STATE(66), - [sym_return] = STATE(66), - [sym_binary_expression] = STATE(22), - [sym_vec] = STATE(22), - [sym_map_item] = STATE(119), - [sym_map_item_list] = STATE(134), - [sym_map] = STATE(22), + [sym_statement] = STATE(5), + [sym_block] = STATE(71), + [sym_import] = STATE(71), + [sym_qualifier] = STATE(115), + [sym_qualifier_list] = STATE(128), + [sym_function_declaration] = STATE(71), + [sym_class_declaration] = STATE(71), + [sym_print] = STATE(71), + [sym_assert] = STATE(71), + [sym_expression] = STATE(49), + [sym_parenthesized_expression] = STATE(26), + [sym_access_list] = STATE(26), + [sym_call] = STATE(26), + [sym_literal] = STATE(26), + [sym_var_declaration] = STATE(53), + [sym_assignment] = STATE(71), + [sym_return] = STATE(71), + [sym_binary_expression] = STATE(26), + [sym_vec] = STATE(26), + [sym_map_item] = STATE(127), + [sym_map_item_list] = STATE(142), + [sym_map] = STATE(26), [sym_primitive_type] = STATE(19), - [sym_identifier] = STATE(33), - [sym_bool] = STATE(29), - [aux_sym_block_repeat1] = STATE(7), + [sym_identifier] = STATE(34), + [sym_bool] = STATE(31), + [aux_sym_block_repeat1] = STATE(5), [anon_sym_LBRACE] = ACTIONS(9), [anon_sym_RBRACE] = ACTIONS(91), [anon_sym_import] = ACTIONS(11), @@ -2008,30 +2038,30 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [anon_sym_error] = ACTIONS(35), }, [5] = { - [sym_statement] = STATE(8), - [sym_block] = STATE(66), - [sym_import] = STATE(66), - [sym_qualifier] = STATE(100), - [sym_qualifier_list] = STATE(120), - [sym_function_declaration] = STATE(66), - [sym_class_declaration] = STATE(66), - [sym_print] = STATE(66), - [sym_assert] = STATE(66), - [sym_expression] = STATE(37), - [sym_parenthesized_expression] = STATE(22), - [sym_access_list] = STATE(22), - [sym_call] = STATE(22), - [sym_literal] = STATE(22), - [sym_var_declaration] = STATE(57), - [sym_assignment] = STATE(66), - [sym_return] = STATE(66), - [sym_binary_expression] = STATE(22), - [sym_vec] = STATE(22), - [sym_map] = STATE(22), + [sym_statement] = STATE(10), + [sym_block] = STATE(71), + [sym_import] = STATE(71), + [sym_qualifier] = STATE(115), + [sym_qualifier_list] = STATE(128), + [sym_function_declaration] = STATE(71), + [sym_class_declaration] = STATE(71), + [sym_print] = STATE(71), + [sym_assert] = STATE(71), + [sym_expression] = STATE(38), + [sym_parenthesized_expression] = STATE(26), + [sym_access_list] = STATE(26), + [sym_call] = STATE(26), + [sym_literal] = STATE(26), + [sym_var_declaration] = STATE(53), + [sym_assignment] = STATE(71), + [sym_return] = STATE(71), + [sym_binary_expression] = STATE(26), + [sym_vec] = STATE(26), + [sym_map] = STATE(26), [sym_primitive_type] = STATE(19), - [sym_identifier] = STATE(33), - [sym_bool] = STATE(29), - [aux_sym_block_repeat1] = STATE(8), + [sym_identifier] = STATE(34), + [sym_bool] = STATE(31), + [aux_sym_block_repeat1] = STATE(10), [anon_sym_LBRACE] = ACTIONS(9), [anon_sym_RBRACE] = ACTIONS(93), [anon_sym_import] = ACTIONS(11), @@ -2058,28 +2088,28 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { }, [6] = { [sym_statement] = STATE(10), - [sym_block] = STATE(66), - [sym_import] = STATE(66), - [sym_qualifier] = STATE(100), - [sym_qualifier_list] = STATE(120), - [sym_function_declaration] = STATE(66), - [sym_class_declaration] = STATE(66), - [sym_print] = STATE(66), - [sym_assert] = STATE(66), - [sym_expression] = STATE(37), - [sym_parenthesized_expression] = STATE(22), - [sym_access_list] = STATE(22), - [sym_call] = STATE(22), - [sym_literal] = STATE(22), - [sym_var_declaration] = STATE(57), - [sym_assignment] = STATE(66), - [sym_return] = STATE(66), - [sym_binary_expression] = STATE(22), - [sym_vec] = STATE(22), - [sym_map] = STATE(22), + [sym_block] = STATE(71), + [sym_import] = STATE(71), + [sym_qualifier] = STATE(115), + [sym_qualifier_list] = STATE(128), + [sym_function_declaration] = STATE(71), + [sym_class_declaration] = STATE(71), + [sym_print] = STATE(71), + [sym_assert] = STATE(71), + [sym_expression] = STATE(38), + [sym_parenthesized_expression] = STATE(26), + [sym_access_list] = STATE(26), + [sym_call] = STATE(26), + [sym_literal] = STATE(26), + [sym_var_declaration] = STATE(53), + [sym_assignment] = STATE(71), + [sym_return] = STATE(71), + [sym_binary_expression] = STATE(26), + [sym_vec] = STATE(26), + [sym_map] = STATE(26), [sym_primitive_type] = STATE(19), - [sym_identifier] = STATE(33), - [sym_bool] = STATE(29), + [sym_identifier] = STATE(34), + [sym_bool] = STATE(31), [aux_sym_block_repeat1] = STATE(10), [anon_sym_LBRACE] = ACTIONS(9), [anon_sym_RBRACE] = ACTIONS(95), @@ -2106,30 +2136,30 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [anon_sym_error] = ACTIONS(35), }, [7] = { - [sym_statement] = STATE(10), - [sym_block] = STATE(66), - [sym_import] = STATE(66), - [sym_qualifier] = STATE(100), - [sym_qualifier_list] = STATE(120), - [sym_function_declaration] = STATE(66), - [sym_class_declaration] = STATE(66), - [sym_print] = STATE(66), - [sym_assert] = STATE(66), - [sym_expression] = STATE(37), - [sym_parenthesized_expression] = STATE(22), - [sym_access_list] = STATE(22), - [sym_call] = STATE(22), - [sym_literal] = STATE(22), - [sym_var_declaration] = STATE(57), - [sym_assignment] = STATE(66), - [sym_return] = STATE(66), - [sym_binary_expression] = STATE(22), - [sym_vec] = STATE(22), - [sym_map] = STATE(22), + [sym_statement] = STATE(6), + [sym_block] = STATE(71), + [sym_import] = STATE(71), + [sym_qualifier] = STATE(115), + [sym_qualifier_list] = STATE(128), + [sym_function_declaration] = STATE(71), + [sym_class_declaration] = STATE(71), + [sym_print] = STATE(71), + [sym_assert] = STATE(71), + [sym_expression] = STATE(38), + [sym_parenthesized_expression] = STATE(26), + [sym_access_list] = STATE(26), + [sym_call] = STATE(26), + [sym_literal] = STATE(26), + [sym_var_declaration] = STATE(53), + [sym_assignment] = STATE(71), + [sym_return] = STATE(71), + [sym_binary_expression] = STATE(26), + [sym_vec] = STATE(26), + [sym_map] = STATE(26), [sym_primitive_type] = STATE(19), - [sym_identifier] = STATE(33), - [sym_bool] = STATE(29), - [aux_sym_block_repeat1] = STATE(10), + [sym_identifier] = STATE(34), + [sym_bool] = STATE(31), + [aux_sym_block_repeat1] = STATE(6), [anon_sym_LBRACE] = ACTIONS(9), [anon_sym_RBRACE] = ACTIONS(97), [anon_sym_import] = ACTIONS(11), @@ -2156,28 +2186,28 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { }, [8] = { [sym_statement] = STATE(10), - [sym_block] = STATE(66), - [sym_import] = STATE(66), - [sym_qualifier] = STATE(100), - [sym_qualifier_list] = STATE(120), - [sym_function_declaration] = STATE(66), - [sym_class_declaration] = STATE(66), - [sym_print] = STATE(66), - [sym_assert] = STATE(66), - [sym_expression] = STATE(37), - [sym_parenthesized_expression] = STATE(22), - [sym_access_list] = STATE(22), - [sym_call] = STATE(22), - [sym_literal] = STATE(22), - [sym_var_declaration] = STATE(57), - [sym_assignment] = STATE(66), - [sym_return] = STATE(66), - [sym_binary_expression] = STATE(22), - [sym_vec] = STATE(22), - [sym_map] = STATE(22), + [sym_block] = STATE(71), + [sym_import] = STATE(71), + [sym_qualifier] = STATE(115), + [sym_qualifier_list] = STATE(128), + [sym_function_declaration] = STATE(71), + [sym_class_declaration] = STATE(71), + [sym_print] = STATE(71), + [sym_assert] = STATE(71), + [sym_expression] = STATE(38), + [sym_parenthesized_expression] = STATE(26), + [sym_access_list] = STATE(26), + [sym_call] = STATE(26), + [sym_literal] = STATE(26), + [sym_var_declaration] = STATE(53), + [sym_assignment] = STATE(71), + [sym_return] = STATE(71), + [sym_binary_expression] = STATE(26), + [sym_vec] = STATE(26), + [sym_map] = STATE(26), [sym_primitive_type] = STATE(19), - [sym_identifier] = STATE(33), - [sym_bool] = STATE(29), + [sym_identifier] = STATE(34), + [sym_bool] = STATE(31), [aux_sym_block_repeat1] = STATE(10), [anon_sym_LBRACE] = ACTIONS(9), [anon_sym_RBRACE] = ACTIONS(99), @@ -2204,30 +2234,30 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [anon_sym_error] = ACTIONS(35), }, [9] = { - [sym_statement] = STATE(6), - [sym_block] = STATE(66), - [sym_import] = STATE(66), - [sym_qualifier] = STATE(100), - [sym_qualifier_list] = STATE(120), - [sym_function_declaration] = STATE(66), - [sym_class_declaration] = STATE(66), - [sym_print] = STATE(66), - [sym_assert] = STATE(66), - [sym_expression] = STATE(37), - [sym_parenthesized_expression] = STATE(22), - [sym_access_list] = STATE(22), - [sym_call] = STATE(22), - [sym_literal] = STATE(22), - [sym_var_declaration] = STATE(57), - [sym_assignment] = STATE(66), - [sym_return] = STATE(66), - [sym_binary_expression] = STATE(22), - [sym_vec] = STATE(22), - [sym_map] = STATE(22), + [sym_statement] = STATE(8), + [sym_block] = STATE(71), + [sym_import] = STATE(71), + [sym_qualifier] = STATE(115), + [sym_qualifier_list] = STATE(128), + [sym_function_declaration] = STATE(71), + [sym_class_declaration] = STATE(71), + [sym_print] = STATE(71), + [sym_assert] = STATE(71), + [sym_expression] = STATE(38), + [sym_parenthesized_expression] = STATE(26), + [sym_access_list] = STATE(26), + [sym_call] = STATE(26), + [sym_literal] = STATE(26), + [sym_var_declaration] = STATE(53), + [sym_assignment] = STATE(71), + [sym_return] = STATE(71), + [sym_binary_expression] = STATE(26), + [sym_vec] = STATE(26), + [sym_map] = STATE(26), [sym_primitive_type] = STATE(19), - [sym_identifier] = STATE(33), - [sym_bool] = STATE(29), - [aux_sym_block_repeat1] = STATE(6), + [sym_identifier] = STATE(34), + [sym_bool] = STATE(31), + [aux_sym_block_repeat1] = STATE(8), [anon_sym_LBRACE] = ACTIONS(9), [anon_sym_RBRACE] = ACTIONS(101), [anon_sym_import] = ACTIONS(11), @@ -2254,28 +2284,28 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { }, [10] = { [sym_statement] = STATE(10), - [sym_block] = STATE(66), - [sym_import] = STATE(66), - [sym_qualifier] = STATE(100), - [sym_qualifier_list] = STATE(120), - [sym_function_declaration] = STATE(66), - [sym_class_declaration] = STATE(66), - [sym_print] = STATE(66), - [sym_assert] = STATE(66), - [sym_expression] = STATE(37), - [sym_parenthesized_expression] = STATE(22), - [sym_access_list] = STATE(22), - [sym_call] = STATE(22), - [sym_literal] = STATE(22), - [sym_var_declaration] = STATE(57), - [sym_assignment] = STATE(66), - [sym_return] = STATE(66), - [sym_binary_expression] = STATE(22), - [sym_vec] = STATE(22), - [sym_map] = STATE(22), + [sym_block] = STATE(71), + [sym_import] = STATE(71), + [sym_qualifier] = STATE(115), + [sym_qualifier_list] = STATE(128), + [sym_function_declaration] = STATE(71), + [sym_class_declaration] = STATE(71), + [sym_print] = STATE(71), + [sym_assert] = STATE(71), + [sym_expression] = STATE(38), + [sym_parenthesized_expression] = STATE(26), + [sym_access_list] = STATE(26), + [sym_call] = STATE(26), + [sym_literal] = STATE(26), + [sym_var_declaration] = STATE(53), + [sym_assignment] = STATE(71), + [sym_return] = STATE(71), + [sym_binary_expression] = STATE(26), + [sym_vec] = STATE(26), + [sym_map] = STATE(26), [sym_primitive_type] = STATE(19), - [sym_identifier] = STATE(33), - [sym_bool] = STATE(29), + [sym_identifier] = STATE(34), + [sym_bool] = STATE(31), [aux_sym_block_repeat1] = STATE(10), [anon_sym_LBRACE] = ACTIONS(103), [anon_sym_RBRACE] = ACTIONS(106), @@ -2302,29 +2332,29 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [anon_sym_error] = ACTIONS(144), }, [11] = { - [sym_statement] = STATE(71), - [sym_block] = STATE(66), - [sym_import] = STATE(66), - [sym_qualifier] = STATE(100), - [sym_qualifier_list] = STATE(120), - [sym_function_declaration] = STATE(66), - [sym_class_declaration] = STATE(66), - [sym_print] = STATE(66), - [sym_assert] = STATE(66), - [sym_expression] = STATE(37), - [sym_parenthesized_expression] = STATE(22), - [sym_access_list] = STATE(22), - [sym_call] = STATE(22), - [sym_literal] = STATE(22), - [sym_var_declaration] = STATE(57), - [sym_assignment] = STATE(66), - [sym_return] = STATE(66), - [sym_binary_expression] = STATE(22), - [sym_vec] = STATE(22), - [sym_map] = STATE(22), + [sym_statement] = STATE(72), + [sym_block] = STATE(71), + [sym_import] = STATE(71), + [sym_qualifier] = STATE(115), + [sym_qualifier_list] = STATE(128), + [sym_function_declaration] = STATE(71), + [sym_class_declaration] = STATE(71), + [sym_print] = STATE(71), + [sym_assert] = STATE(71), + [sym_expression] = STATE(38), + [sym_parenthesized_expression] = STATE(26), + [sym_access_list] = STATE(26), + [sym_call] = STATE(26), + [sym_literal] = STATE(26), + [sym_var_declaration] = STATE(53), + [sym_assignment] = STATE(71), + [sym_return] = STATE(71), + [sym_binary_expression] = STATE(26), + [sym_vec] = STATE(26), + [sym_map] = STATE(26), [sym_primitive_type] = STATE(19), - [sym_identifier] = STATE(33), - [sym_bool] = STATE(29), + [sym_identifier] = STATE(34), + [sym_bool] = STATE(31), [anon_sym_LBRACE] = ACTIONS(9), [anon_sym_import] = ACTIONS(11), [anon_sym_extern] = ACTIONS(13), @@ -2349,29 +2379,29 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [anon_sym_error] = ACTIONS(35), }, [12] = { - [sym_statement] = STATE(58), - [sym_block] = STATE(66), - [sym_import] = STATE(66), - [sym_qualifier] = STATE(100), - [sym_qualifier_list] = STATE(120), - [sym_function_declaration] = STATE(66), - [sym_class_declaration] = STATE(66), - [sym_print] = STATE(66), - [sym_assert] = STATE(66), - [sym_expression] = STATE(37), - [sym_parenthesized_expression] = STATE(22), - [sym_access_list] = STATE(22), - [sym_call] = STATE(22), - [sym_literal] = STATE(22), - [sym_var_declaration] = STATE(57), - [sym_assignment] = STATE(66), - [sym_return] = STATE(66), - [sym_binary_expression] = STATE(22), - [sym_vec] = STATE(22), - [sym_map] = STATE(22), + [sym_statement] = STATE(67), + [sym_block] = STATE(71), + [sym_import] = STATE(71), + [sym_qualifier] = STATE(115), + [sym_qualifier_list] = STATE(128), + [sym_function_declaration] = STATE(71), + [sym_class_declaration] = STATE(71), + [sym_print] = STATE(71), + [sym_assert] = STATE(71), + [sym_expression] = STATE(38), + [sym_parenthesized_expression] = STATE(26), + [sym_access_list] = STATE(26), + [sym_call] = STATE(26), + [sym_literal] = STATE(26), + [sym_var_declaration] = STATE(53), + [sym_assignment] = STATE(71), + [sym_return] = STATE(71), + [sym_binary_expression] = STATE(26), + [sym_vec] = STATE(26), + [sym_map] = STATE(26), [sym_primitive_type] = STATE(19), - [sym_identifier] = STATE(33), - [sym_bool] = STATE(29), + [sym_identifier] = STATE(34), + [sym_bool] = STATE(31), [anon_sym_LBRACE] = ACTIONS(9), [anon_sym_import] = ACTIONS(11), [anon_sym_extern] = ACTIONS(13), @@ -2396,29 +2426,29 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [anon_sym_error] = ACTIONS(35), }, [13] = { - [sym_statement] = STATE(60), - [sym_block] = STATE(66), - [sym_import] = STATE(66), - [sym_qualifier] = STATE(100), - [sym_qualifier_list] = STATE(120), - [sym_function_declaration] = STATE(66), - [sym_class_declaration] = STATE(66), - [sym_print] = STATE(66), - [sym_assert] = STATE(66), - [sym_expression] = STATE(37), - [sym_parenthesized_expression] = STATE(22), - [sym_access_list] = STATE(22), - [sym_call] = STATE(22), - [sym_literal] = STATE(22), - [sym_var_declaration] = STATE(57), - [sym_assignment] = STATE(66), - [sym_return] = STATE(66), - [sym_binary_expression] = STATE(22), - [sym_vec] = STATE(22), - [sym_map] = STATE(22), + [sym_statement] = STATE(59), + [sym_block] = STATE(71), + [sym_import] = STATE(71), + [sym_qualifier] = STATE(115), + [sym_qualifier_list] = STATE(128), + [sym_function_declaration] = STATE(71), + [sym_class_declaration] = STATE(71), + [sym_print] = STATE(71), + [sym_assert] = STATE(71), + [sym_expression] = STATE(38), + [sym_parenthesized_expression] = STATE(26), + [sym_access_list] = STATE(26), + [sym_call] = STATE(26), + [sym_literal] = STATE(26), + [sym_var_declaration] = STATE(53), + [sym_assignment] = STATE(71), + [sym_return] = STATE(71), + [sym_binary_expression] = STATE(26), + [sym_vec] = STATE(26), + [sym_map] = STATE(26), [sym_primitive_type] = STATE(19), - [sym_identifier] = STATE(33), - [sym_bool] = STATE(29), + [sym_identifier] = STATE(34), + [sym_bool] = STATE(31), [anon_sym_LBRACE] = ACTIONS(9), [anon_sym_import] = ACTIONS(11), [anon_sym_extern] = ACTIONS(13), @@ -2443,29 +2473,29 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [anon_sym_error] = ACTIONS(35), }, [14] = { - [sym_statement] = STATE(72), - [sym_block] = STATE(66), - [sym_import] = STATE(66), - [sym_qualifier] = STATE(100), - [sym_qualifier_list] = STATE(120), - [sym_function_declaration] = STATE(66), - [sym_class_declaration] = STATE(66), - [sym_print] = STATE(66), - [sym_assert] = STATE(66), - [sym_expression] = STATE(37), - [sym_parenthesized_expression] = STATE(22), - [sym_access_list] = STATE(22), - [sym_call] = STATE(22), - [sym_literal] = STATE(22), - [sym_var_declaration] = STATE(57), - [sym_assignment] = STATE(66), - [sym_return] = STATE(66), - [sym_binary_expression] = STATE(22), - [sym_vec] = STATE(22), - [sym_map] = STATE(22), + [sym_statement] = STATE(62), + [sym_block] = STATE(71), + [sym_import] = STATE(71), + [sym_qualifier] = STATE(115), + [sym_qualifier_list] = STATE(128), + [sym_function_declaration] = STATE(71), + [sym_class_declaration] = STATE(71), + [sym_print] = STATE(71), + [sym_assert] = STATE(71), + [sym_expression] = STATE(38), + [sym_parenthesized_expression] = STATE(26), + [sym_access_list] = STATE(26), + [sym_call] = STATE(26), + [sym_literal] = STATE(26), + [sym_var_declaration] = STATE(53), + [sym_assignment] = STATE(71), + [sym_return] = STATE(71), + [sym_binary_expression] = STATE(26), + [sym_vec] = STATE(26), + [sym_map] = STATE(26), [sym_primitive_type] = STATE(19), - [sym_identifier] = STATE(33), - [sym_bool] = STATE(29), + [sym_identifier] = STATE(34), + [sym_bool] = STATE(31), [anon_sym_LBRACE] = ACTIONS(9), [anon_sym_import] = ACTIONS(11), [anon_sym_extern] = ACTIONS(13), @@ -2490,29 +2520,29 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [anon_sym_error] = ACTIONS(35), }, [15] = { - [sym_statement] = STATE(59), - [sym_block] = STATE(66), - [sym_import] = STATE(66), - [sym_qualifier] = STATE(100), - [sym_qualifier_list] = STATE(120), - [sym_function_declaration] = STATE(66), - [sym_class_declaration] = STATE(66), - [sym_print] = STATE(66), - [sym_assert] = STATE(66), - [sym_expression] = STATE(37), - [sym_parenthesized_expression] = STATE(22), - [sym_access_list] = STATE(22), - [sym_call] = STATE(22), - [sym_literal] = STATE(22), - [sym_var_declaration] = STATE(57), - [sym_assignment] = STATE(66), - [sym_return] = STATE(66), - [sym_binary_expression] = STATE(22), - [sym_vec] = STATE(22), - [sym_map] = STATE(22), + [sym_statement] = STATE(66), + [sym_block] = STATE(71), + [sym_import] = STATE(71), + [sym_qualifier] = STATE(115), + [sym_qualifier_list] = STATE(128), + [sym_function_declaration] = STATE(71), + [sym_class_declaration] = STATE(71), + [sym_print] = STATE(71), + [sym_assert] = STATE(71), + [sym_expression] = STATE(38), + [sym_parenthesized_expression] = STATE(26), + [sym_access_list] = STATE(26), + [sym_call] = STATE(26), + [sym_literal] = STATE(26), + [sym_var_declaration] = STATE(53), + [sym_assignment] = STATE(71), + [sym_return] = STATE(71), + [sym_binary_expression] = STATE(26), + [sym_vec] = STATE(26), + [sym_map] = STATE(26), [sym_primitive_type] = STATE(19), - [sym_identifier] = STATE(33), - [sym_bool] = STATE(29), + [sym_identifier] = STATE(34), + [sym_bool] = STATE(31), [anon_sym_LBRACE] = ACTIONS(9), [anon_sym_import] = ACTIONS(11), [anon_sym_extern] = ACTIONS(13), @@ -2537,29 +2567,29 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [anon_sym_error] = ACTIONS(35), }, [16] = { - [sym_statement] = STATE(67), - [sym_block] = STATE(66), - [sym_import] = STATE(66), - [sym_qualifier] = STATE(100), - [sym_qualifier_list] = STATE(120), - [sym_function_declaration] = STATE(66), - [sym_class_declaration] = STATE(66), - [sym_print] = STATE(66), - [sym_assert] = STATE(66), - [sym_expression] = STATE(37), - [sym_parenthesized_expression] = STATE(22), - [sym_access_list] = STATE(22), - [sym_call] = STATE(22), - [sym_literal] = STATE(22), - [sym_var_declaration] = STATE(57), - [sym_assignment] = STATE(66), - [sym_return] = STATE(66), - [sym_binary_expression] = STATE(22), - [sym_vec] = STATE(22), - [sym_map] = STATE(22), + [sym_statement] = STATE(65), + [sym_block] = STATE(71), + [sym_import] = STATE(71), + [sym_qualifier] = STATE(115), + [sym_qualifier_list] = STATE(128), + [sym_function_declaration] = STATE(71), + [sym_class_declaration] = STATE(71), + [sym_print] = STATE(71), + [sym_assert] = STATE(71), + [sym_expression] = STATE(38), + [sym_parenthesized_expression] = STATE(26), + [sym_access_list] = STATE(26), + [sym_call] = STATE(26), + [sym_literal] = STATE(26), + [sym_var_declaration] = STATE(53), + [sym_assignment] = STATE(71), + [sym_return] = STATE(71), + [sym_binary_expression] = STATE(26), + [sym_vec] = STATE(26), + [sym_map] = STATE(26), [sym_primitive_type] = STATE(19), - [sym_identifier] = STATE(33), - [sym_bool] = STATE(29), + [sym_identifier] = STATE(34), + [sym_bool] = STATE(31), [anon_sym_LBRACE] = ACTIONS(9), [anon_sym_import] = ACTIONS(11), [anon_sym_extern] = ACTIONS(13), @@ -2589,9 +2619,9 @@ static const uint16_t ts_small_parse_table[] = { [0] = 6, STATE(19), 1, sym_primitive_type, - STATE(29), 1, + STATE(31), 1, sym_bool, - STATE(42), 1, + STATE(44), 1, sym_expression, ACTIONS(151), 8, ts_builtin_sym_end, @@ -2602,7 +2632,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, sym_number, sym_string, - STATE(22), 8, + STATE(26), 8, sym_parenthesized_expression, sym_access_list, sym_call, @@ -2637,9 +2667,9 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND_POUND, anon_sym_LBRACE, anon_sym_RBRACE, + anon_sym_DOT, anon_sym_LPAREN, anon_sym_RPAREN, - anon_sym_DOT, anon_sym_GT, anon_sym_COMMA, anon_sym_COLON, @@ -2674,9 +2704,9 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND_POUND, anon_sym_LBRACE, anon_sym_RBRACE, + anon_sym_DOT, anon_sym_LPAREN, anon_sym_RPAREN, - anon_sym_DOT, anon_sym_GT, anon_sym_COMMA, anon_sym_COLON, @@ -2711,9 +2741,9 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND_POUND, anon_sym_LBRACE, anon_sym_RBRACE, + anon_sym_DOT, anon_sym_LPAREN, anon_sym_RPAREN, - anon_sym_DOT, anon_sym_COMMA, anon_sym_COLON, anon_sym_PLUS_PLUS, @@ -2746,9 +2776,9 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND_POUND, anon_sym_LBRACE, anon_sym_RBRACE, + anon_sym_DOT, anon_sym_LPAREN, anon_sym_RPAREN, - anon_sym_DOT, anon_sym_COMMA, anon_sym_COLON, anon_sym_PLUS_PLUS, @@ -2781,9 +2811,9 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND_POUND, anon_sym_LBRACE, anon_sym_RBRACE, + anon_sym_DOT, anon_sym_LPAREN, anon_sym_RPAREN, - anon_sym_DOT, anon_sym_COMMA, anon_sym_COLON, anon_sym_PLUS_PLUS, @@ -2816,9 +2846,9 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND_POUND, anon_sym_LBRACE, anon_sym_RBRACE, + anon_sym_DOT, anon_sym_LPAREN, anon_sym_RPAREN, - anon_sym_DOT, anon_sym_COMMA, anon_sym_COLON, anon_sym_PLUS_PLUS, @@ -2851,9 +2881,9 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND_POUND, anon_sym_LBRACE, anon_sym_RBRACE, + anon_sym_DOT, anon_sym_LPAREN, anon_sym_RPAREN, - anon_sym_DOT, anon_sym_COMMA, anon_sym_COLON, anon_sym_PLUS_PLUS, @@ -2886,9 +2916,9 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND_POUND, anon_sym_LBRACE, anon_sym_RBRACE, + anon_sym_DOT, anon_sym_LPAREN, anon_sym_RPAREN, - anon_sym_DOT, anon_sym_COMMA, anon_sym_COLON, anon_sym_PLUS_PLUS, @@ -2921,9 +2951,9 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND_POUND, anon_sym_LBRACE, anon_sym_RBRACE, + anon_sym_DOT, anon_sym_LPAREN, anon_sym_RPAREN, - anon_sym_DOT, anon_sym_COMMA, anon_sym_COLON, anon_sym_PLUS_PLUS, @@ -2956,9 +2986,9 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND_POUND, anon_sym_LBRACE, anon_sym_RBRACE, + anon_sym_DOT, anon_sym_LPAREN, anon_sym_RPAREN, - anon_sym_DOT, anon_sym_COMMA, anon_sym_COLON, anon_sym_PLUS_PLUS, @@ -2991,9 +3021,9 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND_POUND, anon_sym_LBRACE, anon_sym_RBRACE, + anon_sym_DOT, anon_sym_LPAREN, anon_sym_RPAREN, - anon_sym_DOT, anon_sym_COMMA, anon_sym_COLON, anon_sym_PLUS_PLUS, @@ -3026,9 +3056,9 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND_POUND, anon_sym_LBRACE, anon_sym_RBRACE, + anon_sym_DOT, anon_sym_LPAREN, anon_sym_RPAREN, - anon_sym_DOT, anon_sym_COMMA, anon_sym_COLON, anon_sym_PLUS_PLUS, @@ -3061,9 +3091,9 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND_POUND, anon_sym_LBRACE, anon_sym_RBRACE, + anon_sym_DOT, anon_sym_LPAREN, anon_sym_RPAREN, - anon_sym_DOT, anon_sym_COMMA, anon_sym_COLON, anon_sym_PLUS_PLUS, @@ -3096,9 +3126,9 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND_POUND, anon_sym_LBRACE, anon_sym_RBRACE, + anon_sym_DOT, anon_sym_LPAREN, anon_sym_RPAREN, - anon_sym_DOT, anon_sym_COMMA, anon_sym_COLON, anon_sym_PLUS_PLUS, @@ -3131,9 +3161,9 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_POUND_POUND, anon_sym_LBRACE, anon_sym_RBRACE, + anon_sym_DOT, anon_sym_LPAREN, anon_sym_RPAREN, - anon_sym_DOT, anon_sym_COMMA, anon_sym_COLON, anon_sym_PLUS_PLUS, @@ -3159,24 +3189,23 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_true, anon_sym_false, anon_sym_error, - [609] = 4, - ACTIONS(215), 1, - anon_sym_COLON, - ACTIONS(217), 1, - anon_sym_EQ, - ACTIONS(171), 11, + [609] = 3, + ACTIONS(219), 1, + anon_sym_LT, + ACTIONS(215), 12, ts_builtin_sym_end, sym_comment, anon_sym_POUND_POUND, anon_sym_LBRACE, anon_sym_RBRACE, anon_sym_LPAREN, - anon_sym_DOT, - anon_sym_PLUS_PLUS, - anon_sym_EQ_EQ_EQ, + anon_sym_RPAREN, + anon_sym_GT, + anon_sym_COMMA, + anon_sym_EQ, sym_number, sym_string, - ACTIONS(173), 18, + ACTIONS(217), 18, anon_sym_import, anon_sym_extern, anon_sym_pure, @@ -3195,23 +3224,24 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_true, anon_sym_false, anon_sym_error, - [649] = 3, + [647] = 4, + ACTIONS(221), 1, + anon_sym_COLON, ACTIONS(223), 1, - anon_sym_LT, - ACTIONS(219), 12, + anon_sym_EQ, + ACTIONS(187), 11, ts_builtin_sym_end, sym_comment, anon_sym_POUND_POUND, anon_sym_LBRACE, anon_sym_RBRACE, + anon_sym_DOT, anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_GT, - anon_sym_COMMA, - anon_sym_EQ, + anon_sym_PLUS_PLUS, + anon_sym_EQ_EQ_EQ, sym_number, sym_string, - ACTIONS(221), 18, + ACTIONS(189), 18, anon_sym_import, anon_sym_extern, anon_sym_pure, @@ -3233,7 +3263,7 @@ static const uint16_t ts_small_parse_table[] = { [687] = 3, ACTIONS(225), 1, anon_sym_LT, - ACTIONS(219), 12, + ACTIONS(215), 12, ts_builtin_sym_end, sym_comment, anon_sym_POUND_POUND, @@ -3246,7 +3276,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_EQ, sym_number, sym_string, - ACTIONS(221), 18, + ACTIONS(217), 18, anon_sym_import, anon_sym_extern, anon_sym_pure, @@ -3267,10 +3297,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_error, [725] = 6, ACTIONS(231), 1, - anon_sym_LPAREN, - ACTIONS(233), 1, anon_sym_DOT, - STATE(28), 1, + ACTIONS(233), 1, + anon_sym_LPAREN, + STATE(24), 1, sym_overloadable_operator, ACTIONS(235), 2, anon_sym_PLUS_PLUS, @@ -3302,22 +3332,19 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_true, anon_sym_false, anon_sym_error, - [768] = 6, - ACTIONS(231), 1, - anon_sym_LPAREN, - ACTIONS(233), 1, + [768] = 3, + ACTIONS(191), 4, anon_sym_DOT, - STATE(28), 1, - sym_overloadable_operator, - ACTIONS(235), 2, + anon_sym_COLON, anon_sym_PLUS_PLUS, anon_sym_EQ_EQ_EQ, - ACTIONS(237), 7, + ACTIONS(237), 8, ts_builtin_sym_end, sym_comment, anon_sym_POUND_POUND, anon_sym_LBRACE, anon_sym_RBRACE, + anon_sym_LPAREN, sym_number, sym_string, ACTIONS(239), 18, @@ -3339,21 +3366,25 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_true, anon_sym_false, anon_sym_error, - [811] = 2, - ACTIONS(219), 12, + [805] = 6, + ACTIONS(231), 1, + anon_sym_DOT, + ACTIONS(233), 1, + anon_sym_LPAREN, + STATE(24), 1, + sym_overloadable_operator, + ACTIONS(235), 2, + anon_sym_PLUS_PLUS, + anon_sym_EQ_EQ_EQ, + ACTIONS(241), 7, ts_builtin_sym_end, sym_comment, anon_sym_POUND_POUND, anon_sym_LBRACE, anon_sym_RBRACE, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_GT, - anon_sym_COMMA, - anon_sym_EQ, sym_number, sym_string, - ACTIONS(221), 18, + ACTIONS(243), 18, anon_sym_import, anon_sym_extern, anon_sym_pure, @@ -3372,8 +3403,8 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_true, anon_sym_false, anon_sym_error, - [846] = 2, - ACTIONS(241), 12, + [848] = 2, + ACTIONS(245), 12, ts_builtin_sym_end, sym_comment, anon_sym_POUND_POUND, @@ -3386,7 +3417,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_EQ, sym_number, sym_string, - ACTIONS(243), 18, + ACTIONS(247), 18, anon_sym_import, anon_sym_extern, anon_sym_pure, @@ -3405,8 +3436,8 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_true, anon_sym_false, anon_sym_error, - [881] = 2, - ACTIONS(245), 12, + [883] = 2, + ACTIONS(249), 12, ts_builtin_sym_end, sym_comment, anon_sym_POUND_POUND, @@ -3419,7 +3450,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_EQ, sym_number, sym_string, - ACTIONS(247), 18, + ACTIONS(251), 18, anon_sym_import, anon_sym_extern, anon_sym_pure, @@ -3438,25 +3469,21 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_true, anon_sym_false, anon_sym_error, - [916] = 6, - ACTIONS(231), 1, - anon_sym_LPAREN, - ACTIONS(233), 1, - anon_sym_DOT, - STATE(28), 1, - sym_overloadable_operator, - ACTIONS(235), 2, - anon_sym_PLUS_PLUS, - anon_sym_EQ_EQ_EQ, - ACTIONS(249), 7, + [918] = 2, + ACTIONS(253), 12, ts_builtin_sym_end, sym_comment, anon_sym_POUND_POUND, anon_sym_LBRACE, anon_sym_RBRACE, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_GT, + anon_sym_COMMA, + anon_sym_EQ, sym_number, sym_string, - ACTIONS(251), 18, + ACTIONS(255), 18, anon_sym_import, anon_sym_extern, anon_sym_pure, @@ -3475,24 +3502,25 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_true, anon_sym_false, anon_sym_error, - [959] = 5, - ACTIONS(233), 1, + [953] = 6, + ACTIONS(231), 1, anon_sym_DOT, - STATE(28), 1, + ACTIONS(233), 1, + anon_sym_LPAREN, + STATE(24), 1, sym_overloadable_operator, ACTIONS(235), 2, anon_sym_PLUS_PLUS, anon_sym_EQ_EQ_EQ, - ACTIONS(253), 8, + ACTIONS(257), 7, ts_builtin_sym_end, sym_comment, anon_sym_POUND_POUND, anon_sym_LBRACE, anon_sym_RBRACE, - anon_sym_LPAREN, sym_number, sym_string, - ACTIONS(255), 18, + ACTIONS(259), 18, anon_sym_import, anon_sym_extern, anon_sym_pure, @@ -3511,22 +3539,25 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_true, anon_sym_false, anon_sym_error, - [1000] = 3, - ACTIONS(167), 4, + [996] = 6, + ACTIONS(231), 1, anon_sym_DOT, - anon_sym_COLON, + ACTIONS(233), 1, + anon_sym_LPAREN, + STATE(24), 1, + sym_overloadable_operator, + ACTIONS(235), 2, anon_sym_PLUS_PLUS, anon_sym_EQ_EQ_EQ, - ACTIONS(257), 8, + ACTIONS(261), 7, ts_builtin_sym_end, sym_comment, anon_sym_POUND_POUND, anon_sym_LBRACE, anon_sym_RBRACE, - anon_sym_LPAREN, sym_number, sym_string, - ACTIONS(259), 18, + ACTIONS(263), 18, anon_sym_import, anon_sym_extern, anon_sym_pure, @@ -3545,21 +3576,24 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_true, anon_sym_false, anon_sym_error, - [1037] = 2, - ACTIONS(261), 12, + [1039] = 5, + ACTIONS(231), 1, + anon_sym_DOT, + STATE(24), 1, + sym_overloadable_operator, + ACTIONS(235), 2, + anon_sym_PLUS_PLUS, + anon_sym_EQ_EQ_EQ, + ACTIONS(265), 8, ts_builtin_sym_end, sym_comment, anon_sym_POUND_POUND, anon_sym_LBRACE, anon_sym_RBRACE, anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_GT, - anon_sym_COMMA, - anon_sym_EQ, sym_number, sym_string, - ACTIONS(263), 18, + ACTIONS(267), 18, anon_sym_import, anon_sym_extern, anon_sym_pure, @@ -3578,25 +3612,21 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_true, anon_sym_false, anon_sym_error, - [1072] = 6, - ACTIONS(231), 1, - anon_sym_LPAREN, - ACTIONS(233), 1, - anon_sym_DOT, - STATE(28), 1, - sym_overloadable_operator, - ACTIONS(235), 2, - anon_sym_PLUS_PLUS, - anon_sym_EQ_EQ_EQ, - ACTIONS(265), 7, + [1080] = 2, + ACTIONS(215), 12, ts_builtin_sym_end, sym_comment, anon_sym_POUND_POUND, anon_sym_LBRACE, anon_sym_RBRACE, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_GT, + anon_sym_COMMA, + anon_sym_EQ, sym_number, sym_string, - ACTIONS(267), 18, + ACTIONS(217), 18, anon_sym_import, anon_sym_extern, anon_sym_pure, @@ -3615,62 +3645,26 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_true, anon_sym_false, anon_sym_error, - [1115] = 7, - ACTIONS(231), 1, - anon_sym_LPAREN, - ACTIONS(233), 1, - anon_sym_DOT, - ACTIONS(269), 1, - anon_sym_COLON, - STATE(28), 1, - sym_overloadable_operator, - ACTIONS(235), 2, - anon_sym_PLUS_PLUS, - anon_sym_EQ_EQ_EQ, - ACTIONS(237), 4, - anon_sym_LBRACE, - anon_sym_RBRACE, - sym_number, - sym_string, - ACTIONS(239), 18, - anon_sym_import, - anon_sym_extern, - anon_sym_pure, - anon_sym_fn, - anon_sym_class, - anon_sym_print, - anon_sym_assert, - anon_sym_return, - anon_sym_LBRACK, - anon_sym_any, - anon_sym_int, - anon_sym_str, - anon_sym_bool, - anon_sym_void, - aux_sym_identifier_token1, - anon_sym_true, - anon_sym_false, - anon_sym_error, - [1158] = 14, - ACTIONS(17), 1, + [1115] = 14, + ACTIONS(17), 1, anon_sym_LPAREN, ACTIONS(27), 1, anon_sym_LBRACK, ACTIONS(31), 1, aux_sym_identifier_token1, - ACTIONS(271), 1, + ACTIONS(269), 1, anon_sym_LBRACE, - ACTIONS(273), 1, + ACTIONS(271), 1, anon_sym_RBRACE, STATE(19), 1, sym_primitive_type, - STATE(29), 1, + STATE(31), 1, sym_bool, - STATE(115), 1, + STATE(117), 1, sym_expression, - STATE(119), 1, + STATE(127), 1, sym_map_item, - STATE(135), 1, + STATE(142), 1, sym_map_item_list, ACTIONS(33), 2, sym_number, @@ -3685,7 +3679,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_str, anon_sym_bool, anon_sym_void, - STATE(22), 8, + STATE(26), 8, sym_parenthesized_expression, sym_access_list, sym_call, @@ -3694,28 +3688,28 @@ static const uint16_t ts_small_parse_table[] = { sym_vec, sym_map, sym_identifier, - [1215] = 15, + [1172] = 15, ACTIONS(17), 1, anon_sym_LPAREN, ACTIONS(27), 1, anon_sym_LBRACK, ACTIONS(31), 1, aux_sym_identifier_token1, - ACTIONS(271), 1, + ACTIONS(269), 1, anon_sym_LBRACE, - ACTIONS(275), 1, + ACTIONS(273), 1, anon_sym_RPAREN, STATE(19), 1, sym_primitive_type, - STATE(29), 1, + STATE(31), 1, sym_bool, - STATE(95), 1, + STATE(101), 1, sym_identifier, - STATE(113), 1, + STATE(120), 1, sym_expression, - STATE(121), 1, + STATE(125), 1, sym_param, - STATE(141), 1, + STATE(137), 1, sym_param_list, ACTIONS(33), 2, sym_number, @@ -3730,7 +3724,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_str, anon_sym_bool, anon_sym_void, - STATE(22), 7, + STATE(26), 7, sym_parenthesized_expression, sym_access_list, sym_call, @@ -3738,28 +3732,28 @@ static const uint16_t ts_small_parse_table[] = { sym_binary_expression, sym_vec, sym_map, - [1274] = 15, + [1231] = 15, ACTIONS(17), 1, anon_sym_LPAREN, ACTIONS(27), 1, anon_sym_LBRACK, ACTIONS(31), 1, aux_sym_identifier_token1, - ACTIONS(271), 1, + ACTIONS(269), 1, anon_sym_LBRACE, - ACTIONS(277), 1, + ACTIONS(275), 1, anon_sym_RPAREN, STATE(19), 1, sym_primitive_type, - STATE(29), 1, + STATE(31), 1, sym_bool, - STATE(95), 1, + STATE(101), 1, sym_identifier, - STATE(113), 1, + STATE(120), 1, sym_expression, - STATE(121), 1, + STATE(125), 1, sym_param, - STATE(130), 1, + STATE(143), 1, sym_param_list, ACTIONS(33), 2, sym_number, @@ -3774,7 +3768,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_str, anon_sym_bool, anon_sym_void, - STATE(22), 7, + STATE(26), 7, sym_parenthesized_expression, sym_access_list, sym_call, @@ -3782,6 +3776,42 @@ static const uint16_t ts_small_parse_table[] = { sym_binary_expression, sym_vec, sym_map, + [1290] = 7, + ACTIONS(231), 1, + anon_sym_DOT, + ACTIONS(233), 1, + anon_sym_LPAREN, + ACTIONS(277), 1, + anon_sym_COLON, + STATE(24), 1, + sym_overloadable_operator, + ACTIONS(235), 2, + anon_sym_PLUS_PLUS, + anon_sym_EQ_EQ_EQ, + ACTIONS(241), 4, + anon_sym_LBRACE, + anon_sym_RBRACE, + sym_number, + sym_string, + ACTIONS(243), 18, + anon_sym_import, + anon_sym_extern, + anon_sym_pure, + anon_sym_fn, + anon_sym_class, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_LBRACK, + anon_sym_any, + anon_sym_int, + anon_sym_str, + anon_sym_bool, + anon_sym_void, + aux_sym_identifier_token1, + anon_sym_true, + anon_sym_false, + anon_sym_error, [1333] = 14, ACTIONS(17), 1, anon_sym_LPAREN, @@ -3789,19 +3819,19 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LBRACK, ACTIONS(31), 1, aux_sym_identifier_token1, - ACTIONS(271), 1, + ACTIONS(269), 1, anon_sym_LBRACE, ACTIONS(279), 1, anon_sym_RBRACE, STATE(19), 1, sym_primitive_type, - STATE(29), 1, + STATE(31), 1, sym_bool, - STATE(115), 1, + STATE(117), 1, sym_expression, - STATE(119), 1, + STATE(127), 1, sym_map_item, - STATE(134), 1, + STATE(141), 1, sym_map_item_list, ACTIONS(33), 2, sym_number, @@ -3816,7 +3846,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_str, anon_sym_bool, anon_sym_void, - STATE(22), 8, + STATE(26), 8, sym_parenthesized_expression, sym_access_list, sym_call, @@ -3832,18 +3862,18 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LBRACK, ACTIONS(31), 1, aux_sym_identifier_token1, - ACTIONS(271), 1, + ACTIONS(269), 1, anon_sym_LBRACE, ACTIONS(281), 1, anon_sym_RPAREN, STATE(19), 1, sym_primitive_type, - STATE(29), 1, + STATE(31), 1, sym_bool, - STATE(93), 1, + STATE(99), 1, sym_expression, - STATE(136), 1, - sym_argument_list, + STATE(146), 1, + sym_arg_list, ACTIONS(33), 2, sym_number, sym_string, @@ -3857,7 +3887,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_str, anon_sym_bool, anon_sym_void, - STATE(22), 8, + STATE(26), 8, sym_parenthesized_expression, sym_access_list, sym_call, @@ -3866,25 +3896,86 @@ static const uint16_t ts_small_parse_table[] = { sym_vec, sym_map, sym_identifier, - [1444] = 13, + [1444] = 2, + ACTIONS(283), 9, + ts_builtin_sym_end, + sym_comment, + anon_sym_POUND_POUND, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_LPAREN, + anon_sym_EQ, + sym_number, + sym_string, + ACTIONS(285), 18, + anon_sym_import, + anon_sym_extern, + anon_sym_pure, + anon_sym_fn, + anon_sym_class, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_LBRACK, + anon_sym_any, + anon_sym_int, + anon_sym_str, + anon_sym_bool, + anon_sym_void, + aux_sym_identifier_token1, + anon_sym_true, + anon_sym_false, + anon_sym_error, + [1476] = 3, + ACTIONS(287), 1, + anon_sym_EQ, + ACTIONS(241), 8, + ts_builtin_sym_end, + sym_comment, + anon_sym_POUND_POUND, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_LPAREN, + sym_number, + sym_string, + ACTIONS(243), 18, + anon_sym_import, + anon_sym_extern, + anon_sym_pure, + anon_sym_fn, + anon_sym_class, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_LBRACK, + anon_sym_any, + anon_sym_int, + anon_sym_str, + anon_sym_bool, + anon_sym_void, + aux_sym_identifier_token1, + anon_sym_true, + anon_sym_false, + anon_sym_error, + [1510] = 13, ACTIONS(17), 1, anon_sym_LPAREN, ACTIONS(27), 1, anon_sym_LBRACK, ACTIONS(31), 1, aux_sym_identifier_token1, - ACTIONS(271), 1, + ACTIONS(269), 1, anon_sym_LBRACE, - ACTIONS(283), 1, + ACTIONS(289), 1, anon_sym_RPAREN, STATE(19), 1, sym_primitive_type, - STATE(29), 1, + STATE(31), 1, sym_bool, - STATE(93), 1, + STATE(99), 1, sym_expression, STATE(140), 1, - sym_argument_list, + sym_arg_list, ACTIONS(33), 2, sym_number, sym_string, @@ -3898,7 +3989,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_str, anon_sym_bool, anon_sym_void, - STATE(22), 8, + STATE(26), 8, sym_parenthesized_expression, sym_access_list, sym_call, @@ -3907,39 +3998,39 @@ static const uint16_t ts_small_parse_table[] = { sym_vec, sym_map, sym_identifier, - [1498] = 13, - ACTIONS(285), 1, + [1564] = 13, + ACTIONS(291), 1, anon_sym_LBRACE, - ACTIONS(287), 1, + ACTIONS(293), 1, anon_sym_LPAREN, - ACTIONS(289), 1, + ACTIONS(295), 1, anon_sym_LBRACK, - ACTIONS(291), 1, + ACTIONS(297), 1, anon_sym_RBRACK, - ACTIONS(295), 1, + ACTIONS(301), 1, aux_sym_identifier_token1, - STATE(96), 1, + STATE(100), 1, sym_expression, - STATE(107), 1, - sym_primitive_type, - STATE(110), 1, + STATE(108), 1, sym_bool, - STATE(127), 1, + STATE(113), 1, + sym_primitive_type, + STATE(133), 1, sym_expression_list, - ACTIONS(297), 2, + ACTIONS(303), 2, sym_number, sym_string, - ACTIONS(299), 3, + ACTIONS(305), 3, anon_sym_true, anon_sym_false, anon_sym_error, - ACTIONS(293), 5, + ACTIONS(299), 5, anon_sym_any, anon_sym_int, anon_sym_str, anon_sym_bool, anon_sym_void, - STATE(114), 8, + STATE(104), 8, sym_parenthesized_expression, sym_access_list, sym_call, @@ -3948,39 +4039,39 @@ static const uint16_t ts_small_parse_table[] = { sym_vec, sym_map, sym_identifier, - [1552] = 13, - ACTIONS(285), 1, + [1618] = 13, + ACTIONS(291), 1, anon_sym_LBRACE, - ACTIONS(287), 1, + ACTIONS(293), 1, anon_sym_LPAREN, - ACTIONS(289), 1, - anon_sym_LBRACK, ACTIONS(295), 1, - aux_sym_identifier_token1, + anon_sym_LBRACK, ACTIONS(301), 1, + aux_sym_identifier_token1, + ACTIONS(307), 1, anon_sym_RBRACK, - STATE(96), 1, + STATE(100), 1, sym_expression, - STATE(107), 1, - sym_primitive_type, - STATE(110), 1, + STATE(108), 1, sym_bool, - STATE(138), 1, + STATE(113), 1, + sym_primitive_type, + STATE(144), 1, sym_expression_list, - ACTIONS(297), 2, + ACTIONS(303), 2, sym_number, sym_string, - ACTIONS(299), 3, + ACTIONS(305), 3, anon_sym_true, anon_sym_false, anon_sym_error, - ACTIONS(293), 5, + ACTIONS(299), 5, anon_sym_any, anon_sym_int, anon_sym_str, anon_sym_bool, anon_sym_void, - STATE(114), 8, + STATE(104), 8, sym_parenthesized_expression, sym_access_list, sym_call, @@ -3989,24 +4080,24 @@ static const uint16_t ts_small_parse_table[] = { sym_vec, sym_map, sym_identifier, - [1606] = 13, + [1672] = 13, ACTIONS(17), 1, anon_sym_LPAREN, ACTIONS(27), 1, anon_sym_LBRACK, ACTIONS(31), 1, aux_sym_identifier_token1, - ACTIONS(271), 1, + ACTIONS(269), 1, anon_sym_LBRACE, STATE(19), 1, sym_primitive_type, - STATE(29), 1, + STATE(31), 1, sym_bool, - STATE(115), 1, + STATE(117), 1, sym_expression, - STATE(119), 1, + STATE(127), 1, sym_map_item, - STATE(126), 1, + STATE(147), 1, sym_map_item_list, ACTIONS(33), 2, sym_number, @@ -4021,7 +4112,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_str, anon_sym_bool, anon_sym_void, - STATE(22), 8, + STATE(26), 8, sym_parenthesized_expression, sym_access_list, sym_call, @@ -4030,18 +4121,19 @@ static const uint16_t ts_small_parse_table[] = { sym_vec, sym_map, sym_identifier, - [1660] = 2, - ACTIONS(303), 9, + [1726] = 3, + ACTIONS(313), 1, + anon_sym_DOT, + ACTIONS(309), 8, ts_builtin_sym_end, sym_comment, anon_sym_POUND_POUND, anon_sym_LBRACE, anon_sym_RBRACE, anon_sym_LPAREN, - anon_sym_EQ, sym_number, sym_string, - ACTIONS(305), 18, + ACTIONS(311), 18, anon_sym_import, anon_sym_extern, anon_sym_pure, @@ -4060,10 +4152,8 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_true, anon_sym_false, anon_sym_error, - [1692] = 3, - ACTIONS(307), 1, - anon_sym_EQ, - ACTIONS(237), 8, + [1760] = 2, + ACTIONS(315), 8, ts_builtin_sym_end, sym_comment, anon_sym_POUND_POUND, @@ -4072,7 +4162,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, sym_number, sym_string, - ACTIONS(239), 18, + ACTIONS(317), 18, anon_sym_import, anon_sym_extern, anon_sym_pure, @@ -4091,8 +4181,8 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_true, anon_sym_false, anon_sym_error, - [1726] = 2, - ACTIONS(309), 8, + [1791] = 2, + ACTIONS(319), 8, ts_builtin_sym_end, sym_comment, anon_sym_POUND_POUND, @@ -4101,7 +4191,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, sym_number, sym_string, - ACTIONS(311), 18, + ACTIONS(321), 18, anon_sym_import, anon_sym_extern, anon_sym_pure, @@ -4120,8 +4210,8 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_true, anon_sym_false, anon_sym_error, - [1757] = 2, - ACTIONS(313), 8, + [1822] = 2, + ACTIONS(323), 8, ts_builtin_sym_end, sym_comment, anon_sym_POUND_POUND, @@ -4130,7 +4220,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, sym_number, sym_string, - ACTIONS(315), 18, + ACTIONS(325), 18, anon_sym_import, anon_sym_extern, anon_sym_pure, @@ -4149,8 +4239,8 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_true, anon_sym_false, anon_sym_error, - [1788] = 2, - ACTIONS(317), 8, + [1853] = 2, + ACTIONS(327), 8, ts_builtin_sym_end, sym_comment, anon_sym_POUND_POUND, @@ -4159,7 +4249,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, sym_number, sym_string, - ACTIONS(319), 18, + ACTIONS(329), 18, anon_sym_import, anon_sym_extern, anon_sym_pure, @@ -4178,8 +4268,8 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_true, anon_sym_false, anon_sym_error, - [1819] = 2, - ACTIONS(321), 8, + [1884] = 2, + ACTIONS(331), 8, ts_builtin_sym_end, sym_comment, anon_sym_POUND_POUND, @@ -4188,7 +4278,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, sym_number, sym_string, - ACTIONS(323), 18, + ACTIONS(333), 18, anon_sym_import, anon_sym_extern, anon_sym_pure, @@ -4207,8 +4297,47 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_true, anon_sym_false, anon_sym_error, - [1850] = 2, - ACTIONS(325), 8, + [1915] = 12, + ACTIONS(17), 1, + anon_sym_LPAREN, + ACTIONS(27), 1, + anon_sym_LBRACK, + ACTIONS(31), 1, + aux_sym_identifier_token1, + ACTIONS(269), 1, + anon_sym_LBRACE, + STATE(19), 1, + sym_primitive_type, + STATE(31), 1, + sym_bool, + STATE(99), 1, + sym_expression, + STATE(139), 1, + sym_arg_list, + ACTIONS(33), 2, + sym_number, + sym_string, + ACTIONS(35), 3, + anon_sym_true, + anon_sym_false, + anon_sym_error, + ACTIONS(29), 5, + anon_sym_any, + anon_sym_int, + anon_sym_str, + anon_sym_bool, + anon_sym_void, + STATE(26), 8, + sym_parenthesized_expression, + sym_access_list, + sym_call, + sym_literal, + sym_binary_expression, + sym_vec, + sym_map, + sym_identifier, + [1966] = 2, + ACTIONS(335), 8, ts_builtin_sym_end, sym_comment, anon_sym_POUND_POUND, @@ -4217,7 +4346,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, sym_number, sym_string, - ACTIONS(327), 18, + ACTIONS(337), 18, anon_sym_import, anon_sym_extern, anon_sym_pure, @@ -4236,8 +4365,8 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_true, anon_sym_false, anon_sym_error, - [1881] = 2, - ACTIONS(329), 8, + [1997] = 2, + ACTIONS(339), 8, ts_builtin_sym_end, sym_comment, anon_sym_POUND_POUND, @@ -4246,7 +4375,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, sym_number, sym_string, - ACTIONS(331), 18, + ACTIONS(341), 18, anon_sym_import, anon_sym_extern, anon_sym_pure, @@ -4265,86 +4394,37 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_true, anon_sym_false, anon_sym_error, - [1912] = 12, - ACTIONS(285), 1, + [2028] = 2, + ACTIONS(343), 8, + ts_builtin_sym_end, + sym_comment, + anon_sym_POUND_POUND, anon_sym_LBRACE, - ACTIONS(287), 1, + anon_sym_RBRACE, anon_sym_LPAREN, - ACTIONS(289), 1, - anon_sym_LBRACK, - ACTIONS(295), 1, - aux_sym_identifier_token1, - STATE(96), 1, - sym_expression, - STATE(107), 1, - sym_primitive_type, - STATE(110), 1, - sym_bool, - STATE(125), 1, - sym_expression_list, - ACTIONS(297), 2, sym_number, sym_string, - ACTIONS(299), 3, - anon_sym_true, - anon_sym_false, - anon_sym_error, - ACTIONS(293), 5, - anon_sym_any, - anon_sym_int, - anon_sym_str, - anon_sym_bool, - anon_sym_void, - STATE(114), 8, - sym_parenthesized_expression, - sym_access_list, - sym_call, - sym_literal, - sym_binary_expression, - sym_vec, - sym_map, - sym_identifier, - [1963] = 12, - ACTIONS(17), 1, - anon_sym_LPAREN, - ACTIONS(27), 1, + ACTIONS(345), 18, + anon_sym_import, + anon_sym_extern, + anon_sym_pure, + anon_sym_fn, + anon_sym_class, + anon_sym_print, + anon_sym_assert, + anon_sym_return, anon_sym_LBRACK, - ACTIONS(31), 1, - aux_sym_identifier_token1, - ACTIONS(271), 1, - anon_sym_LBRACE, - STATE(19), 1, - sym_primitive_type, - STATE(29), 1, - sym_bool, - STATE(93), 1, - sym_expression, - STATE(133), 1, - sym_argument_list, - ACTIONS(33), 2, - sym_number, - sym_string, - ACTIONS(35), 3, - anon_sym_true, - anon_sym_false, - anon_sym_error, - ACTIONS(29), 5, anon_sym_any, anon_sym_int, anon_sym_str, anon_sym_bool, anon_sym_void, - STATE(22), 8, - sym_parenthesized_expression, - sym_access_list, - sym_call, - sym_literal, - sym_binary_expression, - sym_vec, - sym_map, - sym_identifier, - [2014] = 2, - ACTIONS(237), 8, + aux_sym_identifier_token1, + anon_sym_true, + anon_sym_false, + anon_sym_error, + [2059] = 2, + ACTIONS(347), 8, ts_builtin_sym_end, sym_comment, anon_sym_POUND_POUND, @@ -4353,7 +4433,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, sym_number, sym_string, - ACTIONS(239), 18, + ACTIONS(349), 18, anon_sym_import, anon_sym_extern, anon_sym_pure, @@ -4372,8 +4452,47 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_true, anon_sym_false, anon_sym_error, - [2045] = 2, - ACTIONS(333), 8, + [2090] = 12, + ACTIONS(291), 1, + anon_sym_LBRACE, + ACTIONS(293), 1, + anon_sym_LPAREN, + ACTIONS(295), 1, + anon_sym_LBRACK, + ACTIONS(301), 1, + aux_sym_identifier_token1, + STATE(100), 1, + sym_expression, + STATE(108), 1, + sym_bool, + STATE(113), 1, + sym_primitive_type, + STATE(130), 1, + sym_expression_list, + ACTIONS(303), 2, + sym_number, + sym_string, + ACTIONS(305), 3, + anon_sym_true, + anon_sym_false, + anon_sym_error, + ACTIONS(299), 5, + anon_sym_any, + anon_sym_int, + anon_sym_str, + anon_sym_bool, + anon_sym_void, + STATE(104), 8, + sym_parenthesized_expression, + sym_access_list, + sym_call, + sym_literal, + sym_binary_expression, + sym_vec, + sym_map, + sym_identifier, + [2141] = 2, + ACTIONS(351), 8, ts_builtin_sym_end, sym_comment, anon_sym_POUND_POUND, @@ -4382,7 +4501,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, sym_number, sym_string, - ACTIONS(335), 18, + ACTIONS(353), 18, anon_sym_import, anon_sym_extern, anon_sym_pure, @@ -4401,8 +4520,8 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_true, anon_sym_false, anon_sym_error, - [2076] = 2, - ACTIONS(337), 8, + [2172] = 2, + ACTIONS(241), 8, ts_builtin_sym_end, sym_comment, anon_sym_POUND_POUND, @@ -4411,7 +4530,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, sym_number, sym_string, - ACTIONS(339), 18, + ACTIONS(243), 18, anon_sym_import, anon_sym_extern, anon_sym_pure, @@ -4430,8 +4549,8 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_true, anon_sym_false, anon_sym_error, - [2107] = 2, - ACTIONS(341), 8, + [2203] = 2, + ACTIONS(355), 8, ts_builtin_sym_end, sym_comment, anon_sym_POUND_POUND, @@ -4440,7 +4559,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, sym_number, sym_string, - ACTIONS(343), 18, + ACTIONS(357), 18, anon_sym_import, anon_sym_extern, anon_sym_pure, @@ -4459,8 +4578,8 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_true, anon_sym_false, anon_sym_error, - [2138] = 2, - ACTIONS(345), 8, + [2234] = 2, + ACTIONS(359), 8, ts_builtin_sym_end, sym_comment, anon_sym_POUND_POUND, @@ -4469,7 +4588,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, sym_number, sym_string, - ACTIONS(347), 18, + ACTIONS(361), 18, anon_sym_import, anon_sym_extern, anon_sym_pure, @@ -4488,8 +4607,8 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_true, anon_sym_false, anon_sym_error, - [2169] = 2, - ACTIONS(349), 8, + [2265] = 2, + ACTIONS(363), 8, ts_builtin_sym_end, sym_comment, anon_sym_POUND_POUND, @@ -4498,7 +4617,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, sym_number, sym_string, - ACTIONS(351), 18, + ACTIONS(365), 18, anon_sym_import, anon_sym_extern, anon_sym_pure, @@ -4517,8 +4636,8 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_true, anon_sym_false, anon_sym_error, - [2200] = 2, - ACTIONS(353), 8, + [2296] = 2, + ACTIONS(367), 8, ts_builtin_sym_end, sym_comment, anon_sym_POUND_POUND, @@ -4527,7 +4646,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, sym_number, sym_string, - ACTIONS(355), 18, + ACTIONS(369), 18, anon_sym_import, anon_sym_extern, anon_sym_pure, @@ -4546,20 +4665,20 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_true, anon_sym_false, anon_sym_error, - [2231] = 11, + [2327] = 11, ACTIONS(17), 1, anon_sym_LPAREN, ACTIONS(27), 1, anon_sym_LBRACK, ACTIONS(31), 1, aux_sym_identifier_token1, - ACTIONS(271), 1, + ACTIONS(269), 1, anon_sym_LBRACE, STATE(19), 1, sym_primitive_type, - STATE(29), 1, + STATE(31), 1, sym_bool, - STATE(94), 1, + STATE(36), 1, sym_expression, ACTIONS(33), 2, sym_number, @@ -4574,7 +4693,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_str, anon_sym_bool, anon_sym_void, - STATE(22), 8, + STATE(26), 8, sym_parenthesized_expression, sym_access_list, sym_call, @@ -4583,20 +4702,48 @@ static const uint16_t ts_small_parse_table[] = { sym_vec, sym_map, sym_identifier, - [2279] = 11, + [2375] = 2, + ACTIONS(371), 7, + ts_builtin_sym_end, + sym_comment, + anon_sym_POUND_POUND, + anon_sym_LBRACE, + anon_sym_LPAREN, + sym_number, + sym_string, + ACTIONS(373), 18, + anon_sym_import, + anon_sym_extern, + anon_sym_pure, + anon_sym_fn, + anon_sym_class, + anon_sym_print, + anon_sym_assert, + anon_sym_return, + anon_sym_LBRACK, + anon_sym_any, + anon_sym_int, + anon_sym_str, + anon_sym_bool, + anon_sym_void, + aux_sym_identifier_token1, + anon_sym_true, + anon_sym_false, + anon_sym_error, + [2405] = 11, ACTIONS(17), 1, anon_sym_LPAREN, ACTIONS(27), 1, anon_sym_LBRACK, ACTIONS(31), 1, aux_sym_identifier_token1, - ACTIONS(271), 1, + ACTIONS(269), 1, anon_sym_LBRACE, STATE(19), 1, sym_primitive_type, - STATE(29), 1, + STATE(31), 1, sym_bool, - STATE(99), 1, + STATE(98), 1, sym_expression, ACTIONS(33), 2, sym_number, @@ -4611,7 +4758,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_str, anon_sym_bool, anon_sym_void, - STATE(22), 8, + STATE(26), 8, sym_parenthesized_expression, sym_access_list, sym_call, @@ -4620,48 +4767,20 @@ static const uint16_t ts_small_parse_table[] = { sym_vec, sym_map, sym_identifier, - [2327] = 2, - ACTIONS(357), 7, - ts_builtin_sym_end, - sym_comment, - anon_sym_POUND_POUND, - anon_sym_LBRACE, - anon_sym_LPAREN, - sym_number, - sym_string, - ACTIONS(359), 18, - anon_sym_import, - anon_sym_extern, - anon_sym_pure, - anon_sym_fn, - anon_sym_class, - anon_sym_print, - anon_sym_assert, - anon_sym_return, - anon_sym_LBRACK, - anon_sym_any, - anon_sym_int, - anon_sym_str, - anon_sym_bool, - anon_sym_void, - aux_sym_identifier_token1, - anon_sym_true, - anon_sym_false, - anon_sym_error, - [2357] = 11, + [2453] = 11, ACTIONS(17), 1, anon_sym_LPAREN, ACTIONS(27), 1, anon_sym_LBRACK, ACTIONS(31), 1, aux_sym_identifier_token1, - ACTIONS(271), 1, + ACTIONS(269), 1, anon_sym_LBRACE, STATE(19), 1, sym_primitive_type, - STATE(29), 1, + STATE(31), 1, sym_bool, - STATE(36), 1, + STATE(43), 1, sym_expression, ACTIONS(33), 2, sym_number, @@ -4676,7 +4795,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_str, anon_sym_bool, anon_sym_void, - STATE(22), 8, + STATE(26), 8, sym_parenthesized_expression, sym_access_list, sym_call, @@ -4685,20 +4804,20 @@ static const uint16_t ts_small_parse_table[] = { sym_vec, sym_map, sym_identifier, - [2405] = 11, + [2501] = 11, ACTIONS(17), 1, anon_sym_LPAREN, ACTIONS(27), 1, anon_sym_LBRACK, ACTIONS(31), 1, aux_sym_identifier_token1, - ACTIONS(271), 1, + ACTIONS(269), 1, anon_sym_LBRACE, STATE(19), 1, sym_primitive_type, - STATE(29), 1, + STATE(31), 1, sym_bool, - STATE(41), 1, + STATE(42), 1, sym_expression, ACTIONS(33), 2, sym_number, @@ -4713,7 +4832,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_str, anon_sym_bool, anon_sym_void, - STATE(22), 8, + STATE(26), 8, sym_parenthesized_expression, sym_access_list, sym_call, @@ -4722,20 +4841,20 @@ static const uint16_t ts_small_parse_table[] = { sym_vec, sym_map, sym_identifier, - [2453] = 11, + [2549] = 11, ACTIONS(17), 1, anon_sym_LPAREN, ACTIONS(27), 1, anon_sym_LBRACK, ACTIONS(31), 1, aux_sym_identifier_token1, - ACTIONS(271), 1, + ACTIONS(269), 1, anon_sym_LBRACE, STATE(19), 1, sym_primitive_type, - STATE(29), 1, + STATE(31), 1, sym_bool, - STATE(113), 1, + STATE(120), 1, sym_expression, ACTIONS(33), 2, sym_number, @@ -4750,7 +4869,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_str, anon_sym_bool, anon_sym_void, - STATE(22), 8, + STATE(26), 8, sym_parenthesized_expression, sym_access_list, sym_call, @@ -4759,20 +4878,20 @@ static const uint16_t ts_small_parse_table[] = { sym_vec, sym_map, sym_identifier, - [2501] = 11, + [2597] = 11, ACTIONS(17), 1, anon_sym_LPAREN, ACTIONS(27), 1, anon_sym_LBRACK, ACTIONS(31), 1, aux_sym_identifier_token1, - ACTIONS(271), 1, + ACTIONS(269), 1, anon_sym_LBRACE, STATE(19), 1, sym_primitive_type, - STATE(29), 1, + STATE(31), 1, sym_bool, - STATE(45), 1, + STATE(105), 1, sym_expression, ACTIONS(33), 2, sym_number, @@ -4787,7 +4906,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_str, anon_sym_bool, anon_sym_void, - STATE(22), 8, + STATE(26), 8, sym_parenthesized_expression, sym_access_list, sym_call, @@ -4796,20 +4915,20 @@ static const uint16_t ts_small_parse_table[] = { sym_vec, sym_map, sym_identifier, - [2549] = 8, + [2645] = 8, ACTIONS(31), 1, aux_sym_identifier_token1, - ACTIONS(361), 1, + ACTIONS(375), 1, anon_sym_vec, - ACTIONS(363), 1, + ACTIONS(377), 1, anon_sym_map, STATE(19), 1, sym_primitive_type, - STATE(38), 1, - sym_identifier, - STATE(44), 1, + STATE(39), 1, sym_type_name, - STATE(118), 1, + STATE(45), 1, + sym_identifier, + STATE(129), 1, sym_type, ACTIONS(29), 5, anon_sym_any, @@ -4817,20 +4936,20 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_str, anon_sym_bool, anon_sym_void, - [2578] = 8, + [2674] = 8, ACTIONS(31), 1, aux_sym_identifier_token1, - ACTIONS(361), 1, + ACTIONS(375), 1, anon_sym_vec, - ACTIONS(363), 1, + ACTIONS(377), 1, anon_sym_map, STATE(19), 1, sym_primitive_type, - STATE(38), 1, - sym_identifier, - STATE(44), 1, + STATE(39), 1, sym_type_name, - STATE(124), 1, + STATE(45), 1, + sym_identifier, + STATE(52), 1, sym_type, ACTIONS(29), 5, anon_sym_any, @@ -4838,20 +4957,20 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_str, anon_sym_bool, anon_sym_void, - [2607] = 8, + [2703] = 8, ACTIONS(31), 1, aux_sym_identifier_token1, - ACTIONS(361), 1, + ACTIONS(375), 1, anon_sym_vec, - ACTIONS(363), 1, + ACTIONS(377), 1, anon_sym_map, STATE(19), 1, sym_primitive_type, - STATE(38), 1, - sym_identifier, - STATE(44), 1, + STATE(39), 1, sym_type_name, - STATE(56), 1, + STATE(45), 1, + sym_identifier, + STATE(124), 1, sym_type, ACTIONS(29), 5, anon_sym_any, @@ -4859,20 +4978,20 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_str, anon_sym_bool, anon_sym_void, - [2636] = 8, + [2732] = 8, ACTIONS(31), 1, aux_sym_identifier_token1, - ACTIONS(361), 1, + ACTIONS(375), 1, anon_sym_vec, - ACTIONS(363), 1, + ACTIONS(377), 1, anon_sym_map, STATE(19), 1, sym_primitive_type, - STATE(38), 1, - sym_identifier, - STATE(44), 1, + STATE(39), 1, sym_type_name, - STATE(131), 1, + STATE(45), 1, + sym_identifier, + STATE(132), 1, sym_type, ACTIONS(29), 5, anon_sym_any, @@ -4880,20 +4999,20 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_str, anon_sym_bool, anon_sym_void, - [2665] = 8, + [2761] = 8, ACTIONS(31), 1, aux_sym_identifier_token1, - ACTIONS(361), 1, + ACTIONS(375), 1, anon_sym_vec, - ACTIONS(363), 1, + ACTIONS(377), 1, anon_sym_map, STATE(19), 1, sym_primitive_type, - STATE(38), 1, - sym_identifier, - STATE(44), 1, + STATE(39), 1, sym_type_name, - STATE(132), 1, + STATE(45), 1, + sym_identifier, + STATE(138), 1, sym_type, ACTIONS(29), 5, anon_sym_any, @@ -4901,7 +5020,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_str, anon_sym_bool, anon_sym_void, - [2694] = 5, + [2790] = 5, ACTIONS(31), 1, aux_sym_identifier_token1, STATE(19), 1, @@ -4918,7 +5037,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_str, anon_sym_bool, anon_sym_void, - [2716] = 5, + [2812] = 5, ACTIONS(31), 1, aux_sym_identifier_token1, STATE(19), 1, @@ -4935,55 +5054,78 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_str, anon_sym_bool, anon_sym_void, - [2738] = 6, + [2834] = 7, ACTIONS(31), 1, aux_sym_identifier_token1, + ACTIONS(379), 1, + anon_sym_DOT, STATE(19), 1, sym_primitive_type, - STATE(117), 1, + STATE(58), 1, sym_identifier, - STATE(121), 1, - sym_param, - STATE(129), 1, - sym_param_list, + STATE(70), 1, + sym_import_path, + STATE(92), 1, + sym_import_relative_dot, ACTIONS(29), 5, anon_sym_any, anon_sym_int, anon_sym_str, anon_sym_bool, anon_sym_void, - [2761] = 4, + [2860] = 6, ACTIONS(31), 1, aux_sym_identifier_token1, STATE(19), 1, sym_primitive_type, STATE(123), 1, sym_identifier, + STATE(125), 1, + sym_param, + STATE(136), 1, + sym_param_list, ACTIONS(29), 5, anon_sym_any, anon_sym_int, anon_sym_str, anon_sym_bool, anon_sym_void, - [2778] = 4, - ACTIONS(295), 1, + [2883] = 5, + ACTIONS(31), 1, aux_sym_identifier_token1, - STATE(102), 1, + STATE(19), 1, + sym_primitive_type, + STATE(58), 1, sym_identifier, - STATE(107), 1, + STATE(63), 1, + sym_import_path, + ACTIONS(29), 5, + anon_sym_any, + anon_sym_int, + anon_sym_str, + anon_sym_bool, + anon_sym_void, + [2903] = 5, + ACTIONS(31), 1, + aux_sym_identifier_token1, + STATE(19), 1, sym_primitive_type, - ACTIONS(293), 5, + STATE(58), 1, + sym_identifier, + STATE(73), 1, + sym_import_path, + ACTIONS(29), 5, anon_sym_any, anon_sym_int, anon_sym_str, anon_sym_bool, anon_sym_void, - [2795] = 4, + [2923] = 4, ACTIONS(31), 1, aux_sym_identifier_token1, STATE(19), 1, sym_primitive_type, - STATE(61), 1, + STATE(135), 1, sym_identifier, ACTIONS(29), 5, anon_sym_any, @@ -4991,12 +5133,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_str, anon_sym_bool, anon_sym_void, - [2812] = 4, + [2940] = 4, ACTIONS(31), 1, aux_sym_identifier_token1, STATE(19), 1, sym_primitive_type, - STATE(128), 1, + STATE(131), 1, sym_identifier, ACTIONS(29), 5, anon_sym_any, @@ -5004,12 +5146,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_str, anon_sym_bool, anon_sym_void, - [2829] = 4, + [2957] = 4, ACTIONS(31), 1, aux_sym_identifier_token1, STATE(19), 1, sym_primitive_type, - STATE(20), 1, + STATE(32), 1, sym_identifier, ACTIONS(29), 5, anon_sym_any, @@ -5017,317 +5159,338 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_str, anon_sym_bool, anon_sym_void, - [2846] = 6, + [2974] = 4, + ACTIONS(301), 1, + aux_sym_identifier_token1, + STATE(110), 1, + sym_identifier, + STATE(113), 1, + sym_primitive_type, + ACTIONS(299), 5, + anon_sym_any, + anon_sym_int, + anon_sym_str, + anon_sym_bool, + anon_sym_void, + [2991] = 5, ACTIONS(231), 1, - anon_sym_LPAREN, - ACTIONS(233), 1, anon_sym_DOT, - ACTIONS(365), 1, - anon_sym_RPAREN, - ACTIONS(367), 1, - anon_sym_COMMA, - STATE(28), 1, + ACTIONS(233), 1, + anon_sym_LPAREN, + STATE(24), 1, sym_overloadable_operator, ACTIONS(235), 2, anon_sym_PLUS_PLUS, anon_sym_EQ_EQ_EQ, - [2866] = 5, + ACTIONS(381), 2, + anon_sym_RBRACE, + anon_sym_COMMA, + [3009] = 6, ACTIONS(231), 1, - anon_sym_LPAREN, - ACTIONS(233), 1, anon_sym_DOT, - STATE(28), 1, + ACTIONS(233), 1, + anon_sym_LPAREN, + ACTIONS(383), 1, + anon_sym_RPAREN, + ACTIONS(385), 1, + anon_sym_COMMA, + STATE(24), 1, sym_overloadable_operator, ACTIONS(235), 2, anon_sym_PLUS_PLUS, anon_sym_EQ_EQ_EQ, - ACTIONS(369), 2, - anon_sym_RBRACE, + [3029] = 6, + ACTIONS(387), 1, + anon_sym_DOT, + ACTIONS(389), 1, + anon_sym_LPAREN, + ACTIONS(391), 1, anon_sym_COMMA, - [2884] = 3, - ACTIONS(373), 1, + ACTIONS(393), 1, + anon_sym_RBRACK, + STATE(102), 1, + sym_overloadable_operator, + ACTIONS(395), 2, + anon_sym_PLUS_PLUS, + anon_sym_EQ_EQ_EQ, + [3049] = 3, + ACTIONS(399), 1, anon_sym_COLON, - ACTIONS(371), 2, + ACTIONS(397), 2, anon_sym_RPAREN, anon_sym_COMMA, - ACTIONS(171), 4, - anon_sym_LPAREN, + ACTIONS(187), 4, anon_sym_DOT, + anon_sym_LPAREN, anon_sym_PLUS_PLUS, anon_sym_EQ_EQ_EQ, - [2898] = 6, - ACTIONS(375), 1, - anon_sym_LPAREN, - ACTIONS(377), 1, + [3063] = 1, + ACTIONS(179), 6, anon_sym_DOT, - ACTIONS(379), 1, + anon_sym_LPAREN, anon_sym_COMMA, - ACTIONS(381), 1, anon_sym_RBRACK, - STATE(109), 1, - sym_overloadable_operator, - ACTIONS(383), 2, anon_sym_PLUS_PLUS, anon_sym_EQ_EQ_EQ, - [2918] = 1, - ACTIONS(175), 6, - anon_sym_LPAREN, + [3072] = 1, + ACTIONS(155), 6, anon_sym_DOT, + anon_sym_LPAREN, anon_sym_COMMA, anon_sym_RBRACK, anon_sym_PLUS_PLUS, anon_sym_EQ_EQ_EQ, - [2927] = 1, - ACTIONS(155), 6, - anon_sym_LPAREN, + [3081] = 1, + ACTIONS(187), 6, anon_sym_DOT, + anon_sym_LPAREN, anon_sym_COMMA, anon_sym_RBRACK, anon_sym_PLUS_PLUS, anon_sym_EQ_EQ_EQ, - [2936] = 5, + [3090] = 5, ACTIONS(231), 1, - anon_sym_LPAREN, - ACTIONS(233), 1, anon_sym_DOT, - ACTIONS(385), 1, + ACTIONS(233), 1, + anon_sym_LPAREN, + ACTIONS(401), 1, anon_sym_RPAREN, - STATE(28), 1, + STATE(24), 1, sym_overloadable_operator, ACTIONS(235), 2, anon_sym_PLUS_PLUS, anon_sym_EQ_EQ_EQ, - [2953] = 4, - STATE(100), 1, - sym_qualifier, - STATE(122), 1, - sym_qualifier_list, - ACTIONS(387), 2, - anon_sym_extern, - anon_sym_pure, - ACTIONS(389), 2, - anon_sym_fn, - anon_sym_class, - [2968] = 1, - ACTIONS(183), 6, - anon_sym_LPAREN, + [3107] = 1, + ACTIONS(403), 6, + anon_sym_any, + anon_sym_int, + anon_sym_str, + anon_sym_bool, + anon_sym_void, + aux_sym_identifier_token1, + [3116] = 1, + ACTIONS(171), 6, anon_sym_DOT, + anon_sym_LPAREN, anon_sym_COMMA, anon_sym_RBRACK, anon_sym_PLUS_PLUS, anon_sym_EQ_EQ_EQ, - [2977] = 1, - ACTIONS(163), 6, - anon_sym_LPAREN, + [3125] = 1, + ACTIONS(207), 6, anon_sym_DOT, + anon_sym_LPAREN, anon_sym_COMMA, anon_sym_RBRACK, anon_sym_PLUS_PLUS, anon_sym_EQ_EQ_EQ, - [2986] = 1, - ACTIONS(207), 6, - anon_sym_LPAREN, + [3134] = 1, + ACTIONS(163), 6, anon_sym_DOT, + anon_sym_LPAREN, anon_sym_COMMA, anon_sym_RBRACK, anon_sym_PLUS_PLUS, anon_sym_EQ_EQ_EQ, - [2995] = 1, - ACTIONS(179), 6, - anon_sym_LPAREN, + [3143] = 1, + ACTIONS(211), 6, anon_sym_DOT, + anon_sym_LPAREN, anon_sym_COMMA, anon_sym_RBRACK, anon_sym_PLUS_PLUS, anon_sym_EQ_EQ_EQ, - [3004] = 1, - ACTIONS(167), 6, - anon_sym_LPAREN, + [3152] = 1, + ACTIONS(203), 6, anon_sym_DOT, + anon_sym_LPAREN, anon_sym_COMMA, anon_sym_RBRACK, anon_sym_PLUS_PLUS, anon_sym_EQ_EQ_EQ, - [3013] = 1, - ACTIONS(187), 6, - anon_sym_LPAREN, + [3161] = 1, + ACTIONS(195), 6, anon_sym_DOT, + anon_sym_LPAREN, anon_sym_COMMA, anon_sym_RBRACK, anon_sym_PLUS_PLUS, anon_sym_EQ_EQ_EQ, - [3022] = 1, + [3170] = 1, ACTIONS(159), 6, - anon_sym_LPAREN, anon_sym_DOT, + anon_sym_LPAREN, anon_sym_COMMA, anon_sym_RBRACK, anon_sym_PLUS_PLUS, anon_sym_EQ_EQ_EQ, - [3031] = 1, - ACTIONS(191), 6, - anon_sym_LPAREN, + [3179] = 1, + ACTIONS(199), 6, anon_sym_DOT, + anon_sym_LPAREN, anon_sym_COMMA, anon_sym_RBRACK, anon_sym_PLUS_PLUS, anon_sym_EQ_EQ_EQ, - [3040] = 1, - ACTIONS(195), 6, - anon_sym_LPAREN, + [3188] = 4, + STATE(115), 1, + sym_qualifier, + STATE(126), 1, + sym_qualifier_list, + ACTIONS(405), 2, + anon_sym_extern, + anon_sym_pure, + ACTIONS(407), 2, + anon_sym_fn, + anon_sym_class, + [3203] = 1, + ACTIONS(191), 6, anon_sym_DOT, + anon_sym_LPAREN, anon_sym_COMMA, anon_sym_RBRACK, anon_sym_PLUS_PLUS, anon_sym_EQ_EQ_EQ, - [3049] = 1, - ACTIONS(199), 6, - anon_sym_LPAREN, + [3212] = 5, + ACTIONS(231), 1, anon_sym_DOT, - anon_sym_COMMA, - anon_sym_RBRACK, + ACTIONS(233), 1, + anon_sym_LPAREN, + ACTIONS(277), 1, + anon_sym_COLON, + STATE(24), 1, + sym_overloadable_operator, + ACTIONS(235), 2, anon_sym_PLUS_PLUS, anon_sym_EQ_EQ_EQ, - [3058] = 1, - ACTIONS(203), 6, - anon_sym_LPAREN, + [3229] = 1, + ACTIONS(167), 6, anon_sym_DOT, + anon_sym_LPAREN, anon_sym_COMMA, anon_sym_RBRACK, anon_sym_PLUS_PLUS, anon_sym_EQ_EQ_EQ, - [3067] = 1, - ACTIONS(211), 6, - anon_sym_LPAREN, + [3238] = 1, + ACTIONS(183), 6, anon_sym_DOT, + anon_sym_LPAREN, anon_sym_COMMA, anon_sym_RBRACK, anon_sym_PLUS_PLUS, anon_sym_EQ_EQ_EQ, - [3076] = 5, + [3247] = 5, ACTIONS(231), 1, - anon_sym_LPAREN, - ACTIONS(233), 1, anon_sym_DOT, - ACTIONS(391), 1, + ACTIONS(233), 1, + anon_sym_LPAREN, + ACTIONS(409), 1, anon_sym_RPAREN, - STATE(28), 1, + STATE(24), 1, sym_overloadable_operator, ACTIONS(235), 2, anon_sym_PLUS_PLUS, anon_sym_EQ_EQ_EQ, - [3093] = 1, - ACTIONS(171), 6, - anon_sym_LPAREN, + [3264] = 1, + ACTIONS(175), 6, anon_sym_DOT, + anon_sym_LPAREN, anon_sym_COMMA, anon_sym_RBRACK, anon_sym_PLUS_PLUS, anon_sym_EQ_EQ_EQ, - [3102] = 5, - ACTIONS(231), 1, - anon_sym_LPAREN, - ACTIONS(233), 1, - anon_sym_DOT, - ACTIONS(269), 1, - anon_sym_COLON, - STATE(28), 1, - sym_overloadable_operator, - ACTIONS(235), 2, - anon_sym_PLUS_PLUS, - anon_sym_EQ_EQ_EQ, - [3119] = 1, - ACTIONS(393), 4, + [3273] = 1, + ACTIONS(411), 4, anon_sym_extern, anon_sym_pure, anon_sym_fn, anon_sym_class, - [3126] = 2, - ACTIONS(373), 1, + [3280] = 2, + ACTIONS(399), 1, anon_sym_COLON, - ACTIONS(371), 2, + ACTIONS(397), 2, anon_sym_RPAREN, anon_sym_COMMA, - [3134] = 1, - ACTIONS(395), 2, + [3288] = 1, + ACTIONS(413), 2, anon_sym_RPAREN, anon_sym_COMMA, - [3139] = 2, - ACTIONS(397), 1, - anon_sym_RBRACE, - ACTIONS(399), 1, - anon_sym_COMMA, - [3146] = 2, - ACTIONS(401), 1, - anon_sym_fn, - ACTIONS(403), 1, - anon_sym_class, - [3153] = 2, - ACTIONS(405), 1, + [3293] = 2, + ACTIONS(415), 1, anon_sym_RPAREN, - ACTIONS(407), 1, + ACTIONS(417), 1, anon_sym_COMMA, - [3160] = 1, - ACTIONS(409), 2, + [3300] = 1, + ACTIONS(419), 2, anon_sym_fn, anon_sym_class, - [3165] = 1, - ACTIONS(411), 1, - anon_sym_LBRACE, - [3169] = 1, - ACTIONS(413), 1, - anon_sym_GT, - [3173] = 1, - ACTIONS(415), 1, - anon_sym_RBRACK, - [3177] = 1, - ACTIONS(417), 1, - anon_sym_RBRACE, - [3181] = 1, - ACTIONS(419), 1, - anon_sym_RBRACK, - [3185] = 1, + [3305] = 2, ACTIONS(421), 1, - anon_sym_LBRACE, - [3189] = 1, + anon_sym_RBRACE, ACTIONS(423), 1, - anon_sym_RPAREN, - [3193] = 1, + anon_sym_COMMA, + [3312] = 2, ACTIONS(425), 1, - anon_sym_RPAREN, - [3197] = 1, + anon_sym_fn, ACTIONS(427), 1, - anon_sym_COMMA, - [3201] = 1, + anon_sym_class, + [3319] = 1, ACTIONS(429), 1, - anon_sym_GT, - [3205] = 1, + anon_sym_COMMA, + [3323] = 1, ACTIONS(431), 1, - anon_sym_RPAREN, - [3209] = 1, + anon_sym_RBRACK, + [3327] = 1, ACTIONS(433), 1, - anon_sym_RBRACE, - [3213] = 1, + anon_sym_LBRACE, + [3331] = 1, ACTIONS(435), 1, - anon_sym_RBRACE, - [3217] = 1, + anon_sym_GT, + [3335] = 1, ACTIONS(437), 1, - anon_sym_RPAREN, - [3221] = 1, + anon_sym_RBRACK, + [3339] = 1, ACTIONS(439), 1, sym_doc_comment_content, - [3225] = 1, + [3343] = 1, ACTIONS(441), 1, - anon_sym_RBRACK, - [3229] = 1, + anon_sym_LBRACE, + [3347] = 1, ACTIONS(443), 1, - ts_builtin_sym_end, - [3233] = 1, + anon_sym_RPAREN, + [3351] = 1, ACTIONS(445), 1, anon_sym_RPAREN, - [3237] = 1, + [3355] = 1, ACTIONS(447), 1, + anon_sym_GT, + [3359] = 1, + ACTIONS(449), 1, + anon_sym_RPAREN, + [3363] = 1, + ACTIONS(451), 1, anon_sym_RPAREN, + [3367] = 1, + ACTIONS(453), 1, + anon_sym_RBRACE, + [3371] = 1, + ACTIONS(455), 1, + anon_sym_RBRACE, + [3375] = 1, + ACTIONS(457), 1, + anon_sym_RPAREN, + [3379] = 1, + ACTIONS(459), 1, + anon_sym_RBRACK, + [3383] = 1, + ACTIONS(461), 1, + ts_builtin_sym_end, + [3387] = 1, + ACTIONS(463), 1, + anon_sym_RPAREN, + [3391] = 1, + ACTIONS(465), 1, + anon_sym_RBRACE, }; static const uint32_t ts_small_parse_table_map[] = { @@ -5348,327 +5511,342 @@ static const uint32_t ts_small_parse_table_map[] = { [SMALL_STATE(31)] = 535, [SMALL_STATE(32)] = 572, [SMALL_STATE(33)] = 609, - [SMALL_STATE(34)] = 649, + [SMALL_STATE(34)] = 647, [SMALL_STATE(35)] = 687, [SMALL_STATE(36)] = 725, [SMALL_STATE(37)] = 768, - [SMALL_STATE(38)] = 811, - [SMALL_STATE(39)] = 846, - [SMALL_STATE(40)] = 881, - [SMALL_STATE(41)] = 916, - [SMALL_STATE(42)] = 959, - [SMALL_STATE(43)] = 1000, - [SMALL_STATE(44)] = 1037, - [SMALL_STATE(45)] = 1072, + [SMALL_STATE(38)] = 805, + [SMALL_STATE(39)] = 848, + [SMALL_STATE(40)] = 883, + [SMALL_STATE(41)] = 918, + [SMALL_STATE(42)] = 953, + [SMALL_STATE(43)] = 996, + [SMALL_STATE(44)] = 1039, + [SMALL_STATE(45)] = 1080, [SMALL_STATE(46)] = 1115, - [SMALL_STATE(47)] = 1158, - [SMALL_STATE(48)] = 1215, - [SMALL_STATE(49)] = 1274, + [SMALL_STATE(47)] = 1172, + [SMALL_STATE(48)] = 1231, + [SMALL_STATE(49)] = 1290, [SMALL_STATE(50)] = 1333, [SMALL_STATE(51)] = 1390, [SMALL_STATE(52)] = 1444, - [SMALL_STATE(53)] = 1498, - [SMALL_STATE(54)] = 1552, - [SMALL_STATE(55)] = 1606, - [SMALL_STATE(56)] = 1660, - [SMALL_STATE(57)] = 1692, + [SMALL_STATE(53)] = 1476, + [SMALL_STATE(54)] = 1510, + [SMALL_STATE(55)] = 1564, + [SMALL_STATE(56)] = 1618, + [SMALL_STATE(57)] = 1672, [SMALL_STATE(58)] = 1726, - [SMALL_STATE(59)] = 1757, - [SMALL_STATE(60)] = 1788, - [SMALL_STATE(61)] = 1819, - [SMALL_STATE(62)] = 1850, - [SMALL_STATE(63)] = 1881, - [SMALL_STATE(64)] = 1912, - [SMALL_STATE(65)] = 1963, - [SMALL_STATE(66)] = 2014, - [SMALL_STATE(67)] = 2045, - [SMALL_STATE(68)] = 2076, - [SMALL_STATE(69)] = 2107, - [SMALL_STATE(70)] = 2138, - [SMALL_STATE(71)] = 2169, - [SMALL_STATE(72)] = 2200, - [SMALL_STATE(73)] = 2231, - [SMALL_STATE(74)] = 2279, - [SMALL_STATE(75)] = 2327, - [SMALL_STATE(76)] = 2357, - [SMALL_STATE(77)] = 2405, - [SMALL_STATE(78)] = 2453, - [SMALL_STATE(79)] = 2501, - [SMALL_STATE(80)] = 2549, - [SMALL_STATE(81)] = 2578, - [SMALL_STATE(82)] = 2607, - [SMALL_STATE(83)] = 2636, - [SMALL_STATE(84)] = 2665, - [SMALL_STATE(85)] = 2694, - [SMALL_STATE(86)] = 2716, - [SMALL_STATE(87)] = 2738, - [SMALL_STATE(88)] = 2761, - [SMALL_STATE(89)] = 2778, - [SMALL_STATE(90)] = 2795, - [SMALL_STATE(91)] = 2812, - [SMALL_STATE(92)] = 2829, - [SMALL_STATE(93)] = 2846, - [SMALL_STATE(94)] = 2866, - [SMALL_STATE(95)] = 2884, - [SMALL_STATE(96)] = 2898, - [SMALL_STATE(97)] = 2918, - [SMALL_STATE(98)] = 2927, - [SMALL_STATE(99)] = 2936, - [SMALL_STATE(100)] = 2953, - [SMALL_STATE(101)] = 2968, - [SMALL_STATE(102)] = 2977, - [SMALL_STATE(103)] = 2986, - [SMALL_STATE(104)] = 2995, - [SMALL_STATE(105)] = 3004, - [SMALL_STATE(106)] = 3013, - [SMALL_STATE(107)] = 3022, - [SMALL_STATE(108)] = 3031, - [SMALL_STATE(109)] = 3040, - [SMALL_STATE(110)] = 3049, - [SMALL_STATE(111)] = 3058, - [SMALL_STATE(112)] = 3067, - [SMALL_STATE(113)] = 3076, - [SMALL_STATE(114)] = 3093, - [SMALL_STATE(115)] = 3102, - [SMALL_STATE(116)] = 3119, - [SMALL_STATE(117)] = 3126, - [SMALL_STATE(118)] = 3134, - [SMALL_STATE(119)] = 3139, - [SMALL_STATE(120)] = 3146, - [SMALL_STATE(121)] = 3153, - [SMALL_STATE(122)] = 3160, - [SMALL_STATE(123)] = 3165, - [SMALL_STATE(124)] = 3169, - [SMALL_STATE(125)] = 3173, - [SMALL_STATE(126)] = 3177, - [SMALL_STATE(127)] = 3181, - [SMALL_STATE(128)] = 3185, - [SMALL_STATE(129)] = 3189, - [SMALL_STATE(130)] = 3193, - [SMALL_STATE(131)] = 3197, - [SMALL_STATE(132)] = 3201, - [SMALL_STATE(133)] = 3205, - [SMALL_STATE(134)] = 3209, - [SMALL_STATE(135)] = 3213, - [SMALL_STATE(136)] = 3217, - [SMALL_STATE(137)] = 3221, - [SMALL_STATE(138)] = 3225, - [SMALL_STATE(139)] = 3229, - [SMALL_STATE(140)] = 3233, - [SMALL_STATE(141)] = 3237, + [SMALL_STATE(59)] = 1760, + [SMALL_STATE(60)] = 1791, + [SMALL_STATE(61)] = 1822, + [SMALL_STATE(62)] = 1853, + [SMALL_STATE(63)] = 1884, + [SMALL_STATE(64)] = 1915, + [SMALL_STATE(65)] = 1966, + [SMALL_STATE(66)] = 1997, + [SMALL_STATE(67)] = 2028, + [SMALL_STATE(68)] = 2059, + [SMALL_STATE(69)] = 2090, + [SMALL_STATE(70)] = 2141, + [SMALL_STATE(71)] = 2172, + [SMALL_STATE(72)] = 2203, + [SMALL_STATE(73)] = 2234, + [SMALL_STATE(74)] = 2265, + [SMALL_STATE(75)] = 2296, + [SMALL_STATE(76)] = 2327, + [SMALL_STATE(77)] = 2375, + [SMALL_STATE(78)] = 2405, + [SMALL_STATE(79)] = 2453, + [SMALL_STATE(80)] = 2501, + [SMALL_STATE(81)] = 2549, + [SMALL_STATE(82)] = 2597, + [SMALL_STATE(83)] = 2645, + [SMALL_STATE(84)] = 2674, + [SMALL_STATE(85)] = 2703, + [SMALL_STATE(86)] = 2732, + [SMALL_STATE(87)] = 2761, + [SMALL_STATE(88)] = 2790, + [SMALL_STATE(89)] = 2812, + [SMALL_STATE(90)] = 2834, + [SMALL_STATE(91)] = 2860, + [SMALL_STATE(92)] = 2883, + [SMALL_STATE(93)] = 2903, + [SMALL_STATE(94)] = 2923, + [SMALL_STATE(95)] = 2940, + [SMALL_STATE(96)] = 2957, + [SMALL_STATE(97)] = 2974, + [SMALL_STATE(98)] = 2991, + [SMALL_STATE(99)] = 3009, + [SMALL_STATE(100)] = 3029, + [SMALL_STATE(101)] = 3049, + [SMALL_STATE(102)] = 3063, + [SMALL_STATE(103)] = 3072, + [SMALL_STATE(104)] = 3081, + [SMALL_STATE(105)] = 3090, + [SMALL_STATE(106)] = 3107, + [SMALL_STATE(107)] = 3116, + [SMALL_STATE(108)] = 3125, + [SMALL_STATE(109)] = 3134, + [SMALL_STATE(110)] = 3143, + [SMALL_STATE(111)] = 3152, + [SMALL_STATE(112)] = 3161, + [SMALL_STATE(113)] = 3170, + [SMALL_STATE(114)] = 3179, + [SMALL_STATE(115)] = 3188, + [SMALL_STATE(116)] = 3203, + [SMALL_STATE(117)] = 3212, + [SMALL_STATE(118)] = 3229, + [SMALL_STATE(119)] = 3238, + [SMALL_STATE(120)] = 3247, + [SMALL_STATE(121)] = 3264, + [SMALL_STATE(122)] = 3273, + [SMALL_STATE(123)] = 3280, + [SMALL_STATE(124)] = 3288, + [SMALL_STATE(125)] = 3293, + [SMALL_STATE(126)] = 3300, + [SMALL_STATE(127)] = 3305, + [SMALL_STATE(128)] = 3312, + [SMALL_STATE(129)] = 3319, + [SMALL_STATE(130)] = 3323, + [SMALL_STATE(131)] = 3327, + [SMALL_STATE(132)] = 3331, + [SMALL_STATE(133)] = 3335, + [SMALL_STATE(134)] = 3339, + [SMALL_STATE(135)] = 3343, + [SMALL_STATE(136)] = 3347, + [SMALL_STATE(137)] = 3351, + [SMALL_STATE(138)] = 3355, + [SMALL_STATE(139)] = 3359, + [SMALL_STATE(140)] = 3363, + [SMALL_STATE(141)] = 3367, + [SMALL_STATE(142)] = 3371, + [SMALL_STATE(143)] = 3375, + [SMALL_STATE(144)] = 3379, + [SMALL_STATE(145)] = 3383, + [SMALL_STATE(146)] = 3387, + [SMALL_STATE(147)] = 3391, }; static const TSParseActionEntry ts_parse_actions[] = { [0] = {.entry = {.count = 0, .reusable = false}}, [1] = {.entry = {.count = 1, .reusable = false}}, RECOVER(), [3] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 0), - [5] = {.entry = {.count = 1, .reusable = true}}, SHIFT(3), - [7] = {.entry = {.count = 1, .reusable = true}}, SHIFT(137), + [5] = {.entry = {.count = 1, .reusable = true}}, SHIFT(2), + [7] = {.entry = {.count = 1, .reusable = true}}, SHIFT(134), [9] = {.entry = {.count = 1, .reusable = true}}, SHIFT(4), [11] = {.entry = {.count = 1, .reusable = false}}, SHIFT(90), - [13] = {.entry = {.count = 1, .reusable = false}}, SHIFT(116), - [15] = {.entry = {.count = 1, .reusable = false}}, SHIFT(86), - [17] = {.entry = {.count = 1, .reusable = true}}, SHIFT(78), - [19] = {.entry = {.count = 1, .reusable = false}}, SHIFT(88), - [21] = {.entry = {.count = 1, .reusable = false}}, SHIFT(76), - [23] = {.entry = {.count = 1, .reusable = false}}, SHIFT(77), + [13] = {.entry = {.count = 1, .reusable = false}}, SHIFT(122), + [15] = {.entry = {.count = 1, .reusable = false}}, SHIFT(88), + [17] = {.entry = {.count = 1, .reusable = true}}, SHIFT(81), + [19] = {.entry = {.count = 1, .reusable = false}}, SHIFT(95), + [21] = {.entry = {.count = 1, .reusable = false}}, SHIFT(80), + [23] = {.entry = {.count = 1, .reusable = false}}, SHIFT(79), [25] = {.entry = {.count = 1, .reusable = false}}, SHIFT(17), - [27] = {.entry = {.count = 1, .reusable = false}}, SHIFT(53), + [27] = {.entry = {.count = 1, .reusable = false}}, SHIFT(55), [29] = {.entry = {.count = 1, .reusable = false}}, SHIFT(18), [31] = {.entry = {.count = 1, .reusable = false}}, SHIFT(19), - [33] = {.entry = {.count = 1, .reusable = true}}, SHIFT(29), - [35] = {.entry = {.count = 1, .reusable = false}}, SHIFT(27), - [37] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2), - [39] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(2), - [42] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(137), - [45] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(4), - [48] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(90), - [51] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(116), - [54] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(86), - [57] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(78), - [60] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(88), - [63] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(76), - [66] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(77), - [69] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(17), - [72] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(53), - [75] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(18), - [78] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(19), - [81] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(29), - [84] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(27), - [87] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 1), - [89] = {.entry = {.count = 1, .reusable = true}}, SHIFT(2), - [91] = {.entry = {.count = 1, .reusable = true}}, SHIFT(43), - [93] = {.entry = {.count = 1, .reusable = true}}, SHIFT(70), - [95] = {.entry = {.count = 1, .reusable = true}}, SHIFT(63), - [97] = {.entry = {.count = 1, .reusable = true}}, SHIFT(62), - [99] = {.entry = {.count = 1, .reusable = true}}, SHIFT(69), - [101] = {.entry = {.count = 1, .reusable = true}}, SHIFT(68), + [33] = {.entry = {.count = 1, .reusable = true}}, SHIFT(31), + [35] = {.entry = {.count = 1, .reusable = false}}, SHIFT(29), + [37] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 1), + [39] = {.entry = {.count = 1, .reusable = true}}, SHIFT(3), + [41] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2), + [43] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(3), + [46] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(134), + [49] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(4), + [52] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(90), + [55] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(122), + [58] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(88), + [61] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(81), + [64] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(95), + [67] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(80), + [70] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(79), + [73] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(17), + [76] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(55), + [79] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(18), + [82] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(19), + [85] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(31), + [88] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(29), + [91] = {.entry = {.count = 1, .reusable = true}}, SHIFT(37), + [93] = {.entry = {.count = 1, .reusable = true}}, SHIFT(61), + [95] = {.entry = {.count = 1, .reusable = true}}, SHIFT(68), + [97] = {.entry = {.count = 1, .reusable = true}}, SHIFT(75), + [99] = {.entry = {.count = 1, .reusable = true}}, SHIFT(74), + [101] = {.entry = {.count = 1, .reusable = true}}, SHIFT(60), [103] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_block_repeat1, 2), SHIFT_REPEAT(4), [106] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_block_repeat1, 2), [108] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_block_repeat1, 2), SHIFT_REPEAT(90), - [111] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_block_repeat1, 2), SHIFT_REPEAT(116), - [114] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_block_repeat1, 2), SHIFT_REPEAT(86), - [117] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_block_repeat1, 2), SHIFT_REPEAT(78), - [120] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_block_repeat1, 2), SHIFT_REPEAT(88), - [123] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_block_repeat1, 2), SHIFT_REPEAT(76), - [126] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_block_repeat1, 2), SHIFT_REPEAT(77), + [111] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_block_repeat1, 2), SHIFT_REPEAT(122), + [114] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_block_repeat1, 2), SHIFT_REPEAT(88), + [117] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_block_repeat1, 2), SHIFT_REPEAT(81), + [120] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_block_repeat1, 2), SHIFT_REPEAT(95), + [123] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_block_repeat1, 2), SHIFT_REPEAT(80), + [126] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_block_repeat1, 2), SHIFT_REPEAT(79), [129] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_block_repeat1, 2), SHIFT_REPEAT(17), - [132] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_block_repeat1, 2), SHIFT_REPEAT(53), + [132] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_block_repeat1, 2), SHIFT_REPEAT(55), [135] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_block_repeat1, 2), SHIFT_REPEAT(18), [138] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_block_repeat1, 2), SHIFT_REPEAT(19), - [141] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_block_repeat1, 2), SHIFT_REPEAT(29), - [144] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_block_repeat1, 2), SHIFT_REPEAT(27), - [147] = {.entry = {.count = 1, .reusable = true}}, SHIFT(49), - [149] = {.entry = {.count = 1, .reusable = true}}, SHIFT(48), + [141] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_block_repeat1, 2), SHIFT_REPEAT(31), + [144] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_block_repeat1, 2), SHIFT_REPEAT(29), + [147] = {.entry = {.count = 1, .reusable = true}}, SHIFT(48), + [149] = {.entry = {.count = 1, .reusable = true}}, SHIFT(47), [151] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_return, 1), [153] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_return, 1), [155] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_primitive_type, 1), [157] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_primitive_type, 1), [159] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_identifier, 1), [161] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_identifier, 1), - [163] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_access_list, 3, .production_id = 9), - [165] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_access_list, 3, .production_id = 9), - [167] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_map, 2), - [169] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_map, 2), - [171] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_expression, 1), - [173] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_expression, 1), - [175] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_vec, 3), - [177] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_vec, 3), - [179] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parenthesized_expression, 3, .production_id = 7), - [181] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_parenthesized_expression, 3, .production_id = 7), - [183] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_call, 4, .production_id = 14), - [185] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_call, 4, .production_id = 14), - [187] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_map, 3), - [189] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_map, 3), - [191] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_bool, 1), - [193] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_bool, 1), - [195] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_binary_expression, 2, .production_id = 4), - [197] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_binary_expression, 2, .production_id = 4), - [199] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_literal, 1), - [201] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_literal, 1), - [203] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_vec, 2), - [205] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_vec, 2), - [207] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_call, 3, .production_id = 8), - [209] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_call, 3, .production_id = 8), - [211] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_overloadable_operator, 1), - [213] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_overloadable_operator, 1), - [215] = {.entry = {.count = 1, .reusable = true}}, SHIFT(82), - [217] = {.entry = {.count = 1, .reusable = false}}, SHIFT(79), - [219] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type_name, 1), - [221] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_type_name, 1), - [223] = {.entry = {.count = 1, .reusable = true}}, SHIFT(83), - [225] = {.entry = {.count = 1, .reusable = true}}, SHIFT(84), - [227] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_print, 2, .production_id = 2), - [229] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_print, 2, .production_id = 2), - [231] = {.entry = {.count = 1, .reusable = true}}, SHIFT(51), - [233] = {.entry = {.count = 1, .reusable = true}}, SHIFT(92), - [235] = {.entry = {.count = 1, .reusable = true}}, SHIFT(32), - [237] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_statement, 1), - [239] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_statement, 1), - [241] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type, 4), - [243] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_type, 4), - [245] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type, 6), - [247] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_type, 6), - [249] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_assert, 2, .production_id = 3), - [251] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_assert, 2, .production_id = 3), - [253] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_return, 2), - [255] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_return, 2), - [257] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_block, 2), - [259] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_block, 2), - [261] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type, 1), - [263] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_type, 1), - [265] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_assignment, 3, .production_id = 10), - [267] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_assignment, 3, .production_id = 10), - [269] = {.entry = {.count = 1, .reusable = true}}, SHIFT(73), - [271] = {.entry = {.count = 1, .reusable = true}}, SHIFT(50), - [273] = {.entry = {.count = 1, .reusable = true}}, SHIFT(105), - [275] = {.entry = {.count = 1, .reusable = true}}, SHIFT(11), - [277] = {.entry = {.count = 1, .reusable = true}}, SHIFT(14), - [279] = {.entry = {.count = 1, .reusable = true}}, SHIFT(21), - [281] = {.entry = {.count = 1, .reusable = true}}, SHIFT(31), - [283] = {.entry = {.count = 1, .reusable = true}}, SHIFT(103), - [285] = {.entry = {.count = 1, .reusable = true}}, SHIFT(47), - [287] = {.entry = {.count = 1, .reusable = true}}, SHIFT(74), - [289] = {.entry = {.count = 1, .reusable = false}}, SHIFT(54), - [291] = {.entry = {.count = 1, .reusable = false}}, SHIFT(30), - [293] = {.entry = {.count = 1, .reusable = false}}, SHIFT(98), - [295] = {.entry = {.count = 1, .reusable = false}}, SHIFT(107), - [297] = {.entry = {.count = 1, .reusable = true}}, SHIFT(110), - [299] = {.entry = {.count = 1, .reusable = false}}, SHIFT(108), - [301] = {.entry = {.count = 1, .reusable = false}}, SHIFT(111), - [303] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_var_declaration, 3), - [305] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_var_declaration, 3), - [307] = {.entry = {.count = 1, .reusable = true}}, SHIFT(79), - [309] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_declaration, 6, .production_id = 18), - [311] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_declaration, 6, .production_id = 18), - [313] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_declaration, 3, .production_id = 6), - [315] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_declaration, 3, .production_id = 6), - [317] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_declaration, 7, .production_id = 21), - [319] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_declaration, 7, .production_id = 21), - [321] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_import, 2, .production_id = 1), - [323] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_import, 2, .production_id = 1), - [325] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_block, 3, .production_id = 5), - [327] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_block, 3, .production_id = 5), - [329] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_class_declaration, 5, .production_id = 16), - [331] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_class_declaration, 5, .production_id = 16), - [333] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_declaration, 4, .production_id = 13), - [335] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_declaration, 4, .production_id = 13), - [337] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_class_declaration, 4, .production_id = 12), - [339] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_class_declaration, 4, .production_id = 12), - [341] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_class_declaration, 6, .production_id = 20), - [343] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_class_declaration, 6, .production_id = 20), - [345] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_class_declaration, 5, .production_id = 17), - [347] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_class_declaration, 5, .production_id = 17), - [349] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_declaration, 6, .production_id = 19), - [351] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_declaration, 6, .production_id = 19), - [353] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_declaration, 5, .production_id = 15), - [355] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_declaration, 5, .production_id = 15), - [357] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_doc_comment, 2), - [359] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_doc_comment, 2), - [361] = {.entry = {.count = 1, .reusable = false}}, SHIFT(35), - [363] = {.entry = {.count = 1, .reusable = false}}, SHIFT(34), - [365] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_argument_list, 1), - [367] = {.entry = {.count = 1, .reusable = true}}, SHIFT(65), - [369] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_map_item, 3, .production_id = 11), - [371] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_param, 1), - [373] = {.entry = {.count = 1, .reusable = true}}, SHIFT(80), - [375] = {.entry = {.count = 1, .reusable = true}}, SHIFT(52), - [377] = {.entry = {.count = 1, .reusable = true}}, SHIFT(89), - [379] = {.entry = {.count = 1, .reusable = true}}, SHIFT(64), - [381] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_expression_list, 1), - [383] = {.entry = {.count = 1, .reusable = true}}, SHIFT(112), - [385] = {.entry = {.count = 1, .reusable = true}}, SHIFT(104), - [387] = {.entry = {.count = 1, .reusable = true}}, SHIFT(116), - [389] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_qualifier_list, 1), - [391] = {.entry = {.count = 1, .reusable = true}}, SHIFT(24), - [393] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_qualifier, 1), - [395] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_param, 3), - [397] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_map_item_list, 1), - [399] = {.entry = {.count = 1, .reusable = true}}, SHIFT(55), - [401] = {.entry = {.count = 1, .reusable = true}}, SHIFT(85), - [403] = {.entry = {.count = 1, .reusable = true}}, SHIFT(91), - [405] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_param_list, 1), - [407] = {.entry = {.count = 1, .reusable = true}}, SHIFT(87), - [409] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_qualifier_list, 2), - [411] = {.entry = {.count = 1, .reusable = true}}, SHIFT(9), - [413] = {.entry = {.count = 1, .reusable = true}}, SHIFT(40), - [415] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_expression_list, 3), - [417] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_map_item_list, 3), - [419] = {.entry = {.count = 1, .reusable = true}}, SHIFT(23), - [421] = {.entry = {.count = 1, .reusable = true}}, SHIFT(5), - [423] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_param_list, 3), - [425] = {.entry = {.count = 1, .reusable = true}}, SHIFT(12), - [427] = {.entry = {.count = 1, .reusable = true}}, SHIFT(81), - [429] = {.entry = {.count = 1, .reusable = true}}, SHIFT(39), - [431] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_argument_list, 3), - [433] = {.entry = {.count = 1, .reusable = true}}, SHIFT(26), - [435] = {.entry = {.count = 1, .reusable = true}}, SHIFT(106), - [437] = {.entry = {.count = 1, .reusable = true}}, SHIFT(25), - [439] = {.entry = {.count = 1, .reusable = true}}, SHIFT(75), - [441] = {.entry = {.count = 1, .reusable = true}}, SHIFT(97), - [443] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), - [445] = {.entry = {.count = 1, .reusable = true}}, SHIFT(101), - [447] = {.entry = {.count = 1, .reusable = true}}, SHIFT(13), + [163] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_call, 3, .production_id = 10), + [165] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_call, 3, .production_id = 10), + [167] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_map, 3), + [169] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_map, 3), + [171] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_call, 4, .production_id = 15), + [173] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_call, 4, .production_id = 15), + [175] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_vec, 2), + [177] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_vec, 2), + [179] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_binary_expression, 2, .production_id = 4), + [181] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_binary_expression, 2, .production_id = 4), + [183] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_overloadable_operator, 1), + [185] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_overloadable_operator, 1), + [187] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_expression, 1), + [189] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_expression, 1), + [191] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_map, 2), + [193] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_map, 2), + [195] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parenthesized_expression, 3, .production_id = 8), + [197] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_parenthesized_expression, 3, .production_id = 8), + [199] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_bool, 1), + [201] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_bool, 1), + [203] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_vec, 3), + [205] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_vec, 3), + [207] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_literal, 1), + [209] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_literal, 1), + [211] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_access_list, 3, .production_id = 9), + [213] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_access_list, 3, .production_id = 9), + [215] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type_name, 1), + [217] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_type_name, 1), + [219] = {.entry = {.count = 1, .reusable = true}}, SHIFT(87), + [221] = {.entry = {.count = 1, .reusable = true}}, SHIFT(84), + [223] = {.entry = {.count = 1, .reusable = false}}, SHIFT(76), + [225] = {.entry = {.count = 1, .reusable = true}}, SHIFT(83), + [227] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_assignment, 3, .production_id = 11), + [229] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_assignment, 3, .production_id = 11), + [231] = {.entry = {.count = 1, .reusable = true}}, SHIFT(96), + [233] = {.entry = {.count = 1, .reusable = true}}, SHIFT(54), + [235] = {.entry = {.count = 1, .reusable = true}}, SHIFT(25), + [237] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_block, 2), + [239] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_block, 2), + [241] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_statement, 1), + [243] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_statement, 1), + [245] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type, 1), + [247] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_type, 1), + [249] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type, 6), + [251] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_type, 6), + [253] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_type, 4), + [255] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_type, 4), + [257] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_print, 2, .production_id = 2), + [259] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_print, 2, .production_id = 2), + [261] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_assert, 2, .production_id = 3), + [263] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_assert, 2, .production_id = 3), + [265] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_return, 2), + [267] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_return, 2), + [269] = {.entry = {.count = 1, .reusable = true}}, SHIFT(46), + [271] = {.entry = {.count = 1, .reusable = true}}, SHIFT(27), + [273] = {.entry = {.count = 1, .reusable = true}}, SHIFT(14), + [275] = {.entry = {.count = 1, .reusable = true}}, SHIFT(12), + [277] = {.entry = {.count = 1, .reusable = true}}, SHIFT(78), + [279] = {.entry = {.count = 1, .reusable = true}}, SHIFT(116), + [281] = {.entry = {.count = 1, .reusable = true}}, SHIFT(109), + [283] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_var_declaration, 3), + [285] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_var_declaration, 3), + [287] = {.entry = {.count = 1, .reusable = true}}, SHIFT(76), + [289] = {.entry = {.count = 1, .reusable = true}}, SHIFT(20), + [291] = {.entry = {.count = 1, .reusable = true}}, SHIFT(50), + [293] = {.entry = {.count = 1, .reusable = true}}, SHIFT(82), + [295] = {.entry = {.count = 1, .reusable = false}}, SHIFT(56), + [297] = {.entry = {.count = 1, .reusable = false}}, SHIFT(23), + [299] = {.entry = {.count = 1, .reusable = false}}, SHIFT(103), + [301] = {.entry = {.count = 1, .reusable = false}}, SHIFT(113), + [303] = {.entry = {.count = 1, .reusable = true}}, SHIFT(108), + [305] = {.entry = {.count = 1, .reusable = false}}, SHIFT(114), + [307] = {.entry = {.count = 1, .reusable = false}}, SHIFT(121), + [309] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_import_path, 1), + [311] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_import_path, 1), + [313] = {.entry = {.count = 1, .reusable = true}}, SHIFT(93), + [315] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_declaration, 6, .production_id = 19), + [317] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_declaration, 6, .production_id = 19), + [319] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_class_declaration, 4, .production_id = 13), + [321] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_class_declaration, 4, .production_id = 13), + [323] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_block, 3, .production_id = 5), + [325] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_block, 3, .production_id = 5), + [327] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_declaration, 5, .production_id = 16), + [329] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_declaration, 5, .production_id = 16), + [331] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_import, 3, .production_id = 6), + [333] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_import, 3, .production_id = 6), + [335] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_declaration, 3, .production_id = 7), + [337] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_declaration, 3, .production_id = 7), + [339] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_declaration, 4, .production_id = 14), + [341] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_declaration, 4, .production_id = 14), + [343] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_declaration, 6, .production_id = 20), + [345] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_declaration, 6, .production_id = 20), + [347] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_class_declaration, 6, .production_id = 21), + [349] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_class_declaration, 6, .production_id = 21), + [351] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_import, 2, .production_id = 1), + [353] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_import, 2, .production_id = 1), + [355] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_declaration, 7, .production_id = 22), + [357] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_declaration, 7, .production_id = 22), + [359] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_import_path, 3), + [361] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_import_path, 3), + [363] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_class_declaration, 5, .production_id = 17), + [365] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_class_declaration, 5, .production_id = 17), + [367] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_class_declaration, 5, .production_id = 18), + [369] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_class_declaration, 5, .production_id = 18), + [371] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_doc_comment, 2), + [373] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_doc_comment, 2), + [375] = {.entry = {.count = 1, .reusable = false}}, SHIFT(33), + [377] = {.entry = {.count = 1, .reusable = false}}, SHIFT(35), + [379] = {.entry = {.count = 1, .reusable = true}}, SHIFT(106), + [381] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_map_item, 3, .production_id = 12), + [383] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_arg_list, 1), + [385] = {.entry = {.count = 1, .reusable = true}}, SHIFT(64), + [387] = {.entry = {.count = 1, .reusable = true}}, SHIFT(97), + [389] = {.entry = {.count = 1, .reusable = true}}, SHIFT(51), + [391] = {.entry = {.count = 1, .reusable = true}}, SHIFT(69), + [393] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_expression_list, 1), + [395] = {.entry = {.count = 1, .reusable = true}}, SHIFT(119), + [397] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_param, 1), + [399] = {.entry = {.count = 1, .reusable = true}}, SHIFT(85), + [401] = {.entry = {.count = 1, .reusable = true}}, SHIFT(112), + [403] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_import_relative_dot, 1), + [405] = {.entry = {.count = 1, .reusable = true}}, SHIFT(122), + [407] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_qualifier_list, 1), + [409] = {.entry = {.count = 1, .reusable = true}}, SHIFT(28), + [411] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_qualifier, 1), + [413] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_param, 3), + [415] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_param_list, 1), + [417] = {.entry = {.count = 1, .reusable = true}}, SHIFT(91), + [419] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_qualifier_list, 2), + [421] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_map_item_list, 1), + [423] = {.entry = {.count = 1, .reusable = true}}, SHIFT(57), + [425] = {.entry = {.count = 1, .reusable = true}}, SHIFT(89), + [427] = {.entry = {.count = 1, .reusable = true}}, SHIFT(94), + [429] = {.entry = {.count = 1, .reusable = true}}, SHIFT(86), + [431] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_expression_list, 3), + [433] = {.entry = {.count = 1, .reusable = true}}, SHIFT(9), + [435] = {.entry = {.count = 1, .reusable = true}}, SHIFT(40), + [437] = {.entry = {.count = 1, .reusable = true}}, SHIFT(30), + [439] = {.entry = {.count = 1, .reusable = true}}, SHIFT(77), + [441] = {.entry = {.count = 1, .reusable = true}}, SHIFT(7), + [443] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_param_list, 3), + [445] = {.entry = {.count = 1, .reusable = true}}, SHIFT(13), + [447] = {.entry = {.count = 1, .reusable = true}}, SHIFT(41), + [449] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_arg_list, 3), + [451] = {.entry = {.count = 1, .reusable = true}}, SHIFT(22), + [453] = {.entry = {.count = 1, .reusable = true}}, SHIFT(118), + [455] = {.entry = {.count = 1, .reusable = true}}, SHIFT(21), + [457] = {.entry = {.count = 1, .reusable = true}}, SHIFT(11), + [459] = {.entry = {.count = 1, .reusable = true}}, SHIFT(111), + [461] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), + [463] = {.entry = {.count = 1, .reusable = true}}, SHIFT(107), + [465] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_map_item_list, 3), }; #ifdef __cplusplus diff --git a/test/corpus/import.txt b/test/corpus/import.txt new file mode 100644 index 0000000..d7b71df --- /dev/null +++ b/test/corpus/import.txt @@ -0,0 +1,55 @@ +=== +Imports +=== + +import .relative_import +import global_import +import .nested.relative.import +import nested.global.import + +--- + +(source_file + (statement + (import + (import_relative_dot) + path: (import_path + (identifier) + ) + ) + ) + (statement + (import + path: (import_path + (identifier) + ) + ) + ) + (statement + (import + (import_relative_dot) + path: (import_path + (identifier) + (import_path + (identifier) + (import_path + (identifier) + ) + ) + ) + ) + ) + (statement + (import + path: (import_path + (identifier) + (import_path + (identifier) + (import_path + (identifier) + ) + ) + ) + ) + ) +)