From d17a8ce7a46fa70982fffd94c7da0ad821eba22f Mon Sep 17 00:00:00 2001 From: pivaldi Date: Sun, 25 Jan 2026 23:36:38 +0100 Subject: [PATCH 01/24] Fetch mickeynp/html-ts-mode.git as anonymous submodule instead of ssh --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index 973673f..c0c0b22 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "tests/html-ts-mode"] path = tests/html-ts-mode - url = git@github.com:mickeynp/html-ts-mode.git + url = https://github.com/mickeynp/html-ts-mode.git From 5ad763a17e4dee01c8529cd69161944966a5ca6b Mon Sep 17 00:00:00 2001 From: xvw Date: Wed, 25 Mar 2026 07:51:18 +0100 Subject: [PATCH 02/24] Add OCaml grammars (and related) Co-authored-by: Tim McGilchrist Co-authored-by: PizieDust --- .gitignore | 6 +- .gitmodules | 6 + .ts-setup.el | 3 + .ts-test.el | 11 + build/ocaml-grammar.json | 10728 +++++++++++++++++++++++++++ build/ocaml-nodes.json | 5553 ++++++++++++++ build/ocaml_interface-grammar.json | 10712 ++++++++++++++++++++++++++ build/ocaml_interface-nodes.json | 5537 ++++++++++++++ build/sources.ini | 12 +- 9 files changed, 32563 insertions(+), 5 deletions(-) create mode 100644 build/ocaml-grammar.json create mode 100644 build/ocaml-nodes.json create mode 100644 build/ocaml_interface-grammar.json create mode 100644 build/ocaml_interface-nodes.json diff --git a/.gitignore b/.gitignore index 44c5a09..7c70d9b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,8 @@ -*.elc +elc flycheck* *#* /.envrc + +/pyvenv.cfg +/lib/ +/bin/ diff --git a/.gitmodules b/.gitmodules index c0c0b22..6f34717 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,9 @@ [submodule "tests/html-ts-mode"] path = tests/html-ts-mode url = https://github.com/mickeynp/html-ts-mode.git +[submodule "test/tuareg"] + path = tests/tuareg + url = git@github.com:ocaml/tuareg.git +[submodule "test/ocaml-ts-mode"] + path = tests/ocaml-ts-mode + url = git@github.com:terrateamio/ocaml-ts-mode.git diff --git a/.ts-setup.el b/.ts-setup.el index 4776cef..23afd2d 100644 --- a/.ts-setup.el +++ b/.ts-setup.el @@ -6,6 +6,9 @@ (javascript . ("https://github.com/tree-sitter/tree-sitter-javascript" "v0.20.1" "src")) (json . ("https://github.com/tree-sitter/tree-sitter-json" "v0.20.2")) (go . ("https://github.com/tree-sitter/tree-sitter-go" "v0.20.0")) + (ocaml . ("https://github.com/tree-sitter/tree-sitter-ocaml" "v0.24.2" "grammars/ocaml/src")) + (ocaml_interface . ("https://github.com/tree-sitter/tree-sitter-ocaml" "v0.24.2" "grammars/interface/src")) + (ocaml_type . ("https://github.com/tree-sitter/tree-sitter-ocaml" "v0.24.2" "grammars/type/src")) (python . ("https://github.com/tree-sitter/tree-sitter-python" "v0.20.4")) (toml "https://github.com/tree-sitter/tree-sitter-toml") (tsx . ("https://github.com/tree-sitter/tree-sitter-typescript" "v0.20.3" "tsx/src")) diff --git a/.ts-test.el b/.ts-test.el index edd79c3..0d7a5a0 100644 --- a/.ts-test.el +++ b/.ts-test.el @@ -2,3 +2,14 @@ (setq load-prefer-newer t) (princ (format "Default directory is `%s'\n" default-directory)) (load-library "tests/html-ts-mode/html-ts-mode.el") +(load-library "tests/tuareg/tuareg-opam.el") +(load-library "tests/tuareg/tuareg-compat.el") +(load-library "tests/tuareg/tuareg.el") +;; (load-library "tests/ocaml-ts-mode/ocaml-ts-mode.el") +(load-library "tests/tuareg-treesit.el") + + +(setq auto-mode-alist + (append '(("\\.ml[ily]?\\'" . tuareg-mode) + ("\\.topml\\'" . tuareg-mode)) + auto-mode-alist)) diff --git a/build/ocaml-grammar.json b/build/ocaml-grammar.json new file mode 100644 index 0000000..74dfc3c --- /dev/null +++ b/build/ocaml-grammar.json @@ -0,0 +1,10728 @@ +{ + "$schema": "https://tree-sitter.github.io/tree-sitter/assets/schemas/grammar.schema.json", + "name": "ocaml", + "word": "_lowercase_identifier", + "rules": { + "compilation_unit": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "shebang" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_structure" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "shebang": { + "type": "PATTERN", + "value": "#!.*" + }, + "_structure": { + "type": "CHOICE", + "members": [ + { + "type": "REPEAT1", + "content": { + "type": "STRING", + "value": ";;" + } + }, + { + "type": "SEQ", + "members": [ + { + "type": "REPEAT", + "content": { + "type": "STRING", + "value": ";;" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_structure_item" + }, + { + "type": "SYMBOL", + "name": "toplevel_directive" + }, + { + "type": "SYMBOL", + "name": "expression_item" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "REPEAT", + "content": { + "type": "STRING", + "value": ";;" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_structure_item" + }, + { + "type": "SYMBOL", + "name": "toplevel_directive" + } + ] + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "REPEAT1", + "content": { + "type": "STRING", + "value": ";;" + } + }, + { + "type": "SYMBOL", + "name": "expression_item" + } + ] + } + ] + } + }, + { + "type": "REPEAT", + "content": { + "type": "STRING", + "value": ";;" + } + } + ] + } + ] + }, + "expression_item": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_sequence_expression" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "item_attribute" + } + } + ] + }, + "_signature": { + "type": "CHOICE", + "members": [ + { + "type": "REPEAT1", + "content": { + "type": "STRING", + "value": ";;" + } + }, + { + "type": "SEQ", + "members": [ + { + "type": "REPEAT1", + "content": { + "type": "SEQ", + "members": [ + { + "type": "REPEAT", + "content": { + "type": "STRING", + "value": ";;" + } + }, + { + "type": "SYMBOL", + "name": "_signature_item" + } + ] + } + }, + { + "type": "REPEAT", + "content": { + "type": "STRING", + "value": ";;" + } + } + ] + } + ] + }, + "toplevel_directive": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "directive" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_constant" + }, + { + "type": "SYMBOL", + "name": "value_path" + }, + { + "type": "SYMBOL", + "name": "module_path" + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "_structure_item": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "value_definition" + }, + { + "type": "SYMBOL", + "name": "external" + }, + { + "type": "SYMBOL", + "name": "type_definition" + }, + { + "type": "SYMBOL", + "name": "exception_definition" + }, + { + "type": "SYMBOL", + "name": "module_definition" + }, + { + "type": "SYMBOL", + "name": "module_type_definition" + }, + { + "type": "SYMBOL", + "name": "open_module" + }, + { + "type": "SYMBOL", + "name": "include_module" + }, + { + "type": "SYMBOL", + "name": "class_definition" + }, + { + "type": "SYMBOL", + "name": "class_type_definition" + }, + { + "type": "SYMBOL", + "name": "floating_attribute" + }, + { + "type": "SYMBOL", + "name": "_item_extension" + } + ] + }, + "value_definition": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "let" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "rec" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "SYMBOL", + "name": "let_operator" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "let_binding" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "and" + }, + { + "type": "SYMBOL", + "name": "let_and_operator" + } + ] + }, + { + "type": "SYMBOL", + "name": "let_binding" + } + ] + } + } + ] + } + ] + }, + "let_binding": { + "type": "PREC_RIGHT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "pattern", + "content": { + "type": "SYMBOL", + "name": "_binding_pattern" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_parameter" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_polymorphic_typed" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ":>" + }, + { + "type": "SYMBOL", + "name": "_type" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "=" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "_sequence_expression" + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "item_attribute" + } + } + ] + } + }, + "_parameter": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "parameter" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_parenthesized_abstract_type" + }, + "named": true, + "value": "abstract_type" + } + ] + }, + "parameter": { + "type": "CHOICE", + "members": [ + { + "type": "FIELD", + "name": "pattern", + "content": { + "type": "SYMBOL", + "name": "_simple_pattern" + } + }, + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "~" + }, + { + "type": "STRING", + "value": "?" + } + ] + }, + { + "type": "FIELD", + "name": "pattern", + "content": { + "type": "SYMBOL", + "name": "_simple_value_pattern" + } + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_label" + }, + { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "STRING", + "value": ":" + } + }, + { + "type": "FIELD", + "name": "pattern", + "content": { + "type": "SYMBOL", + "name": "_simple_pattern" + } + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "~" + }, + { + "type": "STRING", + "value": "?" + } + ] + }, + { + "type": "STRING", + "value": "(" + }, + { + "type": "FIELD", + "name": "pattern", + "content": { + "type": "SYMBOL", + "name": "_simple_value_pattern" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_typed" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "=" + }, + { + "type": "SYMBOL", + "name": "_sequence_expression" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_label" + }, + { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "STRING", + "value": ":" + } + }, + { + "type": "STRING", + "value": "(" + }, + { + "type": "FIELD", + "name": "pattern", + "content": { + "type": "SYMBOL", + "name": "_pattern" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_typed" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "=" + }, + { + "type": "SYMBOL", + "name": "_sequence_expression" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + } + ] + }, + "external": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "external" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_value_name" + }, + { + "type": "SYMBOL", + "name": "_polymorphic_typed" + }, + { + "type": "STRING", + "value": "=" + }, + { + "type": "REPEAT1", + "content": { + "type": "SYMBOL", + "name": "string" + } + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "item_attribute" + } + } + ] + }, + "type_definition": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "type" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "nonrec" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "type_binding" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "and" + }, + { + "type": "SYMBOL", + "name": "type_binding" + } + ] + } + } + ] + } + ] + }, + "type_binding": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_type_params" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "_type_constructor" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_type_equation" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "=" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "private" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "variant_declaration" + }, + { + "type": "SYMBOL", + "name": "record_declaration" + }, + { + "type": "STRING", + "value": ".." + } + ] + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "type_constraint" + } + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "type_constructor_path" + } + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "+=" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "private" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "variant_declaration" + } + } + ] + } + ] + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "item_attribute" + } + } + ] + }, + "_type_params": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_type_param" + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_type_param" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "_type_param" + } + ] + } + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + } + ] + }, + "_type_param": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "+" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "!" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "-" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "!" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "!" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "+" + }, + { + "type": "STRING", + "value": "-" + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "type_variable" + }, + { + "type": "ALIAS", + "content": { + "type": "STRING", + "value": "_" + }, + "named": true, + "value": "type_variable" + } + ] + } + ] + }, + "_type_equation": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "=" + }, + { + "type": "STRING", + "value": ":=" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "private" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_type" + } + ] + }, + "variant_declaration": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "|" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "constructor_declaration" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "|" + }, + { + "type": "SYMBOL", + "name": "constructor_declaration" + } + ] + } + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "constructor_declaration" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "|" + }, + { + "type": "SYMBOL", + "name": "constructor_declaration" + } + ] + } + } + ] + } + ] + }, + "constructor_declaration": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_constructor_name" + }, + { + "type": "ALIAS", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[" + }, + { + "type": "STRING", + "value": "]" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + { + "type": "STRING", + "value": "true" + }, + { + "type": "STRING", + "value": "false" + } + ] + }, + "named": true, + "value": "constructor_name" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "of" + }, + { + "type": "SYMBOL", + "name": "_constructor_argument" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ":" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "REPEAT1", + "content": { + "type": "SYMBOL", + "name": "type_variable" + } + }, + { + "type": "STRING", + "value": "." + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_constructor_argument" + }, + { + "type": "STRING", + "value": "->" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_simple_type" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "=" + }, + { + "type": "SYMBOL", + "name": "constructor_path" + } + ] + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "_constructor_argument": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_simple_type" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "*" + }, + { + "type": "SYMBOL", + "name": "_simple_type" + } + ] + } + } + ] + }, + { + "type": "SYMBOL", + "name": "record_declaration" + } + ] + }, + "record_declaration": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "field_declaration" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "SYMBOL", + "name": "field_declaration" + } + ] + } + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "field_declaration": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "mutable" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_field_name" + }, + { + "type": "SYMBOL", + "name": "_polymorphic_typed" + } + ] + }, + "type_constraint": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "constraint" + }, + { + "type": "SYMBOL", + "name": "_type" + }, + { + "type": "STRING", + "value": "=" + }, + { + "type": "SYMBOL", + "name": "_type" + } + ] + }, + "exception_definition": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "exception" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "constructor_declaration" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "item_attribute" + } + } + ] + }, + "module_definition": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "module" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "rec" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "module_binding" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "and" + }, + { + "type": "SYMBOL", + "name": "module_binding" + } + ] + } + } + ] + } + ] + }, + "module_binding": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "name", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_module_name" + }, + { + "type": "ALIAS", + "content": { + "type": "STRING", + "value": "_" + }, + "named": true, + "value": "module_name" + } + ] + } + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "module_parameter" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_module_typed" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "=" + }, + { + "type": "STRING", + "value": ":=" + } + ] + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "_module_expression" + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "item_attribute" + } + } + ] + }, + "module_parameter": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "name", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_module_name" + }, + { + "type": "ALIAS", + "content": { + "type": "STRING", + "value": "_" + }, + "named": true, + "value": "module_name" + } + ] + } + }, + { + "type": "SYMBOL", + "name": "_module_typed" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "module_type_definition": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "module" + }, + { + "type": "STRING", + "value": "type" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "_module_type_name" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "=" + }, + { + "type": "STRING", + "value": ":=" + } + ] + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "_module_type" + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "item_attribute" + } + } + ] + }, + "open_module": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "open" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "!" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_module_expression" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "item_attribute" + } + } + ] + }, + "include_module": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "include" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_module_expression" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "item_attribute" + } + } + ] + }, + "class_definition": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "class" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "class_binding" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "and" + }, + { + "type": "SYMBOL", + "name": "class_binding" + } + ] + } + } + ] + } + ] + }, + "class_binding": { + "type": "PREC_RIGHT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "virtual" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_type_param" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "_type_param" + } + ] + } + } + ] + }, + { + "type": "STRING", + "value": "]" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "_class_name" + } + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_parameter" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_class_typed" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "=" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "_class_expression" + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "item_attribute" + } + } + ] + } + }, + "class_type_definition": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "class" + }, + { + "type": "STRING", + "value": "type" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "class_type_binding" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "and" + }, + { + "type": "SYMBOL", + "name": "class_type_binding" + } + ] + } + } + ] + } + ] + }, + "class_type_binding": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "virtual" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_type_param" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "_type_param" + } + ] + } + } + ] + }, + { + "type": "STRING", + "value": "]" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "_class_type_name" + } + }, + { + "type": "STRING", + "value": "=" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "_simple_class_type" + } + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "item_attribute" + } + } + ] + }, + "_signature_item": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "value_specification" + }, + { + "type": "SYMBOL", + "name": "external" + }, + { + "type": "SYMBOL", + "name": "type_definition" + }, + { + "type": "SYMBOL", + "name": "exception_definition" + }, + { + "type": "SYMBOL", + "name": "module_definition" + }, + { + "type": "SYMBOL", + "name": "module_type_definition" + }, + { + "type": "SYMBOL", + "name": "open_module" + }, + { + "type": "SYMBOL", + "name": "include_module_type" + }, + { + "type": "SYMBOL", + "name": "class_definition" + }, + { + "type": "SYMBOL", + "name": "class_type_definition" + }, + { + "type": "SYMBOL", + "name": "floating_attribute" + }, + { + "type": "SYMBOL", + "name": "_item_extension" + } + ] + }, + "value_specification": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "val" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_value_name" + }, + { + "type": "SYMBOL", + "name": "_polymorphic_typed" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "item_attribute" + } + } + ] + }, + "include_module_type": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "include" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_module_type" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "item_attribute" + } + } + ] + }, + "_module_typed": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ":" + }, + { + "type": "SYMBOL", + "name": "_module_type" + } + ] + }, + "_module_type": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "module_type_path" + }, + { + "type": "SYMBOL", + "name": "signature" + }, + { + "type": "SYMBOL", + "name": "module_type_constraint" + }, + { + "type": "SYMBOL", + "name": "module_type_of" + }, + { + "type": "SYMBOL", + "name": "functor_type" + }, + { + "type": "SYMBOL", + "name": "parenthesized_module_type" + }, + { + "type": "SYMBOL", + "name": "_extension" + } + ] + }, + "signature": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "sig" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_signature" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "end" + } + ] + }, + "module_type_constraint": { + "type": "PREC_RIGHT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_module_type" + }, + { + "type": "STRING", + "value": "with" + }, + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "constrain_type" + }, + { + "type": "SYMBOL", + "name": "constrain_module" + }, + { + "type": "SYMBOL", + "name": "constrain_module_type" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "and" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "constrain_type" + }, + { + "type": "SYMBOL", + "name": "constrain_module" + }, + { + "type": "SYMBOL", + "name": "constrain_module_type" + } + ] + } + ] + } + } + ] + } + ] + } + }, + "constrain_type": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "type" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_type_params" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "type_constructor_path" + }, + { + "type": "SYMBOL", + "name": "_type_equation" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "type_constraint" + } + } + ] + }, + "constrain_module": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "module" + }, + { + "type": "SYMBOL", + "name": "module_path" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "=" + }, + { + "type": "STRING", + "value": ":=" + } + ] + }, + { + "type": "SYMBOL", + "name": "extended_module_path" + } + ] + }, + "constrain_module_type": { + "type": "PREC_LEFT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "module" + }, + { + "type": "STRING", + "value": "type" + }, + { + "type": "SYMBOL", + "name": "module_type_path" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "=" + }, + { + "type": "STRING", + "value": ":=" + } + ] + }, + { + "type": "SYMBOL", + "name": "_module_type" + } + ] + } + }, + "module_type_of": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "module" + }, + { + "type": "STRING", + "value": "type" + }, + { + "type": "STRING", + "value": "of" + }, + { + "type": "SYMBOL", + "name": "_module_expression" + } + ] + }, + "functor_type": { + "type": "PREC_RIGHT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "functor" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "module_parameter" + } + } + ] + }, + { + "type": "SYMBOL", + "name": "_module_type" + } + ] + }, + { + "type": "STRING", + "value": "->" + }, + { + "type": "SYMBOL", + "name": "_module_type" + } + ] + } + }, + "parenthesized_module_type": { + "type": "SEQ", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SYMBOL", + "name": "_module_type" + }, + { + "type": "STRING", + "value": ")" + } + ] + } + ] + }, + "_simple_module_expression": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "typed_module_expression" + }, + { + "type": "SYMBOL", + "name": "parenthesized_module_expression" + }, + { + "type": "SYMBOL", + "name": "packed_module" + }, + { + "type": "SYMBOL", + "name": "_extension" + } + ] + }, + "_module_expression": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_simple_module_expression" + }, + { + "type": "SYMBOL", + "name": "module_path" + }, + { + "type": "SYMBOL", + "name": "structure" + }, + { + "type": "SYMBOL", + "name": "functor" + }, + { + "type": "SYMBOL", + "name": "module_application" + } + ] + }, + "structure": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "struct" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_structure" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "end" + } + ] + }, + "functor": { + "type": "PREC_RIGHT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "functor" + }, + { + "type": "REPEAT1", + "content": { + "type": "SYMBOL", + "name": "module_parameter" + } + }, + { + "type": "STRING", + "value": "->" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "_module_expression" + } + } + ] + } + }, + "module_application": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "functor", + "content": { + "type": "SYMBOL", + "name": "_module_expression" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "FIELD", + "name": "argument", + "content": { + "type": "SYMBOL", + "name": "_simple_module_expression" + } + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "STRING", + "value": ")" + } + ] + } + ] + } + ] + }, + "typed_module_expression": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_module_expression" + }, + { + "type": "SYMBOL", + "name": "_module_typed" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "packed_module": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "val" + }, + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_module_typed" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ":>" + }, + { + "type": "SYMBOL", + "name": "_module_type" + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "parenthesized_module_expression": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SYMBOL", + "name": "_module_expression" + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "_class_typed": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ":" + }, + { + "type": "SYMBOL", + "name": "_class_type" + } + ] + }, + "_simple_class_type": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "class_type_path" + }, + { + "type": "SYMBOL", + "name": "instantiated_class_type" + }, + { + "type": "SYMBOL", + "name": "class_body_type" + }, + { + "type": "SYMBOL", + "name": "let_open_class_type" + }, + { + "type": "SYMBOL", + "name": "_extension" + } + ] + }, + "_class_type": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_simple_class_type" + }, + { + "type": "SYMBOL", + "name": "class_function_type" + } + ] + }, + "instantiated_class_type": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_type" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "_type" + } + ] + } + } + ] + }, + { + "type": "STRING", + "value": "]" + }, + { + "type": "SYMBOL", + "name": "class_type_path" + } + ] + }, + "class_body_type": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "object" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SYMBOL", + "name": "_type" + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_class_field_specification" + }, + { + "type": "SYMBOL", + "name": "floating_attribute" + } + ] + } + }, + { + "type": "STRING", + "value": "end" + } + ] + }, + "_class_field_specification": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "inheritance_specification" + }, + { + "type": "SYMBOL", + "name": "instance_variable_specification" + }, + { + "type": "SYMBOL", + "name": "method_specification" + }, + { + "type": "SYMBOL", + "name": "type_parameter_constraint" + }, + { + "type": "SYMBOL", + "name": "_item_extension" + } + ] + }, + "inheritance_specification": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "inherit" + }, + { + "type": "SYMBOL", + "name": "_simple_class_type" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "item_attribute" + } + } + ] + }, + "instance_variable_specification": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "val" + }, + { + "type": "REPEAT", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "mutable" + }, + { + "type": "STRING", + "value": "virtual" + } + ] + } + }, + { + "type": "SYMBOL", + "name": "_instance_variable_name" + }, + { + "type": "SYMBOL", + "name": "_typed" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "item_attribute" + } + } + ] + }, + "method_specification": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "method" + }, + { + "type": "REPEAT", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "private" + }, + { + "type": "STRING", + "value": "virtual" + } + ] + } + }, + { + "type": "SYMBOL", + "name": "_method_name" + }, + { + "type": "SYMBOL", + "name": "_polymorphic_typed" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "item_attribute" + } + } + ] + }, + "type_parameter_constraint": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "constraint" + }, + { + "type": "SYMBOL", + "name": "_type" + }, + { + "type": "STRING", + "value": "=" + }, + { + "type": "SYMBOL", + "name": "_type" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "item_attribute" + } + } + ] + }, + "let_open_class_type": { + "type": "PREC_RIGHT", + "value": 2, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "let" + }, + { + "type": "SYMBOL", + "name": "open_module" + }, + { + "type": "STRING", + "value": "in" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "_simple_class_type" + } + } + ] + } + }, + "class_function_type": { + "type": "PREC_RIGHT", + "value": 3, + "content": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "?" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_label_name" + }, + { + "type": "STRING", + "value": ":" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_tuple_type" + }, + { + "type": "STRING", + "value": "->" + }, + { + "type": "SYMBOL", + "name": "_class_type" + } + ] + } + }, + "_simple_class_expression": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "class_path" + }, + { + "type": "SYMBOL", + "name": "instantiated_class" + }, + { + "type": "SYMBOL", + "name": "object_expression" + }, + { + "type": "SYMBOL", + "name": "typed_class_expression" + }, + { + "type": "SYMBOL", + "name": "parenthesized_class_expression" + }, + { + "type": "SYMBOL", + "name": "_extension" + } + ] + }, + "_class_expression": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_simple_class_expression" + }, + { + "type": "SYMBOL", + "name": "class_function" + }, + { + "type": "SYMBOL", + "name": "class_application" + }, + { + "type": "SYMBOL", + "name": "let_class_expression" + }, + { + "type": "SYMBOL", + "name": "let_open_class_expression" + } + ] + }, + "instantiated_class": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_type" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "_type" + } + ] + } + } + ] + }, + { + "type": "STRING", + "value": "]" + }, + { + "type": "SYMBOL", + "name": "class_path" + } + ] + }, + "typed_class_expression": { + "type": "SEQ", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_class_expression" + }, + { + "type": "SYMBOL", + "name": "_class_typed" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + } + ] + }, + "class_function": { + "type": "PREC_RIGHT", + "value": 2, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "fun" + }, + { + "type": "REPEAT1", + "content": { + "type": "SYMBOL", + "name": "_parameter" + } + }, + { + "type": "STRING", + "value": "->" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "_class_expression" + } + } + ] + } + }, + "class_application": { + "type": "PREC_RIGHT", + "value": 16, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "class", + "content": { + "type": "SYMBOL", + "name": "_simple_class_expression" + } + }, + { + "type": "REPEAT1", + "content": { + "type": "FIELD", + "name": "argument", + "content": { + "type": "SYMBOL", + "name": "_argument" + } + } + } + ] + } + }, + "let_class_expression": { + "type": "PREC_RIGHT", + "value": 2, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "value_definition" + }, + { + "type": "STRING", + "value": "in" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "_class_expression" + } + } + ] + } + }, + "_class_field": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "inheritance_definition" + }, + { + "type": "SYMBOL", + "name": "instance_variable_definition" + }, + { + "type": "SYMBOL", + "name": "method_definition" + }, + { + "type": "SYMBOL", + "name": "type_parameter_constraint" + }, + { + "type": "SYMBOL", + "name": "class_initializer" + }, + { + "type": "SYMBOL", + "name": "_item_extension" + } + ] + }, + "inheritance_definition": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "inherit" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "!" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_class_expression" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "as" + }, + { + "type": "SYMBOL", + "name": "_value_pattern" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "item_attribute" + } + } + ] + }, + "instance_variable_definition": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "val" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "!" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "mutable" + }, + { + "type": "STRING", + "value": "virtual" + } + ] + } + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "_instance_variable_name" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_typed" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ":>" + }, + { + "type": "SYMBOL", + "name": "_type" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "=" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "_sequence_expression" + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "item_attribute" + } + } + ] + }, + "method_definition": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "method" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "!" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "private" + }, + { + "type": "STRING", + "value": "virtual" + } + ] + } + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "_method_name" + } + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_parameter" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_polymorphic_typed" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "=" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "_sequence_expression" + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "item_attribute" + } + } + ] + }, + "class_initializer": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "initializer" + }, + { + "type": "SYMBOL", + "name": "_sequence_expression" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "item_attribute" + } + } + ] + }, + "let_open_class_expression": { + "type": "PREC_RIGHT", + "value": 2, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "let" + }, + { + "type": "SYMBOL", + "name": "open_module" + }, + { + "type": "STRING", + "value": "in" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "_class_expression" + } + } + ] + } + }, + "parenthesized_class_expression": { + "type": "SEQ", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SYMBOL", + "name": "_class_expression" + }, + { + "type": "STRING", + "value": ")" + } + ] + } + ] + }, + "_typed": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ":" + }, + { + "type": "SYMBOL", + "name": "_type" + } + ] + }, + "_simple_typed": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ":" + }, + { + "type": "SYMBOL", + "name": "_simple_type" + } + ] + }, + "_polymorphic_typed": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ":" + }, + { + "type": "SYMBOL", + "name": "_polymorphic_type" + } + ] + }, + "_polymorphic_type": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "polymorphic_type" + }, + { + "type": "SYMBOL", + "name": "_type" + } + ] + }, + "polymorphic_type": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "REPEAT1", + "content": { + "type": "SYMBOL", + "name": "type_variable" + } + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_abstract_type" + }, + "named": true, + "value": "abstract_type" + } + ] + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "SYMBOL", + "name": "_type" + } + ] + }, + "_abstract_type": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "type" + }, + { + "type": "REPEAT1", + "content": { + "type": "SYMBOL", + "name": "_type_constructor" + } + } + ] + }, + "_parenthesized_abstract_type": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SYMBOL", + "name": "_abstract_type" + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "_simple_type": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "type_variable" + }, + { + "type": "SYMBOL", + "name": "type_constructor_path" + }, + { + "type": "SYMBOL", + "name": "constructed_type" + }, + { + "type": "SYMBOL", + "name": "local_open_type" + }, + { + "type": "SYMBOL", + "name": "polymorphic_variant_type" + }, + { + "type": "SYMBOL", + "name": "package_type" + }, + { + "type": "SYMBOL", + "name": "hash_type" + }, + { + "type": "SYMBOL", + "name": "object_type" + }, + { + "type": "SYMBOL", + "name": "parenthesized_type" + }, + { + "type": "SYMBOL", + "name": "_extension" + } + ] + }, + "_tuple_type": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_simple_type" + }, + { + "type": "SYMBOL", + "name": "tuple_type" + } + ] + }, + "_type": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_tuple_type" + }, + { + "type": "SYMBOL", + "name": "function_type" + }, + { + "type": "SYMBOL", + "name": "aliased_type" + } + ] + }, + "function_type": { + "type": "PREC_RIGHT", + "value": 3, + "content": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "typed_label" + }, + { + "type": "SYMBOL", + "name": "_type" + } + ] + }, + { + "type": "STRING", + "value": "->" + }, + { + "type": "SYMBOL", + "name": "_type" + } + ] + } + }, + "typed_label": { + "type": "PREC_LEFT", + "value": 3, + "content": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "?" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_label_name" + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "SYMBOL", + "name": "_type" + } + ] + } + }, + "tuple_type": { + "type": "PREC", + "value": 6, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_tuple_type" + }, + { + "type": "STRING", + "value": "*" + }, + { + "type": "SYMBOL", + "name": "_simple_type" + } + ] + } + }, + "constructed_type": { + "type": "PREC", + "value": 16, + "content": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_simple_type" + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_type" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "_type" + } + ] + } + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + } + ] + }, + { + "type": "SYMBOL", + "name": "type_constructor_path" + } + ] + } + }, + "aliased_type": { + "type": "PREC", + "value": 2, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_type" + }, + { + "type": "STRING", + "value": "as" + }, + { + "type": "SYMBOL", + "name": "type_variable" + } + ] + } + }, + "local_open_type": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "extended_module_path" + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SYMBOL", + "name": "_type" + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + { + "type": "SYMBOL", + "name": "package_type" + }, + { + "type": "SYMBOL", + "name": "polymorphic_variant_type" + } + ] + } + ] + }, + "polymorphic_variant_type": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[" + }, + { + "type": "SYMBOL", + "name": "tag_specification" + }, + { + "type": "STRING", + "value": "]" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_tag_spec" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "|" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_tag_spec" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "|" + }, + { + "type": "SYMBOL", + "name": "_tag_spec" + } + ] + } + } + ] + }, + { + "type": "STRING", + "value": "]" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[>" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "|" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_tag_spec" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "|" + }, + { + "type": "SYMBOL", + "name": "_tag_spec" + } + ] + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "]" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[<" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "|" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_tag_spec" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "|" + }, + { + "type": "SYMBOL", + "name": "_tag_spec" + } + ] + } + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ">" + }, + { + "type": "REPEAT1", + "content": { + "type": "SYMBOL", + "name": "tag" + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "]" + } + ] + } + ] + } + ] + }, + "_tag_spec": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_type" + }, + { + "type": "SYMBOL", + "name": "tag_specification" + } + ] + }, + "tag_specification": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "tag" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "of" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "&" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_type" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "&" + }, + { + "type": "SYMBOL", + "name": "_type" + } + ] + } + } + ] + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "package_type": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "module" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_module_type" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "object_type": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "<" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "method_type" + }, + { + "type": "SYMBOL", + "name": "_simple_type" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "method_type" + }, + { + "type": "SYMBOL", + "name": "_simple_type" + } + ] + } + ] + } + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": ".." + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "STRING", + "value": ".." + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ">" + } + ] + }, + "method_type": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_method_name" + }, + { + "type": "SYMBOL", + "name": "_polymorphic_typed" + } + ] + }, + "hash_type": { + "type": "PREC", + "value": 17, + "content": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_simple_type" + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_type" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "_type" + } + ] + } + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "#" + }, + { + "type": "SYMBOL", + "name": "class_type_path" + } + ] + } + }, + "parenthesized_type": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SYMBOL", + "name": "_type" + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "_simple_expression": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "value_path" + }, + { + "type": "SYMBOL", + "name": "_constant" + }, + { + "type": "SYMBOL", + "name": "typed_expression" + }, + { + "type": "SYMBOL", + "name": "constructor_path" + }, + { + "type": "SYMBOL", + "name": "tag" + }, + { + "type": "SYMBOL", + "name": "list_expression" + }, + { + "type": "SYMBOL", + "name": "array_expression" + }, + { + "type": "SYMBOL", + "name": "record_expression" + }, + { + "type": "SYMBOL", + "name": "prefix_expression" + }, + { + "type": "SYMBOL", + "name": "hash_expression" + }, + { + "type": "SYMBOL", + "name": "field_get_expression" + }, + { + "type": "SYMBOL", + "name": "array_get_expression" + }, + { + "type": "SYMBOL", + "name": "string_get_expression" + }, + { + "type": "SYMBOL", + "name": "bigarray_get_expression" + }, + { + "type": "SYMBOL", + "name": "coercion_expression" + }, + { + "type": "SYMBOL", + "name": "local_open_expression" + }, + { + "type": "SYMBOL", + "name": "package_expression" + }, + { + "type": "SYMBOL", + "name": "new_expression" + }, + { + "type": "SYMBOL", + "name": "object_copy_expression" + }, + { + "type": "SYMBOL", + "name": "method_invocation" + }, + { + "type": "SYMBOL", + "name": "object_expression" + }, + { + "type": "SYMBOL", + "name": "parenthesized_expression" + }, + { + "type": "SYMBOL", + "name": "ocamlyacc_value" + }, + { + "type": "SYMBOL", + "name": "_extension" + } + ] + }, + "_expression": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_simple_expression" + }, + { + "type": "SYMBOL", + "name": "product_expression" + }, + { + "type": "SYMBOL", + "name": "cons_expression" + }, + { + "type": "SYMBOL", + "name": "application_expression" + }, + { + "type": "SYMBOL", + "name": "infix_expression" + }, + { + "type": "SYMBOL", + "name": "sign_expression" + }, + { + "type": "SYMBOL", + "name": "set_expression" + }, + { + "type": "SYMBOL", + "name": "if_expression" + }, + { + "type": "SYMBOL", + "name": "while_expression" + }, + { + "type": "SYMBOL", + "name": "for_expression" + }, + { + "type": "SYMBOL", + "name": "match_expression" + }, + { + "type": "SYMBOL", + "name": "function_expression" + }, + { + "type": "SYMBOL", + "name": "fun_expression" + }, + { + "type": "SYMBOL", + "name": "try_expression" + }, + { + "type": "SYMBOL", + "name": "let_expression" + }, + { + "type": "SYMBOL", + "name": "assert_expression" + }, + { + "type": "SYMBOL", + "name": "lazy_expression" + }, + { + "type": "SYMBOL", + "name": "let_module_expression" + }, + { + "type": "SYMBOL", + "name": "let_open_expression" + }, + { + "type": "SYMBOL", + "name": "let_exception_expression" + } + ] + }, + "_sequence_expression": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "SYMBOL", + "name": "sequence_expression" + } + ] + }, + "typed_expression": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_sequence_expression" + }, + { + "type": "SYMBOL", + "name": "_typed" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "product_expression": { + "type": "PREC_LEFT", + "value": 6, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "STRING", + "value": "," + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + }, + "cons_expression": { + "type": "PREC_RIGHT", + "value": 11, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "STRING", + "value": "::" + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + }, + "list_expression": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + } + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "]" + } + ] + }, + "array_expression": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[|" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + } + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "|]" + } + ] + }, + "record_expression": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_simple_expression" + }, + { + "type": "STRING", + "value": "with" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "field_expression" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "SYMBOL", + "name": "field_expression" + } + ] + } + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "field_expression": { + "type": "PREC", + "value": 3, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "field_path" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_typed" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "=" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + } + }, + "application_expression": { + "type": "PREC_RIGHT", + "value": 16, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "function", + "content": { + "type": "SYMBOL", + "name": "_simple_expression" + } + }, + { + "type": "REPEAT1", + "content": { + "type": "FIELD", + "name": "argument", + "content": { + "type": "SYMBOL", + "name": "_argument" + } + } + } + ] + } + }, + "_argument": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_simple_expression" + }, + { + "type": "SYMBOL", + "name": "labeled_argument" + } + ] + }, + "labeled_argument": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_label" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_label" + }, + { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "STRING", + "value": ":" + } + }, + { + "type": "SYMBOL", + "name": "_simple_expression" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "~" + }, + { + "type": "STRING", + "value": "?" + } + ] + }, + { + "type": "STRING", + "value": "(" + }, + { + "type": "SYMBOL", + "name": "_label_name" + }, + { + "type": "SYMBOL", + "name": "_typed" + }, + { + "type": "STRING", + "value": ")" + } + ] + } + ] + }, + "prefix_expression": { + "type": "PREC", + "value": 19, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "SYMBOL", + "name": "prefix_operator" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_simple_expression" + } + } + ] + } + }, + "sign_expression": { + "type": "PREC", + "value": 15, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "SYMBOL", + "name": "sign_operator" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + }, + "hash_expression": { + "type": "PREC_LEFT", + "value": 17, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_simple_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "SYMBOL", + "name": "hash_operator" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_simple_expression" + } + } + ] + } + }, + "infix_expression": { + "type": "CHOICE", + "members": [ + { + "type": "PREC_RIGHT", + "value": 14, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "SYMBOL", + "name": "pow_operator" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 13, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "SYMBOL", + "name": "mult_operator" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 12, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "SYMBOL", + "name": "add_operator" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + }, + { + "type": "PREC_RIGHT", + "value": 10, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "SYMBOL", + "name": "concat_operator" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 9, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "SYMBOL", + "name": "rel_operator" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + }, + { + "type": "PREC_RIGHT", + "value": 8, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "SYMBOL", + "name": "and_operator" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + }, + { + "type": "PREC_RIGHT", + "value": 7, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "SYMBOL", + "name": "or_operator" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + }, + { + "type": "PREC_RIGHT", + "value": 5, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "SYMBOL", + "name": "assign_operator" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + } + ] + }, + "field_get_expression": { + "type": "PREC_LEFT", + "value": 18, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_simple_expression" + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "SYMBOL", + "name": "field_path" + } + ] + } + }, + "array_get_expression": { + "type": "PREC", + "value": 18, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_simple_expression" + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "indexing_operator_path" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "(" + }, + { + "type": "SYMBOL", + "name": "_sequence_expression" + }, + { + "type": "STRING", + "value": ")" + } + ] + } + }, + "string_get_expression": { + "type": "PREC", + "value": 18, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_simple_expression" + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "indexing_operator_path" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "[" + }, + { + "type": "SYMBOL", + "name": "_sequence_expression" + }, + { + "type": "STRING", + "value": "]" + } + ] + } + }, + "bigarray_get_expression": { + "type": "PREC", + "value": 18, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_simple_expression" + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "indexing_operator_path" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "{" + }, + { + "type": "SYMBOL", + "name": "_sequence_expression" + }, + { + "type": "STRING", + "value": "}" + } + ] + } + }, + "set_expression": { + "type": "PREC_RIGHT", + "value": 5, + "content": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "field_get_expression" + }, + { + "type": "SYMBOL", + "name": "array_get_expression" + }, + { + "type": "SYMBOL", + "name": "string_get_expression" + }, + { + "type": "SYMBOL", + "name": "bigarray_get_expression" + }, + { + "type": "SYMBOL", + "name": "_instance_variable_name" + } + ] + }, + { + "type": "STRING", + "value": "<-" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + }, + "if_expression": { + "type": "PREC_RIGHT", + "value": 4, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "if" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "FIELD", + "name": "condition", + "content": { + "type": "SYMBOL", + "name": "_sequence_expression" + } + }, + { + "type": "SYMBOL", + "name": "then_clause" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "else_clause" + }, + { + "type": "BLANK" + } + ] + } + ] + } + }, + "then_clause": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "then" + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + }, + "else_clause": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "else" + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + }, + "while_expression": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "while" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "FIELD", + "name": "condition", + "content": { + "type": "SYMBOL", + "name": "_sequence_expression" + } + }, + { + "type": "SYMBOL", + "name": "do_clause" + } + ] + }, + "do_clause": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "do" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_sequence_expression" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "done" + } + ] + }, + "for_expression": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "for" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "_value_pattern" + } + }, + { + "type": "STRING", + "value": "=" + }, + { + "type": "FIELD", + "name": "from", + "content": { + "type": "SYMBOL", + "name": "_sequence_expression" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "to" + }, + { + "type": "STRING", + "value": "downto" + } + ] + }, + { + "type": "FIELD", + "name": "to", + "content": { + "type": "SYMBOL", + "name": "_sequence_expression" + } + }, + { + "type": "SYMBOL", + "name": "do_clause" + } + ] + }, + "sequence_expression": { + "type": "PREC_RIGHT", + "value": 3, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "STRING", + "value": ";" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_sequence_expression" + } + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + } + }, + "match_expression": { + "type": "PREC_RIGHT", + "value": 2, + "content": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "match" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "SYMBOL", + "name": "match_operator" + } + ] + }, + { + "type": "SYMBOL", + "name": "_sequence_expression" + }, + { + "type": "STRING", + "value": "with" + }, + { + "type": "SYMBOL", + "name": "_match_cases" + } + ] + } + }, + "_match_cases": { + "type": "PREC_RIGHT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "|" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "match_case" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "|" + }, + { + "type": "SYMBOL", + "name": "match_case" + } + ] + } + } + ] + } + ] + } + }, + "match_case": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "pattern", + "content": { + "type": "SYMBOL", + "name": "_pattern" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "guard" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "->" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_sequence_expression" + }, + { + "type": "SYMBOL", + "name": "refutation_case" + } + ] + } + } + ] + }, + "guard": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "when" + }, + { + "type": "SYMBOL", + "name": "_sequence_expression" + } + ] + }, + "refutation_case": { + "type": "STRING", + "value": "." + }, + "function_expression": { + "type": "PREC_RIGHT", + "value": 2, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "function" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_match_cases" + } + ] + } + }, + "fun_expression": { + "type": "PREC_RIGHT", + "value": 2, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "fun" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "REPEAT1", + "content": { + "type": "SYMBOL", + "name": "_parameter" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_simple_typed" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "->" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "_sequence_expression" + } + } + ] + } + }, + "try_expression": { + "type": "PREC_RIGHT", + "value": 2, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "try" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_sequence_expression" + }, + { + "type": "STRING", + "value": "with" + }, + { + "type": "SYMBOL", + "name": "_match_cases" + } + ] + } + }, + "let_expression": { + "type": "PREC_RIGHT", + "value": 2, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "value_definition" + }, + { + "type": "STRING", + "value": "in" + }, + { + "type": "SYMBOL", + "name": "_sequence_expression" + } + ] + } + }, + "coercion_expression": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_sequence_expression" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_typed" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ":>" + }, + { + "type": "SYMBOL", + "name": "_type" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "assert_expression": { + "type": "PREC_LEFT", + "value": 16, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "assert" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_simple_expression" + } + ] + } + }, + "lazy_expression": { + "type": "PREC_LEFT", + "value": 16, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "lazy" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_simple_expression" + } + ] + } + }, + "let_module_expression": { + "type": "PREC_RIGHT", + "value": 2, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "let" + }, + { + "type": "SYMBOL", + "name": "module_definition" + }, + { + "type": "STRING", + "value": "in" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "_sequence_expression" + } + } + ] + } + }, + "let_open_expression": { + "type": "PREC_RIGHT", + "value": 2, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "let" + }, + { + "type": "SYMBOL", + "name": "open_module" + }, + { + "type": "STRING", + "value": "in" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "_sequence_expression" + } + } + ] + } + }, + "local_open_expression": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "module_path" + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_sequence_expression" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + { + "type": "SYMBOL", + "name": "list_expression" + }, + { + "type": "SYMBOL", + "name": "array_expression" + }, + { + "type": "SYMBOL", + "name": "record_expression" + }, + { + "type": "SYMBOL", + "name": "object_copy_expression" + }, + { + "type": "SYMBOL", + "name": "package_expression" + } + ] + } + ] + }, + "package_expression": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "module" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_module_expression" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_module_typed" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "let_exception_expression": { + "type": "PREC_RIGHT", + "value": 2, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "let" + }, + { + "type": "SYMBOL", + "name": "exception_definition" + }, + { + "type": "STRING", + "value": "in" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "_sequence_expression" + } + } + ] + } + }, + "new_expression": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "new" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "class_path" + } + ] + }, + "object_copy_expression": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{<" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "instance_variable_expression" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "SYMBOL", + "name": "instance_variable_expression" + } + ] + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ">}" + } + ] + }, + "instance_variable_expression": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_instance_variable_name" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "=" + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "method_invocation": { + "type": "PREC_RIGHT", + "value": 17, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_simple_expression" + }, + { + "type": "STRING", + "value": "#" + }, + { + "type": "SYMBOL", + "name": "_method_name" + } + ] + } + }, + "object_expression": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "object" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_pattern" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_typed" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_class_field" + }, + { + "type": "SYMBOL", + "name": "floating_attribute" + } + ] + } + }, + { + "type": "STRING", + "value": "end" + } + ] + }, + "parenthesized_expression": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "begin" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_sequence_expression" + }, + { + "type": "STRING", + "value": "end" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SYMBOL", + "name": "_sequence_expression" + }, + { + "type": "STRING", + "value": ")" + } + ] + } + ] + }, + "ocamlyacc_value": { + "type": "PATTERN", + "value": "\\$[0-9]+" + }, + "_simple_pattern": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_value_pattern" + }, + { + "type": "SYMBOL", + "name": "_signed_constant" + }, + { + "type": "SYMBOL", + "name": "typed_pattern" + }, + { + "type": "SYMBOL", + "name": "constructor_path" + }, + { + "type": "SYMBOL", + "name": "tag" + }, + { + "type": "SYMBOL", + "name": "polymorphic_variant_pattern" + }, + { + "type": "SYMBOL", + "name": "record_pattern" + }, + { + "type": "SYMBOL", + "name": "list_pattern" + }, + { + "type": "SYMBOL", + "name": "array_pattern" + }, + { + "type": "SYMBOL", + "name": "local_open_pattern" + }, + { + "type": "SYMBOL", + "name": "package_pattern" + }, + { + "type": "SYMBOL", + "name": "parenthesized_pattern" + }, + { + "type": "SYMBOL", + "name": "_extension" + } + ] + }, + "_effect_pattern": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_simple_pattern" + }, + { + "type": "SYMBOL", + "name": "constructor_pattern" + }, + { + "type": "SYMBOL", + "name": "tag_pattern" + }, + { + "type": "SYMBOL", + "name": "lazy_pattern" + } + ] + }, + "_pattern": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_effect_pattern" + }, + { + "type": "SYMBOL", + "name": "alias_pattern" + }, + { + "type": "SYMBOL", + "name": "or_pattern" + }, + { + "type": "SYMBOL", + "name": "tuple_pattern" + }, + { + "type": "SYMBOL", + "name": "cons_pattern" + }, + { + "type": "SYMBOL", + "name": "range_pattern" + }, + { + "type": "SYMBOL", + "name": "exception_pattern" + }, + { + "type": "SYMBOL", + "name": "effect_pattern" + } + ] + }, + "_binding_pattern": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_value_name" + }, + { + "type": "SYMBOL", + "name": "_signed_constant" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "typed_binding_pattern" + }, + "named": true, + "value": "typed_pattern" + }, + { + "type": "SYMBOL", + "name": "constructor_path" + }, + { + "type": "SYMBOL", + "name": "tag" + }, + { + "type": "SYMBOL", + "name": "polymorphic_variant_pattern" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "record_binding_pattern" + }, + "named": true, + "value": "record_pattern" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "list_binding_pattern" + }, + "named": true, + "value": "list_pattern" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "array_binding_pattern" + }, + "named": true, + "value": "array_pattern" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "local_open_binding_pattern" + }, + "named": true, + "value": "local_open_pattern" + }, + { + "type": "SYMBOL", + "name": "package_pattern" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "parenthesized_binding_pattern" + }, + "named": true, + "value": "parenthesized_pattern" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "alias_binding_pattern" + }, + "named": true, + "value": "alias_pattern" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "or_binding_pattern" + }, + "named": true, + "value": "or_pattern" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "constructor_binding_pattern" + }, + "named": true, + "value": "constructor_pattern" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "tag_binding_pattern" + }, + "named": true, + "value": "tag_pattern" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "tuple_binding_pattern" + }, + "named": true, + "value": "tuple_pattern" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "cons_binding_pattern" + }, + "named": true, + "value": "cons_pattern" + }, + { + "type": "SYMBOL", + "name": "range_pattern" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "lazy_binding_pattern" + }, + "named": true, + "value": "lazy_pattern" + }, + { + "type": "SYMBOL", + "name": "_extension" + } + ] + }, + "alias_pattern": { + "type": "PREC_LEFT", + "value": 2, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_pattern" + }, + { + "type": "STRING", + "value": "as" + }, + { + "type": "SYMBOL", + "name": "_value_pattern" + } + ] + } + }, + "alias_binding_pattern": { + "type": "PREC_LEFT", + "value": 2, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_binding_pattern" + }, + { + "type": "STRING", + "value": "as" + }, + { + "type": "SYMBOL", + "name": "_value_name" + } + ] + } + }, + "typed_pattern": { + "type": "SEQ", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_pattern" + }, + { + "type": "SYMBOL", + "name": "_typed" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + } + ] + }, + "typed_binding_pattern": { + "type": "SEQ", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "pattern", + "content": { + "type": "SYMBOL", + "name": "_binding_pattern" + } + }, + { + "type": "SYMBOL", + "name": "_typed" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + } + ] + }, + "or_pattern": { + "type": "PREC_LEFT", + "value": 3, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_pattern" + }, + { + "type": "STRING", + "value": "|" + }, + { + "type": "SYMBOL", + "name": "_pattern" + } + ] + } + }, + "or_binding_pattern": { + "type": "PREC_LEFT", + "value": 3, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_binding_pattern" + }, + { + "type": "STRING", + "value": "|" + }, + { + "type": "SYMBOL", + "name": "_binding_pattern" + } + ] + } + }, + "constructor_pattern": { + "type": "PREC_RIGHT", + "value": 16, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "constructor_path" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_parenthesized_abstract_type" + }, + "named": true, + "value": "abstract_type" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_pattern" + } + ] + } + }, + "constructor_binding_pattern": { + "type": "PREC_RIGHT", + "value": 16, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "constructor_path" + }, + { + "type": "FIELD", + "name": "pattern", + "content": { + "type": "SYMBOL", + "name": "_binding_pattern" + } + } + ] + } + }, + "tag_pattern": { + "type": "PREC_RIGHT", + "value": 16, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "tag" + }, + { + "type": "SYMBOL", + "name": "_pattern" + } + ] + } + }, + "tag_binding_pattern": { + "type": "PREC_RIGHT", + "value": 16, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "tag" + }, + { + "type": "FIELD", + "name": "pattern", + "content": { + "type": "SYMBOL", + "name": "_binding_pattern" + } + } + ] + } + }, + "polymorphic_variant_pattern": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "#" + }, + { + "type": "SYMBOL", + "name": "type_constructor_path" + } + ] + }, + "tuple_pattern": { + "type": "PREC_LEFT", + "value": 6, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_pattern" + }, + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "_pattern" + } + ] + } + }, + "tuple_binding_pattern": { + "type": "PREC_LEFT", + "value": 6, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_binding_pattern" + }, + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "_binding_pattern" + } + ] + } + }, + "record_pattern": { + "type": "PREC_LEFT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "field_pattern" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "SYMBOL", + "name": "field_pattern" + } + ] + } + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "STRING", + "value": "_" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "}" + } + ] + } + }, + "field_pattern": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "field_path" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_typed" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "=" + }, + { + "type": "SYMBOL", + "name": "_pattern" + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "record_binding_pattern": { + "type": "PREC_LEFT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "SEQ", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "field_binding_pattern" + }, + "named": true, + "value": "field_pattern" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "field_binding_pattern" + }, + "named": true, + "value": "field_pattern" + } + ] + } + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "STRING", + "value": "_" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "}" + } + ] + } + }, + "field_binding_pattern": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "field_path" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_typed" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "=" + }, + { + "type": "FIELD", + "name": "pattern", + "content": { + "type": "SYMBOL", + "name": "_binding_pattern" + } + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "list_pattern": { + "type": "PREC_LEFT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_pattern" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "SYMBOL", + "name": "_pattern" + } + ] + } + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "]" + } + ] + } + }, + "list_binding_pattern": { + "type": "PREC_LEFT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_binding_pattern" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "SYMBOL", + "name": "_binding_pattern" + } + ] + } + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "]" + } + ] + } + }, + "cons_pattern": { + "type": "PREC_RIGHT", + "value": 11, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_pattern" + }, + { + "type": "STRING", + "value": "::" + }, + { + "type": "SYMBOL", + "name": "_pattern" + } + ] + } + }, + "cons_binding_pattern": { + "type": "PREC_RIGHT", + "value": 11, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_binding_pattern" + }, + { + "type": "STRING", + "value": "::" + }, + { + "type": "SYMBOL", + "name": "_binding_pattern" + } + ] + } + }, + "array_pattern": { + "type": "PREC_LEFT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[|" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_pattern" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "SYMBOL", + "name": "_pattern" + } + ] + } + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "|]" + } + ] + } + }, + "array_binding_pattern": { + "type": "PREC_LEFT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[|" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_binding_pattern" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "SYMBOL", + "name": "_binding_pattern" + } + ] + } + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "|]" + } + ] + } + }, + "range_pattern": { + "type": "PREC", + "value": 18, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_signed_constant" + }, + { + "type": "STRING", + "value": ".." + }, + { + "type": "SYMBOL", + "name": "_signed_constant" + } + ] + } + }, + "lazy_pattern": { + "type": "PREC", + "value": 17, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "lazy" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_pattern" + } + ] + } + }, + "lazy_binding_pattern": { + "type": "PREC", + "value": 17, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "lazy" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_binding_pattern" + } + ] + } + }, + "local_open_pattern": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "module_path" + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_pattern" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + { + "type": "SYMBOL", + "name": "list_pattern" + }, + { + "type": "SYMBOL", + "name": "array_pattern" + }, + { + "type": "SYMBOL", + "name": "record_pattern" + } + ] + } + ] + }, + "local_open_binding_pattern": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "module_path" + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_binding_pattern" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + { + "type": "SYMBOL", + "name": "list_binding_pattern" + }, + { + "type": "SYMBOL", + "name": "array_binding_pattern" + }, + { + "type": "SYMBOL", + "name": "record_binding_pattern" + } + ] + } + ] + }, + "package_pattern": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "module" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_module_name" + }, + { + "type": "ALIAS", + "content": { + "type": "STRING", + "value": "_" + }, + "named": true, + "value": "module_name" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_module_typed" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "parenthesized_pattern": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SYMBOL", + "name": "_pattern" + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "parenthesized_binding_pattern": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SYMBOL", + "name": "_binding_pattern" + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "exception_pattern": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "exception" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_pattern" + } + ] + }, + "effect_pattern": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "effect" + }, + { + "type": "FIELD", + "name": "effect", + "content": { + "type": "SYMBOL", + "name": "_effect_pattern" + } + }, + { + "type": "STRING", + "value": "," + }, + { + "type": "FIELD", + "name": "continuation", + "content": { + "type": "SYMBOL", + "name": "_simple_pattern" + } + } + ] + }, + "attribute": { + "type": "SEQ", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "PATTERN", + "value": "\\[@" + }, + "named": false, + "value": "[@" + }, + { + "type": "SYMBOL", + "name": "attribute_id" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "attribute_payload" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "]" + } + ] + }, + "item_attribute": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[@@" + }, + { + "type": "SYMBOL", + "name": "attribute_id" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "attribute_payload" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "]" + } + ] + }, + "floating_attribute": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[@@@" + }, + { + "type": "SYMBOL", + "name": "attribute_id" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "attribute_payload" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "]" + } + ] + }, + "attribute_payload": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_structure" + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ":" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_type" + }, + { + "type": "SYMBOL", + "name": "_signature" + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "?" + }, + { + "type": "SYMBOL", + "name": "_pattern" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "guard" + }, + { + "type": "BLANK" + } + ] + } + ] + } + ] + }, + "_extension": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "extension" + }, + { + "type": "SYMBOL", + "name": "quoted_extension" + } + ] + }, + "extension": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[%" + }, + { + "type": "SYMBOL", + "name": "attribute_id" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "attribute_payload" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "]" + } + ] + }, + "quoted_extension": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{%" + }, + { + "type": "SYMBOL", + "name": "attribute_id" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "\\s+" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_quoted_string" + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "_item_extension": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "item_extension" + }, + { + "type": "SYMBOL", + "name": "quoted_item_extension" + } + ] + }, + "item_extension": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[%%" + }, + { + "type": "SYMBOL", + "name": "attribute_id" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "attribute_payload" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "]" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "item_attribute" + } + } + ] + }, + "quoted_item_extension": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{%%" + }, + { + "type": "SYMBOL", + "name": "attribute_id" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "\\s+" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_quoted_string" + }, + { + "type": "STRING", + "value": "}" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "item_attribute" + } + } + ] + }, + "_attribute": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "%" + }, + { + "type": "SYMBOL", + "name": "attribute_id" + } + ] + }, + "_constant": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "number" + }, + { + "type": "SYMBOL", + "name": "character" + }, + { + "type": "SYMBOL", + "name": "string" + }, + { + "type": "SYMBOL", + "name": "quoted_string" + }, + { + "type": "SYMBOL", + "name": "boolean" + }, + { + "type": "SYMBOL", + "name": "unit" + } + ] + }, + "_signed_constant": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_constant" + }, + { + "type": "SYMBOL", + "name": "signed_number" + } + ] + }, + "number": { + "type": "TOKEN", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "[0-9][0-9_]*(\\.[0-9_]*)?([eE][+\\-]?[0-9][0-9_]*)?[g-zG-Z]?" + }, + { + "type": "PATTERN", + "value": "0[xX][0-9A-Fa-f][0-9A-Fa-f_]*(\\.[0-9A-Fa-f_]*)?([pP][+\\-]?[0-9][0-9_]*)?[g-zG-Z]?" + }, + { + "type": "PATTERN", + "value": "0[oO][0-7][0-7_]*[g-zG-Z]?" + }, + { + "type": "PATTERN", + "value": "0[bB][01][01_]*[g-zG-Z]?" + } + ] + } + }, + "signed_number": { + "type": "SEQ", + "members": [ + { + "type": "PATTERN", + "value": "[+-]" + }, + { + "type": "TOKEN", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "[0-9][0-9_]*(\\.[0-9_]*)?([eE][+\\-]?[0-9][0-9_]*)?[g-zG-Z]?" + }, + { + "type": "PATTERN", + "value": "0[xX][0-9A-Fa-f][0-9A-Fa-f_]*(\\.[0-9A-Fa-f_]*)?([pP][+\\-]?[0-9][0-9_]*)?[g-zG-Z]?" + }, + { + "type": "PATTERN", + "value": "0[oO][0-7][0-7_]*[g-zG-Z]?" + }, + { + "type": "PATTERN", + "value": "0[bB][01][01_]*[g-zG-Z]?" + } + ] + } + } + ] + }, + "character": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "'" + }, + { + "type": "SYMBOL", + "name": "character_content" + }, + { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "STRING", + "value": "'" + } + } + ] + }, + "character_content": { + "type": "CHOICE", + "members": [ + { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "PATTERN", + "value": "\\r*\\n" + } + }, + { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "PATTERN", + "value": "[^\\\\'\\r\\n]" + } + }, + { + "type": "SYMBOL", + "name": "_null" + }, + { + "type": "SYMBOL", + "name": "escape_sequence" + } + ] + }, + "string": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "\"" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "string_content" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "\"" + } + ] + }, + "string_content": { + "type": "REPEAT1", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "PATTERN", + "value": "\\s" + } + }, + { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "PATTERN", + "value": "\\[@" + } + }, + { + "type": "PATTERN", + "value": "[^\\\\\"%@]+|%|@" + }, + { + "type": "SYMBOL", + "name": "_null" + }, + { + "type": "SYMBOL", + "name": "escape_sequence" + }, + { + "type": "ALIAS", + "content": { + "type": "PATTERN", + "value": "\\\\u\\{[0-9A-Fa-f]+\\}" + }, + "named": true, + "value": "escape_sequence" + }, + { + "type": "ALIAS", + "content": { + "type": "PATTERN", + "value": "\\\\\\r*\\n[\\t ]*" + }, + "named": true, + "value": "escape_sequence" + }, + { + "type": "SYMBOL", + "name": "conversion_specification" + }, + { + "type": "SYMBOL", + "name": "pretty_printing_indication" + } + ] + } + }, + "quoted_string": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "SYMBOL", + "name": "_quoted_string" + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "_quoted_string": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_left_quoted_string_delimiter" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "quoted_string_content" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_right_quoted_string_delimiter" + } + ] + }, + "quoted_string_content": { + "type": "REPEAT1", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "PATTERN", + "value": "\\s" + } + }, + { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "PATTERN", + "value": "\\[@" + } + }, + { + "type": "PATTERN", + "value": "[^%@|]+|%|@|\\|" + }, + { + "type": "SYMBOL", + "name": "_null" + }, + { + "type": "SYMBOL", + "name": "conversion_specification" + }, + { + "type": "SYMBOL", + "name": "pretty_printing_indication" + } + ] + } + }, + "escape_sequence": { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "\\\\[\\\\\"'ntbr ]" + }, + { + "type": "PATTERN", + "value": "\\\\[0-9][0-9][0-9]" + }, + { + "type": "PATTERN", + "value": "\\\\x[0-9A-Fa-f][0-9A-Fa-f]" + }, + { + "type": "PATTERN", + "value": "\\\\o[0-3][0-7][0-7]" + } + ] + }, + "conversion_specification": { + "type": "TOKEN", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "%" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "[\\-0+ #]" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "[1-9][0-9]*|\\*" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "\\.([0-9]*|\\*)" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "[diunlLNxXosScCfFeEgGhHbBat!%@,]" + }, + { + "type": "PATTERN", + "value": "[lnL][diuxXo]" + } + ] + } + ] + } + }, + "pretty_printing_indication": { + "type": "PATTERN", + "value": "@([\\[\\], ;.{}?]|\\\\n|<[0-9]+>)" + }, + "boolean": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "true" + }, + { + "type": "STRING", + "value": "false" + } + ] + }, + "unit": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "begin" + }, + { + "type": "STRING", + "value": "end" + } + ] + } + ] + }, + "prefix_operator": { + "type": "TOKEN", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "!" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "[#!$%&*+\\-./:<>?@^|~]" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "PATTERN", + "value": "[#!$%&*+\\-./:<=>?@^|~]" + }, + { + "type": "REPEAT1", + "content": { + "type": "PATTERN", + "value": "[#!$%&*+\\-./:<=>?@^|~]" + } + } + ] + } + ] + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "PATTERN", + "value": "[~?]" + }, + { + "type": "REPEAT1", + "content": { + "type": "PATTERN", + "value": "[#!$%&*+\\-./:<=>?@^|~]" + } + } + ] + } + ] + } + }, + "sign_operator": { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "[+-]" + }, + { + "type": "PATTERN", + "value": "[+-]\\." + } + ] + }, + "_infix_operator": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "pow_operator" + }, + { + "type": "SYMBOL", + "name": "mult_operator" + }, + { + "type": "SYMBOL", + "name": "add_operator" + }, + { + "type": "SYMBOL", + "name": "concat_operator" + }, + { + "type": "SYMBOL", + "name": "rel_operator" + }, + { + "type": "SYMBOL", + "name": "and_operator" + }, + { + "type": "SYMBOL", + "name": "or_operator" + }, + { + "type": "SYMBOL", + "name": "assign_operator" + } + ] + }, + "hash_operator": { + "type": "TOKEN", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "#" + }, + { + "type": "REPEAT1", + "content": { + "type": "PATTERN", + "value": "[#!$%&*+\\-./:<=>?@^|~]" + } + } + ] + } + }, + "pow_operator": { + "type": "TOKEN", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "lsl" + }, + { + "type": "STRING", + "value": "lsr" + }, + { + "type": "STRING", + "value": "asr" + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "**" + }, + { + "type": "REPEAT", + "content": { + "type": "PATTERN", + "value": "[!$%&*+\\-./:<=>?@^|~]" + } + } + ] + } + ] + } + }, + "mult_operator": { + "type": "TOKEN", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "mod" + }, + { + "type": "STRING", + "value": "land" + }, + { + "type": "STRING", + "value": "lor" + }, + { + "type": "STRING", + "value": "lxor" + }, + { + "type": "SEQ", + "members": [ + { + "type": "PATTERN", + "value": "[*/%]" + }, + { + "type": "REPEAT", + "content": { + "type": "PATTERN", + "value": "[!$%&*+\\-./:<=>?@^|~]" + } + } + ] + } + ] + } + }, + "add_operator": { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "[+-]" + }, + { + "type": "PATTERN", + "value": "[+-]\\." + }, + { + "type": "TOKEN", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "+" + }, + { + "type": "REPEAT1", + "content": { + "type": "PATTERN", + "value": "[!$%&*+\\-./:<=>?@^|~]" + } + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "-" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "REPEAT1", + "content": { + "type": "PATTERN", + "value": "[!$%&*+\\-./:<=?@^|~]" + } + }, + { + "type": "SEQ", + "members": [ + { + "type": "PATTERN", + "value": "[!$%&*+\\-./:<=>?@^|~]" + }, + { + "type": "REPEAT1", + "content": { + "type": "PATTERN", + "value": "[!$%&*+\\-./:<=>?@^|~]" + } + } + ] + } + ] + } + ] + } + ] + } + } + ] + }, + "concat_operator": { + "type": "TOKEN", + "content": { + "type": "SEQ", + "members": [ + { + "type": "PATTERN", + "value": "[@^]" + }, + { + "type": "REPEAT", + "content": { + "type": "PATTERN", + "value": "[!$%&*+\\-./:<=>?@^|~]" + } + } + ] + } + }, + "rel_operator": { + "type": "TOKEN", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "PATTERN", + "value": "[=>$]" + }, + { + "type": "REPEAT", + "content": { + "type": "PATTERN", + "value": "[!$%&*+\\-./:<=>?@^|~]" + } + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "<" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "[!$%&*+./:<=>?@^|~]" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "PATTERN", + "value": "[!$%&*+\\-./:<=>?@^|~]" + }, + { + "type": "REPEAT1", + "content": { + "type": "PATTERN", + "value": "[!$%&*+\\-./:<=>?@^|~]" + } + } + ] + } + ] + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "&" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "[!$%*+\\-./:<=>?@^|~]" + }, + { + "type": "SEQ", + "members": [ + { + "type": "PATTERN", + "value": "[!$%&*+\\-./:<=>?@^|~]" + }, + { + "type": "REPEAT1", + "content": { + "type": "PATTERN", + "value": "[!$%&*+\\-./:<=>?@^|~]" + } + } + ] + } + ] + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "|" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "[!$%&*+\\-./:<=>?@^~]" + }, + { + "type": "SEQ", + "members": [ + { + "type": "PATTERN", + "value": "[!$%&*+\\-./:<=>?@^|~]" + }, + { + "type": "REPEAT1", + "content": { + "type": "PATTERN", + "value": "[!$%&*+\\-./:<=>?@^|~]" + } + } + ] + } + ] + } + ] + }, + { + "type": "STRING", + "value": "!=" + } + ] + } + }, + "and_operator": { + "type": "TOKEN", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "&" + }, + { + "type": "STRING", + "value": "&&" + } + ] + } + }, + "or_operator": { + "type": "TOKEN", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "or" + }, + { + "type": "STRING", + "value": "||" + } + ] + } + }, + "assign_operator": { + "type": "PATTERN", + "value": ":=" + }, + "indexing_operator": { + "type": "TOKEN", + "content": { + "type": "SEQ", + "members": [ + { + "type": "PATTERN", + "value": "[!$%&*+\\-/:=>?@^|]" + }, + { + "type": "REPEAT", + "content": { + "type": "PATTERN", + "value": "[!$%&*+\\-./:<=>?@^|~]" + } + } + ] + } + }, + "indexing_operator_path": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "indexing_operator" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "module_path" + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "SYMBOL", + "name": "indexing_operator" + } + ] + } + ] + }, + "let_operator": { + "type": "TOKEN", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "let" + }, + { + "type": "PATTERN", + "value": "[$&*+\\-/<=>@^|]" + }, + { + "type": "REPEAT", + "content": { + "type": "PATTERN", + "value": "[!$%&*+\\-./:<=>?@^|~]" + } + } + ] + } + }, + "let_and_operator": { + "type": "TOKEN", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "and" + }, + { + "type": "PATTERN", + "value": "[$&*+\\-/<=>@^|]" + }, + { + "type": "REPEAT", + "content": { + "type": "PATTERN", + "value": "[!$%&*+\\-./:<=>?@^|~]" + } + } + ] + } + }, + "match_operator": { + "type": "TOKEN", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "match" + }, + { + "type": "PATTERN", + "value": "[$&*+\\-/<=>@^|]" + }, + { + "type": "REPEAT", + "content": { + "type": "PATTERN", + "value": "[!$%&*+\\-./:<=>?@^|~]" + } + } + ] + } + }, + "_value_name": { + "type": "CHOICE", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_lowercase_identifier" + }, + "named": true, + "value": "value_name" + }, + { + "type": "SYMBOL", + "name": "parenthesized_operator" + } + ] + }, + "_simple_value_pattern": { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_lowercase_identifier" + }, + "named": true, + "value": "value_pattern" + }, + "_value_pattern": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_simple_value_pattern" + }, + { + "type": "SYMBOL", + "name": "parenthesized_operator" + } + ] + }, + "parenthesized_operator": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "prefix_operator" + }, + { + "type": "SYMBOL", + "name": "_infix_operator" + }, + { + "type": "SYMBOL", + "name": "hash_operator" + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "." + }, + { + "type": "SYMBOL", + "name": "indexing_operator" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "STRING", + "value": ".." + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "STRING", + "value": ".." + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "]" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "STRING", + "value": ".." + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "}" + } + ] + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "<-" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "SYMBOL", + "name": "let_operator" + }, + { + "type": "SYMBOL", + "name": "let_and_operator" + }, + { + "type": "SYMBOL", + "name": "match_operator" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "value_path": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_value_name" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "module_path" + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "SYMBOL", + "name": "_value_name" + } + ] + } + ] + }, + "module_path": { + "type": "PREC", + "value": 1, + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_module_name" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "module_path" + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "SYMBOL", + "name": "_module_name" + } + ] + } + ] + } + }, + "extended_module_path": { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_module_name" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "extended_module_path" + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "SYMBOL", + "name": "_module_name" + } + ] + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "extended_module_path" + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SYMBOL", + "name": "extended_module_path" + }, + { + "type": "STRING", + "value": ")" + } + ] + } + ] + } + ] + }, + "module_type_path": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_module_type_name" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "extended_module_path" + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "SYMBOL", + "name": "_module_type_name" + } + ] + } + ] + }, + "field_path": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_field_name" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "module_path" + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "SYMBOL", + "name": "_field_name" + } + ] + } + ] + }, + "constructor_path": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_constructor_name" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "module_path" + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "SYMBOL", + "name": "_constructor_name" + } + ] + } + ] + }, + "type_constructor_path": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_type_constructor" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "extended_module_path" + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "SYMBOL", + "name": "_type_constructor" + } + ] + } + ] + }, + "class_path": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_class_name" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "module_path" + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "SYMBOL", + "name": "_class_name" + } + ] + } + ] + }, + "class_type_path": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_class_type_name" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "extended_module_path" + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "SYMBOL", + "name": "_class_type_name" + } + ] + } + ] + }, + "_label_name": { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_lowercase_identifier" + }, + "named": true, + "value": "label_name" + }, + "_field_name": { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_lowercase_identifier" + }, + "named": true, + "value": "field_name" + }, + "_class_name": { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_lowercase_identifier" + }, + "named": true, + "value": "class_name" + }, + "_class_type_name": { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_lowercase_identifier" + }, + "named": true, + "value": "class_type_name" + }, + "_method_name": { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_lowercase_identifier" + }, + "named": true, + "value": "method_name" + }, + "_type_constructor": { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_lowercase_identifier" + }, + "named": true, + "value": "type_constructor" + }, + "_instance_variable_name": { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_lowercase_identifier" + }, + "named": true, + "value": "instance_variable_name" + }, + "_module_name": { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_uppercase_identifier" + }, + "named": true, + "value": "module_name" + }, + "_module_type_name": { + "type": "ALIAS", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_uppercase_identifier" + }, + { + "type": "SYMBOL", + "name": "_lowercase_identifier" + } + ] + }, + "named": true, + "value": "module_type_name" + }, + "_constructor_name": { + "type": "CHOICE", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_uppercase_identifier" + }, + "named": true, + "value": "constructor_name" + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "ALIAS", + "content": { + "type": "STRING", + "value": "::" + }, + "named": true, + "value": "constructor_name" + }, + { + "type": "STRING", + "value": ")" + } + ] + } + ] + }, + "_lowercase_identifier": { + "type": "PATTERN", + "value": "(\\\\#)?[\\p{Ll}_][\\p{XID_Continue}']*" + }, + "_uppercase_identifier": { + "type": "PATTERN", + "value": "[\\p{Lu}][\\p{XID_Continue}']*" + }, + "_label": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "~" + }, + { + "type": "STRING", + "value": "?" + } + ] + }, + { + "type": "SYMBOL", + "name": "_label_name" + } + ] + }, + "directive": { + "type": "SEQ", + "members": [ + { + "type": "PATTERN", + "value": "#" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_lowercase_identifier" + }, + { + "type": "SYMBOL", + "name": "_uppercase_identifier" + } + ] + } + ] + }, + "type_variable": { + "type": "SEQ", + "members": [ + { + "type": "PATTERN", + "value": "'" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_lowercase_identifier" + }, + { + "type": "SYMBOL", + "name": "_uppercase_identifier" + } + ] + } + ] + }, + "tag": { + "type": "SEQ", + "members": [ + { + "type": "PATTERN", + "value": "`" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_lowercase_identifier" + }, + { + "type": "SYMBOL", + "name": "_uppercase_identifier" + } + ] + } + ] + }, + "attribute_id": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_lowercase_identifier" + }, + { + "type": "SYMBOL", + "name": "_uppercase_identifier" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "PATTERN", + "value": "\\." + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_lowercase_identifier" + }, + { + "type": "SYMBOL", + "name": "_uppercase_identifier" + } + ] + } + ] + } + } + ] + } + }, + "extras": [ + { + "type": "PATTERN", + "value": "\\s" + }, + { + "type": "SYMBOL", + "name": "comment" + }, + { + "type": "SYMBOL", + "name": "line_number_directive" + }, + { + "type": "SYMBOL", + "name": "attribute" + } + ], + "conflicts": [], + "precedences": [], + "externals": [ + { + "type": "SYMBOL", + "name": "comment" + }, + { + "type": "SYMBOL", + "name": "_left_quoted_string_delimiter" + }, + { + "type": "SYMBOL", + "name": "_right_quoted_string_delimiter" + }, + { + "type": "STRING", + "value": "\"" + }, + { + "type": "SYMBOL", + "name": "line_number_directive" + }, + { + "type": "SYMBOL", + "name": "_null" + }, + { + "type": "SYMBOL", + "name": "_error_sentinel" + } + ], + "inline": [ + "_parameter", + "_argument", + "_extension", + "_item_extension", + "_value_pattern", + "_label_name", + "_field_name", + "_class_name", + "_class_type_name", + "_method_name", + "_type_constructor", + "_module_name", + "_module_type_name", + "_label" + ], + "supertypes": [ + "_structure_item", + "_signature_item", + "_parameter", + "_module_type", + "_simple_module_expression", + "_module_expression", + "_simple_class_type", + "_class_type", + "_class_field_specification", + "_simple_class_expression", + "_class_expression", + "_class_field", + "_polymorphic_type", + "_simple_type", + "_tuple_type", + "_type", + "_simple_expression", + "_expression", + "_sequence_expression", + "_simple_pattern", + "_effect_pattern", + "_pattern", + "_binding_pattern", + "_constant", + "_signed_constant", + "_infix_operator" + ] +} diff --git a/build/ocaml-nodes.json b/build/ocaml-nodes.json new file mode 100644 index 0000000..291124d --- /dev/null +++ b/build/ocaml-nodes.json @@ -0,0 +1,5553 @@ +[ + { + "type": "_binding_pattern", + "named": true, + "subtypes": [ + { + "type": "_signed_constant", + "named": true + }, + { + "type": "alias_pattern", + "named": true + }, + { + "type": "array_pattern", + "named": true + }, + { + "type": "cons_pattern", + "named": true + }, + { + "type": "constructor_path", + "named": true + }, + { + "type": "constructor_pattern", + "named": true + }, + { + "type": "extension", + "named": true + }, + { + "type": "lazy_pattern", + "named": true + }, + { + "type": "list_pattern", + "named": true + }, + { + "type": "local_open_pattern", + "named": true + }, + { + "type": "or_pattern", + "named": true + }, + { + "type": "package_pattern", + "named": true + }, + { + "type": "parenthesized_operator", + "named": true + }, + { + "type": "parenthesized_pattern", + "named": true + }, + { + "type": "polymorphic_variant_pattern", + "named": true + }, + { + "type": "quoted_extension", + "named": true + }, + { + "type": "range_pattern", + "named": true + }, + { + "type": "record_pattern", + "named": true + }, + { + "type": "tag", + "named": true + }, + { + "type": "tag_pattern", + "named": true + }, + { + "type": "tuple_pattern", + "named": true + }, + { + "type": "typed_pattern", + "named": true + }, + { + "type": "value_name", + "named": true + } + ] + }, + { + "type": "_class_expression", + "named": true, + "subtypes": [ + { + "type": "_simple_class_expression", + "named": true + }, + { + "type": "class_application", + "named": true + }, + { + "type": "class_function", + "named": true + }, + { + "type": "let_class_expression", + "named": true + }, + { + "type": "let_open_class_expression", + "named": true + } + ] + }, + { + "type": "_class_field", + "named": true, + "subtypes": [ + { + "type": "class_initializer", + "named": true + }, + { + "type": "inheritance_definition", + "named": true + }, + { + "type": "instance_variable_definition", + "named": true + }, + { + "type": "item_extension", + "named": true + }, + { + "type": "method_definition", + "named": true + }, + { + "type": "quoted_item_extension", + "named": true + }, + { + "type": "type_parameter_constraint", + "named": true + } + ] + }, + { + "type": "_class_field_specification", + "named": true, + "subtypes": [ + { + "type": "inheritance_specification", + "named": true + }, + { + "type": "instance_variable_specification", + "named": true + }, + { + "type": "item_extension", + "named": true + }, + { + "type": "method_specification", + "named": true + }, + { + "type": "quoted_item_extension", + "named": true + }, + { + "type": "type_parameter_constraint", + "named": true + } + ] + }, + { + "type": "_class_type", + "named": true, + "subtypes": [ + { + "type": "_simple_class_type", + "named": true + }, + { + "type": "class_function_type", + "named": true + } + ] + }, + { + "type": "_constant", + "named": true, + "subtypes": [ + { + "type": "boolean", + "named": true + }, + { + "type": "character", + "named": true + }, + { + "type": "number", + "named": true + }, + { + "type": "quoted_string", + "named": true + }, + { + "type": "string", + "named": true + }, + { + "type": "unit", + "named": true + } + ] + }, + { + "type": "_effect_pattern", + "named": true, + "subtypes": [ + { + "type": "_simple_pattern", + "named": true + }, + { + "type": "constructor_pattern", + "named": true + }, + { + "type": "lazy_pattern", + "named": true + }, + { + "type": "tag_pattern", + "named": true + } + ] + }, + { + "type": "_expression", + "named": true, + "subtypes": [ + { + "type": "_simple_expression", + "named": true + }, + { + "type": "application_expression", + "named": true + }, + { + "type": "assert_expression", + "named": true + }, + { + "type": "cons_expression", + "named": true + }, + { + "type": "for_expression", + "named": true + }, + { + "type": "fun_expression", + "named": true + }, + { + "type": "function_expression", + "named": true + }, + { + "type": "if_expression", + "named": true + }, + { + "type": "infix_expression", + "named": true + }, + { + "type": "lazy_expression", + "named": true + }, + { + "type": "let_exception_expression", + "named": true + }, + { + "type": "let_expression", + "named": true + }, + { + "type": "let_module_expression", + "named": true + }, + { + "type": "let_open_expression", + "named": true + }, + { + "type": "match_expression", + "named": true + }, + { + "type": "product_expression", + "named": true + }, + { + "type": "set_expression", + "named": true + }, + { + "type": "sign_expression", + "named": true + }, + { + "type": "try_expression", + "named": true + }, + { + "type": "while_expression", + "named": true + } + ] + }, + { + "type": "_infix_operator", + "named": true, + "subtypes": [ + { + "type": "add_operator", + "named": true + }, + { + "type": "and_operator", + "named": true + }, + { + "type": "assign_operator", + "named": true + }, + { + "type": "concat_operator", + "named": true + }, + { + "type": "mult_operator", + "named": true + }, + { + "type": "or_operator", + "named": true + }, + { + "type": "pow_operator", + "named": true + }, + { + "type": "rel_operator", + "named": true + } + ] + }, + { + "type": "_module_expression", + "named": true, + "subtypes": [ + { + "type": "_simple_module_expression", + "named": true + }, + { + "type": "functor", + "named": true + }, + { + "type": "module_application", + "named": true + }, + { + "type": "module_path", + "named": true + }, + { + "type": "structure", + "named": true + } + ] + }, + { + "type": "_module_type", + "named": true, + "subtypes": [ + { + "type": "extension", + "named": true + }, + { + "type": "functor_type", + "named": true + }, + { + "type": "module_type_constraint", + "named": true + }, + { + "type": "module_type_of", + "named": true + }, + { + "type": "module_type_path", + "named": true + }, + { + "type": "parenthesized_module_type", + "named": true + }, + { + "type": "quoted_extension", + "named": true + }, + { + "type": "signature", + "named": true + } + ] + }, + { + "type": "_parameter", + "named": true, + "subtypes": [ + { + "type": "abstract_type", + "named": true + }, + { + "type": "parameter", + "named": true + } + ] + }, + { + "type": "_pattern", + "named": true, + "subtypes": [ + { + "type": "_effect_pattern", + "named": true + }, + { + "type": "alias_pattern", + "named": true + }, + { + "type": "cons_pattern", + "named": true + }, + { + "type": "effect_pattern", + "named": true + }, + { + "type": "exception_pattern", + "named": true + }, + { + "type": "or_pattern", + "named": true + }, + { + "type": "range_pattern", + "named": true + }, + { + "type": "tuple_pattern", + "named": true + } + ] + }, + { + "type": "_polymorphic_type", + "named": true, + "subtypes": [ + { + "type": "_type", + "named": true + }, + { + "type": "polymorphic_type", + "named": true + } + ] + }, + { + "type": "_sequence_expression", + "named": true, + "subtypes": [ + { + "type": "_expression", + "named": true + }, + { + "type": "sequence_expression", + "named": true + } + ] + }, + { + "type": "_signature_item", + "named": true, + "subtypes": [ + { + "type": "class_definition", + "named": true + }, + { + "type": "class_type_definition", + "named": true + }, + { + "type": "exception_definition", + "named": true + }, + { + "type": "external", + "named": true + }, + { + "type": "floating_attribute", + "named": true + }, + { + "type": "include_module_type", + "named": true + }, + { + "type": "item_extension", + "named": true + }, + { + "type": "module_definition", + "named": true + }, + { + "type": "module_type_definition", + "named": true + }, + { + "type": "open_module", + "named": true + }, + { + "type": "quoted_item_extension", + "named": true + }, + { + "type": "type_definition", + "named": true + }, + { + "type": "value_specification", + "named": true + } + ] + }, + { + "type": "_signed_constant", + "named": true, + "subtypes": [ + { + "type": "_constant", + "named": true + }, + { + "type": "signed_number", + "named": true + } + ] + }, + { + "type": "_simple_class_expression", + "named": true, + "subtypes": [ + { + "type": "class_path", + "named": true + }, + { + "type": "extension", + "named": true + }, + { + "type": "instantiated_class", + "named": true + }, + { + "type": "object_expression", + "named": true + }, + { + "type": "parenthesized_class_expression", + "named": true + }, + { + "type": "quoted_extension", + "named": true + }, + { + "type": "typed_class_expression", + "named": true + } + ] + }, + { + "type": "_simple_class_type", + "named": true, + "subtypes": [ + { + "type": "class_body_type", + "named": true + }, + { + "type": "class_type_path", + "named": true + }, + { + "type": "extension", + "named": true + }, + { + "type": "instantiated_class_type", + "named": true + }, + { + "type": "let_open_class_type", + "named": true + }, + { + "type": "quoted_extension", + "named": true + } + ] + }, + { + "type": "_simple_expression", + "named": true, + "subtypes": [ + { + "type": "_constant", + "named": true + }, + { + "type": "array_expression", + "named": true + }, + { + "type": "array_get_expression", + "named": true + }, + { + "type": "bigarray_get_expression", + "named": true + }, + { + "type": "coercion_expression", + "named": true + }, + { + "type": "constructor_path", + "named": true + }, + { + "type": "extension", + "named": true + }, + { + "type": "field_get_expression", + "named": true + }, + { + "type": "hash_expression", + "named": true + }, + { + "type": "list_expression", + "named": true + }, + { + "type": "local_open_expression", + "named": true + }, + { + "type": "method_invocation", + "named": true + }, + { + "type": "new_expression", + "named": true + }, + { + "type": "object_copy_expression", + "named": true + }, + { + "type": "object_expression", + "named": true + }, + { + "type": "ocamlyacc_value", + "named": true + }, + { + "type": "package_expression", + "named": true + }, + { + "type": "parenthesized_expression", + "named": true + }, + { + "type": "prefix_expression", + "named": true + }, + { + "type": "quoted_extension", + "named": true + }, + { + "type": "record_expression", + "named": true + }, + { + "type": "string_get_expression", + "named": true + }, + { + "type": "tag", + "named": true + }, + { + "type": "typed_expression", + "named": true + }, + { + "type": "value_path", + "named": true + } + ] + }, + { + "type": "_simple_module_expression", + "named": true, + "subtypes": [ + { + "type": "extension", + "named": true + }, + { + "type": "packed_module", + "named": true + }, + { + "type": "parenthesized_module_expression", + "named": true + }, + { + "type": "quoted_extension", + "named": true + }, + { + "type": "typed_module_expression", + "named": true + } + ] + }, + { + "type": "_simple_pattern", + "named": true, + "subtypes": [ + { + "type": "_signed_constant", + "named": true + }, + { + "type": "array_pattern", + "named": true + }, + { + "type": "constructor_path", + "named": true + }, + { + "type": "extension", + "named": true + }, + { + "type": "list_pattern", + "named": true + }, + { + "type": "local_open_pattern", + "named": true + }, + { + "type": "package_pattern", + "named": true + }, + { + "type": "parenthesized_operator", + "named": true + }, + { + "type": "parenthesized_pattern", + "named": true + }, + { + "type": "polymorphic_variant_pattern", + "named": true + }, + { + "type": "quoted_extension", + "named": true + }, + { + "type": "record_pattern", + "named": true + }, + { + "type": "tag", + "named": true + }, + { + "type": "typed_pattern", + "named": true + }, + { + "type": "value_pattern", + "named": true + } + ] + }, + { + "type": "_simple_type", + "named": true, + "subtypes": [ + { + "type": "constructed_type", + "named": true + }, + { + "type": "extension", + "named": true + }, + { + "type": "hash_type", + "named": true + }, + { + "type": "local_open_type", + "named": true + }, + { + "type": "object_type", + "named": true + }, + { + "type": "package_type", + "named": true + }, + { + "type": "parenthesized_type", + "named": true + }, + { + "type": "polymorphic_variant_type", + "named": true + }, + { + "type": "quoted_extension", + "named": true + }, + { + "type": "type_constructor_path", + "named": true + }, + { + "type": "type_variable", + "named": true + } + ] + }, + { + "type": "_structure_item", + "named": true, + "subtypes": [ + { + "type": "class_definition", + "named": true + }, + { + "type": "class_type_definition", + "named": true + }, + { + "type": "exception_definition", + "named": true + }, + { + "type": "external", + "named": true + }, + { + "type": "floating_attribute", + "named": true + }, + { + "type": "include_module", + "named": true + }, + { + "type": "item_extension", + "named": true + }, + { + "type": "module_definition", + "named": true + }, + { + "type": "module_type_definition", + "named": true + }, + { + "type": "open_module", + "named": true + }, + { + "type": "quoted_item_extension", + "named": true + }, + { + "type": "type_definition", + "named": true + }, + { + "type": "value_definition", + "named": true + } + ] + }, + { + "type": "_tuple_type", + "named": true, + "subtypes": [ + { + "type": "_simple_type", + "named": true + }, + { + "type": "tuple_type", + "named": true + } + ] + }, + { + "type": "_type", + "named": true, + "subtypes": [ + { + "type": "_tuple_type", + "named": true + }, + { + "type": "aliased_type", + "named": true + }, + { + "type": "function_type", + "named": true + } + ] + }, + { + "type": "abstract_type", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "type_constructor", + "named": true + } + ] + } + }, + { + "type": "add_operator", + "named": true, + "fields": {} + }, + { + "type": "alias_pattern", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_binding_pattern", + "named": true + }, + { + "type": "_pattern", + "named": true + }, + { + "type": "value_pattern", + "named": true + } + ] + } + }, + { + "type": "aliased_type", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_type", + "named": true + }, + { + "type": "type_variable", + "named": true + } + ] + } + }, + { + "type": "application_expression", + "named": true, + "fields": { + "argument": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_simple_expression", + "named": true + }, + { + "type": "labeled_argument", + "named": true + } + ] + }, + "function": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_simple_expression", + "named": true + } + ] + } + } + }, + { + "type": "array_binding_pattern", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "_binding_pattern", + "named": true + } + ] + } + }, + { + "type": "array_expression", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "_expression", + "named": true + } + ] + } + }, + { + "type": "array_get_expression", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_sequence_expression", + "named": true + }, + { + "type": "_simple_expression", + "named": true + }, + { + "type": "indexing_operator_path", + "named": true + } + ] + } + }, + { + "type": "array_pattern", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "_binding_pattern", + "named": true + }, + { + "type": "_pattern", + "named": true + } + ] + } + }, + { + "type": "assert_expression", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_simple_expression", + "named": true + }, + { + "type": "attribute_id", + "named": true + } + ] + } + }, + { + "type": "attribute", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "attribute_id", + "named": true + }, + { + "type": "attribute_payload", + "named": true + } + ] + } + }, + { + "type": "attribute_id", + "named": true, + "fields": {} + }, + { + "type": "attribute_payload", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "_pattern", + "named": true + }, + { + "type": "_signature_item", + "named": true + }, + { + "type": "_structure_item", + "named": true + }, + { + "type": "_type", + "named": true + }, + { + "type": "expression_item", + "named": true + }, + { + "type": "guard", + "named": true + }, + { + "type": "toplevel_directive", + "named": true + } + ] + } + }, + { + "type": "bigarray_get_expression", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_sequence_expression", + "named": true + }, + { + "type": "_simple_expression", + "named": true + }, + { + "type": "indexing_operator_path", + "named": true + } + ] + } + }, + { + "type": "boolean", + "named": true, + "fields": {} + }, + { + "type": "character", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "character_content", + "named": true + } + ] + } + }, + { + "type": "character_content", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": false, + "types": [ + { + "type": "escape_sequence", + "named": true + } + ] + } + }, + { + "type": "class_application", + "named": true, + "fields": { + "argument": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_simple_expression", + "named": true + }, + { + "type": "labeled_argument", + "named": true + } + ] + }, + "class": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_simple_class_expression", + "named": true + } + ] + } + } + }, + { + "type": "class_binding", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": false, + "types": [ + { + "type": "_class_expression", + "named": true + } + ] + }, + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "class_name", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "_class_type", + "named": true + }, + { + "type": "_parameter", + "named": true + }, + { + "type": "item_attribute", + "named": true + }, + { + "type": "type_variable", + "named": true + } + ] + } + }, + { + "type": "class_body_type", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "_class_field_specification", + "named": true + }, + { + "type": "_type", + "named": true + }, + { + "type": "floating_attribute", + "named": true + } + ] + } + }, + { + "type": "class_definition", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "attribute_id", + "named": true + }, + { + "type": "class_binding", + "named": true + } + ] + } + }, + { + "type": "class_function", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_class_expression", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_parameter", + "named": true + } + ] + } + }, + { + "type": "class_function_type", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_class_type", + "named": true + }, + { + "type": "_tuple_type", + "named": true + }, + { + "type": "label_name", + "named": true + } + ] + } + }, + { + "type": "class_initializer", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_sequence_expression", + "named": true + }, + { + "type": "item_attribute", + "named": true + } + ] + } + }, + { + "type": "class_path", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "class_name", + "named": true + }, + { + "type": "module_path", + "named": true + } + ] + } + }, + { + "type": "class_type_binding", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_simple_class_type", + "named": true + } + ] + }, + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "class_type_name", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "item_attribute", + "named": true + }, + { + "type": "type_variable", + "named": true + } + ] + } + }, + { + "type": "class_type_definition", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "attribute_id", + "named": true + }, + { + "type": "class_type_binding", + "named": true + } + ] + } + }, + { + "type": "class_type_path", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "class_type_name", + "named": true + }, + { + "type": "extended_module_path", + "named": true + } + ] + } + }, + { + "type": "coercion_expression", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_sequence_expression", + "named": true + }, + { + "type": "_type", + "named": true + } + ] + } + }, + { + "type": "compilation_unit", + "named": true, + "root": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "_structure_item", + "named": true + }, + { + "type": "expression_item", + "named": true + }, + { + "type": "shebang", + "named": true + }, + { + "type": "toplevel_directive", + "named": true + } + ] + } + }, + { + "type": "cons_expression", + "named": true, + "fields": { + "left": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_expression", + "named": true + } + ] + }, + "right": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_expression", + "named": true + } + ] + } + } + }, + { + "type": "cons_pattern", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_binding_pattern", + "named": true + }, + { + "type": "_pattern", + "named": true + } + ] + } + }, + { + "type": "constrain_module", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "extended_module_path", + "named": true + }, + { + "type": "module_path", + "named": true + } + ] + } + }, + { + "type": "constrain_module_type", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_module_type", + "named": true + } + ] + } + }, + { + "type": "constrain_type", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_type", + "named": true + }, + { + "type": "type_constraint", + "named": true + }, + { + "type": "type_constructor_path", + "named": true + }, + { + "type": "type_variable", + "named": true + } + ] + } + }, + { + "type": "constructed_type", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_simple_type", + "named": true + }, + { + "type": "_type", + "named": true + } + ] + } + }, + { + "type": "constructor_declaration", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_simple_type", + "named": true + }, + { + "type": "constructor_name", + "named": true + }, + { + "type": "constructor_path", + "named": true + }, + { + "type": "record_declaration", + "named": true + } + ] + } + }, + { + "type": "constructor_path", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "constructor_name", + "named": true + }, + { + "type": "module_path", + "named": true + } + ] + } + }, + { + "type": "constructor_pattern", + "named": true, + "fields": { + "pattern": { + "multiple": false, + "required": false, + "types": [ + { + "type": "_binding_pattern", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_pattern", + "named": true + }, + { + "type": "abstract_type", + "named": true + }, + { + "type": "constructor_path", + "named": true + } + ] + } + }, + { + "type": "directive", + "named": true, + "fields": {} + }, + { + "type": "do_clause", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": false, + "types": [ + { + "type": "_sequence_expression", + "named": true + } + ] + } + }, + { + "type": "effect_pattern", + "named": true, + "fields": { + "continuation": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_simple_pattern", + "named": true + } + ] + }, + "effect": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_effect_pattern", + "named": true + } + ] + } + } + }, + { + "type": "else_clause", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_expression", + "named": true + } + ] + } + }, + { + "type": "escape_sequence", + "named": true, + "fields": {} + }, + { + "type": "exception_definition", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "attribute_id", + "named": true + }, + { + "type": "constructor_declaration", + "named": true + }, + { + "type": "item_attribute", + "named": true + } + ] + } + }, + { + "type": "exception_pattern", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_pattern", + "named": true + }, + { + "type": "attribute_id", + "named": true + } + ] + } + }, + { + "type": "expression_item", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_sequence_expression", + "named": true + }, + { + "type": "item_attribute", + "named": true + } + ] + } + }, + { + "type": "extended_module_path", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "extended_module_path", + "named": true + }, + { + "type": "module_name", + "named": true + } + ] + } + }, + { + "type": "extension", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "attribute_id", + "named": true + }, + { + "type": "attribute_payload", + "named": true + } + ] + } + }, + { + "type": "external", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_polymorphic_type", + "named": true + }, + { + "type": "attribute_id", + "named": true + }, + { + "type": "item_attribute", + "named": true + }, + { + "type": "parenthesized_operator", + "named": true + }, + { + "type": "string", + "named": true + }, + { + "type": "value_name", + "named": true + } + ] + } + }, + { + "type": "field_declaration", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_polymorphic_type", + "named": true + }, + { + "type": "field_name", + "named": true + } + ] + } + }, + { + "type": "field_expression", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": false, + "types": [ + { + "type": "_expression", + "named": true + } + ] + }, + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "field_path", + "named": true + } + ] + } + }, + "children": { + "multiple": false, + "required": false, + "types": [ + { + "type": "_type", + "named": true + } + ] + } + }, + { + "type": "field_get_expression", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_simple_expression", + "named": true + }, + { + "type": "field_path", + "named": true + } + ] + } + }, + { + "type": "field_path", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "field_name", + "named": true + }, + { + "type": "module_path", + "named": true + } + ] + } + }, + { + "type": "field_pattern", + "named": true, + "fields": { + "pattern": { + "multiple": false, + "required": false, + "types": [ + { + "type": "_binding_pattern", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_pattern", + "named": true + }, + { + "type": "_type", + "named": true + }, + { + "type": "field_path", + "named": true + } + ] + } + }, + { + "type": "floating_attribute", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "attribute_id", + "named": true + }, + { + "type": "attribute_payload", + "named": true + } + ] + } + }, + { + "type": "for_expression", + "named": true, + "fields": { + "from": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_sequence_expression", + "named": true + } + ] + }, + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "parenthesized_operator", + "named": true + }, + { + "type": "value_pattern", + "named": true + } + ] + }, + "to": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_sequence_expression", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "attribute_id", + "named": true + }, + { + "type": "do_clause", + "named": true + } + ] + } + }, + { + "type": "fun_expression", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_sequence_expression", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_parameter", + "named": true + }, + { + "type": "_simple_type", + "named": true + }, + { + "type": "attribute_id", + "named": true + } + ] + } + }, + { + "type": "function_expression", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "attribute_id", + "named": true + }, + { + "type": "match_case", + "named": true + } + ] + } + }, + { + "type": "function_type", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_type", + "named": true + }, + { + "type": "typed_label", + "named": true + } + ] + } + }, + { + "type": "functor", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_module_expression", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "module_parameter", + "named": true + } + ] + } + }, + { + "type": "functor_type", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_module_type", + "named": true + }, + { + "type": "module_parameter", + "named": true + } + ] + } + }, + { + "type": "guard", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_sequence_expression", + "named": true + } + ] + } + }, + { + "type": "hash_expression", + "named": true, + "fields": { + "left": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_simple_expression", + "named": true + } + ] + }, + "operator": { + "multiple": false, + "required": true, + "types": [ + { + "type": "hash_operator", + "named": true + } + ] + }, + "right": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_simple_expression", + "named": true + } + ] + } + } + }, + { + "type": "hash_type", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_simple_type", + "named": true + }, + { + "type": "_type", + "named": true + }, + { + "type": "class_type_path", + "named": true + } + ] + } + }, + { + "type": "if_expression", + "named": true, + "fields": { + "condition": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_sequence_expression", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "attribute_id", + "named": true + }, + { + "type": "else_clause", + "named": true + }, + { + "type": "then_clause", + "named": true + } + ] + } + }, + { + "type": "include_module", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_module_expression", + "named": true + }, + { + "type": "attribute_id", + "named": true + }, + { + "type": "item_attribute", + "named": true + } + ] + } + }, + { + "type": "include_module_type", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_module_type", + "named": true + }, + { + "type": "attribute_id", + "named": true + }, + { + "type": "item_attribute", + "named": true + } + ] + } + }, + { + "type": "indexing_operator_path", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "indexing_operator", + "named": true + }, + { + "type": "module_path", + "named": true + } + ] + } + }, + { + "type": "infix_expression", + "named": true, + "fields": { + "left": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_expression", + "named": true + } + ] + }, + "operator": { + "multiple": false, + "required": true, + "types": [ + { + "type": "add_operator", + "named": true + }, + { + "type": "and_operator", + "named": true + }, + { + "type": "assign_operator", + "named": true + }, + { + "type": "concat_operator", + "named": true + }, + { + "type": "mult_operator", + "named": true + }, + { + "type": "or_operator", + "named": true + }, + { + "type": "pow_operator", + "named": true + }, + { + "type": "rel_operator", + "named": true + } + ] + }, + "right": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_expression", + "named": true + } + ] + } + } + }, + { + "type": "inheritance_definition", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_class_expression", + "named": true + }, + { + "type": "item_attribute", + "named": true + }, + { + "type": "parenthesized_operator", + "named": true + }, + { + "type": "value_pattern", + "named": true + } + ] + } + }, + { + "type": "inheritance_specification", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_simple_class_type", + "named": true + }, + { + "type": "item_attribute", + "named": true + } + ] + } + }, + { + "type": "instance_variable_definition", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": false, + "types": [ + { + "type": "_sequence_expression", + "named": true + } + ] + }, + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "instance_variable_name", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "_type", + "named": true + }, + { + "type": "item_attribute", + "named": true + } + ] + } + }, + { + "type": "instance_variable_expression", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_expression", + "named": true + }, + { + "type": "instance_variable_name", + "named": true + } + ] + } + }, + { + "type": "instance_variable_specification", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_type", + "named": true + }, + { + "type": "instance_variable_name", + "named": true + }, + { + "type": "item_attribute", + "named": true + } + ] + } + }, + { + "type": "instantiated_class", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_type", + "named": true + }, + { + "type": "class_path", + "named": true + } + ] + } + }, + { + "type": "instantiated_class_type", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_type", + "named": true + }, + { + "type": "class_type_path", + "named": true + } + ] + } + }, + { + "type": "item_attribute", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "attribute_id", + "named": true + }, + { + "type": "attribute_payload", + "named": true + } + ] + } + }, + { + "type": "item_extension", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "attribute_id", + "named": true + }, + { + "type": "attribute_payload", + "named": true + }, + { + "type": "item_attribute", + "named": true + } + ] + } + }, + { + "type": "labeled_argument", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_simple_expression", + "named": true + }, + { + "type": "_type", + "named": true + }, + { + "type": "label_name", + "named": true + } + ] + } + }, + { + "type": "lazy_expression", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_simple_expression", + "named": true + }, + { + "type": "attribute_id", + "named": true + } + ] + } + }, + { + "type": "lazy_pattern", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_binding_pattern", + "named": true + }, + { + "type": "_pattern", + "named": true + }, + { + "type": "attribute_id", + "named": true + } + ] + } + }, + { + "type": "let_binding", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": false, + "types": [ + { + "type": "_sequence_expression", + "named": true + } + ] + }, + "pattern": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_binding_pattern", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "_parameter", + "named": true + }, + { + "type": "_polymorphic_type", + "named": true + }, + { + "type": "item_attribute", + "named": true + } + ] + } + }, + { + "type": "let_class_expression", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_class_expression", + "named": true + } + ] + } + }, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "value_definition", + "named": true + } + ] + } + }, + { + "type": "let_exception_expression", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_sequence_expression", + "named": true + } + ] + } + }, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "exception_definition", + "named": true + } + ] + } + }, + { + "type": "let_expression", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_sequence_expression", + "named": true + }, + { + "type": "value_definition", + "named": true + } + ] + } + }, + { + "type": "let_module_expression", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_sequence_expression", + "named": true + } + ] + } + }, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "module_definition", + "named": true + } + ] + } + }, + { + "type": "let_open_class_expression", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_class_expression", + "named": true + } + ] + } + }, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "open_module", + "named": true + } + ] + } + }, + { + "type": "let_open_class_type", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_simple_class_type", + "named": true + } + ] + } + }, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "open_module", + "named": true + } + ] + } + }, + { + "type": "let_open_expression", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_sequence_expression", + "named": true + } + ] + } + }, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "open_module", + "named": true + } + ] + } + }, + { + "type": "list_binding_pattern", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "_binding_pattern", + "named": true + } + ] + } + }, + { + "type": "list_expression", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "_expression", + "named": true + } + ] + } + }, + { + "type": "list_pattern", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "_binding_pattern", + "named": true + }, + { + "type": "_pattern", + "named": true + } + ] + } + }, + { + "type": "local_open_expression", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_sequence_expression", + "named": true + }, + { + "type": "array_expression", + "named": true + }, + { + "type": "list_expression", + "named": true + }, + { + "type": "module_path", + "named": true + }, + { + "type": "object_copy_expression", + "named": true + }, + { + "type": "package_expression", + "named": true + }, + { + "type": "record_expression", + "named": true + } + ] + } + }, + { + "type": "local_open_pattern", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_binding_pattern", + "named": true + }, + { + "type": "_pattern", + "named": true + }, + { + "type": "array_binding_pattern", + "named": true + }, + { + "type": "list_binding_pattern", + "named": true + }, + { + "type": "module_path", + "named": true + }, + { + "type": "record_binding_pattern", + "named": true + } + ] + } + }, + { + "type": "local_open_type", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_type", + "named": true + }, + { + "type": "extended_module_path", + "named": true + }, + { + "type": "package_type", + "named": true + }, + { + "type": "polymorphic_variant_type", + "named": true + } + ] + } + }, + { + "type": "match_case", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_sequence_expression", + "named": true + }, + { + "type": "refutation_case", + "named": true + } + ] + }, + "pattern": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_pattern", + "named": true + } + ] + } + }, + "children": { + "multiple": false, + "required": false, + "types": [ + { + "type": "guard", + "named": true + } + ] + } + }, + { + "type": "match_expression", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_sequence_expression", + "named": true + }, + { + "type": "attribute_id", + "named": true + }, + { + "type": "match_case", + "named": true + }, + { + "type": "match_operator", + "named": true + } + ] + } + }, + { + "type": "method_definition", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": false, + "types": [ + { + "type": "_sequence_expression", + "named": true + } + ] + }, + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "method_name", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "_parameter", + "named": true + }, + { + "type": "_polymorphic_type", + "named": true + }, + { + "type": "item_attribute", + "named": true + } + ] + } + }, + { + "type": "method_invocation", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_simple_expression", + "named": true + }, + { + "type": "method_name", + "named": true + } + ] + } + }, + { + "type": "method_specification", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_polymorphic_type", + "named": true + }, + { + "type": "item_attribute", + "named": true + }, + { + "type": "method_name", + "named": true + } + ] + } + }, + { + "type": "method_type", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_polymorphic_type", + "named": true + }, + { + "type": "method_name", + "named": true + } + ] + } + }, + { + "type": "module_application", + "named": true, + "fields": { + "argument": { + "multiple": false, + "required": false, + "types": [ + { + "type": "_simple_module_expression", + "named": true + } + ] + }, + "functor": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_module_expression", + "named": true + } + ] + } + } + }, + { + "type": "module_binding", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": false, + "types": [ + { + "type": "_module_expression", + "named": true + } + ] + }, + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "module_name", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "_module_type", + "named": true + }, + { + "type": "item_attribute", + "named": true + }, + { + "type": "module_parameter", + "named": true + } + ] + } + }, + { + "type": "module_definition", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "attribute_id", + "named": true + }, + { + "type": "module_binding", + "named": true + } + ] + } + }, + { + "type": "module_parameter", + "named": true, + "fields": { + "name": { + "multiple": false, + "required": false, + "types": [ + { + "type": "module_name", + "named": true + } + ] + } + }, + "children": { + "multiple": false, + "required": false, + "types": [ + { + "type": "_module_type", + "named": true + } + ] + } + }, + { + "type": "module_path", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "module_name", + "named": true + }, + { + "type": "module_path", + "named": true + } + ] + } + }, + { + "type": "module_type_constraint", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_module_type", + "named": true + }, + { + "type": "constrain_module", + "named": true + }, + { + "type": "constrain_module_type", + "named": true + }, + { + "type": "constrain_type", + "named": true + } + ] + } + }, + { + "type": "module_type_definition", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": false, + "types": [ + { + "type": "_module_type", + "named": true + } + ] + }, + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "module_type_name", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "attribute_id", + "named": true + }, + { + "type": "item_attribute", + "named": true + } + ] + } + }, + { + "type": "module_type_of", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_module_expression", + "named": true + } + ] + } + }, + { + "type": "module_type_path", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "extended_module_path", + "named": true + }, + { + "type": "module_type_name", + "named": true + } + ] + } + }, + { + "type": "new_expression", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "attribute_id", + "named": true + }, + { + "type": "class_path", + "named": true + } + ] + } + }, + { + "type": "number", + "named": true, + "fields": {} + }, + { + "type": "object_copy_expression", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "instance_variable_expression", + "named": true + } + ] + } + }, + { + "type": "object_expression", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "_class_field", + "named": true + }, + { + "type": "_pattern", + "named": true + }, + { + "type": "_type", + "named": true + }, + { + "type": "attribute_id", + "named": true + }, + { + "type": "floating_attribute", + "named": true + } + ] + } + }, + { + "type": "object_type", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "_simple_type", + "named": true + }, + { + "type": "method_type", + "named": true + } + ] + } + }, + { + "type": "open_module", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_module_expression", + "named": true + }, + { + "type": "attribute_id", + "named": true + }, + { + "type": "item_attribute", + "named": true + } + ] + } + }, + { + "type": "or_pattern", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_binding_pattern", + "named": true + }, + { + "type": "_pattern", + "named": true + } + ] + } + }, + { + "type": "package_expression", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_module_expression", + "named": true + }, + { + "type": "_module_type", + "named": true + }, + { + "type": "attribute_id", + "named": true + } + ] + } + }, + { + "type": "package_pattern", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_module_type", + "named": true + }, + { + "type": "attribute_id", + "named": true + }, + { + "type": "module_name", + "named": true + } + ] + } + }, + { + "type": "package_type", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_module_type", + "named": true + }, + { + "type": "attribute_id", + "named": true + } + ] + } + }, + { + "type": "packed_module", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_expression", + "named": true + }, + { + "type": "_module_type", + "named": true + } + ] + } + }, + { + "type": "parameter", + "named": true, + "fields": { + "pattern": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_pattern", + "named": true + }, + { + "type": "_simple_pattern", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "_sequence_expression", + "named": true + }, + { + "type": "_type", + "named": true + }, + { + "type": "label_name", + "named": true + } + ] + } + }, + { + "type": "parenthesized_class_expression", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_class_expression", + "named": true + } + ] + } + }, + { + "type": "parenthesized_expression", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_sequence_expression", + "named": true + }, + { + "type": "attribute_id", + "named": true + } + ] + } + }, + { + "type": "parenthesized_module_expression", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_module_expression", + "named": true + } + ] + } + }, + { + "type": "parenthesized_module_type", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_module_type", + "named": true + } + ] + } + }, + { + "type": "parenthesized_operator", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_infix_operator", + "named": true + }, + { + "type": "hash_operator", + "named": true + }, + { + "type": "indexing_operator", + "named": true + }, + { + "type": "let_and_operator", + "named": true + }, + { + "type": "let_operator", + "named": true + }, + { + "type": "match_operator", + "named": true + }, + { + "type": "prefix_operator", + "named": true + } + ] + } + }, + { + "type": "parenthesized_pattern", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_binding_pattern", + "named": true + }, + { + "type": "_pattern", + "named": true + } + ] + } + }, + { + "type": "parenthesized_type", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_type", + "named": true + } + ] + } + }, + { + "type": "polymorphic_type", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_type", + "named": true + }, + { + "type": "abstract_type", + "named": true + }, + { + "type": "type_variable", + "named": true + } + ] + } + }, + { + "type": "polymorphic_variant_pattern", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "type_constructor_path", + "named": true + } + ] + } + }, + { + "type": "polymorphic_variant_type", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "_type", + "named": true + }, + { + "type": "tag", + "named": true + }, + { + "type": "tag_specification", + "named": true + } + ] + } + }, + { + "type": "prefix_expression", + "named": true, + "fields": { + "operator": { + "multiple": false, + "required": true, + "types": [ + { + "type": "prefix_operator", + "named": true + } + ] + }, + "right": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_simple_expression", + "named": true + } + ] + } + } + }, + { + "type": "product_expression", + "named": true, + "fields": { + "left": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_expression", + "named": true + } + ] + }, + "right": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_expression", + "named": true + } + ] + } + } + }, + { + "type": "quoted_extension", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "attribute_id", + "named": true + }, + { + "type": "quoted_string_content", + "named": true + } + ] + } + }, + { + "type": "quoted_item_extension", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "attribute_id", + "named": true + }, + { + "type": "item_attribute", + "named": true + }, + { + "type": "quoted_string_content", + "named": true + } + ] + } + }, + { + "type": "quoted_string", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": false, + "types": [ + { + "type": "quoted_string_content", + "named": true + } + ] + } + }, + { + "type": "quoted_string_content", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "conversion_specification", + "named": true + }, + { + "type": "pretty_printing_indication", + "named": true + } + ] + } + }, + { + "type": "range_pattern", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_signed_constant", + "named": true + } + ] + } + }, + { + "type": "record_binding_pattern", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "field_pattern", + "named": true + } + ] + } + }, + { + "type": "record_declaration", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "field_declaration", + "named": true + } + ] + } + }, + { + "type": "record_expression", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_simple_expression", + "named": true + }, + { + "type": "field_expression", + "named": true + } + ] + } + }, + { + "type": "record_pattern", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "field_pattern", + "named": true + } + ] + } + }, + { + "type": "refutation_case", + "named": true, + "fields": {} + }, + { + "type": "sequence_expression", + "named": true, + "fields": { + "left": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_expression", + "named": true + } + ] + }, + "right": { + "multiple": false, + "required": false, + "types": [ + { + "type": "_sequence_expression", + "named": true + } + ] + } + }, + "children": { + "multiple": false, + "required": false, + "types": [ + { + "type": "attribute_id", + "named": true + } + ] + } + }, + { + "type": "set_expression", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_expression", + "named": true + } + ] + } + }, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "array_get_expression", + "named": true + }, + { + "type": "bigarray_get_expression", + "named": true + }, + { + "type": "field_get_expression", + "named": true + }, + { + "type": "instance_variable_name", + "named": true + }, + { + "type": "string_get_expression", + "named": true + } + ] + } + }, + { + "type": "sign_expression", + "named": true, + "fields": { + "operator": { + "multiple": false, + "required": true, + "types": [ + { + "type": "sign_operator", + "named": true + } + ] + }, + "right": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_expression", + "named": true + } + ] + } + } + }, + { + "type": "sign_operator", + "named": true, + "fields": {} + }, + { + "type": "signature", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "_signature_item", + "named": true + } + ] + } + }, + { + "type": "signed_number", + "named": true, + "fields": {} + }, + { + "type": "string", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": false, + "types": [ + { + "type": "string_content", + "named": true + } + ] + } + }, + { + "type": "string_content", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "conversion_specification", + "named": true + }, + { + "type": "escape_sequence", + "named": true + }, + { + "type": "pretty_printing_indication", + "named": true + } + ] + } + }, + { + "type": "string_get_expression", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_sequence_expression", + "named": true + }, + { + "type": "_simple_expression", + "named": true + }, + { + "type": "indexing_operator_path", + "named": true + } + ] + } + }, + { + "type": "structure", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "_structure_item", + "named": true + }, + { + "type": "expression_item", + "named": true + }, + { + "type": "toplevel_directive", + "named": true + } + ] + } + }, + { + "type": "tag", + "named": true, + "fields": {} + }, + { + "type": "tag_pattern", + "named": true, + "fields": { + "pattern": { + "multiple": false, + "required": false, + "types": [ + { + "type": "_binding_pattern", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_pattern", + "named": true + }, + { + "type": "tag", + "named": true + } + ] + } + }, + { + "type": "tag_specification", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_type", + "named": true + }, + { + "type": "tag", + "named": true + } + ] + } + }, + { + "type": "then_clause", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_expression", + "named": true + } + ] + } + }, + { + "type": "toplevel_directive", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_constant", + "named": true + }, + { + "type": "directive", + "named": true + }, + { + "type": "module_path", + "named": true + }, + { + "type": "value_path", + "named": true + } + ] + } + }, + { + "type": "try_expression", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_sequence_expression", + "named": true + }, + { + "type": "attribute_id", + "named": true + }, + { + "type": "match_case", + "named": true + } + ] + } + }, + { + "type": "tuple_pattern", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_binding_pattern", + "named": true + }, + { + "type": "_pattern", + "named": true + } + ] + } + }, + { + "type": "tuple_type", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_tuple_type", + "named": true + } + ] + } + }, + { + "type": "type_binding", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": false, + "types": [ + { + "type": "..", + "named": false + }, + { + "type": "record_declaration", + "named": true + }, + { + "type": "variant_declaration", + "named": true + } + ] + }, + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "type_constructor", + "named": true + }, + { + "type": "type_constructor_path", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "_type", + "named": true + }, + { + "type": "item_attribute", + "named": true + }, + { + "type": "type_constraint", + "named": true + }, + { + "type": "type_variable", + "named": true + } + ] + } + }, + { + "type": "type_constraint", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_type", + "named": true + } + ] + } + }, + { + "type": "type_constructor_path", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "extended_module_path", + "named": true + }, + { + "type": "type_constructor", + "named": true + } + ] + } + }, + { + "type": "type_definition", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "attribute_id", + "named": true + }, + { + "type": "type_binding", + "named": true + } + ] + } + }, + { + "type": "type_parameter_constraint", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_type", + "named": true + }, + { + "type": "item_attribute", + "named": true + } + ] + } + }, + { + "type": "type_variable", + "named": true, + "fields": {} + }, + { + "type": "typed_class_expression", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_class_expression", + "named": true + }, + { + "type": "_class_type", + "named": true + } + ] + } + }, + { + "type": "typed_expression", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_sequence_expression", + "named": true + }, + { + "type": "_type", + "named": true + } + ] + } + }, + { + "type": "typed_label", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_type", + "named": true + }, + { + "type": "label_name", + "named": true + } + ] + } + }, + { + "type": "typed_module_expression", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_module_expression", + "named": true + }, + { + "type": "_module_type", + "named": true + } + ] + } + }, + { + "type": "typed_pattern", + "named": true, + "fields": { + "pattern": { + "multiple": false, + "required": false, + "types": [ + { + "type": "_binding_pattern", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_pattern", + "named": true + }, + { + "type": "_type", + "named": true + } + ] + } + }, + { + "type": "unit", + "named": true, + "fields": {} + }, + { + "type": "value_definition", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "attribute_id", + "named": true + }, + { + "type": "let_and_operator", + "named": true + }, + { + "type": "let_binding", + "named": true + }, + { + "type": "let_operator", + "named": true + } + ] + } + }, + { + "type": "value_path", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "module_path", + "named": true + }, + { + "type": "parenthesized_operator", + "named": true + }, + { + "type": "value_name", + "named": true + } + ] + } + }, + { + "type": "value_specification", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_polymorphic_type", + "named": true + }, + { + "type": "attribute_id", + "named": true + }, + { + "type": "item_attribute", + "named": true + }, + { + "type": "parenthesized_operator", + "named": true + }, + { + "type": "value_name", + "named": true + } + ] + } + }, + { + "type": "variant_declaration", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "constructor_declaration", + "named": true + } + ] + } + }, + { + "type": "while_expression", + "named": true, + "fields": { + "condition": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_sequence_expression", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "attribute_id", + "named": true + }, + { + "type": "do_clause", + "named": true + } + ] + } + }, + { + "type": "!", + "named": false + }, + { + "type": "\"", + "named": false + }, + { + "type": "#", + "named": false + }, + { + "type": "%", + "named": false + }, + { + "type": "&", + "named": false + }, + { + "type": "'", + "named": false + }, + { + "type": "(", + "named": false + }, + { + "type": ")", + "named": false + }, + { + "type": "*", + "named": false + }, + { + "type": "+", + "named": false + }, + { + "type": "+=", + "named": false + }, + { + "type": ",", + "named": false + }, + { + "type": "-", + "named": false + }, + { + "type": "->", + "named": false + }, + { + "type": ".", + "named": false + }, + { + "type": "..", + "named": false + }, + { + "type": ":", + "named": false + }, + { + "type": "::", + "named": false + }, + { + "type": ":=", + "named": false + }, + { + "type": ":>", + "named": false + }, + { + "type": ";", + "named": false + }, + { + "type": ";;", + "named": false + }, + { + "type": "<", + "named": false + }, + { + "type": "<-", + "named": false + }, + { + "type": "=", + "named": false + }, + { + "type": ">", + "named": false + }, + { + "type": ">}", + "named": false + }, + { + "type": "?", + "named": false + }, + { + "type": "[", + "named": false + }, + { + "type": "[%", + "named": false + }, + { + "type": "[%%", + "named": false + }, + { + "type": "[<", + "named": false + }, + { + "type": "[>", + "named": false + }, + { + "type": "[@", + "named": false + }, + { + "type": "[@@", + "named": false + }, + { + "type": "[@@@", + "named": false + }, + { + "type": "[|", + "named": false + }, + { + "type": "]", + "named": false + }, + { + "type": "_", + "named": false + }, + { + "type": "and", + "named": false + }, + { + "type": "and_operator", + "named": true + }, + { + "type": "as", + "named": false + }, + { + "type": "assert", + "named": false + }, + { + "type": "assign_operator", + "named": true + }, + { + "type": "begin", + "named": false + }, + { + "type": "class", + "named": false + }, + { + "type": "class_name", + "named": true + }, + { + "type": "class_type_name", + "named": true + }, + { + "type": "comment", + "named": true + }, + { + "type": "concat_operator", + "named": true + }, + { + "type": "constraint", + "named": false + }, + { + "type": "constructor_name", + "named": true + }, + { + "type": "conversion_specification", + "named": true + }, + { + "type": "do", + "named": false + }, + { + "type": "done", + "named": false + }, + { + "type": "downto", + "named": false + }, + { + "type": "effect", + "named": false + }, + { + "type": "else", + "named": false + }, + { + "type": "end", + "named": false + }, + { + "type": "exception", + "named": false + }, + { + "type": "external", + "named": false + }, + { + "type": "false", + "named": false + }, + { + "type": "field_name", + "named": true + }, + { + "type": "for", + "named": false + }, + { + "type": "fun", + "named": false + }, + { + "type": "function", + "named": false + }, + { + "type": "functor", + "named": false + }, + { + "type": "hash_operator", + "named": true + }, + { + "type": "if", + "named": false + }, + { + "type": "in", + "named": false + }, + { + "type": "include", + "named": false + }, + { + "type": "indexing_operator", + "named": true + }, + { + "type": "inherit", + "named": false + }, + { + "type": "initializer", + "named": false + }, + { + "type": "instance_variable_name", + "named": true + }, + { + "type": "label_name", + "named": true + }, + { + "type": "lazy", + "named": false + }, + { + "type": "let", + "named": false + }, + { + "type": "let_and_operator", + "named": true + }, + { + "type": "let_operator", + "named": true + }, + { + "type": "line_number_directive", + "named": true + }, + { + "type": "match", + "named": false + }, + { + "type": "match_operator", + "named": true + }, + { + "type": "method", + "named": false + }, + { + "type": "method_name", + "named": true + }, + { + "type": "module", + "named": false + }, + { + "type": "module_name", + "named": true + }, + { + "type": "module_type_name", + "named": true + }, + { + "type": "mult_operator", + "named": true + }, + { + "type": "mutable", + "named": false + }, + { + "type": "new", + "named": false + }, + { + "type": "nonrec", + "named": false + }, + { + "type": "object", + "named": false + }, + { + "type": "ocamlyacc_value", + "named": true + }, + { + "type": "of", + "named": false + }, + { + "type": "open", + "named": false + }, + { + "type": "or_operator", + "named": true + }, + { + "type": "pow_operator", + "named": true + }, + { + "type": "prefix_operator", + "named": true + }, + { + "type": "pretty_printing_indication", + "named": true + }, + { + "type": "private", + "named": false + }, + { + "type": "rec", + "named": false + }, + { + "type": "rel_operator", + "named": true + }, + { + "type": "shebang", + "named": true + }, + { + "type": "sig", + "named": false + }, + { + "type": "struct", + "named": false + }, + { + "type": "then", + "named": false + }, + { + "type": "to", + "named": false + }, + { + "type": "true", + "named": false + }, + { + "type": "try", + "named": false + }, + { + "type": "type", + "named": false + }, + { + "type": "type_constructor", + "named": true + }, + { + "type": "val", + "named": false + }, + { + "type": "value_name", + "named": true + }, + { + "type": "value_pattern", + "named": true + }, + { + "type": "virtual", + "named": false + }, + { + "type": "when", + "named": false + }, + { + "type": "while", + "named": false + }, + { + "type": "with", + "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 + } +] \ No newline at end of file diff --git a/build/ocaml_interface-grammar.json b/build/ocaml_interface-grammar.json new file mode 100644 index 0000000..4f7b383 --- /dev/null +++ b/build/ocaml_interface-grammar.json @@ -0,0 +1,10712 @@ +{ + "$schema": "https://tree-sitter.github.io/tree-sitter/assets/schemas/grammar.schema.json", + "name": "ocaml_interface", + "inherits": "ocaml", + "word": "_lowercase_identifier", + "rules": { + "compilation_unit": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_signature" + }, + { + "type": "BLANK" + } + ] + }, + "shebang": { + "type": "PATTERN", + "value": "#!.*" + }, + "_structure": { + "type": "CHOICE", + "members": [ + { + "type": "REPEAT1", + "content": { + "type": "STRING", + "value": ";;" + } + }, + { + "type": "SEQ", + "members": [ + { + "type": "REPEAT", + "content": { + "type": "STRING", + "value": ";;" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_structure_item" + }, + { + "type": "SYMBOL", + "name": "toplevel_directive" + }, + { + "type": "SYMBOL", + "name": "expression_item" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "REPEAT", + "content": { + "type": "STRING", + "value": ";;" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_structure_item" + }, + { + "type": "SYMBOL", + "name": "toplevel_directive" + } + ] + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "REPEAT1", + "content": { + "type": "STRING", + "value": ";;" + } + }, + { + "type": "SYMBOL", + "name": "expression_item" + } + ] + } + ] + } + }, + { + "type": "REPEAT", + "content": { + "type": "STRING", + "value": ";;" + } + } + ] + } + ] + }, + "expression_item": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_sequence_expression" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "item_attribute" + } + } + ] + }, + "_signature": { + "type": "CHOICE", + "members": [ + { + "type": "REPEAT1", + "content": { + "type": "STRING", + "value": ";;" + } + }, + { + "type": "SEQ", + "members": [ + { + "type": "REPEAT1", + "content": { + "type": "SEQ", + "members": [ + { + "type": "REPEAT", + "content": { + "type": "STRING", + "value": ";;" + } + }, + { + "type": "SYMBOL", + "name": "_signature_item" + } + ] + } + }, + { + "type": "REPEAT", + "content": { + "type": "STRING", + "value": ";;" + } + } + ] + } + ] + }, + "toplevel_directive": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "directive" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_constant" + }, + { + "type": "SYMBOL", + "name": "value_path" + }, + { + "type": "SYMBOL", + "name": "module_path" + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "_structure_item": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "value_definition" + }, + { + "type": "SYMBOL", + "name": "external" + }, + { + "type": "SYMBOL", + "name": "type_definition" + }, + { + "type": "SYMBOL", + "name": "exception_definition" + }, + { + "type": "SYMBOL", + "name": "module_definition" + }, + { + "type": "SYMBOL", + "name": "module_type_definition" + }, + { + "type": "SYMBOL", + "name": "open_module" + }, + { + "type": "SYMBOL", + "name": "include_module" + }, + { + "type": "SYMBOL", + "name": "class_definition" + }, + { + "type": "SYMBOL", + "name": "class_type_definition" + }, + { + "type": "SYMBOL", + "name": "floating_attribute" + }, + { + "type": "SYMBOL", + "name": "_item_extension" + } + ] + }, + "value_definition": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "let" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "rec" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "SYMBOL", + "name": "let_operator" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "let_binding" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "and" + }, + { + "type": "SYMBOL", + "name": "let_and_operator" + } + ] + }, + { + "type": "SYMBOL", + "name": "let_binding" + } + ] + } + } + ] + } + ] + }, + "let_binding": { + "type": "PREC_RIGHT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "pattern", + "content": { + "type": "SYMBOL", + "name": "_binding_pattern" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_parameter" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_polymorphic_typed" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ":>" + }, + { + "type": "SYMBOL", + "name": "_type" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "=" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "_sequence_expression" + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "item_attribute" + } + } + ] + } + }, + "_parameter": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "parameter" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_parenthesized_abstract_type" + }, + "named": true, + "value": "abstract_type" + } + ] + }, + "parameter": { + "type": "CHOICE", + "members": [ + { + "type": "FIELD", + "name": "pattern", + "content": { + "type": "SYMBOL", + "name": "_simple_pattern" + } + }, + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "~" + }, + { + "type": "STRING", + "value": "?" + } + ] + }, + { + "type": "FIELD", + "name": "pattern", + "content": { + "type": "SYMBOL", + "name": "_simple_value_pattern" + } + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_label" + }, + { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "STRING", + "value": ":" + } + }, + { + "type": "FIELD", + "name": "pattern", + "content": { + "type": "SYMBOL", + "name": "_simple_pattern" + } + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "~" + }, + { + "type": "STRING", + "value": "?" + } + ] + }, + { + "type": "STRING", + "value": "(" + }, + { + "type": "FIELD", + "name": "pattern", + "content": { + "type": "SYMBOL", + "name": "_simple_value_pattern" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_typed" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "=" + }, + { + "type": "SYMBOL", + "name": "_sequence_expression" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_label" + }, + { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "STRING", + "value": ":" + } + }, + { + "type": "STRING", + "value": "(" + }, + { + "type": "FIELD", + "name": "pattern", + "content": { + "type": "SYMBOL", + "name": "_pattern" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_typed" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "=" + }, + { + "type": "SYMBOL", + "name": "_sequence_expression" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + } + ] + }, + "external": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "external" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_value_name" + }, + { + "type": "SYMBOL", + "name": "_polymorphic_typed" + }, + { + "type": "STRING", + "value": "=" + }, + { + "type": "REPEAT1", + "content": { + "type": "SYMBOL", + "name": "string" + } + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "item_attribute" + } + } + ] + }, + "type_definition": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "type" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "nonrec" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "type_binding" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "and" + }, + { + "type": "SYMBOL", + "name": "type_binding" + } + ] + } + } + ] + } + ] + }, + "type_binding": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_type_params" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "_type_constructor" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_type_equation" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "=" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "private" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "variant_declaration" + }, + { + "type": "SYMBOL", + "name": "record_declaration" + }, + { + "type": "STRING", + "value": ".." + } + ] + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "type_constraint" + } + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "type_constructor_path" + } + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "+=" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "private" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "variant_declaration" + } + } + ] + } + ] + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "item_attribute" + } + } + ] + }, + "_type_params": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_type_param" + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_type_param" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "_type_param" + } + ] + } + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + } + ] + }, + "_type_param": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "+" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "!" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "-" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "!" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "!" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "+" + }, + { + "type": "STRING", + "value": "-" + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "type_variable" + }, + { + "type": "ALIAS", + "content": { + "type": "STRING", + "value": "_" + }, + "named": true, + "value": "type_variable" + } + ] + } + ] + }, + "_type_equation": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "=" + }, + { + "type": "STRING", + "value": ":=" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "private" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_type" + } + ] + }, + "variant_declaration": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "|" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "constructor_declaration" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "|" + }, + { + "type": "SYMBOL", + "name": "constructor_declaration" + } + ] + } + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "constructor_declaration" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "|" + }, + { + "type": "SYMBOL", + "name": "constructor_declaration" + } + ] + } + } + ] + } + ] + }, + "constructor_declaration": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_constructor_name" + }, + { + "type": "ALIAS", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[" + }, + { + "type": "STRING", + "value": "]" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + { + "type": "STRING", + "value": "true" + }, + { + "type": "STRING", + "value": "false" + } + ] + }, + "named": true, + "value": "constructor_name" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "of" + }, + { + "type": "SYMBOL", + "name": "_constructor_argument" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ":" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "REPEAT1", + "content": { + "type": "SYMBOL", + "name": "type_variable" + } + }, + { + "type": "STRING", + "value": "." + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_constructor_argument" + }, + { + "type": "STRING", + "value": "->" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_simple_type" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "=" + }, + { + "type": "SYMBOL", + "name": "constructor_path" + } + ] + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "_constructor_argument": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_simple_type" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "*" + }, + { + "type": "SYMBOL", + "name": "_simple_type" + } + ] + } + } + ] + }, + { + "type": "SYMBOL", + "name": "record_declaration" + } + ] + }, + "record_declaration": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "field_declaration" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "SYMBOL", + "name": "field_declaration" + } + ] + } + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "field_declaration": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "mutable" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_field_name" + }, + { + "type": "SYMBOL", + "name": "_polymorphic_typed" + } + ] + }, + "type_constraint": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "constraint" + }, + { + "type": "SYMBOL", + "name": "_type" + }, + { + "type": "STRING", + "value": "=" + }, + { + "type": "SYMBOL", + "name": "_type" + } + ] + }, + "exception_definition": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "exception" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "constructor_declaration" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "item_attribute" + } + } + ] + }, + "module_definition": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "module" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "rec" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "module_binding" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "and" + }, + { + "type": "SYMBOL", + "name": "module_binding" + } + ] + } + } + ] + } + ] + }, + "module_binding": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "name", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_module_name" + }, + { + "type": "ALIAS", + "content": { + "type": "STRING", + "value": "_" + }, + "named": true, + "value": "module_name" + } + ] + } + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "module_parameter" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_module_typed" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "=" + }, + { + "type": "STRING", + "value": ":=" + } + ] + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "_module_expression" + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "item_attribute" + } + } + ] + }, + "module_parameter": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "name", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_module_name" + }, + { + "type": "ALIAS", + "content": { + "type": "STRING", + "value": "_" + }, + "named": true, + "value": "module_name" + } + ] + } + }, + { + "type": "SYMBOL", + "name": "_module_typed" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "module_type_definition": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "module" + }, + { + "type": "STRING", + "value": "type" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "_module_type_name" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "=" + }, + { + "type": "STRING", + "value": ":=" + } + ] + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "_module_type" + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "item_attribute" + } + } + ] + }, + "open_module": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "open" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "!" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_module_expression" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "item_attribute" + } + } + ] + }, + "include_module": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "include" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_module_expression" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "item_attribute" + } + } + ] + }, + "class_definition": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "class" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "class_binding" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "and" + }, + { + "type": "SYMBOL", + "name": "class_binding" + } + ] + } + } + ] + } + ] + }, + "class_binding": { + "type": "PREC_RIGHT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "virtual" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_type_param" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "_type_param" + } + ] + } + } + ] + }, + { + "type": "STRING", + "value": "]" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "_class_name" + } + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_parameter" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_class_typed" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "=" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "_class_expression" + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "item_attribute" + } + } + ] + } + }, + "class_type_definition": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "class" + }, + { + "type": "STRING", + "value": "type" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "class_type_binding" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "and" + }, + { + "type": "SYMBOL", + "name": "class_type_binding" + } + ] + } + } + ] + } + ] + }, + "class_type_binding": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "virtual" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_type_param" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "_type_param" + } + ] + } + } + ] + }, + { + "type": "STRING", + "value": "]" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "_class_type_name" + } + }, + { + "type": "STRING", + "value": "=" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "_simple_class_type" + } + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "item_attribute" + } + } + ] + }, + "_signature_item": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "value_specification" + }, + { + "type": "SYMBOL", + "name": "external" + }, + { + "type": "SYMBOL", + "name": "type_definition" + }, + { + "type": "SYMBOL", + "name": "exception_definition" + }, + { + "type": "SYMBOL", + "name": "module_definition" + }, + { + "type": "SYMBOL", + "name": "module_type_definition" + }, + { + "type": "SYMBOL", + "name": "open_module" + }, + { + "type": "SYMBOL", + "name": "include_module_type" + }, + { + "type": "SYMBOL", + "name": "class_definition" + }, + { + "type": "SYMBOL", + "name": "class_type_definition" + }, + { + "type": "SYMBOL", + "name": "floating_attribute" + }, + { + "type": "SYMBOL", + "name": "_item_extension" + } + ] + }, + "value_specification": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "val" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_value_name" + }, + { + "type": "SYMBOL", + "name": "_polymorphic_typed" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "item_attribute" + } + } + ] + }, + "include_module_type": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "include" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_module_type" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "item_attribute" + } + } + ] + }, + "_module_typed": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ":" + }, + { + "type": "SYMBOL", + "name": "_module_type" + } + ] + }, + "_module_type": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "module_type_path" + }, + { + "type": "SYMBOL", + "name": "signature" + }, + { + "type": "SYMBOL", + "name": "module_type_constraint" + }, + { + "type": "SYMBOL", + "name": "module_type_of" + }, + { + "type": "SYMBOL", + "name": "functor_type" + }, + { + "type": "SYMBOL", + "name": "parenthesized_module_type" + }, + { + "type": "SYMBOL", + "name": "_extension" + } + ] + }, + "signature": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "sig" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_signature" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "end" + } + ] + }, + "module_type_constraint": { + "type": "PREC_RIGHT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_module_type" + }, + { + "type": "STRING", + "value": "with" + }, + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "constrain_type" + }, + { + "type": "SYMBOL", + "name": "constrain_module" + }, + { + "type": "SYMBOL", + "name": "constrain_module_type" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "and" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "constrain_type" + }, + { + "type": "SYMBOL", + "name": "constrain_module" + }, + { + "type": "SYMBOL", + "name": "constrain_module_type" + } + ] + } + ] + } + } + ] + } + ] + } + }, + "constrain_type": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "type" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_type_params" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "type_constructor_path" + }, + { + "type": "SYMBOL", + "name": "_type_equation" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "type_constraint" + } + } + ] + }, + "constrain_module": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "module" + }, + { + "type": "SYMBOL", + "name": "module_path" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "=" + }, + { + "type": "STRING", + "value": ":=" + } + ] + }, + { + "type": "SYMBOL", + "name": "extended_module_path" + } + ] + }, + "constrain_module_type": { + "type": "PREC_LEFT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "module" + }, + { + "type": "STRING", + "value": "type" + }, + { + "type": "SYMBOL", + "name": "module_type_path" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "=" + }, + { + "type": "STRING", + "value": ":=" + } + ] + }, + { + "type": "SYMBOL", + "name": "_module_type" + } + ] + } + }, + "module_type_of": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "module" + }, + { + "type": "STRING", + "value": "type" + }, + { + "type": "STRING", + "value": "of" + }, + { + "type": "SYMBOL", + "name": "_module_expression" + } + ] + }, + "functor_type": { + "type": "PREC_RIGHT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "functor" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "module_parameter" + } + } + ] + }, + { + "type": "SYMBOL", + "name": "_module_type" + } + ] + }, + { + "type": "STRING", + "value": "->" + }, + { + "type": "SYMBOL", + "name": "_module_type" + } + ] + } + }, + "parenthesized_module_type": { + "type": "SEQ", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SYMBOL", + "name": "_module_type" + }, + { + "type": "STRING", + "value": ")" + } + ] + } + ] + }, + "_simple_module_expression": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "typed_module_expression" + }, + { + "type": "SYMBOL", + "name": "parenthesized_module_expression" + }, + { + "type": "SYMBOL", + "name": "packed_module" + }, + { + "type": "SYMBOL", + "name": "_extension" + } + ] + }, + "_module_expression": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_simple_module_expression" + }, + { + "type": "SYMBOL", + "name": "module_path" + }, + { + "type": "SYMBOL", + "name": "structure" + }, + { + "type": "SYMBOL", + "name": "functor" + }, + { + "type": "SYMBOL", + "name": "module_application" + } + ] + }, + "structure": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "struct" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_structure" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "end" + } + ] + }, + "functor": { + "type": "PREC_RIGHT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "functor" + }, + { + "type": "REPEAT1", + "content": { + "type": "SYMBOL", + "name": "module_parameter" + } + }, + { + "type": "STRING", + "value": "->" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "_module_expression" + } + } + ] + } + }, + "module_application": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "functor", + "content": { + "type": "SYMBOL", + "name": "_module_expression" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "FIELD", + "name": "argument", + "content": { + "type": "SYMBOL", + "name": "_simple_module_expression" + } + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "STRING", + "value": ")" + } + ] + } + ] + } + ] + }, + "typed_module_expression": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_module_expression" + }, + { + "type": "SYMBOL", + "name": "_module_typed" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "packed_module": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "val" + }, + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_module_typed" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ":>" + }, + { + "type": "SYMBOL", + "name": "_module_type" + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "parenthesized_module_expression": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SYMBOL", + "name": "_module_expression" + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "_class_typed": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ":" + }, + { + "type": "SYMBOL", + "name": "_class_type" + } + ] + }, + "_simple_class_type": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "class_type_path" + }, + { + "type": "SYMBOL", + "name": "instantiated_class_type" + }, + { + "type": "SYMBOL", + "name": "class_body_type" + }, + { + "type": "SYMBOL", + "name": "let_open_class_type" + }, + { + "type": "SYMBOL", + "name": "_extension" + } + ] + }, + "_class_type": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_simple_class_type" + }, + { + "type": "SYMBOL", + "name": "class_function_type" + } + ] + }, + "instantiated_class_type": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_type" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "_type" + } + ] + } + } + ] + }, + { + "type": "STRING", + "value": "]" + }, + { + "type": "SYMBOL", + "name": "class_type_path" + } + ] + }, + "class_body_type": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "object" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SYMBOL", + "name": "_type" + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_class_field_specification" + }, + { + "type": "SYMBOL", + "name": "floating_attribute" + } + ] + } + }, + { + "type": "STRING", + "value": "end" + } + ] + }, + "_class_field_specification": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "inheritance_specification" + }, + { + "type": "SYMBOL", + "name": "instance_variable_specification" + }, + { + "type": "SYMBOL", + "name": "method_specification" + }, + { + "type": "SYMBOL", + "name": "type_parameter_constraint" + }, + { + "type": "SYMBOL", + "name": "_item_extension" + } + ] + }, + "inheritance_specification": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "inherit" + }, + { + "type": "SYMBOL", + "name": "_simple_class_type" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "item_attribute" + } + } + ] + }, + "instance_variable_specification": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "val" + }, + { + "type": "REPEAT", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "mutable" + }, + { + "type": "STRING", + "value": "virtual" + } + ] + } + }, + { + "type": "SYMBOL", + "name": "_instance_variable_name" + }, + { + "type": "SYMBOL", + "name": "_typed" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "item_attribute" + } + } + ] + }, + "method_specification": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "method" + }, + { + "type": "REPEAT", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "private" + }, + { + "type": "STRING", + "value": "virtual" + } + ] + } + }, + { + "type": "SYMBOL", + "name": "_method_name" + }, + { + "type": "SYMBOL", + "name": "_polymorphic_typed" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "item_attribute" + } + } + ] + }, + "type_parameter_constraint": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "constraint" + }, + { + "type": "SYMBOL", + "name": "_type" + }, + { + "type": "STRING", + "value": "=" + }, + { + "type": "SYMBOL", + "name": "_type" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "item_attribute" + } + } + ] + }, + "let_open_class_type": { + "type": "PREC_RIGHT", + "value": 2, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "let" + }, + { + "type": "SYMBOL", + "name": "open_module" + }, + { + "type": "STRING", + "value": "in" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "_simple_class_type" + } + } + ] + } + }, + "class_function_type": { + "type": "PREC_RIGHT", + "value": 3, + "content": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "?" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_label_name" + }, + { + "type": "STRING", + "value": ":" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_tuple_type" + }, + { + "type": "STRING", + "value": "->" + }, + { + "type": "SYMBOL", + "name": "_class_type" + } + ] + } + }, + "_simple_class_expression": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "class_path" + }, + { + "type": "SYMBOL", + "name": "instantiated_class" + }, + { + "type": "SYMBOL", + "name": "object_expression" + }, + { + "type": "SYMBOL", + "name": "typed_class_expression" + }, + { + "type": "SYMBOL", + "name": "parenthesized_class_expression" + }, + { + "type": "SYMBOL", + "name": "_extension" + } + ] + }, + "_class_expression": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_simple_class_expression" + }, + { + "type": "SYMBOL", + "name": "class_function" + }, + { + "type": "SYMBOL", + "name": "class_application" + }, + { + "type": "SYMBOL", + "name": "let_class_expression" + }, + { + "type": "SYMBOL", + "name": "let_open_class_expression" + } + ] + }, + "instantiated_class": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_type" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "_type" + } + ] + } + } + ] + }, + { + "type": "STRING", + "value": "]" + }, + { + "type": "SYMBOL", + "name": "class_path" + } + ] + }, + "typed_class_expression": { + "type": "SEQ", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_class_expression" + }, + { + "type": "SYMBOL", + "name": "_class_typed" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + } + ] + }, + "class_function": { + "type": "PREC_RIGHT", + "value": 2, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "fun" + }, + { + "type": "REPEAT1", + "content": { + "type": "SYMBOL", + "name": "_parameter" + } + }, + { + "type": "STRING", + "value": "->" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "_class_expression" + } + } + ] + } + }, + "class_application": { + "type": "PREC_RIGHT", + "value": 16, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "class", + "content": { + "type": "SYMBOL", + "name": "_simple_class_expression" + } + }, + { + "type": "REPEAT1", + "content": { + "type": "FIELD", + "name": "argument", + "content": { + "type": "SYMBOL", + "name": "_argument" + } + } + } + ] + } + }, + "let_class_expression": { + "type": "PREC_RIGHT", + "value": 2, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "value_definition" + }, + { + "type": "STRING", + "value": "in" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "_class_expression" + } + } + ] + } + }, + "_class_field": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "inheritance_definition" + }, + { + "type": "SYMBOL", + "name": "instance_variable_definition" + }, + { + "type": "SYMBOL", + "name": "method_definition" + }, + { + "type": "SYMBOL", + "name": "type_parameter_constraint" + }, + { + "type": "SYMBOL", + "name": "class_initializer" + }, + { + "type": "SYMBOL", + "name": "_item_extension" + } + ] + }, + "inheritance_definition": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "inherit" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "!" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_class_expression" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "as" + }, + { + "type": "SYMBOL", + "name": "_value_pattern" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "item_attribute" + } + } + ] + }, + "instance_variable_definition": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "val" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "!" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "mutable" + }, + { + "type": "STRING", + "value": "virtual" + } + ] + } + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "_instance_variable_name" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_typed" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ":>" + }, + { + "type": "SYMBOL", + "name": "_type" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "=" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "_sequence_expression" + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "item_attribute" + } + } + ] + }, + "method_definition": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "method" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "!" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "private" + }, + { + "type": "STRING", + "value": "virtual" + } + ] + } + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "_method_name" + } + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_parameter" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_polymorphic_typed" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "=" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "_sequence_expression" + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "item_attribute" + } + } + ] + }, + "class_initializer": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "initializer" + }, + { + "type": "SYMBOL", + "name": "_sequence_expression" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "item_attribute" + } + } + ] + }, + "let_open_class_expression": { + "type": "PREC_RIGHT", + "value": 2, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "let" + }, + { + "type": "SYMBOL", + "name": "open_module" + }, + { + "type": "STRING", + "value": "in" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "_class_expression" + } + } + ] + } + }, + "parenthesized_class_expression": { + "type": "SEQ", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SYMBOL", + "name": "_class_expression" + }, + { + "type": "STRING", + "value": ")" + } + ] + } + ] + }, + "_typed": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ":" + }, + { + "type": "SYMBOL", + "name": "_type" + } + ] + }, + "_simple_typed": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ":" + }, + { + "type": "SYMBOL", + "name": "_simple_type" + } + ] + }, + "_polymorphic_typed": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ":" + }, + { + "type": "SYMBOL", + "name": "_polymorphic_type" + } + ] + }, + "_polymorphic_type": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "polymorphic_type" + }, + { + "type": "SYMBOL", + "name": "_type" + } + ] + }, + "polymorphic_type": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "REPEAT1", + "content": { + "type": "SYMBOL", + "name": "type_variable" + } + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_abstract_type" + }, + "named": true, + "value": "abstract_type" + } + ] + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "SYMBOL", + "name": "_type" + } + ] + }, + "_abstract_type": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "type" + }, + { + "type": "REPEAT1", + "content": { + "type": "SYMBOL", + "name": "_type_constructor" + } + } + ] + }, + "_parenthesized_abstract_type": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SYMBOL", + "name": "_abstract_type" + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "_simple_type": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "type_variable" + }, + { + "type": "SYMBOL", + "name": "type_constructor_path" + }, + { + "type": "SYMBOL", + "name": "constructed_type" + }, + { + "type": "SYMBOL", + "name": "local_open_type" + }, + { + "type": "SYMBOL", + "name": "polymorphic_variant_type" + }, + { + "type": "SYMBOL", + "name": "package_type" + }, + { + "type": "SYMBOL", + "name": "hash_type" + }, + { + "type": "SYMBOL", + "name": "object_type" + }, + { + "type": "SYMBOL", + "name": "parenthesized_type" + }, + { + "type": "SYMBOL", + "name": "_extension" + } + ] + }, + "_tuple_type": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_simple_type" + }, + { + "type": "SYMBOL", + "name": "tuple_type" + } + ] + }, + "_type": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_tuple_type" + }, + { + "type": "SYMBOL", + "name": "function_type" + }, + { + "type": "SYMBOL", + "name": "aliased_type" + } + ] + }, + "function_type": { + "type": "PREC_RIGHT", + "value": 3, + "content": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "typed_label" + }, + { + "type": "SYMBOL", + "name": "_type" + } + ] + }, + { + "type": "STRING", + "value": "->" + }, + { + "type": "SYMBOL", + "name": "_type" + } + ] + } + }, + "typed_label": { + "type": "PREC_LEFT", + "value": 3, + "content": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "?" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_label_name" + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "SYMBOL", + "name": "_type" + } + ] + } + }, + "tuple_type": { + "type": "PREC", + "value": 6, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_tuple_type" + }, + { + "type": "STRING", + "value": "*" + }, + { + "type": "SYMBOL", + "name": "_simple_type" + } + ] + } + }, + "constructed_type": { + "type": "PREC", + "value": 16, + "content": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_simple_type" + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_type" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "_type" + } + ] + } + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + } + ] + }, + { + "type": "SYMBOL", + "name": "type_constructor_path" + } + ] + } + }, + "aliased_type": { + "type": "PREC", + "value": 2, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_type" + }, + { + "type": "STRING", + "value": "as" + }, + { + "type": "SYMBOL", + "name": "type_variable" + } + ] + } + }, + "local_open_type": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "extended_module_path" + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SYMBOL", + "name": "_type" + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + { + "type": "SYMBOL", + "name": "package_type" + }, + { + "type": "SYMBOL", + "name": "polymorphic_variant_type" + } + ] + } + ] + }, + "polymorphic_variant_type": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[" + }, + { + "type": "SYMBOL", + "name": "tag_specification" + }, + { + "type": "STRING", + "value": "]" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_tag_spec" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "|" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_tag_spec" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "|" + }, + { + "type": "SYMBOL", + "name": "_tag_spec" + } + ] + } + } + ] + }, + { + "type": "STRING", + "value": "]" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[>" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "|" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_tag_spec" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "|" + }, + { + "type": "SYMBOL", + "name": "_tag_spec" + } + ] + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "]" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[<" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "|" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_tag_spec" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "|" + }, + { + "type": "SYMBOL", + "name": "_tag_spec" + } + ] + } + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ">" + }, + { + "type": "REPEAT1", + "content": { + "type": "SYMBOL", + "name": "tag" + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "]" + } + ] + } + ] + } + ] + }, + "_tag_spec": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_type" + }, + { + "type": "SYMBOL", + "name": "tag_specification" + } + ] + }, + "tag_specification": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "tag" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "of" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "&" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_type" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "&" + }, + { + "type": "SYMBOL", + "name": "_type" + } + ] + } + } + ] + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "package_type": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "module" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_module_type" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "object_type": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "<" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "method_type" + }, + { + "type": "SYMBOL", + "name": "_simple_type" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "method_type" + }, + { + "type": "SYMBOL", + "name": "_simple_type" + } + ] + } + ] + } + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": ".." + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "STRING", + "value": ".." + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ">" + } + ] + }, + "method_type": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_method_name" + }, + { + "type": "SYMBOL", + "name": "_polymorphic_typed" + } + ] + }, + "hash_type": { + "type": "PREC", + "value": 17, + "content": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_simple_type" + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_type" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "_type" + } + ] + } + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "#" + }, + { + "type": "SYMBOL", + "name": "class_type_path" + } + ] + } + }, + "parenthesized_type": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SYMBOL", + "name": "_type" + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "_simple_expression": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "value_path" + }, + { + "type": "SYMBOL", + "name": "_constant" + }, + { + "type": "SYMBOL", + "name": "typed_expression" + }, + { + "type": "SYMBOL", + "name": "constructor_path" + }, + { + "type": "SYMBOL", + "name": "tag" + }, + { + "type": "SYMBOL", + "name": "list_expression" + }, + { + "type": "SYMBOL", + "name": "array_expression" + }, + { + "type": "SYMBOL", + "name": "record_expression" + }, + { + "type": "SYMBOL", + "name": "prefix_expression" + }, + { + "type": "SYMBOL", + "name": "hash_expression" + }, + { + "type": "SYMBOL", + "name": "field_get_expression" + }, + { + "type": "SYMBOL", + "name": "array_get_expression" + }, + { + "type": "SYMBOL", + "name": "string_get_expression" + }, + { + "type": "SYMBOL", + "name": "bigarray_get_expression" + }, + { + "type": "SYMBOL", + "name": "coercion_expression" + }, + { + "type": "SYMBOL", + "name": "local_open_expression" + }, + { + "type": "SYMBOL", + "name": "package_expression" + }, + { + "type": "SYMBOL", + "name": "new_expression" + }, + { + "type": "SYMBOL", + "name": "object_copy_expression" + }, + { + "type": "SYMBOL", + "name": "method_invocation" + }, + { + "type": "SYMBOL", + "name": "object_expression" + }, + { + "type": "SYMBOL", + "name": "parenthesized_expression" + }, + { + "type": "SYMBOL", + "name": "ocamlyacc_value" + }, + { + "type": "SYMBOL", + "name": "_extension" + } + ] + }, + "_expression": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_simple_expression" + }, + { + "type": "SYMBOL", + "name": "product_expression" + }, + { + "type": "SYMBOL", + "name": "cons_expression" + }, + { + "type": "SYMBOL", + "name": "application_expression" + }, + { + "type": "SYMBOL", + "name": "infix_expression" + }, + { + "type": "SYMBOL", + "name": "sign_expression" + }, + { + "type": "SYMBOL", + "name": "set_expression" + }, + { + "type": "SYMBOL", + "name": "if_expression" + }, + { + "type": "SYMBOL", + "name": "while_expression" + }, + { + "type": "SYMBOL", + "name": "for_expression" + }, + { + "type": "SYMBOL", + "name": "match_expression" + }, + { + "type": "SYMBOL", + "name": "function_expression" + }, + { + "type": "SYMBOL", + "name": "fun_expression" + }, + { + "type": "SYMBOL", + "name": "try_expression" + }, + { + "type": "SYMBOL", + "name": "let_expression" + }, + { + "type": "SYMBOL", + "name": "assert_expression" + }, + { + "type": "SYMBOL", + "name": "lazy_expression" + }, + { + "type": "SYMBOL", + "name": "let_module_expression" + }, + { + "type": "SYMBOL", + "name": "let_open_expression" + }, + { + "type": "SYMBOL", + "name": "let_exception_expression" + } + ] + }, + "_sequence_expression": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "SYMBOL", + "name": "sequence_expression" + } + ] + }, + "typed_expression": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_sequence_expression" + }, + { + "type": "SYMBOL", + "name": "_typed" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "product_expression": { + "type": "PREC_LEFT", + "value": 6, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "STRING", + "value": "," + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + }, + "cons_expression": { + "type": "PREC_RIGHT", + "value": 11, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "STRING", + "value": "::" + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + }, + "list_expression": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + } + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "]" + } + ] + }, + "array_expression": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[|" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + } + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "|]" + } + ] + }, + "record_expression": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_simple_expression" + }, + { + "type": "STRING", + "value": "with" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "field_expression" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "SYMBOL", + "name": "field_expression" + } + ] + } + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "field_expression": { + "type": "PREC", + "value": 3, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "field_path" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_typed" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "=" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + } + }, + "application_expression": { + "type": "PREC_RIGHT", + "value": 16, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "function", + "content": { + "type": "SYMBOL", + "name": "_simple_expression" + } + }, + { + "type": "REPEAT1", + "content": { + "type": "FIELD", + "name": "argument", + "content": { + "type": "SYMBOL", + "name": "_argument" + } + } + } + ] + } + }, + "_argument": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_simple_expression" + }, + { + "type": "SYMBOL", + "name": "labeled_argument" + } + ] + }, + "labeled_argument": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_label" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_label" + }, + { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "STRING", + "value": ":" + } + }, + { + "type": "SYMBOL", + "name": "_simple_expression" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "~" + }, + { + "type": "STRING", + "value": "?" + } + ] + }, + { + "type": "STRING", + "value": "(" + }, + { + "type": "SYMBOL", + "name": "_label_name" + }, + { + "type": "SYMBOL", + "name": "_typed" + }, + { + "type": "STRING", + "value": ")" + } + ] + } + ] + }, + "prefix_expression": { + "type": "PREC", + "value": 19, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "SYMBOL", + "name": "prefix_operator" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_simple_expression" + } + } + ] + } + }, + "sign_expression": { + "type": "PREC", + "value": 15, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "SYMBOL", + "name": "sign_operator" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + }, + "hash_expression": { + "type": "PREC_LEFT", + "value": 17, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_simple_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "SYMBOL", + "name": "hash_operator" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_simple_expression" + } + } + ] + } + }, + "infix_expression": { + "type": "CHOICE", + "members": [ + { + "type": "PREC_RIGHT", + "value": 14, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "SYMBOL", + "name": "pow_operator" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 13, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "SYMBOL", + "name": "mult_operator" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 12, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "SYMBOL", + "name": "add_operator" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + }, + { + "type": "PREC_RIGHT", + "value": 10, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "SYMBOL", + "name": "concat_operator" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 9, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "SYMBOL", + "name": "rel_operator" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + }, + { + "type": "PREC_RIGHT", + "value": 8, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "SYMBOL", + "name": "and_operator" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + }, + { + "type": "PREC_RIGHT", + "value": 7, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "SYMBOL", + "name": "or_operator" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + }, + { + "type": "PREC_RIGHT", + "value": 5, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "SYMBOL", + "name": "assign_operator" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + } + ] + }, + "field_get_expression": { + "type": "PREC_LEFT", + "value": 18, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_simple_expression" + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "SYMBOL", + "name": "field_path" + } + ] + } + }, + "array_get_expression": { + "type": "PREC", + "value": 18, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_simple_expression" + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "indexing_operator_path" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "(" + }, + { + "type": "SYMBOL", + "name": "_sequence_expression" + }, + { + "type": "STRING", + "value": ")" + } + ] + } + }, + "string_get_expression": { + "type": "PREC", + "value": 18, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_simple_expression" + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "indexing_operator_path" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "[" + }, + { + "type": "SYMBOL", + "name": "_sequence_expression" + }, + { + "type": "STRING", + "value": "]" + } + ] + } + }, + "bigarray_get_expression": { + "type": "PREC", + "value": 18, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_simple_expression" + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "indexing_operator_path" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "{" + }, + { + "type": "SYMBOL", + "name": "_sequence_expression" + }, + { + "type": "STRING", + "value": "}" + } + ] + } + }, + "set_expression": { + "type": "PREC_RIGHT", + "value": 5, + "content": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "field_get_expression" + }, + { + "type": "SYMBOL", + "name": "array_get_expression" + }, + { + "type": "SYMBOL", + "name": "string_get_expression" + }, + { + "type": "SYMBOL", + "name": "bigarray_get_expression" + }, + { + "type": "SYMBOL", + "name": "_instance_variable_name" + } + ] + }, + { + "type": "STRING", + "value": "<-" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + } + ] + } + }, + "if_expression": { + "type": "PREC_RIGHT", + "value": 4, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "if" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "FIELD", + "name": "condition", + "content": { + "type": "SYMBOL", + "name": "_sequence_expression" + } + }, + { + "type": "SYMBOL", + "name": "then_clause" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "else_clause" + }, + { + "type": "BLANK" + } + ] + } + ] + } + }, + "then_clause": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "then" + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + }, + "else_clause": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "else" + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + }, + "while_expression": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "while" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "FIELD", + "name": "condition", + "content": { + "type": "SYMBOL", + "name": "_sequence_expression" + } + }, + { + "type": "SYMBOL", + "name": "do_clause" + } + ] + }, + "do_clause": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "do" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_sequence_expression" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "done" + } + ] + }, + "for_expression": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "for" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "_value_pattern" + } + }, + { + "type": "STRING", + "value": "=" + }, + { + "type": "FIELD", + "name": "from", + "content": { + "type": "SYMBOL", + "name": "_sequence_expression" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "to" + }, + { + "type": "STRING", + "value": "downto" + } + ] + }, + { + "type": "FIELD", + "name": "to", + "content": { + "type": "SYMBOL", + "name": "_sequence_expression" + } + }, + { + "type": "SYMBOL", + "name": "do_clause" + } + ] + }, + "sequence_expression": { + "type": "PREC_RIGHT", + "value": 3, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_expression" + } + }, + { + "type": "STRING", + "value": ";" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_sequence_expression" + } + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + } + }, + "match_expression": { + "type": "PREC_RIGHT", + "value": 2, + "content": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "match" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "SYMBOL", + "name": "match_operator" + } + ] + }, + { + "type": "SYMBOL", + "name": "_sequence_expression" + }, + { + "type": "STRING", + "value": "with" + }, + { + "type": "SYMBOL", + "name": "_match_cases" + } + ] + } + }, + "_match_cases": { + "type": "PREC_RIGHT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "|" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "match_case" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "|" + }, + { + "type": "SYMBOL", + "name": "match_case" + } + ] + } + } + ] + } + ] + } + }, + "match_case": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "pattern", + "content": { + "type": "SYMBOL", + "name": "_pattern" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "guard" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "->" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_sequence_expression" + }, + { + "type": "SYMBOL", + "name": "refutation_case" + } + ] + } + } + ] + }, + "guard": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "when" + }, + { + "type": "SYMBOL", + "name": "_sequence_expression" + } + ] + }, + "refutation_case": { + "type": "STRING", + "value": "." + }, + "function_expression": { + "type": "PREC_RIGHT", + "value": 2, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "function" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_match_cases" + } + ] + } + }, + "fun_expression": { + "type": "PREC_RIGHT", + "value": 2, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "fun" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "REPEAT1", + "content": { + "type": "SYMBOL", + "name": "_parameter" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_simple_typed" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "->" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "_sequence_expression" + } + } + ] + } + }, + "try_expression": { + "type": "PREC_RIGHT", + "value": 2, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "try" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_sequence_expression" + }, + { + "type": "STRING", + "value": "with" + }, + { + "type": "SYMBOL", + "name": "_match_cases" + } + ] + } + }, + "let_expression": { + "type": "PREC_RIGHT", + "value": 2, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "value_definition" + }, + { + "type": "STRING", + "value": "in" + }, + { + "type": "SYMBOL", + "name": "_sequence_expression" + } + ] + } + }, + "coercion_expression": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_sequence_expression" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_typed" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ":>" + }, + { + "type": "SYMBOL", + "name": "_type" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "assert_expression": { + "type": "PREC_LEFT", + "value": 16, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "assert" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_simple_expression" + } + ] + } + }, + "lazy_expression": { + "type": "PREC_LEFT", + "value": 16, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "lazy" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_simple_expression" + } + ] + } + }, + "let_module_expression": { + "type": "PREC_RIGHT", + "value": 2, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "let" + }, + { + "type": "SYMBOL", + "name": "module_definition" + }, + { + "type": "STRING", + "value": "in" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "_sequence_expression" + } + } + ] + } + }, + "let_open_expression": { + "type": "PREC_RIGHT", + "value": 2, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "let" + }, + { + "type": "SYMBOL", + "name": "open_module" + }, + { + "type": "STRING", + "value": "in" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "_sequence_expression" + } + } + ] + } + }, + "local_open_expression": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "module_path" + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_sequence_expression" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + { + "type": "SYMBOL", + "name": "list_expression" + }, + { + "type": "SYMBOL", + "name": "array_expression" + }, + { + "type": "SYMBOL", + "name": "record_expression" + }, + { + "type": "SYMBOL", + "name": "object_copy_expression" + }, + { + "type": "SYMBOL", + "name": "package_expression" + } + ] + } + ] + }, + "package_expression": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "module" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_module_expression" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_module_typed" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "let_exception_expression": { + "type": "PREC_RIGHT", + "value": 2, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "let" + }, + { + "type": "SYMBOL", + "name": "exception_definition" + }, + { + "type": "STRING", + "value": "in" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "_sequence_expression" + } + } + ] + } + }, + "new_expression": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "new" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "class_path" + } + ] + }, + "object_copy_expression": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{<" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "instance_variable_expression" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "SYMBOL", + "name": "instance_variable_expression" + } + ] + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ">}" + } + ] + }, + "instance_variable_expression": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_instance_variable_name" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "=" + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "method_invocation": { + "type": "PREC_RIGHT", + "value": 17, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_simple_expression" + }, + { + "type": "STRING", + "value": "#" + }, + { + "type": "SYMBOL", + "name": "_method_name" + } + ] + } + }, + "object_expression": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "object" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_pattern" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_typed" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_class_field" + }, + { + "type": "SYMBOL", + "name": "floating_attribute" + } + ] + } + }, + { + "type": "STRING", + "value": "end" + } + ] + }, + "parenthesized_expression": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "begin" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_sequence_expression" + }, + { + "type": "STRING", + "value": "end" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SYMBOL", + "name": "_sequence_expression" + }, + { + "type": "STRING", + "value": ")" + } + ] + } + ] + }, + "ocamlyacc_value": { + "type": "PATTERN", + "value": "\\$[0-9]+" + }, + "_simple_pattern": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_value_pattern" + }, + { + "type": "SYMBOL", + "name": "_signed_constant" + }, + { + "type": "SYMBOL", + "name": "typed_pattern" + }, + { + "type": "SYMBOL", + "name": "constructor_path" + }, + { + "type": "SYMBOL", + "name": "tag" + }, + { + "type": "SYMBOL", + "name": "polymorphic_variant_pattern" + }, + { + "type": "SYMBOL", + "name": "record_pattern" + }, + { + "type": "SYMBOL", + "name": "list_pattern" + }, + { + "type": "SYMBOL", + "name": "array_pattern" + }, + { + "type": "SYMBOL", + "name": "local_open_pattern" + }, + { + "type": "SYMBOL", + "name": "package_pattern" + }, + { + "type": "SYMBOL", + "name": "parenthesized_pattern" + }, + { + "type": "SYMBOL", + "name": "_extension" + } + ] + }, + "_effect_pattern": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_simple_pattern" + }, + { + "type": "SYMBOL", + "name": "constructor_pattern" + }, + { + "type": "SYMBOL", + "name": "tag_pattern" + }, + { + "type": "SYMBOL", + "name": "lazy_pattern" + } + ] + }, + "_pattern": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_effect_pattern" + }, + { + "type": "SYMBOL", + "name": "alias_pattern" + }, + { + "type": "SYMBOL", + "name": "or_pattern" + }, + { + "type": "SYMBOL", + "name": "tuple_pattern" + }, + { + "type": "SYMBOL", + "name": "cons_pattern" + }, + { + "type": "SYMBOL", + "name": "range_pattern" + }, + { + "type": "SYMBOL", + "name": "exception_pattern" + }, + { + "type": "SYMBOL", + "name": "effect_pattern" + } + ] + }, + "_binding_pattern": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_value_name" + }, + { + "type": "SYMBOL", + "name": "_signed_constant" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "typed_binding_pattern" + }, + "named": true, + "value": "typed_pattern" + }, + { + "type": "SYMBOL", + "name": "constructor_path" + }, + { + "type": "SYMBOL", + "name": "tag" + }, + { + "type": "SYMBOL", + "name": "polymorphic_variant_pattern" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "record_binding_pattern" + }, + "named": true, + "value": "record_pattern" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "list_binding_pattern" + }, + "named": true, + "value": "list_pattern" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "array_binding_pattern" + }, + "named": true, + "value": "array_pattern" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "local_open_binding_pattern" + }, + "named": true, + "value": "local_open_pattern" + }, + { + "type": "SYMBOL", + "name": "package_pattern" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "parenthesized_binding_pattern" + }, + "named": true, + "value": "parenthesized_pattern" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "alias_binding_pattern" + }, + "named": true, + "value": "alias_pattern" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "or_binding_pattern" + }, + "named": true, + "value": "or_pattern" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "constructor_binding_pattern" + }, + "named": true, + "value": "constructor_pattern" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "tag_binding_pattern" + }, + "named": true, + "value": "tag_pattern" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "tuple_binding_pattern" + }, + "named": true, + "value": "tuple_pattern" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "cons_binding_pattern" + }, + "named": true, + "value": "cons_pattern" + }, + { + "type": "SYMBOL", + "name": "range_pattern" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "lazy_binding_pattern" + }, + "named": true, + "value": "lazy_pattern" + }, + { + "type": "SYMBOL", + "name": "_extension" + } + ] + }, + "alias_pattern": { + "type": "PREC_LEFT", + "value": 2, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_pattern" + }, + { + "type": "STRING", + "value": "as" + }, + { + "type": "SYMBOL", + "name": "_value_pattern" + } + ] + } + }, + "alias_binding_pattern": { + "type": "PREC_LEFT", + "value": 2, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_binding_pattern" + }, + { + "type": "STRING", + "value": "as" + }, + { + "type": "SYMBOL", + "name": "_value_name" + } + ] + } + }, + "typed_pattern": { + "type": "SEQ", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_pattern" + }, + { + "type": "SYMBOL", + "name": "_typed" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + } + ] + }, + "typed_binding_pattern": { + "type": "SEQ", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "pattern", + "content": { + "type": "SYMBOL", + "name": "_binding_pattern" + } + }, + { + "type": "SYMBOL", + "name": "_typed" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + } + ] + }, + "or_pattern": { + "type": "PREC_LEFT", + "value": 3, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_pattern" + }, + { + "type": "STRING", + "value": "|" + }, + { + "type": "SYMBOL", + "name": "_pattern" + } + ] + } + }, + "or_binding_pattern": { + "type": "PREC_LEFT", + "value": 3, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_binding_pattern" + }, + { + "type": "STRING", + "value": "|" + }, + { + "type": "SYMBOL", + "name": "_binding_pattern" + } + ] + } + }, + "constructor_pattern": { + "type": "PREC_RIGHT", + "value": 16, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "constructor_path" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_parenthesized_abstract_type" + }, + "named": true, + "value": "abstract_type" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_pattern" + } + ] + } + }, + "constructor_binding_pattern": { + "type": "PREC_RIGHT", + "value": 16, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "constructor_path" + }, + { + "type": "FIELD", + "name": "pattern", + "content": { + "type": "SYMBOL", + "name": "_binding_pattern" + } + } + ] + } + }, + "tag_pattern": { + "type": "PREC_RIGHT", + "value": 16, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "tag" + }, + { + "type": "SYMBOL", + "name": "_pattern" + } + ] + } + }, + "tag_binding_pattern": { + "type": "PREC_RIGHT", + "value": 16, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "tag" + }, + { + "type": "FIELD", + "name": "pattern", + "content": { + "type": "SYMBOL", + "name": "_binding_pattern" + } + } + ] + } + }, + "polymorphic_variant_pattern": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "#" + }, + { + "type": "SYMBOL", + "name": "type_constructor_path" + } + ] + }, + "tuple_pattern": { + "type": "PREC_LEFT", + "value": 6, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_pattern" + }, + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "_pattern" + } + ] + } + }, + "tuple_binding_pattern": { + "type": "PREC_LEFT", + "value": 6, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_binding_pattern" + }, + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "_binding_pattern" + } + ] + } + }, + "record_pattern": { + "type": "PREC_LEFT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "field_pattern" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "SYMBOL", + "name": "field_pattern" + } + ] + } + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "STRING", + "value": "_" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "}" + } + ] + } + }, + "field_pattern": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "field_path" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_typed" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "=" + }, + { + "type": "SYMBOL", + "name": "_pattern" + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "record_binding_pattern": { + "type": "PREC_LEFT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "SEQ", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "field_binding_pattern" + }, + "named": true, + "value": "field_pattern" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "field_binding_pattern" + }, + "named": true, + "value": "field_pattern" + } + ] + } + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "STRING", + "value": "_" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "}" + } + ] + } + }, + "field_binding_pattern": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "field_path" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_typed" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "=" + }, + { + "type": "FIELD", + "name": "pattern", + "content": { + "type": "SYMBOL", + "name": "_binding_pattern" + } + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "list_pattern": { + "type": "PREC_LEFT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_pattern" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "SYMBOL", + "name": "_pattern" + } + ] + } + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "]" + } + ] + } + }, + "list_binding_pattern": { + "type": "PREC_LEFT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_binding_pattern" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "SYMBOL", + "name": "_binding_pattern" + } + ] + } + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "]" + } + ] + } + }, + "cons_pattern": { + "type": "PREC_RIGHT", + "value": 11, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_pattern" + }, + { + "type": "STRING", + "value": "::" + }, + { + "type": "SYMBOL", + "name": "_pattern" + } + ] + } + }, + "cons_binding_pattern": { + "type": "PREC_RIGHT", + "value": 11, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_binding_pattern" + }, + { + "type": "STRING", + "value": "::" + }, + { + "type": "SYMBOL", + "name": "_binding_pattern" + } + ] + } + }, + "array_pattern": { + "type": "PREC_LEFT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[|" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_pattern" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "SYMBOL", + "name": "_pattern" + } + ] + } + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "|]" + } + ] + } + }, + "array_binding_pattern": { + "type": "PREC_LEFT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[|" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_binding_pattern" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "SYMBOL", + "name": "_binding_pattern" + } + ] + } + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "|]" + } + ] + } + }, + "range_pattern": { + "type": "PREC", + "value": 18, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_signed_constant" + }, + { + "type": "STRING", + "value": ".." + }, + { + "type": "SYMBOL", + "name": "_signed_constant" + } + ] + } + }, + "lazy_pattern": { + "type": "PREC", + "value": 17, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "lazy" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_pattern" + } + ] + } + }, + "lazy_binding_pattern": { + "type": "PREC", + "value": 17, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "lazy" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_binding_pattern" + } + ] + } + }, + "local_open_pattern": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "module_path" + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_pattern" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + { + "type": "SYMBOL", + "name": "list_pattern" + }, + { + "type": "SYMBOL", + "name": "array_pattern" + }, + { + "type": "SYMBOL", + "name": "record_pattern" + } + ] + } + ] + }, + "local_open_binding_pattern": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "module_path" + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_binding_pattern" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + { + "type": "SYMBOL", + "name": "list_binding_pattern" + }, + { + "type": "SYMBOL", + "name": "array_binding_pattern" + }, + { + "type": "SYMBOL", + "name": "record_binding_pattern" + } + ] + } + ] + }, + "package_pattern": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "module" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_module_name" + }, + { + "type": "ALIAS", + "content": { + "type": "STRING", + "value": "_" + }, + "named": true, + "value": "module_name" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_module_typed" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "parenthesized_pattern": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SYMBOL", + "name": "_pattern" + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "parenthesized_binding_pattern": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SYMBOL", + "name": "_binding_pattern" + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "exception_pattern": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "exception" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_pattern" + } + ] + }, + "effect_pattern": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "effect" + }, + { + "type": "FIELD", + "name": "effect", + "content": { + "type": "SYMBOL", + "name": "_effect_pattern" + } + }, + { + "type": "STRING", + "value": "," + }, + { + "type": "FIELD", + "name": "continuation", + "content": { + "type": "SYMBOL", + "name": "_simple_pattern" + } + } + ] + }, + "attribute": { + "type": "SEQ", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "PATTERN", + "value": "\\[@" + }, + "named": false, + "value": "[@" + }, + { + "type": "SYMBOL", + "name": "attribute_id" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "attribute_payload" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "]" + } + ] + }, + "item_attribute": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[@@" + }, + { + "type": "SYMBOL", + "name": "attribute_id" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "attribute_payload" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "]" + } + ] + }, + "floating_attribute": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[@@@" + }, + { + "type": "SYMBOL", + "name": "attribute_id" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "attribute_payload" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "]" + } + ] + }, + "attribute_payload": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_structure" + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ":" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_type" + }, + { + "type": "SYMBOL", + "name": "_signature" + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "?" + }, + { + "type": "SYMBOL", + "name": "_pattern" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "guard" + }, + { + "type": "BLANK" + } + ] + } + ] + } + ] + }, + "_extension": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "extension" + }, + { + "type": "SYMBOL", + "name": "quoted_extension" + } + ] + }, + "extension": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[%" + }, + { + "type": "SYMBOL", + "name": "attribute_id" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "attribute_payload" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "]" + } + ] + }, + "quoted_extension": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{%" + }, + { + "type": "SYMBOL", + "name": "attribute_id" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "\\s+" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_quoted_string" + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "_item_extension": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "item_extension" + }, + { + "type": "SYMBOL", + "name": "quoted_item_extension" + } + ] + }, + "item_extension": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[%%" + }, + { + "type": "SYMBOL", + "name": "attribute_id" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "attribute_payload" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "]" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "item_attribute" + } + } + ] + }, + "quoted_item_extension": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{%%" + }, + { + "type": "SYMBOL", + "name": "attribute_id" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "\\s+" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_quoted_string" + }, + { + "type": "STRING", + "value": "}" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "item_attribute" + } + } + ] + }, + "_attribute": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "%" + }, + { + "type": "SYMBOL", + "name": "attribute_id" + } + ] + }, + "_constant": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "number" + }, + { + "type": "SYMBOL", + "name": "character" + }, + { + "type": "SYMBOL", + "name": "string" + }, + { + "type": "SYMBOL", + "name": "quoted_string" + }, + { + "type": "SYMBOL", + "name": "boolean" + }, + { + "type": "SYMBOL", + "name": "unit" + } + ] + }, + "_signed_constant": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_constant" + }, + { + "type": "SYMBOL", + "name": "signed_number" + } + ] + }, + "number": { + "type": "TOKEN", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "[0-9][0-9_]*(\\.[0-9_]*)?([eE][+\\-]?[0-9][0-9_]*)?[g-zG-Z]?" + }, + { + "type": "PATTERN", + "value": "0[xX][0-9A-Fa-f][0-9A-Fa-f_]*(\\.[0-9A-Fa-f_]*)?([pP][+\\-]?[0-9][0-9_]*)?[g-zG-Z]?" + }, + { + "type": "PATTERN", + "value": "0[oO][0-7][0-7_]*[g-zG-Z]?" + }, + { + "type": "PATTERN", + "value": "0[bB][01][01_]*[g-zG-Z]?" + } + ] + } + }, + "signed_number": { + "type": "SEQ", + "members": [ + { + "type": "PATTERN", + "value": "[+-]" + }, + { + "type": "TOKEN", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "[0-9][0-9_]*(\\.[0-9_]*)?([eE][+\\-]?[0-9][0-9_]*)?[g-zG-Z]?" + }, + { + "type": "PATTERN", + "value": "0[xX][0-9A-Fa-f][0-9A-Fa-f_]*(\\.[0-9A-Fa-f_]*)?([pP][+\\-]?[0-9][0-9_]*)?[g-zG-Z]?" + }, + { + "type": "PATTERN", + "value": "0[oO][0-7][0-7_]*[g-zG-Z]?" + }, + { + "type": "PATTERN", + "value": "0[bB][01][01_]*[g-zG-Z]?" + } + ] + } + } + ] + }, + "character": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "'" + }, + { + "type": "SYMBOL", + "name": "character_content" + }, + { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "STRING", + "value": "'" + } + } + ] + }, + "character_content": { + "type": "CHOICE", + "members": [ + { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "PATTERN", + "value": "\\r*\\n" + } + }, + { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "PATTERN", + "value": "[^\\\\'\\r\\n]" + } + }, + { + "type": "SYMBOL", + "name": "_null" + }, + { + "type": "SYMBOL", + "name": "escape_sequence" + } + ] + }, + "string": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "\"" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "string_content" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "\"" + } + ] + }, + "string_content": { + "type": "REPEAT1", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "PATTERN", + "value": "\\s" + } + }, + { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "PATTERN", + "value": "\\[@" + } + }, + { + "type": "PATTERN", + "value": "[^\\\\\"%@]+|%|@" + }, + { + "type": "SYMBOL", + "name": "_null" + }, + { + "type": "SYMBOL", + "name": "escape_sequence" + }, + { + "type": "ALIAS", + "content": { + "type": "PATTERN", + "value": "\\\\u\\{[0-9A-Fa-f]+\\}" + }, + "named": true, + "value": "escape_sequence" + }, + { + "type": "ALIAS", + "content": { + "type": "PATTERN", + "value": "\\\\\\r*\\n[\\t ]*" + }, + "named": true, + "value": "escape_sequence" + }, + { + "type": "SYMBOL", + "name": "conversion_specification" + }, + { + "type": "SYMBOL", + "name": "pretty_printing_indication" + } + ] + } + }, + "quoted_string": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "SYMBOL", + "name": "_quoted_string" + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "_quoted_string": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_left_quoted_string_delimiter" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "quoted_string_content" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_right_quoted_string_delimiter" + } + ] + }, + "quoted_string_content": { + "type": "REPEAT1", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "PATTERN", + "value": "\\s" + } + }, + { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "PATTERN", + "value": "\\[@" + } + }, + { + "type": "PATTERN", + "value": "[^%@|]+|%|@|\\|" + }, + { + "type": "SYMBOL", + "name": "_null" + }, + { + "type": "SYMBOL", + "name": "conversion_specification" + }, + { + "type": "SYMBOL", + "name": "pretty_printing_indication" + } + ] + } + }, + "escape_sequence": { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "\\\\[\\\\\"'ntbr ]" + }, + { + "type": "PATTERN", + "value": "\\\\[0-9][0-9][0-9]" + }, + { + "type": "PATTERN", + "value": "\\\\x[0-9A-Fa-f][0-9A-Fa-f]" + }, + { + "type": "PATTERN", + "value": "\\\\o[0-3][0-7][0-7]" + } + ] + }, + "conversion_specification": { + "type": "TOKEN", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "%" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "[\\-0+ #]" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "[1-9][0-9]*|\\*" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "\\.([0-9]*|\\*)" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "[diunlLNxXosScCfFeEgGhHbBat!%@,]" + }, + { + "type": "PATTERN", + "value": "[lnL][diuxXo]" + } + ] + } + ] + } + }, + "pretty_printing_indication": { + "type": "PATTERN", + "value": "@([\\[\\], ;.{}?]|\\\\n|<[0-9]+>)" + }, + "boolean": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "true" + }, + { + "type": "STRING", + "value": "false" + } + ] + }, + "unit": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "begin" + }, + { + "type": "STRING", + "value": "end" + } + ] + } + ] + }, + "prefix_operator": { + "type": "TOKEN", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "!" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "[#!$%&*+\\-./:<>?@^|~]" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "PATTERN", + "value": "[#!$%&*+\\-./:<=>?@^|~]" + }, + { + "type": "REPEAT1", + "content": { + "type": "PATTERN", + "value": "[#!$%&*+\\-./:<=>?@^|~]" + } + } + ] + } + ] + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "PATTERN", + "value": "[~?]" + }, + { + "type": "REPEAT1", + "content": { + "type": "PATTERN", + "value": "[#!$%&*+\\-./:<=>?@^|~]" + } + } + ] + } + ] + } + }, + "sign_operator": { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "[+-]" + }, + { + "type": "PATTERN", + "value": "[+-]\\." + } + ] + }, + "_infix_operator": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "pow_operator" + }, + { + "type": "SYMBOL", + "name": "mult_operator" + }, + { + "type": "SYMBOL", + "name": "add_operator" + }, + { + "type": "SYMBOL", + "name": "concat_operator" + }, + { + "type": "SYMBOL", + "name": "rel_operator" + }, + { + "type": "SYMBOL", + "name": "and_operator" + }, + { + "type": "SYMBOL", + "name": "or_operator" + }, + { + "type": "SYMBOL", + "name": "assign_operator" + } + ] + }, + "hash_operator": { + "type": "TOKEN", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "#" + }, + { + "type": "REPEAT1", + "content": { + "type": "PATTERN", + "value": "[#!$%&*+\\-./:<=>?@^|~]" + } + } + ] + } + }, + "pow_operator": { + "type": "TOKEN", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "lsl" + }, + { + "type": "STRING", + "value": "lsr" + }, + { + "type": "STRING", + "value": "asr" + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "**" + }, + { + "type": "REPEAT", + "content": { + "type": "PATTERN", + "value": "[!$%&*+\\-./:<=>?@^|~]" + } + } + ] + } + ] + } + }, + "mult_operator": { + "type": "TOKEN", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "mod" + }, + { + "type": "STRING", + "value": "land" + }, + { + "type": "STRING", + "value": "lor" + }, + { + "type": "STRING", + "value": "lxor" + }, + { + "type": "SEQ", + "members": [ + { + "type": "PATTERN", + "value": "[*/%]" + }, + { + "type": "REPEAT", + "content": { + "type": "PATTERN", + "value": "[!$%&*+\\-./:<=>?@^|~]" + } + } + ] + } + ] + } + }, + "add_operator": { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "[+-]" + }, + { + "type": "PATTERN", + "value": "[+-]\\." + }, + { + "type": "TOKEN", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "+" + }, + { + "type": "REPEAT1", + "content": { + "type": "PATTERN", + "value": "[!$%&*+\\-./:<=>?@^|~]" + } + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "-" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "REPEAT1", + "content": { + "type": "PATTERN", + "value": "[!$%&*+\\-./:<=?@^|~]" + } + }, + { + "type": "SEQ", + "members": [ + { + "type": "PATTERN", + "value": "[!$%&*+\\-./:<=>?@^|~]" + }, + { + "type": "REPEAT1", + "content": { + "type": "PATTERN", + "value": "[!$%&*+\\-./:<=>?@^|~]" + } + } + ] + } + ] + } + ] + } + ] + } + } + ] + }, + "concat_operator": { + "type": "TOKEN", + "content": { + "type": "SEQ", + "members": [ + { + "type": "PATTERN", + "value": "[@^]" + }, + { + "type": "REPEAT", + "content": { + "type": "PATTERN", + "value": "[!$%&*+\\-./:<=>?@^|~]" + } + } + ] + } + }, + "rel_operator": { + "type": "TOKEN", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "PATTERN", + "value": "[=>$]" + }, + { + "type": "REPEAT", + "content": { + "type": "PATTERN", + "value": "[!$%&*+\\-./:<=>?@^|~]" + } + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "<" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "[!$%&*+./:<=>?@^|~]" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "PATTERN", + "value": "[!$%&*+\\-./:<=>?@^|~]" + }, + { + "type": "REPEAT1", + "content": { + "type": "PATTERN", + "value": "[!$%&*+\\-./:<=>?@^|~]" + } + } + ] + } + ] + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "&" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "[!$%*+\\-./:<=>?@^|~]" + }, + { + "type": "SEQ", + "members": [ + { + "type": "PATTERN", + "value": "[!$%&*+\\-./:<=>?@^|~]" + }, + { + "type": "REPEAT1", + "content": { + "type": "PATTERN", + "value": "[!$%&*+\\-./:<=>?@^|~]" + } + } + ] + } + ] + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "|" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "[!$%&*+\\-./:<=>?@^~]" + }, + { + "type": "SEQ", + "members": [ + { + "type": "PATTERN", + "value": "[!$%&*+\\-./:<=>?@^|~]" + }, + { + "type": "REPEAT1", + "content": { + "type": "PATTERN", + "value": "[!$%&*+\\-./:<=>?@^|~]" + } + } + ] + } + ] + } + ] + }, + { + "type": "STRING", + "value": "!=" + } + ] + } + }, + "and_operator": { + "type": "TOKEN", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "&" + }, + { + "type": "STRING", + "value": "&&" + } + ] + } + }, + "or_operator": { + "type": "TOKEN", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "or" + }, + { + "type": "STRING", + "value": "||" + } + ] + } + }, + "assign_operator": { + "type": "PATTERN", + "value": ":=" + }, + "indexing_operator": { + "type": "TOKEN", + "content": { + "type": "SEQ", + "members": [ + { + "type": "PATTERN", + "value": "[!$%&*+\\-/:=>?@^|]" + }, + { + "type": "REPEAT", + "content": { + "type": "PATTERN", + "value": "[!$%&*+\\-./:<=>?@^|~]" + } + } + ] + } + }, + "indexing_operator_path": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "indexing_operator" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "module_path" + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "SYMBOL", + "name": "indexing_operator" + } + ] + } + ] + }, + "let_operator": { + "type": "TOKEN", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "let" + }, + { + "type": "PATTERN", + "value": "[$&*+\\-/<=>@^|]" + }, + { + "type": "REPEAT", + "content": { + "type": "PATTERN", + "value": "[!$%&*+\\-./:<=>?@^|~]" + } + } + ] + } + }, + "let_and_operator": { + "type": "TOKEN", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "and" + }, + { + "type": "PATTERN", + "value": "[$&*+\\-/<=>@^|]" + }, + { + "type": "REPEAT", + "content": { + "type": "PATTERN", + "value": "[!$%&*+\\-./:<=>?@^|~]" + } + } + ] + } + }, + "match_operator": { + "type": "TOKEN", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "match" + }, + { + "type": "PATTERN", + "value": "[$&*+\\-/<=>@^|]" + }, + { + "type": "REPEAT", + "content": { + "type": "PATTERN", + "value": "[!$%&*+\\-./:<=>?@^|~]" + } + } + ] + } + }, + "_value_name": { + "type": "CHOICE", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_lowercase_identifier" + }, + "named": true, + "value": "value_name" + }, + { + "type": "SYMBOL", + "name": "parenthesized_operator" + } + ] + }, + "_simple_value_pattern": { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_lowercase_identifier" + }, + "named": true, + "value": "value_pattern" + }, + "_value_pattern": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_simple_value_pattern" + }, + { + "type": "SYMBOL", + "name": "parenthesized_operator" + } + ] + }, + "parenthesized_operator": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "prefix_operator" + }, + { + "type": "SYMBOL", + "name": "_infix_operator" + }, + { + "type": "SYMBOL", + "name": "hash_operator" + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "." + }, + { + "type": "SYMBOL", + "name": "indexing_operator" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "STRING", + "value": ".." + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "STRING", + "value": ".." + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "]" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "STRING", + "value": ".." + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "}" + } + ] + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "<-" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "SYMBOL", + "name": "let_operator" + }, + { + "type": "SYMBOL", + "name": "let_and_operator" + }, + { + "type": "SYMBOL", + "name": "match_operator" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "value_path": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_value_name" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "module_path" + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "SYMBOL", + "name": "_value_name" + } + ] + } + ] + }, + "module_path": { + "type": "PREC", + "value": 1, + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_module_name" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "module_path" + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "SYMBOL", + "name": "_module_name" + } + ] + } + ] + } + }, + "extended_module_path": { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_module_name" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "extended_module_path" + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "SYMBOL", + "name": "_module_name" + } + ] + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "extended_module_path" + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SYMBOL", + "name": "extended_module_path" + }, + { + "type": "STRING", + "value": ")" + } + ] + } + ] + } + ] + }, + "module_type_path": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_module_type_name" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "extended_module_path" + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "SYMBOL", + "name": "_module_type_name" + } + ] + } + ] + }, + "field_path": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_field_name" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "module_path" + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "SYMBOL", + "name": "_field_name" + } + ] + } + ] + }, + "constructor_path": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_constructor_name" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "module_path" + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "SYMBOL", + "name": "_constructor_name" + } + ] + } + ] + }, + "type_constructor_path": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_type_constructor" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "extended_module_path" + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "SYMBOL", + "name": "_type_constructor" + } + ] + } + ] + }, + "class_path": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_class_name" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "module_path" + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "SYMBOL", + "name": "_class_name" + } + ] + } + ] + }, + "class_type_path": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_class_type_name" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "extended_module_path" + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "SYMBOL", + "name": "_class_type_name" + } + ] + } + ] + }, + "_label_name": { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_lowercase_identifier" + }, + "named": true, + "value": "label_name" + }, + "_field_name": { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_lowercase_identifier" + }, + "named": true, + "value": "field_name" + }, + "_class_name": { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_lowercase_identifier" + }, + "named": true, + "value": "class_name" + }, + "_class_type_name": { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_lowercase_identifier" + }, + "named": true, + "value": "class_type_name" + }, + "_method_name": { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_lowercase_identifier" + }, + "named": true, + "value": "method_name" + }, + "_type_constructor": { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_lowercase_identifier" + }, + "named": true, + "value": "type_constructor" + }, + "_instance_variable_name": { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_lowercase_identifier" + }, + "named": true, + "value": "instance_variable_name" + }, + "_module_name": { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_uppercase_identifier" + }, + "named": true, + "value": "module_name" + }, + "_module_type_name": { + "type": "ALIAS", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_uppercase_identifier" + }, + { + "type": "SYMBOL", + "name": "_lowercase_identifier" + } + ] + }, + "named": true, + "value": "module_type_name" + }, + "_constructor_name": { + "type": "CHOICE", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_uppercase_identifier" + }, + "named": true, + "value": "constructor_name" + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "ALIAS", + "content": { + "type": "STRING", + "value": "::" + }, + "named": true, + "value": "constructor_name" + }, + { + "type": "STRING", + "value": ")" + } + ] + } + ] + }, + "_lowercase_identifier": { + "type": "PATTERN", + "value": "(\\\\#)?[\\p{Ll}_][\\p{XID_Continue}']*" + }, + "_uppercase_identifier": { + "type": "PATTERN", + "value": "[\\p{Lu}][\\p{XID_Continue}']*" + }, + "_label": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "~" + }, + { + "type": "STRING", + "value": "?" + } + ] + }, + { + "type": "SYMBOL", + "name": "_label_name" + } + ] + }, + "directive": { + "type": "SEQ", + "members": [ + { + "type": "PATTERN", + "value": "#" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_lowercase_identifier" + }, + { + "type": "SYMBOL", + "name": "_uppercase_identifier" + } + ] + } + ] + }, + "type_variable": { + "type": "SEQ", + "members": [ + { + "type": "PATTERN", + "value": "'" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_lowercase_identifier" + }, + { + "type": "SYMBOL", + "name": "_uppercase_identifier" + } + ] + } + ] + }, + "tag": { + "type": "SEQ", + "members": [ + { + "type": "PATTERN", + "value": "`" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_lowercase_identifier" + }, + { + "type": "SYMBOL", + "name": "_uppercase_identifier" + } + ] + } + ] + }, + "attribute_id": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_lowercase_identifier" + }, + { + "type": "SYMBOL", + "name": "_uppercase_identifier" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "PATTERN", + "value": "\\." + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_lowercase_identifier" + }, + { + "type": "SYMBOL", + "name": "_uppercase_identifier" + } + ] + } + ] + } + } + ] + } + }, + "extras": [ + { + "type": "PATTERN", + "value": "\\s" + }, + { + "type": "SYMBOL", + "name": "comment" + }, + { + "type": "SYMBOL", + "name": "line_number_directive" + }, + { + "type": "SYMBOL", + "name": "attribute" + } + ], + "conflicts": [], + "precedences": [], + "externals": [ + { + "type": "SYMBOL", + "name": "comment" + }, + { + "type": "SYMBOL", + "name": "_left_quoted_string_delimiter" + }, + { + "type": "SYMBOL", + "name": "_right_quoted_string_delimiter" + }, + { + "type": "STRING", + "value": "\"" + }, + { + "type": "SYMBOL", + "name": "line_number_directive" + }, + { + "type": "SYMBOL", + "name": "_null" + }, + { + "type": "SYMBOL", + "name": "_error_sentinel" + } + ], + "inline": [ + "_parameter", + "_argument", + "_extension", + "_item_extension", + "_value_pattern", + "_label_name", + "_field_name", + "_class_name", + "_class_type_name", + "_method_name", + "_type_constructor", + "_module_name", + "_module_type_name", + "_label" + ], + "supertypes": [ + "_structure_item", + "_signature_item", + "_parameter", + "_module_type", + "_simple_module_expression", + "_module_expression", + "_simple_class_type", + "_class_type", + "_class_field_specification", + "_simple_class_expression", + "_class_expression", + "_class_field", + "_polymorphic_type", + "_simple_type", + "_tuple_type", + "_type", + "_simple_expression", + "_expression", + "_sequence_expression", + "_simple_pattern", + "_effect_pattern", + "_pattern", + "_binding_pattern", + "_constant", + "_signed_constant", + "_infix_operator" + ] +} diff --git a/build/ocaml_interface-nodes.json b/build/ocaml_interface-nodes.json new file mode 100644 index 0000000..bd84ad0 --- /dev/null +++ b/build/ocaml_interface-nodes.json @@ -0,0 +1,5537 @@ +[ + { + "type": "_binding_pattern", + "named": true, + "subtypes": [ + { + "type": "_signed_constant", + "named": true + }, + { + "type": "alias_pattern", + "named": true + }, + { + "type": "array_pattern", + "named": true + }, + { + "type": "cons_pattern", + "named": true + }, + { + "type": "constructor_path", + "named": true + }, + { + "type": "constructor_pattern", + "named": true + }, + { + "type": "extension", + "named": true + }, + { + "type": "lazy_pattern", + "named": true + }, + { + "type": "list_pattern", + "named": true + }, + { + "type": "local_open_pattern", + "named": true + }, + { + "type": "or_pattern", + "named": true + }, + { + "type": "package_pattern", + "named": true + }, + { + "type": "parenthesized_operator", + "named": true + }, + { + "type": "parenthesized_pattern", + "named": true + }, + { + "type": "polymorphic_variant_pattern", + "named": true + }, + { + "type": "quoted_extension", + "named": true + }, + { + "type": "range_pattern", + "named": true + }, + { + "type": "record_pattern", + "named": true + }, + { + "type": "tag", + "named": true + }, + { + "type": "tag_pattern", + "named": true + }, + { + "type": "tuple_pattern", + "named": true + }, + { + "type": "typed_pattern", + "named": true + }, + { + "type": "value_name", + "named": true + } + ] + }, + { + "type": "_class_expression", + "named": true, + "subtypes": [ + { + "type": "_simple_class_expression", + "named": true + }, + { + "type": "class_application", + "named": true + }, + { + "type": "class_function", + "named": true + }, + { + "type": "let_class_expression", + "named": true + }, + { + "type": "let_open_class_expression", + "named": true + } + ] + }, + { + "type": "_class_field", + "named": true, + "subtypes": [ + { + "type": "class_initializer", + "named": true + }, + { + "type": "inheritance_definition", + "named": true + }, + { + "type": "instance_variable_definition", + "named": true + }, + { + "type": "item_extension", + "named": true + }, + { + "type": "method_definition", + "named": true + }, + { + "type": "quoted_item_extension", + "named": true + }, + { + "type": "type_parameter_constraint", + "named": true + } + ] + }, + { + "type": "_class_field_specification", + "named": true, + "subtypes": [ + { + "type": "inheritance_specification", + "named": true + }, + { + "type": "instance_variable_specification", + "named": true + }, + { + "type": "item_extension", + "named": true + }, + { + "type": "method_specification", + "named": true + }, + { + "type": "quoted_item_extension", + "named": true + }, + { + "type": "type_parameter_constraint", + "named": true + } + ] + }, + { + "type": "_class_type", + "named": true, + "subtypes": [ + { + "type": "_simple_class_type", + "named": true + }, + { + "type": "class_function_type", + "named": true + } + ] + }, + { + "type": "_constant", + "named": true, + "subtypes": [ + { + "type": "boolean", + "named": true + }, + { + "type": "character", + "named": true + }, + { + "type": "number", + "named": true + }, + { + "type": "quoted_string", + "named": true + }, + { + "type": "string", + "named": true + }, + { + "type": "unit", + "named": true + } + ] + }, + { + "type": "_effect_pattern", + "named": true, + "subtypes": [ + { + "type": "_simple_pattern", + "named": true + }, + { + "type": "constructor_pattern", + "named": true + }, + { + "type": "lazy_pattern", + "named": true + }, + { + "type": "tag_pattern", + "named": true + } + ] + }, + { + "type": "_expression", + "named": true, + "subtypes": [ + { + "type": "_simple_expression", + "named": true + }, + { + "type": "application_expression", + "named": true + }, + { + "type": "assert_expression", + "named": true + }, + { + "type": "cons_expression", + "named": true + }, + { + "type": "for_expression", + "named": true + }, + { + "type": "fun_expression", + "named": true + }, + { + "type": "function_expression", + "named": true + }, + { + "type": "if_expression", + "named": true + }, + { + "type": "infix_expression", + "named": true + }, + { + "type": "lazy_expression", + "named": true + }, + { + "type": "let_exception_expression", + "named": true + }, + { + "type": "let_expression", + "named": true + }, + { + "type": "let_module_expression", + "named": true + }, + { + "type": "let_open_expression", + "named": true + }, + { + "type": "match_expression", + "named": true + }, + { + "type": "product_expression", + "named": true + }, + { + "type": "set_expression", + "named": true + }, + { + "type": "sign_expression", + "named": true + }, + { + "type": "try_expression", + "named": true + }, + { + "type": "while_expression", + "named": true + } + ] + }, + { + "type": "_infix_operator", + "named": true, + "subtypes": [ + { + "type": "add_operator", + "named": true + }, + { + "type": "and_operator", + "named": true + }, + { + "type": "assign_operator", + "named": true + }, + { + "type": "concat_operator", + "named": true + }, + { + "type": "mult_operator", + "named": true + }, + { + "type": "or_operator", + "named": true + }, + { + "type": "pow_operator", + "named": true + }, + { + "type": "rel_operator", + "named": true + } + ] + }, + { + "type": "_module_expression", + "named": true, + "subtypes": [ + { + "type": "_simple_module_expression", + "named": true + }, + { + "type": "functor", + "named": true + }, + { + "type": "module_application", + "named": true + }, + { + "type": "module_path", + "named": true + }, + { + "type": "structure", + "named": true + } + ] + }, + { + "type": "_module_type", + "named": true, + "subtypes": [ + { + "type": "extension", + "named": true + }, + { + "type": "functor_type", + "named": true + }, + { + "type": "module_type_constraint", + "named": true + }, + { + "type": "module_type_of", + "named": true + }, + { + "type": "module_type_path", + "named": true + }, + { + "type": "parenthesized_module_type", + "named": true + }, + { + "type": "quoted_extension", + "named": true + }, + { + "type": "signature", + "named": true + } + ] + }, + { + "type": "_parameter", + "named": true, + "subtypes": [ + { + "type": "abstract_type", + "named": true + }, + { + "type": "parameter", + "named": true + } + ] + }, + { + "type": "_pattern", + "named": true, + "subtypes": [ + { + "type": "_effect_pattern", + "named": true + }, + { + "type": "alias_pattern", + "named": true + }, + { + "type": "cons_pattern", + "named": true + }, + { + "type": "effect_pattern", + "named": true + }, + { + "type": "exception_pattern", + "named": true + }, + { + "type": "or_pattern", + "named": true + }, + { + "type": "range_pattern", + "named": true + }, + { + "type": "tuple_pattern", + "named": true + } + ] + }, + { + "type": "_polymorphic_type", + "named": true, + "subtypes": [ + { + "type": "_type", + "named": true + }, + { + "type": "polymorphic_type", + "named": true + } + ] + }, + { + "type": "_sequence_expression", + "named": true, + "subtypes": [ + { + "type": "_expression", + "named": true + }, + { + "type": "sequence_expression", + "named": true + } + ] + }, + { + "type": "_signature_item", + "named": true, + "subtypes": [ + { + "type": "class_definition", + "named": true + }, + { + "type": "class_type_definition", + "named": true + }, + { + "type": "exception_definition", + "named": true + }, + { + "type": "external", + "named": true + }, + { + "type": "floating_attribute", + "named": true + }, + { + "type": "include_module_type", + "named": true + }, + { + "type": "item_extension", + "named": true + }, + { + "type": "module_definition", + "named": true + }, + { + "type": "module_type_definition", + "named": true + }, + { + "type": "open_module", + "named": true + }, + { + "type": "quoted_item_extension", + "named": true + }, + { + "type": "type_definition", + "named": true + }, + { + "type": "value_specification", + "named": true + } + ] + }, + { + "type": "_signed_constant", + "named": true, + "subtypes": [ + { + "type": "_constant", + "named": true + }, + { + "type": "signed_number", + "named": true + } + ] + }, + { + "type": "_simple_class_expression", + "named": true, + "subtypes": [ + { + "type": "class_path", + "named": true + }, + { + "type": "extension", + "named": true + }, + { + "type": "instantiated_class", + "named": true + }, + { + "type": "object_expression", + "named": true + }, + { + "type": "parenthesized_class_expression", + "named": true + }, + { + "type": "quoted_extension", + "named": true + }, + { + "type": "typed_class_expression", + "named": true + } + ] + }, + { + "type": "_simple_class_type", + "named": true, + "subtypes": [ + { + "type": "class_body_type", + "named": true + }, + { + "type": "class_type_path", + "named": true + }, + { + "type": "extension", + "named": true + }, + { + "type": "instantiated_class_type", + "named": true + }, + { + "type": "let_open_class_type", + "named": true + }, + { + "type": "quoted_extension", + "named": true + } + ] + }, + { + "type": "_simple_expression", + "named": true, + "subtypes": [ + { + "type": "_constant", + "named": true + }, + { + "type": "array_expression", + "named": true + }, + { + "type": "array_get_expression", + "named": true + }, + { + "type": "bigarray_get_expression", + "named": true + }, + { + "type": "coercion_expression", + "named": true + }, + { + "type": "constructor_path", + "named": true + }, + { + "type": "extension", + "named": true + }, + { + "type": "field_get_expression", + "named": true + }, + { + "type": "hash_expression", + "named": true + }, + { + "type": "list_expression", + "named": true + }, + { + "type": "local_open_expression", + "named": true + }, + { + "type": "method_invocation", + "named": true + }, + { + "type": "new_expression", + "named": true + }, + { + "type": "object_copy_expression", + "named": true + }, + { + "type": "object_expression", + "named": true + }, + { + "type": "ocamlyacc_value", + "named": true + }, + { + "type": "package_expression", + "named": true + }, + { + "type": "parenthesized_expression", + "named": true + }, + { + "type": "prefix_expression", + "named": true + }, + { + "type": "quoted_extension", + "named": true + }, + { + "type": "record_expression", + "named": true + }, + { + "type": "string_get_expression", + "named": true + }, + { + "type": "tag", + "named": true + }, + { + "type": "typed_expression", + "named": true + }, + { + "type": "value_path", + "named": true + } + ] + }, + { + "type": "_simple_module_expression", + "named": true, + "subtypes": [ + { + "type": "extension", + "named": true + }, + { + "type": "packed_module", + "named": true + }, + { + "type": "parenthesized_module_expression", + "named": true + }, + { + "type": "quoted_extension", + "named": true + }, + { + "type": "typed_module_expression", + "named": true + } + ] + }, + { + "type": "_simple_pattern", + "named": true, + "subtypes": [ + { + "type": "_signed_constant", + "named": true + }, + { + "type": "array_pattern", + "named": true + }, + { + "type": "constructor_path", + "named": true + }, + { + "type": "extension", + "named": true + }, + { + "type": "list_pattern", + "named": true + }, + { + "type": "local_open_pattern", + "named": true + }, + { + "type": "package_pattern", + "named": true + }, + { + "type": "parenthesized_operator", + "named": true + }, + { + "type": "parenthesized_pattern", + "named": true + }, + { + "type": "polymorphic_variant_pattern", + "named": true + }, + { + "type": "quoted_extension", + "named": true + }, + { + "type": "record_pattern", + "named": true + }, + { + "type": "tag", + "named": true + }, + { + "type": "typed_pattern", + "named": true + }, + { + "type": "value_pattern", + "named": true + } + ] + }, + { + "type": "_simple_type", + "named": true, + "subtypes": [ + { + "type": "constructed_type", + "named": true + }, + { + "type": "extension", + "named": true + }, + { + "type": "hash_type", + "named": true + }, + { + "type": "local_open_type", + "named": true + }, + { + "type": "object_type", + "named": true + }, + { + "type": "package_type", + "named": true + }, + { + "type": "parenthesized_type", + "named": true + }, + { + "type": "polymorphic_variant_type", + "named": true + }, + { + "type": "quoted_extension", + "named": true + }, + { + "type": "type_constructor_path", + "named": true + }, + { + "type": "type_variable", + "named": true + } + ] + }, + { + "type": "_structure_item", + "named": true, + "subtypes": [ + { + "type": "class_definition", + "named": true + }, + { + "type": "class_type_definition", + "named": true + }, + { + "type": "exception_definition", + "named": true + }, + { + "type": "external", + "named": true + }, + { + "type": "floating_attribute", + "named": true + }, + { + "type": "include_module", + "named": true + }, + { + "type": "item_extension", + "named": true + }, + { + "type": "module_definition", + "named": true + }, + { + "type": "module_type_definition", + "named": true + }, + { + "type": "open_module", + "named": true + }, + { + "type": "quoted_item_extension", + "named": true + }, + { + "type": "type_definition", + "named": true + }, + { + "type": "value_definition", + "named": true + } + ] + }, + { + "type": "_tuple_type", + "named": true, + "subtypes": [ + { + "type": "_simple_type", + "named": true + }, + { + "type": "tuple_type", + "named": true + } + ] + }, + { + "type": "_type", + "named": true, + "subtypes": [ + { + "type": "_tuple_type", + "named": true + }, + { + "type": "aliased_type", + "named": true + }, + { + "type": "function_type", + "named": true + } + ] + }, + { + "type": "abstract_type", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "type_constructor", + "named": true + } + ] + } + }, + { + "type": "add_operator", + "named": true, + "fields": {} + }, + { + "type": "alias_pattern", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_binding_pattern", + "named": true + }, + { + "type": "_pattern", + "named": true + }, + { + "type": "value_pattern", + "named": true + } + ] + } + }, + { + "type": "aliased_type", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_type", + "named": true + }, + { + "type": "type_variable", + "named": true + } + ] + } + }, + { + "type": "application_expression", + "named": true, + "fields": { + "argument": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_simple_expression", + "named": true + }, + { + "type": "labeled_argument", + "named": true + } + ] + }, + "function": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_simple_expression", + "named": true + } + ] + } + } + }, + { + "type": "array_binding_pattern", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "_binding_pattern", + "named": true + } + ] + } + }, + { + "type": "array_expression", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "_expression", + "named": true + } + ] + } + }, + { + "type": "array_get_expression", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_sequence_expression", + "named": true + }, + { + "type": "_simple_expression", + "named": true + }, + { + "type": "indexing_operator_path", + "named": true + } + ] + } + }, + { + "type": "array_pattern", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "_binding_pattern", + "named": true + }, + { + "type": "_pattern", + "named": true + } + ] + } + }, + { + "type": "assert_expression", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_simple_expression", + "named": true + }, + { + "type": "attribute_id", + "named": true + } + ] + } + }, + { + "type": "attribute", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "attribute_id", + "named": true + }, + { + "type": "attribute_payload", + "named": true + } + ] + } + }, + { + "type": "attribute_id", + "named": true, + "fields": {} + }, + { + "type": "attribute_payload", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "_pattern", + "named": true + }, + { + "type": "_signature_item", + "named": true + }, + { + "type": "_structure_item", + "named": true + }, + { + "type": "_type", + "named": true + }, + { + "type": "expression_item", + "named": true + }, + { + "type": "guard", + "named": true + }, + { + "type": "toplevel_directive", + "named": true + } + ] + } + }, + { + "type": "bigarray_get_expression", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_sequence_expression", + "named": true + }, + { + "type": "_simple_expression", + "named": true + }, + { + "type": "indexing_operator_path", + "named": true + } + ] + } + }, + { + "type": "boolean", + "named": true, + "fields": {} + }, + { + "type": "character", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "character_content", + "named": true + } + ] + } + }, + { + "type": "character_content", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": false, + "types": [ + { + "type": "escape_sequence", + "named": true + } + ] + } + }, + { + "type": "class_application", + "named": true, + "fields": { + "argument": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_simple_expression", + "named": true + }, + { + "type": "labeled_argument", + "named": true + } + ] + }, + "class": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_simple_class_expression", + "named": true + } + ] + } + } + }, + { + "type": "class_binding", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": false, + "types": [ + { + "type": "_class_expression", + "named": true + } + ] + }, + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "class_name", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "_class_type", + "named": true + }, + { + "type": "_parameter", + "named": true + }, + { + "type": "item_attribute", + "named": true + }, + { + "type": "type_variable", + "named": true + } + ] + } + }, + { + "type": "class_body_type", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "_class_field_specification", + "named": true + }, + { + "type": "_type", + "named": true + }, + { + "type": "floating_attribute", + "named": true + } + ] + } + }, + { + "type": "class_definition", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "attribute_id", + "named": true + }, + { + "type": "class_binding", + "named": true + } + ] + } + }, + { + "type": "class_function", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_class_expression", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_parameter", + "named": true + } + ] + } + }, + { + "type": "class_function_type", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_class_type", + "named": true + }, + { + "type": "_tuple_type", + "named": true + }, + { + "type": "label_name", + "named": true + } + ] + } + }, + { + "type": "class_initializer", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_sequence_expression", + "named": true + }, + { + "type": "item_attribute", + "named": true + } + ] + } + }, + { + "type": "class_path", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "class_name", + "named": true + }, + { + "type": "module_path", + "named": true + } + ] + } + }, + { + "type": "class_type_binding", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_simple_class_type", + "named": true + } + ] + }, + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "class_type_name", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "item_attribute", + "named": true + }, + { + "type": "type_variable", + "named": true + } + ] + } + }, + { + "type": "class_type_definition", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "attribute_id", + "named": true + }, + { + "type": "class_type_binding", + "named": true + } + ] + } + }, + { + "type": "class_type_path", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "class_type_name", + "named": true + }, + { + "type": "extended_module_path", + "named": true + } + ] + } + }, + { + "type": "coercion_expression", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_sequence_expression", + "named": true + }, + { + "type": "_type", + "named": true + } + ] + } + }, + { + "type": "compilation_unit", + "named": true, + "root": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "_signature_item", + "named": true + } + ] + } + }, + { + "type": "cons_expression", + "named": true, + "fields": { + "left": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_expression", + "named": true + } + ] + }, + "right": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_expression", + "named": true + } + ] + } + } + }, + { + "type": "cons_pattern", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_binding_pattern", + "named": true + }, + { + "type": "_pattern", + "named": true + } + ] + } + }, + { + "type": "constrain_module", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "extended_module_path", + "named": true + }, + { + "type": "module_path", + "named": true + } + ] + } + }, + { + "type": "constrain_module_type", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_module_type", + "named": true + } + ] + } + }, + { + "type": "constrain_type", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_type", + "named": true + }, + { + "type": "type_constraint", + "named": true + }, + { + "type": "type_constructor_path", + "named": true + }, + { + "type": "type_variable", + "named": true + } + ] + } + }, + { + "type": "constructed_type", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_simple_type", + "named": true + }, + { + "type": "_type", + "named": true + } + ] + } + }, + { + "type": "constructor_declaration", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_simple_type", + "named": true + }, + { + "type": "constructor_name", + "named": true + }, + { + "type": "constructor_path", + "named": true + }, + { + "type": "record_declaration", + "named": true + } + ] + } + }, + { + "type": "constructor_path", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "constructor_name", + "named": true + }, + { + "type": "module_path", + "named": true + } + ] + } + }, + { + "type": "constructor_pattern", + "named": true, + "fields": { + "pattern": { + "multiple": false, + "required": false, + "types": [ + { + "type": "_binding_pattern", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_pattern", + "named": true + }, + { + "type": "abstract_type", + "named": true + }, + { + "type": "constructor_path", + "named": true + } + ] + } + }, + { + "type": "directive", + "named": true, + "fields": {} + }, + { + "type": "do_clause", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": false, + "types": [ + { + "type": "_sequence_expression", + "named": true + } + ] + } + }, + { + "type": "effect_pattern", + "named": true, + "fields": { + "continuation": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_simple_pattern", + "named": true + } + ] + }, + "effect": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_effect_pattern", + "named": true + } + ] + } + } + }, + { + "type": "else_clause", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_expression", + "named": true + } + ] + } + }, + { + "type": "escape_sequence", + "named": true, + "fields": {} + }, + { + "type": "exception_definition", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "attribute_id", + "named": true + }, + { + "type": "constructor_declaration", + "named": true + }, + { + "type": "item_attribute", + "named": true + } + ] + } + }, + { + "type": "exception_pattern", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_pattern", + "named": true + }, + { + "type": "attribute_id", + "named": true + } + ] + } + }, + { + "type": "expression_item", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_sequence_expression", + "named": true + }, + { + "type": "item_attribute", + "named": true + } + ] + } + }, + { + "type": "extended_module_path", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "extended_module_path", + "named": true + }, + { + "type": "module_name", + "named": true + } + ] + } + }, + { + "type": "extension", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "attribute_id", + "named": true + }, + { + "type": "attribute_payload", + "named": true + } + ] + } + }, + { + "type": "external", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_polymorphic_type", + "named": true + }, + { + "type": "attribute_id", + "named": true + }, + { + "type": "item_attribute", + "named": true + }, + { + "type": "parenthesized_operator", + "named": true + }, + { + "type": "string", + "named": true + }, + { + "type": "value_name", + "named": true + } + ] + } + }, + { + "type": "field_declaration", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_polymorphic_type", + "named": true + }, + { + "type": "field_name", + "named": true + } + ] + } + }, + { + "type": "field_expression", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": false, + "types": [ + { + "type": "_expression", + "named": true + } + ] + }, + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "field_path", + "named": true + } + ] + } + }, + "children": { + "multiple": false, + "required": false, + "types": [ + { + "type": "_type", + "named": true + } + ] + } + }, + { + "type": "field_get_expression", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_simple_expression", + "named": true + }, + { + "type": "field_path", + "named": true + } + ] + } + }, + { + "type": "field_path", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "field_name", + "named": true + }, + { + "type": "module_path", + "named": true + } + ] + } + }, + { + "type": "field_pattern", + "named": true, + "fields": { + "pattern": { + "multiple": false, + "required": false, + "types": [ + { + "type": "_binding_pattern", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_pattern", + "named": true + }, + { + "type": "_type", + "named": true + }, + { + "type": "field_path", + "named": true + } + ] + } + }, + { + "type": "floating_attribute", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "attribute_id", + "named": true + }, + { + "type": "attribute_payload", + "named": true + } + ] + } + }, + { + "type": "for_expression", + "named": true, + "fields": { + "from": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_sequence_expression", + "named": true + } + ] + }, + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "parenthesized_operator", + "named": true + }, + { + "type": "value_pattern", + "named": true + } + ] + }, + "to": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_sequence_expression", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "attribute_id", + "named": true + }, + { + "type": "do_clause", + "named": true + } + ] + } + }, + { + "type": "fun_expression", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_sequence_expression", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_parameter", + "named": true + }, + { + "type": "_simple_type", + "named": true + }, + { + "type": "attribute_id", + "named": true + } + ] + } + }, + { + "type": "function_expression", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "attribute_id", + "named": true + }, + { + "type": "match_case", + "named": true + } + ] + } + }, + { + "type": "function_type", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_type", + "named": true + }, + { + "type": "typed_label", + "named": true + } + ] + } + }, + { + "type": "functor", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_module_expression", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "module_parameter", + "named": true + } + ] + } + }, + { + "type": "functor_type", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_module_type", + "named": true + }, + { + "type": "module_parameter", + "named": true + } + ] + } + }, + { + "type": "guard", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_sequence_expression", + "named": true + } + ] + } + }, + { + "type": "hash_expression", + "named": true, + "fields": { + "left": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_simple_expression", + "named": true + } + ] + }, + "operator": { + "multiple": false, + "required": true, + "types": [ + { + "type": "hash_operator", + "named": true + } + ] + }, + "right": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_simple_expression", + "named": true + } + ] + } + } + }, + { + "type": "hash_type", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_simple_type", + "named": true + }, + { + "type": "_type", + "named": true + }, + { + "type": "class_type_path", + "named": true + } + ] + } + }, + { + "type": "if_expression", + "named": true, + "fields": { + "condition": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_sequence_expression", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "attribute_id", + "named": true + }, + { + "type": "else_clause", + "named": true + }, + { + "type": "then_clause", + "named": true + } + ] + } + }, + { + "type": "include_module", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_module_expression", + "named": true + }, + { + "type": "attribute_id", + "named": true + }, + { + "type": "item_attribute", + "named": true + } + ] + } + }, + { + "type": "include_module_type", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_module_type", + "named": true + }, + { + "type": "attribute_id", + "named": true + }, + { + "type": "item_attribute", + "named": true + } + ] + } + }, + { + "type": "indexing_operator_path", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "indexing_operator", + "named": true + }, + { + "type": "module_path", + "named": true + } + ] + } + }, + { + "type": "infix_expression", + "named": true, + "fields": { + "left": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_expression", + "named": true + } + ] + }, + "operator": { + "multiple": false, + "required": true, + "types": [ + { + "type": "add_operator", + "named": true + }, + { + "type": "and_operator", + "named": true + }, + { + "type": "assign_operator", + "named": true + }, + { + "type": "concat_operator", + "named": true + }, + { + "type": "mult_operator", + "named": true + }, + { + "type": "or_operator", + "named": true + }, + { + "type": "pow_operator", + "named": true + }, + { + "type": "rel_operator", + "named": true + } + ] + }, + "right": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_expression", + "named": true + } + ] + } + } + }, + { + "type": "inheritance_definition", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_class_expression", + "named": true + }, + { + "type": "item_attribute", + "named": true + }, + { + "type": "parenthesized_operator", + "named": true + }, + { + "type": "value_pattern", + "named": true + } + ] + } + }, + { + "type": "inheritance_specification", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_simple_class_type", + "named": true + }, + { + "type": "item_attribute", + "named": true + } + ] + } + }, + { + "type": "instance_variable_definition", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": false, + "types": [ + { + "type": "_sequence_expression", + "named": true + } + ] + }, + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "instance_variable_name", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "_type", + "named": true + }, + { + "type": "item_attribute", + "named": true + } + ] + } + }, + { + "type": "instance_variable_expression", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_expression", + "named": true + }, + { + "type": "instance_variable_name", + "named": true + } + ] + } + }, + { + "type": "instance_variable_specification", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_type", + "named": true + }, + { + "type": "instance_variable_name", + "named": true + }, + { + "type": "item_attribute", + "named": true + } + ] + } + }, + { + "type": "instantiated_class", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_type", + "named": true + }, + { + "type": "class_path", + "named": true + } + ] + } + }, + { + "type": "instantiated_class_type", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_type", + "named": true + }, + { + "type": "class_type_path", + "named": true + } + ] + } + }, + { + "type": "item_attribute", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "attribute_id", + "named": true + }, + { + "type": "attribute_payload", + "named": true + } + ] + } + }, + { + "type": "item_extension", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "attribute_id", + "named": true + }, + { + "type": "attribute_payload", + "named": true + }, + { + "type": "item_attribute", + "named": true + } + ] + } + }, + { + "type": "labeled_argument", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_simple_expression", + "named": true + }, + { + "type": "_type", + "named": true + }, + { + "type": "label_name", + "named": true + } + ] + } + }, + { + "type": "lazy_expression", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_simple_expression", + "named": true + }, + { + "type": "attribute_id", + "named": true + } + ] + } + }, + { + "type": "lazy_pattern", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_binding_pattern", + "named": true + }, + { + "type": "_pattern", + "named": true + }, + { + "type": "attribute_id", + "named": true + } + ] + } + }, + { + "type": "let_binding", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": false, + "types": [ + { + "type": "_sequence_expression", + "named": true + } + ] + }, + "pattern": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_binding_pattern", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "_parameter", + "named": true + }, + { + "type": "_polymorphic_type", + "named": true + }, + { + "type": "item_attribute", + "named": true + } + ] + } + }, + { + "type": "let_class_expression", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_class_expression", + "named": true + } + ] + } + }, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "value_definition", + "named": true + } + ] + } + }, + { + "type": "let_exception_expression", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_sequence_expression", + "named": true + } + ] + } + }, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "exception_definition", + "named": true + } + ] + } + }, + { + "type": "let_expression", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_sequence_expression", + "named": true + }, + { + "type": "value_definition", + "named": true + } + ] + } + }, + { + "type": "let_module_expression", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_sequence_expression", + "named": true + } + ] + } + }, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "module_definition", + "named": true + } + ] + } + }, + { + "type": "let_open_class_expression", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_class_expression", + "named": true + } + ] + } + }, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "open_module", + "named": true + } + ] + } + }, + { + "type": "let_open_class_type", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_simple_class_type", + "named": true + } + ] + } + }, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "open_module", + "named": true + } + ] + } + }, + { + "type": "let_open_expression", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_sequence_expression", + "named": true + } + ] + } + }, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "open_module", + "named": true + } + ] + } + }, + { + "type": "list_binding_pattern", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "_binding_pattern", + "named": true + } + ] + } + }, + { + "type": "list_expression", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "_expression", + "named": true + } + ] + } + }, + { + "type": "list_pattern", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "_binding_pattern", + "named": true + }, + { + "type": "_pattern", + "named": true + } + ] + } + }, + { + "type": "local_open_expression", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_sequence_expression", + "named": true + }, + { + "type": "array_expression", + "named": true + }, + { + "type": "list_expression", + "named": true + }, + { + "type": "module_path", + "named": true + }, + { + "type": "object_copy_expression", + "named": true + }, + { + "type": "package_expression", + "named": true + }, + { + "type": "record_expression", + "named": true + } + ] + } + }, + { + "type": "local_open_pattern", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_binding_pattern", + "named": true + }, + { + "type": "_pattern", + "named": true + }, + { + "type": "array_binding_pattern", + "named": true + }, + { + "type": "list_binding_pattern", + "named": true + }, + { + "type": "module_path", + "named": true + }, + { + "type": "record_binding_pattern", + "named": true + } + ] + } + }, + { + "type": "local_open_type", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_type", + "named": true + }, + { + "type": "extended_module_path", + "named": true + }, + { + "type": "package_type", + "named": true + }, + { + "type": "polymorphic_variant_type", + "named": true + } + ] + } + }, + { + "type": "match_case", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_sequence_expression", + "named": true + }, + { + "type": "refutation_case", + "named": true + } + ] + }, + "pattern": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_pattern", + "named": true + } + ] + } + }, + "children": { + "multiple": false, + "required": false, + "types": [ + { + "type": "guard", + "named": true + } + ] + } + }, + { + "type": "match_expression", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_sequence_expression", + "named": true + }, + { + "type": "attribute_id", + "named": true + }, + { + "type": "match_case", + "named": true + }, + { + "type": "match_operator", + "named": true + } + ] + } + }, + { + "type": "method_definition", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": false, + "types": [ + { + "type": "_sequence_expression", + "named": true + } + ] + }, + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "method_name", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "_parameter", + "named": true + }, + { + "type": "_polymorphic_type", + "named": true + }, + { + "type": "item_attribute", + "named": true + } + ] + } + }, + { + "type": "method_invocation", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_simple_expression", + "named": true + }, + { + "type": "method_name", + "named": true + } + ] + } + }, + { + "type": "method_specification", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_polymorphic_type", + "named": true + }, + { + "type": "item_attribute", + "named": true + }, + { + "type": "method_name", + "named": true + } + ] + } + }, + { + "type": "method_type", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_polymorphic_type", + "named": true + }, + { + "type": "method_name", + "named": true + } + ] + } + }, + { + "type": "module_application", + "named": true, + "fields": { + "argument": { + "multiple": false, + "required": false, + "types": [ + { + "type": "_simple_module_expression", + "named": true + } + ] + }, + "functor": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_module_expression", + "named": true + } + ] + } + } + }, + { + "type": "module_binding", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": false, + "types": [ + { + "type": "_module_expression", + "named": true + } + ] + }, + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "module_name", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "_module_type", + "named": true + }, + { + "type": "item_attribute", + "named": true + }, + { + "type": "module_parameter", + "named": true + } + ] + } + }, + { + "type": "module_definition", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "attribute_id", + "named": true + }, + { + "type": "module_binding", + "named": true + } + ] + } + }, + { + "type": "module_parameter", + "named": true, + "fields": { + "name": { + "multiple": false, + "required": false, + "types": [ + { + "type": "module_name", + "named": true + } + ] + } + }, + "children": { + "multiple": false, + "required": false, + "types": [ + { + "type": "_module_type", + "named": true + } + ] + } + }, + { + "type": "module_path", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "module_name", + "named": true + }, + { + "type": "module_path", + "named": true + } + ] + } + }, + { + "type": "module_type_constraint", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_module_type", + "named": true + }, + { + "type": "constrain_module", + "named": true + }, + { + "type": "constrain_module_type", + "named": true + }, + { + "type": "constrain_type", + "named": true + } + ] + } + }, + { + "type": "module_type_definition", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": false, + "types": [ + { + "type": "_module_type", + "named": true + } + ] + }, + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "module_type_name", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "attribute_id", + "named": true + }, + { + "type": "item_attribute", + "named": true + } + ] + } + }, + { + "type": "module_type_of", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_module_expression", + "named": true + } + ] + } + }, + { + "type": "module_type_path", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "extended_module_path", + "named": true + }, + { + "type": "module_type_name", + "named": true + } + ] + } + }, + { + "type": "new_expression", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "attribute_id", + "named": true + }, + { + "type": "class_path", + "named": true + } + ] + } + }, + { + "type": "number", + "named": true, + "fields": {} + }, + { + "type": "object_copy_expression", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "instance_variable_expression", + "named": true + } + ] + } + }, + { + "type": "object_expression", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "_class_field", + "named": true + }, + { + "type": "_pattern", + "named": true + }, + { + "type": "_type", + "named": true + }, + { + "type": "attribute_id", + "named": true + }, + { + "type": "floating_attribute", + "named": true + } + ] + } + }, + { + "type": "object_type", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "_simple_type", + "named": true + }, + { + "type": "method_type", + "named": true + } + ] + } + }, + { + "type": "open_module", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_module_expression", + "named": true + }, + { + "type": "attribute_id", + "named": true + }, + { + "type": "item_attribute", + "named": true + } + ] + } + }, + { + "type": "or_pattern", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_binding_pattern", + "named": true + }, + { + "type": "_pattern", + "named": true + } + ] + } + }, + { + "type": "package_expression", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_module_expression", + "named": true + }, + { + "type": "_module_type", + "named": true + }, + { + "type": "attribute_id", + "named": true + } + ] + } + }, + { + "type": "package_pattern", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_module_type", + "named": true + }, + { + "type": "attribute_id", + "named": true + }, + { + "type": "module_name", + "named": true + } + ] + } + }, + { + "type": "package_type", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_module_type", + "named": true + }, + { + "type": "attribute_id", + "named": true + } + ] + } + }, + { + "type": "packed_module", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_expression", + "named": true + }, + { + "type": "_module_type", + "named": true + } + ] + } + }, + { + "type": "parameter", + "named": true, + "fields": { + "pattern": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_pattern", + "named": true + }, + { + "type": "_simple_pattern", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "_sequence_expression", + "named": true + }, + { + "type": "_type", + "named": true + }, + { + "type": "label_name", + "named": true + } + ] + } + }, + { + "type": "parenthesized_class_expression", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_class_expression", + "named": true + } + ] + } + }, + { + "type": "parenthesized_expression", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_sequence_expression", + "named": true + }, + { + "type": "attribute_id", + "named": true + } + ] + } + }, + { + "type": "parenthesized_module_expression", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_module_expression", + "named": true + } + ] + } + }, + { + "type": "parenthesized_module_type", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_module_type", + "named": true + } + ] + } + }, + { + "type": "parenthesized_operator", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_infix_operator", + "named": true + }, + { + "type": "hash_operator", + "named": true + }, + { + "type": "indexing_operator", + "named": true + }, + { + "type": "let_and_operator", + "named": true + }, + { + "type": "let_operator", + "named": true + }, + { + "type": "match_operator", + "named": true + }, + { + "type": "prefix_operator", + "named": true + } + ] + } + }, + { + "type": "parenthesized_pattern", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_binding_pattern", + "named": true + }, + { + "type": "_pattern", + "named": true + } + ] + } + }, + { + "type": "parenthesized_type", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_type", + "named": true + } + ] + } + }, + { + "type": "polymorphic_type", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_type", + "named": true + }, + { + "type": "abstract_type", + "named": true + }, + { + "type": "type_variable", + "named": true + } + ] + } + }, + { + "type": "polymorphic_variant_pattern", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "type_constructor_path", + "named": true + } + ] + } + }, + { + "type": "polymorphic_variant_type", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "_type", + "named": true + }, + { + "type": "tag", + "named": true + }, + { + "type": "tag_specification", + "named": true + } + ] + } + }, + { + "type": "prefix_expression", + "named": true, + "fields": { + "operator": { + "multiple": false, + "required": true, + "types": [ + { + "type": "prefix_operator", + "named": true + } + ] + }, + "right": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_simple_expression", + "named": true + } + ] + } + } + }, + { + "type": "product_expression", + "named": true, + "fields": { + "left": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_expression", + "named": true + } + ] + }, + "right": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_expression", + "named": true + } + ] + } + } + }, + { + "type": "quoted_extension", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "attribute_id", + "named": true + }, + { + "type": "quoted_string_content", + "named": true + } + ] + } + }, + { + "type": "quoted_item_extension", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "attribute_id", + "named": true + }, + { + "type": "item_attribute", + "named": true + }, + { + "type": "quoted_string_content", + "named": true + } + ] + } + }, + { + "type": "quoted_string", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": false, + "types": [ + { + "type": "quoted_string_content", + "named": true + } + ] + } + }, + { + "type": "quoted_string_content", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "conversion_specification", + "named": true + }, + { + "type": "pretty_printing_indication", + "named": true + } + ] + } + }, + { + "type": "range_pattern", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_signed_constant", + "named": true + } + ] + } + }, + { + "type": "record_binding_pattern", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "field_pattern", + "named": true + } + ] + } + }, + { + "type": "record_declaration", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "field_declaration", + "named": true + } + ] + } + }, + { + "type": "record_expression", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_simple_expression", + "named": true + }, + { + "type": "field_expression", + "named": true + } + ] + } + }, + { + "type": "record_pattern", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "field_pattern", + "named": true + } + ] + } + }, + { + "type": "refutation_case", + "named": true, + "fields": {} + }, + { + "type": "sequence_expression", + "named": true, + "fields": { + "left": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_expression", + "named": true + } + ] + }, + "right": { + "multiple": false, + "required": false, + "types": [ + { + "type": "_sequence_expression", + "named": true + } + ] + } + }, + "children": { + "multiple": false, + "required": false, + "types": [ + { + "type": "attribute_id", + "named": true + } + ] + } + }, + { + "type": "set_expression", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_expression", + "named": true + } + ] + } + }, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "array_get_expression", + "named": true + }, + { + "type": "bigarray_get_expression", + "named": true + }, + { + "type": "field_get_expression", + "named": true + }, + { + "type": "instance_variable_name", + "named": true + }, + { + "type": "string_get_expression", + "named": true + } + ] + } + }, + { + "type": "sign_expression", + "named": true, + "fields": { + "operator": { + "multiple": false, + "required": true, + "types": [ + { + "type": "sign_operator", + "named": true + } + ] + }, + "right": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_expression", + "named": true + } + ] + } + } + }, + { + "type": "sign_operator", + "named": true, + "fields": {} + }, + { + "type": "signature", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "_signature_item", + "named": true + } + ] + } + }, + { + "type": "signed_number", + "named": true, + "fields": {} + }, + { + "type": "string", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": false, + "types": [ + { + "type": "string_content", + "named": true + } + ] + } + }, + { + "type": "string_content", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "conversion_specification", + "named": true + }, + { + "type": "escape_sequence", + "named": true + }, + { + "type": "pretty_printing_indication", + "named": true + } + ] + } + }, + { + "type": "string_get_expression", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_sequence_expression", + "named": true + }, + { + "type": "_simple_expression", + "named": true + }, + { + "type": "indexing_operator_path", + "named": true + } + ] + } + }, + { + "type": "structure", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "_structure_item", + "named": true + }, + { + "type": "expression_item", + "named": true + }, + { + "type": "toplevel_directive", + "named": true + } + ] + } + }, + { + "type": "tag", + "named": true, + "fields": {} + }, + { + "type": "tag_pattern", + "named": true, + "fields": { + "pattern": { + "multiple": false, + "required": false, + "types": [ + { + "type": "_binding_pattern", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_pattern", + "named": true + }, + { + "type": "tag", + "named": true + } + ] + } + }, + { + "type": "tag_specification", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_type", + "named": true + }, + { + "type": "tag", + "named": true + } + ] + } + }, + { + "type": "then_clause", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_expression", + "named": true + } + ] + } + }, + { + "type": "toplevel_directive", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_constant", + "named": true + }, + { + "type": "directive", + "named": true + }, + { + "type": "module_path", + "named": true + }, + { + "type": "value_path", + "named": true + } + ] + } + }, + { + "type": "try_expression", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_sequence_expression", + "named": true + }, + { + "type": "attribute_id", + "named": true + }, + { + "type": "match_case", + "named": true + } + ] + } + }, + { + "type": "tuple_pattern", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_binding_pattern", + "named": true + }, + { + "type": "_pattern", + "named": true + } + ] + } + }, + { + "type": "tuple_type", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_tuple_type", + "named": true + } + ] + } + }, + { + "type": "type_binding", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": false, + "types": [ + { + "type": "..", + "named": false + }, + { + "type": "record_declaration", + "named": true + }, + { + "type": "variant_declaration", + "named": true + } + ] + }, + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "type_constructor", + "named": true + }, + { + "type": "type_constructor_path", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "_type", + "named": true + }, + { + "type": "item_attribute", + "named": true + }, + { + "type": "type_constraint", + "named": true + }, + { + "type": "type_variable", + "named": true + } + ] + } + }, + { + "type": "type_constraint", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_type", + "named": true + } + ] + } + }, + { + "type": "type_constructor_path", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "extended_module_path", + "named": true + }, + { + "type": "type_constructor", + "named": true + } + ] + } + }, + { + "type": "type_definition", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "attribute_id", + "named": true + }, + { + "type": "type_binding", + "named": true + } + ] + } + }, + { + "type": "type_parameter_constraint", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_type", + "named": true + }, + { + "type": "item_attribute", + "named": true + } + ] + } + }, + { + "type": "type_variable", + "named": true, + "fields": {} + }, + { + "type": "typed_class_expression", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_class_expression", + "named": true + }, + { + "type": "_class_type", + "named": true + } + ] + } + }, + { + "type": "typed_expression", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_sequence_expression", + "named": true + }, + { + "type": "_type", + "named": true + } + ] + } + }, + { + "type": "typed_label", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_type", + "named": true + }, + { + "type": "label_name", + "named": true + } + ] + } + }, + { + "type": "typed_module_expression", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_module_expression", + "named": true + }, + { + "type": "_module_type", + "named": true + } + ] + } + }, + { + "type": "typed_pattern", + "named": true, + "fields": { + "pattern": { + "multiple": false, + "required": false, + "types": [ + { + "type": "_binding_pattern", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_pattern", + "named": true + }, + { + "type": "_type", + "named": true + } + ] + } + }, + { + "type": "unit", + "named": true, + "fields": {} + }, + { + "type": "value_definition", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "attribute_id", + "named": true + }, + { + "type": "let_and_operator", + "named": true + }, + { + "type": "let_binding", + "named": true + }, + { + "type": "let_operator", + "named": true + } + ] + } + }, + { + "type": "value_path", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "module_path", + "named": true + }, + { + "type": "parenthesized_operator", + "named": true + }, + { + "type": "value_name", + "named": true + } + ] + } + }, + { + "type": "value_specification", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_polymorphic_type", + "named": true + }, + { + "type": "attribute_id", + "named": true + }, + { + "type": "item_attribute", + "named": true + }, + { + "type": "parenthesized_operator", + "named": true + }, + { + "type": "value_name", + "named": true + } + ] + } + }, + { + "type": "variant_declaration", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "constructor_declaration", + "named": true + } + ] + } + }, + { + "type": "while_expression", + "named": true, + "fields": { + "condition": { + "multiple": false, + "required": true, + "types": [ + { + "type": "_sequence_expression", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "attribute_id", + "named": true + }, + { + "type": "do_clause", + "named": true + } + ] + } + }, + { + "type": "!", + "named": false + }, + { + "type": "\"", + "named": false + }, + { + "type": "#", + "named": false + }, + { + "type": "%", + "named": false + }, + { + "type": "&", + "named": false + }, + { + "type": "'", + "named": false + }, + { + "type": "(", + "named": false + }, + { + "type": ")", + "named": false + }, + { + "type": "*", + "named": false + }, + { + "type": "+", + "named": false + }, + { + "type": "+=", + "named": false + }, + { + "type": ",", + "named": false + }, + { + "type": "-", + "named": false + }, + { + "type": "->", + "named": false + }, + { + "type": ".", + "named": false + }, + { + "type": "..", + "named": false + }, + { + "type": ":", + "named": false + }, + { + "type": "::", + "named": false + }, + { + "type": ":=", + "named": false + }, + { + "type": ":>", + "named": false + }, + { + "type": ";", + "named": false + }, + { + "type": ";;", + "named": false + }, + { + "type": "<", + "named": false + }, + { + "type": "<-", + "named": false + }, + { + "type": "=", + "named": false + }, + { + "type": ">", + "named": false + }, + { + "type": ">}", + "named": false + }, + { + "type": "?", + "named": false + }, + { + "type": "[", + "named": false + }, + { + "type": "[%", + "named": false + }, + { + "type": "[%%", + "named": false + }, + { + "type": "[<", + "named": false + }, + { + "type": "[>", + "named": false + }, + { + "type": "[@", + "named": false + }, + { + "type": "[@@", + "named": false + }, + { + "type": "[@@@", + "named": false + }, + { + "type": "[|", + "named": false + }, + { + "type": "]", + "named": false + }, + { + "type": "_", + "named": false + }, + { + "type": "and", + "named": false + }, + { + "type": "and_operator", + "named": true + }, + { + "type": "as", + "named": false + }, + { + "type": "assert", + "named": false + }, + { + "type": "assign_operator", + "named": true + }, + { + "type": "begin", + "named": false + }, + { + "type": "class", + "named": false + }, + { + "type": "class_name", + "named": true + }, + { + "type": "class_type_name", + "named": true + }, + { + "type": "comment", + "named": true + }, + { + "type": "concat_operator", + "named": true + }, + { + "type": "constraint", + "named": false + }, + { + "type": "constructor_name", + "named": true + }, + { + "type": "conversion_specification", + "named": true + }, + { + "type": "do", + "named": false + }, + { + "type": "done", + "named": false + }, + { + "type": "downto", + "named": false + }, + { + "type": "effect", + "named": false + }, + { + "type": "else", + "named": false + }, + { + "type": "end", + "named": false + }, + { + "type": "exception", + "named": false + }, + { + "type": "external", + "named": false + }, + { + "type": "false", + "named": false + }, + { + "type": "field_name", + "named": true + }, + { + "type": "for", + "named": false + }, + { + "type": "fun", + "named": false + }, + { + "type": "function", + "named": false + }, + { + "type": "functor", + "named": false + }, + { + "type": "hash_operator", + "named": true + }, + { + "type": "if", + "named": false + }, + { + "type": "in", + "named": false + }, + { + "type": "include", + "named": false + }, + { + "type": "indexing_operator", + "named": true + }, + { + "type": "inherit", + "named": false + }, + { + "type": "initializer", + "named": false + }, + { + "type": "instance_variable_name", + "named": true + }, + { + "type": "label_name", + "named": true + }, + { + "type": "lazy", + "named": false + }, + { + "type": "let", + "named": false + }, + { + "type": "let_and_operator", + "named": true + }, + { + "type": "let_operator", + "named": true + }, + { + "type": "line_number_directive", + "named": true + }, + { + "type": "match", + "named": false + }, + { + "type": "match_operator", + "named": true + }, + { + "type": "method", + "named": false + }, + { + "type": "method_name", + "named": true + }, + { + "type": "module", + "named": false + }, + { + "type": "module_name", + "named": true + }, + { + "type": "module_type_name", + "named": true + }, + { + "type": "mult_operator", + "named": true + }, + { + "type": "mutable", + "named": false + }, + { + "type": "new", + "named": false + }, + { + "type": "nonrec", + "named": false + }, + { + "type": "object", + "named": false + }, + { + "type": "ocamlyacc_value", + "named": true + }, + { + "type": "of", + "named": false + }, + { + "type": "open", + "named": false + }, + { + "type": "or_operator", + "named": true + }, + { + "type": "pow_operator", + "named": true + }, + { + "type": "prefix_operator", + "named": true + }, + { + "type": "pretty_printing_indication", + "named": true + }, + { + "type": "private", + "named": false + }, + { + "type": "rec", + "named": false + }, + { + "type": "rel_operator", + "named": true + }, + { + "type": "sig", + "named": false + }, + { + "type": "struct", + "named": false + }, + { + "type": "then", + "named": false + }, + { + "type": "to", + "named": false + }, + { + "type": "true", + "named": false + }, + { + "type": "try", + "named": false + }, + { + "type": "type", + "named": false + }, + { + "type": "type_constructor", + "named": true + }, + { + "type": "val", + "named": false + }, + { + "type": "value_name", + "named": true + }, + { + "type": "value_pattern", + "named": true + }, + { + "type": "virtual", + "named": false + }, + { + "type": "when", + "named": false + }, + { + "type": "while", + "named": false + }, + { + "type": "with", + "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 + } +] \ No newline at end of file diff --git a/build/sources.ini b/build/sources.ini index b450f22..5193da4 100644 --- a/build/sources.ini +++ b/build/sources.ini @@ -29,10 +29,6 @@ grammar = https://raw.githubusercontent.com/tree-sitter/tree-sitter-go/v0.20.0/s nodes = https://raw.githubusercontent.com/tree-sitter/tree-sitter-python/v0.20.4/src/node-types.json grammar = https://raw.githubusercontent.com/tree-sitter/tree-sitter-python/v0.20.4/src/grammar.json -[c] -nodes = https://raw.githubusercontent.com/tree-sitter/tree-sitter-c/master/src/node-types.json -grammar = https://raw.githubusercontent.com/tree-sitter/tree-sitter-c/master/src/grammar.json - [html] nodes = https://raw.githubusercontent.com/tree-sitter/tree-sitter-html/v0.20.1/src/node-types.json grammar = https://raw.githubusercontent.com/tree-sitter/tree-sitter-html/v0.20.1/src/grammar.json @@ -44,3 +40,11 @@ grammar = https://raw.githubusercontent.com/tree-sitter/tree-sitter-toml/v0.5.1/ [json] nodes = https://raw.githubusercontent.com/tree-sitter/tree-sitter-json/v0.20.2/src/node-types.json grammar = https://raw.githubusercontent.com/tree-sitter/tree-sitter-json/v0.20.2/src/grammar.json + +[ocaml] +nodes = https://raw.githubusercontent.com/tree-sitter/tree-sitter-ocaml/v0.24.0/grammars/ocaml/src/node-types.json +grammar = https://raw.githubusercontent.com/tree-sitter/tree-sitter-ocaml/v0.24.0/grammars/ocaml/src/grammar.json + +[ocaml_interface] +nodes = https://raw.githubusercontent.com/tree-sitter/tree-sitter-ocaml/v0.24.0/grammars/interface/src/node-types.json +grammar = https://raw.githubusercontent.com/tree-sitter/tree-sitter-ocaml/v0.24.0/grammars/interface/src/grammar.json From c91d790d25ea50d2493b247b4cf1f0fd62d6b3a0 Mon Sep 17 00:00:00 2001 From: xvw Date: Wed, 25 Mar 2026 07:55:48 +0100 Subject: [PATCH 03/24] Update `Dockerfile` Co-authored-by: Tim McGilchrist Co-authored-by: PizieDust --- Dockerfile | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/Dockerfile b/Dockerfile index 86e0168..ea228d3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,13 @@ -FROM ubuntu:24.04 as base +FROM ubuntu:24.04 AS base -ENV VERSION=29.1 # We assume the git repo's cloned outside and copied in, instead of # cloning it in here. But that works, too. WORKDIR /opt/emacs -LABEL MAINTAINER "Mickey Petersen at mastering emacs" +LABEL MAINTAINER="Mickey Petersen at mastering emacs" ENV DEBIAN_FRONTEND=noninteractive -RUN sed -i 's/# deb-src/deb-src/' /etc/apt/sources.list \ +RUN sed -i 's/^Types: deb$/Types: deb deb-src/' /etc/apt/sources.list.d/ubuntu.sources \ && apt-get update \ && apt-get build-dep -y emacs @@ -26,25 +25,8 @@ RUN apt-get update \ git \ libtree-sitter-dev \ libtree-sitter0 \ - tree-sitter-cli - -# Download and extract Emacs -RUN wget https://ftp.gnu.org/gnu/emacs/emacs-$VERSION.tar.gz \ - && tar -xf emacs-$VERSION.tar.gz \ - && rm emacs-$VERSION.tar.gz - -WORKDIR /opt/emacs/emacs-$VERSION/ - -# Configure and run -RUN ./autogen.sh \ - && ./configure \ - --with-tree-sitter - -ENV JOBS=4 -RUN make -j ${JOBS} \ - && make install \ - && cd \ - && rm -rf /opt/emacs/emacs-$VERSION/ + tree-sitter-cli \ + emacs WORKDIR /opt From c61cd6c89eebdb1ed9bac28a0b3adc20a83da347 Mon Sep 17 00:00:00 2001 From: xvw Date: Wed, 25 Mar 2026 08:02:27 +0100 Subject: [PATCH 04/24] Regenerate `rules` file Co-authored-by: Tim McGilchrist Co-authored-by: PizieDust --- combobulate-rules.el | 2774 ++++++++++++++++++++++++++---------------- 1 file changed, 1713 insertions(+), 1061 deletions(-) diff --git a/combobulate-rules.el b/combobulate-rules.el index c15958c..f109398 100644 --- a/combobulate-rules.el +++ b/combobulate-rules.el @@ -10,7 +10,7 @@ ("anchor_name" (:*unnamed* nil)) ("block_mapping" (:*unnamed* ("block_mapping_pair"))) ("block_mapping_pair" (:*unnamed* nil :key ("flow_node" "block_node") :value ("flow_node" "block_node"))) - ("block_node" (:*unnamed* ("block_sequence" "tag" "block_mapping" "anchor" "block_scalar"))) + ("block_node" (:*unnamed* ("block_mapping" "block_scalar" "anchor" "block_sequence" "tag"))) ("block_scalar" (:*unnamed* nil)) ("block_sequence" (:*unnamed* ("block_sequence_item"))) ("block_sequence_item" (:*unnamed* ("flow_node" "block_node"))) @@ -18,23 +18,23 @@ ("comment" (:*unnamed* nil)) ("directive_name" (:*unnamed* nil)) ("directive_parameter" (:*unnamed* nil)) - ("document" (:*unnamed* ("flow_node" "tag_directive" "yaml_directive" "reserved_directive" "block_node"))) + ("document" (:*unnamed* ("flow_node" "yaml_directive" "block_node" "reserved_directive" "tag_directive"))) ("double_quote_scalar" (:*unnamed* ("escape_sequence"))) ("escape_sequence" (:*unnamed* nil)) ("float_scalar" (:*unnamed* nil)) ("flow_mapping" (:*unnamed* ("flow_node" "flow_pair"))) - ("flow_node" (:*unnamed* ("tag" "anchor" "alias" "flow_sequence" "plain_scalar" "flow_mapping" "single_quote_scalar" "double_quote_scalar"))) + ("flow_node" (:*unnamed* ("flow_sequence" "alias" "anchor" "plain_scalar" "flow_mapping" "single_quote_scalar" "double_quote_scalar" "tag"))) ("flow_pair" (:*unnamed* nil :key ("flow_node") :value ("flow_node"))) ("flow_sequence" (:*unnamed* ("flow_node" "flow_pair"))) ("integer_scalar" (:*unnamed* nil)) ("null_scalar" (:*unnamed* nil)) - ("plain_scalar" (:*unnamed* ("integer_scalar" "boolean_scalar" "string_scalar" "null_scalar" "float_scalar"))) + ("plain_scalar" (:*unnamed* ("float_scalar" "boolean_scalar" "null_scalar" "integer_scalar" "string_scalar"))) ("reserved_directive" (:*unnamed* ("directive_name" "directive_parameter"))) ("single_quote_scalar" (:*unnamed* ("escape_sequence"))) ("stream" (:*unnamed* ("document"))) ("string_scalar" (:*unnamed* nil)) ("tag" (:*unnamed* nil)) - ("tag_directive" (:*unnamed* ("tag_handle" "tag_prefix"))) + ("tag_directive" (:*unnamed* ("tag_prefix" "tag_handle"))) ("tag_handle" (:*unnamed* nil)) ("tag_prefix" (:*unnamed* nil)) ("yaml_directive" (:*unnamed* ("yaml_version"))) @@ -49,7 +49,7 @@ ("anchor_name" ("anchor")) ("block_mapping" ("block_node")) ("block_mapping_pair" ("block_mapping")) - ("block_node" ("block_sequence_item" "document" "block_mapping_pair")) + ("block_node" ("block_mapping_pair" "block_sequence_item" "document")) ("block_scalar" ("block_node")) ("block_sequence" ("block_node")) ("block_sequence_item" ("block_sequence")) @@ -61,7 +61,7 @@ ("escape_sequence" ("single_quote_scalar" "double_quote_scalar")) ("float_scalar" ("plain_scalar")) ("flow_mapping" ("flow_node")) - ("flow_node" ("block_sequence_item" "document" "flow_sequence" "block_mapping_pair" "flow_pair" "flow_mapping")) + ("flow_node" ("block_mapping_pair" "block_sequence_item" "flow_sequence" "flow_pair" "flow_mapping" "document")) ("flow_pair" ("flow_mapping" "flow_sequence")) ("flow_sequence" ("flow_node")) ("integer_scalar" ("plain_scalar")) @@ -92,160 +92,160 @@ ;; START Production rules for tsx (defconst combobulate-rules-tsx - '(("_primary_type" (:*unnamed* ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "index_type_query" "nested_type_identifier" "predefined_type" "type_identifier" "object_type" "flow_maybe_type" "tuple_type"))) + '(("_primary_type" (:*unnamed* ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "this_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "template_literal_type" "type_query"))) ("abstract_class_declaration" (:*unnamed* ("class_heritage") :body ("class_body") :decorator ("decorator") :name ("type_identifier") :type_parameters ("type_parameters"))) - ("abstract_method_signature" (:*unnamed* ("accessibility_modifier") :name ("computed_property_name" "string" "property_identifier" "private_property_identifier" "number") :parameters ("formal_parameters") :return_type ("type_annotation" "asserts_annotation" "type_predicate_annotation") :type_parameters ("type_parameters"))) + ("abstract_method_signature" (:*unnamed* ("accessibility_modifier") :name ("string" "private_property_identifier" "computed_property_name" "number" "property_identifier") :parameters ("formal_parameters") :return_type ("type_predicate_annotation" "asserts_annotation" "type_annotation") :type_parameters ("type_parameters"))) ("accessibility_modifier" (:*unnamed* nil)) - ("ambient_declaration" (:*unnamed* ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "property_identifier" "array_type" "intersection_type" "declaration" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "statement_block" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "tuple_type" "readonly_type"))) + ("ambient_declaration" (:*unnamed* ("predefined_type" "object_type" "union_type" "property_identifier" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "statement_block" "template_literal_type" "readonly_type" "declaration" "type_query"))) ("arguments" (:*unnamed* ("spread_element" "expression"))) ("array" (:*unnamed* ("spread_element" "expression"))) - ("array_pattern" (:*unnamed* ("assignment_pattern" "pattern"))) - ("array_type" (:*unnamed* ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "index_type_query" "nested_type_identifier" "predefined_type" "type_identifier" "object_type" "flow_maybe_type" "tuple_type"))) - ("arrow_function" (:*unnamed* nil :body ("expression" "statement_block") :parameter ("identifier") :parameters ("formal_parameters") :return_type ("type_annotation" "asserts_annotation" "type_predicate_annotation") :type_parameters ("type_parameters"))) - ("as_expression" (:*unnamed* ("union_type" "expression" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "tuple_type" "readonly_type"))) - ("asserts" (:*unnamed* ("this" "type_predicate" "identifier"))) + ("array_pattern" (:*unnamed* ("pattern" "assignment_pattern"))) + ("array_type" (:*unnamed* ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "this_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "template_literal_type" "type_query"))) + ("arrow_function" (:*unnamed* nil :body ("statement_block" "expression") :parameter ("identifier") :parameters ("formal_parameters") :return_type ("type_predicate_annotation" "asserts_annotation" "type_annotation") :type_parameters ("type_parameters"))) + ("as_expression" (:*unnamed* ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "expression" "type_query"))) + ("asserts" (:*unnamed* ("identifier" "this" "type_predicate"))) ("asserts_annotation" (:*unnamed* ("asserts"))) - ("assignment_expression" (:*unnamed* nil :left ("object_pattern" "subscript_expression" "member_expression" "identifier" "parenthesized_expression" "non_null_expression" "undefined" "array_pattern") :right ("expression"))) + ("assignment_expression" (:*unnamed* nil :left ("identifier" "object_pattern" "member_expression" "undefined" "non_null_expression" "array_pattern" "subscript_expression" "parenthesized_expression") :right ("expression"))) ("assignment_pattern" (:*unnamed* nil :left ("pattern") :right ("expression"))) - ("augmented_assignment_expression" (:*unnamed* nil :left ("parenthesized_expression" "non_null_expression" "subscript_expression" "identifier" "member_expression") :operator nil :right ("expression"))) + ("augmented_assignment_expression" (:*unnamed* nil :left ("identifier" "subscript_expression" "member_expression" "parenthesized_expression" "non_null_expression") :operator nil :right ("expression"))) ("await_expression" (:*unnamed* ("expression"))) ("binary_expression" (:*unnamed* nil :left ("expression") :operator nil :right ("expression"))) ("break_statement" (:*unnamed* nil :label ("statement_identifier"))) - ("call_expression" (:*unnamed* nil :arguments ("template_string" "arguments") :function ("expression") :type_arguments ("type_arguments"))) - ("call_signature" (:*unnamed* nil :parameters ("formal_parameters") :return_type ("type_annotation" "asserts_annotation" "type_predicate_annotation") :type_parameters ("type_parameters"))) - ("catch_clause" (:*unnamed* nil :body ("statement_block") :parameter ("array_pattern" "object_pattern" "identifier") :type ("type_annotation"))) + ("call_expression" (:*unnamed* nil :arguments ("arguments" "template_string") :function ("expression") :type_arguments ("type_arguments"))) + ("call_signature" (:*unnamed* nil :parameters ("formal_parameters") :return_type ("type_predicate_annotation" "asserts_annotation" "type_annotation") :type_parameters ("type_parameters"))) + ("catch_clause" (:*unnamed* nil :body ("statement_block") :parameter ("identifier" "object_pattern" "array_pattern") :type ("type_annotation"))) ("class" (:*unnamed* ("class_heritage") :body ("class_body") :decorator ("decorator") :name ("type_identifier") :type_parameters ("type_parameters"))) - ("class_body" (:*unnamed* ("index_signature" "method_signature" "decorator" "class_static_block" "public_field_definition" "method_definition" "abstract_method_signature"))) + ("class_body" (:*unnamed* ("decorator" "abstract_method_signature" "class_static_block" "public_field_definition" "index_signature" "method_signature" "method_definition"))) ("class_declaration" (:*unnamed* ("class_heritage") :body ("class_body") :decorator ("decorator") :name ("type_identifier") :type_parameters ("type_parameters"))) - ("class_heritage" (:*unnamed* ("implements_clause" "extends_clause"))) + ("class_heritage" (:*unnamed* ("extends_clause" "implements_clause"))) ("class_static_block" (:*unnamed* nil :body ("statement_block"))) ("comment" (:*unnamed* nil)) ("computed_property_name" (:*unnamed* ("expression"))) - ("conditional_type" (:*unnamed* nil :alternative ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "tuple_type" "readonly_type") :consequence ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "tuple_type" "readonly_type") :left ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "tuple_type" "readonly_type") :right ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "tuple_type" "readonly_type"))) - ("constraint" (:*unnamed* ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "tuple_type" "readonly_type"))) + ("conditional_type" (:*unnamed* nil :alternative ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "type_query") :consequence ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "type_query") :left ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "type_query") :right ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "type_query"))) + ("constraint" (:*unnamed* ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "type_query"))) ("construct_signature" (:*unnamed* nil :parameters ("formal_parameters") :type ("type_annotation") :type_parameters ("type_parameters"))) - ("constructor_type" (:*unnamed* nil :parameters ("formal_parameters") :type ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "tuple_type" "readonly_type") :type_parameters ("type_parameters"))) + ("constructor_type" (:*unnamed* nil :parameters ("formal_parameters") :type ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "type_query") :type_parameters ("type_parameters"))) ("continue_statement" (:*unnamed* nil :label ("statement_identifier"))) ("debugger_statement" (:*unnamed* nil)) - ("declaration" (:*unnamed* ("generator_function_declaration" "interface_declaration" "abstract_class_declaration" "function_declaration" "internal_module" "ambient_declaration" "enum_declaration" "module" "function_signature" "type_alias_declaration" "class_declaration" "import_alias" "variable_declaration" "lexical_declaration"))) - ("decorator" (:*unnamed* ("member_expression" "identifier" "call_expression"))) - ("default_type" (:*unnamed* ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "tuple_type" "readonly_type"))) + ("declaration" (:*unnamed* ("lexical_declaration" "type_alias_declaration" "variable_declaration" "interface_declaration" "internal_module" "enum_declaration" "import_alias" "function_declaration" "function_signature" "ambient_declaration" "generator_function_declaration" "class_declaration" "abstract_class_declaration" "module"))) + ("decorator" (:*unnamed* ("identifier" "member_expression" "call_expression"))) + ("default_type" (:*unnamed* ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "type_query"))) ("do_statement" (:*unnamed* nil :body ("statement") :condition ("parenthesized_expression"))) ("else_clause" (:*unnamed* ("statement"))) ("empty_statement" (:*unnamed* nil)) - ("enum_assignment" (:*unnamed* nil :name ("computed_property_name" "string" "property_identifier" "private_property_identifier" "number") :value ("expression"))) - ("enum_body" (:*unnamed* ("enum_assignment") :name ("computed_property_name" "string" "property_identifier" "private_property_identifier" "number"))) + ("enum_assignment" (:*unnamed* nil :name ("string" "private_property_identifier" "computed_property_name" "number" "property_identifier") :value ("expression"))) + ("enum_body" (:*unnamed* ("enum_assignment") :name ("string" "private_property_identifier" "computed_property_name" "number" "property_identifier"))) ("enum_declaration" (:*unnamed* nil :body ("enum_body") :name ("identifier"))) ("escape_sequence" (:*unnamed* nil)) ("existential_type" (:*unnamed* nil)) ("export_clause" (:*unnamed* ("export_specifier"))) ("export_specifier" (:*unnamed* nil :alias ("string" "identifier") :name ("string" "identifier"))) - ("export_statement" (:*unnamed* ("namespace_export" "expression" "identifier" "export_clause") :declaration ("declaration") :decorator ("decorator") :source ("string") :value ("expression"))) - ("expression" (:*unnamed* ("yield_expression" "primary_expression" "await_expression" "update_expression" "glimmer_template" "ternary_expression" "unary_expression" "instantiation_expression" "assignment_expression" "as_expression" "augmented_assignment_expression" "internal_module" "jsx_element" "binary_expression" "new_expression" "jsx_self_closing_element" "satisfies_expression"))) + ("export_statement" (:*unnamed* ("namespace_export" "identifier" "export_clause" "expression") :declaration ("declaration") :decorator ("decorator") :source ("string") :value ("expression"))) + ("expression" (:*unnamed* ("unary_expression" "assignment_expression" "jsx_element" "glimmer_template" "binary_expression" "new_expression" "update_expression" "await_expression" "instantiation_expression" "augmented_assignment_expression" "internal_module" "ternary_expression" "primary_expression" "jsx_self_closing_element" "as_expression" "yield_expression" "satisfies_expression"))) ("expression_statement" (:*unnamed* ("sequence_expression" "expression"))) ("extends_clause" (:*unnamed* nil :type_arguments ("type_arguments") :value ("expression"))) - ("extends_type_clause" (:*unnamed* nil :type ("type_identifier" "generic_type" "nested_type_identifier"))) + ("extends_type_clause" (:*unnamed* nil :type ("generic_type" "nested_type_identifier" "type_identifier"))) ("false" (:*unnamed* nil)) ("finally_clause" (:*unnamed* nil :body ("statement_block"))) - ("flow_maybe_type" (:*unnamed* ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "index_type_query" "nested_type_identifier" "predefined_type" "type_identifier" "object_type" "flow_maybe_type" "tuple_type"))) - ("for_in_statement" (:*unnamed* nil :body ("statement") :kind nil :left ("object_pattern" "subscript_expression" "member_expression" "identifier" "parenthesized_expression" "non_null_expression" "undefined" "array_pattern") :operator nil :right ("sequence_expression" "expression") :value ("expression"))) - ("for_statement" (:*unnamed* nil :body ("statement") :condition ("expression_statement" "empty_statement") :increment ("sequence_expression" "expression") :initializer ("lexical_declaration" "expression_statement" "empty_statement" "variable_declaration"))) - ("formal_parameters" (:*unnamed* ("optional_parameter" "required_parameter"))) - ("function" (:*unnamed* nil :body ("statement_block") :name ("identifier") :parameters ("formal_parameters") :return_type ("type_annotation" "asserts_annotation" "type_predicate_annotation") :type_parameters ("type_parameters"))) - ("function_declaration" (:*unnamed* nil :body ("statement_block") :name ("identifier") :parameters ("formal_parameters") :return_type ("type_annotation" "asserts_annotation" "type_predicate_annotation") :type_parameters ("type_parameters"))) - ("function_signature" (:*unnamed* nil :name ("identifier") :parameters ("formal_parameters") :return_type ("type_annotation" "asserts_annotation" "type_predicate_annotation") :type_parameters ("type_parameters"))) - ("function_type" (:*unnamed* nil :parameters ("formal_parameters") :return_type ("union_type" "asserts" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "type_predicate" "object_type" "flow_maybe_type" "tuple_type" "readonly_type") :type_parameters ("type_parameters"))) - ("generator_function" (:*unnamed* nil :body ("statement_block") :name ("identifier") :parameters ("formal_parameters") :return_type ("type_annotation" "asserts_annotation" "type_predicate_annotation") :type_parameters ("type_parameters"))) - ("generator_function_declaration" (:*unnamed* nil :body ("statement_block") :name ("identifier") :parameters ("formal_parameters") :return_type ("type_annotation" "asserts_annotation" "type_predicate_annotation") :type_parameters ("type_parameters"))) - ("generic_type" (:*unnamed* nil :name ("type_identifier" "nested_type_identifier") :type_arguments ("type_arguments"))) + ("flow_maybe_type" (:*unnamed* ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "this_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "template_literal_type" "type_query"))) + ("for_in_statement" (:*unnamed* nil :body ("statement") :kind nil :left ("identifier" "object_pattern" "member_expression" "undefined" "non_null_expression" "array_pattern" "subscript_expression" "parenthesized_expression") :operator nil :right ("sequence_expression" "expression") :value ("expression"))) + ("for_statement" (:*unnamed* nil :body ("statement") :condition ("empty_statement" "expression_statement") :increment ("sequence_expression" "expression") :initializer ("lexical_declaration" "empty_statement" "variable_declaration" "expression_statement"))) + ("formal_parameters" (:*unnamed* ("required_parameter" "optional_parameter"))) + ("function" (:*unnamed* nil :body ("statement_block") :name ("identifier") :parameters ("formal_parameters") :return_type ("type_predicate_annotation" "asserts_annotation" "type_annotation") :type_parameters ("type_parameters"))) + ("function_declaration" (:*unnamed* nil :body ("statement_block") :name ("identifier") :parameters ("formal_parameters") :return_type ("type_predicate_annotation" "asserts_annotation" "type_annotation") :type_parameters ("type_parameters"))) + ("function_signature" (:*unnamed* nil :name ("identifier") :parameters ("formal_parameters") :return_type ("type_predicate_annotation" "asserts_annotation" "type_annotation") :type_parameters ("type_parameters"))) + ("function_type" (:*unnamed* nil :parameters ("formal_parameters") :return_type ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "type_predicate" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "asserts" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "type_query") :type_parameters ("type_parameters"))) + ("generator_function" (:*unnamed* nil :body ("statement_block") :name ("identifier") :parameters ("formal_parameters") :return_type ("type_predicate_annotation" "asserts_annotation" "type_annotation") :type_parameters ("type_parameters"))) + ("generator_function_declaration" (:*unnamed* nil :body ("statement_block") :name ("identifier") :parameters ("formal_parameters") :return_type ("type_predicate_annotation" "asserts_annotation" "type_annotation") :type_parameters ("type_parameters"))) + ("generic_type" (:*unnamed* nil :name ("nested_type_identifier" "type_identifier") :type_arguments ("type_arguments"))) ("glimmer_closing_tag" (:*unnamed* nil)) ("glimmer_opening_tag" (:*unnamed* nil)) ("glimmer_template" (:*unnamed* nil :close_tag ("glimmer_closing_tag") :open_tag ("glimmer_opening_tag"))) ("hash_bang_line" (:*unnamed* nil)) ("identifier" (:*unnamed* nil)) ("if_statement" (:*unnamed* nil :alternative ("else_clause") :condition ("parenthesized_expression") :consequence ("statement"))) - ("implements_clause" (:*unnamed* ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "tuple_type" "readonly_type"))) + ("implements_clause" (:*unnamed* ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "type_query"))) ("import" (:*unnamed* nil)) ("import_alias" (:*unnamed* ("nested_identifier" "identifier"))) - ("import_clause" (:*unnamed* ("namespace_import" "named_imports" "identifier"))) + ("import_clause" (:*unnamed* ("identifier" "namespace_import" "named_imports"))) ("import_require_clause" (:*unnamed* ("identifier") :source ("string"))) ("import_specifier" (:*unnamed* nil :alias ("identifier") :name ("string" "identifier"))) ("import_statement" (:*unnamed* ("import_clause" "import_require_clause") :source ("string"))) - ("index_signature" (:*unnamed* ("mapped_type_clause") :index_type ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "tuple_type" "readonly_type") :name ("identifier") :sign nil :type ("type_annotation" "opting_type_annotation" "omitting_type_annotation"))) - ("index_type_query" (:*unnamed* ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "index_type_query" "nested_type_identifier" "predefined_type" "type_identifier" "object_type" "flow_maybe_type" "tuple_type"))) - ("infer_type" (:*unnamed* ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "tuple_type" "readonly_type"))) - ("instantiation_expression" (:*unnamed* ("expression") :function ("import" "member_expression" "subscript_expression" "identifier") :type_arguments ("type_arguments"))) + ("index_signature" (:*unnamed* ("mapped_type_clause") :index_type ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "type_query") :name ("identifier") :sign nil :type ("opting_type_annotation" "omitting_type_annotation" "type_annotation"))) + ("index_type_query" (:*unnamed* ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "this_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "template_literal_type" "type_query"))) + ("infer_type" (:*unnamed* ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "type_query"))) + ("instantiation_expression" (:*unnamed* ("expression") :function ("identifier" "subscript_expression" "member_expression" "import") :type_arguments ("type_arguments"))) ("interface_declaration" (:*unnamed* ("extends_type_clause") :body ("object_type") :name ("type_identifier") :type_parameters ("type_parameters"))) - ("internal_module" (:*unnamed* nil :body ("statement_block") :name ("string" "nested_identifier" "identifier"))) - ("intersection_type" (:*unnamed* ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "tuple_type" "readonly_type"))) - ("jsx_attribute" (:*unnamed* ("jsx_expression" "string" "jsx_namespace_name" "property_identifier" "jsx_self_closing_element" "jsx_element"))) - ("jsx_closing_element" (:*unnamed* nil :name ("member_expression" "jsx_namespace_name" "identifier"))) - ("jsx_element" (:*unnamed* ("jsx_text" "jsx_expression" "jsx_self_closing_element" "jsx_element") :close_tag ("jsx_closing_element") :open_tag ("jsx_opening_element"))) + ("internal_module" (:*unnamed* nil :body ("statement_block") :name ("nested_identifier" "string" "identifier"))) + ("intersection_type" (:*unnamed* ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "type_query"))) + ("jsx_attribute" (:*unnamed* ("string" "jsx_expression" "jsx_element" "property_identifier" "jsx_namespace_name" "jsx_self_closing_element"))) + ("jsx_closing_element" (:*unnamed* nil :name ("jsx_namespace_name" "identifier" "member_expression"))) + ("jsx_element" (:*unnamed* ("jsx_element" "jsx_text" "jsx_self_closing_element" "jsx_expression") :close_tag ("jsx_closing_element") :open_tag ("jsx_opening_element"))) ("jsx_expression" (:*unnamed* ("spread_element" "sequence_expression" "expression"))) ("jsx_namespace_name" (:*unnamed* ("identifier"))) - ("jsx_opening_element" (:*unnamed* nil :attribute ("jsx_expression" "jsx_attribute") :name ("member_expression" "jsx_namespace_name" "identifier") :type_arguments ("type_arguments"))) - ("jsx_self_closing_element" (:*unnamed* nil :attribute ("jsx_expression" "jsx_attribute") :name ("member_expression" "jsx_namespace_name" "identifier") :type_arguments ("type_arguments"))) + ("jsx_opening_element" (:*unnamed* nil :attribute ("jsx_attribute" "jsx_expression") :name ("jsx_namespace_name" "identifier" "member_expression") :type_arguments ("type_arguments"))) + ("jsx_self_closing_element" (:*unnamed* nil :attribute ("jsx_attribute" "jsx_expression") :name ("jsx_namespace_name" "identifier" "member_expression") :type_arguments ("type_arguments"))) ("jsx_text" (:*unnamed* nil)) ("labeled_statement" (:*unnamed* nil :body ("statement") :label ("statement_identifier"))) ("lexical_declaration" (:*unnamed* ("variable_declarator") :kind nil)) - ("literal_type" (:*unnamed* ("null" "true" "number" "string" "unary_expression" "undefined" "false"))) - ("lookup_type" (:*unnamed* ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "tuple_type" "readonly_type"))) - ("mapped_type_clause" (:*unnamed* nil :alias ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "tuple_type" "readonly_type") :name ("type_identifier") :type ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "tuple_type" "readonly_type"))) - ("member_expression" (:*unnamed* ("member_expression" "identifier" "property_identifier") :object ("expression") :optional_chain ("optional_chain") :property ("property_identifier" "private_property_identifier"))) + ("literal_type" (:*unnamed* ("string" "null" "unary_expression" "undefined" "true" "number" "false"))) + ("lookup_type" (:*unnamed* ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "type_query"))) + ("mapped_type_clause" (:*unnamed* nil :alias ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "type_query") :name ("type_identifier") :type ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "type_query"))) + ("member_expression" (:*unnamed* ("property_identifier" "identifier" "member_expression") :object ("expression") :optional_chain ("optional_chain") :property ("private_property_identifier" "property_identifier"))) ("meta_property" (:*unnamed* nil)) - ("method_definition" (:*unnamed* ("override_modifier" "accessibility_modifier") :body ("statement_block") :name ("computed_property_name" "string" "property_identifier" "private_property_identifier" "number") :parameters ("formal_parameters") :return_type ("type_annotation" "asserts_annotation" "type_predicate_annotation") :type_parameters ("type_parameters"))) - ("method_signature" (:*unnamed* ("override_modifier" "accessibility_modifier") :name ("computed_property_name" "string" "property_identifier" "private_property_identifier" "number") :parameters ("formal_parameters") :return_type ("type_annotation" "asserts_annotation" "type_predicate_annotation") :type_parameters ("type_parameters"))) - ("module" (:*unnamed* nil :body ("statement_block") :name ("string" "nested_identifier" "identifier"))) + ("method_definition" (:*unnamed* ("accessibility_modifier" "override_modifier") :body ("statement_block") :name ("string" "private_property_identifier" "computed_property_name" "number" "property_identifier") :parameters ("formal_parameters") :return_type ("type_predicate_annotation" "asserts_annotation" "type_annotation") :type_parameters ("type_parameters"))) + ("method_signature" (:*unnamed* ("accessibility_modifier" "override_modifier") :name ("string" "private_property_identifier" "computed_property_name" "number" "property_identifier") :parameters ("formal_parameters") :return_type ("type_predicate_annotation" "asserts_annotation" "type_annotation") :type_parameters ("type_parameters"))) + ("module" (:*unnamed* nil :body ("statement_block") :name ("nested_identifier" "string" "identifier"))) ("named_imports" (:*unnamed* ("import_specifier"))) ("namespace_export" (:*unnamed* ("string" "identifier"))) ("namespace_import" (:*unnamed* ("identifier"))) - ("nested_identifier" (:*unnamed* ("member_expression" "identifier" "property_identifier"))) + ("nested_identifier" (:*unnamed* ("property_identifier" "identifier" "member_expression"))) ("nested_type_identifier" (:*unnamed* nil :module ("nested_identifier" "identifier") :name ("type_identifier"))) ("new_expression" (:*unnamed* nil :arguments ("arguments") :constructor ("primary_expression") :type_arguments ("type_arguments"))) ("non_null_expression" (:*unnamed* ("expression"))) ("null" (:*unnamed* nil)) ("number" (:*unnamed* nil)) - ("object" (:*unnamed* ("pair" "spread_element" "method_definition" "shorthand_property_identifier"))) - ("object_assignment_pattern" (:*unnamed* nil :left ("shorthand_property_identifier_pattern" "array_pattern" "object_pattern") :right ("expression"))) - ("object_pattern" (:*unnamed* ("rest_pattern" "shorthand_property_identifier_pattern" "object_assignment_pattern" "pair_pattern"))) - ("object_type" (:*unnamed* ("call_signature" "index_signature" "method_signature" "export_statement" "construct_signature" "property_signature"))) - ("omitting_type_annotation" (:*unnamed* ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "tuple_type" "readonly_type"))) - ("opting_type_annotation" (:*unnamed* ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "tuple_type" "readonly_type"))) + ("object" (:*unnamed* ("pair" "spread_element" "shorthand_property_identifier" "method_definition"))) + ("object_assignment_pattern" (:*unnamed* nil :left ("shorthand_property_identifier_pattern" "object_pattern" "array_pattern") :right ("expression"))) + ("object_pattern" (:*unnamed* ("rest_pattern" "object_assignment_pattern" "shorthand_property_identifier_pattern" "pair_pattern"))) + ("object_type" (:*unnamed* ("property_signature" "index_signature" "method_signature" "export_statement" "construct_signature" "call_signature"))) + ("omitting_type_annotation" (:*unnamed* ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "type_query"))) + ("opting_type_annotation" (:*unnamed* ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "type_query"))) ("optional_chain" (:*unnamed* nil)) - ("optional_parameter" (:*unnamed* ("override_modifier" "accessibility_modifier") :decorator ("decorator") :name ("identifier") :pattern ("this" "pattern") :type ("type_annotation") :value ("expression"))) - ("optional_type" (:*unnamed* ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "tuple_type" "readonly_type"))) + ("optional_parameter" (:*unnamed* ("accessibility_modifier" "override_modifier") :decorator ("decorator") :name ("identifier") :pattern ("pattern" "this") :type ("type_annotation") :value ("expression"))) + ("optional_type" (:*unnamed* ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "type_query"))) ("override_modifier" (:*unnamed* nil)) - ("pair" (:*unnamed* nil :key ("computed_property_name" "string" "property_identifier" "private_property_identifier" "number") :value ("expression"))) - ("pair_pattern" (:*unnamed* nil :key ("computed_property_name" "string" "property_identifier" "private_property_identifier" "number") :value ("assignment_pattern" "pattern"))) + ("pair" (:*unnamed* nil :key ("string" "private_property_identifier" "computed_property_name" "number" "property_identifier") :value ("expression"))) + ("pair_pattern" (:*unnamed* nil :key ("string" "private_property_identifier" "computed_property_name" "number" "property_identifier") :value ("pattern" "assignment_pattern"))) ("parenthesized_expression" (:*unnamed* ("sequence_expression" "expression") :type ("type_annotation"))) - ("parenthesized_type" (:*unnamed* ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "tuple_type" "readonly_type"))) - ("pattern" (:*unnamed* ("object_pattern" "subscript_expression" "member_expression" "identifier" "rest_pattern" "non_null_expression" "undefined" "array_pattern"))) + ("parenthesized_type" (:*unnamed* ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "type_query"))) + ("pattern" (:*unnamed* ("identifier" "object_pattern" "member_expression" "undefined" "non_null_expression" "array_pattern" "subscript_expression" "rest_pattern"))) ("predefined_type" (:*unnamed* nil)) - ("primary_expression" (:*unnamed* ("true" "member_expression" "generator_function" "null" "parenthesized_expression" "template_string" "number" "meta_property" "array" "call_expression" "arrow_function" "this" "function" "string" "import" "subscript_expression" "regex" "identifier" "false" "super" "non_null_expression" "undefined" "class" "object"))) + ("primary_expression" (:*unnamed* ("regex" "string" "generator_function" "member_expression" "template_string" "true" "number" "non_null_expression" "arrow_function" "this" "import" "meta_property" "false" "class" "function" "identifier" "undefined" "array" "null" "subscript_expression" "call_expression" "super" "object" "parenthesized_expression"))) ("private_property_identifier" (:*unnamed* nil)) - ("program" (:*unnamed* ("hash_bang_line" "statement"))) + ("program" (:*unnamed* ("statement" "hash_bang_line"))) ("property_identifier" (:*unnamed* nil)) - ("property_signature" (:*unnamed* ("override_modifier" "accessibility_modifier") :name ("computed_property_name" "string" "property_identifier" "private_property_identifier" "number") :type ("type_annotation"))) - ("public_field_definition" (:*unnamed* ("override_modifier" "accessibility_modifier") :name ("computed_property_name" "string" "property_identifier" "private_property_identifier" "number") :type ("type_annotation") :value ("expression"))) - ("readonly_type" (:*unnamed* ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "tuple_type" "readonly_type"))) + ("property_signature" (:*unnamed* ("accessibility_modifier" "override_modifier") :name ("string" "private_property_identifier" "computed_property_name" "number" "property_identifier") :type ("type_annotation"))) + ("public_field_definition" (:*unnamed* ("accessibility_modifier" "override_modifier") :name ("string" "private_property_identifier" "computed_property_name" "number" "property_identifier") :type ("type_annotation") :value ("expression"))) + ("readonly_type" (:*unnamed* ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "type_query"))) ("regex" (:*unnamed* nil :flags ("regex_flags") :pattern ("regex_pattern"))) ("regex_flags" (:*unnamed* nil)) ("regex_pattern" (:*unnamed* nil)) - ("required_parameter" (:*unnamed* ("override_modifier" "accessibility_modifier") :decorator ("decorator") :name ("rest_pattern" "identifier") :pattern ("this" "pattern") :type ("type_annotation") :value ("expression"))) - ("rest_pattern" (:*unnamed* ("identifier" "non_null_expression" "undefined" "subscript_expression" "object_pattern" "array_pattern" "member_expression"))) - ("rest_type" (:*unnamed* ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "tuple_type" "readonly_type"))) + ("required_parameter" (:*unnamed* ("accessibility_modifier" "override_modifier") :decorator ("decorator") :name ("rest_pattern" "identifier") :pattern ("pattern" "this") :type ("type_annotation") :value ("expression"))) + ("rest_pattern" (:*unnamed* ("identifier" "object_pattern" "member_expression" "subscript_expression" "undefined" "non_null_expression" "array_pattern"))) + ("rest_type" (:*unnamed* ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "type_query"))) ("return_statement" (:*unnamed* ("sequence_expression" "expression"))) - ("satisfies_expression" (:*unnamed* ("union_type" "expression" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "tuple_type" "readonly_type"))) + ("satisfies_expression" (:*unnamed* ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "expression" "type_query"))) ("sequence_expression" (:*unnamed* nil :left ("expression") :right ("sequence_expression" "expression"))) ("shorthand_property_identifier" (:*unnamed* nil)) ("shorthand_property_identifier_pattern" (:*unnamed* nil)) ("spread_element" (:*unnamed* ("expression"))) - ("statement" (:*unnamed* ("if_statement" "with_statement" "throw_statement" "empty_statement" "return_statement" "while_statement" "import_statement" "break_statement" "continue_statement" "for_in_statement" "declaration" "for_statement" "switch_statement" "do_statement" "statement_block" "debugger_statement" "export_statement" "expression_statement" "labeled_statement" "try_statement"))) + ("statement" (:*unnamed* ("throw_statement" "if_statement" "empty_statement" "with_statement" "labeled_statement" "while_statement" "do_statement" "debugger_statement" "break_statement" "continue_statement" "expression_statement" "return_statement" "try_statement" "export_statement" "for_in_statement" "statement_block" "import_statement" "declaration" "for_statement" "switch_statement"))) ("statement_block" (:*unnamed* ("statement"))) ("statement_identifier" (:*unnamed* nil)) ("string" (:*unnamed* ("escape_sequence" "string_fragment"))) ("string_fragment" (:*unnamed* nil)) - ("subscript_expression" (:*unnamed* nil :index ("predefined_type" "string" "expression" "number" "sequence_expression") :object ("expression") :optional_chain ("optional_chain"))) + ("subscript_expression" (:*unnamed* nil :index ("predefined_type" "string" "sequence_expression" "expression" "number") :object ("expression") :optional_chain ("optional_chain"))) ("super" (:*unnamed* nil)) ("switch_body" (:*unnamed* ("switch_default" "switch_case"))) ("switch_case" (:*unnamed* nil :body ("statement") :value ("sequence_expression" "expression"))) @@ -254,29 +254,29 @@ ("template_literal_type" (:*unnamed* ("template_type"))) ("template_string" (:*unnamed* ("escape_sequence" "template_substitution"))) ("template_substitution" (:*unnamed* ("sequence_expression" "expression"))) - ("template_type" (:*unnamed* ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "type_identifier" "object_type" "flow_maybe_type" "tuple_type"))) + ("template_type" (:*unnamed* ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "this_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "type_query"))) ("ternary_expression" (:*unnamed* nil :alternative ("expression") :condition ("expression") :consequence ("expression"))) ("this" (:*unnamed* nil)) ("this_type" (:*unnamed* nil)) ("throw_statement" (:*unnamed* ("sequence_expression" "expression"))) ("true" (:*unnamed* nil)) ("try_statement" (:*unnamed* nil :body ("statement_block") :finalizer ("finally_clause") :handler ("catch_clause"))) - ("tuple_type" (:*unnamed* ("union_type" "optional_parameter" "template_literal_type" "lookup_type" "conditional_type" "optional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "rest_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "required_parameter" "tuple_type" "readonly_type"))) - ("type_alias_declaration" (:*unnamed* nil :name ("type_identifier") :type_parameters ("type_parameters") :value ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "tuple_type" "readonly_type"))) - ("type_annotation" (:*unnamed* ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "tuple_type" "readonly_type"))) - ("type_arguments" (:*unnamed* ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "tuple_type" "readonly_type"))) + ("tuple_type" (:*unnamed* ("predefined_type" "object_type" "union_type" "required_parameter" "optional_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "rest_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "optional_parameter" "type_query"))) + ("type_alias_declaration" (:*unnamed* nil :name ("type_identifier") :type_parameters ("type_parameters") :value ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "type_query"))) + ("type_annotation" (:*unnamed* ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "type_query"))) + ("type_arguments" (:*unnamed* ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "type_query"))) ("type_identifier" (:*unnamed* nil)) ("type_parameter" (:*unnamed* nil :constraint ("constraint") :name ("type_identifier") :value ("default_type"))) ("type_parameters" (:*unnamed* ("type_parameter"))) - ("type_predicate" (:*unnamed* nil :name ("this" "identifier") :type ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "tuple_type" "readonly_type"))) + ("type_predicate" (:*unnamed* nil :name ("identifier" "this") :type ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "type_query"))) ("type_predicate_annotation" (:*unnamed* ("type_predicate"))) - ("type_query" (:*unnamed* ("instantiation_expression" "subscript_expression" "identifier" "member_expression" "call_expression"))) - ("unary_expression" (:*unnamed* nil :argument ("expression" "number") :operator nil)) + ("type_query" (:*unnamed* ("identifier" "subscript_expression" "member_expression" "call_expression" "instantiation_expression"))) + ("unary_expression" (:*unnamed* nil :argument ("number" "expression") :operator nil)) ("undefined" (:*unnamed* nil)) - ("union_type" (:*unnamed* ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "tuple_type" "readonly_type"))) + ("union_type" (:*unnamed* ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "type_query"))) ("update_expression" (:*unnamed* nil :argument ("expression") :operator nil)) ("variable_declaration" (:*unnamed* ("variable_declarator"))) - ("variable_declarator" (:*unnamed* nil :name ("array_pattern" "object_pattern" "identifier") :type ("type_annotation") :value ("expression"))) + ("variable_declarator" (:*unnamed* nil :name ("identifier" "object_pattern" "array_pattern") :type ("type_annotation") :value ("expression"))) ("while_statement" (:*unnamed* nil :body ("statement") :condition ("parenthesized_expression"))) ("with_statement" (:*unnamed* nil :body ("statement") :object ("parenthesized_expression"))) ("yield_expression" (:*unnamed* ("expression"))) @@ -286,18 +286,18 @@ (defconst combobulate-rules-tsx-inverse '(("abstract_class_declaration" ("declaration")) ("abstract_method_signature" ("class_body")) - ("accessibility_modifier" ("method_signature" "method_definition" "abstract_method_signature" "public_field_definition" "optional_parameter" "required_parameter" "property_signature")) + ("accessibility_modifier" ("property_signature" "abstract_method_signature" "required_parameter" "method_signature" "method_definition" "public_field_definition" "optional_parameter")) ("ambient_declaration" ("declaration")) ("arguments" ("new_expression" "call_expression")) ("array" ("primary_expression")) - ("array_pattern" ("pattern" "catch_clause" "assignment_expression" "variable_declarator" "rest_pattern" "for_in_statement" "object_assignment_pattern")) - ("array_type" ("union_type" "lookup_type" "optional_type" "type_alias_declaration" "array_type" "omitting_type_annotation" "parenthesized_type" "rest_type" "infer_type" "template_type" "index_type_query" "function_type" "implements_clause" "tuple_type" "readonly_type" "conditional_type" "mapped_type_clause" "type_arguments" "type_annotation" "_primary_type" "intersection_type" "constraint" "index_signature" "default_type" "opting_type_annotation" "as_expression" "ambient_declaration" "constructor_type" "type_predicate" "flow_maybe_type" "satisfies_expression")) + ("array_pattern" ("catch_clause" "assignment_expression" "object_assignment_pattern" "for_in_statement" "variable_declarator" "rest_pattern" "pattern")) + ("array_type" ("default_type" "type_alias_declaration" "type_arguments" "flow_maybe_type" "mapped_type_clause" "parenthesized_type" "type_predicate" "ambient_declaration" "constructor_type" "template_type" "function_type" "intersection_type" "rest_type" "implements_clause" "index_type_query" "omitting_type_annotation" "readonly_type" "satisfies_expression" "union_type" "optional_type" "type_annotation" "opting_type_annotation" "conditional_type" "array_type" "constraint" "_primary_type" "lookup_type" "tuple_type" "infer_type" "as_expression" "index_signature")) ("arrow_function" ("primary_expression")) ("as_expression" ("expression")) ("asserts" ("function_type" "asserts_annotation")) - ("asserts_annotation" ("arrow_function" "call_signature" "function" "generator_function_declaration" "function_declaration" "method_signature" "method_definition" "abstract_method_signature" "generator_function" "function_signature")) + ("asserts_annotation" ("abstract_method_signature" "generator_function" "method_signature" "arrow_function" "method_definition" "function_declaration" "function" "function_signature" "generator_function_declaration" "call_signature")) ("assignment_expression" ("expression")) - ("assignment_pattern" ("array_pattern" "pair_pattern")) + ("assignment_pattern" ("pair_pattern" "array_pattern")) ("augmented_assignment_expression" ("expression")) ("await_expression" ("expression")) ("binary_expression" ("expression")) @@ -306,53 +306,53 @@ ("call_signature" ("object_type")) ("catch_clause" ("try_statement")) ("class" ("primary_expression")) - ("class_body" ("abstract_class_declaration" "class" "class_declaration")) + ("class_body" ("class" "class_declaration" "abstract_class_declaration")) ("class_declaration" ("declaration")) - ("class_heritage" ("abstract_class_declaration" "class" "class_declaration")) + ("class_heritage" ("class" "class_declaration" "abstract_class_declaration")) ("class_static_block" ("class_body")) - ("computed_property_name" ("method_signature" "enum_body" "enum_assignment" "method_definition" "abstract_method_signature" "pair_pattern" "pair" "public_field_definition" "property_signature")) - ("conditional_type" ("union_type" "lookup_type" "optional_type" "type_alias_declaration" "array_type" "omitting_type_annotation" "parenthesized_type" "rest_type" "infer_type" "template_type" "index_type_query" "function_type" "implements_clause" "tuple_type" "readonly_type" "conditional_type" "mapped_type_clause" "type_arguments" "type_annotation" "_primary_type" "intersection_type" "constraint" "index_signature" "default_type" "opting_type_annotation" "as_expression" "ambient_declaration" "constructor_type" "type_predicate" "flow_maybe_type" "satisfies_expression")) + ("computed_property_name" ("property_signature" "abstract_method_signature" "pair" "method_signature" "enum_assignment" "pair_pattern" "method_definition" "enum_body" "public_field_definition")) + ("conditional_type" ("default_type" "type_alias_declaration" "type_arguments" "flow_maybe_type" "mapped_type_clause" "parenthesized_type" "type_predicate" "ambient_declaration" "constructor_type" "template_type" "function_type" "intersection_type" "rest_type" "implements_clause" "index_type_query" "omitting_type_annotation" "readonly_type" "satisfies_expression" "union_type" "optional_type" "type_annotation" "opting_type_annotation" "conditional_type" "array_type" "constraint" "_primary_type" "lookup_type" "tuple_type" "infer_type" "as_expression" "index_signature")) ("constraint" ("type_parameter")) ("construct_signature" ("object_type")) - ("constructor_type" ("union_type" "lookup_type" "optional_type" "type_alias_declaration" "omitting_type_annotation" "parenthesized_type" "rest_type" "infer_type" "function_type" "implements_clause" "tuple_type" "readonly_type" "conditional_type" "mapped_type_clause" "type_arguments" "type_annotation" "intersection_type" "constraint" "index_signature" "default_type" "opting_type_annotation" "as_expression" "ambient_declaration" "constructor_type" "type_predicate" "satisfies_expression")) + ("constructor_type" ("default_type" "type_alias_declaration" "type_arguments" "mapped_type_clause" "parenthesized_type" "type_predicate" "ambient_declaration" "constructor_type" "function_type" "intersection_type" "rest_type" "implements_clause" "omitting_type_annotation" "readonly_type" "satisfies_expression" "union_type" "optional_type" "type_annotation" "opting_type_annotation" "conditional_type" "constraint" "lookup_type" "tuple_type" "infer_type" "as_expression" "index_signature")) ("continue_statement" ("statement")) ("debugger_statement" ("statement")) - ("declaration" ("export_statement" "ambient_declaration" "statement")) - ("decorator" ("abstract_class_declaration" "class_body" "export_statement" "class_declaration" "optional_parameter" "required_parameter" "class")) + ("declaration" ("statement" "export_statement" "ambient_declaration")) + ("decorator" ("required_parameter" "class_body" "export_statement" "optional_parameter" "class" "class_declaration" "abstract_class_declaration")) ("default_type" ("type_parameter")) ("do_statement" ("statement")) ("else_clause" ("if_statement")) - ("empty_statement" ("for_statement" "statement")) + ("empty_statement" ("statement" "for_statement")) ("enum_assignment" ("enum_body")) ("enum_body" ("enum_declaration")) ("enum_declaration" ("declaration")) ("escape_sequence" ("string" "template_string")) - ("existential_type" ("union_type" "lookup_type" "optional_type" "type_alias_declaration" "array_type" "omitting_type_annotation" "parenthesized_type" "rest_type" "infer_type" "template_type" "index_type_query" "function_type" "implements_clause" "tuple_type" "readonly_type" "conditional_type" "mapped_type_clause" "type_arguments" "type_annotation" "_primary_type" "intersection_type" "constraint" "index_signature" "default_type" "opting_type_annotation" "as_expression" "ambient_declaration" "constructor_type" "type_predicate" "flow_maybe_type" "satisfies_expression")) + ("existential_type" ("default_type" "type_alias_declaration" "type_arguments" "flow_maybe_type" "mapped_type_clause" "parenthesized_type" "type_predicate" "ambient_declaration" "constructor_type" "template_type" "function_type" "intersection_type" "rest_type" "implements_clause" "index_type_query" "omitting_type_annotation" "readonly_type" "satisfies_expression" "union_type" "optional_type" "type_annotation" "opting_type_annotation" "conditional_type" "array_type" "constraint" "_primary_type" "lookup_type" "tuple_type" "infer_type" "as_expression" "index_signature")) ("export_clause" ("export_statement")) ("export_specifier" ("export_clause")) - ("export_statement" ("object_type" "statement")) - ("expression" ("member_expression" "update_expression" "parenthesized_expression" "template_substitution" "instantiation_expression" "call_expression" "enum_assignment" "computed_property_name" "augmented_assignment_expression" "binary_expression" "non_null_expression" "spread_element" "optional_parameter" "required_parameter" "expression_statement" "switch_case" "yield_expression" "throw_statement" "return_statement" "await_expression" "pair" "variable_declarator" "assignment_pattern" "jsx_expression" "for_in_statement" "ternary_expression" "array" "public_field_definition" "unary_expression" "object_assignment_pattern" "arrow_function" "for_statement" "assignment_expression" "as_expression" "export_statement" "extends_clause" "arguments" "sequence_expression" "subscript_expression" "satisfies_expression")) - ("expression_statement" ("for_statement" "statement")) + ("export_statement" ("statement" "object_type")) + ("expression" ("throw_statement" "unary_expression" "member_expression" "switch_case" "yield_expression" "variable_declarator" "jsx_expression" "await_expression" "augmented_assignment_expression" "sequence_expression" "optional_parameter" "object_assignment_pattern" "return_statement" "array" "for_in_statement" "instantiation_expression" "satisfies_expression" "arguments" "for_statement" "parenthesized_expression" "required_parameter" "assignment_expression" "template_substitution" "enum_assignment" "non_null_expression" "arrow_function" "spread_element" "binary_expression" "update_expression" "extends_clause" "ternary_expression" "pair" "expression_statement" "assignment_pattern" "export_statement" "subscript_expression" "as_expression" "call_expression" "computed_property_name" "public_field_definition")) + ("expression_statement" ("statement" "for_statement")) ("extends_clause" ("class_heritage")) ("extends_type_clause" ("interface_declaration")) - ("false" ("primary_expression" "literal_type")) + ("false" ("literal_type" "primary_expression")) ("finally_clause" ("try_statement")) - ("flow_maybe_type" ("union_type" "lookup_type" "optional_type" "type_alias_declaration" "array_type" "omitting_type_annotation" "parenthesized_type" "rest_type" "infer_type" "template_type" "index_type_query" "function_type" "implements_clause" "tuple_type" "readonly_type" "conditional_type" "mapped_type_clause" "type_arguments" "type_annotation" "_primary_type" "intersection_type" "constraint" "index_signature" "default_type" "opting_type_annotation" "as_expression" "ambient_declaration" "constructor_type" "type_predicate" "flow_maybe_type" "satisfies_expression")) + ("flow_maybe_type" ("default_type" "type_alias_declaration" "type_arguments" "flow_maybe_type" "mapped_type_clause" "parenthesized_type" "type_predicate" "ambient_declaration" "constructor_type" "template_type" "function_type" "intersection_type" "rest_type" "implements_clause" "index_type_query" "omitting_type_annotation" "readonly_type" "satisfies_expression" "union_type" "optional_type" "type_annotation" "opting_type_annotation" "conditional_type" "array_type" "constraint" "_primary_type" "lookup_type" "tuple_type" "infer_type" "as_expression" "index_signature")) ("for_in_statement" ("statement")) ("for_statement" ("statement")) - ("formal_parameters" ("arrow_function" "call_signature" "function" "generator_function_declaration" "function_declaration" "method_signature" "method_definition" "abstract_method_signature" "generator_function" "constructor_type" "function_signature" "function_type" "construct_signature")) + ("formal_parameters" ("function_type" "abstract_method_signature" "generator_function" "method_signature" "construct_signature" "arrow_function" "method_definition" "function_declaration" "function" "function_signature" "generator_function_declaration" "constructor_type" "call_signature")) ("function" ("primary_expression")) ("function_declaration" ("declaration")) ("function_signature" ("declaration")) - ("function_type" ("union_type" "lookup_type" "optional_type" "type_alias_declaration" "omitting_type_annotation" "parenthesized_type" "rest_type" "infer_type" "function_type" "implements_clause" "tuple_type" "readonly_type" "conditional_type" "mapped_type_clause" "type_arguments" "type_annotation" "intersection_type" "constraint" "index_signature" "default_type" "opting_type_annotation" "as_expression" "ambient_declaration" "constructor_type" "type_predicate" "satisfies_expression")) + ("function_type" ("default_type" "type_alias_declaration" "type_arguments" "mapped_type_clause" "parenthesized_type" "type_predicate" "ambient_declaration" "constructor_type" "function_type" "intersection_type" "rest_type" "implements_clause" "omitting_type_annotation" "readonly_type" "satisfies_expression" "union_type" "optional_type" "type_annotation" "opting_type_annotation" "conditional_type" "constraint" "lookup_type" "tuple_type" "infer_type" "as_expression" "index_signature")) ("generator_function" ("primary_expression")) ("generator_function_declaration" ("declaration")) - ("generic_type" ("union_type" "lookup_type" "optional_type" "extends_type_clause" "type_alias_declaration" "array_type" "omitting_type_annotation" "parenthesized_type" "rest_type" "infer_type" "template_type" "index_type_query" "function_type" "implements_clause" "tuple_type" "readonly_type" "mapped_type_clause" "conditional_type" "type_arguments" "type_annotation" "_primary_type" "intersection_type" "constraint" "index_signature" "default_type" "opting_type_annotation" "as_expression" "ambient_declaration" "constructor_type" "type_predicate" "flow_maybe_type" "satisfies_expression")) + ("generic_type" ("default_type" "type_alias_declaration" "type_arguments" "flow_maybe_type" "mapped_type_clause" "parenthesized_type" "type_predicate" "ambient_declaration" "constructor_type" "extends_type_clause" "template_type" "function_type" "intersection_type" "rest_type" "implements_clause" "index_type_query" "omitting_type_annotation" "readonly_type" "satisfies_expression" "union_type" "optional_type" "type_annotation" "opting_type_annotation" "conditional_type" "array_type" "constraint" "_primary_type" "lookup_type" "tuple_type" "infer_type" "as_expression" "index_signature")) ("glimmer_closing_tag" ("glimmer_template")) ("glimmer_opening_tag" ("glimmer_template")) ("glimmer_template" ("expression")) ("hash_bang_line" ("program")) - ("identifier" ("generator_function_declaration" "import_require_clause" "namespace_export" "member_expression" "generator_function" "import_clause" "import_specifier" "instantiation_expression" "namespace_import" "pattern" "augmented_assignment_expression" "internal_module" "enum_declaration" "rest_pattern" "function_signature" "optional_parameter" "required_parameter" "function_declaration" "primary_expression" "asserts" "catch_clause" "export_specifier" "jsx_closing_element" "module" "variable_declarator" "for_in_statement" "decorator" "import_alias" "nested_identifier" "arrow_function" "function" "index_signature" "jsx_opening_element" "type_query" "assignment_expression" "nested_type_identifier" "type_predicate" "export_statement" "jsx_namespace_name" "jsx_self_closing_element")) + ("identifier" ("catch_clause" "member_expression" "import_alias" "function_declaration" "type_predicate" "variable_declarator" "generator_function_declaration" "function" "augmented_assignment_expression" "module" "nested_identifier" "jsx_namespace_name" "primary_expression" "jsx_self_closing_element" "for_in_statement" "import_require_clause" "rest_pattern" "instantiation_expression" "pattern" "namespace_export" "decorator" "generator_function" "required_parameter" "assignment_expression" "enum_declaration" "arrow_function" "function_signature" "nested_type_identifier" "import_clause" "jsx_opening_element" "asserts" "internal_module" "export_specifier" "export_statement" "namespace_import" "optional_parameter" "index_signature" "type_query" "jsx_closing_element" "import_specifier")) ("if_statement" ("statement")) ("implements_clause" ("class_heritage")) ("import" ("instantiation_expression" "primary_expression")) @@ -362,109 +362,109 @@ ("import_specifier" ("named_imports")) ("import_statement" ("statement")) ("index_signature" ("object_type" "class_body")) - ("index_type_query" ("union_type" "lookup_type" "optional_type" "type_alias_declaration" "array_type" "omitting_type_annotation" "parenthesized_type" "rest_type" "infer_type" "template_type" "index_type_query" "function_type" "implements_clause" "tuple_type" "readonly_type" "conditional_type" "mapped_type_clause" "type_arguments" "type_annotation" "_primary_type" "intersection_type" "constraint" "index_signature" "default_type" "opting_type_annotation" "as_expression" "ambient_declaration" "constructor_type" "type_predicate" "flow_maybe_type" "satisfies_expression")) - ("infer_type" ("union_type" "lookup_type" "optional_type" "type_alias_declaration" "omitting_type_annotation" "parenthesized_type" "rest_type" "infer_type" "template_type" "function_type" "implements_clause" "tuple_type" "readonly_type" "conditional_type" "mapped_type_clause" "type_arguments" "type_annotation" "intersection_type" "constraint" "index_signature" "default_type" "opting_type_annotation" "as_expression" "ambient_declaration" "constructor_type" "type_predicate" "satisfies_expression")) - ("instantiation_expression" ("expression" "type_query")) + ("index_type_query" ("default_type" "type_alias_declaration" "type_arguments" "flow_maybe_type" "mapped_type_clause" "parenthesized_type" "type_predicate" "ambient_declaration" "constructor_type" "template_type" "function_type" "intersection_type" "rest_type" "implements_clause" "index_type_query" "omitting_type_annotation" "readonly_type" "satisfies_expression" "union_type" "optional_type" "type_annotation" "opting_type_annotation" "conditional_type" "array_type" "constraint" "_primary_type" "lookup_type" "tuple_type" "infer_type" "as_expression" "index_signature")) + ("infer_type" ("default_type" "type_alias_declaration" "type_arguments" "mapped_type_clause" "parenthesized_type" "type_predicate" "ambient_declaration" "constructor_type" "template_type" "function_type" "intersection_type" "rest_type" "implements_clause" "omitting_type_annotation" "readonly_type" "satisfies_expression" "union_type" "optional_type" "type_annotation" "opting_type_annotation" "conditional_type" "constraint" "lookup_type" "tuple_type" "infer_type" "as_expression" "index_signature")) + ("instantiation_expression" ("type_query" "expression")) ("interface_declaration" ("declaration")) ("internal_module" ("declaration" "expression")) - ("intersection_type" ("union_type" "lookup_type" "optional_type" "type_alias_declaration" "array_type" "omitting_type_annotation" "parenthesized_type" "rest_type" "infer_type" "template_type" "index_type_query" "function_type" "implements_clause" "tuple_type" "readonly_type" "conditional_type" "mapped_type_clause" "type_arguments" "type_annotation" "_primary_type" "intersection_type" "constraint" "index_signature" "default_type" "opting_type_annotation" "as_expression" "ambient_declaration" "constructor_type" "type_predicate" "flow_maybe_type" "satisfies_expression")) - ("jsx_attribute" ("jsx_self_closing_element" "jsx_opening_element")) + ("intersection_type" ("default_type" "type_alias_declaration" "type_arguments" "flow_maybe_type" "mapped_type_clause" "parenthesized_type" "type_predicate" "ambient_declaration" "constructor_type" "template_type" "function_type" "intersection_type" "rest_type" "implements_clause" "index_type_query" "omitting_type_annotation" "readonly_type" "satisfies_expression" "union_type" "optional_type" "type_annotation" "opting_type_annotation" "conditional_type" "array_type" "constraint" "_primary_type" "lookup_type" "tuple_type" "infer_type" "as_expression" "index_signature")) + ("jsx_attribute" ("jsx_opening_element" "jsx_self_closing_element")) ("jsx_closing_element" ("jsx_element")) - ("jsx_element" ("jsx_element" "expression" "jsx_attribute")) - ("jsx_expression" ("jsx_self_closing_element" "jsx_element" "jsx_opening_element" "jsx_attribute")) - ("jsx_namespace_name" ("jsx_closing_element" "jsx_self_closing_element" "jsx_opening_element" "jsx_attribute")) + ("jsx_element" ("jsx_element" "jsx_attribute" "expression")) + ("jsx_expression" ("jsx_opening_element" "jsx_element" "jsx_attribute" "jsx_self_closing_element")) + ("jsx_namespace_name" ("jsx_opening_element" "jsx_attribute" "jsx_self_closing_element" "jsx_closing_element")) ("jsx_opening_element" ("jsx_element")) - ("jsx_self_closing_element" ("jsx_element" "expression" "jsx_attribute")) + ("jsx_self_closing_element" ("jsx_element" "jsx_attribute" "expression")) ("jsx_text" ("jsx_element")) ("labeled_statement" ("statement")) - ("lexical_declaration" ("for_statement" "declaration")) - ("literal_type" ("union_type" "lookup_type" "optional_type" "type_alias_declaration" "array_type" "omitting_type_annotation" "parenthesized_type" "rest_type" "infer_type" "template_type" "index_type_query" "function_type" "implements_clause" "tuple_type" "readonly_type" "conditional_type" "mapped_type_clause" "type_arguments" "type_annotation" "_primary_type" "intersection_type" "constraint" "index_signature" "default_type" "opting_type_annotation" "as_expression" "ambient_declaration" "constructor_type" "type_predicate" "flow_maybe_type" "satisfies_expression")) - ("lookup_type" ("union_type" "lookup_type" "optional_type" "type_alias_declaration" "array_type" "omitting_type_annotation" "parenthesized_type" "rest_type" "infer_type" "template_type" "index_type_query" "function_type" "implements_clause" "tuple_type" "readonly_type" "conditional_type" "mapped_type_clause" "type_arguments" "type_annotation" "_primary_type" "intersection_type" "constraint" "index_signature" "default_type" "opting_type_annotation" "as_expression" "ambient_declaration" "constructor_type" "type_predicate" "flow_maybe_type" "satisfies_expression")) + ("lexical_declaration" ("declaration" "for_statement")) + ("literal_type" ("default_type" "type_alias_declaration" "type_arguments" "flow_maybe_type" "mapped_type_clause" "parenthesized_type" "type_predicate" "ambient_declaration" "constructor_type" "template_type" "function_type" "intersection_type" "rest_type" "implements_clause" "index_type_query" "omitting_type_annotation" "readonly_type" "satisfies_expression" "union_type" "optional_type" "type_annotation" "opting_type_annotation" "conditional_type" "array_type" "constraint" "_primary_type" "lookup_type" "tuple_type" "infer_type" "as_expression" "index_signature")) + ("lookup_type" ("default_type" "type_alias_declaration" "type_arguments" "flow_maybe_type" "mapped_type_clause" "parenthesized_type" "type_predicate" "ambient_declaration" "constructor_type" "template_type" "function_type" "intersection_type" "rest_type" "implements_clause" "index_type_query" "omitting_type_annotation" "readonly_type" "satisfies_expression" "union_type" "optional_type" "type_annotation" "opting_type_annotation" "conditional_type" "array_type" "constraint" "_primary_type" "lookup_type" "tuple_type" "infer_type" "as_expression" "index_signature")) ("mapped_type_clause" ("index_signature")) - ("member_expression" ("pattern" "primary_expression" "jsx_opening_element" "type_query" "augmented_assignment_expression" "assignment_expression" "member_expression" "jsx_closing_element" "rest_pattern" "for_in_statement" "decorator" "nested_identifier" "jsx_self_closing_element" "instantiation_expression")) + ("member_expression" ("decorator" "jsx_opening_element" "member_expression" "assignment_expression" "nested_identifier" "primary_expression" "jsx_self_closing_element" "for_in_statement" "rest_pattern" "instantiation_expression" "pattern" "type_query" "jsx_closing_element" "augmented_assignment_expression")) ("meta_property" ("primary_expression")) - ("method_definition" ("class_body" "object")) + ("method_definition" ("object" "class_body")) ("method_signature" ("object_type" "class_body")) ("module" ("declaration")) ("named_imports" ("import_clause")) ("namespace_export" ("export_statement")) ("namespace_import" ("import_clause")) - ("nested_identifier" ("module" "internal_module" "import_alias" "nested_type_identifier")) - ("nested_type_identifier" ("union_type" "lookup_type" "optional_type" "extends_type_clause" "type_alias_declaration" "array_type" "omitting_type_annotation" "parenthesized_type" "rest_type" "infer_type" "template_type" "index_type_query" "function_type" "implements_clause" "tuple_type" "readonly_type" "mapped_type_clause" "conditional_type" "type_arguments" "type_annotation" "_primary_type" "intersection_type" "constraint" "generic_type" "index_signature" "default_type" "opting_type_annotation" "as_expression" "ambient_declaration" "constructor_type" "type_predicate" "flow_maybe_type" "satisfies_expression")) + ("nested_identifier" ("module" "nested_type_identifier" "import_alias" "internal_module")) + ("nested_type_identifier" ("default_type" "type_alias_declaration" "type_arguments" "flow_maybe_type" "mapped_type_clause" "parenthesized_type" "type_predicate" "ambient_declaration" "constructor_type" "extends_type_clause" "template_type" "function_type" "intersection_type" "rest_type" "implements_clause" "index_type_query" "omitting_type_annotation" "readonly_type" "satisfies_expression" "union_type" "optional_type" "type_annotation" "opting_type_annotation" "conditional_type" "array_type" "constraint" "_primary_type" "lookup_type" "generic_type" "tuple_type" "infer_type" "as_expression" "index_signature")) ("new_expression" ("expression")) - ("non_null_expression" ("pattern" "primary_expression" "augmented_assignment_expression" "assignment_expression" "rest_pattern" "for_in_statement")) - ("null" ("primary_expression" "literal_type")) - ("number" ("enum_body" "enum_assignment" "method_signature" "primary_expression" "literal_type" "method_definition" "abstract_method_signature" "pair_pattern" "pair" "unary_expression" "public_field_definition" "subscript_expression" "property_signature")) + ("non_null_expression" ("assignment_expression" "primary_expression" "for_in_statement" "rest_pattern" "pattern" "augmented_assignment_expression")) + ("null" ("literal_type" "primary_expression")) + ("number" ("property_signature" "abstract_method_signature" "unary_expression" "pair" "literal_type" "enum_assignment" "primary_expression" "method_signature" "method_definition" "pair_pattern" "enum_body" "subscript_expression" "public_field_definition")) ("object" ("primary_expression")) ("object_assignment_pattern" ("object_pattern")) - ("object_pattern" ("pattern" "catch_clause" "assignment_expression" "variable_declarator" "rest_pattern" "for_in_statement" "object_assignment_pattern")) - ("object_type" ("union_type" "lookup_type" "optional_type" "type_alias_declaration" "array_type" "omitting_type_annotation" "parenthesized_type" "rest_type" "infer_type" "template_type" "index_type_query" "function_type" "implements_clause" "tuple_type" "readonly_type" "interface_declaration" "conditional_type" "mapped_type_clause" "type_arguments" "type_annotation" "_primary_type" "intersection_type" "constraint" "index_signature" "default_type" "opting_type_annotation" "as_expression" "ambient_declaration" "constructor_type" "type_predicate" "flow_maybe_type" "satisfies_expression")) + ("object_pattern" ("catch_clause" "assignment_expression" "object_assignment_pattern" "for_in_statement" "variable_declarator" "rest_pattern" "pattern")) + ("object_type" ("default_type" "type_alias_declaration" "type_arguments" "flow_maybe_type" "mapped_type_clause" "parenthesized_type" "type_predicate" "ambient_declaration" "constructor_type" "template_type" "function_type" "intersection_type" "rest_type" "implements_clause" "index_type_query" "omitting_type_annotation" "readonly_type" "satisfies_expression" "union_type" "optional_type" "type_annotation" "opting_type_annotation" "conditional_type" "interface_declaration" "array_type" "constraint" "_primary_type" "lookup_type" "tuple_type" "infer_type" "as_expression" "index_signature")) ("omitting_type_annotation" ("index_signature")) ("opting_type_annotation" ("index_signature")) ("optional_chain" ("subscript_expression" "member_expression")) ("optional_parameter" ("formal_parameters" "tuple_type")) ("optional_type" ("tuple_type")) - ("override_modifier" ("method_signature" "method_definition" "public_field_definition" "optional_parameter" "required_parameter" "property_signature")) + ("override_modifier" ("property_signature" "required_parameter" "method_signature" "method_definition" "public_field_definition" "optional_parameter")) ("pair" ("object")) ("pair_pattern" ("object_pattern")) - ("parenthesized_expression" ("if_statement" "with_statement" "primary_expression" "while_statement" "switch_statement" "augmented_assignment_expression" "assignment_expression" "do_statement" "for_in_statement")) - ("parenthesized_type" ("union_type" "lookup_type" "optional_type" "type_alias_declaration" "array_type" "omitting_type_annotation" "parenthesized_type" "rest_type" "infer_type" "template_type" "index_type_query" "function_type" "implements_clause" "tuple_type" "readonly_type" "conditional_type" "mapped_type_clause" "type_arguments" "type_annotation" "_primary_type" "intersection_type" "constraint" "index_signature" "default_type" "opting_type_annotation" "as_expression" "ambient_declaration" "constructor_type" "type_predicate" "flow_maybe_type" "satisfies_expression")) - ("pattern" ("pair_pattern" "assignment_pattern" "optional_parameter" "required_parameter" "array_pattern")) - ("predefined_type" ("union_type" "lookup_type" "optional_type" "type_alias_declaration" "array_type" "omitting_type_annotation" "parenthesized_type" "rest_type" "infer_type" "template_type" "index_type_query" "function_type" "implements_clause" "tuple_type" "readonly_type" "conditional_type" "mapped_type_clause" "type_arguments" "type_annotation" "_primary_type" "intersection_type" "constraint" "index_signature" "default_type" "opting_type_annotation" "as_expression" "ambient_declaration" "constructor_type" "type_predicate" "flow_maybe_type" "subscript_expression" "satisfies_expression")) - ("primary_expression" ("expression" "new_expression")) - ("private_property_identifier" ("enum_body" "enum_assignment" "method_signature" "method_definition" "member_expression" "abstract_method_signature" "pair_pattern" "pair" "public_field_definition" "property_signature")) - ("property_identifier" ("enum_body" "enum_assignment" "method_signature" "jsx_attribute" "method_definition" "abstract_method_signature" "ambient_declaration" "member_expression" "pair" "pair_pattern" "nested_identifier" "public_field_definition" "property_signature")) + ("parenthesized_expression" ("if_statement" "switch_statement" "assignment_expression" "primary_expression" "with_statement" "for_in_statement" "while_statement" "do_statement" "augmented_assignment_expression")) + ("parenthesized_type" ("default_type" "type_alias_declaration" "type_arguments" "flow_maybe_type" "mapped_type_clause" "parenthesized_type" "type_predicate" "ambient_declaration" "constructor_type" "template_type" "function_type" "intersection_type" "rest_type" "implements_clause" "index_type_query" "omitting_type_annotation" "readonly_type" "satisfies_expression" "union_type" "optional_type" "type_annotation" "opting_type_annotation" "conditional_type" "array_type" "constraint" "_primary_type" "lookup_type" "tuple_type" "infer_type" "as_expression" "index_signature")) + ("pattern" ("required_parameter" "assignment_pattern" "pair_pattern" "array_pattern" "optional_parameter")) + ("predefined_type" ("default_type" "type_alias_declaration" "type_arguments" "flow_maybe_type" "mapped_type_clause" "parenthesized_type" "type_predicate" "ambient_declaration" "constructor_type" "template_type" "function_type" "intersection_type" "rest_type" "implements_clause" "index_type_query" "omitting_type_annotation" "readonly_type" "satisfies_expression" "union_type" "optional_type" "type_annotation" "opting_type_annotation" "conditional_type" "array_type" "constraint" "_primary_type" "lookup_type" "tuple_type" "infer_type" "subscript_expression" "as_expression" "index_signature")) + ("primary_expression" ("new_expression" "expression")) + ("private_property_identifier" ("property_signature" "abstract_method_signature" "member_expression" "pair" "method_signature" "enum_assignment" "pair_pattern" "method_definition" "enum_body" "public_field_definition")) + ("property_identifier" ("property_signature" "abstract_method_signature" "member_expression" "nested_identifier" "method_signature" "enum_assignment" "pair" "pair_pattern" "method_definition" "jsx_attribute" "enum_body" "public_field_definition" "ambient_declaration")) ("property_signature" ("object_type")) ("public_field_definition" ("class_body")) - ("readonly_type" ("union_type" "lookup_type" "optional_type" "type_alias_declaration" "omitting_type_annotation" "parenthesized_type" "rest_type" "infer_type" "function_type" "implements_clause" "tuple_type" "readonly_type" "conditional_type" "mapped_type_clause" "type_arguments" "type_annotation" "intersection_type" "constraint" "index_signature" "default_type" "opting_type_annotation" "as_expression" "ambient_declaration" "constructor_type" "type_predicate" "satisfies_expression")) + ("readonly_type" ("default_type" "type_alias_declaration" "type_arguments" "mapped_type_clause" "parenthesized_type" "type_predicate" "ambient_declaration" "constructor_type" "function_type" "intersection_type" "rest_type" "implements_clause" "omitting_type_annotation" "readonly_type" "satisfies_expression" "union_type" "optional_type" "type_annotation" "opting_type_annotation" "conditional_type" "constraint" "lookup_type" "tuple_type" "infer_type" "as_expression" "index_signature")) ("regex" ("primary_expression")) ("regex_flags" ("regex")) ("regex_pattern" ("regex")) ("required_parameter" ("formal_parameters" "tuple_type")) - ("rest_pattern" ("required_parameter" "object_pattern" "pattern")) + ("rest_pattern" ("pattern" "object_pattern" "required_parameter")) ("rest_type" ("tuple_type")) ("return_statement" ("statement")) ("satisfies_expression" ("expression")) - ("sequence_expression" ("for_statement" "throw_statement" "return_statement" "subscript_expression" "jsx_expression" "for_in_statement" "parenthesized_expression" "switch_case" "sequence_expression" "expression_statement" "template_substitution")) + ("sequence_expression" ("throw_statement" "sequence_expression" "switch_case" "template_substitution" "expression_statement" "return_statement" "for_in_statement" "subscript_expression" "jsx_expression" "parenthesized_expression" "for_statement")) ("shorthand_property_identifier" ("object")) - ("shorthand_property_identifier_pattern" ("object_pattern" "object_assignment_pattern")) - ("spread_element" ("array" "jsx_expression" "object" "arguments")) - ("statement" ("for_statement" "if_statement" "with_statement" "switch_default" "while_statement" "do_statement" "statement_block" "else_clause" "for_in_statement" "switch_case" "labeled_statement" "program")) - ("statement_block" ("arrow_function" "function" "generator_function_declaration" "function_declaration" "class_static_block" "statement" "catch_clause" "internal_module" "method_definition" "ambient_declaration" "generator_function" "module" "finally_clause" "try_statement")) - ("statement_identifier" ("break_statement" "continue_statement" "labeled_statement")) - ("string" ("import_require_clause" "namespace_export" "import_specifier" "enum_body" "enum_assignment" "internal_module" "method_definition" "method_signature" "primary_expression" "jsx_attribute" "abstract_method_signature" "import_statement" "export_specifier" "module" "pair" "pair_pattern" "public_field_definition" "property_signature" "literal_type" "export_statement" "subscript_expression")) + ("shorthand_property_identifier_pattern" ("object_assignment_pattern" "object_pattern")) + ("spread_element" ("jsx_expression" "object" "arguments" "array")) + ("statement" ("if_statement" "switch_case" "else_clause" "for_statement" "with_statement" "for_in_statement" "labeled_statement" "statement_block" "while_statement" "program" "do_statement" "switch_default")) + ("statement_block" ("statement" "generator_function" "catch_clause" "internal_module" "try_statement" "arrow_function" "method_definition" "finally_clause" "function_declaration" "class_static_block" "ambient_declaration" "generator_function_declaration" "function" "module")) + ("statement_identifier" ("labeled_statement" "break_statement" "continue_statement")) + ("string" ("property_signature" "method_signature" "enum_body" "module" "abstract_method_signature" "literal_type" "primary_expression" "pair_pattern" "method_definition" "import_require_clause" "namespace_export" "enum_assignment" "internal_module" "export_specifier" "pair" "export_statement" "jsx_attribute" "subscript_expression" "import_statement" "public_field_definition" "import_specifier")) ("string_fragment" ("string")) - ("subscript_expression" ("pattern" "primary_expression" "type_query" "augmented_assignment_expression" "assignment_expression" "rest_pattern" "for_in_statement" "instantiation_expression")) + ("subscript_expression" ("assignment_expression" "primary_expression" "for_in_statement" "rest_pattern" "instantiation_expression" "pattern" "type_query" "augmented_assignment_expression")) ("super" ("primary_expression")) ("switch_body" ("switch_statement")) ("switch_case" ("switch_body")) ("switch_default" ("switch_body")) ("switch_statement" ("statement")) - ("template_literal_type" ("union_type" "lookup_type" "optional_type" "type_alias_declaration" "array_type" "omitting_type_annotation" "parenthesized_type" "rest_type" "infer_type" "template_type" "index_type_query" "function_type" "implements_clause" "tuple_type" "readonly_type" "conditional_type" "mapped_type_clause" "type_arguments" "type_annotation" "_primary_type" "intersection_type" "constraint" "index_signature" "default_type" "opting_type_annotation" "as_expression" "ambient_declaration" "constructor_type" "type_predicate" "flow_maybe_type" "satisfies_expression")) + ("template_literal_type" ("default_type" "type_alias_declaration" "type_arguments" "flow_maybe_type" "mapped_type_clause" "parenthesized_type" "type_predicate" "ambient_declaration" "constructor_type" "template_type" "function_type" "intersection_type" "rest_type" "implements_clause" "index_type_query" "omitting_type_annotation" "readonly_type" "satisfies_expression" "union_type" "optional_type" "type_annotation" "opting_type_annotation" "conditional_type" "array_type" "constraint" "_primary_type" "lookup_type" "tuple_type" "infer_type" "as_expression" "index_signature")) ("template_string" ("primary_expression" "call_expression")) ("template_substitution" ("template_string")) ("template_type" ("template_literal_type")) ("ternary_expression" ("expression")) - ("this" ("primary_expression" "asserts" "type_predicate" "optional_parameter" "required_parameter")) - ("this_type" ("union_type" "lookup_type" "optional_type" "type_alias_declaration" "array_type" "omitting_type_annotation" "parenthesized_type" "rest_type" "infer_type" "template_type" "index_type_query" "function_type" "implements_clause" "tuple_type" "readonly_type" "conditional_type" "mapped_type_clause" "type_arguments" "type_annotation" "_primary_type" "intersection_type" "constraint" "index_signature" "default_type" "opting_type_annotation" "as_expression" "ambient_declaration" "constructor_type" "type_predicate" "flow_maybe_type" "satisfies_expression")) + ("this" ("required_parameter" "asserts" "primary_expression" "type_predicate" "optional_parameter")) + ("this_type" ("default_type" "type_alias_declaration" "type_arguments" "flow_maybe_type" "mapped_type_clause" "parenthesized_type" "type_predicate" "ambient_declaration" "constructor_type" "template_type" "function_type" "intersection_type" "rest_type" "implements_clause" "index_type_query" "omitting_type_annotation" "readonly_type" "satisfies_expression" "union_type" "optional_type" "type_annotation" "opting_type_annotation" "conditional_type" "array_type" "constraint" "_primary_type" "lookup_type" "tuple_type" "infer_type" "as_expression" "index_signature")) ("throw_statement" ("statement")) - ("true" ("primary_expression" "literal_type")) + ("true" ("literal_type" "primary_expression")) ("try_statement" ("statement")) - ("tuple_type" ("union_type" "lookup_type" "optional_type" "type_alias_declaration" "array_type" "omitting_type_annotation" "parenthesized_type" "rest_type" "infer_type" "template_type" "index_type_query" "function_type" "implements_clause" "tuple_type" "readonly_type" "conditional_type" "mapped_type_clause" "type_arguments" "type_annotation" "_primary_type" "intersection_type" "constraint" "index_signature" "default_type" "opting_type_annotation" "as_expression" "ambient_declaration" "constructor_type" "type_predicate" "flow_maybe_type" "satisfies_expression")) + ("tuple_type" ("default_type" "type_alias_declaration" "type_arguments" "flow_maybe_type" "mapped_type_clause" "parenthesized_type" "type_predicate" "ambient_declaration" "constructor_type" "template_type" "function_type" "intersection_type" "rest_type" "implements_clause" "index_type_query" "omitting_type_annotation" "readonly_type" "satisfies_expression" "union_type" "optional_type" "type_annotation" "opting_type_annotation" "conditional_type" "array_type" "constraint" "_primary_type" "lookup_type" "tuple_type" "infer_type" "as_expression" "index_signature")) ("type_alias_declaration" ("declaration")) - ("type_annotation" ("call_signature" "generator_function_declaration" "generator_function" "parenthesized_expression" "construct_signature" "method_definition" "function_signature" "optional_parameter" "required_parameter" "method_signature" "function_declaration" "catch_clause" "abstract_method_signature" "variable_declarator" "public_field_definition" "property_signature" "arrow_function" "function" "index_signature")) - ("type_arguments" ("jsx_opening_element" "extends_clause" "new_expression" "jsx_self_closing_element" "generic_type" "instantiation_expression" "call_expression")) - ("type_identifier" ("union_type" "lookup_type" "optional_type" "extends_type_clause" "type_alias_declaration" "type_parameter" "array_type" "omitting_type_annotation" "parenthesized_type" "rest_type" "infer_type" "template_type" "index_type_query" "function_type" "implements_clause" "tuple_type" "readonly_type" "interface_declaration" "conditional_type" "mapped_type_clause" "type_arguments" "type_annotation" "_primary_type" "intersection_type" "constraint" "generic_type" "index_signature" "abstract_class_declaration" "default_type" "opting_type_annotation" "as_expression" "ambient_declaration" "nested_type_identifier" "constructor_type" "type_predicate" "class_declaration" "flow_maybe_type" "class" "satisfies_expression")) + ("type_annotation" ("property_signature" "catch_clause" "method_signature" "function_declaration" "variable_declarator" "generator_function_declaration" "function" "abstract_method_signature" "method_definition" "parenthesized_expression" "call_signature" "generator_function" "required_parameter" "construct_signature" "arrow_function" "function_signature" "public_field_definition" "optional_parameter" "index_signature")) + ("type_arguments" ("extends_clause" "jsx_opening_element" "generic_type" "jsx_self_closing_element" "new_expression" "call_expression" "instantiation_expression")) + ("type_identifier" ("default_type" "type_alias_declaration" "type_arguments" "flow_maybe_type" "mapped_type_clause" "parenthesized_type" "type_predicate" "ambient_declaration" "constructor_type" "extends_type_clause" "class_declaration" "template_type" "function_type" "intersection_type" "rest_type" "implements_clause" "index_type_query" "omitting_type_annotation" "readonly_type" "type_parameter" "satisfies_expression" "abstract_class_declaration" "union_type" "optional_type" "type_annotation" "opting_type_annotation" "nested_type_identifier" "conditional_type" "class" "interface_declaration" "array_type" "constraint" "_primary_type" "lookup_type" "generic_type" "tuple_type" "infer_type" "as_expression" "index_signature")) ("type_parameter" ("type_parameters")) - ("type_parameters" ("arrow_function" "call_signature" "abstract_class_declaration" "function" "function_declaration" "generator_function_declaration" "interface_declaration" "method_signature" "method_definition" "abstract_method_signature" "generator_function" "constructor_type" "function_signature" "function_type" "class_declaration" "type_alias_declaration" "class" "construct_signature")) - ("type_predicate" ("asserts" "function_type" "type_predicate_annotation")) - ("type_predicate_annotation" ("arrow_function" "call_signature" "function" "generator_function_declaration" "function_declaration" "method_signature" "method_definition" "abstract_method_signature" "generator_function" "function_signature")) - ("type_query" ("union_type" "lookup_type" "optional_type" "type_alias_declaration" "array_type" "omitting_type_annotation" "parenthesized_type" "rest_type" "infer_type" "template_type" "index_type_query" "function_type" "implements_clause" "tuple_type" "readonly_type" "conditional_type" "mapped_type_clause" "type_arguments" "type_annotation" "_primary_type" "intersection_type" "constraint" "index_signature" "default_type" "opting_type_annotation" "as_expression" "ambient_declaration" "constructor_type" "type_predicate" "flow_maybe_type" "satisfies_expression")) - ("unary_expression" ("expression" "literal_type")) - ("undefined" ("pattern" "primary_expression" "literal_type" "assignment_expression" "rest_pattern" "for_in_statement")) - ("union_type" ("union_type" "lookup_type" "optional_type" "type_alias_declaration" "array_type" "omitting_type_annotation" "parenthesized_type" "rest_type" "infer_type" "template_type" "index_type_query" "function_type" "implements_clause" "tuple_type" "readonly_type" "conditional_type" "mapped_type_clause" "type_arguments" "type_annotation" "_primary_type" "intersection_type" "constraint" "index_signature" "default_type" "opting_type_annotation" "as_expression" "ambient_declaration" "constructor_type" "type_predicate" "flow_maybe_type" "satisfies_expression")) + ("type_parameters" ("function_type" "abstract_method_signature" "type_alias_declaration" "generator_function" "interface_declaration" "method_signature" "construct_signature" "arrow_function" "method_definition" "function_declaration" "function" "function_signature" "abstract_class_declaration" "generator_function_declaration" "constructor_type" "class" "class_declaration" "call_signature")) + ("type_predicate" ("function_type" "asserts" "type_predicate_annotation")) + ("type_predicate_annotation" ("abstract_method_signature" "generator_function" "method_signature" "arrow_function" "method_definition" "function_declaration" "function" "function_signature" "generator_function_declaration" "call_signature")) + ("type_query" ("default_type" "type_alias_declaration" "type_arguments" "flow_maybe_type" "mapped_type_clause" "parenthesized_type" "type_predicate" "ambient_declaration" "constructor_type" "template_type" "function_type" "intersection_type" "rest_type" "implements_clause" "index_type_query" "omitting_type_annotation" "readonly_type" "satisfies_expression" "union_type" "optional_type" "type_annotation" "opting_type_annotation" "conditional_type" "array_type" "constraint" "_primary_type" "lookup_type" "tuple_type" "infer_type" "as_expression" "index_signature")) + ("unary_expression" ("literal_type" "expression")) + ("undefined" ("assignment_expression" "literal_type" "primary_expression" "for_in_statement" "rest_pattern" "pattern")) + ("union_type" ("default_type" "type_alias_declaration" "type_arguments" "flow_maybe_type" "mapped_type_clause" "parenthesized_type" "type_predicate" "ambient_declaration" "constructor_type" "template_type" "function_type" "intersection_type" "rest_type" "implements_clause" "index_type_query" "omitting_type_annotation" "readonly_type" "satisfies_expression" "union_type" "optional_type" "type_annotation" "opting_type_annotation" "conditional_type" "array_type" "constraint" "_primary_type" "lookup_type" "tuple_type" "infer_type" "as_expression" "index_signature")) ("update_expression" ("expression")) - ("variable_declaration" ("for_statement" "declaration")) + ("variable_declaration" ("declaration" "for_statement")) ("variable_declarator" ("lexical_declaration" "variable_declaration")) ("while_statement" ("statement")) ("with_statement" ("statement")) @@ -485,125 +485,125 @@ ;; START Production rules for css (defconst combobulate-rules-css - '(("adjacent_sibling_selector" (:*unnamed* ("pseudo_class_selector" "namespace_selector" "id_selector" "class_selector" "nesting_selector" "adjacent_sibling_selector" "descendant_selector" "attribute_selector" "pseudo_element_selector" "tag_name" "string_value" "universal_selector" "sibling_selector" "child_selector"))) - ("arguments" (:*unnamed* ("parenthesized_value" "namespace_selector" "id_selector" "attribute_selector" "important" "pseudo_element_selector" "string_value" "call_expression" "grid_value" "pseudo_class_selector" "float_value" "class_selector" "nesting_selector" "adjacent_sibling_selector" "descendant_selector" "tag_name" "plain_value" "universal_selector" "binary_expression" "color_value" "sibling_selector" "child_selector" "integer_value"))) + '(("adjacent_sibling_selector" (:*unnamed* ("class_selector" "sibling_selector" "descendant_selector" "attribute_selector" "namespace_selector" "nesting_selector" "tag_name" "child_selector" "id_selector" "adjacent_sibling_selector" "pseudo_element_selector" "universal_selector" "string_value" "pseudo_class_selector"))) + ("arguments" (:*unnamed* ("important" "attribute_selector" "descendant_selector" "nesting_selector" "child_selector" "plain_value" "binary_expression" "pseudo_element_selector" "universal_selector" "string_value" "class_selector" "grid_value" "parenthesized_value" "sibling_selector" "color_value" "namespace_selector" "tag_name" "id_selector" "integer_value" "adjacent_sibling_selector" "float_value" "call_expression" "pseudo_class_selector"))) ("at_keyword" (:*unnamed* nil)) - ("at_rule" (:*unnamed* ("binary_query" "at_keyword" "block" "selector_query" "unary_query" "feature_query" "parenthesized_query" "keyword_query"))) - ("attribute_name" (:*unnamed* ("pseudo_class_selector" "namespace_selector" "id_selector" "class_selector" "nesting_selector" "adjacent_sibling_selector" "descendant_selector" "attribute_selector" "pseudo_element_selector" "tag_name" "string_value" "universal_selector" "sibling_selector" "child_selector"))) - ("attribute_selector" (:*unnamed* ("parenthesized_value" "namespace_selector" "id_selector" "attribute_selector" "important" "pseudo_element_selector" "string_value" "call_expression" "grid_value" "pseudo_class_selector" "float_value" "class_selector" "nesting_selector" "adjacent_sibling_selector" "descendant_selector" "tag_name" "plain_value" "universal_selector" "binary_expression" "color_value" "attribute_name" "sibling_selector" "child_selector" "integer_value"))) - ("binary_expression" (:*unnamed* ("parenthesized_value" "float_value" "important" "plain_value" "string_value" "binary_expression" "color_value" "integer_value" "call_expression" "grid_value"))) - ("binary_query" (:*unnamed* ("binary_query" "parenthesized_query" "selector_query" "unary_query" "feature_query" "keyword_query"))) - ("block" (:*unnamed* ("rule_set" "keyframes_statement" "supports_statement" "declaration" "import_statement" "media_statement" "at_rule" "charset_statement" "namespace_statement" "postcss_statement"))) - ("call_expression" (:*unnamed* ("function_name" "arguments"))) - ("charset_statement" (:*unnamed* ("parenthesized_value" "float_value" "important" "plain_value" "string_value" "binary_expression" "color_value" "integer_value" "call_expression" "grid_value"))) - ("child_selector" (:*unnamed* ("pseudo_class_selector" "namespace_selector" "id_selector" "class_selector" "nesting_selector" "adjacent_sibling_selector" "descendant_selector" "attribute_selector" "pseudo_element_selector" "tag_name" "string_value" "universal_selector" "sibling_selector" "child_selector"))) + ("at_rule" (:*unnamed* ("at_keyword" "parenthesized_query" "selector_query" "feature_query" "keyword_query" "block" "unary_query" "binary_query"))) + ("attribute_name" (:*unnamed* ("class_selector" "sibling_selector" "descendant_selector" "attribute_selector" "namespace_selector" "nesting_selector" "tag_name" "child_selector" "id_selector" "adjacent_sibling_selector" "pseudo_element_selector" "universal_selector" "string_value" "pseudo_class_selector"))) + ("attribute_selector" (:*unnamed* ("important" "attribute_selector" "descendant_selector" "nesting_selector" "child_selector" "plain_value" "attribute_name" "binary_expression" "pseudo_element_selector" "universal_selector" "string_value" "class_selector" "grid_value" "parenthesized_value" "sibling_selector" "color_value" "namespace_selector" "tag_name" "id_selector" "integer_value" "adjacent_sibling_selector" "float_value" "call_expression" "pseudo_class_selector"))) + ("binary_expression" (:*unnamed* ("grid_value" "important" "parenthesized_value" "color_value" "plain_value" "integer_value" "binary_expression" "float_value" "call_expression" "string_value"))) + ("binary_query" (:*unnamed* ("feature_query" "keyword_query" "parenthesized_query" "unary_query" "selector_query" "binary_query"))) + ("block" (:*unnamed* ("keyframes_statement" "supports_statement" "at_rule" "namespace_statement" "import_statement" "media_statement" "rule_set" "declaration" "charset_statement" "postcss_statement"))) + ("call_expression" (:*unnamed* ("arguments" "function_name"))) + ("charset_statement" (:*unnamed* ("grid_value" "important" "parenthesized_value" "color_value" "plain_value" "integer_value" "binary_expression" "float_value" "call_expression" "string_value"))) + ("child_selector" (:*unnamed* ("class_selector" "sibling_selector" "descendant_selector" "attribute_selector" "namespace_selector" "nesting_selector" "tag_name" "child_selector" "id_selector" "adjacent_sibling_selector" "pseudo_element_selector" "universal_selector" "string_value" "pseudo_class_selector"))) ("class_name" (:*unnamed* nil)) - ("class_selector" (:*unnamed* ("pseudo_class_selector" "namespace_selector" "id_selector" "class_selector" "nesting_selector" "adjacent_sibling_selector" "attribute_selector" "descendant_selector" "pseudo_element_selector" "tag_name" "string_value" "universal_selector" "sibling_selector" "child_selector" "class_name"))) + ("class_selector" (:*unnamed* ("class_selector" "sibling_selector" "attribute_selector" "descendant_selector" "namespace_selector" "nesting_selector" "tag_name" "child_selector" "id_selector" "adjacent_sibling_selector" "class_name" "pseudo_element_selector" "universal_selector" "string_value" "pseudo_class_selector"))) ("color_value" (:*unnamed* nil)) ("comment" (:*unnamed* nil)) - ("declaration" (:*unnamed* ("parenthesized_value" "float_value" "important" "property_name" "plain_value" "string_value" "binary_expression" "color_value" "integer_value" "call_expression" "grid_value"))) - ("descendant_selector" (:*unnamed* ("pseudo_class_selector" "namespace_selector" "id_selector" "class_selector" "nesting_selector" "adjacent_sibling_selector" "descendant_selector" "attribute_selector" "pseudo_element_selector" "tag_name" "string_value" "universal_selector" "sibling_selector" "child_selector"))) + ("declaration" (:*unnamed* ("grid_value" "important" "parenthesized_value" "color_value" "property_name" "plain_value" "integer_value" "binary_expression" "float_value" "call_expression" "string_value"))) + ("descendant_selector" (:*unnamed* ("class_selector" "sibling_selector" "descendant_selector" "attribute_selector" "namespace_selector" "nesting_selector" "tag_name" "child_selector" "id_selector" "adjacent_sibling_selector" "pseudo_element_selector" "universal_selector" "string_value" "pseudo_class_selector"))) ("feature_name" (:*unnamed* nil)) - ("feature_query" (:*unnamed* ("parenthesized_value" "float_value" "important" "plain_value" "feature_name" "string_value" "binary_expression" "color_value" "integer_value" "call_expression" "grid_value"))) + ("feature_query" (:*unnamed* ("grid_value" "important" "parenthesized_value" "color_value" "plain_value" "integer_value" "binary_expression" "float_value" "call_expression" "string_value" "feature_name"))) ("float_value" (:*unnamed* ("unit"))) ("from" (:*unnamed* nil)) ("function_name" (:*unnamed* nil)) - ("grid_value" (:*unnamed* ("parenthesized_value" "float_value" "important" "plain_value" "string_value" "binary_expression" "color_value" "integer_value" "call_expression" "grid_value"))) + ("grid_value" (:*unnamed* ("grid_value" "important" "parenthesized_value" "color_value" "plain_value" "integer_value" "binary_expression" "float_value" "call_expression" "string_value"))) ("id_name" (:*unnamed* nil)) - ("id_selector" (:*unnamed* ("pseudo_class_selector" "namespace_selector" "id_selector" "class_selector" "nesting_selector" "adjacent_sibling_selector" "descendant_selector" "attribute_selector" "pseudo_element_selector" "tag_name" "string_value" "universal_selector" "sibling_selector" "child_selector" "id_name"))) - ("import_statement" (:*unnamed* ("parenthesized_value" "binary_query" "unary_query" "important" "string_value" "parenthesized_query" "call_expression" "keyword_query" "grid_value" "selector_query" "float_value" "feature_query" "plain_value" "binary_expression" "color_value" "integer_value"))) + ("id_selector" (:*unnamed* ("class_selector" "sibling_selector" "descendant_selector" "attribute_selector" "namespace_selector" "id_name" "nesting_selector" "tag_name" "child_selector" "id_selector" "adjacent_sibling_selector" "pseudo_element_selector" "universal_selector" "string_value" "pseudo_class_selector"))) + ("import_statement" (:*unnamed* ("important" "plain_value" "keyword_query" "binary_expression" "unary_query" "string_value" "grid_value" "parenthesized_value" "parenthesized_query" "color_value" "selector_query" "feature_query" "integer_value" "float_value" "call_expression" "binary_query"))) ("important" (:*unnamed* nil)) ("integer_value" (:*unnamed* ("unit"))) ("js_comment" (:*unnamed* nil)) - ("keyframe_block" (:*unnamed* ("from" "block" "to" "integer_value"))) + ("keyframe_block" (:*unnamed* ("integer_value" "block" "from" "to"))) ("keyframe_block_list" (:*unnamed* ("keyframe_block"))) ("keyframes_name" (:*unnamed* nil)) - ("keyframes_statement" (:*unnamed* ("at_keyword" "keyframes_name" "keyframe_block_list"))) + ("keyframes_statement" (:*unnamed* ("at_keyword" "keyframe_block_list" "keyframes_name"))) ("keyword_query" (:*unnamed* nil)) - ("media_statement" (:*unnamed* ("selector_query" "binary_query" "parenthesized_query" "block" "unary_query" "feature_query" "keyword_query"))) + ("media_statement" (:*unnamed* ("feature_query" "keyword_query" "parenthesized_query" "block" "unary_query" "selector_query" "binary_query"))) ("namespace_name" (:*unnamed* nil)) - ("namespace_selector" (:*unnamed* ("pseudo_class_selector" "namespace_selector" "id_selector" "class_selector" "nesting_selector" "adjacent_sibling_selector" "descendant_selector" "attribute_selector" "pseudo_element_selector" "tag_name" "string_value" "universal_selector" "sibling_selector" "child_selector"))) - ("namespace_statement" (:*unnamed* ("string_value" "namespace_name" "call_expression"))) + ("namespace_selector" (:*unnamed* ("class_selector" "sibling_selector" "descendant_selector" "attribute_selector" "namespace_selector" "nesting_selector" "tag_name" "child_selector" "id_selector" "adjacent_sibling_selector" "pseudo_element_selector" "universal_selector" "string_value" "pseudo_class_selector"))) + ("namespace_statement" (:*unnamed* ("namespace_name" "string_value" "call_expression"))) ("nesting_selector" (:*unnamed* nil)) - ("parenthesized_query" (:*unnamed* ("binary_query" "parenthesized_query" "selector_query" "unary_query" "feature_query" "keyword_query"))) - ("parenthesized_value" (:*unnamed* ("parenthesized_value" "float_value" "important" "plain_value" "string_value" "binary_expression" "color_value" "integer_value" "call_expression" "grid_value"))) + ("parenthesized_query" (:*unnamed* ("feature_query" "keyword_query" "parenthesized_query" "unary_query" "selector_query" "binary_query"))) + ("parenthesized_value" (:*unnamed* ("grid_value" "important" "parenthesized_value" "color_value" "plain_value" "integer_value" "binary_expression" "float_value" "call_expression" "string_value"))) ("plain_value" (:*unnamed* nil)) - ("postcss_statement" (:*unnamed* ("parenthesized_value" "at_keyword" "float_value" "important" "plain_value" "string_value" "binary_expression" "color_value" "integer_value" "call_expression" "grid_value"))) + ("postcss_statement" (:*unnamed* ("at_keyword" "grid_value" "important" "color_value" "parenthesized_value" "plain_value" "integer_value" "binary_expression" "float_value" "call_expression" "string_value"))) ("property_name" (:*unnamed* nil)) - ("pseudo_class_selector" (:*unnamed* ("namespace_selector" "id_selector" "attribute_selector" "pseudo_element_selector" "string_value" "pseudo_class_selector" "class_selector" "nesting_selector" "adjacent_sibling_selector" "descendant_selector" "tag_name" "universal_selector" "arguments" "sibling_selector" "child_selector" "class_name"))) - ("pseudo_element_selector" (:*unnamed* ("pseudo_class_selector" "namespace_selector" "id_selector" "class_selector" "nesting_selector" "adjacent_sibling_selector" "attribute_selector" "descendant_selector" "pseudo_element_selector" "tag_name" "string_value" "universal_selector" "arguments" "sibling_selector" "child_selector"))) + ("pseudo_class_selector" (:*unnamed* ("attribute_selector" "descendant_selector" "nesting_selector" "child_selector" "pseudo_element_selector" "universal_selector" "string_value" "class_selector" "sibling_selector" "namespace_selector" "tag_name" "id_selector" "adjacent_sibling_selector" "class_name" "arguments" "pseudo_class_selector"))) + ("pseudo_element_selector" (:*unnamed* ("class_selector" "sibling_selector" "attribute_selector" "descendant_selector" "namespace_selector" "nesting_selector" "tag_name" "child_selector" "id_selector" "adjacent_sibling_selector" "pseudo_element_selector" "string_value" "universal_selector" "arguments" "pseudo_class_selector"))) ("rule_set" (:*unnamed* ("block" "selectors"))) - ("selector_query" (:*unnamed* ("pseudo_class_selector" "namespace_selector" "id_selector" "class_selector" "nesting_selector" "adjacent_sibling_selector" "descendant_selector" "attribute_selector" "pseudo_element_selector" "tag_name" "string_value" "universal_selector" "sibling_selector" "child_selector"))) - ("selectors" (:*unnamed* ("pseudo_class_selector" "namespace_selector" "id_selector" "class_selector" "nesting_selector" "adjacent_sibling_selector" "descendant_selector" "attribute_selector" "pseudo_element_selector" "tag_name" "string_value" "universal_selector" "sibling_selector" "child_selector"))) - ("sibling_selector" (:*unnamed* ("pseudo_class_selector" "namespace_selector" "id_selector" "class_selector" "nesting_selector" "adjacent_sibling_selector" "descendant_selector" "attribute_selector" "pseudo_element_selector" "tag_name" "string_value" "universal_selector" "sibling_selector" "child_selector"))) + ("selector_query" (:*unnamed* ("class_selector" "sibling_selector" "descendant_selector" "attribute_selector" "namespace_selector" "nesting_selector" "tag_name" "child_selector" "id_selector" "adjacent_sibling_selector" "pseudo_element_selector" "universal_selector" "string_value" "pseudo_class_selector"))) + ("selectors" (:*unnamed* ("class_selector" "sibling_selector" "descendant_selector" "attribute_selector" "namespace_selector" "nesting_selector" "tag_name" "child_selector" "id_selector" "adjacent_sibling_selector" "pseudo_element_selector" "universal_selector" "string_value" "pseudo_class_selector"))) + ("sibling_selector" (:*unnamed* ("class_selector" "sibling_selector" "descendant_selector" "attribute_selector" "namespace_selector" "nesting_selector" "tag_name" "child_selector" "id_selector" "adjacent_sibling_selector" "pseudo_element_selector" "universal_selector" "string_value" "pseudo_class_selector"))) ("string_value" (:*unnamed* nil)) - ("stylesheet" (:*unnamed* ("rule_set" "keyframes_statement" "supports_statement" "declaration" "import_statement" "media_statement" "at_rule" "charset_statement" "namespace_statement"))) - ("supports_statement" (:*unnamed* ("selector_query" "binary_query" "parenthesized_query" "block" "unary_query" "feature_query" "keyword_query"))) + ("stylesheet" (:*unnamed* ("keyframes_statement" "supports_statement" "at_rule" "namespace_statement" "import_statement" "media_statement" "rule_set" "declaration" "charset_statement"))) + ("supports_statement" (:*unnamed* ("feature_query" "keyword_query" "parenthesized_query" "block" "unary_query" "selector_query" "binary_query"))) ("tag_name" (:*unnamed* nil)) ("to" (:*unnamed* nil)) - ("unary_query" (:*unnamed* ("binary_query" "parenthesized_query" "selector_query" "unary_query" "feature_query" "keyword_query"))) + ("unary_query" (:*unnamed* ("feature_query" "keyword_query" "parenthesized_query" "unary_query" "selector_query" "binary_query"))) ("unit" (:*unnamed* nil)) ("universal_selector" (:*unnamed* nil)) )) ;; END Production rules for css ;; START Inverse production rules for css (defconst combobulate-rules-css-inverse - '(("adjacent_sibling_selector" ("pseudo_class_selector" "namespace_selector" "id_selector" "selectors" "selector_query" "class_selector" "adjacent_sibling_selector" "attribute_selector" "descendant_selector" "pseudo_element_selector" "attribute_name" "arguments" "sibling_selector" "child_selector")) - ("arguments" ("pseudo_class_selector" "pseudo_element_selector" "call_expression")) - ("at_keyword" ("at_rule" "postcss_statement" "keyframes_statement")) - ("at_rule" ("block" "stylesheet")) + '(("adjacent_sibling_selector" ("class_selector" "sibling_selector" "attribute_selector" "descendant_selector" "namespace_selector" "selectors" "selector_query" "child_selector" "id_selector" "attribute_name" "adjacent_sibling_selector" "pseudo_element_selector" "arguments" "pseudo_class_selector")) + ("arguments" ("pseudo_element_selector" "pseudo_class_selector" "call_expression")) + ("at_keyword" ("postcss_statement" "at_rule" "keyframes_statement")) + ("at_rule" ("stylesheet" "block")) ("attribute_name" ("attribute_selector")) - ("attribute_selector" ("pseudo_class_selector" "namespace_selector" "id_selector" "selectors" "selector_query" "class_selector" "adjacent_sibling_selector" "attribute_selector" "descendant_selector" "pseudo_element_selector" "attribute_name" "arguments" "sibling_selector" "child_selector")) - ("binary_expression" ("parenthesized_value" "declaration" "attribute_selector" "feature_query" "import_statement" "binary_expression" "arguments" "charset_statement" "postcss_statement" "grid_value")) - ("binary_query" ("binary_query" "supports_statement" "unary_query" "import_statement" "media_statement" "at_rule" "parenthesized_query")) - ("block" ("rule_set" "supports_statement" "media_statement" "at_rule" "keyframe_block")) - ("call_expression" ("parenthesized_value" "declaration" "attribute_selector" "feature_query" "import_statement" "binary_expression" "arguments" "charset_statement" "namespace_statement" "postcss_statement" "grid_value")) - ("charset_statement" ("block" "stylesheet")) - ("child_selector" ("pseudo_class_selector" "namespace_selector" "id_selector" "selectors" "selector_query" "class_selector" "adjacent_sibling_selector" "attribute_selector" "descendant_selector" "pseudo_element_selector" "attribute_name" "arguments" "sibling_selector" "child_selector")) - ("class_name" ("pseudo_class_selector" "class_selector")) - ("class_selector" ("pseudo_class_selector" "namespace_selector" "id_selector" "selectors" "selector_query" "class_selector" "adjacent_sibling_selector" "attribute_selector" "descendant_selector" "pseudo_element_selector" "attribute_name" "arguments" "sibling_selector" "child_selector")) - ("color_value" ("parenthesized_value" "declaration" "attribute_selector" "feature_query" "import_statement" "binary_expression" "arguments" "charset_statement" "postcss_statement" "grid_value")) - ("declaration" ("block" "stylesheet")) - ("descendant_selector" ("pseudo_class_selector" "namespace_selector" "id_selector" "selectors" "selector_query" "class_selector" "adjacent_sibling_selector" "attribute_selector" "descendant_selector" "pseudo_element_selector" "attribute_name" "arguments" "sibling_selector" "child_selector")) + ("attribute_selector" ("class_selector" "sibling_selector" "attribute_selector" "descendant_selector" "namespace_selector" "selectors" "selector_query" "child_selector" "id_selector" "attribute_name" "adjacent_sibling_selector" "pseudo_element_selector" "arguments" "pseudo_class_selector")) + ("binary_expression" ("grid_value" "parenthesized_value" "attribute_selector" "feature_query" "binary_expression" "charset_statement" "import_statement" "declaration" "arguments" "postcss_statement")) + ("binary_query" ("parenthesized_query" "supports_statement" "at_rule" "import_statement" "media_statement" "unary_query" "binary_query")) + ("block" ("supports_statement" "at_rule" "keyframe_block" "rule_set" "media_statement")) + ("call_expression" ("grid_value" "parenthesized_value" "attribute_selector" "namespace_statement" "feature_query" "binary_expression" "charset_statement" "import_statement" "declaration" "arguments" "postcss_statement")) + ("charset_statement" ("stylesheet" "block")) + ("child_selector" ("class_selector" "sibling_selector" "attribute_selector" "descendant_selector" "namespace_selector" "selectors" "selector_query" "child_selector" "id_selector" "attribute_name" "adjacent_sibling_selector" "pseudo_element_selector" "arguments" "pseudo_class_selector")) + ("class_name" ("class_selector" "pseudo_class_selector")) + ("class_selector" ("class_selector" "sibling_selector" "attribute_selector" "descendant_selector" "namespace_selector" "selectors" "selector_query" "child_selector" "id_selector" "attribute_name" "adjacent_sibling_selector" "pseudo_element_selector" "arguments" "pseudo_class_selector")) + ("color_value" ("grid_value" "parenthesized_value" "attribute_selector" "feature_query" "binary_expression" "charset_statement" "import_statement" "declaration" "arguments" "postcss_statement")) + ("declaration" ("stylesheet" "block")) + ("descendant_selector" ("class_selector" "sibling_selector" "attribute_selector" "descendant_selector" "namespace_selector" "selectors" "selector_query" "child_selector" "id_selector" "attribute_name" "adjacent_sibling_selector" "pseudo_element_selector" "arguments" "pseudo_class_selector")) ("feature_name" ("feature_query")) - ("feature_query" ("binary_query" "supports_statement" "unary_query" "import_statement" "media_statement" "at_rule" "parenthesized_query")) - ("float_value" ("parenthesized_value" "declaration" "attribute_selector" "feature_query" "import_statement" "binary_expression" "arguments" "charset_statement" "postcss_statement" "grid_value")) + ("feature_query" ("parenthesized_query" "supports_statement" "at_rule" "import_statement" "media_statement" "unary_query" "binary_query")) + ("float_value" ("grid_value" "parenthesized_value" "attribute_selector" "feature_query" "binary_expression" "charset_statement" "import_statement" "declaration" "arguments" "postcss_statement")) ("from" ("keyframe_block")) ("function_name" ("call_expression")) - ("grid_value" ("parenthesized_value" "declaration" "attribute_selector" "feature_query" "import_statement" "binary_expression" "arguments" "charset_statement" "postcss_statement" "grid_value")) + ("grid_value" ("grid_value" "parenthesized_value" "attribute_selector" "feature_query" "binary_expression" "charset_statement" "import_statement" "declaration" "arguments" "postcss_statement")) ("id_name" ("id_selector")) - ("id_selector" ("pseudo_class_selector" "namespace_selector" "id_selector" "selectors" "selector_query" "class_selector" "adjacent_sibling_selector" "attribute_selector" "descendant_selector" "pseudo_element_selector" "attribute_name" "arguments" "sibling_selector" "child_selector")) - ("import_statement" ("block" "stylesheet")) - ("important" ("parenthesized_value" "declaration" "attribute_selector" "feature_query" "import_statement" "binary_expression" "arguments" "charset_statement" "postcss_statement" "grid_value")) - ("integer_value" ("parenthesized_value" "declaration" "attribute_selector" "feature_query" "import_statement" "binary_expression" "arguments" "charset_statement" "keyframe_block" "postcss_statement" "grid_value")) + ("id_selector" ("class_selector" "sibling_selector" "attribute_selector" "descendant_selector" "namespace_selector" "selectors" "selector_query" "child_selector" "id_selector" "attribute_name" "adjacent_sibling_selector" "pseudo_element_selector" "arguments" "pseudo_class_selector")) + ("import_statement" ("stylesheet" "block")) + ("important" ("grid_value" "parenthesized_value" "attribute_selector" "feature_query" "binary_expression" "charset_statement" "import_statement" "declaration" "arguments" "postcss_statement")) + ("integer_value" ("grid_value" "parenthesized_value" "attribute_selector" "feature_query" "keyframe_block" "binary_expression" "charset_statement" "import_statement" "declaration" "arguments" "postcss_statement")) ("keyframe_block" ("keyframe_block_list")) ("keyframe_block_list" ("keyframes_statement")) ("keyframes_name" ("keyframes_statement")) - ("keyframes_statement" ("block" "stylesheet")) - ("keyword_query" ("binary_query" "supports_statement" "unary_query" "import_statement" "media_statement" "at_rule" "parenthesized_query")) - ("media_statement" ("block" "stylesheet")) + ("keyframes_statement" ("stylesheet" "block")) + ("keyword_query" ("parenthesized_query" "supports_statement" "at_rule" "import_statement" "media_statement" "unary_query" "binary_query")) + ("media_statement" ("stylesheet" "block")) ("namespace_name" ("namespace_statement")) - ("namespace_selector" ("pseudo_class_selector" "namespace_selector" "id_selector" "selectors" "selector_query" "class_selector" "adjacent_sibling_selector" "attribute_selector" "descendant_selector" "pseudo_element_selector" "attribute_name" "arguments" "sibling_selector" "child_selector")) - ("namespace_statement" ("block" "stylesheet")) - ("nesting_selector" ("pseudo_class_selector" "namespace_selector" "id_selector" "selectors" "selector_query" "class_selector" "adjacent_sibling_selector" "attribute_selector" "descendant_selector" "pseudo_element_selector" "attribute_name" "arguments" "sibling_selector" "child_selector")) - ("parenthesized_query" ("binary_query" "supports_statement" "unary_query" "import_statement" "media_statement" "at_rule" "parenthesized_query")) - ("parenthesized_value" ("parenthesized_value" "declaration" "attribute_selector" "feature_query" "import_statement" "binary_expression" "arguments" "charset_statement" "postcss_statement" "grid_value")) - ("plain_value" ("parenthesized_value" "declaration" "attribute_selector" "feature_query" "import_statement" "binary_expression" "arguments" "charset_statement" "postcss_statement" "grid_value")) + ("namespace_selector" ("class_selector" "sibling_selector" "attribute_selector" "descendant_selector" "namespace_selector" "selectors" "selector_query" "child_selector" "id_selector" "attribute_name" "adjacent_sibling_selector" "pseudo_element_selector" "arguments" "pseudo_class_selector")) + ("namespace_statement" ("stylesheet" "block")) + ("nesting_selector" ("class_selector" "sibling_selector" "attribute_selector" "descendant_selector" "namespace_selector" "selectors" "selector_query" "child_selector" "id_selector" "attribute_name" "adjacent_sibling_selector" "pseudo_element_selector" "arguments" "pseudo_class_selector")) + ("parenthesized_query" ("parenthesized_query" "supports_statement" "at_rule" "import_statement" "media_statement" "unary_query" "binary_query")) + ("parenthesized_value" ("grid_value" "parenthesized_value" "attribute_selector" "feature_query" "binary_expression" "charset_statement" "import_statement" "declaration" "arguments" "postcss_statement")) + ("plain_value" ("grid_value" "parenthesized_value" "attribute_selector" "feature_query" "binary_expression" "charset_statement" "import_statement" "declaration" "arguments" "postcss_statement")) ("postcss_statement" ("block")) ("property_name" ("declaration")) - ("pseudo_class_selector" ("pseudo_class_selector" "namespace_selector" "id_selector" "selectors" "selector_query" "class_selector" "adjacent_sibling_selector" "attribute_selector" "descendant_selector" "pseudo_element_selector" "attribute_name" "arguments" "sibling_selector" "child_selector")) - ("pseudo_element_selector" ("pseudo_class_selector" "namespace_selector" "id_selector" "selectors" "selector_query" "class_selector" "adjacent_sibling_selector" "attribute_selector" "descendant_selector" "pseudo_element_selector" "attribute_name" "arguments" "sibling_selector" "child_selector")) - ("rule_set" ("block" "stylesheet")) - ("selector_query" ("binary_query" "supports_statement" "unary_query" "import_statement" "media_statement" "at_rule" "parenthesized_query")) + ("pseudo_class_selector" ("class_selector" "sibling_selector" "attribute_selector" "descendant_selector" "namespace_selector" "selectors" "selector_query" "child_selector" "id_selector" "attribute_name" "adjacent_sibling_selector" "pseudo_element_selector" "arguments" "pseudo_class_selector")) + ("pseudo_element_selector" ("class_selector" "sibling_selector" "attribute_selector" "descendant_selector" "namespace_selector" "selectors" "selector_query" "child_selector" "id_selector" "attribute_name" "adjacent_sibling_selector" "pseudo_element_selector" "arguments" "pseudo_class_selector")) + ("rule_set" ("stylesheet" "block")) + ("selector_query" ("parenthesized_query" "supports_statement" "at_rule" "import_statement" "media_statement" "unary_query" "binary_query")) ("selectors" ("rule_set")) - ("sibling_selector" ("pseudo_class_selector" "namespace_selector" "id_selector" "selectors" "selector_query" "class_selector" "adjacent_sibling_selector" "attribute_selector" "descendant_selector" "pseudo_element_selector" "attribute_name" "arguments" "sibling_selector" "child_selector")) - ("string_value" ("namespace_selector" "id_selector" "attribute_selector" "declaration" "postcss_statement" "grid_value" "pseudo_class_selector" "binary_expression" "charset_statement" "parenthesized_value" "import_statement" "pseudo_element_selector" "child_selector" "selectors" "selector_query" "class_selector" "adjacent_sibling_selector" "descendant_selector" "feature_query" "attribute_name" "arguments" "sibling_selector" "namespace_statement")) - ("supports_statement" ("block" "stylesheet")) - ("tag_name" ("pseudo_class_selector" "namespace_selector" "id_selector" "selectors" "selector_query" "class_selector" "adjacent_sibling_selector" "attribute_selector" "descendant_selector" "pseudo_element_selector" "attribute_name" "arguments" "sibling_selector" "child_selector")) + ("sibling_selector" ("class_selector" "sibling_selector" "attribute_selector" "descendant_selector" "namespace_selector" "selectors" "selector_query" "child_selector" "id_selector" "attribute_name" "adjacent_sibling_selector" "pseudo_element_selector" "arguments" "pseudo_class_selector")) + ("string_value" ("attribute_selector" "descendant_selector" "postcss_statement" "class_selector" "namespace_selector" "selector_query" "id_selector" "namespace_statement" "charset_statement" "arguments" "child_selector" "attribute_name" "binary_expression" "pseudo_element_selector" "selectors" "grid_value" "parenthesized_value" "sibling_selector" "feature_query" "adjacent_sibling_selector" "import_statement" "declaration" "pseudo_class_selector")) + ("supports_statement" ("stylesheet" "block")) + ("tag_name" ("class_selector" "sibling_selector" "attribute_selector" "descendant_selector" "namespace_selector" "selectors" "selector_query" "child_selector" "id_selector" "attribute_name" "adjacent_sibling_selector" "pseudo_element_selector" "arguments" "pseudo_class_selector")) ("to" ("keyframe_block")) - ("unary_query" ("binary_query" "supports_statement" "unary_query" "import_statement" "media_statement" "at_rule" "parenthesized_query")) - ("unit" ("float_value" "integer_value")) - ("universal_selector" ("pseudo_class_selector" "namespace_selector" "id_selector" "selectors" "selector_query" "class_selector" "adjacent_sibling_selector" "attribute_selector" "descendant_selector" "pseudo_element_selector" "attribute_name" "arguments" "sibling_selector" "child_selector")) + ("unary_query" ("parenthesized_query" "supports_statement" "at_rule" "import_statement" "media_statement" "unary_query" "binary_query")) + ("unit" ("integer_value" "float_value")) + ("universal_selector" ("class_selector" "sibling_selector" "attribute_selector" "descendant_selector" "namespace_selector" "selectors" "selector_query" "child_selector" "id_selector" "attribute_name" "adjacent_sibling_selector" "pseudo_element_selector" "arguments" "pseudo_class_selector")) ) ) ;; END Inverse production rules for css @@ -620,160 +620,160 @@ ;; START Production rules for typescript (defconst combobulate-rules-typescript - '(("_primary_type" (:*unnamed* ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "index_type_query" "nested_type_identifier" "predefined_type" "type_identifier" "object_type" "flow_maybe_type" "tuple_type"))) + '(("_primary_type" (:*unnamed* ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "this_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "template_literal_type" "type_query"))) ("abstract_class_declaration" (:*unnamed* ("class_heritage") :body ("class_body") :decorator ("decorator") :name ("type_identifier") :type_parameters ("type_parameters"))) - ("abstract_method_signature" (:*unnamed* ("accessibility_modifier") :name ("computed_property_name" "string" "property_identifier" "private_property_identifier" "number") :parameters ("formal_parameters") :return_type ("type_annotation" "asserts_annotation" "type_predicate_annotation") :type_parameters ("type_parameters"))) + ("abstract_method_signature" (:*unnamed* ("accessibility_modifier") :name ("string" "private_property_identifier" "computed_property_name" "number" "property_identifier") :parameters ("formal_parameters") :return_type ("type_predicate_annotation" "asserts_annotation" "type_annotation") :type_parameters ("type_parameters"))) ("accessibility_modifier" (:*unnamed* nil)) - ("ambient_declaration" (:*unnamed* ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "property_identifier" "array_type" "intersection_type" "declaration" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "statement_block" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "tuple_type" "readonly_type"))) + ("ambient_declaration" (:*unnamed* ("predefined_type" "object_type" "union_type" "property_identifier" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "statement_block" "template_literal_type" "readonly_type" "declaration" "type_query"))) ("arguments" (:*unnamed* ("spread_element" "expression"))) ("array" (:*unnamed* ("spread_element" "expression"))) - ("array_pattern" (:*unnamed* ("assignment_pattern" "pattern"))) - ("array_type" (:*unnamed* ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "index_type_query" "nested_type_identifier" "predefined_type" "type_identifier" "object_type" "flow_maybe_type" "tuple_type"))) - ("arrow_function" (:*unnamed* nil :body ("expression" "statement_block") :parameter ("identifier") :parameters ("formal_parameters") :return_type ("type_annotation" "asserts_annotation" "type_predicate_annotation") :type_parameters ("type_parameters"))) - ("as_expression" (:*unnamed* ("union_type" "expression" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "tuple_type" "readonly_type"))) - ("asserts" (:*unnamed* ("this" "type_predicate" "identifier"))) + ("array_pattern" (:*unnamed* ("pattern" "assignment_pattern"))) + ("array_type" (:*unnamed* ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "this_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "template_literal_type" "type_query"))) + ("arrow_function" (:*unnamed* nil :body ("statement_block" "expression") :parameter ("identifier") :parameters ("formal_parameters") :return_type ("type_predicate_annotation" "asserts_annotation" "type_annotation") :type_parameters ("type_parameters"))) + ("as_expression" (:*unnamed* ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "expression" "type_query"))) + ("asserts" (:*unnamed* ("identifier" "this" "type_predicate"))) ("asserts_annotation" (:*unnamed* ("asserts"))) - ("assignment_expression" (:*unnamed* nil :left ("object_pattern" "subscript_expression" "member_expression" "identifier" "parenthesized_expression" "non_null_expression" "undefined" "array_pattern") :right ("expression"))) + ("assignment_expression" (:*unnamed* nil :left ("identifier" "object_pattern" "member_expression" "undefined" "non_null_expression" "array_pattern" "subscript_expression" "parenthesized_expression") :right ("expression"))) ("assignment_pattern" (:*unnamed* nil :left ("pattern") :right ("expression"))) - ("augmented_assignment_expression" (:*unnamed* nil :left ("parenthesized_expression" "non_null_expression" "subscript_expression" "identifier" "member_expression") :operator nil :right ("expression"))) + ("augmented_assignment_expression" (:*unnamed* nil :left ("identifier" "subscript_expression" "member_expression" "parenthesized_expression" "non_null_expression") :operator nil :right ("expression"))) ("await_expression" (:*unnamed* ("expression"))) ("binary_expression" (:*unnamed* nil :left ("expression") :operator nil :right ("expression"))) ("break_statement" (:*unnamed* nil :label ("statement_identifier"))) - ("call_expression" (:*unnamed* nil :arguments ("template_string" "arguments") :function ("expression") :type_arguments ("type_arguments"))) - ("call_signature" (:*unnamed* nil :parameters ("formal_parameters") :return_type ("type_annotation" "asserts_annotation" "type_predicate_annotation") :type_parameters ("type_parameters"))) - ("catch_clause" (:*unnamed* nil :body ("statement_block") :parameter ("array_pattern" "object_pattern" "identifier") :type ("type_annotation"))) + ("call_expression" (:*unnamed* nil :arguments ("arguments" "template_string") :function ("expression") :type_arguments ("type_arguments"))) + ("call_signature" (:*unnamed* nil :parameters ("formal_parameters") :return_type ("type_predicate_annotation" "asserts_annotation" "type_annotation") :type_parameters ("type_parameters"))) + ("catch_clause" (:*unnamed* nil :body ("statement_block") :parameter ("identifier" "object_pattern" "array_pattern") :type ("type_annotation"))) ("class" (:*unnamed* ("class_heritage") :body ("class_body") :decorator ("decorator") :name ("type_identifier") :type_parameters ("type_parameters"))) - ("class_body" (:*unnamed* ("index_signature" "method_signature" "decorator" "class_static_block" "public_field_definition" "method_definition" "abstract_method_signature"))) + ("class_body" (:*unnamed* ("decorator" "abstract_method_signature" "class_static_block" "public_field_definition" "index_signature" "method_signature" "method_definition"))) ("class_declaration" (:*unnamed* ("class_heritage") :body ("class_body") :decorator ("decorator") :name ("type_identifier") :type_parameters ("type_parameters"))) - ("class_heritage" (:*unnamed* ("implements_clause" "extends_clause"))) + ("class_heritage" (:*unnamed* ("extends_clause" "implements_clause"))) ("class_static_block" (:*unnamed* nil :body ("statement_block"))) ("comment" (:*unnamed* nil)) ("computed_property_name" (:*unnamed* ("expression"))) - ("conditional_type" (:*unnamed* nil :alternative ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "tuple_type" "readonly_type") :consequence ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "tuple_type" "readonly_type") :left ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "tuple_type" "readonly_type") :right ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "tuple_type" "readonly_type"))) - ("constraint" (:*unnamed* ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "tuple_type" "readonly_type"))) + ("conditional_type" (:*unnamed* nil :alternative ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "type_query") :consequence ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "type_query") :left ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "type_query") :right ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "type_query"))) + ("constraint" (:*unnamed* ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "type_query"))) ("construct_signature" (:*unnamed* nil :parameters ("formal_parameters") :type ("type_annotation") :type_parameters ("type_parameters"))) - ("constructor_type" (:*unnamed* nil :parameters ("formal_parameters") :type ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "tuple_type" "readonly_type") :type_parameters ("type_parameters"))) + ("constructor_type" (:*unnamed* nil :parameters ("formal_parameters") :type ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "type_query") :type_parameters ("type_parameters"))) ("continue_statement" (:*unnamed* nil :label ("statement_identifier"))) ("debugger_statement" (:*unnamed* nil)) - ("declaration" (:*unnamed* ("generator_function_declaration" "interface_declaration" "abstract_class_declaration" "function_declaration" "internal_module" "ambient_declaration" "enum_declaration" "module" "function_signature" "type_alias_declaration" "class_declaration" "import_alias" "variable_declaration" "lexical_declaration"))) - ("decorator" (:*unnamed* ("member_expression" "identifier" "call_expression"))) - ("default_type" (:*unnamed* ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "tuple_type" "readonly_type"))) + ("declaration" (:*unnamed* ("lexical_declaration" "type_alias_declaration" "variable_declaration" "interface_declaration" "internal_module" "enum_declaration" "import_alias" "function_declaration" "function_signature" "ambient_declaration" "generator_function_declaration" "class_declaration" "abstract_class_declaration" "module"))) + ("decorator" (:*unnamed* ("identifier" "member_expression" "call_expression"))) + ("default_type" (:*unnamed* ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "type_query"))) ("do_statement" (:*unnamed* nil :body ("statement") :condition ("parenthesized_expression"))) ("else_clause" (:*unnamed* ("statement"))) ("empty_statement" (:*unnamed* nil)) - ("enum_assignment" (:*unnamed* nil :name ("computed_property_name" "string" "property_identifier" "private_property_identifier" "number") :value ("expression"))) - ("enum_body" (:*unnamed* ("enum_assignment") :name ("computed_property_name" "string" "property_identifier" "private_property_identifier" "number"))) + ("enum_assignment" (:*unnamed* nil :name ("string" "private_property_identifier" "computed_property_name" "number" "property_identifier") :value ("expression"))) + ("enum_body" (:*unnamed* ("enum_assignment") :name ("string" "private_property_identifier" "computed_property_name" "number" "property_identifier"))) ("enum_declaration" (:*unnamed* nil :body ("enum_body") :name ("identifier"))) ("escape_sequence" (:*unnamed* nil)) ("existential_type" (:*unnamed* nil)) ("export_clause" (:*unnamed* ("export_specifier"))) ("export_specifier" (:*unnamed* nil :alias ("string" "identifier") :name ("string" "identifier"))) - ("export_statement" (:*unnamed* ("namespace_export" "expression" "identifier" "export_clause") :declaration ("declaration") :decorator ("decorator") :source ("string") :value ("expression"))) - ("expression" (:*unnamed* ("yield_expression" "primary_expression" "await_expression" "update_expression" "glimmer_template" "ternary_expression" "type_assertion" "unary_expression" "instantiation_expression" "assignment_expression" "as_expression" "augmented_assignment_expression" "internal_module" "binary_expression" "new_expression" "satisfies_expression"))) + ("export_statement" (:*unnamed* ("namespace_export" "identifier" "export_clause" "expression") :declaration ("declaration") :decorator ("decorator") :source ("string") :value ("expression"))) + ("expression" (:*unnamed* ("unary_expression" "assignment_expression" "type_assertion" "glimmer_template" "binary_expression" "new_expression" "update_expression" "await_expression" "instantiation_expression" "augmented_assignment_expression" "internal_module" "ternary_expression" "primary_expression" "as_expression" "yield_expression" "satisfies_expression"))) ("expression_statement" (:*unnamed* ("sequence_expression" "expression"))) ("extends_clause" (:*unnamed* nil :type_arguments ("type_arguments") :value ("expression"))) - ("extends_type_clause" (:*unnamed* nil :type ("type_identifier" "generic_type" "nested_type_identifier"))) + ("extends_type_clause" (:*unnamed* nil :type ("generic_type" "nested_type_identifier" "type_identifier"))) ("false" (:*unnamed* nil)) ("finally_clause" (:*unnamed* nil :body ("statement_block"))) - ("flow_maybe_type" (:*unnamed* ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "index_type_query" "nested_type_identifier" "predefined_type" "type_identifier" "object_type" "flow_maybe_type" "tuple_type"))) - ("for_in_statement" (:*unnamed* nil :body ("statement") :kind nil :left ("object_pattern" "subscript_expression" "member_expression" "identifier" "parenthesized_expression" "non_null_expression" "undefined" "array_pattern") :operator nil :right ("sequence_expression" "expression") :value ("expression"))) - ("for_statement" (:*unnamed* nil :body ("statement") :condition ("expression_statement" "empty_statement") :increment ("sequence_expression" "expression") :initializer ("lexical_declaration" "expression_statement" "empty_statement" "variable_declaration"))) - ("formal_parameters" (:*unnamed* ("optional_parameter" "required_parameter"))) - ("function" (:*unnamed* nil :body ("statement_block") :name ("identifier") :parameters ("formal_parameters") :return_type ("type_annotation" "asserts_annotation" "type_predicate_annotation") :type_parameters ("type_parameters"))) - ("function_declaration" (:*unnamed* nil :body ("statement_block") :name ("identifier") :parameters ("formal_parameters") :return_type ("type_annotation" "asserts_annotation" "type_predicate_annotation") :type_parameters ("type_parameters"))) - ("function_signature" (:*unnamed* nil :name ("identifier") :parameters ("formal_parameters") :return_type ("type_annotation" "asserts_annotation" "type_predicate_annotation") :type_parameters ("type_parameters"))) - ("function_type" (:*unnamed* nil :parameters ("formal_parameters") :return_type ("union_type" "asserts" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "type_predicate" "object_type" "flow_maybe_type" "tuple_type" "readonly_type") :type_parameters ("type_parameters"))) - ("generator_function" (:*unnamed* nil :body ("statement_block") :name ("identifier") :parameters ("formal_parameters") :return_type ("type_annotation" "asserts_annotation" "type_predicate_annotation") :type_parameters ("type_parameters"))) - ("generator_function_declaration" (:*unnamed* nil :body ("statement_block") :name ("identifier") :parameters ("formal_parameters") :return_type ("type_annotation" "asserts_annotation" "type_predicate_annotation") :type_parameters ("type_parameters"))) - ("generic_type" (:*unnamed* nil :name ("type_identifier" "nested_type_identifier") :type_arguments ("type_arguments"))) + ("flow_maybe_type" (:*unnamed* ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "this_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "template_literal_type" "type_query"))) + ("for_in_statement" (:*unnamed* nil :body ("statement") :kind nil :left ("identifier" "object_pattern" "member_expression" "undefined" "non_null_expression" "array_pattern" "subscript_expression" "parenthesized_expression") :operator nil :right ("sequence_expression" "expression") :value ("expression"))) + ("for_statement" (:*unnamed* nil :body ("statement") :condition ("empty_statement" "expression_statement") :increment ("sequence_expression" "expression") :initializer ("lexical_declaration" "empty_statement" "variable_declaration" "expression_statement"))) + ("formal_parameters" (:*unnamed* ("required_parameter" "optional_parameter"))) + ("function" (:*unnamed* nil :body ("statement_block") :name ("identifier") :parameters ("formal_parameters") :return_type ("type_predicate_annotation" "asserts_annotation" "type_annotation") :type_parameters ("type_parameters"))) + ("function_declaration" (:*unnamed* nil :body ("statement_block") :name ("identifier") :parameters ("formal_parameters") :return_type ("type_predicate_annotation" "asserts_annotation" "type_annotation") :type_parameters ("type_parameters"))) + ("function_signature" (:*unnamed* nil :name ("identifier") :parameters ("formal_parameters") :return_type ("type_predicate_annotation" "asserts_annotation" "type_annotation") :type_parameters ("type_parameters"))) + ("function_type" (:*unnamed* nil :parameters ("formal_parameters") :return_type ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "type_predicate" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "asserts" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "type_query") :type_parameters ("type_parameters"))) + ("generator_function" (:*unnamed* nil :body ("statement_block") :name ("identifier") :parameters ("formal_parameters") :return_type ("type_predicate_annotation" "asserts_annotation" "type_annotation") :type_parameters ("type_parameters"))) + ("generator_function_declaration" (:*unnamed* nil :body ("statement_block") :name ("identifier") :parameters ("formal_parameters") :return_type ("type_predicate_annotation" "asserts_annotation" "type_annotation") :type_parameters ("type_parameters"))) + ("generic_type" (:*unnamed* nil :name ("nested_type_identifier" "type_identifier") :type_arguments ("type_arguments"))) ("glimmer_closing_tag" (:*unnamed* nil)) ("glimmer_opening_tag" (:*unnamed* nil)) ("glimmer_template" (:*unnamed* nil :close_tag ("glimmer_closing_tag") :open_tag ("glimmer_opening_tag"))) ("hash_bang_line" (:*unnamed* nil)) ("identifier" (:*unnamed* nil)) ("if_statement" (:*unnamed* nil :alternative ("else_clause") :condition ("parenthesized_expression") :consequence ("statement"))) - ("implements_clause" (:*unnamed* ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "tuple_type" "readonly_type"))) + ("implements_clause" (:*unnamed* ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "type_query"))) ("import" (:*unnamed* nil)) ("import_alias" (:*unnamed* ("nested_identifier" "identifier"))) - ("import_clause" (:*unnamed* ("namespace_import" "named_imports" "identifier"))) + ("import_clause" (:*unnamed* ("identifier" "namespace_import" "named_imports"))) ("import_require_clause" (:*unnamed* ("identifier") :source ("string"))) ("import_specifier" (:*unnamed* nil :alias ("identifier") :name ("string" "identifier"))) ("import_statement" (:*unnamed* ("import_clause" "import_require_clause") :source ("string"))) - ("index_signature" (:*unnamed* ("mapped_type_clause") :index_type ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "tuple_type" "readonly_type") :name ("identifier") :sign nil :type ("type_annotation" "opting_type_annotation" "omitting_type_annotation"))) - ("index_type_query" (:*unnamed* ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "index_type_query" "nested_type_identifier" "predefined_type" "type_identifier" "object_type" "flow_maybe_type" "tuple_type"))) - ("infer_type" (:*unnamed* ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "tuple_type" "readonly_type"))) - ("instantiation_expression" (:*unnamed* ("expression") :function ("import" "member_expression" "subscript_expression" "identifier") :type_arguments ("type_arguments"))) + ("index_signature" (:*unnamed* ("mapped_type_clause") :index_type ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "type_query") :name ("identifier") :sign nil :type ("opting_type_annotation" "omitting_type_annotation" "type_annotation"))) + ("index_type_query" (:*unnamed* ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "this_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "template_literal_type" "type_query"))) + ("infer_type" (:*unnamed* ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "type_query"))) + ("instantiation_expression" (:*unnamed* ("expression") :function ("identifier" "subscript_expression" "member_expression" "import") :type_arguments ("type_arguments"))) ("interface_declaration" (:*unnamed* ("extends_type_clause") :body ("object_type") :name ("type_identifier") :type_parameters ("type_parameters"))) - ("internal_module" (:*unnamed* nil :body ("statement_block") :name ("string" "nested_identifier" "identifier"))) - ("intersection_type" (:*unnamed* ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "tuple_type" "readonly_type"))) - ("jsx_attribute" (:*unnamed* ("jsx_expression" "string" "jsx_namespace_name" "property_identifier" "jsx_self_closing_element" "jsx_element"))) - ("jsx_closing_element" (:*unnamed* nil :name ("member_expression" "jsx_namespace_name" "identifier"))) - ("jsx_element" (:*unnamed* ("jsx_text" "jsx_expression" "jsx_self_closing_element" "jsx_element") :close_tag ("jsx_closing_element") :open_tag ("jsx_opening_element"))) + ("internal_module" (:*unnamed* nil :body ("statement_block") :name ("nested_identifier" "string" "identifier"))) + ("intersection_type" (:*unnamed* ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "type_query"))) + ("jsx_attribute" (:*unnamed* ("string" "jsx_expression" "jsx_element" "property_identifier" "jsx_namespace_name" "jsx_self_closing_element"))) + ("jsx_closing_element" (:*unnamed* nil :name ("jsx_namespace_name" "identifier" "member_expression"))) + ("jsx_element" (:*unnamed* ("jsx_element" "jsx_text" "jsx_self_closing_element" "jsx_expression") :close_tag ("jsx_closing_element") :open_tag ("jsx_opening_element"))) ("jsx_expression" (:*unnamed* ("spread_element" "sequence_expression" "expression"))) ("jsx_namespace_name" (:*unnamed* ("identifier"))) - ("jsx_opening_element" (:*unnamed* nil :attribute ("jsx_expression" "jsx_attribute") :name ("member_expression" "jsx_namespace_name" "identifier") :type_arguments ("type_arguments"))) - ("jsx_self_closing_element" (:*unnamed* nil :attribute ("jsx_expression" "jsx_attribute") :name ("member_expression" "jsx_namespace_name" "identifier") :type_arguments ("type_arguments"))) + ("jsx_opening_element" (:*unnamed* nil :attribute ("jsx_attribute" "jsx_expression") :name ("jsx_namespace_name" "identifier" "member_expression") :type_arguments ("type_arguments"))) + ("jsx_self_closing_element" (:*unnamed* nil :attribute ("jsx_attribute" "jsx_expression") :name ("jsx_namespace_name" "identifier" "member_expression") :type_arguments ("type_arguments"))) ("jsx_text" (:*unnamed* nil)) ("labeled_statement" (:*unnamed* nil :body ("statement") :label ("statement_identifier"))) ("lexical_declaration" (:*unnamed* ("variable_declarator") :kind nil)) - ("literal_type" (:*unnamed* ("null" "true" "number" "string" "unary_expression" "undefined" "false"))) - ("lookup_type" (:*unnamed* ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "tuple_type" "readonly_type"))) - ("mapped_type_clause" (:*unnamed* nil :alias ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "tuple_type" "readonly_type") :name ("type_identifier") :type ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "tuple_type" "readonly_type"))) - ("member_expression" (:*unnamed* ("member_expression" "identifier" "property_identifier") :object ("expression") :optional_chain ("optional_chain") :property ("property_identifier" "private_property_identifier"))) + ("literal_type" (:*unnamed* ("string" "null" "unary_expression" "undefined" "true" "number" "false"))) + ("lookup_type" (:*unnamed* ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "type_query"))) + ("mapped_type_clause" (:*unnamed* nil :alias ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "type_query") :name ("type_identifier") :type ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "type_query"))) + ("member_expression" (:*unnamed* ("property_identifier" "identifier" "member_expression") :object ("expression") :optional_chain ("optional_chain") :property ("private_property_identifier" "property_identifier"))) ("meta_property" (:*unnamed* nil)) - ("method_definition" (:*unnamed* ("override_modifier" "accessibility_modifier") :body ("statement_block") :name ("computed_property_name" "string" "property_identifier" "private_property_identifier" "number") :parameters ("formal_parameters") :return_type ("type_annotation" "asserts_annotation" "type_predicate_annotation") :type_parameters ("type_parameters"))) - ("method_signature" (:*unnamed* ("override_modifier" "accessibility_modifier") :name ("computed_property_name" "string" "property_identifier" "private_property_identifier" "number") :parameters ("formal_parameters") :return_type ("type_annotation" "asserts_annotation" "type_predicate_annotation") :type_parameters ("type_parameters"))) - ("module" (:*unnamed* nil :body ("statement_block") :name ("string" "nested_identifier" "identifier"))) + ("method_definition" (:*unnamed* ("accessibility_modifier" "override_modifier") :body ("statement_block") :name ("string" "private_property_identifier" "computed_property_name" "number" "property_identifier") :parameters ("formal_parameters") :return_type ("type_predicate_annotation" "asserts_annotation" "type_annotation") :type_parameters ("type_parameters"))) + ("method_signature" (:*unnamed* ("accessibility_modifier" "override_modifier") :name ("string" "private_property_identifier" "computed_property_name" "number" "property_identifier") :parameters ("formal_parameters") :return_type ("type_predicate_annotation" "asserts_annotation" "type_annotation") :type_parameters ("type_parameters"))) + ("module" (:*unnamed* nil :body ("statement_block") :name ("nested_identifier" "string" "identifier"))) ("named_imports" (:*unnamed* ("import_specifier"))) ("namespace_export" (:*unnamed* ("string" "identifier"))) ("namespace_import" (:*unnamed* ("identifier"))) - ("nested_identifier" (:*unnamed* ("member_expression" "identifier" "property_identifier"))) + ("nested_identifier" (:*unnamed* ("property_identifier" "identifier" "member_expression"))) ("nested_type_identifier" (:*unnamed* nil :module ("nested_identifier" "identifier") :name ("type_identifier"))) ("new_expression" (:*unnamed* nil :arguments ("arguments") :constructor ("primary_expression") :type_arguments ("type_arguments"))) ("non_null_expression" (:*unnamed* ("expression"))) ("null" (:*unnamed* nil)) ("number" (:*unnamed* nil)) - ("object" (:*unnamed* ("pair" "spread_element" "method_definition" "shorthand_property_identifier"))) - ("object_assignment_pattern" (:*unnamed* nil :left ("shorthand_property_identifier_pattern" "array_pattern" "object_pattern") :right ("expression"))) - ("object_pattern" (:*unnamed* ("rest_pattern" "shorthand_property_identifier_pattern" "object_assignment_pattern" "pair_pattern"))) - ("object_type" (:*unnamed* ("call_signature" "index_signature" "method_signature" "export_statement" "construct_signature" "property_signature"))) - ("omitting_type_annotation" (:*unnamed* ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "tuple_type" "readonly_type"))) - ("opting_type_annotation" (:*unnamed* ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "tuple_type" "readonly_type"))) + ("object" (:*unnamed* ("pair" "spread_element" "shorthand_property_identifier" "method_definition"))) + ("object_assignment_pattern" (:*unnamed* nil :left ("shorthand_property_identifier_pattern" "object_pattern" "array_pattern") :right ("expression"))) + ("object_pattern" (:*unnamed* ("rest_pattern" "object_assignment_pattern" "shorthand_property_identifier_pattern" "pair_pattern"))) + ("object_type" (:*unnamed* ("property_signature" "index_signature" "method_signature" "export_statement" "construct_signature" "call_signature"))) + ("omitting_type_annotation" (:*unnamed* ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "type_query"))) + ("opting_type_annotation" (:*unnamed* ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "type_query"))) ("optional_chain" (:*unnamed* nil)) - ("optional_parameter" (:*unnamed* ("override_modifier" "accessibility_modifier") :decorator ("decorator") :name ("identifier") :pattern ("this" "pattern") :type ("type_annotation") :value ("expression"))) - ("optional_type" (:*unnamed* ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "tuple_type" "readonly_type"))) + ("optional_parameter" (:*unnamed* ("accessibility_modifier" "override_modifier") :decorator ("decorator") :name ("identifier") :pattern ("pattern" "this") :type ("type_annotation") :value ("expression"))) + ("optional_type" (:*unnamed* ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "type_query"))) ("override_modifier" (:*unnamed* nil)) - ("pair" (:*unnamed* nil :key ("computed_property_name" "string" "property_identifier" "private_property_identifier" "number") :value ("expression"))) - ("pair_pattern" (:*unnamed* nil :key ("computed_property_name" "string" "property_identifier" "private_property_identifier" "number") :value ("assignment_pattern" "pattern"))) + ("pair" (:*unnamed* nil :key ("string" "private_property_identifier" "computed_property_name" "number" "property_identifier") :value ("expression"))) + ("pair_pattern" (:*unnamed* nil :key ("string" "private_property_identifier" "computed_property_name" "number" "property_identifier") :value ("pattern" "assignment_pattern"))) ("parenthesized_expression" (:*unnamed* ("sequence_expression" "expression") :type ("type_annotation"))) - ("parenthesized_type" (:*unnamed* ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "tuple_type" "readonly_type"))) - ("pattern" (:*unnamed* ("object_pattern" "subscript_expression" "member_expression" "identifier" "rest_pattern" "non_null_expression" "undefined" "array_pattern"))) + ("parenthesized_type" (:*unnamed* ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "type_query"))) + ("pattern" (:*unnamed* ("identifier" "object_pattern" "member_expression" "undefined" "non_null_expression" "array_pattern" "subscript_expression" "rest_pattern"))) ("predefined_type" (:*unnamed* nil)) - ("primary_expression" (:*unnamed* ("true" "member_expression" "generator_function" "null" "parenthesized_expression" "template_string" "number" "meta_property" "array" "call_expression" "arrow_function" "this" "function" "string" "import" "subscript_expression" "regex" "identifier" "false" "super" "non_null_expression" "undefined" "class" "object"))) + ("primary_expression" (:*unnamed* ("regex" "string" "generator_function" "member_expression" "template_string" "true" "number" "non_null_expression" "arrow_function" "this" "import" "meta_property" "false" "class" "function" "identifier" "undefined" "array" "null" "subscript_expression" "call_expression" "super" "object" "parenthesized_expression"))) ("private_property_identifier" (:*unnamed* nil)) - ("program" (:*unnamed* ("hash_bang_line" "statement"))) + ("program" (:*unnamed* ("statement" "hash_bang_line"))) ("property_identifier" (:*unnamed* nil)) - ("property_signature" (:*unnamed* ("override_modifier" "accessibility_modifier") :name ("computed_property_name" "string" "property_identifier" "private_property_identifier" "number") :type ("type_annotation"))) - ("public_field_definition" (:*unnamed* ("override_modifier" "accessibility_modifier") :name ("computed_property_name" "string" "property_identifier" "private_property_identifier" "number") :type ("type_annotation") :value ("expression"))) - ("readonly_type" (:*unnamed* ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "tuple_type" "readonly_type"))) + ("property_signature" (:*unnamed* ("accessibility_modifier" "override_modifier") :name ("string" "private_property_identifier" "computed_property_name" "number" "property_identifier") :type ("type_annotation"))) + ("public_field_definition" (:*unnamed* ("accessibility_modifier" "override_modifier") :name ("string" "private_property_identifier" "computed_property_name" "number" "property_identifier") :type ("type_annotation") :value ("expression"))) + ("readonly_type" (:*unnamed* ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "type_query"))) ("regex" (:*unnamed* nil :flags ("regex_flags") :pattern ("regex_pattern"))) ("regex_flags" (:*unnamed* nil)) ("regex_pattern" (:*unnamed* nil)) - ("required_parameter" (:*unnamed* ("override_modifier" "accessibility_modifier") :decorator ("decorator") :name ("rest_pattern" "identifier") :pattern ("this" "pattern") :type ("type_annotation") :value ("expression"))) - ("rest_pattern" (:*unnamed* ("identifier" "non_null_expression" "undefined" "subscript_expression" "object_pattern" "array_pattern" "member_expression"))) - ("rest_type" (:*unnamed* ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "tuple_type" "readonly_type"))) + ("required_parameter" (:*unnamed* ("accessibility_modifier" "override_modifier") :decorator ("decorator") :name ("rest_pattern" "identifier") :pattern ("pattern" "this") :type ("type_annotation") :value ("expression"))) + ("rest_pattern" (:*unnamed* ("identifier" "object_pattern" "member_expression" "subscript_expression" "undefined" "non_null_expression" "array_pattern"))) + ("rest_type" (:*unnamed* ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "type_query"))) ("return_statement" (:*unnamed* ("sequence_expression" "expression"))) - ("satisfies_expression" (:*unnamed* ("union_type" "expression" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "tuple_type" "readonly_type"))) + ("satisfies_expression" (:*unnamed* ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "expression" "type_query"))) ("sequence_expression" (:*unnamed* nil :left ("expression") :right ("sequence_expression" "expression"))) ("shorthand_property_identifier" (:*unnamed* nil)) ("shorthand_property_identifier_pattern" (:*unnamed* nil)) ("spread_element" (:*unnamed* ("expression"))) - ("statement" (:*unnamed* ("if_statement" "with_statement" "throw_statement" "empty_statement" "return_statement" "while_statement" "import_statement" "break_statement" "continue_statement" "for_in_statement" "declaration" "for_statement" "switch_statement" "do_statement" "statement_block" "debugger_statement" "export_statement" "expression_statement" "labeled_statement" "try_statement"))) + ("statement" (:*unnamed* ("throw_statement" "if_statement" "empty_statement" "with_statement" "labeled_statement" "while_statement" "do_statement" "debugger_statement" "break_statement" "continue_statement" "expression_statement" "return_statement" "try_statement" "export_statement" "for_in_statement" "statement_block" "import_statement" "declaration" "for_statement" "switch_statement"))) ("statement_block" (:*unnamed* ("statement"))) ("statement_identifier" (:*unnamed* nil)) ("string" (:*unnamed* ("escape_sequence" "string_fragment"))) ("string_fragment" (:*unnamed* nil)) - ("subscript_expression" (:*unnamed* nil :index ("predefined_type" "string" "expression" "number" "sequence_expression") :object ("expression") :optional_chain ("optional_chain"))) + ("subscript_expression" (:*unnamed* nil :index ("predefined_type" "string" "sequence_expression" "expression" "number") :object ("expression") :optional_chain ("optional_chain"))) ("super" (:*unnamed* nil)) ("switch_body" (:*unnamed* ("switch_default" "switch_case"))) ("switch_case" (:*unnamed* nil :body ("statement") :value ("sequence_expression" "expression"))) @@ -782,30 +782,30 @@ ("template_literal_type" (:*unnamed* ("template_type"))) ("template_string" (:*unnamed* ("escape_sequence" "template_substitution"))) ("template_substitution" (:*unnamed* ("sequence_expression" "expression"))) - ("template_type" (:*unnamed* ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "type_identifier" "object_type" "flow_maybe_type" "tuple_type"))) + ("template_type" (:*unnamed* ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "this_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "type_query"))) ("ternary_expression" (:*unnamed* nil :alternative ("expression") :condition ("expression") :consequence ("expression"))) ("this" (:*unnamed* nil)) ("this_type" (:*unnamed* nil)) ("throw_statement" (:*unnamed* ("sequence_expression" "expression"))) ("true" (:*unnamed* nil)) ("try_statement" (:*unnamed* nil :body ("statement_block") :finalizer ("finally_clause") :handler ("catch_clause"))) - ("tuple_type" (:*unnamed* ("union_type" "optional_parameter" "template_literal_type" "lookup_type" "conditional_type" "optional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "rest_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "required_parameter" "tuple_type" "readonly_type"))) - ("type_alias_declaration" (:*unnamed* nil :name ("type_identifier") :type_parameters ("type_parameters") :value ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "tuple_type" "readonly_type"))) - ("type_annotation" (:*unnamed* ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "tuple_type" "readonly_type"))) - ("type_arguments" (:*unnamed* ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "tuple_type" "readonly_type"))) + ("tuple_type" (:*unnamed* ("predefined_type" "object_type" "union_type" "required_parameter" "optional_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "rest_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "optional_parameter" "type_query"))) + ("type_alias_declaration" (:*unnamed* nil :name ("type_identifier") :type_parameters ("type_parameters") :value ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "type_query"))) + ("type_annotation" (:*unnamed* ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "type_query"))) + ("type_arguments" (:*unnamed* ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "type_query"))) ("type_assertion" (:*unnamed* ("type_arguments" "expression"))) ("type_identifier" (:*unnamed* nil)) ("type_parameter" (:*unnamed* nil :constraint ("constraint") :name ("type_identifier") :value ("default_type"))) ("type_parameters" (:*unnamed* ("type_parameter"))) - ("type_predicate" (:*unnamed* nil :name ("this" "identifier") :type ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "tuple_type" "readonly_type"))) + ("type_predicate" (:*unnamed* nil :name ("identifier" "this") :type ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "type_query"))) ("type_predicate_annotation" (:*unnamed* ("type_predicate"))) - ("type_query" (:*unnamed* ("instantiation_expression" "subscript_expression" "identifier" "member_expression" "call_expression"))) - ("unary_expression" (:*unnamed* nil :argument ("expression" "number") :operator nil)) + ("type_query" (:*unnamed* ("identifier" "subscript_expression" "member_expression" "call_expression" "instantiation_expression"))) + ("unary_expression" (:*unnamed* nil :argument ("number" "expression") :operator nil)) ("undefined" (:*unnamed* nil)) - ("union_type" (:*unnamed* ("union_type" "template_literal_type" "lookup_type" "conditional_type" "this_type" "array_type" "intersection_type" "generic_type" "parenthesized_type" "existential_type" "literal_type" "type_query" "infer_type" "index_type_query" "nested_type_identifier" "predefined_type" "constructor_type" "type_identifier" "function_type" "object_type" "flow_maybe_type" "tuple_type" "readonly_type"))) + ("union_type" (:*unnamed* ("predefined_type" "object_type" "union_type" "flow_maybe_type" "parenthesized_type" "nested_type_identifier" "conditional_type" "type_identifier" "constructor_type" "this_type" "function_type" "intersection_type" "array_type" "lookup_type" "generic_type" "literal_type" "index_type_query" "tuple_type" "existential_type" "infer_type" "template_literal_type" "readonly_type" "type_query"))) ("update_expression" (:*unnamed* nil :argument ("expression") :operator nil)) ("variable_declaration" (:*unnamed* ("variable_declarator"))) - ("variable_declarator" (:*unnamed* nil :name ("array_pattern" "object_pattern" "identifier") :type ("type_annotation") :value ("expression"))) + ("variable_declarator" (:*unnamed* nil :name ("identifier" "object_pattern" "array_pattern") :type ("type_annotation") :value ("expression"))) ("while_statement" (:*unnamed* nil :body ("statement") :condition ("parenthesized_expression"))) ("with_statement" (:*unnamed* nil :body ("statement") :object ("parenthesized_expression"))) ("yield_expression" (:*unnamed* ("expression"))) @@ -815,18 +815,18 @@ (defconst combobulate-rules-typescript-inverse '(("abstract_class_declaration" ("declaration")) ("abstract_method_signature" ("class_body")) - ("accessibility_modifier" ("method_signature" "method_definition" "abstract_method_signature" "public_field_definition" "optional_parameter" "required_parameter" "property_signature")) + ("accessibility_modifier" ("property_signature" "abstract_method_signature" "required_parameter" "method_signature" "method_definition" "public_field_definition" "optional_parameter")) ("ambient_declaration" ("declaration")) ("arguments" ("new_expression" "call_expression")) ("array" ("primary_expression")) - ("array_pattern" ("pattern" "catch_clause" "assignment_expression" "variable_declarator" "rest_pattern" "for_in_statement" "object_assignment_pattern")) - ("array_type" ("union_type" "lookup_type" "optional_type" "type_alias_declaration" "array_type" "omitting_type_annotation" "parenthesized_type" "rest_type" "infer_type" "template_type" "index_type_query" "function_type" "implements_clause" "tuple_type" "readonly_type" "conditional_type" "mapped_type_clause" "type_arguments" "type_annotation" "_primary_type" "intersection_type" "constraint" "index_signature" "default_type" "opting_type_annotation" "as_expression" "ambient_declaration" "constructor_type" "type_predicate" "flow_maybe_type" "satisfies_expression")) + ("array_pattern" ("catch_clause" "assignment_expression" "object_assignment_pattern" "for_in_statement" "variable_declarator" "rest_pattern" "pattern")) + ("array_type" ("default_type" "type_alias_declaration" "type_arguments" "flow_maybe_type" "mapped_type_clause" "parenthesized_type" "type_predicate" "ambient_declaration" "constructor_type" "template_type" "function_type" "intersection_type" "rest_type" "implements_clause" "index_type_query" "omitting_type_annotation" "readonly_type" "satisfies_expression" "union_type" "optional_type" "type_annotation" "opting_type_annotation" "conditional_type" "array_type" "constraint" "_primary_type" "lookup_type" "tuple_type" "infer_type" "as_expression" "index_signature")) ("arrow_function" ("primary_expression")) ("as_expression" ("expression")) ("asserts" ("function_type" "asserts_annotation")) - ("asserts_annotation" ("arrow_function" "call_signature" "function" "generator_function_declaration" "function_declaration" "method_signature" "method_definition" "abstract_method_signature" "generator_function" "function_signature")) + ("asserts_annotation" ("abstract_method_signature" "generator_function" "method_signature" "arrow_function" "method_definition" "function_declaration" "function" "function_signature" "generator_function_declaration" "call_signature")) ("assignment_expression" ("expression")) - ("assignment_pattern" ("array_pattern" "pair_pattern")) + ("assignment_pattern" ("pair_pattern" "array_pattern")) ("augmented_assignment_expression" ("expression")) ("await_expression" ("expression")) ("binary_expression" ("expression")) @@ -835,53 +835,53 @@ ("call_signature" ("object_type")) ("catch_clause" ("try_statement")) ("class" ("primary_expression")) - ("class_body" ("abstract_class_declaration" "class" "class_declaration")) + ("class_body" ("class" "class_declaration" "abstract_class_declaration")) ("class_declaration" ("declaration")) - ("class_heritage" ("abstract_class_declaration" "class" "class_declaration")) + ("class_heritage" ("class" "class_declaration" "abstract_class_declaration")) ("class_static_block" ("class_body")) - ("computed_property_name" ("method_signature" "enum_body" "enum_assignment" "method_definition" "abstract_method_signature" "pair_pattern" "pair" "public_field_definition" "property_signature")) - ("conditional_type" ("union_type" "lookup_type" "optional_type" "type_alias_declaration" "array_type" "omitting_type_annotation" "parenthesized_type" "rest_type" "infer_type" "template_type" "index_type_query" "function_type" "implements_clause" "tuple_type" "readonly_type" "conditional_type" "mapped_type_clause" "type_arguments" "type_annotation" "_primary_type" "intersection_type" "constraint" "index_signature" "default_type" "opting_type_annotation" "as_expression" "ambient_declaration" "constructor_type" "type_predicate" "flow_maybe_type" "satisfies_expression")) + ("computed_property_name" ("property_signature" "abstract_method_signature" "pair" "method_signature" "enum_assignment" "pair_pattern" "method_definition" "enum_body" "public_field_definition")) + ("conditional_type" ("default_type" "type_alias_declaration" "type_arguments" "flow_maybe_type" "mapped_type_clause" "parenthesized_type" "type_predicate" "ambient_declaration" "constructor_type" "template_type" "function_type" "intersection_type" "rest_type" "implements_clause" "index_type_query" "omitting_type_annotation" "readonly_type" "satisfies_expression" "union_type" "optional_type" "type_annotation" "opting_type_annotation" "conditional_type" "array_type" "constraint" "_primary_type" "lookup_type" "tuple_type" "infer_type" "as_expression" "index_signature")) ("constraint" ("type_parameter")) ("construct_signature" ("object_type")) - ("constructor_type" ("union_type" "lookup_type" "optional_type" "type_alias_declaration" "omitting_type_annotation" "parenthesized_type" "rest_type" "infer_type" "function_type" "implements_clause" "tuple_type" "readonly_type" "conditional_type" "mapped_type_clause" "type_arguments" "type_annotation" "intersection_type" "constraint" "index_signature" "default_type" "opting_type_annotation" "as_expression" "ambient_declaration" "constructor_type" "type_predicate" "satisfies_expression")) + ("constructor_type" ("default_type" "type_alias_declaration" "type_arguments" "mapped_type_clause" "parenthesized_type" "type_predicate" "ambient_declaration" "constructor_type" "function_type" "intersection_type" "rest_type" "implements_clause" "omitting_type_annotation" "readonly_type" "satisfies_expression" "union_type" "optional_type" "type_annotation" "opting_type_annotation" "conditional_type" "constraint" "lookup_type" "tuple_type" "infer_type" "as_expression" "index_signature")) ("continue_statement" ("statement")) ("debugger_statement" ("statement")) - ("declaration" ("export_statement" "ambient_declaration" "statement")) - ("decorator" ("abstract_class_declaration" "class_body" "export_statement" "class_declaration" "optional_parameter" "required_parameter" "class")) + ("declaration" ("statement" "export_statement" "ambient_declaration")) + ("decorator" ("required_parameter" "class_body" "export_statement" "optional_parameter" "class" "class_declaration" "abstract_class_declaration")) ("default_type" ("type_parameter")) ("do_statement" ("statement")) ("else_clause" ("if_statement")) - ("empty_statement" ("for_statement" "statement")) + ("empty_statement" ("statement" "for_statement")) ("enum_assignment" ("enum_body")) ("enum_body" ("enum_declaration")) ("enum_declaration" ("declaration")) ("escape_sequence" ("string" "template_string")) - ("existential_type" ("union_type" "lookup_type" "optional_type" "type_alias_declaration" "array_type" "omitting_type_annotation" "parenthesized_type" "rest_type" "infer_type" "template_type" "index_type_query" "function_type" "implements_clause" "tuple_type" "readonly_type" "conditional_type" "mapped_type_clause" "type_arguments" "type_annotation" "_primary_type" "intersection_type" "constraint" "index_signature" "default_type" "opting_type_annotation" "as_expression" "ambient_declaration" "constructor_type" "type_predicate" "flow_maybe_type" "satisfies_expression")) + ("existential_type" ("default_type" "type_alias_declaration" "type_arguments" "flow_maybe_type" "mapped_type_clause" "parenthesized_type" "type_predicate" "ambient_declaration" "constructor_type" "template_type" "function_type" "intersection_type" "rest_type" "implements_clause" "index_type_query" "omitting_type_annotation" "readonly_type" "satisfies_expression" "union_type" "optional_type" "type_annotation" "opting_type_annotation" "conditional_type" "array_type" "constraint" "_primary_type" "lookup_type" "tuple_type" "infer_type" "as_expression" "index_signature")) ("export_clause" ("export_statement")) ("export_specifier" ("export_clause")) - ("export_statement" ("object_type" "statement")) - ("expression" ("member_expression" "update_expression" "parenthesized_expression" "template_substitution" "instantiation_expression" "call_expression" "enum_assignment" "computed_property_name" "augmented_assignment_expression" "binary_expression" "non_null_expression" "spread_element" "optional_parameter" "required_parameter" "expression_statement" "switch_case" "yield_expression" "throw_statement" "return_statement" "await_expression" "pair" "variable_declarator" "assignment_pattern" "jsx_expression" "for_in_statement" "ternary_expression" "type_assertion" "array" "public_field_definition" "unary_expression" "object_assignment_pattern" "arrow_function" "for_statement" "assignment_expression" "as_expression" "export_statement" "extends_clause" "arguments" "sequence_expression" "subscript_expression" "satisfies_expression")) - ("expression_statement" ("for_statement" "statement")) + ("export_statement" ("statement" "object_type")) + ("expression" ("throw_statement" "unary_expression" "member_expression" "switch_case" "type_assertion" "yield_expression" "variable_declarator" "jsx_expression" "await_expression" "augmented_assignment_expression" "sequence_expression" "optional_parameter" "object_assignment_pattern" "return_statement" "array" "for_in_statement" "instantiation_expression" "satisfies_expression" "arguments" "for_statement" "parenthesized_expression" "required_parameter" "assignment_expression" "template_substitution" "enum_assignment" "non_null_expression" "arrow_function" "spread_element" "binary_expression" "update_expression" "extends_clause" "ternary_expression" "pair" "expression_statement" "assignment_pattern" "export_statement" "subscript_expression" "as_expression" "call_expression" "computed_property_name" "public_field_definition")) + ("expression_statement" ("statement" "for_statement")) ("extends_clause" ("class_heritage")) ("extends_type_clause" ("interface_declaration")) - ("false" ("primary_expression" "literal_type")) + ("false" ("literal_type" "primary_expression")) ("finally_clause" ("try_statement")) - ("flow_maybe_type" ("union_type" "lookup_type" "optional_type" "type_alias_declaration" "array_type" "omitting_type_annotation" "parenthesized_type" "rest_type" "infer_type" "template_type" "index_type_query" "function_type" "implements_clause" "tuple_type" "readonly_type" "conditional_type" "mapped_type_clause" "type_arguments" "type_annotation" "_primary_type" "intersection_type" "constraint" "index_signature" "default_type" "opting_type_annotation" "as_expression" "ambient_declaration" "constructor_type" "type_predicate" "flow_maybe_type" "satisfies_expression")) + ("flow_maybe_type" ("default_type" "type_alias_declaration" "type_arguments" "flow_maybe_type" "mapped_type_clause" "parenthesized_type" "type_predicate" "ambient_declaration" "constructor_type" "template_type" "function_type" "intersection_type" "rest_type" "implements_clause" "index_type_query" "omitting_type_annotation" "readonly_type" "satisfies_expression" "union_type" "optional_type" "type_annotation" "opting_type_annotation" "conditional_type" "array_type" "constraint" "_primary_type" "lookup_type" "tuple_type" "infer_type" "as_expression" "index_signature")) ("for_in_statement" ("statement")) ("for_statement" ("statement")) - ("formal_parameters" ("arrow_function" "call_signature" "function" "generator_function_declaration" "function_declaration" "method_signature" "method_definition" "abstract_method_signature" "generator_function" "constructor_type" "function_signature" "function_type" "construct_signature")) + ("formal_parameters" ("function_type" "abstract_method_signature" "generator_function" "method_signature" "construct_signature" "arrow_function" "method_definition" "function_declaration" "function" "function_signature" "generator_function_declaration" "constructor_type" "call_signature")) ("function" ("primary_expression")) ("function_declaration" ("declaration")) ("function_signature" ("declaration")) - ("function_type" ("union_type" "lookup_type" "optional_type" "type_alias_declaration" "omitting_type_annotation" "parenthesized_type" "rest_type" "infer_type" "function_type" "implements_clause" "tuple_type" "readonly_type" "conditional_type" "mapped_type_clause" "type_arguments" "type_annotation" "intersection_type" "constraint" "index_signature" "default_type" "opting_type_annotation" "as_expression" "ambient_declaration" "constructor_type" "type_predicate" "satisfies_expression")) + ("function_type" ("default_type" "type_alias_declaration" "type_arguments" "mapped_type_clause" "parenthesized_type" "type_predicate" "ambient_declaration" "constructor_type" "function_type" "intersection_type" "rest_type" "implements_clause" "omitting_type_annotation" "readonly_type" "satisfies_expression" "union_type" "optional_type" "type_annotation" "opting_type_annotation" "conditional_type" "constraint" "lookup_type" "tuple_type" "infer_type" "as_expression" "index_signature")) ("generator_function" ("primary_expression")) ("generator_function_declaration" ("declaration")) - ("generic_type" ("union_type" "lookup_type" "optional_type" "extends_type_clause" "type_alias_declaration" "array_type" "omitting_type_annotation" "parenthesized_type" "rest_type" "infer_type" "template_type" "index_type_query" "function_type" "implements_clause" "tuple_type" "readonly_type" "mapped_type_clause" "conditional_type" "type_arguments" "type_annotation" "_primary_type" "intersection_type" "constraint" "index_signature" "default_type" "opting_type_annotation" "as_expression" "ambient_declaration" "constructor_type" "type_predicate" "flow_maybe_type" "satisfies_expression")) + ("generic_type" ("default_type" "type_alias_declaration" "type_arguments" "flow_maybe_type" "mapped_type_clause" "parenthesized_type" "type_predicate" "ambient_declaration" "constructor_type" "extends_type_clause" "template_type" "function_type" "intersection_type" "rest_type" "implements_clause" "index_type_query" "omitting_type_annotation" "readonly_type" "satisfies_expression" "union_type" "optional_type" "type_annotation" "opting_type_annotation" "conditional_type" "array_type" "constraint" "_primary_type" "lookup_type" "tuple_type" "infer_type" "as_expression" "index_signature")) ("glimmer_closing_tag" ("glimmer_template")) ("glimmer_opening_tag" ("glimmer_template")) ("glimmer_template" ("expression")) ("hash_bang_line" ("program")) - ("identifier" ("generator_function_declaration" "import_require_clause" "namespace_export" "member_expression" "generator_function" "import_clause" "import_specifier" "instantiation_expression" "namespace_import" "pattern" "augmented_assignment_expression" "internal_module" "enum_declaration" "rest_pattern" "function_signature" "optional_parameter" "required_parameter" "function_declaration" "primary_expression" "asserts" "catch_clause" "export_specifier" "jsx_closing_element" "module" "variable_declarator" "for_in_statement" "decorator" "import_alias" "nested_identifier" "arrow_function" "function" "index_signature" "jsx_opening_element" "type_query" "assignment_expression" "nested_type_identifier" "type_predicate" "export_statement" "jsx_namespace_name" "jsx_self_closing_element")) + ("identifier" ("catch_clause" "member_expression" "import_alias" "function_declaration" "type_predicate" "variable_declarator" "generator_function_declaration" "function" "augmented_assignment_expression" "module" "nested_identifier" "jsx_namespace_name" "primary_expression" "jsx_self_closing_element" "for_in_statement" "import_require_clause" "rest_pattern" "instantiation_expression" "pattern" "namespace_export" "decorator" "generator_function" "required_parameter" "assignment_expression" "enum_declaration" "arrow_function" "function_signature" "nested_type_identifier" "import_clause" "jsx_opening_element" "asserts" "internal_module" "export_specifier" "export_statement" "namespace_import" "optional_parameter" "index_signature" "type_query" "jsx_closing_element" "import_specifier")) ("if_statement" ("statement")) ("implements_clause" ("class_heritage")) ("import" ("instantiation_expression" "primary_expression")) @@ -891,110 +891,110 @@ ("import_specifier" ("named_imports")) ("import_statement" ("statement")) ("index_signature" ("object_type" "class_body")) - ("index_type_query" ("union_type" "lookup_type" "optional_type" "type_alias_declaration" "array_type" "omitting_type_annotation" "parenthesized_type" "rest_type" "infer_type" "template_type" "index_type_query" "function_type" "implements_clause" "tuple_type" "readonly_type" "conditional_type" "mapped_type_clause" "type_arguments" "type_annotation" "_primary_type" "intersection_type" "constraint" "index_signature" "default_type" "opting_type_annotation" "as_expression" "ambient_declaration" "constructor_type" "type_predicate" "flow_maybe_type" "satisfies_expression")) - ("infer_type" ("union_type" "lookup_type" "optional_type" "type_alias_declaration" "omitting_type_annotation" "parenthesized_type" "rest_type" "infer_type" "template_type" "function_type" "implements_clause" "tuple_type" "readonly_type" "conditional_type" "mapped_type_clause" "type_arguments" "type_annotation" "intersection_type" "constraint" "index_signature" "default_type" "opting_type_annotation" "as_expression" "ambient_declaration" "constructor_type" "type_predicate" "satisfies_expression")) - ("instantiation_expression" ("expression" "type_query")) + ("index_type_query" ("default_type" "type_alias_declaration" "type_arguments" "flow_maybe_type" "mapped_type_clause" "parenthesized_type" "type_predicate" "ambient_declaration" "constructor_type" "template_type" "function_type" "intersection_type" "rest_type" "implements_clause" "index_type_query" "omitting_type_annotation" "readonly_type" "satisfies_expression" "union_type" "optional_type" "type_annotation" "opting_type_annotation" "conditional_type" "array_type" "constraint" "_primary_type" "lookup_type" "tuple_type" "infer_type" "as_expression" "index_signature")) + ("infer_type" ("default_type" "type_alias_declaration" "type_arguments" "mapped_type_clause" "parenthesized_type" "type_predicate" "ambient_declaration" "constructor_type" "template_type" "function_type" "intersection_type" "rest_type" "implements_clause" "omitting_type_annotation" "readonly_type" "satisfies_expression" "union_type" "optional_type" "type_annotation" "opting_type_annotation" "conditional_type" "constraint" "lookup_type" "tuple_type" "infer_type" "as_expression" "index_signature")) + ("instantiation_expression" ("type_query" "expression")) ("interface_declaration" ("declaration")) ("internal_module" ("declaration" "expression")) - ("intersection_type" ("union_type" "lookup_type" "optional_type" "type_alias_declaration" "array_type" "omitting_type_annotation" "parenthesized_type" "rest_type" "infer_type" "template_type" "index_type_query" "function_type" "implements_clause" "tuple_type" "readonly_type" "conditional_type" "mapped_type_clause" "type_arguments" "type_annotation" "_primary_type" "intersection_type" "constraint" "index_signature" "default_type" "opting_type_annotation" "as_expression" "ambient_declaration" "constructor_type" "type_predicate" "flow_maybe_type" "satisfies_expression")) - ("jsx_attribute" ("jsx_self_closing_element" "jsx_opening_element")) + ("intersection_type" ("default_type" "type_alias_declaration" "type_arguments" "flow_maybe_type" "mapped_type_clause" "parenthesized_type" "type_predicate" "ambient_declaration" "constructor_type" "template_type" "function_type" "intersection_type" "rest_type" "implements_clause" "index_type_query" "omitting_type_annotation" "readonly_type" "satisfies_expression" "union_type" "optional_type" "type_annotation" "opting_type_annotation" "conditional_type" "array_type" "constraint" "_primary_type" "lookup_type" "tuple_type" "infer_type" "as_expression" "index_signature")) + ("jsx_attribute" ("jsx_opening_element" "jsx_self_closing_element")) ("jsx_closing_element" ("jsx_element")) ("jsx_element" ("jsx_element" "jsx_attribute")) - ("jsx_expression" ("jsx_self_closing_element" "jsx_element" "jsx_opening_element" "jsx_attribute")) - ("jsx_namespace_name" ("jsx_closing_element" "jsx_self_closing_element" "jsx_opening_element" "jsx_attribute")) + ("jsx_expression" ("jsx_opening_element" "jsx_element" "jsx_attribute" "jsx_self_closing_element")) + ("jsx_namespace_name" ("jsx_opening_element" "jsx_attribute" "jsx_self_closing_element" "jsx_closing_element")) ("jsx_opening_element" ("jsx_element")) ("jsx_self_closing_element" ("jsx_element" "jsx_attribute")) ("jsx_text" ("jsx_element")) ("labeled_statement" ("statement")) - ("lexical_declaration" ("for_statement" "declaration")) - ("literal_type" ("union_type" "lookup_type" "optional_type" "type_alias_declaration" "array_type" "omitting_type_annotation" "parenthesized_type" "rest_type" "infer_type" "template_type" "index_type_query" "function_type" "implements_clause" "tuple_type" "readonly_type" "conditional_type" "mapped_type_clause" "type_arguments" "type_annotation" "_primary_type" "intersection_type" "constraint" "index_signature" "default_type" "opting_type_annotation" "as_expression" "ambient_declaration" "constructor_type" "type_predicate" "flow_maybe_type" "satisfies_expression")) - ("lookup_type" ("union_type" "lookup_type" "optional_type" "type_alias_declaration" "array_type" "omitting_type_annotation" "parenthesized_type" "rest_type" "infer_type" "template_type" "index_type_query" "function_type" "implements_clause" "tuple_type" "readonly_type" "conditional_type" "mapped_type_clause" "type_arguments" "type_annotation" "_primary_type" "intersection_type" "constraint" "index_signature" "default_type" "opting_type_annotation" "as_expression" "ambient_declaration" "constructor_type" "type_predicate" "flow_maybe_type" "satisfies_expression")) + ("lexical_declaration" ("declaration" "for_statement")) + ("literal_type" ("default_type" "type_alias_declaration" "type_arguments" "flow_maybe_type" "mapped_type_clause" "parenthesized_type" "type_predicate" "ambient_declaration" "constructor_type" "template_type" "function_type" "intersection_type" "rest_type" "implements_clause" "index_type_query" "omitting_type_annotation" "readonly_type" "satisfies_expression" "union_type" "optional_type" "type_annotation" "opting_type_annotation" "conditional_type" "array_type" "constraint" "_primary_type" "lookup_type" "tuple_type" "infer_type" "as_expression" "index_signature")) + ("lookup_type" ("default_type" "type_alias_declaration" "type_arguments" "flow_maybe_type" "mapped_type_clause" "parenthesized_type" "type_predicate" "ambient_declaration" "constructor_type" "template_type" "function_type" "intersection_type" "rest_type" "implements_clause" "index_type_query" "omitting_type_annotation" "readonly_type" "satisfies_expression" "union_type" "optional_type" "type_annotation" "opting_type_annotation" "conditional_type" "array_type" "constraint" "_primary_type" "lookup_type" "tuple_type" "infer_type" "as_expression" "index_signature")) ("mapped_type_clause" ("index_signature")) - ("member_expression" ("pattern" "primary_expression" "jsx_opening_element" "type_query" "augmented_assignment_expression" "assignment_expression" "member_expression" "jsx_closing_element" "rest_pattern" "for_in_statement" "decorator" "nested_identifier" "jsx_self_closing_element" "instantiation_expression")) + ("member_expression" ("decorator" "jsx_opening_element" "member_expression" "assignment_expression" "nested_identifier" "primary_expression" "jsx_self_closing_element" "for_in_statement" "rest_pattern" "instantiation_expression" "pattern" "type_query" "jsx_closing_element" "augmented_assignment_expression")) ("meta_property" ("primary_expression")) - ("method_definition" ("class_body" "object")) + ("method_definition" ("object" "class_body")) ("method_signature" ("object_type" "class_body")) ("module" ("declaration")) ("named_imports" ("import_clause")) ("namespace_export" ("export_statement")) ("namespace_import" ("import_clause")) - ("nested_identifier" ("module" "internal_module" "import_alias" "nested_type_identifier")) - ("nested_type_identifier" ("union_type" "lookup_type" "optional_type" "extends_type_clause" "type_alias_declaration" "array_type" "omitting_type_annotation" "parenthesized_type" "rest_type" "infer_type" "template_type" "index_type_query" "function_type" "implements_clause" "tuple_type" "readonly_type" "mapped_type_clause" "conditional_type" "type_arguments" "type_annotation" "_primary_type" "intersection_type" "constraint" "generic_type" "index_signature" "default_type" "opting_type_annotation" "as_expression" "ambient_declaration" "constructor_type" "type_predicate" "flow_maybe_type" "satisfies_expression")) + ("nested_identifier" ("module" "nested_type_identifier" "import_alias" "internal_module")) + ("nested_type_identifier" ("default_type" "type_alias_declaration" "type_arguments" "flow_maybe_type" "mapped_type_clause" "parenthesized_type" "type_predicate" "ambient_declaration" "constructor_type" "extends_type_clause" "template_type" "function_type" "intersection_type" "rest_type" "implements_clause" "index_type_query" "omitting_type_annotation" "readonly_type" "satisfies_expression" "union_type" "optional_type" "type_annotation" "opting_type_annotation" "conditional_type" "array_type" "constraint" "_primary_type" "lookup_type" "generic_type" "tuple_type" "infer_type" "as_expression" "index_signature")) ("new_expression" ("expression")) - ("non_null_expression" ("pattern" "primary_expression" "augmented_assignment_expression" "assignment_expression" "rest_pattern" "for_in_statement")) - ("null" ("primary_expression" "literal_type")) - ("number" ("enum_body" "enum_assignment" "method_signature" "primary_expression" "literal_type" "method_definition" "abstract_method_signature" "pair_pattern" "pair" "unary_expression" "public_field_definition" "subscript_expression" "property_signature")) + ("non_null_expression" ("assignment_expression" "primary_expression" "for_in_statement" "rest_pattern" "pattern" "augmented_assignment_expression")) + ("null" ("literal_type" "primary_expression")) + ("number" ("property_signature" "abstract_method_signature" "unary_expression" "pair" "literal_type" "enum_assignment" "primary_expression" "method_signature" "method_definition" "pair_pattern" "enum_body" "subscript_expression" "public_field_definition")) ("object" ("primary_expression")) ("object_assignment_pattern" ("object_pattern")) - ("object_pattern" ("pattern" "catch_clause" "assignment_expression" "variable_declarator" "rest_pattern" "for_in_statement" "object_assignment_pattern")) - ("object_type" ("union_type" "lookup_type" "optional_type" "type_alias_declaration" "array_type" "omitting_type_annotation" "parenthesized_type" "rest_type" "infer_type" "template_type" "index_type_query" "function_type" "implements_clause" "tuple_type" "readonly_type" "interface_declaration" "conditional_type" "mapped_type_clause" "type_arguments" "type_annotation" "_primary_type" "intersection_type" "constraint" "index_signature" "default_type" "opting_type_annotation" "as_expression" "ambient_declaration" "constructor_type" "type_predicate" "flow_maybe_type" "satisfies_expression")) + ("object_pattern" ("catch_clause" "assignment_expression" "object_assignment_pattern" "for_in_statement" "variable_declarator" "rest_pattern" "pattern")) + ("object_type" ("default_type" "type_alias_declaration" "type_arguments" "flow_maybe_type" "mapped_type_clause" "parenthesized_type" "type_predicate" "ambient_declaration" "constructor_type" "template_type" "function_type" "intersection_type" "rest_type" "implements_clause" "index_type_query" "omitting_type_annotation" "readonly_type" "satisfies_expression" "union_type" "optional_type" "type_annotation" "opting_type_annotation" "conditional_type" "interface_declaration" "array_type" "constraint" "_primary_type" "lookup_type" "tuple_type" "infer_type" "as_expression" "index_signature")) ("omitting_type_annotation" ("index_signature")) ("opting_type_annotation" ("index_signature")) ("optional_chain" ("subscript_expression" "member_expression")) ("optional_parameter" ("formal_parameters" "tuple_type")) ("optional_type" ("tuple_type")) - ("override_modifier" ("method_signature" "method_definition" "public_field_definition" "optional_parameter" "required_parameter" "property_signature")) + ("override_modifier" ("property_signature" "required_parameter" "method_signature" "method_definition" "public_field_definition" "optional_parameter")) ("pair" ("object")) ("pair_pattern" ("object_pattern")) - ("parenthesized_expression" ("if_statement" "with_statement" "primary_expression" "while_statement" "switch_statement" "augmented_assignment_expression" "assignment_expression" "do_statement" "for_in_statement")) - ("parenthesized_type" ("union_type" "lookup_type" "optional_type" "type_alias_declaration" "array_type" "omitting_type_annotation" "parenthesized_type" "rest_type" "infer_type" "template_type" "index_type_query" "function_type" "implements_clause" "tuple_type" "readonly_type" "conditional_type" "mapped_type_clause" "type_arguments" "type_annotation" "_primary_type" "intersection_type" "constraint" "index_signature" "default_type" "opting_type_annotation" "as_expression" "ambient_declaration" "constructor_type" "type_predicate" "flow_maybe_type" "satisfies_expression")) - ("pattern" ("pair_pattern" "assignment_pattern" "optional_parameter" "required_parameter" "array_pattern")) - ("predefined_type" ("union_type" "lookup_type" "optional_type" "type_alias_declaration" "array_type" "omitting_type_annotation" "parenthesized_type" "rest_type" "infer_type" "template_type" "index_type_query" "function_type" "implements_clause" "tuple_type" "readonly_type" "conditional_type" "mapped_type_clause" "type_arguments" "type_annotation" "_primary_type" "intersection_type" "constraint" "index_signature" "default_type" "opting_type_annotation" "as_expression" "ambient_declaration" "constructor_type" "type_predicate" "flow_maybe_type" "subscript_expression" "satisfies_expression")) - ("primary_expression" ("expression" "new_expression")) - ("private_property_identifier" ("enum_body" "enum_assignment" "method_signature" "method_definition" "member_expression" "abstract_method_signature" "pair_pattern" "pair" "public_field_definition" "property_signature")) - ("property_identifier" ("enum_body" "enum_assignment" "method_signature" "jsx_attribute" "method_definition" "abstract_method_signature" "ambient_declaration" "member_expression" "pair" "pair_pattern" "nested_identifier" "public_field_definition" "property_signature")) + ("parenthesized_expression" ("if_statement" "switch_statement" "assignment_expression" "primary_expression" "with_statement" "for_in_statement" "while_statement" "do_statement" "augmented_assignment_expression")) + ("parenthesized_type" ("default_type" "type_alias_declaration" "type_arguments" "flow_maybe_type" "mapped_type_clause" "parenthesized_type" "type_predicate" "ambient_declaration" "constructor_type" "template_type" "function_type" "intersection_type" "rest_type" "implements_clause" "index_type_query" "omitting_type_annotation" "readonly_type" "satisfies_expression" "union_type" "optional_type" "type_annotation" "opting_type_annotation" "conditional_type" "array_type" "constraint" "_primary_type" "lookup_type" "tuple_type" "infer_type" "as_expression" "index_signature")) + ("pattern" ("required_parameter" "assignment_pattern" "pair_pattern" "array_pattern" "optional_parameter")) + ("predefined_type" ("default_type" "type_alias_declaration" "type_arguments" "flow_maybe_type" "mapped_type_clause" "parenthesized_type" "type_predicate" "ambient_declaration" "constructor_type" "template_type" "function_type" "intersection_type" "rest_type" "implements_clause" "index_type_query" "omitting_type_annotation" "readonly_type" "satisfies_expression" "union_type" "optional_type" "type_annotation" "opting_type_annotation" "conditional_type" "array_type" "constraint" "_primary_type" "lookup_type" "tuple_type" "infer_type" "subscript_expression" "as_expression" "index_signature")) + ("primary_expression" ("new_expression" "expression")) + ("private_property_identifier" ("property_signature" "abstract_method_signature" "member_expression" "pair" "method_signature" "enum_assignment" "pair_pattern" "method_definition" "enum_body" "public_field_definition")) + ("property_identifier" ("property_signature" "abstract_method_signature" "member_expression" "nested_identifier" "method_signature" "enum_assignment" "pair" "pair_pattern" "method_definition" "jsx_attribute" "enum_body" "public_field_definition" "ambient_declaration")) ("property_signature" ("object_type")) ("public_field_definition" ("class_body")) - ("readonly_type" ("union_type" "lookup_type" "optional_type" "type_alias_declaration" "omitting_type_annotation" "parenthesized_type" "rest_type" "infer_type" "function_type" "implements_clause" "tuple_type" "readonly_type" "conditional_type" "mapped_type_clause" "type_arguments" "type_annotation" "intersection_type" "constraint" "index_signature" "default_type" "opting_type_annotation" "as_expression" "ambient_declaration" "constructor_type" "type_predicate" "satisfies_expression")) + ("readonly_type" ("default_type" "type_alias_declaration" "type_arguments" "mapped_type_clause" "parenthesized_type" "type_predicate" "ambient_declaration" "constructor_type" "function_type" "intersection_type" "rest_type" "implements_clause" "omitting_type_annotation" "readonly_type" "satisfies_expression" "union_type" "optional_type" "type_annotation" "opting_type_annotation" "conditional_type" "constraint" "lookup_type" "tuple_type" "infer_type" "as_expression" "index_signature")) ("regex" ("primary_expression")) ("regex_flags" ("regex")) ("regex_pattern" ("regex")) ("required_parameter" ("formal_parameters" "tuple_type")) - ("rest_pattern" ("required_parameter" "object_pattern" "pattern")) + ("rest_pattern" ("pattern" "object_pattern" "required_parameter")) ("rest_type" ("tuple_type")) ("return_statement" ("statement")) ("satisfies_expression" ("expression")) - ("sequence_expression" ("for_statement" "throw_statement" "return_statement" "subscript_expression" "jsx_expression" "for_in_statement" "parenthesized_expression" "switch_case" "sequence_expression" "expression_statement" "template_substitution")) + ("sequence_expression" ("throw_statement" "sequence_expression" "switch_case" "template_substitution" "expression_statement" "return_statement" "for_in_statement" "subscript_expression" "jsx_expression" "parenthesized_expression" "for_statement")) ("shorthand_property_identifier" ("object")) - ("shorthand_property_identifier_pattern" ("object_pattern" "object_assignment_pattern")) - ("spread_element" ("array" "jsx_expression" "object" "arguments")) - ("statement" ("for_statement" "if_statement" "with_statement" "switch_default" "while_statement" "do_statement" "statement_block" "else_clause" "for_in_statement" "switch_case" "labeled_statement" "program")) - ("statement_block" ("arrow_function" "function" "generator_function_declaration" "function_declaration" "class_static_block" "statement" "catch_clause" "internal_module" "method_definition" "ambient_declaration" "generator_function" "module" "finally_clause" "try_statement")) - ("statement_identifier" ("break_statement" "continue_statement" "labeled_statement")) - ("string" ("import_require_clause" "namespace_export" "import_specifier" "enum_body" "enum_assignment" "internal_module" "method_definition" "method_signature" "primary_expression" "jsx_attribute" "abstract_method_signature" "import_statement" "export_specifier" "module" "pair" "pair_pattern" "public_field_definition" "property_signature" "literal_type" "export_statement" "subscript_expression")) + ("shorthand_property_identifier_pattern" ("object_assignment_pattern" "object_pattern")) + ("spread_element" ("jsx_expression" "object" "arguments" "array")) + ("statement" ("if_statement" "switch_case" "else_clause" "for_statement" "with_statement" "for_in_statement" "labeled_statement" "statement_block" "while_statement" "program" "do_statement" "switch_default")) + ("statement_block" ("statement" "generator_function" "catch_clause" "internal_module" "try_statement" "arrow_function" "method_definition" "finally_clause" "function_declaration" "class_static_block" "ambient_declaration" "generator_function_declaration" "function" "module")) + ("statement_identifier" ("labeled_statement" "break_statement" "continue_statement")) + ("string" ("property_signature" "method_signature" "enum_body" "module" "abstract_method_signature" "literal_type" "primary_expression" "pair_pattern" "method_definition" "import_require_clause" "namespace_export" "enum_assignment" "internal_module" "export_specifier" "pair" "export_statement" "jsx_attribute" "subscript_expression" "import_statement" "public_field_definition" "import_specifier")) ("string_fragment" ("string")) - ("subscript_expression" ("pattern" "primary_expression" "type_query" "augmented_assignment_expression" "assignment_expression" "rest_pattern" "for_in_statement" "instantiation_expression")) + ("subscript_expression" ("assignment_expression" "primary_expression" "for_in_statement" "rest_pattern" "instantiation_expression" "pattern" "type_query" "augmented_assignment_expression")) ("super" ("primary_expression")) ("switch_body" ("switch_statement")) ("switch_case" ("switch_body")) ("switch_default" ("switch_body")) ("switch_statement" ("statement")) - ("template_literal_type" ("union_type" "lookup_type" "optional_type" "type_alias_declaration" "array_type" "omitting_type_annotation" "parenthesized_type" "rest_type" "infer_type" "template_type" "index_type_query" "function_type" "implements_clause" "tuple_type" "readonly_type" "conditional_type" "mapped_type_clause" "type_arguments" "type_annotation" "_primary_type" "intersection_type" "constraint" "index_signature" "default_type" "opting_type_annotation" "as_expression" "ambient_declaration" "constructor_type" "type_predicate" "flow_maybe_type" "satisfies_expression")) + ("template_literal_type" ("default_type" "type_alias_declaration" "type_arguments" "flow_maybe_type" "mapped_type_clause" "parenthesized_type" "type_predicate" "ambient_declaration" "constructor_type" "template_type" "function_type" "intersection_type" "rest_type" "implements_clause" "index_type_query" "omitting_type_annotation" "readonly_type" "satisfies_expression" "union_type" "optional_type" "type_annotation" "opting_type_annotation" "conditional_type" "array_type" "constraint" "_primary_type" "lookup_type" "tuple_type" "infer_type" "as_expression" "index_signature")) ("template_string" ("primary_expression" "call_expression")) ("template_substitution" ("template_string")) ("template_type" ("template_literal_type")) ("ternary_expression" ("expression")) - ("this" ("primary_expression" "asserts" "type_predicate" "optional_parameter" "required_parameter")) - ("this_type" ("union_type" "lookup_type" "optional_type" "type_alias_declaration" "array_type" "omitting_type_annotation" "parenthesized_type" "rest_type" "infer_type" "template_type" "index_type_query" "function_type" "implements_clause" "tuple_type" "readonly_type" "conditional_type" "mapped_type_clause" "type_arguments" "type_annotation" "_primary_type" "intersection_type" "constraint" "index_signature" "default_type" "opting_type_annotation" "as_expression" "ambient_declaration" "constructor_type" "type_predicate" "flow_maybe_type" "satisfies_expression")) + ("this" ("required_parameter" "asserts" "primary_expression" "type_predicate" "optional_parameter")) + ("this_type" ("default_type" "type_alias_declaration" "type_arguments" "flow_maybe_type" "mapped_type_clause" "parenthesized_type" "type_predicate" "ambient_declaration" "constructor_type" "template_type" "function_type" "intersection_type" "rest_type" "implements_clause" "index_type_query" "omitting_type_annotation" "readonly_type" "satisfies_expression" "union_type" "optional_type" "type_annotation" "opting_type_annotation" "conditional_type" "array_type" "constraint" "_primary_type" "lookup_type" "tuple_type" "infer_type" "as_expression" "index_signature")) ("throw_statement" ("statement")) - ("true" ("primary_expression" "literal_type")) + ("true" ("literal_type" "primary_expression")) ("try_statement" ("statement")) - ("tuple_type" ("union_type" "lookup_type" "optional_type" "type_alias_declaration" "array_type" "omitting_type_annotation" "parenthesized_type" "rest_type" "infer_type" "template_type" "index_type_query" "function_type" "implements_clause" "tuple_type" "readonly_type" "conditional_type" "mapped_type_clause" "type_arguments" "type_annotation" "_primary_type" "intersection_type" "constraint" "index_signature" "default_type" "opting_type_annotation" "as_expression" "ambient_declaration" "constructor_type" "type_predicate" "flow_maybe_type" "satisfies_expression")) + ("tuple_type" ("default_type" "type_alias_declaration" "type_arguments" "flow_maybe_type" "mapped_type_clause" "parenthesized_type" "type_predicate" "ambient_declaration" "constructor_type" "template_type" "function_type" "intersection_type" "rest_type" "implements_clause" "index_type_query" "omitting_type_annotation" "readonly_type" "satisfies_expression" "union_type" "optional_type" "type_annotation" "opting_type_annotation" "conditional_type" "array_type" "constraint" "_primary_type" "lookup_type" "tuple_type" "infer_type" "as_expression" "index_signature")) ("type_alias_declaration" ("declaration")) - ("type_annotation" ("call_signature" "generator_function_declaration" "generator_function" "parenthesized_expression" "construct_signature" "method_definition" "function_signature" "optional_parameter" "required_parameter" "method_signature" "function_declaration" "catch_clause" "abstract_method_signature" "variable_declarator" "public_field_definition" "property_signature" "arrow_function" "function" "index_signature")) - ("type_arguments" ("jsx_opening_element" "extends_clause" "new_expression" "type_assertion" "jsx_self_closing_element" "generic_type" "instantiation_expression" "call_expression")) + ("type_annotation" ("property_signature" "catch_clause" "method_signature" "function_declaration" "variable_declarator" "generator_function_declaration" "function" "abstract_method_signature" "method_definition" "parenthesized_expression" "call_signature" "generator_function" "required_parameter" "construct_signature" "arrow_function" "function_signature" "public_field_definition" "optional_parameter" "index_signature")) + ("type_arguments" ("extends_clause" "jsx_opening_element" "generic_type" "jsx_self_closing_element" "type_assertion" "new_expression" "call_expression" "instantiation_expression")) ("type_assertion" ("expression")) - ("type_identifier" ("union_type" "lookup_type" "optional_type" "extends_type_clause" "type_alias_declaration" "type_parameter" "array_type" "omitting_type_annotation" "parenthesized_type" "rest_type" "infer_type" "template_type" "index_type_query" "function_type" "implements_clause" "tuple_type" "readonly_type" "interface_declaration" "conditional_type" "mapped_type_clause" "type_arguments" "type_annotation" "_primary_type" "intersection_type" "constraint" "generic_type" "index_signature" "abstract_class_declaration" "default_type" "opting_type_annotation" "as_expression" "ambient_declaration" "nested_type_identifier" "constructor_type" "type_predicate" "class_declaration" "flow_maybe_type" "class" "satisfies_expression")) + ("type_identifier" ("default_type" "type_alias_declaration" "type_arguments" "flow_maybe_type" "mapped_type_clause" "parenthesized_type" "type_predicate" "ambient_declaration" "constructor_type" "extends_type_clause" "class_declaration" "template_type" "function_type" "intersection_type" "rest_type" "implements_clause" "index_type_query" "omitting_type_annotation" "readonly_type" "type_parameter" "satisfies_expression" "abstract_class_declaration" "union_type" "optional_type" "type_annotation" "opting_type_annotation" "nested_type_identifier" "conditional_type" "class" "interface_declaration" "array_type" "constraint" "_primary_type" "lookup_type" "generic_type" "tuple_type" "infer_type" "as_expression" "index_signature")) ("type_parameter" ("type_parameters")) - ("type_parameters" ("arrow_function" "call_signature" "abstract_class_declaration" "function" "function_declaration" "generator_function_declaration" "interface_declaration" "method_signature" "method_definition" "abstract_method_signature" "generator_function" "constructor_type" "function_signature" "function_type" "class_declaration" "type_alias_declaration" "class" "construct_signature")) - ("type_predicate" ("asserts" "function_type" "type_predicate_annotation")) - ("type_predicate_annotation" ("arrow_function" "call_signature" "function" "generator_function_declaration" "function_declaration" "method_signature" "method_definition" "abstract_method_signature" "generator_function" "function_signature")) - ("type_query" ("union_type" "lookup_type" "optional_type" "type_alias_declaration" "array_type" "omitting_type_annotation" "parenthesized_type" "rest_type" "infer_type" "template_type" "index_type_query" "function_type" "implements_clause" "tuple_type" "readonly_type" "conditional_type" "mapped_type_clause" "type_arguments" "type_annotation" "_primary_type" "intersection_type" "constraint" "index_signature" "default_type" "opting_type_annotation" "as_expression" "ambient_declaration" "constructor_type" "type_predicate" "flow_maybe_type" "satisfies_expression")) - ("unary_expression" ("expression" "literal_type")) - ("undefined" ("pattern" "primary_expression" "literal_type" "assignment_expression" "rest_pattern" "for_in_statement")) - ("union_type" ("union_type" "lookup_type" "optional_type" "type_alias_declaration" "array_type" "omitting_type_annotation" "parenthesized_type" "rest_type" "infer_type" "template_type" "index_type_query" "function_type" "implements_clause" "tuple_type" "readonly_type" "conditional_type" "mapped_type_clause" "type_arguments" "type_annotation" "_primary_type" "intersection_type" "constraint" "index_signature" "default_type" "opting_type_annotation" "as_expression" "ambient_declaration" "constructor_type" "type_predicate" "flow_maybe_type" "satisfies_expression")) + ("type_parameters" ("function_type" "abstract_method_signature" "type_alias_declaration" "generator_function" "interface_declaration" "method_signature" "construct_signature" "arrow_function" "method_definition" "function_declaration" "function" "function_signature" "abstract_class_declaration" "generator_function_declaration" "constructor_type" "class" "class_declaration" "call_signature")) + ("type_predicate" ("function_type" "asserts" "type_predicate_annotation")) + ("type_predicate_annotation" ("abstract_method_signature" "generator_function" "method_signature" "arrow_function" "method_definition" "function_declaration" "function" "function_signature" "generator_function_declaration" "call_signature")) + ("type_query" ("default_type" "type_alias_declaration" "type_arguments" "flow_maybe_type" "mapped_type_clause" "parenthesized_type" "type_predicate" "ambient_declaration" "constructor_type" "template_type" "function_type" "intersection_type" "rest_type" "implements_clause" "index_type_query" "omitting_type_annotation" "readonly_type" "satisfies_expression" "union_type" "optional_type" "type_annotation" "opting_type_annotation" "conditional_type" "array_type" "constraint" "_primary_type" "lookup_type" "tuple_type" "infer_type" "as_expression" "index_signature")) + ("unary_expression" ("literal_type" "expression")) + ("undefined" ("assignment_expression" "literal_type" "primary_expression" "for_in_statement" "rest_pattern" "pattern")) + ("union_type" ("default_type" "type_alias_declaration" "type_arguments" "flow_maybe_type" "mapped_type_clause" "parenthesized_type" "type_predicate" "ambient_declaration" "constructor_type" "template_type" "function_type" "intersection_type" "rest_type" "implements_clause" "index_type_query" "omitting_type_annotation" "readonly_type" "satisfies_expression" "union_type" "optional_type" "type_annotation" "opting_type_annotation" "conditional_type" "array_type" "constraint" "_primary_type" "lookup_type" "tuple_type" "infer_type" "as_expression" "index_signature")) ("update_expression" ("expression")) - ("variable_declaration" ("for_statement" "declaration")) + ("variable_declaration" ("declaration" "for_statement")) ("variable_declarator" ("lexical_declaration" "variable_declaration")) ("while_statement" ("statement")) ("with_statement" ("statement")) @@ -1017,18 +1017,18 @@ (defconst combobulate-rules-javascript '(("arguments" (:*unnamed* ("spread_element" "expression"))) ("array" (:*unnamed* ("spread_element" "expression"))) - ("array_pattern" (:*unnamed* ("assignment_pattern" "pattern"))) - ("arrow_function" (:*unnamed* nil :body ("expression" "statement_block") :parameter ("identifier") :parameters ("formal_parameters"))) - ("assignment_expression" (:*unnamed* nil :left ("identifier" "parenthesized_expression" "undefined" "subscript_expression" "object_pattern" "array_pattern" "member_expression") :right ("expression"))) + ("array_pattern" (:*unnamed* ("pattern" "assignment_pattern"))) + ("arrow_function" (:*unnamed* nil :body ("statement_block" "expression") :parameter ("identifier") :parameters ("formal_parameters"))) + ("assignment_expression" (:*unnamed* nil :left ("identifier" "object_pattern" "member_expression" "subscript_expression" "undefined" "parenthesized_expression" "array_pattern") :right ("expression"))) ("assignment_pattern" (:*unnamed* nil :left ("pattern") :right ("expression"))) - ("augmented_assignment_expression" (:*unnamed* nil :left ("subscript_expression" "member_expression" "parenthesized_expression" "identifier") :operator nil :right ("expression"))) + ("augmented_assignment_expression" (:*unnamed* nil :left ("parenthesized_expression" "identifier" "subscript_expression" "member_expression") :operator nil :right ("expression"))) ("await_expression" (:*unnamed* ("expression"))) - ("binary_expression" (:*unnamed* nil :left ("expression" "private_property_identifier") :operator nil :right ("expression"))) + ("binary_expression" (:*unnamed* nil :left ("private_property_identifier" "expression") :operator nil :right ("expression"))) ("break_statement" (:*unnamed* nil :label ("statement_identifier"))) - ("call_expression" (:*unnamed* nil :arguments ("template_string" "arguments") :function ("expression") :optional_chain ("optional_chain"))) - ("catch_clause" (:*unnamed* nil :body ("statement_block") :parameter ("array_pattern" "object_pattern" "identifier"))) + ("call_expression" (:*unnamed* nil :arguments ("arguments" "template_string") :function ("expression") :optional_chain ("optional_chain"))) + ("catch_clause" (:*unnamed* nil :body ("statement_block") :parameter ("identifier" "object_pattern" "array_pattern"))) ("class" (:*unnamed* ("class_heritage") :body ("class_body") :decorator ("decorator") :name ("identifier"))) - ("class_body" (:*unnamed* nil :member ("field_definition" "method_definition" "class_static_block") :template ("glimmer_template"))) + ("class_body" (:*unnamed* nil :member ("method_definition" "class_static_block" "field_definition") :template ("glimmer_template"))) ("class_declaration" (:*unnamed* ("class_heritage") :body ("class_body") :decorator ("decorator") :name ("identifier"))) ("class_heritage" (:*unnamed* ("expression"))) ("class_static_block" (:*unnamed* nil :body ("statement_block"))) @@ -1036,8 +1036,8 @@ ("computed_property_name" (:*unnamed* ("expression"))) ("continue_statement" (:*unnamed* nil :label ("statement_identifier"))) ("debugger_statement" (:*unnamed* nil)) - ("declaration" (:*unnamed* ("generator_function_declaration" "function_declaration" "class_declaration" "variable_declaration" "lexical_declaration"))) - ("decorator" (:*unnamed* ("member_expression" "identifier" "call_expression"))) + ("declaration" (:*unnamed* ("function_declaration" "variable_declaration" "lexical_declaration" "generator_function_declaration" "class_declaration"))) + ("decorator" (:*unnamed* ("identifier" "member_expression" "call_expression"))) ("do_statement" (:*unnamed* nil :body ("statement") :condition ("parenthesized_expression"))) ("else_clause" (:*unnamed* ("statement"))) ("empty_statement" (:*unnamed* nil)) @@ -1045,14 +1045,14 @@ ("export_clause" (:*unnamed* ("export_specifier"))) ("export_specifier" (:*unnamed* nil :alias ("string" "identifier") :name ("string" "identifier"))) ("export_statement" (:*unnamed* ("namespace_export" "export_clause") :declaration ("declaration") :decorator ("decorator") :source ("string") :value ("expression"))) - ("expression" (:*unnamed* ("yield_expression" "primary_expression" "augmented_assignment_expression" "assignment_expression" "await_expression" "jsx_element" "update_expression" "glimmer_template" "ternary_expression" "binary_expression" "new_expression" "unary_expression" "jsx_self_closing_element"))) + ("expression" (:*unnamed* ("unary_expression" "assignment_expression" "ternary_expression" "jsx_element" "primary_expression" "jsx_self_closing_element" "yield_expression" "glimmer_template" "binary_expression" "new_expression" "update_expression" "await_expression" "augmented_assignment_expression"))) ("expression_statement" (:*unnamed* ("sequence_expression" "expression"))) ("false" (:*unnamed* nil)) - ("field_definition" (:*unnamed* nil :decorator ("decorator") :property ("computed_property_name" "string" "property_identifier" "private_property_identifier" "number") :value ("expression"))) + ("field_definition" (:*unnamed* nil :decorator ("decorator") :property ("string" "private_property_identifier" "computed_property_name" "number" "property_identifier") :value ("expression"))) ("finally_clause" (:*unnamed* nil :body ("statement_block"))) - ("for_in_statement" (:*unnamed* nil :body ("statement") :kind nil :left ("identifier" "parenthesized_expression" "undefined" "subscript_expression" "object_pattern" "array_pattern" "member_expression") :operator nil :right ("sequence_expression" "expression") :value ("expression"))) - ("for_statement" (:*unnamed* nil :body ("statement") :condition ("expression_statement" "empty_statement") :increment ("sequence_expression" "expression") :initializer ("lexical_declaration" "expression_statement" "empty_statement" "variable_declaration"))) - ("formal_parameters" (:*unnamed* ("assignment_pattern" "pattern"))) + ("for_in_statement" (:*unnamed* nil :body ("statement") :kind nil :left ("identifier" "object_pattern" "member_expression" "subscript_expression" "undefined" "parenthesized_expression" "array_pattern") :operator nil :right ("sequence_expression" "expression") :value ("expression"))) + ("for_statement" (:*unnamed* nil :body ("statement") :condition ("empty_statement" "expression_statement") :increment ("sequence_expression" "expression") :initializer ("lexical_declaration" "empty_statement" "variable_declaration" "expression_statement"))) + ("formal_parameters" (:*unnamed* ("pattern" "assignment_pattern"))) ("function" (:*unnamed* nil :body ("statement_block") :name ("identifier") :parameters ("formal_parameters"))) ("function_declaration" (:*unnamed* nil :body ("statement_block") :name ("identifier") :parameters ("formal_parameters"))) ("generator_function" (:*unnamed* nil :body ("statement_block") :name ("identifier") :parameters ("formal_parameters"))) @@ -1064,50 +1064,50 @@ ("identifier" (:*unnamed* nil)) ("if_statement" (:*unnamed* nil :alternative ("else_clause") :condition ("parenthesized_expression") :consequence ("statement"))) ("import" (:*unnamed* nil)) - ("import_clause" (:*unnamed* ("namespace_import" "named_imports" "identifier"))) + ("import_clause" (:*unnamed* ("identifier" "namespace_import" "named_imports"))) ("import_specifier" (:*unnamed* nil :alias ("identifier") :name ("string" "identifier"))) ("import_statement" (:*unnamed* ("import_clause") :source ("string"))) - ("jsx_attribute" (:*unnamed* ("jsx_expression" "string" "jsx_namespace_name" "property_identifier" "jsx_self_closing_element" "jsx_element"))) - ("jsx_closing_element" (:*unnamed* nil :name ("member_expression" "jsx_namespace_name" "identifier"))) - ("jsx_element" (:*unnamed* ("jsx_text" "jsx_expression" "jsx_self_closing_element" "jsx_element") :close_tag ("jsx_closing_element") :open_tag ("jsx_opening_element"))) + ("jsx_attribute" (:*unnamed* ("string" "jsx_expression" "jsx_element" "property_identifier" "jsx_namespace_name" "jsx_self_closing_element"))) + ("jsx_closing_element" (:*unnamed* nil :name ("jsx_namespace_name" "identifier" "member_expression"))) + ("jsx_element" (:*unnamed* ("jsx_element" "jsx_text" "jsx_self_closing_element" "jsx_expression") :close_tag ("jsx_closing_element") :open_tag ("jsx_opening_element"))) ("jsx_expression" (:*unnamed* ("spread_element" "sequence_expression" "expression"))) ("jsx_namespace_name" (:*unnamed* ("identifier"))) - ("jsx_opening_element" (:*unnamed* nil :attribute ("jsx_expression" "jsx_attribute") :name ("member_expression" "jsx_namespace_name" "identifier"))) - ("jsx_self_closing_element" (:*unnamed* nil :attribute ("jsx_expression" "jsx_attribute") :name ("member_expression" "jsx_namespace_name" "identifier"))) + ("jsx_opening_element" (:*unnamed* nil :attribute ("jsx_attribute" "jsx_expression") :name ("jsx_namespace_name" "identifier" "member_expression"))) + ("jsx_self_closing_element" (:*unnamed* nil :attribute ("jsx_attribute" "jsx_expression") :name ("jsx_namespace_name" "identifier" "member_expression"))) ("jsx_text" (:*unnamed* nil)) ("labeled_statement" (:*unnamed* nil :body ("statement") :label ("statement_identifier"))) ("lexical_declaration" (:*unnamed* ("variable_declarator") :kind nil)) - ("member_expression" (:*unnamed* ("member_expression" "identifier" "property_identifier") :object ("expression") :optional_chain ("optional_chain") :property ("property_identifier" "private_property_identifier"))) + ("member_expression" (:*unnamed* ("property_identifier" "identifier" "member_expression") :object ("expression") :optional_chain ("optional_chain") :property ("private_property_identifier" "property_identifier"))) ("meta_property" (:*unnamed* nil)) - ("method_definition" (:*unnamed* nil :body ("statement_block") :decorator ("decorator") :name ("computed_property_name" "string" "property_identifier" "private_property_identifier" "number") :parameters ("formal_parameters"))) + ("method_definition" (:*unnamed* nil :body ("statement_block") :decorator ("decorator") :name ("string" "private_property_identifier" "computed_property_name" "number" "property_identifier") :parameters ("formal_parameters"))) ("named_imports" (:*unnamed* ("import_specifier"))) ("namespace_export" (:*unnamed* ("string" "identifier"))) ("namespace_import" (:*unnamed* ("identifier"))) - ("new_expression" (:*unnamed* nil :arguments ("arguments") :constructor ("new_expression" "primary_expression"))) + ("new_expression" (:*unnamed* nil :arguments ("arguments") :constructor ("primary_expression" "new_expression"))) ("null" (:*unnamed* nil)) ("number" (:*unnamed* nil)) - ("object" (:*unnamed* ("pair" "spread_element" "method_definition" "shorthand_property_identifier"))) - ("object_assignment_pattern" (:*unnamed* nil :left ("shorthand_property_identifier_pattern" "array_pattern" "object_pattern") :right ("expression"))) - ("object_pattern" (:*unnamed* ("rest_pattern" "shorthand_property_identifier_pattern" "object_assignment_pattern" "pair_pattern"))) + ("object" (:*unnamed* ("pair" "spread_element" "shorthand_property_identifier" "method_definition"))) + ("object_assignment_pattern" (:*unnamed* nil :left ("shorthand_property_identifier_pattern" "object_pattern" "array_pattern") :right ("expression"))) + ("object_pattern" (:*unnamed* ("rest_pattern" "object_assignment_pattern" "shorthand_property_identifier_pattern" "pair_pattern"))) ("optional_chain" (:*unnamed* nil)) - ("pair" (:*unnamed* nil :key ("computed_property_name" "string" "property_identifier" "private_property_identifier" "number") :value ("expression"))) - ("pair_pattern" (:*unnamed* nil :key ("computed_property_name" "string" "property_identifier" "private_property_identifier" "number") :value ("assignment_pattern" "pattern"))) + ("pair" (:*unnamed* nil :key ("string" "private_property_identifier" "computed_property_name" "number" "property_identifier") :value ("expression"))) + ("pair_pattern" (:*unnamed* nil :key ("string" "private_property_identifier" "computed_property_name" "number" "property_identifier") :value ("pattern" "assignment_pattern"))) ("parenthesized_expression" (:*unnamed* ("sequence_expression" "expression"))) - ("pattern" (:*unnamed* ("identifier" "rest_pattern" "undefined" "subscript_expression" "object_pattern" "array_pattern" "member_expression"))) - ("primary_expression" (:*unnamed* ("true" "member_expression" "generator_function" "null" "parenthesized_expression" "template_string" "number" "meta_property" "array" "call_expression" "arrow_function" "this" "function" "string" "import" "subscript_expression" "regex" "identifier" "false" "super" "undefined" "class" "object"))) + ("pattern" (:*unnamed* ("identifier" "object_pattern" "member_expression" "subscript_expression" "rest_pattern" "undefined" "array_pattern"))) + ("primary_expression" (:*unnamed* ("regex" "string" "generator_function" "member_expression" "template_string" "true" "number" "arrow_function" "this" "import" "meta_property" "false" "class" "function" "identifier" "undefined" "array" "null" "subscript_expression" "call_expression" "super" "object" "parenthesized_expression"))) ("private_property_identifier" (:*unnamed* nil)) - ("program" (:*unnamed* ("hash_bang_line" "statement"))) + ("program" (:*unnamed* ("statement" "hash_bang_line"))) ("property_identifier" (:*unnamed* nil)) ("regex" (:*unnamed* nil :flags ("regex_flags") :pattern ("regex_pattern"))) ("regex_flags" (:*unnamed* nil)) ("regex_pattern" (:*unnamed* nil)) - ("rest_pattern" (:*unnamed* ("identifier" "undefined" "subscript_expression" "object_pattern" "array_pattern" "member_expression"))) + ("rest_pattern" (:*unnamed* ("identifier" "object_pattern" "member_expression" "subscript_expression" "undefined" "array_pattern"))) ("return_statement" (:*unnamed* ("sequence_expression" "expression"))) ("sequence_expression" (:*unnamed* nil :left ("expression") :right ("sequence_expression" "expression"))) ("shorthand_property_identifier" (:*unnamed* nil)) ("shorthand_property_identifier_pattern" (:*unnamed* nil)) ("spread_element" (:*unnamed* ("expression"))) - ("statement" (:*unnamed* ("if_statement" "with_statement" "throw_statement" "empty_statement" "return_statement" "while_statement" "import_statement" "break_statement" "continue_statement" "for_in_statement" "declaration" "for_statement" "switch_statement" "do_statement" "statement_block" "debugger_statement" "export_statement" "expression_statement" "labeled_statement" "try_statement"))) + ("statement" (:*unnamed* ("throw_statement" "if_statement" "empty_statement" "with_statement" "labeled_statement" "while_statement" "do_statement" "debugger_statement" "break_statement" "continue_statement" "expression_statement" "return_statement" "try_statement" "export_statement" "for_in_statement" "statement_block" "import_statement" "declaration" "for_statement" "switch_statement"))) ("statement_block" (:*unnamed* ("statement"))) ("statement_identifier" (:*unnamed* nil)) ("string" (:*unnamed* ("escape_sequence" "string_fragment"))) @@ -1129,7 +1129,7 @@ ("undefined" (:*unnamed* nil)) ("update_expression" (:*unnamed* nil :argument ("expression") :operator nil)) ("variable_declaration" (:*unnamed* ("variable_declarator"))) - ("variable_declarator" (:*unnamed* nil :name ("array_pattern" "object_pattern" "identifier") :value ("expression"))) + ("variable_declarator" (:*unnamed* nil :name ("identifier" "object_pattern" "array_pattern") :value ("expression"))) ("while_statement" (:*unnamed* nil :body ("statement") :condition ("parenthesized_expression"))) ("with_statement" (:*unnamed* nil :body ("statement") :object ("parenthesized_expression"))) ("yield_expression" (:*unnamed* ("expression"))) @@ -1139,10 +1139,10 @@ (defconst combobulate-rules-javascript-inverse '(("arguments" ("new_expression" "call_expression")) ("array" ("primary_expression")) - ("array_pattern" ("pattern" "catch_clause" "assignment_expression" "variable_declarator" "rest_pattern" "for_in_statement" "object_assignment_pattern")) + ("array_pattern" ("catch_clause" "assignment_expression" "object_assignment_pattern" "for_in_statement" "variable_declarator" "rest_pattern" "pattern")) ("arrow_function" ("primary_expression")) ("assignment_expression" ("expression")) - ("assignment_pattern" ("array_pattern" "formal_parameters" "pair_pattern")) + ("assignment_pattern" ("formal_parameters" "pair_pattern" "array_pattern")) ("augmented_assignment_expression" ("expression")) ("await_expression" ("expression")) ("binary_expression" ("expression")) @@ -1154,85 +1154,85 @@ ("class_declaration" ("declaration")) ("class_heritage" ("class" "class_declaration")) ("class_static_block" ("class_body")) - ("computed_property_name" ("field_definition" "method_definition" "pair_pattern" "pair")) + ("computed_property_name" ("pair" "field_definition" "pair_pattern" "method_definition")) ("continue_statement" ("statement")) ("debugger_statement" ("statement")) - ("declaration" ("export_statement" "statement")) - ("decorator" ("field_definition" "method_definition" "export_statement" "class_declaration" "class")) + ("declaration" ("statement" "export_statement")) + ("decorator" ("export_statement" "method_definition" "field_definition" "class" "class_declaration")) ("do_statement" ("statement")) ("else_clause" ("if_statement")) - ("empty_statement" ("for_statement" "statement")) + ("empty_statement" ("statement" "for_statement")) ("escape_sequence" ("string" "template_string")) ("export_clause" ("export_statement")) ("export_specifier" ("export_clause")) ("export_statement" ("statement")) - ("expression" ("member_expression" "update_expression" "parenthesized_expression" "template_substitution" "call_expression" "computed_property_name" "augmented_assignment_expression" "binary_expression" "switch_case" "spread_element" "expression_statement" "yield_expression" "throw_statement" "return_statement" "await_expression" "pair" "variable_declarator" "assignment_pattern" "jsx_expression" "for_in_statement" "ternary_expression" "array" "unary_expression" "class_heritage" "object_assignment_pattern" "arrow_function" "field_definition" "for_statement" "assignment_expression" "export_statement" "arguments" "sequence_expression" "subscript_expression")) - ("expression_statement" ("for_statement" "statement")) + ("expression" ("throw_statement" "unary_expression" "member_expression" "switch_case" "variable_declarator" "jsx_expression" "await_expression" "augmented_assignment_expression" "sequence_expression" "object_assignment_pattern" "return_statement" "array" "for_in_statement" "field_definition" "class_heritage" "arguments" "for_statement" "parenthesized_expression" "assignment_expression" "template_substitution" "arrow_function" "spread_element" "binary_expression" "update_expression" "ternary_expression" "pair" "expression_statement" "assignment_pattern" "export_statement" "subscript_expression" "computed_property_name" "call_expression" "yield_expression")) + ("expression_statement" ("statement" "for_statement")) ("false" ("primary_expression")) ("field_definition" ("class_body")) ("finally_clause" ("try_statement")) ("for_in_statement" ("statement")) ("for_statement" ("statement")) - ("formal_parameters" ("arrow_function" "generator_function_declaration" "function" "function_declaration" "method_definition" "generator_function")) + ("formal_parameters" ("generator_function" "arrow_function" "method_definition" "function_declaration" "generator_function_declaration" "function")) ("function" ("primary_expression")) ("function_declaration" ("declaration")) ("generator_function" ("primary_expression")) ("generator_function_declaration" ("declaration")) ("glimmer_closing_tag" ("glimmer_template")) ("glimmer_opening_tag" ("glimmer_template")) - ("glimmer_template" ("expression" "class_body")) + ("glimmer_template" ("class_body" "expression")) ("hash_bang_line" ("program")) - ("identifier" ("generator_function_declaration" "namespace_export" "member_expression" "generator_function" "import_clause" "import_specifier" "namespace_import" "pattern" "augmented_assignment_expression" "rest_pattern" "function_declaration" "primary_expression" "catch_clause" "export_specifier" "jsx_closing_element" "variable_declarator" "for_in_statement" "decorator" "arrow_function" "function" "jsx_opening_element" "assignment_expression" "class_declaration" "jsx_namespace_name" "class" "jsx_self_closing_element")) + ("identifier" ("catch_clause" "member_expression" "function_declaration" "variable_declarator" "generator_function_declaration" "class_declaration" "function" "augmented_assignment_expression" "jsx_namespace_name" "primary_expression" "jsx_self_closing_element" "for_in_statement" "rest_pattern" "pattern" "namespace_export" "decorator" "generator_function" "assignment_expression" "arrow_function" "class" "import_clause" "jsx_opening_element" "export_specifier" "namespace_import" "jsx_closing_element" "import_specifier")) ("if_statement" ("statement")) ("import" ("primary_expression")) ("import_clause" ("import_statement")) ("import_specifier" ("named_imports")) ("import_statement" ("statement")) - ("jsx_attribute" ("jsx_self_closing_element" "jsx_opening_element")) + ("jsx_attribute" ("jsx_opening_element" "jsx_self_closing_element")) ("jsx_closing_element" ("jsx_element")) - ("jsx_element" ("jsx_element" "expression" "jsx_attribute")) - ("jsx_expression" ("jsx_self_closing_element" "jsx_element" "jsx_opening_element" "jsx_attribute")) - ("jsx_namespace_name" ("jsx_closing_element" "jsx_self_closing_element" "jsx_opening_element" "jsx_attribute")) + ("jsx_element" ("jsx_element" "jsx_attribute" "expression")) + ("jsx_expression" ("jsx_opening_element" "jsx_element" "jsx_attribute" "jsx_self_closing_element")) + ("jsx_namespace_name" ("jsx_opening_element" "jsx_attribute" "jsx_self_closing_element" "jsx_closing_element")) ("jsx_opening_element" ("jsx_element")) - ("jsx_self_closing_element" ("jsx_element" "expression" "jsx_attribute")) + ("jsx_self_closing_element" ("jsx_element" "jsx_attribute" "expression")) ("jsx_text" ("jsx_element")) ("labeled_statement" ("statement")) - ("lexical_declaration" ("for_statement" "declaration")) - ("member_expression" ("pattern" "primary_expression" "jsx_opening_element" "augmented_assignment_expression" "assignment_expression" "member_expression" "jsx_closing_element" "rest_pattern" "for_in_statement" "decorator" "jsx_self_closing_element")) + ("lexical_declaration" ("declaration" "for_statement")) + ("member_expression" ("decorator" "jsx_opening_element" "member_expression" "assignment_expression" "primary_expression" "jsx_self_closing_element" "for_in_statement" "rest_pattern" "pattern" "jsx_closing_element" "augmented_assignment_expression")) ("meta_property" ("primary_expression")) - ("method_definition" ("class_body" "object")) + ("method_definition" ("object" "class_body")) ("named_imports" ("import_clause")) ("namespace_export" ("export_statement")) ("namespace_import" ("import_clause")) - ("new_expression" ("expression" "new_expression")) + ("new_expression" ("new_expression" "expression")) ("null" ("primary_expression")) - ("number" ("field_definition" "primary_expression" "method_definition" "pair_pattern" "pair")) + ("number" ("pair" "primary_expression" "pair_pattern" "method_definition" "field_definition")) ("object" ("primary_expression")) ("object_assignment_pattern" ("object_pattern")) - ("object_pattern" ("pattern" "catch_clause" "assignment_expression" "variable_declarator" "rest_pattern" "for_in_statement" "object_assignment_pattern")) + ("object_pattern" ("catch_clause" "assignment_expression" "object_assignment_pattern" "for_in_statement" "variable_declarator" "rest_pattern" "pattern")) ("optional_chain" ("subscript_expression" "member_expression" "call_expression")) ("pair" ("object")) ("pair_pattern" ("object_pattern")) - ("parenthesized_expression" ("if_statement" "with_statement" "primary_expression" "while_statement" "switch_statement" "augmented_assignment_expression" "assignment_expression" "do_statement" "for_in_statement")) - ("pattern" ("assignment_pattern" "array_pattern" "formal_parameters" "pair_pattern")) - ("primary_expression" ("expression" "new_expression")) - ("private_property_identifier" ("field_definition" "method_definition" "member_expression" "pair_pattern" "pair" "binary_expression")) - ("property_identifier" ("field_definition" "jsx_attribute" "method_definition" "member_expression" "pair_pattern" "pair")) + ("parenthesized_expression" ("if_statement" "switch_statement" "assignment_expression" "primary_expression" "with_statement" "for_in_statement" "while_statement" "do_statement" "augmented_assignment_expression")) + ("pattern" ("formal_parameters" "assignment_pattern" "pair_pattern" "array_pattern")) + ("primary_expression" ("new_expression" "expression")) + ("private_property_identifier" ("member_expression" "pair" "pair_pattern" "method_definition" "binary_expression" "field_definition")) + ("property_identifier" ("member_expression" "pair" "pair_pattern" "method_definition" "jsx_attribute" "field_definition")) ("regex" ("primary_expression")) ("regex_flags" ("regex")) ("regex_pattern" ("regex")) - ("rest_pattern" ("object_pattern" "pattern")) + ("rest_pattern" ("pattern" "object_pattern")) ("return_statement" ("statement")) - ("sequence_expression" ("for_statement" "throw_statement" "return_statement" "subscript_expression" "jsx_expression" "for_in_statement" "parenthesized_expression" "switch_case" "sequence_expression" "expression_statement" "template_substitution")) + ("sequence_expression" ("throw_statement" "sequence_expression" "switch_case" "template_substitution" "expression_statement" "return_statement" "for_in_statement" "subscript_expression" "jsx_expression" "parenthesized_expression" "for_statement")) ("shorthand_property_identifier" ("object")) - ("shorthand_property_identifier_pattern" ("object_pattern" "object_assignment_pattern")) - ("spread_element" ("array" "jsx_expression" "object" "arguments")) - ("statement" ("for_statement" "if_statement" "with_statement" "switch_default" "while_statement" "do_statement" "statement_block" "else_clause" "for_in_statement" "switch_case" "labeled_statement" "program")) - ("statement_block" ("arrow_function" "function" "generator_function_declaration" "function_declaration" "class_static_block" "statement" "catch_clause" "method_definition" "generator_function" "finally_clause" "try_statement")) - ("statement_identifier" ("break_statement" "continue_statement" "labeled_statement")) - ("string" ("field_definition" "primary_expression" "jsx_attribute" "namespace_export" "method_definition" "import_statement" "export_specifier" "pair" "pair_pattern" "export_statement" "import_specifier")) + ("shorthand_property_identifier_pattern" ("object_assignment_pattern" "object_pattern")) + ("spread_element" ("jsx_expression" "object" "arguments" "array")) + ("statement" ("if_statement" "switch_case" "else_clause" "for_statement" "with_statement" "for_in_statement" "labeled_statement" "statement_block" "while_statement" "program" "do_statement" "switch_default")) + ("statement_block" ("statement" "generator_function" "catch_clause" "try_statement" "arrow_function" "method_definition" "finally_clause" "function_declaration" "class_static_block" "generator_function_declaration" "function")) + ("statement_identifier" ("labeled_statement" "break_statement" "continue_statement")) + ("string" ("export_specifier" "pair" "export_statement" "primary_expression" "method_definition" "pair_pattern" "jsx_attribute" "field_definition" "import_statement" "namespace_export" "import_specifier")) ("string_fragment" ("string")) - ("subscript_expression" ("pattern" "primary_expression" "augmented_assignment_expression" "assignment_expression" "rest_pattern" "for_in_statement")) + ("subscript_expression" ("assignment_expression" "primary_expression" "for_in_statement" "rest_pattern" "pattern" "augmented_assignment_expression")) ("super" ("primary_expression")) ("switch_body" ("switch_statement")) ("switch_case" ("switch_body")) @@ -1246,9 +1246,9 @@ ("true" ("primary_expression")) ("try_statement" ("statement")) ("unary_expression" ("expression")) - ("undefined" ("pattern" "primary_expression" "assignment_expression" "rest_pattern" "for_in_statement")) + ("undefined" ("assignment_expression" "primary_expression" "for_in_statement" "rest_pattern" "pattern")) ("update_expression" ("expression")) - ("variable_declaration" ("for_statement" "declaration")) + ("variable_declaration" ("declaration" "for_statement")) ("variable_declarator" ("lexical_declaration" "variable_declaration")) ("while_statement" ("statement")) ("with_statement" ("statement")) @@ -1269,215 +1269,215 @@ ;; START Production rules for go (defconst combobulate-rules-go - '(("_expression" (:*unnamed* ("imaginary_literal" "true" "raw_string_literal" "func_literal" "parenthesized_expression" "iota" "unary_expression" "slice_expression" "nil" "type_conversion_expression" "int_literal" "call_expression" "type_assertion_expression" "composite_literal" "index_expression" "interpreted_string_literal" "identifier" "false" "selector_expression" "binary_expression" "float_literal" "rune_literal"))) - ("_simple_statement" (:*unnamed* ("assignment_statement" "send_statement" "short_var_declaration" "inc_statement" "expression_statement" "dec_statement"))) - ("_simple_type" (:*unnamed* ("channel_type" "union_type" "slice_type" "map_type" "qualified_type" "pointer_type" "function_type" "type_identifier" "interface_type" "array_type" "struct_type" "generic_type" "negated_type"))) - ("_statement" (:*unnamed* ("if_statement" "type_switch_statement" "assignment_statement" "send_statement" "var_declaration" "empty_statement" "return_statement" "break_statement" "short_var_declaration" "continue_statement" "select_statement" "for_statement" "const_declaration" "type_declaration" "fallthrough_statement" "defer_statement" "block" "expression_switch_statement" "goto_statement" "dec_statement" "inc_statement" "go_statement" "expression_statement" "labeled_statement"))) - ("_type" (:*unnamed* ("channel_type" "union_type" "parenthesized_type" "slice_type" "map_type" "qualified_type" "pointer_type" "function_type" "type_identifier" "interface_type" "array_type" "struct_type" "generic_type" "negated_type"))) - ("argument_list" (:*unnamed* ("imaginary_literal" "channel_type" "union_type" "slice_type" "map_type" "raw_string_literal" "parenthesized_expression" "array_type" "struct_type" "int_literal" "call_expression" "type_assertion_expression" "composite_literal" "parenthesized_type" "index_expression" "identifier" "function_type" "type_identifier" "selector_expression" "binary_expression" "variadic_argument" "rune_literal" "true" "pointer_type" "func_literal" "interface_type" "iota" "unary_expression" "slice_expression" "nil" "type_conversion_expression" "generic_type" "negated_type" "interpreted_string_literal" "qualified_type" "false" "float_literal"))) - ("array_type" (:*unnamed* nil :element ("channel_type" "union_type" "parenthesized_type" "slice_type" "map_type" "qualified_type" "pointer_type" "function_type" "type_identifier" "interface_type" "array_type" "struct_type" "generic_type" "negated_type") :length ("imaginary_literal" "true" "raw_string_literal" "func_literal" "parenthesized_expression" "iota" "unary_expression" "slice_expression" "nil" "type_conversion_expression" "int_literal" "call_expression" "type_assertion_expression" "composite_literal" "index_expression" "interpreted_string_literal" "identifier" "false" "selector_expression" "binary_expression" "float_literal" "rune_literal"))) + '(("_expression" (:*unnamed* ("type_conversion_expression" "unary_expression" "type_assertion_expression" "raw_string_literal" "true" "func_literal" "interpreted_string_literal" "binary_expression" "composite_literal" "false" "nil" "iota" "index_expression" "identifier" "rune_literal" "selector_expression" "float_literal" "imaginary_literal" "call_expression" "int_literal" "parenthesized_expression" "slice_expression"))) + ("_simple_statement" (:*unnamed* ("assignment_statement" "short_var_declaration" "inc_statement" "expression_statement" "dec_statement" "send_statement"))) + ("_simple_type" (:*unnamed* ("function_type" "interface_type" "union_type" "array_type" "qualified_type" "generic_type" "struct_type" "map_type" "negated_type" "slice_type" "pointer_type" "type_identifier" "channel_type"))) + ("_statement" (:*unnamed* ("defer_statement" "empty_statement" "if_statement" "inc_statement" "for_statement" "labeled_statement" "block" "send_statement" "assignment_statement" "go_statement" "break_statement" "continue_statement" "fallthrough_statement" "expression_switch_statement" "expression_statement" "return_statement" "type_declaration" "select_statement" "goto_statement" "const_declaration" "var_declaration" "short_var_declaration" "type_switch_statement" "dec_statement"))) + ("_type" (:*unnamed* ("function_type" "interface_type" "union_type" "array_type" "qualified_type" "generic_type" "struct_type" "map_type" "negated_type" "slice_type" "parenthesized_type" "pointer_type" "type_identifier" "channel_type"))) + ("argument_list" (:*unnamed* ("type_conversion_expression" "interface_type" "unary_expression" "true" "slice_type" "parenthesized_type" "composite_literal" "pointer_type" "channel_type" "false" "function_type" "iota" "variadic_argument" "identifier" "selector_expression" "index_expression" "int_literal" "parenthesized_expression" "slice_expression" "type_assertion_expression" "union_type" "raw_string_literal" "func_literal" "struct_type" "interpreted_string_literal" "binary_expression" "type_identifier" "nil" "array_type" "qualified_type" "generic_type" "rune_literal" "float_literal" "map_type" "negated_type" "imaginary_literal" "call_expression"))) + ("array_type" (:*unnamed* nil :element ("function_type" "interface_type" "union_type" "array_type" "qualified_type" "generic_type" "struct_type" "map_type" "negated_type" "slice_type" "parenthesized_type" "pointer_type" "type_identifier" "channel_type") :length ("type_conversion_expression" "unary_expression" "type_assertion_expression" "raw_string_literal" "true" "func_literal" "interpreted_string_literal" "binary_expression" "composite_literal" "false" "nil" "iota" "index_expression" "identifier" "rune_literal" "selector_expression" "float_literal" "imaginary_literal" "call_expression" "int_literal" "parenthesized_expression" "slice_expression"))) ("assignment_statement" (:*unnamed* nil :left ("expression_list") :operator nil :right ("expression_list"))) - ("binary_expression" (:*unnamed* nil :left ("imaginary_literal" "true" "raw_string_literal" "func_literal" "parenthesized_expression" "iota" "unary_expression" "slice_expression" "nil" "type_conversion_expression" "int_literal" "call_expression" "type_assertion_expression" "composite_literal" "index_expression" "interpreted_string_literal" "identifier" "false" "selector_expression" "binary_expression" "float_literal" "rune_literal") :operator nil :right ("imaginary_literal" "true" "raw_string_literal" "func_literal" "parenthesized_expression" "iota" "unary_expression" "slice_expression" "nil" "type_conversion_expression" "int_literal" "call_expression" "type_assertion_expression" "composite_literal" "index_expression" "interpreted_string_literal" "identifier" "false" "selector_expression" "binary_expression" "float_literal" "rune_literal"))) + ("binary_expression" (:*unnamed* nil :left ("type_conversion_expression" "unary_expression" "type_assertion_expression" "raw_string_literal" "true" "func_literal" "interpreted_string_literal" "binary_expression" "composite_literal" "false" "nil" "iota" "index_expression" "identifier" "rune_literal" "selector_expression" "float_literal" "imaginary_literal" "call_expression" "int_literal" "parenthesized_expression" "slice_expression") :operator nil :right ("type_conversion_expression" "unary_expression" "type_assertion_expression" "raw_string_literal" "true" "func_literal" "interpreted_string_literal" "binary_expression" "composite_literal" "false" "nil" "iota" "index_expression" "identifier" "rune_literal" "selector_expression" "float_literal" "imaginary_literal" "call_expression" "int_literal" "parenthesized_expression" "slice_expression"))) ("blank_identifier" (:*unnamed* nil)) - ("block" (:*unnamed* ("if_statement" "type_switch_statement" "assignment_statement" "send_statement" "var_declaration" "empty_statement" "return_statement" "break_statement" "short_var_declaration" "continue_statement" "select_statement" "for_statement" "const_declaration" "type_declaration" "fallthrough_statement" "defer_statement" "block" "expression_switch_statement" "goto_statement" "dec_statement" "inc_statement" "go_statement" "expression_statement" "labeled_statement"))) + ("block" (:*unnamed* ("defer_statement" "empty_statement" "if_statement" "inc_statement" "for_statement" "labeled_statement" "block" "send_statement" "assignment_statement" "go_statement" "break_statement" "continue_statement" "fallthrough_statement" "expression_switch_statement" "expression_statement" "return_statement" "type_declaration" "select_statement" "goto_statement" "const_declaration" "var_declaration" "short_var_declaration" "type_switch_statement" "dec_statement"))) ("break_statement" (:*unnamed* ("label_name"))) - ("call_expression" (:*unnamed* nil :arguments ("argument_list") :function ("imaginary_literal" "true" "raw_string_literal" "func_literal" "parenthesized_expression" "iota" "unary_expression" "slice_expression" "nil" "type_conversion_expression" "int_literal" "call_expression" "type_assertion_expression" "composite_literal" "index_expression" "interpreted_string_literal" "identifier" "false" "selector_expression" "binary_expression" "float_literal" "rune_literal") :type_arguments ("type_arguments"))) - ("channel_type" (:*unnamed* nil :value ("channel_type" "union_type" "parenthesized_type" "slice_type" "map_type" "qualified_type" "pointer_type" "function_type" "type_identifier" "interface_type" "array_type" "struct_type" "generic_type" "negated_type"))) + ("call_expression" (:*unnamed* nil :arguments ("argument_list") :function ("type_conversion_expression" "unary_expression" "type_assertion_expression" "raw_string_literal" "true" "func_literal" "interpreted_string_literal" "binary_expression" "composite_literal" "false" "nil" "iota" "index_expression" "identifier" "rune_literal" "selector_expression" "float_literal" "imaginary_literal" "call_expression" "int_literal" "parenthesized_expression" "slice_expression") :type_arguments ("type_arguments"))) + ("channel_type" (:*unnamed* nil :value ("function_type" "interface_type" "union_type" "array_type" "qualified_type" "generic_type" "struct_type" "map_type" "negated_type" "slice_type" "parenthesized_type" "pointer_type" "type_identifier" "channel_type"))) ("comment" (:*unnamed* nil)) - ("communication_case" (:*unnamed* ("if_statement" "type_switch_statement" "assignment_statement" "send_statement" "var_declaration" "empty_statement" "return_statement" "break_statement" "short_var_declaration" "continue_statement" "select_statement" "for_statement" "const_declaration" "type_declaration" "fallthrough_statement" "defer_statement" "block" "expression_switch_statement" "goto_statement" "dec_statement" "inc_statement" "go_statement" "expression_statement" "labeled_statement") :communication ("receive_statement" "send_statement"))) - ("composite_literal" (:*unnamed* nil :body ("literal_value") :type ("slice_type" "map_type" "qualified_type" "type_identifier" "implicit_length_array_type" "array_type" "struct_type" "generic_type"))) + ("communication_case" (:*unnamed* ("defer_statement" "empty_statement" "if_statement" "inc_statement" "for_statement" "labeled_statement" "block" "send_statement" "assignment_statement" "go_statement" "break_statement" "continue_statement" "fallthrough_statement" "expression_switch_statement" "expression_statement" "return_statement" "type_declaration" "select_statement" "goto_statement" "const_declaration" "var_declaration" "short_var_declaration" "type_switch_statement" "dec_statement") :communication ("send_statement" "receive_statement"))) + ("composite_literal" (:*unnamed* nil :body ("literal_value") :type ("array_type" "qualified_type" "generic_type" "struct_type" "map_type" "slice_type" "type_identifier" "implicit_length_array_type"))) ("const_declaration" (:*unnamed* ("const_spec"))) - ("const_spec" (:*unnamed* nil :name ("identifier") :type ("channel_type" "union_type" "parenthesized_type" "slice_type" "map_type" "qualified_type" "pointer_type" "function_type" "type_identifier" "interface_type" "array_type" "struct_type" "generic_type" "negated_type") :value ("expression_list"))) + ("const_spec" (:*unnamed* nil :name ("identifier") :type ("function_type" "interface_type" "union_type" "array_type" "qualified_type" "generic_type" "struct_type" "map_type" "negated_type" "slice_type" "parenthesized_type" "pointer_type" "type_identifier" "channel_type") :value ("expression_list"))) ("continue_statement" (:*unnamed* ("label_name"))) - ("dec_statement" (:*unnamed* ("imaginary_literal" "true" "raw_string_literal" "func_literal" "parenthesized_expression" "iota" "unary_expression" "slice_expression" "nil" "type_conversion_expression" "int_literal" "call_expression" "type_assertion_expression" "composite_literal" "index_expression" "interpreted_string_literal" "identifier" "false" "selector_expression" "binary_expression" "float_literal" "rune_literal"))) - ("default_case" (:*unnamed* ("if_statement" "type_switch_statement" "assignment_statement" "send_statement" "var_declaration" "empty_statement" "return_statement" "break_statement" "short_var_declaration" "continue_statement" "select_statement" "for_statement" "const_declaration" "type_declaration" "fallthrough_statement" "defer_statement" "block" "expression_switch_statement" "goto_statement" "dec_statement" "inc_statement" "go_statement" "expression_statement" "labeled_statement"))) - ("defer_statement" (:*unnamed* ("imaginary_literal" "true" "raw_string_literal" "func_literal" "parenthesized_expression" "iota" "unary_expression" "slice_expression" "nil" "type_conversion_expression" "int_literal" "call_expression" "type_assertion_expression" "composite_literal" "index_expression" "interpreted_string_literal" "identifier" "false" "selector_expression" "binary_expression" "float_literal" "rune_literal"))) + ("dec_statement" (:*unnamed* ("type_conversion_expression" "unary_expression" "type_assertion_expression" "raw_string_literal" "true" "func_literal" "interpreted_string_literal" "binary_expression" "composite_literal" "false" "nil" "iota" "index_expression" "identifier" "rune_literal" "selector_expression" "float_literal" "imaginary_literal" "call_expression" "int_literal" "parenthesized_expression" "slice_expression"))) + ("default_case" (:*unnamed* ("defer_statement" "empty_statement" "if_statement" "inc_statement" "for_statement" "labeled_statement" "block" "send_statement" "assignment_statement" "go_statement" "break_statement" "continue_statement" "fallthrough_statement" "expression_switch_statement" "expression_statement" "return_statement" "type_declaration" "select_statement" "goto_statement" "const_declaration" "var_declaration" "short_var_declaration" "type_switch_statement" "dec_statement"))) + ("defer_statement" (:*unnamed* ("type_conversion_expression" "unary_expression" "type_assertion_expression" "raw_string_literal" "true" "func_literal" "interpreted_string_literal" "binary_expression" "composite_literal" "false" "nil" "iota" "index_expression" "identifier" "rune_literal" "selector_expression" "float_literal" "imaginary_literal" "call_expression" "int_literal" "parenthesized_expression" "slice_expression"))) ("dot" (:*unnamed* nil)) ("empty_statement" (:*unnamed* nil)) ("escape_sequence" (:*unnamed* nil)) - ("expression_case" (:*unnamed* ("if_statement" "type_switch_statement" "assignment_statement" "send_statement" "var_declaration" "empty_statement" "return_statement" "break_statement" "short_var_declaration" "continue_statement" "select_statement" "for_statement" "const_declaration" "type_declaration" "fallthrough_statement" "defer_statement" "block" "expression_switch_statement" "goto_statement" "dec_statement" "inc_statement" "go_statement" "expression_statement" "labeled_statement") :value ("expression_list"))) - ("expression_list" (:*unnamed* ("imaginary_literal" "true" "raw_string_literal" "func_literal" "parenthesized_expression" "iota" "unary_expression" "slice_expression" "nil" "type_conversion_expression" "int_literal" "call_expression" "type_assertion_expression" "composite_literal" "index_expression" "interpreted_string_literal" "identifier" "false" "selector_expression" "binary_expression" "float_literal" "rune_literal"))) - ("expression_statement" (:*unnamed* ("imaginary_literal" "true" "raw_string_literal" "func_literal" "parenthesized_expression" "iota" "unary_expression" "slice_expression" "nil" "type_conversion_expression" "int_literal" "call_expression" "type_assertion_expression" "composite_literal" "index_expression" "interpreted_string_literal" "identifier" "false" "selector_expression" "binary_expression" "float_literal" "rune_literal"))) - ("expression_switch_statement" (:*unnamed* ("default_case" "expression_case") :initializer ("assignment_statement" "send_statement" "short_var_declaration" "inc_statement" "expression_statement" "dec_statement") :value ("imaginary_literal" "true" "raw_string_literal" "func_literal" "parenthesized_expression" "iota" "unary_expression" "slice_expression" "nil" "type_conversion_expression" "int_literal" "call_expression" "type_assertion_expression" "composite_literal" "index_expression" "interpreted_string_literal" "identifier" "false" "selector_expression" "binary_expression" "float_literal" "rune_literal"))) + ("expression_case" (:*unnamed* ("defer_statement" "empty_statement" "if_statement" "inc_statement" "for_statement" "labeled_statement" "block" "send_statement" "assignment_statement" "go_statement" "break_statement" "continue_statement" "fallthrough_statement" "expression_switch_statement" "expression_statement" "return_statement" "type_declaration" "select_statement" "goto_statement" "const_declaration" "var_declaration" "short_var_declaration" "type_switch_statement" "dec_statement") :value ("expression_list"))) + ("expression_list" (:*unnamed* ("type_conversion_expression" "unary_expression" "type_assertion_expression" "raw_string_literal" "true" "func_literal" "interpreted_string_literal" "binary_expression" "composite_literal" "false" "nil" "iota" "index_expression" "identifier" "rune_literal" "selector_expression" "float_literal" "imaginary_literal" "call_expression" "int_literal" "parenthesized_expression" "slice_expression"))) + ("expression_statement" (:*unnamed* ("type_conversion_expression" "unary_expression" "type_assertion_expression" "raw_string_literal" "true" "func_literal" "interpreted_string_literal" "binary_expression" "composite_literal" "false" "nil" "iota" "index_expression" "identifier" "rune_literal" "selector_expression" "float_literal" "imaginary_literal" "call_expression" "int_literal" "parenthesized_expression" "slice_expression"))) + ("expression_switch_statement" (:*unnamed* ("expression_case" "default_case") :initializer ("assignment_statement" "short_var_declaration" "inc_statement" "expression_statement" "dec_statement" "send_statement") :value ("type_conversion_expression" "unary_expression" "type_assertion_expression" "raw_string_literal" "true" "func_literal" "interpreted_string_literal" "binary_expression" "composite_literal" "false" "nil" "iota" "index_expression" "identifier" "rune_literal" "selector_expression" "float_literal" "imaginary_literal" "call_expression" "int_literal" "parenthesized_expression" "slice_expression"))) ("fallthrough_statement" (:*unnamed* nil)) ("false" (:*unnamed* nil)) - ("field_declaration" (:*unnamed* nil :name ("field_identifier") :tag ("raw_string_literal" "interpreted_string_literal") :type ("channel_type" "union_type" "parenthesized_type" "slice_type" "map_type" "qualified_type" "pointer_type" "function_type" "type_identifier" "interface_type" "array_type" "struct_type" "generic_type" "negated_type"))) + ("field_declaration" (:*unnamed* nil :name ("field_identifier") :tag ("interpreted_string_literal" "raw_string_literal") :type ("function_type" "interface_type" "union_type" "array_type" "qualified_type" "generic_type" "struct_type" "map_type" "negated_type" "slice_type" "parenthesized_type" "pointer_type" "type_identifier" "channel_type"))) ("field_declaration_list" (:*unnamed* ("field_declaration"))) ("field_identifier" (:*unnamed* nil)) ("float_literal" (:*unnamed* nil)) - ("for_clause" (:*unnamed* nil :condition ("imaginary_literal" "true" "raw_string_literal" "func_literal" "parenthesized_expression" "iota" "unary_expression" "slice_expression" "nil" "type_conversion_expression" "int_literal" "call_expression" "type_assertion_expression" "composite_literal" "index_expression" "interpreted_string_literal" "identifier" "false" "selector_expression" "binary_expression" "float_literal" "rune_literal") :initializer ("assignment_statement" "send_statement" "short_var_declaration" "inc_statement" "expression_statement" "dec_statement") :update ("assignment_statement" "send_statement" "short_var_declaration" "inc_statement" "expression_statement" "dec_statement"))) - ("for_statement" (:*unnamed* ("imaginary_literal" "true" "raw_string_literal" "func_literal" "parenthesized_expression" "iota" "unary_expression" "slice_expression" "range_clause" "nil" "type_conversion_expression" "int_literal" "for_clause" "call_expression" "type_assertion_expression" "composite_literal" "index_expression" "interpreted_string_literal" "identifier" "false" "selector_expression" "binary_expression" "float_literal" "rune_literal") :body ("block"))) - ("func_literal" (:*unnamed* nil :body ("block") :parameters ("parameter_list") :result ("channel_type" "union_type" "slice_type" "parameter_list" "map_type" "qualified_type" "pointer_type" "function_type" "type_identifier" "interface_type" "array_type" "struct_type" "generic_type" "negated_type"))) - ("function_declaration" (:*unnamed* nil :body ("block") :name ("identifier") :parameters ("parameter_list") :result ("channel_type" "union_type" "slice_type" "parameter_list" "map_type" "qualified_type" "pointer_type" "function_type" "type_identifier" "interface_type" "array_type" "struct_type" "generic_type" "negated_type") :type_parameters ("type_parameter_list"))) - ("function_type" (:*unnamed* nil :parameters ("parameter_list") :result ("channel_type" "union_type" "slice_type" "parameter_list" "map_type" "qualified_type" "pointer_type" "function_type" "type_identifier" "interface_type" "array_type" "struct_type" "generic_type" "negated_type"))) - ("generic_type" (:*unnamed* nil :type ("type_identifier" "qualified_type" "negated_type" "union_type") :type_arguments ("type_arguments"))) - ("go_statement" (:*unnamed* ("imaginary_literal" "true" "raw_string_literal" "func_literal" "parenthesized_expression" "iota" "unary_expression" "slice_expression" "nil" "type_conversion_expression" "int_literal" "call_expression" "type_assertion_expression" "composite_literal" "index_expression" "interpreted_string_literal" "identifier" "false" "selector_expression" "binary_expression" "float_literal" "rune_literal"))) + ("for_clause" (:*unnamed* nil :condition ("type_conversion_expression" "unary_expression" "type_assertion_expression" "raw_string_literal" "true" "func_literal" "interpreted_string_literal" "binary_expression" "composite_literal" "false" "nil" "iota" "index_expression" "identifier" "rune_literal" "selector_expression" "float_literal" "imaginary_literal" "call_expression" "int_literal" "parenthesized_expression" "slice_expression") :initializer ("assignment_statement" "short_var_declaration" "inc_statement" "expression_statement" "dec_statement" "send_statement") :update ("assignment_statement" "short_var_declaration" "inc_statement" "expression_statement" "dec_statement" "send_statement"))) + ("for_statement" (:*unnamed* ("type_conversion_expression" "unary_expression" "type_assertion_expression" "raw_string_literal" "true" "func_literal" "interpreted_string_literal" "range_clause" "binary_expression" "composite_literal" "false" "nil" "iota" "index_expression" "identifier" "for_clause" "rune_literal" "selector_expression" "float_literal" "imaginary_literal" "call_expression" "int_literal" "parenthesized_expression" "slice_expression") :body ("block"))) + ("func_literal" (:*unnamed* nil :body ("block") :parameters ("parameter_list") :result ("function_type" "interface_type" "union_type" "array_type" "qualified_type" "generic_type" "struct_type" "parameter_list" "map_type" "negated_type" "slice_type" "pointer_type" "type_identifier" "channel_type"))) + ("function_declaration" (:*unnamed* nil :body ("block") :name ("identifier") :parameters ("parameter_list") :result ("function_type" "interface_type" "union_type" "array_type" "qualified_type" "generic_type" "struct_type" "parameter_list" "map_type" "negated_type" "slice_type" "pointer_type" "type_identifier" "channel_type") :type_parameters ("type_parameter_list"))) + ("function_type" (:*unnamed* nil :parameters ("parameter_list") :result ("function_type" "interface_type" "union_type" "array_type" "qualified_type" "generic_type" "struct_type" "parameter_list" "map_type" "negated_type" "slice_type" "pointer_type" "type_identifier" "channel_type"))) + ("generic_type" (:*unnamed* nil :type ("negated_type" "type_identifier" "qualified_type" "union_type") :type_arguments ("type_arguments"))) + ("go_statement" (:*unnamed* ("type_conversion_expression" "unary_expression" "type_assertion_expression" "raw_string_literal" "true" "func_literal" "interpreted_string_literal" "binary_expression" "composite_literal" "false" "nil" "iota" "index_expression" "identifier" "rune_literal" "selector_expression" "float_literal" "imaginary_literal" "call_expression" "int_literal" "parenthesized_expression" "slice_expression"))) ("goto_statement" (:*unnamed* ("label_name"))) ("identifier" (:*unnamed* nil)) - ("if_statement" (:*unnamed* nil :alternative ("if_statement" "block") :condition ("imaginary_literal" "true" "raw_string_literal" "func_literal" "parenthesized_expression" "iota" "unary_expression" "slice_expression" "nil" "type_conversion_expression" "int_literal" "call_expression" "type_assertion_expression" "composite_literal" "index_expression" "interpreted_string_literal" "identifier" "false" "selector_expression" "binary_expression" "float_literal" "rune_literal") :consequence ("block") :initializer ("assignment_statement" "send_statement" "short_var_declaration" "inc_statement" "expression_statement" "dec_statement"))) + ("if_statement" (:*unnamed* nil :alternative ("block" "if_statement") :condition ("type_conversion_expression" "unary_expression" "type_assertion_expression" "raw_string_literal" "true" "func_literal" "interpreted_string_literal" "binary_expression" "composite_literal" "false" "nil" "iota" "index_expression" "identifier" "rune_literal" "selector_expression" "float_literal" "imaginary_literal" "call_expression" "int_literal" "parenthesized_expression" "slice_expression") :consequence ("block") :initializer ("assignment_statement" "short_var_declaration" "inc_statement" "expression_statement" "dec_statement" "send_statement"))) ("imaginary_literal" (:*unnamed* nil)) - ("implicit_length_array_type" (:*unnamed* nil :element ("channel_type" "union_type" "parenthesized_type" "slice_type" "map_type" "qualified_type" "pointer_type" "function_type" "type_identifier" "interface_type" "array_type" "struct_type" "generic_type" "negated_type"))) + ("implicit_length_array_type" (:*unnamed* nil :element ("function_type" "interface_type" "union_type" "array_type" "qualified_type" "generic_type" "struct_type" "map_type" "negated_type" "slice_type" "parenthesized_type" "pointer_type" "type_identifier" "channel_type"))) ("import_declaration" (:*unnamed* ("import_spec" "import_spec_list"))) - ("import_spec" (:*unnamed* nil :name ("blank_identifier" "package_identifier" "dot") :path ("raw_string_literal" "interpreted_string_literal"))) + ("import_spec" (:*unnamed* nil :name ("blank_identifier" "package_identifier" "dot") :path ("interpreted_string_literal" "raw_string_literal"))) ("import_spec_list" (:*unnamed* ("import_spec"))) - ("inc_statement" (:*unnamed* ("imaginary_literal" "true" "raw_string_literal" "func_literal" "parenthesized_expression" "iota" "unary_expression" "slice_expression" "nil" "type_conversion_expression" "int_literal" "call_expression" "type_assertion_expression" "composite_literal" "index_expression" "interpreted_string_literal" "identifier" "false" "selector_expression" "binary_expression" "float_literal" "rune_literal"))) - ("index_expression" (:*unnamed* nil :index ("imaginary_literal" "true" "raw_string_literal" "func_literal" "parenthesized_expression" "iota" "unary_expression" "slice_expression" "nil" "type_conversion_expression" "int_literal" "call_expression" "type_assertion_expression" "composite_literal" "index_expression" "interpreted_string_literal" "identifier" "false" "selector_expression" "binary_expression" "float_literal" "rune_literal") :operand ("imaginary_literal" "true" "raw_string_literal" "func_literal" "parenthesized_expression" "iota" "unary_expression" "slice_expression" "nil" "type_conversion_expression" "int_literal" "call_expression" "type_assertion_expression" "composite_literal" "index_expression" "interpreted_string_literal" "identifier" "false" "selector_expression" "binary_expression" "float_literal" "rune_literal"))) + ("inc_statement" (:*unnamed* ("type_conversion_expression" "unary_expression" "type_assertion_expression" "raw_string_literal" "true" "func_literal" "interpreted_string_literal" "binary_expression" "composite_literal" "false" "nil" "iota" "index_expression" "identifier" "rune_literal" "selector_expression" "float_literal" "imaginary_literal" "call_expression" "int_literal" "parenthesized_expression" "slice_expression"))) + ("index_expression" (:*unnamed* nil :index ("type_conversion_expression" "unary_expression" "type_assertion_expression" "raw_string_literal" "true" "func_literal" "interpreted_string_literal" "binary_expression" "composite_literal" "false" "nil" "iota" "index_expression" "identifier" "rune_literal" "selector_expression" "float_literal" "imaginary_literal" "call_expression" "int_literal" "parenthesized_expression" "slice_expression") :operand ("type_conversion_expression" "unary_expression" "type_assertion_expression" "raw_string_literal" "true" "func_literal" "interpreted_string_literal" "binary_expression" "composite_literal" "false" "nil" "iota" "index_expression" "identifier" "rune_literal" "selector_expression" "float_literal" "imaginary_literal" "call_expression" "int_literal" "parenthesized_expression" "slice_expression"))) ("int_literal" (:*unnamed* nil)) - ("interface_type" (:*unnamed* ("method_spec" "struct_elem" "constraint_elem"))) + ("interface_type" (:*unnamed* ("method_spec" "constraint_elem" "struct_elem"))) ("interpreted_string_literal" (:*unnamed* ("escape_sequence"))) ("iota" (:*unnamed* nil)) ("keyed_element" (:*unnamed* ("literal_element"))) ("label_name" (:*unnamed* nil)) - ("labeled_statement" (:*unnamed* ("if_statement" "type_switch_statement" "assignment_statement" "send_statement" "var_declaration" "empty_statement" "return_statement" "break_statement" "short_var_declaration" "continue_statement" "select_statement" "for_statement" "const_declaration" "type_declaration" "fallthrough_statement" "defer_statement" "block" "expression_switch_statement" "goto_statement" "dec_statement" "inc_statement" "go_statement" "expression_statement" "labeled_statement") :label ("label_name"))) - ("literal_element" (:*unnamed* ("imaginary_literal" "true" "raw_string_literal" "func_literal" "parenthesized_expression" "iota" "unary_expression" "slice_expression" "nil" "type_conversion_expression" "int_literal" "call_expression" "type_assertion_expression" "composite_literal" "index_expression" "interpreted_string_literal" "identifier" "false" "literal_value" "selector_expression" "binary_expression" "float_literal" "rune_literal"))) + ("labeled_statement" (:*unnamed* ("defer_statement" "empty_statement" "if_statement" "inc_statement" "for_statement" "labeled_statement" "block" "send_statement" "assignment_statement" "go_statement" "break_statement" "continue_statement" "fallthrough_statement" "expression_switch_statement" "expression_statement" "return_statement" "type_declaration" "select_statement" "goto_statement" "const_declaration" "var_declaration" "short_var_declaration" "type_switch_statement" "dec_statement") :label ("label_name"))) + ("literal_element" (:*unnamed* ("type_conversion_expression" "unary_expression" "type_assertion_expression" "raw_string_literal" "true" "func_literal" "interpreted_string_literal" "binary_expression" "composite_literal" "false" "nil" "iota" "index_expression" "identifier" "rune_literal" "literal_value" "selector_expression" "float_literal" "imaginary_literal" "call_expression" "int_literal" "parenthesized_expression" "slice_expression"))) ("literal_value" (:*unnamed* ("keyed_element" "literal_element"))) - ("map_type" (:*unnamed* nil :key ("channel_type" "union_type" "parenthesized_type" "slice_type" "map_type" "qualified_type" "pointer_type" "function_type" "type_identifier" "interface_type" "array_type" "struct_type" "generic_type" "negated_type") :value ("channel_type" "union_type" "parenthesized_type" "slice_type" "map_type" "qualified_type" "pointer_type" "function_type" "type_identifier" "interface_type" "array_type" "struct_type" "generic_type" "negated_type"))) - ("method_declaration" (:*unnamed* nil :body ("block") :name ("field_identifier") :parameters ("parameter_list") :receiver ("parameter_list") :result ("channel_type" "union_type" "slice_type" "parameter_list" "map_type" "qualified_type" "pointer_type" "function_type" "type_identifier" "interface_type" "array_type" "struct_type" "generic_type" "negated_type"))) - ("method_spec" (:*unnamed* nil :name ("field_identifier") :parameters ("parameter_list") :result ("channel_type" "union_type" "slice_type" "parameter_list" "map_type" "qualified_type" "pointer_type" "function_type" "type_identifier" "interface_type" "array_type" "struct_type" "generic_type" "negated_type"))) - ("negated_type" (:*unnamed* ("channel_type" "union_type" "parenthesized_type" "slice_type" "map_type" "qualified_type" "pointer_type" "function_type" "type_identifier" "interface_type" "array_type" "struct_type" "generic_type" "negated_type"))) + ("map_type" (:*unnamed* nil :key ("function_type" "interface_type" "union_type" "array_type" "qualified_type" "generic_type" "struct_type" "map_type" "negated_type" "slice_type" "parenthesized_type" "pointer_type" "type_identifier" "channel_type") :value ("function_type" "interface_type" "union_type" "array_type" "qualified_type" "generic_type" "struct_type" "map_type" "negated_type" "slice_type" "parenthesized_type" "pointer_type" "type_identifier" "channel_type"))) + ("method_declaration" (:*unnamed* nil :body ("block") :name ("field_identifier") :parameters ("parameter_list") :receiver ("parameter_list") :result ("function_type" "interface_type" "union_type" "array_type" "qualified_type" "generic_type" "struct_type" "parameter_list" "map_type" "negated_type" "slice_type" "pointer_type" "type_identifier" "channel_type"))) + ("method_spec" (:*unnamed* nil :name ("field_identifier") :parameters ("parameter_list") :result ("function_type" "interface_type" "union_type" "array_type" "qualified_type" "generic_type" "struct_type" "parameter_list" "map_type" "negated_type" "slice_type" "pointer_type" "type_identifier" "channel_type"))) + ("negated_type" (:*unnamed* ("function_type" "interface_type" "union_type" "array_type" "qualified_type" "generic_type" "struct_type" "map_type" "negated_type" "slice_type" "parenthesized_type" "pointer_type" "type_identifier" "channel_type"))) ("nil" (:*unnamed* nil)) ("package_clause" (:*unnamed* ("package_identifier"))) ("package_identifier" (:*unnamed* nil)) - ("parameter_declaration" (:*unnamed* nil :name ("identifier") :type ("channel_type" "union_type" "parenthesized_type" "slice_type" "map_type" "qualified_type" "pointer_type" "function_type" "type_identifier" "interface_type" "array_type" "struct_type" "generic_type" "negated_type"))) + ("parameter_declaration" (:*unnamed* nil :name ("identifier") :type ("function_type" "interface_type" "union_type" "array_type" "qualified_type" "generic_type" "struct_type" "map_type" "negated_type" "slice_type" "parenthesized_type" "pointer_type" "type_identifier" "channel_type"))) ("parameter_list" (:*unnamed* ("parameter_declaration" "variadic_parameter_declaration"))) - ("parenthesized_expression" (:*unnamed* ("imaginary_literal" "true" "raw_string_literal" "func_literal" "parenthesized_expression" "iota" "unary_expression" "slice_expression" "nil" "type_conversion_expression" "int_literal" "call_expression" "type_assertion_expression" "composite_literal" "index_expression" "interpreted_string_literal" "identifier" "false" "selector_expression" "binary_expression" "float_literal" "rune_literal"))) - ("parenthesized_type" (:*unnamed* ("channel_type" "union_type" "parenthesized_type" "slice_type" "map_type" "qualified_type" "pointer_type" "function_type" "type_identifier" "interface_type" "array_type" "struct_type" "generic_type" "negated_type"))) - ("pointer_type" (:*unnamed* ("channel_type" "union_type" "parenthesized_type" "slice_type" "map_type" "qualified_type" "pointer_type" "function_type" "type_identifier" "interface_type" "array_type" "struct_type" "generic_type" "negated_type"))) + ("parenthesized_expression" (:*unnamed* ("type_conversion_expression" "unary_expression" "type_assertion_expression" "raw_string_literal" "true" "func_literal" "interpreted_string_literal" "binary_expression" "composite_literal" "false" "nil" "iota" "index_expression" "identifier" "rune_literal" "selector_expression" "float_literal" "imaginary_literal" "call_expression" "int_literal" "parenthesized_expression" "slice_expression"))) + ("parenthesized_type" (:*unnamed* ("function_type" "interface_type" "union_type" "array_type" "qualified_type" "generic_type" "struct_type" "map_type" "negated_type" "slice_type" "parenthesized_type" "pointer_type" "type_identifier" "channel_type"))) + ("pointer_type" (:*unnamed* ("function_type" "interface_type" "union_type" "array_type" "qualified_type" "generic_type" "struct_type" "map_type" "negated_type" "slice_type" "parenthesized_type" "pointer_type" "type_identifier" "channel_type"))) ("qualified_type" (:*unnamed* nil :name ("type_identifier") :package ("package_identifier"))) - ("range_clause" (:*unnamed* nil :left ("expression_list") :right ("imaginary_literal" "true" "raw_string_literal" "func_literal" "parenthesized_expression" "iota" "unary_expression" "slice_expression" "nil" "type_conversion_expression" "int_literal" "call_expression" "type_assertion_expression" "composite_literal" "index_expression" "interpreted_string_literal" "identifier" "false" "selector_expression" "binary_expression" "float_literal" "rune_literal"))) + ("range_clause" (:*unnamed* nil :left ("expression_list") :right ("type_conversion_expression" "unary_expression" "type_assertion_expression" "raw_string_literal" "true" "func_literal" "interpreted_string_literal" "binary_expression" "composite_literal" "false" "nil" "iota" "index_expression" "identifier" "rune_literal" "selector_expression" "float_literal" "imaginary_literal" "call_expression" "int_literal" "parenthesized_expression" "slice_expression"))) ("raw_string_literal" (:*unnamed* nil)) - ("receive_statement" (:*unnamed* nil :left ("expression_list") :right ("imaginary_literal" "true" "raw_string_literal" "func_literal" "parenthesized_expression" "iota" "unary_expression" "slice_expression" "nil" "type_conversion_expression" "int_literal" "call_expression" "type_assertion_expression" "composite_literal" "index_expression" "interpreted_string_literal" "identifier" "false" "selector_expression" "binary_expression" "float_literal" "rune_literal"))) + ("receive_statement" (:*unnamed* nil :left ("expression_list") :right ("type_conversion_expression" "unary_expression" "type_assertion_expression" "raw_string_literal" "true" "func_literal" "interpreted_string_literal" "binary_expression" "composite_literal" "false" "nil" "iota" "index_expression" "identifier" "rune_literal" "selector_expression" "float_literal" "imaginary_literal" "call_expression" "int_literal" "parenthesized_expression" "slice_expression"))) ("return_statement" (:*unnamed* ("expression_list"))) ("rune_literal" (:*unnamed* nil)) - ("select_statement" (:*unnamed* ("default_case" "communication_case"))) - ("selector_expression" (:*unnamed* nil :field ("field_identifier") :operand ("imaginary_literal" "true" "raw_string_literal" "func_literal" "parenthesized_expression" "iota" "unary_expression" "slice_expression" "nil" "type_conversion_expression" "int_literal" "call_expression" "type_assertion_expression" "composite_literal" "index_expression" "interpreted_string_literal" "identifier" "false" "selector_expression" "binary_expression" "float_literal" "rune_literal"))) - ("send_statement" (:*unnamed* nil :channel ("imaginary_literal" "true" "raw_string_literal" "func_literal" "parenthesized_expression" "iota" "unary_expression" "slice_expression" "nil" "type_conversion_expression" "int_literal" "call_expression" "type_assertion_expression" "composite_literal" "index_expression" "interpreted_string_literal" "identifier" "false" "selector_expression" "binary_expression" "float_literal" "rune_literal") :value ("imaginary_literal" "true" "raw_string_literal" "func_literal" "parenthesized_expression" "iota" "unary_expression" "slice_expression" "nil" "type_conversion_expression" "int_literal" "call_expression" "type_assertion_expression" "composite_literal" "index_expression" "interpreted_string_literal" "identifier" "false" "selector_expression" "binary_expression" "float_literal" "rune_literal"))) + ("select_statement" (:*unnamed* ("communication_case" "default_case"))) + ("selector_expression" (:*unnamed* nil :field ("field_identifier") :operand ("type_conversion_expression" "unary_expression" "type_assertion_expression" "raw_string_literal" "true" "func_literal" "interpreted_string_literal" "binary_expression" "composite_literal" "false" "nil" "iota" "index_expression" "identifier" "rune_literal" "selector_expression" "float_literal" "imaginary_literal" "call_expression" "int_literal" "parenthesized_expression" "slice_expression"))) + ("send_statement" (:*unnamed* nil :channel ("type_conversion_expression" "unary_expression" "type_assertion_expression" "raw_string_literal" "true" "func_literal" "interpreted_string_literal" "binary_expression" "composite_literal" "false" "nil" "iota" "index_expression" "identifier" "rune_literal" "selector_expression" "float_literal" "imaginary_literal" "call_expression" "int_literal" "parenthesized_expression" "slice_expression") :value ("type_conversion_expression" "unary_expression" "type_assertion_expression" "raw_string_literal" "true" "func_literal" "interpreted_string_literal" "binary_expression" "composite_literal" "false" "nil" "iota" "index_expression" "identifier" "rune_literal" "selector_expression" "float_literal" "imaginary_literal" "call_expression" "int_literal" "parenthesized_expression" "slice_expression"))) ("short_var_declaration" (:*unnamed* nil :left ("expression_list") :right ("expression_list"))) - ("slice_expression" (:*unnamed* nil :capacity ("imaginary_literal" "true" "raw_string_literal" "func_literal" "parenthesized_expression" "iota" "unary_expression" "slice_expression" "nil" "type_conversion_expression" "int_literal" "call_expression" "type_assertion_expression" "composite_literal" "index_expression" "interpreted_string_literal" "identifier" "false" "selector_expression" "binary_expression" "float_literal" "rune_literal") :end ("imaginary_literal" "true" "raw_string_literal" "func_literal" "parenthesized_expression" "iota" "unary_expression" "slice_expression" "nil" "type_conversion_expression" "int_literal" "call_expression" "type_assertion_expression" "composite_literal" "index_expression" "interpreted_string_literal" "identifier" "false" "selector_expression" "binary_expression" "float_literal" "rune_literal") :operand ("imaginary_literal" "true" "raw_string_literal" "func_literal" "parenthesized_expression" "iota" "unary_expression" "slice_expression" "nil" "type_conversion_expression" "int_literal" "call_expression" "type_assertion_expression" "composite_literal" "index_expression" "interpreted_string_literal" "identifier" "false" "selector_expression" "binary_expression" "float_literal" "rune_literal") :start ("imaginary_literal" "true" "raw_string_literal" "func_literal" "parenthesized_expression" "iota" "unary_expression" "slice_expression" "nil" "type_conversion_expression" "int_literal" "call_expression" "type_assertion_expression" "composite_literal" "index_expression" "interpreted_string_literal" "identifier" "false" "selector_expression" "binary_expression" "float_literal" "rune_literal"))) - ("slice_type" (:*unnamed* nil :element ("channel_type" "union_type" "parenthesized_type" "slice_type" "map_type" "qualified_type" "pointer_type" "function_type" "type_identifier" "interface_type" "array_type" "struct_type" "generic_type" "negated_type"))) - ("source_file" (:*unnamed* ("if_statement" "import_declaration" "type_switch_statement" "assignment_statement" "send_statement" "var_declaration" "empty_statement" "function_declaration" "return_statement" "break_statement" "short_var_declaration" "continue_statement" "select_statement" "for_statement" "const_declaration" "type_declaration" "fallthrough_statement" "defer_statement" "package_clause" "block" "expression_switch_statement" "goto_statement" "dec_statement" "inc_statement" "go_statement" "method_declaration" "expression_statement" "labeled_statement"))) + ("slice_expression" (:*unnamed* nil :capacity ("type_conversion_expression" "unary_expression" "type_assertion_expression" "raw_string_literal" "true" "func_literal" "interpreted_string_literal" "binary_expression" "composite_literal" "false" "nil" "iota" "index_expression" "identifier" "rune_literal" "selector_expression" "float_literal" "imaginary_literal" "call_expression" "int_literal" "parenthesized_expression" "slice_expression") :end ("type_conversion_expression" "unary_expression" "type_assertion_expression" "raw_string_literal" "true" "func_literal" "interpreted_string_literal" "binary_expression" "composite_literal" "false" "nil" "iota" "index_expression" "identifier" "rune_literal" "selector_expression" "float_literal" "imaginary_literal" "call_expression" "int_literal" "parenthesized_expression" "slice_expression") :operand ("type_conversion_expression" "unary_expression" "type_assertion_expression" "raw_string_literal" "true" "func_literal" "interpreted_string_literal" "binary_expression" "composite_literal" "false" "nil" "iota" "index_expression" "identifier" "rune_literal" "selector_expression" "float_literal" "imaginary_literal" "call_expression" "int_literal" "parenthesized_expression" "slice_expression") :start ("type_conversion_expression" "unary_expression" "type_assertion_expression" "raw_string_literal" "true" "func_literal" "interpreted_string_literal" "binary_expression" "composite_literal" "false" "nil" "iota" "index_expression" "identifier" "rune_literal" "selector_expression" "float_literal" "imaginary_literal" "call_expression" "int_literal" "parenthesized_expression" "slice_expression"))) + ("slice_type" (:*unnamed* nil :element ("function_type" "interface_type" "union_type" "array_type" "qualified_type" "generic_type" "struct_type" "map_type" "negated_type" "slice_type" "parenthesized_type" "pointer_type" "type_identifier" "channel_type"))) + ("source_file" (:*unnamed* ("defer_statement" "empty_statement" "if_statement" "method_declaration" "inc_statement" "for_statement" "import_declaration" "function_declaration" "labeled_statement" "block" "send_statement" "assignment_statement" "go_statement" "break_statement" "continue_statement" "fallthrough_statement" "expression_switch_statement" "expression_statement" "return_statement" "package_clause" "type_declaration" "select_statement" "goto_statement" "const_declaration" "var_declaration" "short_var_declaration" "type_switch_statement" "dec_statement"))) ("struct_elem" (:*unnamed* ("struct_term"))) ("struct_term" (:*unnamed* ("struct_type"))) ("struct_type" (:*unnamed* ("field_declaration_list"))) ("true" (:*unnamed* nil)) - ("type_alias" (:*unnamed* nil :name ("type_identifier") :type ("channel_type" "union_type" "parenthesized_type" "slice_type" "map_type" "qualified_type" "pointer_type" "function_type" "type_identifier" "interface_type" "array_type" "struct_type" "generic_type" "negated_type"))) - ("type_arguments" (:*unnamed* ("channel_type" "union_type" "parenthesized_type" "slice_type" "map_type" "qualified_type" "pointer_type" "function_type" "type_identifier" "interface_type" "array_type" "struct_type" "generic_type" "negated_type"))) - ("type_assertion_expression" (:*unnamed* nil :operand ("imaginary_literal" "true" "raw_string_literal" "func_literal" "parenthesized_expression" "iota" "unary_expression" "slice_expression" "nil" "type_conversion_expression" "int_literal" "call_expression" "type_assertion_expression" "composite_literal" "index_expression" "interpreted_string_literal" "identifier" "false" "selector_expression" "binary_expression" "float_literal" "rune_literal") :type ("channel_type" "union_type" "parenthesized_type" "slice_type" "map_type" "qualified_type" "pointer_type" "function_type" "type_identifier" "interface_type" "array_type" "struct_type" "generic_type" "negated_type"))) - ("type_case" (:*unnamed* ("if_statement" "type_switch_statement" "assignment_statement" "send_statement" "var_declaration" "empty_statement" "return_statement" "break_statement" "short_var_declaration" "continue_statement" "select_statement" "for_statement" "const_declaration" "type_declaration" "fallthrough_statement" "defer_statement" "block" "expression_switch_statement" "goto_statement" "dec_statement" "inc_statement" "go_statement" "expression_statement" "labeled_statement") :type ("channel_type" "union_type" "parenthesized_type" "slice_type" "map_type" "qualified_type" "pointer_type" "function_type" "type_identifier" "interface_type" "array_type" "struct_type" "generic_type" "negated_type"))) - ("type_conversion_expression" (:*unnamed* nil :operand ("imaginary_literal" "true" "raw_string_literal" "func_literal" "parenthesized_expression" "iota" "unary_expression" "slice_expression" "nil" "type_conversion_expression" "int_literal" "call_expression" "type_assertion_expression" "composite_literal" "index_expression" "interpreted_string_literal" "identifier" "false" "selector_expression" "binary_expression" "float_literal" "rune_literal") :type ("channel_type" "union_type" "parenthesized_type" "slice_type" "map_type" "qualified_type" "pointer_type" "function_type" "type_identifier" "interface_type" "array_type" "struct_type" "generic_type" "negated_type"))) - ("type_declaration" (:*unnamed* ("type_spec" "type_alias"))) + ("type_alias" (:*unnamed* nil :name ("type_identifier") :type ("function_type" "interface_type" "union_type" "array_type" "qualified_type" "generic_type" "struct_type" "map_type" "negated_type" "slice_type" "parenthesized_type" "pointer_type" "type_identifier" "channel_type"))) + ("type_arguments" (:*unnamed* ("function_type" "interface_type" "union_type" "array_type" "qualified_type" "generic_type" "struct_type" "map_type" "negated_type" "slice_type" "parenthesized_type" "pointer_type" "type_identifier" "channel_type"))) + ("type_assertion_expression" (:*unnamed* nil :operand ("type_conversion_expression" "unary_expression" "type_assertion_expression" "raw_string_literal" "true" "func_literal" "interpreted_string_literal" "binary_expression" "composite_literal" "false" "nil" "iota" "index_expression" "identifier" "rune_literal" "selector_expression" "float_literal" "imaginary_literal" "call_expression" "int_literal" "parenthesized_expression" "slice_expression") :type ("function_type" "interface_type" "union_type" "array_type" "qualified_type" "generic_type" "struct_type" "map_type" "negated_type" "slice_type" "parenthesized_type" "pointer_type" "type_identifier" "channel_type"))) + ("type_case" (:*unnamed* ("defer_statement" "empty_statement" "if_statement" "inc_statement" "for_statement" "labeled_statement" "block" "send_statement" "assignment_statement" "go_statement" "break_statement" "continue_statement" "fallthrough_statement" "expression_switch_statement" "expression_statement" "return_statement" "type_declaration" "select_statement" "goto_statement" "const_declaration" "var_declaration" "short_var_declaration" "type_switch_statement" "dec_statement") :type ("function_type" "interface_type" "union_type" "array_type" "qualified_type" "generic_type" "struct_type" "map_type" "negated_type" "slice_type" "parenthesized_type" "pointer_type" "type_identifier" "channel_type"))) + ("type_conversion_expression" (:*unnamed* nil :operand ("type_conversion_expression" "unary_expression" "type_assertion_expression" "raw_string_literal" "true" "func_literal" "interpreted_string_literal" "binary_expression" "composite_literal" "false" "nil" "iota" "index_expression" "identifier" "rune_literal" "selector_expression" "float_literal" "imaginary_literal" "call_expression" "int_literal" "parenthesized_expression" "slice_expression") :type ("function_type" "interface_type" "union_type" "array_type" "qualified_type" "generic_type" "struct_type" "map_type" "negated_type" "slice_type" "parenthesized_type" "pointer_type" "type_identifier" "channel_type"))) + ("type_declaration" (:*unnamed* ("type_alias" "type_spec"))) ("type_identifier" (:*unnamed* nil)) ("type_parameter_list" (:*unnamed* ("parameter_declaration"))) - ("type_spec" (:*unnamed* nil :name ("type_identifier") :type ("channel_type" "union_type" "parenthesized_type" "slice_type" "map_type" "qualified_type" "pointer_type" "function_type" "type_identifier" "interface_type" "array_type" "struct_type" "generic_type" "negated_type") :type_parameters ("type_parameter_list"))) - ("type_switch_statement" (:*unnamed* ("default_case" "type_case") :alias ("expression_list") :initializer ("assignment_statement" "send_statement" "short_var_declaration" "inc_statement" "expression_statement" "dec_statement") :value ("imaginary_literal" "true" "raw_string_literal" "func_literal" "parenthesized_expression" "iota" "unary_expression" "slice_expression" "nil" "type_conversion_expression" "int_literal" "call_expression" "type_assertion_expression" "composite_literal" "index_expression" "interpreted_string_literal" "identifier" "false" "selector_expression" "binary_expression" "float_literal" "rune_literal"))) - ("unary_expression" (:*unnamed* nil :operand ("imaginary_literal" "true" "raw_string_literal" "func_literal" "parenthesized_expression" "iota" "unary_expression" "slice_expression" "nil" "type_conversion_expression" "int_literal" "call_expression" "type_assertion_expression" "composite_literal" "index_expression" "interpreted_string_literal" "identifier" "false" "selector_expression" "binary_expression" "float_literal" "rune_literal") :operator nil)) - ("union_type" (:*unnamed* ("channel_type" "union_type" "parenthesized_type" "slice_type" "map_type" "qualified_type" "pointer_type" "function_type" "type_identifier" "interface_type" "array_type" "struct_type" "generic_type" "negated_type"))) + ("type_spec" (:*unnamed* nil :name ("type_identifier") :type ("function_type" "interface_type" "union_type" "array_type" "qualified_type" "generic_type" "struct_type" "map_type" "negated_type" "slice_type" "parenthesized_type" "pointer_type" "type_identifier" "channel_type") :type_parameters ("type_parameter_list"))) + ("type_switch_statement" (:*unnamed* ("type_case" "default_case") :alias ("expression_list") :initializer ("assignment_statement" "short_var_declaration" "inc_statement" "expression_statement" "dec_statement" "send_statement") :value ("type_conversion_expression" "unary_expression" "type_assertion_expression" "raw_string_literal" "true" "func_literal" "interpreted_string_literal" "binary_expression" "composite_literal" "false" "nil" "iota" "index_expression" "identifier" "rune_literal" "selector_expression" "float_literal" "imaginary_literal" "call_expression" "int_literal" "parenthesized_expression" "slice_expression"))) + ("unary_expression" (:*unnamed* nil :operand ("type_conversion_expression" "unary_expression" "type_assertion_expression" "raw_string_literal" "true" "func_literal" "interpreted_string_literal" "binary_expression" "composite_literal" "false" "nil" "iota" "index_expression" "identifier" "rune_literal" "selector_expression" "float_literal" "imaginary_literal" "call_expression" "int_literal" "parenthesized_expression" "slice_expression") :operator nil)) + ("union_type" (:*unnamed* ("function_type" "interface_type" "union_type" "array_type" "qualified_type" "generic_type" "struct_type" "map_type" "negated_type" "slice_type" "parenthesized_type" "pointer_type" "type_identifier" "channel_type"))) ("var_declaration" (:*unnamed* ("var_spec"))) - ("var_spec" (:*unnamed* nil :name ("identifier") :type ("channel_type" "union_type" "parenthesized_type" "slice_type" "map_type" "qualified_type" "pointer_type" "function_type" "type_identifier" "interface_type" "array_type" "struct_type" "generic_type" "negated_type") :value ("expression_list"))) - ("variadic_argument" (:*unnamed* ("imaginary_literal" "true" "raw_string_literal" "func_literal" "parenthesized_expression" "iota" "unary_expression" "slice_expression" "nil" "type_conversion_expression" "int_literal" "call_expression" "type_assertion_expression" "composite_literal" "index_expression" "interpreted_string_literal" "identifier" "false" "selector_expression" "binary_expression" "float_literal" "rune_literal"))) - ("variadic_parameter_declaration" (:*unnamed* nil :name ("identifier") :type ("channel_type" "union_type" "parenthesized_type" "slice_type" "map_type" "qualified_type" "pointer_type" "function_type" "type_identifier" "interface_type" "array_type" "struct_type" "generic_type" "negated_type"))) + ("var_spec" (:*unnamed* nil :name ("identifier") :type ("function_type" "interface_type" "union_type" "array_type" "qualified_type" "generic_type" "struct_type" "map_type" "negated_type" "slice_type" "parenthesized_type" "pointer_type" "type_identifier" "channel_type") :value ("expression_list"))) + ("variadic_argument" (:*unnamed* ("type_conversion_expression" "unary_expression" "type_assertion_expression" "raw_string_literal" "true" "func_literal" "interpreted_string_literal" "binary_expression" "composite_literal" "false" "nil" "iota" "index_expression" "identifier" "rune_literal" "selector_expression" "float_literal" "imaginary_literal" "call_expression" "int_literal" "parenthesized_expression" "slice_expression"))) + ("variadic_parameter_declaration" (:*unnamed* nil :name ("identifier") :type ("function_type" "interface_type" "union_type" "array_type" "qualified_type" "generic_type" "struct_type" "map_type" "negated_type" "slice_type" "parenthesized_type" "pointer_type" "type_identifier" "channel_type"))) )) ;; END Production rules for go ;; START Inverse production rules for go (defconst combobulate-rules-go-inverse '(("argument_list" ("call_expression")) - ("array_type" ("channel_type" "union_type" "slice_type" "map_type" "array_type" "var_spec" "type_assertion_expression" "composite_literal" "parenthesized_type" "field_declaration" "variadic_parameter_declaration" "type_alias" "_simple_type" "function_type" "implicit_length_array_type" "method_declaration" "function_declaration" "pointer_type" "type_arguments" "parameter_declaration" "func_literal" "const_spec" "type_conversion_expression" "method_spec" "negated_type" "type_spec" "_type" "type_case" "argument_list")) - ("assignment_statement" ("if_statement" "type_switch_statement" "_statement" "source_file" "communication_case" "block" "expression_switch_statement" "expression_case" "labeled_statement" "_simple_statement" "type_case" "for_clause" "default_case")) - ("binary_expression" ("if_statement" "type_switch_statement" "parenthesized_expression" "array_type" "range_clause" "for_clause" "call_expression" "type_assertion_expression" "index_expression" "defer_statement" "expression_switch_statement" "dec_statement" "selector_expression" "binary_expression" "inc_statement" "go_statement" "literal_element" "expression_statement" "variadic_argument" "send_statement" "expression_list" "_expression" "unary_expression" "slice_expression" "type_conversion_expression" "for_statement" "receive_statement" "argument_list")) + ("array_type" ("type_conversion_expression" "method_declaration" "type_arguments" "function_declaration" "slice_type" "parenthesized_type" "composite_literal" "pointer_type" "channel_type" "variadic_parameter_declaration" "function_type" "parameter_declaration" "type_alias" "var_spec" "type_case" "method_spec" "field_declaration" "type_assertion_expression" "union_type" "const_spec" "func_literal" "type_spec" "_simple_type" "_type" "array_type" "map_type" "negated_type" "argument_list" "implicit_length_array_type")) + ("assignment_statement" ("communication_case" "expression_case" "if_statement" "default_case" "expression_switch_statement" "source_file" "for_clause" "type_case" "_statement" "_simple_statement" "labeled_statement" "block" "type_switch_statement")) + ("binary_expression" ("type_conversion_expression" "if_statement" "unary_expression" "inc_statement" "literal_element" "variadic_argument" "selector_expression" "index_expression" "parenthesized_expression" "for_statement" "slice_expression" "defer_statement" "argument_list" "type_assertion_expression" "range_clause" "binary_expression" "send_statement" "go_statement" "array_type" "expression_switch_statement" "for_clause" "expression_statement" "_expression" "call_expression" "expression_list" "type_switch_statement" "dec_statement" "receive_statement")) ("blank_identifier" ("import_spec")) - ("block" ("for_statement" "if_statement" "_statement" "function_declaration" "communication_case" "source_file" "block" "expression_case" "labeled_statement" "func_literal" "type_case" "method_declaration" "default_case")) - ("break_statement" ("_statement" "source_file" "communication_case" "block" "expression_case" "labeled_statement" "type_case" "default_case")) - ("call_expression" ("if_statement" "type_switch_statement" "parenthesized_expression" "array_type" "range_clause" "for_clause" "call_expression" "type_assertion_expression" "index_expression" "defer_statement" "expression_switch_statement" "dec_statement" "selector_expression" "binary_expression" "inc_statement" "go_statement" "literal_element" "expression_statement" "variadic_argument" "send_statement" "expression_list" "_expression" "unary_expression" "slice_expression" "type_conversion_expression" "for_statement" "receive_statement" "argument_list")) - ("channel_type" ("channel_type" "union_type" "slice_type" "map_type" "array_type" "var_spec" "type_assertion_expression" "parenthesized_type" "field_declaration" "variadic_parameter_declaration" "type_alias" "_simple_type" "function_type" "implicit_length_array_type" "method_declaration" "function_declaration" "pointer_type" "type_arguments" "parameter_declaration" "func_literal" "const_spec" "type_conversion_expression" "method_spec" "negated_type" "type_spec" "_type" "type_case" "argument_list")) + ("block" ("communication_case" "expression_case" "if_statement" "method_declaration" "default_case" "source_file" "func_literal" "_statement" "type_case" "function_declaration" "labeled_statement" "block" "for_statement")) + ("break_statement" ("communication_case" "expression_case" "default_case" "source_file" "type_case" "_statement" "labeled_statement" "block")) + ("call_expression" ("type_conversion_expression" "if_statement" "unary_expression" "inc_statement" "literal_element" "variadic_argument" "selector_expression" "index_expression" "parenthesized_expression" "for_statement" "slice_expression" "defer_statement" "argument_list" "type_assertion_expression" "range_clause" "binary_expression" "send_statement" "go_statement" "array_type" "expression_switch_statement" "for_clause" "expression_statement" "_expression" "call_expression" "expression_list" "type_switch_statement" "dec_statement" "receive_statement")) + ("channel_type" ("type_conversion_expression" "method_declaration" "type_arguments" "function_declaration" "slice_type" "parenthesized_type" "pointer_type" "channel_type" "variadic_parameter_declaration" "function_type" "parameter_declaration" "type_alias" "var_spec" "type_case" "method_spec" "field_declaration" "type_assertion_expression" "union_type" "const_spec" "func_literal" "type_spec" "_simple_type" "_type" "array_type" "map_type" "negated_type" "argument_list" "implicit_length_array_type")) ("communication_case" ("select_statement")) - ("composite_literal" ("if_statement" "type_switch_statement" "parenthesized_expression" "array_type" "range_clause" "for_clause" "call_expression" "type_assertion_expression" "index_expression" "defer_statement" "expression_switch_statement" "dec_statement" "selector_expression" "binary_expression" "inc_statement" "go_statement" "literal_element" "expression_statement" "variadic_argument" "send_statement" "expression_list" "_expression" "unary_expression" "slice_expression" "type_conversion_expression" "for_statement" "receive_statement" "argument_list")) - ("const_declaration" ("_statement" "source_file" "communication_case" "block" "expression_case" "labeled_statement" "type_case" "default_case")) + ("composite_literal" ("type_conversion_expression" "if_statement" "unary_expression" "inc_statement" "literal_element" "variadic_argument" "selector_expression" "index_expression" "parenthesized_expression" "for_statement" "slice_expression" "defer_statement" "argument_list" "type_assertion_expression" "range_clause" "binary_expression" "send_statement" "go_statement" "array_type" "expression_switch_statement" "for_clause" "expression_statement" "_expression" "call_expression" "expression_list" "type_switch_statement" "dec_statement" "receive_statement")) + ("const_declaration" ("communication_case" "expression_case" "default_case" "source_file" "type_case" "_statement" "labeled_statement" "block")) ("const_spec" ("const_declaration")) ("constraint_elem" ("interface_type")) - ("continue_statement" ("_statement" "source_file" "communication_case" "block" "expression_case" "labeled_statement" "type_case" "default_case")) - ("dec_statement" ("if_statement" "type_switch_statement" "_statement" "source_file" "communication_case" "block" "expression_switch_statement" "expression_case" "labeled_statement" "_simple_statement" "type_case" "for_clause" "default_case")) - ("default_case" ("expression_switch_statement" "type_switch_statement" "select_statement")) - ("defer_statement" ("_statement" "source_file" "communication_case" "block" "expression_case" "labeled_statement" "type_case" "default_case")) + ("continue_statement" ("communication_case" "expression_case" "default_case" "source_file" "type_case" "_statement" "labeled_statement" "block")) + ("dec_statement" ("communication_case" "expression_case" "if_statement" "default_case" "expression_switch_statement" "source_file" "for_clause" "type_case" "_statement" "_simple_statement" "labeled_statement" "block" "type_switch_statement")) + ("default_case" ("type_switch_statement" "expression_switch_statement" "select_statement")) + ("defer_statement" ("communication_case" "expression_case" "default_case" "source_file" "type_case" "_statement" "labeled_statement" "block")) ("dot" ("import_spec")) - ("empty_statement" ("_statement" "source_file" "communication_case" "block" "expression_case" "labeled_statement" "type_case" "default_case")) + ("empty_statement" ("communication_case" "expression_case" "default_case" "source_file" "type_case" "_statement" "labeled_statement" "block")) ("escape_sequence" ("interpreted_string_literal")) ("expression_case" ("expression_switch_statement")) - ("expression_list" ("receive_statement" "type_switch_statement" "assignment_statement" "return_statement" "expression_case" "short_var_declaration" "const_spec" "range_clause" "var_spec")) - ("expression_statement" ("if_statement" "type_switch_statement" "_statement" "source_file" "communication_case" "block" "expression_switch_statement" "expression_case" "labeled_statement" "_simple_statement" "type_case" "for_clause" "default_case")) - ("expression_switch_statement" ("_statement" "source_file" "communication_case" "block" "expression_case" "labeled_statement" "type_case" "default_case")) - ("fallthrough_statement" ("_statement" "source_file" "communication_case" "block" "expression_case" "labeled_statement" "type_case" "default_case")) - ("false" ("if_statement" "type_switch_statement" "parenthesized_expression" "array_type" "range_clause" "for_clause" "call_expression" "type_assertion_expression" "index_expression" "defer_statement" "expression_switch_statement" "dec_statement" "selector_expression" "binary_expression" "inc_statement" "go_statement" "literal_element" "expression_statement" "variadic_argument" "send_statement" "expression_list" "_expression" "unary_expression" "slice_expression" "type_conversion_expression" "for_statement" "receive_statement" "argument_list")) + ("expression_list" ("assignment_statement" "expression_case" "var_spec" "const_spec" "return_statement" "range_clause" "short_var_declaration" "type_switch_statement" "receive_statement")) + ("expression_statement" ("communication_case" "expression_case" "if_statement" "default_case" "expression_switch_statement" "source_file" "for_clause" "type_case" "_statement" "_simple_statement" "labeled_statement" "block" "type_switch_statement")) + ("expression_switch_statement" ("communication_case" "expression_case" "default_case" "source_file" "type_case" "_statement" "labeled_statement" "block")) + ("fallthrough_statement" ("communication_case" "expression_case" "default_case" "source_file" "type_case" "_statement" "labeled_statement" "block")) + ("false" ("type_conversion_expression" "if_statement" "unary_expression" "inc_statement" "literal_element" "variadic_argument" "selector_expression" "index_expression" "parenthesized_expression" "for_statement" "slice_expression" "defer_statement" "argument_list" "type_assertion_expression" "range_clause" "binary_expression" "send_statement" "go_statement" "array_type" "expression_switch_statement" "for_clause" "expression_statement" "_expression" "call_expression" "expression_list" "type_switch_statement" "dec_statement" "receive_statement")) ("field_declaration" ("field_declaration_list")) ("field_declaration_list" ("struct_type")) - ("field_identifier" ("method_declaration" "selector_expression" "method_spec" "field_declaration")) - ("float_literal" ("if_statement" "type_switch_statement" "parenthesized_expression" "array_type" "range_clause" "for_clause" "call_expression" "type_assertion_expression" "index_expression" "defer_statement" "expression_switch_statement" "dec_statement" "selector_expression" "binary_expression" "inc_statement" "go_statement" "literal_element" "expression_statement" "variadic_argument" "send_statement" "expression_list" "_expression" "unary_expression" "slice_expression" "type_conversion_expression" "for_statement" "receive_statement" "argument_list")) + ("field_identifier" ("selector_expression" "method_spec" "method_declaration" "field_declaration")) + ("float_literal" ("type_conversion_expression" "if_statement" "unary_expression" "inc_statement" "literal_element" "variadic_argument" "selector_expression" "index_expression" "parenthesized_expression" "for_statement" "slice_expression" "defer_statement" "argument_list" "type_assertion_expression" "range_clause" "binary_expression" "send_statement" "go_statement" "array_type" "expression_switch_statement" "for_clause" "expression_statement" "_expression" "call_expression" "expression_list" "type_switch_statement" "dec_statement" "receive_statement")) ("for_clause" ("for_statement")) - ("for_statement" ("_statement" "source_file" "communication_case" "block" "expression_case" "labeled_statement" "type_case" "default_case")) - ("func_literal" ("if_statement" "type_switch_statement" "parenthesized_expression" "array_type" "range_clause" "for_clause" "call_expression" "type_assertion_expression" "index_expression" "defer_statement" "expression_switch_statement" "dec_statement" "selector_expression" "binary_expression" "inc_statement" "go_statement" "literal_element" "expression_statement" "variadic_argument" "send_statement" "expression_list" "_expression" "unary_expression" "slice_expression" "type_conversion_expression" "for_statement" "receive_statement" "argument_list")) + ("for_statement" ("communication_case" "expression_case" "default_case" "source_file" "type_case" "_statement" "labeled_statement" "block")) + ("func_literal" ("type_conversion_expression" "if_statement" "unary_expression" "inc_statement" "literal_element" "variadic_argument" "selector_expression" "index_expression" "parenthesized_expression" "for_statement" "slice_expression" "defer_statement" "argument_list" "type_assertion_expression" "range_clause" "binary_expression" "send_statement" "go_statement" "array_type" "expression_switch_statement" "for_clause" "expression_statement" "_expression" "call_expression" "expression_list" "type_switch_statement" "dec_statement" "receive_statement")) ("function_declaration" ("source_file")) - ("function_type" ("channel_type" "union_type" "slice_type" "map_type" "array_type" "var_spec" "type_assertion_expression" "parenthesized_type" "field_declaration" "variadic_parameter_declaration" "type_alias" "_simple_type" "function_type" "implicit_length_array_type" "method_declaration" "function_declaration" "pointer_type" "type_arguments" "parameter_declaration" "func_literal" "const_spec" "type_conversion_expression" "method_spec" "negated_type" "type_spec" "_type" "type_case" "argument_list")) - ("generic_type" ("channel_type" "union_type" "slice_type" "map_type" "array_type" "var_spec" "type_assertion_expression" "composite_literal" "parenthesized_type" "field_declaration" "variadic_parameter_declaration" "type_alias" "_simple_type" "function_type" "implicit_length_array_type" "method_declaration" "function_declaration" "pointer_type" "type_arguments" "parameter_declaration" "func_literal" "const_spec" "type_conversion_expression" "method_spec" "negated_type" "type_spec" "_type" "type_case" "argument_list")) - ("go_statement" ("_statement" "source_file" "communication_case" "block" "expression_case" "labeled_statement" "type_case" "default_case")) - ("goto_statement" ("_statement" "source_file" "communication_case" "block" "expression_case" "labeled_statement" "type_case" "default_case")) - ("identifier" ("if_statement" "type_switch_statement" "parenthesized_expression" "array_type" "range_clause" "for_clause" "var_spec" "call_expression" "type_assertion_expression" "variadic_parameter_declaration" "index_expression" "defer_statement" "expression_switch_statement" "dec_statement" "selector_expression" "binary_expression" "inc_statement" "literal_element" "go_statement" "expression_statement" "variadic_argument" "function_declaration" "send_statement" "expression_list" "_expression" "parameter_declaration" "const_spec" "unary_expression" "slice_expression" "type_conversion_expression" "for_statement" "receive_statement" "argument_list")) - ("if_statement" ("if_statement" "_statement" "source_file" "communication_case" "block" "expression_case" "labeled_statement" "type_case" "default_case")) - ("imaginary_literal" ("if_statement" "type_switch_statement" "parenthesized_expression" "array_type" "range_clause" "for_clause" "call_expression" "type_assertion_expression" "index_expression" "defer_statement" "expression_switch_statement" "dec_statement" "selector_expression" "binary_expression" "inc_statement" "go_statement" "literal_element" "expression_statement" "variadic_argument" "send_statement" "expression_list" "_expression" "unary_expression" "slice_expression" "type_conversion_expression" "for_statement" "receive_statement" "argument_list")) + ("function_type" ("type_conversion_expression" "method_declaration" "type_arguments" "function_declaration" "slice_type" "parenthesized_type" "pointer_type" "channel_type" "variadic_parameter_declaration" "function_type" "parameter_declaration" "type_alias" "var_spec" "type_case" "method_spec" "field_declaration" "type_assertion_expression" "union_type" "const_spec" "func_literal" "type_spec" "_simple_type" "_type" "array_type" "map_type" "negated_type" "argument_list" "implicit_length_array_type")) + ("generic_type" ("type_conversion_expression" "method_declaration" "type_arguments" "function_declaration" "slice_type" "parenthesized_type" "composite_literal" "pointer_type" "channel_type" "variadic_parameter_declaration" "function_type" "parameter_declaration" "type_alias" "var_spec" "type_case" "method_spec" "field_declaration" "type_assertion_expression" "union_type" "const_spec" "func_literal" "type_spec" "_simple_type" "_type" "array_type" "map_type" "negated_type" "argument_list" "implicit_length_array_type")) + ("go_statement" ("communication_case" "expression_case" "default_case" "source_file" "type_case" "_statement" "labeled_statement" "block")) + ("goto_statement" ("communication_case" "expression_case" "default_case" "source_file" "type_case" "_statement" "labeled_statement" "block")) + ("identifier" ("type_conversion_expression" "if_statement" "unary_expression" "inc_statement" "function_declaration" "literal_element" "variadic_parameter_declaration" "parameter_declaration" "variadic_argument" "var_spec" "selector_expression" "index_expression" "parenthesized_expression" "for_statement" "slice_expression" "defer_statement" "argument_list" "type_assertion_expression" "const_spec" "range_clause" "binary_expression" "send_statement" "go_statement" "array_type" "expression_switch_statement" "for_clause" "expression_statement" "_expression" "call_expression" "expression_list" "type_switch_statement" "dec_statement" "receive_statement")) + ("if_statement" ("communication_case" "expression_case" "if_statement" "default_case" "source_file" "type_case" "_statement" "labeled_statement" "block")) + ("imaginary_literal" ("type_conversion_expression" "if_statement" "unary_expression" "inc_statement" "literal_element" "variadic_argument" "selector_expression" "index_expression" "parenthesized_expression" "for_statement" "slice_expression" "defer_statement" "argument_list" "type_assertion_expression" "range_clause" "binary_expression" "send_statement" "go_statement" "array_type" "expression_switch_statement" "for_clause" "expression_statement" "_expression" "call_expression" "expression_list" "type_switch_statement" "dec_statement" "receive_statement")) ("implicit_length_array_type" ("composite_literal")) ("import_declaration" ("source_file")) - ("import_spec" ("import_declaration" "import_spec_list")) + ("import_spec" ("import_spec_list" "import_declaration")) ("import_spec_list" ("import_declaration")) - ("inc_statement" ("if_statement" "type_switch_statement" "_statement" "source_file" "communication_case" "block" "expression_switch_statement" "expression_case" "labeled_statement" "_simple_statement" "type_case" "for_clause" "default_case")) - ("index_expression" ("if_statement" "type_switch_statement" "parenthesized_expression" "array_type" "range_clause" "for_clause" "call_expression" "type_assertion_expression" "index_expression" "defer_statement" "expression_switch_statement" "dec_statement" "selector_expression" "binary_expression" "inc_statement" "go_statement" "literal_element" "expression_statement" "variadic_argument" "send_statement" "expression_list" "_expression" "unary_expression" "slice_expression" "type_conversion_expression" "for_statement" "receive_statement" "argument_list")) - ("int_literal" ("if_statement" "type_switch_statement" "parenthesized_expression" "array_type" "range_clause" "for_clause" "call_expression" "type_assertion_expression" "index_expression" "defer_statement" "expression_switch_statement" "dec_statement" "selector_expression" "binary_expression" "inc_statement" "go_statement" "literal_element" "expression_statement" "variadic_argument" "send_statement" "expression_list" "_expression" "unary_expression" "slice_expression" "type_conversion_expression" "for_statement" "receive_statement" "argument_list")) - ("interface_type" ("channel_type" "union_type" "slice_type" "map_type" "array_type" "var_spec" "type_assertion_expression" "parenthesized_type" "field_declaration" "variadic_parameter_declaration" "type_alias" "_simple_type" "function_type" "implicit_length_array_type" "method_declaration" "function_declaration" "pointer_type" "type_arguments" "parameter_declaration" "func_literal" "const_spec" "type_conversion_expression" "method_spec" "negated_type" "type_spec" "_type" "type_case" "argument_list")) - ("interpreted_string_literal" ("if_statement" "type_switch_statement" "parenthesized_expression" "array_type" "range_clause" "for_clause" "call_expression" "type_assertion_expression" "field_declaration" "index_expression" "defer_statement" "expression_switch_statement" "dec_statement" "selector_expression" "binary_expression" "inc_statement" "go_statement" "literal_element" "expression_statement" "variadic_argument" "send_statement" "expression_list" "import_spec" "_expression" "unary_expression" "slice_expression" "type_conversion_expression" "for_statement" "receive_statement" "argument_list")) - ("iota" ("if_statement" "type_switch_statement" "parenthesized_expression" "array_type" "range_clause" "for_clause" "call_expression" "type_assertion_expression" "index_expression" "defer_statement" "expression_switch_statement" "dec_statement" "selector_expression" "binary_expression" "inc_statement" "go_statement" "literal_element" "expression_statement" "variadic_argument" "send_statement" "expression_list" "_expression" "unary_expression" "slice_expression" "type_conversion_expression" "for_statement" "receive_statement" "argument_list")) + ("inc_statement" ("communication_case" "expression_case" "if_statement" "default_case" "expression_switch_statement" "source_file" "for_clause" "type_case" "_statement" "_simple_statement" "labeled_statement" "block" "type_switch_statement")) + ("index_expression" ("type_conversion_expression" "if_statement" "unary_expression" "inc_statement" "literal_element" "variadic_argument" "selector_expression" "index_expression" "parenthesized_expression" "for_statement" "slice_expression" "defer_statement" "argument_list" "type_assertion_expression" "range_clause" "binary_expression" "send_statement" "go_statement" "array_type" "expression_switch_statement" "for_clause" "expression_statement" "_expression" "call_expression" "expression_list" "type_switch_statement" "dec_statement" "receive_statement")) + ("int_literal" ("type_conversion_expression" "if_statement" "unary_expression" "inc_statement" "literal_element" "variadic_argument" "selector_expression" "index_expression" "parenthesized_expression" "for_statement" "slice_expression" "defer_statement" "argument_list" "type_assertion_expression" "range_clause" "binary_expression" "send_statement" "go_statement" "array_type" "expression_switch_statement" "for_clause" "expression_statement" "_expression" "call_expression" "expression_list" "type_switch_statement" "dec_statement" "receive_statement")) + ("interface_type" ("type_conversion_expression" "method_declaration" "type_arguments" "function_declaration" "slice_type" "parenthesized_type" "pointer_type" "channel_type" "variadic_parameter_declaration" "function_type" "parameter_declaration" "type_alias" "var_spec" "type_case" "method_spec" "field_declaration" "type_assertion_expression" "union_type" "const_spec" "func_literal" "type_spec" "_simple_type" "_type" "array_type" "map_type" "negated_type" "argument_list" "implicit_length_array_type")) + ("interpreted_string_literal" ("type_conversion_expression" "import_spec" "if_statement" "unary_expression" "inc_statement" "literal_element" "variadic_argument" "selector_expression" "index_expression" "parenthesized_expression" "for_statement" "field_declaration" "slice_expression" "defer_statement" "argument_list" "type_assertion_expression" "range_clause" "binary_expression" "send_statement" "go_statement" "array_type" "expression_switch_statement" "for_clause" "expression_statement" "_expression" "call_expression" "expression_list" "type_switch_statement" "dec_statement" "receive_statement")) + ("iota" ("type_conversion_expression" "if_statement" "unary_expression" "inc_statement" "literal_element" "variadic_argument" "selector_expression" "index_expression" "parenthesized_expression" "for_statement" "slice_expression" "defer_statement" "argument_list" "type_assertion_expression" "range_clause" "binary_expression" "send_statement" "go_statement" "array_type" "expression_switch_statement" "for_clause" "expression_statement" "_expression" "call_expression" "expression_list" "type_switch_statement" "dec_statement" "receive_statement")) ("keyed_element" ("literal_value")) - ("label_name" ("break_statement" "continue_statement" "labeled_statement" "goto_statement")) - ("labeled_statement" ("_statement" "source_file" "communication_case" "block" "expression_case" "labeled_statement" "type_case" "default_case")) + ("label_name" ("goto_statement" "labeled_statement" "break_statement" "continue_statement")) + ("labeled_statement" ("communication_case" "expression_case" "default_case" "source_file" "type_case" "_statement" "labeled_statement" "block")) ("literal_element" ("keyed_element" "literal_value")) - ("literal_value" ("composite_literal" "literal_element")) - ("map_type" ("channel_type" "union_type" "slice_type" "map_type" "array_type" "var_spec" "type_assertion_expression" "composite_literal" "parenthesized_type" "field_declaration" "variadic_parameter_declaration" "type_alias" "_simple_type" "function_type" "implicit_length_array_type" "method_declaration" "function_declaration" "pointer_type" "type_arguments" "parameter_declaration" "func_literal" "const_spec" "type_conversion_expression" "method_spec" "negated_type" "type_spec" "_type" "type_case" "argument_list")) + ("literal_value" ("literal_element" "composite_literal")) + ("map_type" ("type_conversion_expression" "method_declaration" "type_arguments" "function_declaration" "slice_type" "parenthesized_type" "composite_literal" "pointer_type" "channel_type" "variadic_parameter_declaration" "function_type" "parameter_declaration" "type_alias" "var_spec" "type_case" "method_spec" "field_declaration" "type_assertion_expression" "union_type" "const_spec" "func_literal" "type_spec" "_simple_type" "_type" "array_type" "map_type" "negated_type" "argument_list" "implicit_length_array_type")) ("method_declaration" ("source_file")) ("method_spec" ("interface_type")) - ("negated_type" ("channel_type" "union_type" "slice_type" "map_type" "array_type" "var_spec" "type_assertion_expression" "parenthesized_type" "field_declaration" "variadic_parameter_declaration" "type_alias" "_simple_type" "function_type" "implicit_length_array_type" "method_declaration" "function_declaration" "pointer_type" "type_arguments" "parameter_declaration" "func_literal" "const_spec" "generic_type" "method_spec" "type_conversion_expression" "negated_type" "type_spec" "_type" "type_case" "argument_list")) - ("nil" ("if_statement" "type_switch_statement" "parenthesized_expression" "array_type" "range_clause" "for_clause" "call_expression" "type_assertion_expression" "index_expression" "defer_statement" "expression_switch_statement" "dec_statement" "selector_expression" "binary_expression" "inc_statement" "go_statement" "literal_element" "expression_statement" "variadic_argument" "send_statement" "expression_list" "_expression" "unary_expression" "slice_expression" "type_conversion_expression" "for_statement" "receive_statement" "argument_list")) + ("negated_type" ("type_conversion_expression" "method_declaration" "type_arguments" "function_declaration" "slice_type" "parenthesized_type" "pointer_type" "channel_type" "variadic_parameter_declaration" "function_type" "parameter_declaration" "type_alias" "var_spec" "type_case" "method_spec" "field_declaration" "type_assertion_expression" "union_type" "const_spec" "func_literal" "type_spec" "_simple_type" "_type" "array_type" "generic_type" "map_type" "negated_type" "argument_list" "implicit_length_array_type")) + ("nil" ("type_conversion_expression" "if_statement" "unary_expression" "inc_statement" "literal_element" "variadic_argument" "selector_expression" "index_expression" "parenthesized_expression" "for_statement" "slice_expression" "defer_statement" "argument_list" "type_assertion_expression" "range_clause" "binary_expression" "send_statement" "go_statement" "array_type" "expression_switch_statement" "for_clause" "expression_statement" "_expression" "call_expression" "expression_list" "type_switch_statement" "dec_statement" "receive_statement")) ("package_clause" ("source_file")) - ("package_identifier" ("import_spec" "qualified_type" "package_clause")) - ("parameter_declaration" ("parameter_list" "type_parameter_list")) - ("parameter_list" ("function_declaration" "function_type" "func_literal" "method_declaration" "method_spec")) - ("parenthesized_expression" ("if_statement" "type_switch_statement" "parenthesized_expression" "array_type" "range_clause" "for_clause" "call_expression" "type_assertion_expression" "index_expression" "defer_statement" "expression_switch_statement" "dec_statement" "selector_expression" "binary_expression" "inc_statement" "go_statement" "literal_element" "expression_statement" "variadic_argument" "send_statement" "expression_list" "_expression" "unary_expression" "slice_expression" "type_conversion_expression" "for_statement" "receive_statement" "argument_list")) - ("parenthesized_type" ("channel_type" "union_type" "slice_type" "map_type" "array_type" "var_spec" "type_assertion_expression" "parenthesized_type" "field_declaration" "variadic_parameter_declaration" "type_alias" "implicit_length_array_type" "pointer_type" "type_arguments" "parameter_declaration" "const_spec" "type_conversion_expression" "negated_type" "type_spec" "_type" "type_case" "argument_list")) - ("pointer_type" ("channel_type" "union_type" "slice_type" "map_type" "array_type" "var_spec" "type_assertion_expression" "parenthesized_type" "field_declaration" "variadic_parameter_declaration" "type_alias" "_simple_type" "function_type" "implicit_length_array_type" "method_declaration" "function_declaration" "pointer_type" "type_arguments" "parameter_declaration" "func_literal" "const_spec" "type_conversion_expression" "method_spec" "negated_type" "type_spec" "_type" "type_case" "argument_list")) - ("qualified_type" ("channel_type" "union_type" "slice_type" "map_type" "array_type" "var_spec" "type_assertion_expression" "composite_literal" "parenthesized_type" "field_declaration" "variadic_parameter_declaration" "type_alias" "_simple_type" "function_type" "implicit_length_array_type" "method_declaration" "function_declaration" "pointer_type" "type_arguments" "parameter_declaration" "func_literal" "const_spec" "generic_type" "method_spec" "type_conversion_expression" "negated_type" "type_spec" "_type" "type_case" "argument_list")) + ("package_identifier" ("import_spec" "package_clause" "qualified_type")) + ("parameter_declaration" ("type_parameter_list" "parameter_list")) + ("parameter_list" ("function_type" "method_declaration" "func_literal" "function_declaration" "method_spec")) + ("parenthesized_expression" ("type_conversion_expression" "if_statement" "unary_expression" "inc_statement" "literal_element" "variadic_argument" "selector_expression" "index_expression" "parenthesized_expression" "for_statement" "slice_expression" "defer_statement" "argument_list" "type_assertion_expression" "range_clause" "binary_expression" "send_statement" "go_statement" "array_type" "expression_switch_statement" "for_clause" "expression_statement" "_expression" "call_expression" "expression_list" "type_switch_statement" "dec_statement" "receive_statement")) + ("parenthesized_type" ("type_conversion_expression" "type_arguments" "slice_type" "parenthesized_type" "pointer_type" "channel_type" "variadic_parameter_declaration" "parameter_declaration" "type_alias" "var_spec" "type_case" "field_declaration" "type_assertion_expression" "union_type" "const_spec" "type_spec" "_type" "array_type" "map_type" "negated_type" "argument_list" "implicit_length_array_type")) + ("pointer_type" ("type_conversion_expression" "method_declaration" "type_arguments" "function_declaration" "slice_type" "parenthesized_type" "pointer_type" "channel_type" "variadic_parameter_declaration" "function_type" "parameter_declaration" "type_alias" "var_spec" "type_case" "method_spec" "field_declaration" "type_assertion_expression" "union_type" "const_spec" "func_literal" "type_spec" "_simple_type" "_type" "array_type" "map_type" "negated_type" "argument_list" "implicit_length_array_type")) + ("qualified_type" ("type_conversion_expression" "method_declaration" "type_arguments" "function_declaration" "slice_type" "parenthesized_type" "composite_literal" "pointer_type" "channel_type" "variadic_parameter_declaration" "function_type" "parameter_declaration" "type_alias" "var_spec" "type_case" "method_spec" "field_declaration" "type_assertion_expression" "union_type" "const_spec" "func_literal" "type_spec" "_simple_type" "_type" "array_type" "generic_type" "map_type" "negated_type" "argument_list" "implicit_length_array_type")) ("range_clause" ("for_statement")) - ("raw_string_literal" ("if_statement" "type_switch_statement" "parenthesized_expression" "array_type" "range_clause" "for_clause" "call_expression" "type_assertion_expression" "field_declaration" "index_expression" "defer_statement" "expression_switch_statement" "dec_statement" "selector_expression" "binary_expression" "inc_statement" "go_statement" "literal_element" "expression_statement" "variadic_argument" "send_statement" "expression_list" "import_spec" "_expression" "unary_expression" "slice_expression" "type_conversion_expression" "for_statement" "receive_statement" "argument_list")) + ("raw_string_literal" ("type_conversion_expression" "import_spec" "if_statement" "unary_expression" "inc_statement" "literal_element" "variadic_argument" "selector_expression" "index_expression" "parenthesized_expression" "for_statement" "field_declaration" "slice_expression" "defer_statement" "argument_list" "type_assertion_expression" "range_clause" "binary_expression" "send_statement" "go_statement" "array_type" "expression_switch_statement" "for_clause" "expression_statement" "_expression" "call_expression" "expression_list" "type_switch_statement" "dec_statement" "receive_statement")) ("receive_statement" ("communication_case")) - ("return_statement" ("_statement" "source_file" "communication_case" "block" "expression_case" "labeled_statement" "type_case" "default_case")) - ("rune_literal" ("if_statement" "type_switch_statement" "parenthesized_expression" "array_type" "range_clause" "for_clause" "call_expression" "type_assertion_expression" "index_expression" "defer_statement" "expression_switch_statement" "dec_statement" "selector_expression" "binary_expression" "inc_statement" "go_statement" "literal_element" "expression_statement" "variadic_argument" "send_statement" "expression_list" "_expression" "unary_expression" "slice_expression" "type_conversion_expression" "for_statement" "receive_statement" "argument_list")) - ("select_statement" ("_statement" "source_file" "communication_case" "block" "expression_case" "labeled_statement" "type_case" "default_case")) - ("selector_expression" ("if_statement" "type_switch_statement" "parenthesized_expression" "array_type" "range_clause" "for_clause" "call_expression" "type_assertion_expression" "index_expression" "defer_statement" "expression_switch_statement" "dec_statement" "selector_expression" "binary_expression" "inc_statement" "go_statement" "literal_element" "expression_statement" "variadic_argument" "send_statement" "expression_list" "_expression" "unary_expression" "slice_expression" "type_conversion_expression" "for_statement" "receive_statement" "argument_list")) - ("send_statement" ("if_statement" "type_switch_statement" "_statement" "source_file" "communication_case" "block" "expression_switch_statement" "expression_case" "labeled_statement" "_simple_statement" "type_case" "for_clause" "default_case")) - ("short_var_declaration" ("if_statement" "type_switch_statement" "_statement" "source_file" "communication_case" "block" "expression_switch_statement" "expression_case" "labeled_statement" "_simple_statement" "type_case" "for_clause" "default_case")) - ("slice_expression" ("if_statement" "type_switch_statement" "parenthesized_expression" "array_type" "range_clause" "for_clause" "call_expression" "type_assertion_expression" "index_expression" "defer_statement" "expression_switch_statement" "dec_statement" "selector_expression" "binary_expression" "inc_statement" "go_statement" "literal_element" "expression_statement" "variadic_argument" "send_statement" "expression_list" "_expression" "unary_expression" "slice_expression" "type_conversion_expression" "for_statement" "receive_statement" "argument_list")) - ("slice_type" ("channel_type" "union_type" "slice_type" "map_type" "array_type" "var_spec" "type_assertion_expression" "composite_literal" "parenthesized_type" "field_declaration" "variadic_parameter_declaration" "type_alias" "_simple_type" "function_type" "implicit_length_array_type" "method_declaration" "function_declaration" "pointer_type" "type_arguments" "parameter_declaration" "func_literal" "const_spec" "type_conversion_expression" "method_spec" "negated_type" "type_spec" "_type" "type_case" "argument_list")) + ("return_statement" ("communication_case" "expression_case" "default_case" "source_file" "type_case" "_statement" "labeled_statement" "block")) + ("rune_literal" ("type_conversion_expression" "if_statement" "unary_expression" "inc_statement" "literal_element" "variadic_argument" "selector_expression" "index_expression" "parenthesized_expression" "for_statement" "slice_expression" "defer_statement" "argument_list" "type_assertion_expression" "range_clause" "binary_expression" "send_statement" "go_statement" "array_type" "expression_switch_statement" "for_clause" "expression_statement" "_expression" "call_expression" "expression_list" "type_switch_statement" "dec_statement" "receive_statement")) + ("select_statement" ("communication_case" "expression_case" "default_case" "source_file" "type_case" "_statement" "labeled_statement" "block")) + ("selector_expression" ("type_conversion_expression" "if_statement" "unary_expression" "inc_statement" "literal_element" "variadic_argument" "selector_expression" "index_expression" "parenthesized_expression" "for_statement" "slice_expression" "defer_statement" "argument_list" "type_assertion_expression" "range_clause" "binary_expression" "send_statement" "go_statement" "array_type" "expression_switch_statement" "for_clause" "expression_statement" "_expression" "call_expression" "expression_list" "type_switch_statement" "dec_statement" "receive_statement")) + ("send_statement" ("communication_case" "expression_case" "if_statement" "default_case" "expression_switch_statement" "source_file" "for_clause" "type_case" "_statement" "_simple_statement" "labeled_statement" "block" "type_switch_statement")) + ("short_var_declaration" ("communication_case" "expression_case" "if_statement" "default_case" "expression_switch_statement" "source_file" "for_clause" "type_case" "_statement" "_simple_statement" "labeled_statement" "block" "type_switch_statement")) + ("slice_expression" ("type_conversion_expression" "if_statement" "unary_expression" "inc_statement" "literal_element" "variadic_argument" "selector_expression" "index_expression" "parenthesized_expression" "for_statement" "slice_expression" "defer_statement" "argument_list" "type_assertion_expression" "range_clause" "binary_expression" "send_statement" "go_statement" "array_type" "expression_switch_statement" "for_clause" "expression_statement" "_expression" "call_expression" "expression_list" "type_switch_statement" "dec_statement" "receive_statement")) + ("slice_type" ("type_conversion_expression" "method_declaration" "type_arguments" "function_declaration" "slice_type" "parenthesized_type" "composite_literal" "pointer_type" "channel_type" "variadic_parameter_declaration" "function_type" "parameter_declaration" "type_alias" "var_spec" "type_case" "method_spec" "field_declaration" "type_assertion_expression" "union_type" "const_spec" "func_literal" "type_spec" "_simple_type" "_type" "array_type" "map_type" "negated_type" "argument_list" "implicit_length_array_type")) ("struct_elem" ("interface_type")) ("struct_term" ("struct_elem")) - ("struct_type" ("channel_type" "union_type" "slice_type" "map_type" "struct_term" "array_type" "var_spec" "type_assertion_expression" "composite_literal" "parenthesized_type" "field_declaration" "variadic_parameter_declaration" "type_alias" "_simple_type" "function_type" "implicit_length_array_type" "method_declaration" "function_declaration" "pointer_type" "type_arguments" "parameter_declaration" "func_literal" "const_spec" "type_conversion_expression" "method_spec" "negated_type" "type_spec" "_type" "type_case" "argument_list")) - ("true" ("if_statement" "type_switch_statement" "parenthesized_expression" "array_type" "range_clause" "for_clause" "call_expression" "type_assertion_expression" "index_expression" "defer_statement" "expression_switch_statement" "dec_statement" "selector_expression" "binary_expression" "inc_statement" "go_statement" "literal_element" "expression_statement" "variadic_argument" "send_statement" "expression_list" "_expression" "unary_expression" "slice_expression" "type_conversion_expression" "for_statement" "receive_statement" "argument_list")) + ("struct_type" ("type_conversion_expression" "method_declaration" "type_arguments" "function_declaration" "slice_type" "parenthesized_type" "composite_literal" "pointer_type" "channel_type" "variadic_parameter_declaration" "function_type" "parameter_declaration" "struct_term" "type_alias" "var_spec" "type_case" "method_spec" "field_declaration" "type_assertion_expression" "union_type" "const_spec" "func_literal" "type_spec" "_simple_type" "_type" "array_type" "map_type" "negated_type" "argument_list" "implicit_length_array_type")) + ("true" ("type_conversion_expression" "if_statement" "unary_expression" "inc_statement" "literal_element" "variadic_argument" "selector_expression" "index_expression" "parenthesized_expression" "for_statement" "slice_expression" "defer_statement" "argument_list" "type_assertion_expression" "range_clause" "binary_expression" "send_statement" "go_statement" "array_type" "expression_switch_statement" "for_clause" "expression_statement" "_expression" "call_expression" "expression_list" "type_switch_statement" "dec_statement" "receive_statement")) ("type_alias" ("type_declaration")) ("type_arguments" ("generic_type" "call_expression")) - ("type_assertion_expression" ("if_statement" "type_switch_statement" "parenthesized_expression" "array_type" "range_clause" "for_clause" "call_expression" "type_assertion_expression" "index_expression" "defer_statement" "expression_switch_statement" "dec_statement" "selector_expression" "binary_expression" "inc_statement" "go_statement" "literal_element" "expression_statement" "variadic_argument" "send_statement" "expression_list" "_expression" "unary_expression" "slice_expression" "type_conversion_expression" "for_statement" "receive_statement" "argument_list")) + ("type_assertion_expression" ("type_conversion_expression" "if_statement" "unary_expression" "inc_statement" "literal_element" "variadic_argument" "selector_expression" "index_expression" "parenthesized_expression" "for_statement" "slice_expression" "defer_statement" "argument_list" "type_assertion_expression" "range_clause" "binary_expression" "send_statement" "go_statement" "array_type" "expression_switch_statement" "for_clause" "expression_statement" "_expression" "call_expression" "expression_list" "type_switch_statement" "dec_statement" "receive_statement")) ("type_case" ("type_switch_statement")) - ("type_conversion_expression" ("if_statement" "type_switch_statement" "parenthesized_expression" "array_type" "range_clause" "for_clause" "call_expression" "type_assertion_expression" "index_expression" "defer_statement" "expression_switch_statement" "dec_statement" "selector_expression" "binary_expression" "inc_statement" "go_statement" "literal_element" "expression_statement" "variadic_argument" "send_statement" "expression_list" "_expression" "unary_expression" "slice_expression" "type_conversion_expression" "for_statement" "receive_statement" "argument_list")) - ("type_declaration" ("_statement" "source_file" "communication_case" "block" "expression_case" "labeled_statement" "type_case" "default_case")) - ("type_identifier" ("channel_type" "union_type" "slice_type" "map_type" "array_type" "var_spec" "type_assertion_expression" "composite_literal" "parenthesized_type" "field_declaration" "variadic_parameter_declaration" "type_alias" "_simple_type" "function_type" "implicit_length_array_type" "method_declaration" "function_declaration" "pointer_type" "type_arguments" "parameter_declaration" "func_literal" "const_spec" "generic_type" "method_spec" "type_conversion_expression" "negated_type" "type_spec" "_type" "qualified_type" "type_case" "argument_list")) - ("type_parameter_list" ("type_spec" "function_declaration")) + ("type_conversion_expression" ("type_conversion_expression" "if_statement" "unary_expression" "inc_statement" "literal_element" "variadic_argument" "selector_expression" "index_expression" "parenthesized_expression" "for_statement" "slice_expression" "defer_statement" "argument_list" "type_assertion_expression" "range_clause" "binary_expression" "send_statement" "go_statement" "array_type" "expression_switch_statement" "for_clause" "expression_statement" "_expression" "call_expression" "expression_list" "type_switch_statement" "dec_statement" "receive_statement")) + ("type_declaration" ("communication_case" "expression_case" "default_case" "source_file" "type_case" "_statement" "labeled_statement" "block")) + ("type_identifier" ("type_conversion_expression" "method_declaration" "type_arguments" "function_declaration" "slice_type" "parenthesized_type" "composite_literal" "pointer_type" "channel_type" "variadic_parameter_declaration" "function_type" "parameter_declaration" "type_alias" "var_spec" "type_case" "method_spec" "field_declaration" "type_assertion_expression" "union_type" "const_spec" "func_literal" "type_spec" "_simple_type" "_type" "array_type" "qualified_type" "generic_type" "map_type" "negated_type" "argument_list" "implicit_length_array_type")) + ("type_parameter_list" ("function_declaration" "type_spec")) ("type_spec" ("type_declaration")) - ("type_switch_statement" ("_statement" "source_file" "communication_case" "block" "expression_case" "labeled_statement" "type_case" "default_case")) - ("unary_expression" ("if_statement" "type_switch_statement" "parenthesized_expression" "array_type" "range_clause" "for_clause" "call_expression" "type_assertion_expression" "index_expression" "defer_statement" "expression_switch_statement" "dec_statement" "selector_expression" "binary_expression" "inc_statement" "go_statement" "literal_element" "expression_statement" "variadic_argument" "send_statement" "expression_list" "_expression" "unary_expression" "slice_expression" "type_conversion_expression" "for_statement" "receive_statement" "argument_list")) - ("union_type" ("channel_type" "union_type" "slice_type" "map_type" "array_type" "var_spec" "type_assertion_expression" "parenthesized_type" "field_declaration" "variadic_parameter_declaration" "type_alias" "_simple_type" "function_type" "implicit_length_array_type" "method_declaration" "function_declaration" "pointer_type" "type_arguments" "parameter_declaration" "func_literal" "const_spec" "generic_type" "method_spec" "type_conversion_expression" "negated_type" "type_spec" "_type" "type_case" "argument_list")) - ("var_declaration" ("_statement" "source_file" "communication_case" "block" "expression_case" "labeled_statement" "type_case" "default_case")) + ("type_switch_statement" ("communication_case" "expression_case" "default_case" "source_file" "type_case" "_statement" "labeled_statement" "block")) + ("unary_expression" ("type_conversion_expression" "if_statement" "unary_expression" "inc_statement" "literal_element" "variadic_argument" "selector_expression" "index_expression" "parenthesized_expression" "for_statement" "slice_expression" "defer_statement" "argument_list" "type_assertion_expression" "range_clause" "binary_expression" "send_statement" "go_statement" "array_type" "expression_switch_statement" "for_clause" "expression_statement" "_expression" "call_expression" "expression_list" "type_switch_statement" "dec_statement" "receive_statement")) + ("union_type" ("type_conversion_expression" "method_declaration" "type_arguments" "function_declaration" "slice_type" "parenthesized_type" "pointer_type" "channel_type" "variadic_parameter_declaration" "function_type" "parameter_declaration" "type_alias" "var_spec" "type_case" "method_spec" "field_declaration" "type_assertion_expression" "union_type" "const_spec" "func_literal" "type_spec" "_simple_type" "_type" "array_type" "generic_type" "map_type" "negated_type" "argument_list" "implicit_length_array_type")) + ("var_declaration" ("communication_case" "expression_case" "default_case" "source_file" "type_case" "_statement" "labeled_statement" "block")) ("var_spec" ("var_declaration")) ("variadic_argument" ("argument_list")) ("variadic_parameter_declaration" ("parameter_list")) @@ -1497,23 +1497,23 @@ ;; START Production rules for python (defconst combobulate-rules-python - '(("_compound_statement" (:*unnamed* ("for_statement" "if_statement" "with_statement" "class_definition" "while_statement" "function_definition" "match_statement" "decorated_definition" "try_statement"))) - ("_simple_statement" (:*unnamed* ("print_statement" "return_statement" "type_alias_statement" "delete_statement" "import_statement" "break_statement" "continue_statement" "raise_statement" "exec_statement" "global_statement" "nonlocal_statement" "pass_statement" "future_import_statement" "assert_statement" "import_from_statement" "expression_statement"))) + '(("_compound_statement" (:*unnamed* ("if_statement" "class_definition" "try_statement" "function_definition" "with_statement" "match_statement" "while_statement" "for_statement" "decorated_definition"))) + ("_simple_statement" (:*unnamed* ("print_statement" "future_import_statement" "nonlocal_statement" "global_statement" "pass_statement" "assert_statement" "import_from_statement" "continue_statement" "delete_statement" "break_statement" "exec_statement" "expression_statement" "return_statement" "type_alias_statement" "import_statement" "raise_statement"))) ("aliased_import" (:*unnamed* nil :alias ("identifier") :name ("dotted_name"))) - ("argument_list" (:*unnamed* ("expression" "parenthesized_expression" "keyword_argument" "dictionary_splat" "list_splat"))) - ("as_pattern" (:*unnamed* ("case_pattern" "expression" "identifier") :alias ("as_pattern_target"))) + ("argument_list" (:*unnamed* ("list_splat" "keyword_argument" "expression" "parenthesized_expression" "dictionary_splat"))) + ("as_pattern" (:*unnamed* ("case_pattern" "identifier" "expression") :alias ("as_pattern_target"))) ("assert_statement" (:*unnamed* ("expression"))) - ("assignment" (:*unnamed* nil :left ("pattern_list" "pattern") :right ("assignment" "yield" "expression" "expression_list" "pattern_list" "augmented_assignment") :type ("type"))) + ("assignment" (:*unnamed* nil :left ("pattern_list" "pattern") :right ("pattern_list" "yield" "expression" "augmented_assignment" "expression_list" "assignment") :type ("type"))) ("attribute" (:*unnamed* nil :attribute ("identifier") :object ("primary_expression"))) - ("augmented_assignment" (:*unnamed* nil :left ("pattern_list" "pattern") :operator nil :right ("assignment" "yield" "expression" "expression_list" "pattern_list" "augmented_assignment"))) + ("augmented_assignment" (:*unnamed* nil :left ("pattern_list" "pattern") :operator nil :right ("pattern_list" "yield" "expression" "augmented_assignment" "expression_list" "assignment"))) ("await" (:*unnamed* ("primary_expression"))) ("binary_operator" (:*unnamed* nil :left ("primary_expression") :operator nil :right ("primary_expression"))) - ("block" (:*unnamed* ("if_statement" "with_statement" "print_statement" "class_definition" "while_statement" "return_statement" "type_alias_statement" "function_definition" "delete_statement" "import_statement" "break_statement" "continue_statement" "raise_statement" "exec_statement" "for_statement" "global_statement" "nonlocal_statement" "match_statement" "pass_statement" "decorated_definition" "future_import_statement" "assert_statement" "import_from_statement" "expression_statement" "try_statement") :alternative ("case_clause"))) + ("block" (:*unnamed* ("if_statement" "class_definition" "print_statement" "future_import_statement" "nonlocal_statement" "with_statement" "global_statement" "while_statement" "pass_statement" "assert_statement" "match_statement" "import_from_statement" "raise_statement" "continue_statement" "delete_statement" "break_statement" "exec_statement" "expression_statement" "try_statement" "return_statement" "function_definition" "type_alias_statement" "import_statement" "for_statement" "decorated_definition") :alternative ("case_clause"))) ("boolean_operator" (:*unnamed* nil :left ("expression") :operator nil :right ("expression"))) ("break_statement" (:*unnamed* nil)) ("call" (:*unnamed* nil :arguments ("argument_list" "generator_expression") :function ("primary_expression"))) ("case_clause" (:*unnamed* ("case_pattern") :consequence ("block") :guard ("if_clause"))) - ("case_pattern" (:*unnamed* ("concatenated_string" "complex_pattern" "true" "class_pattern" "none" "union_pattern" "integer" "float" "keyword_pattern" "dotted_name" "string" "false" "list_pattern" "as_pattern" "splat_pattern" "tuple_pattern" "dict_pattern"))) + ("case_pattern" (:*unnamed* ("integer" "string" "concatenated_string" "union_pattern" "true" "tuple_pattern" "none" "list_pattern" "false" "complex_pattern" "keyword_pattern" "float" "as_pattern" "class_pattern" "dotted_name" "splat_pattern" "dict_pattern"))) ("chevron" (:*unnamed* ("expression"))) ("class_definition" (:*unnamed* nil :body ("block") :name ("identifier") :superclasses ("argument_list") :type_parameters ("type_parameter"))) ("class_pattern" (:*unnamed* ("dotted_name" "case_pattern"))) @@ -1524,15 +1524,15 @@ ("conditional_expression" (:*unnamed* ("expression"))) ("constrained_type" (:*unnamed* ("type"))) ("continue_statement" (:*unnamed* nil)) - ("decorated_definition" (:*unnamed* ("decorator") :definition ("function_definition" "class_definition"))) + ("decorated_definition" (:*unnamed* ("decorator") :definition ("class_definition" "function_definition"))) ("decorator" (:*unnamed* ("expression"))) - ("default_parameter" (:*unnamed* nil :name ("tuple_pattern" "identifier") :value ("expression"))) + ("default_parameter" (:*unnamed* nil :name ("identifier" "tuple_pattern") :value ("expression"))) ("delete_statement" (:*unnamed* ("expression_list" "expression"))) - ("dict_pattern" (:*unnamed* ("splat_pattern") :key ("dotted_name" "concatenated_string" "complex_pattern" "true" "string" "class_pattern" "none" "union_pattern" "false" "list_pattern" "integer" "float" "splat_pattern" "tuple_pattern" "dict_pattern") :value ("case_pattern"))) + ("dict_pattern" (:*unnamed* ("splat_pattern") :key ("complex_pattern" "integer" "string" "concatenated_string" "union_pattern" "true" "tuple_pattern" "float" "dotted_name" "class_pattern" "none" "list_pattern" "splat_pattern" "dict_pattern" "false") :value ("case_pattern"))) ("dictionary" (:*unnamed* ("pair" "dictionary_splat"))) ("dictionary_comprehension" (:*unnamed* ("for_in_clause" "if_clause") :body ("pair"))) ("dictionary_splat" (:*unnamed* ("expression"))) - ("dictionary_splat_pattern" (:*unnamed* ("attribute" "subscript" "identifier"))) + ("dictionary_splat_pattern" (:*unnamed* ("subscript" "identifier" "attribute"))) ("dotted_name" (:*unnamed* ("identifier"))) ("elif_clause" (:*unnamed* nil :condition ("expression") :consequence ("block"))) ("ellipsis" (:*unnamed* nil)) @@ -1542,83 +1542,83 @@ ("except_clause" (:*unnamed* ("block" "expression"))) ("except_group_clause" (:*unnamed* ("block" "expression"))) ("exec_statement" (:*unnamed* ("expression") :code ("string" "identifier"))) - ("expression" (:*unnamed* ("lambda" "conditional_expression" "not_operator" "comparison_operator" "primary_expression" "named_expression" "boolean_operator" "as_pattern"))) + ("expression" (:*unnamed* ("not_operator" "boolean_operator" "primary_expression" "lambda" "as_pattern" "conditional_expression" "named_expression" "comparison_operator"))) ("expression_list" (:*unnamed* ("expression"))) - ("expression_statement" (:*unnamed* ("assignment" "yield" "expression" "augmented_assignment"))) + ("expression_statement" (:*unnamed* ("augmented_assignment" "yield" "assignment" "expression"))) ("false" (:*unnamed* nil)) ("finally_clause" (:*unnamed* ("block"))) ("float" (:*unnamed* nil)) ("for_in_clause" (:*unnamed* nil :left ("pattern_list" "pattern") :right ("expression"))) ("for_statement" (:*unnamed* nil :alternative ("else_clause") :body ("block") :left ("pattern_list" "pattern") :right ("expression_list" "expression"))) - ("format_expression" (:*unnamed* nil :expression ("expression_list" "pattern_list" "yield" "expression") :format_specifier ("format_specifier") :type_conversion ("type_conversion"))) + ("format_expression" (:*unnamed* nil :expression ("expression_list" "yield" "pattern_list" "expression") :format_specifier ("format_specifier") :type_conversion ("type_conversion"))) ("format_specifier" (:*unnamed* ("format_expression"))) ("function_definition" (:*unnamed* nil :body ("block") :name ("identifier") :parameters ("parameters") :return_type ("type") :type_parameters ("type_parameter"))) - ("future_import_statement" (:*unnamed* nil :name ("dotted_name" "aliased_import"))) + ("future_import_statement" (:*unnamed* nil :name ("aliased_import" "dotted_name"))) ("generator_expression" (:*unnamed* ("for_in_clause" "if_clause") :body ("expression"))) ("generic_type" (:*unnamed* ("type_parameter" "identifier"))) ("global_statement" (:*unnamed* ("identifier"))) ("identifier" (:*unnamed* nil)) ("if_clause" (:*unnamed* ("expression"))) - ("if_statement" (:*unnamed* nil :alternative ("elif_clause" "else_clause") :condition ("expression") :consequence ("block"))) - ("import_from_statement" (:*unnamed* ("wildcard_import") :module_name ("dotted_name" "relative_import") :name ("dotted_name" "aliased_import"))) + ("if_statement" (:*unnamed* nil :alternative ("else_clause" "elif_clause") :condition ("expression") :consequence ("block"))) + ("import_from_statement" (:*unnamed* ("wildcard_import") :module_name ("dotted_name" "relative_import") :name ("aliased_import" "dotted_name"))) ("import_prefix" (:*unnamed* nil)) - ("import_statement" (:*unnamed* nil :name ("dotted_name" "aliased_import"))) + ("import_statement" (:*unnamed* nil :name ("aliased_import" "dotted_name"))) ("integer" (:*unnamed* nil)) - ("interpolation" (:*unnamed* nil :expression ("expression_list" "pattern_list" "yield" "expression") :format_specifier ("format_specifier") :type_conversion ("type_conversion"))) + ("interpolation" (:*unnamed* nil :expression ("expression_list" "yield" "pattern_list" "expression") :format_specifier ("format_specifier") :type_conversion ("type_conversion"))) ("keyword_argument" (:*unnamed* nil :name ("identifier") :value ("expression"))) - ("keyword_pattern" (:*unnamed* ("concatenated_string" "complex_pattern" "true" "class_pattern" "none" "union_pattern" "integer" "float" "dotted_name" "string" "false" "identifier" "list_pattern" "splat_pattern" "tuple_pattern" "dict_pattern"))) + ("keyword_pattern" (:*unnamed* ("integer" "string" "concatenated_string" "union_pattern" "true" "tuple_pattern" "none" "list_pattern" "false" "complex_pattern" "identifier" "float" "dotted_name" "class_pattern" "splat_pattern" "dict_pattern"))) ("keyword_separator" (:*unnamed* nil)) ("lambda" (:*unnamed* nil :body ("expression") :parameters ("lambda_parameters"))) ("lambda_parameters" (:*unnamed* ("parameter"))) ("line_continuation" (:*unnamed* nil)) - ("list" (:*unnamed* ("parenthesized_list_splat" "yield" "expression" "list_splat"))) + ("list" (:*unnamed* ("parenthesized_list_splat" "list_splat" "yield" "expression"))) ("list_comprehension" (:*unnamed* ("for_in_clause" "if_clause") :body ("expression"))) - ("list_pattern" (:*unnamed* ("case_pattern" "pattern"))) - ("list_splat" (:*unnamed* ("attribute" "subscript" "expression" "identifier"))) - ("list_splat_pattern" (:*unnamed* ("attribute" "subscript" "identifier"))) + ("list_pattern" (:*unnamed* ("pattern" "case_pattern"))) + ("list_splat" (:*unnamed* ("subscript" "expression" "identifier" "attribute"))) + ("list_splat_pattern" (:*unnamed* ("subscript" "identifier" "attribute"))) ("match_statement" (:*unnamed* nil :body ("block") :subject ("expression"))) - ("member_type" (:*unnamed* ("type" "identifier"))) - ("module" (:*unnamed* ("if_statement" "with_statement" "print_statement" "class_definition" "while_statement" "return_statement" "type_alias_statement" "function_definition" "delete_statement" "import_statement" "break_statement" "continue_statement" "raise_statement" "exec_statement" "for_statement" "global_statement" "nonlocal_statement" "match_statement" "pass_statement" "decorated_definition" "future_import_statement" "assert_statement" "import_from_statement" "expression_statement" "try_statement"))) + ("member_type" (:*unnamed* ("identifier" "type"))) + ("module" (:*unnamed* ("if_statement" "class_definition" "print_statement" "future_import_statement" "nonlocal_statement" "with_statement" "global_statement" "while_statement" "pass_statement" "assert_statement" "match_statement" "import_from_statement" "raise_statement" "continue_statement" "delete_statement" "break_statement" "exec_statement" "expression_statement" "try_statement" "return_statement" "function_definition" "type_alias_statement" "import_statement" "for_statement" "decorated_definition"))) ("named_expression" (:*unnamed* nil :name ("identifier") :value ("expression"))) ("none" (:*unnamed* nil)) ("nonlocal_statement" (:*unnamed* ("identifier"))) ("not_operator" (:*unnamed* nil :argument ("expression"))) ("pair" (:*unnamed* nil :key ("expression") :value ("expression"))) - ("parameter" (:*unnamed* ("default_parameter" "list_splat_pattern" "identifier" "typed_parameter" "positional_separator" "dictionary_splat_pattern" "keyword_separator" "typed_default_parameter" "tuple_pattern"))) + ("parameter" (:*unnamed* ("identifier" "keyword_separator" "dictionary_splat_pattern" "tuple_pattern" "typed_default_parameter" "typed_parameter" "default_parameter" "positional_separator" "list_splat_pattern"))) ("parameters" (:*unnamed* ("parameter"))) - ("parenthesized_expression" (:*unnamed* ("yield" "expression" "parenthesized_expression" "list_splat"))) - ("parenthesized_list_splat" (:*unnamed* ("parenthesized_expression" "list_splat"))) + ("parenthesized_expression" (:*unnamed* ("list_splat" "parenthesized_expression" "yield" "expression"))) + ("parenthesized_list_splat" (:*unnamed* ("list_splat" "parenthesized_expression"))) ("pass_statement" (:*unnamed* nil)) - ("pattern" (:*unnamed* ("attribute" "list_pattern" "list_splat_pattern" "subscript" "tuple_pattern" "identifier"))) + ("pattern" (:*unnamed* ("identifier" "list_pattern" "attribute" "subscript" "tuple_pattern" "list_splat_pattern"))) ("pattern_list" (:*unnamed* ("pattern"))) ("positional_separator" (:*unnamed* nil)) - ("primary_expression" (:*unnamed* ("concatenated_string" "true" "await" "call" "none" "binary_operator" "list" "integer" "float" "parenthesized_expression" "dictionary_comprehension" "attribute" "dictionary" "list_comprehension" "string" "ellipsis" "identifier" "false" "unary_operator" "set_comprehension" "subscript" "generator_expression" "tuple" "set" "list_splat"))) + ("primary_expression" (:*unnamed* ("string" "integer" "list_comprehension" "concatenated_string" "unary_operator" "dictionary_comprehension" "true" "call" "ellipsis" "none" "set_comprehension" "subscript" "false" "list" "identifier" "await" "attribute" "generator_expression" "binary_operator" "float" "tuple" "list_splat" "dictionary" "parenthesized_expression" "set"))) ("print_statement" (:*unnamed* ("chevron") :argument ("expression"))) ("raise_statement" (:*unnamed* ("expression_list" "expression") :cause ("expression"))) - ("relative_import" (:*unnamed* ("dotted_name" "import_prefix"))) + ("relative_import" (:*unnamed* ("import_prefix" "dotted_name"))) ("return_statement" (:*unnamed* ("expression_list" "expression"))) - ("set" (:*unnamed* ("parenthesized_list_splat" "yield" "expression" "list_splat"))) + ("set" (:*unnamed* ("parenthesized_list_splat" "list_splat" "yield" "expression"))) ("set_comprehension" (:*unnamed* ("for_in_clause" "if_clause") :body ("expression"))) ("slice" (:*unnamed* ("expression"))) ("splat_pattern" (:*unnamed* ("identifier"))) ("splat_type" (:*unnamed* ("identifier"))) - ("string" (:*unnamed* ("string_start" "string_content" "interpolation" "string_end"))) - ("string_content" (:*unnamed* ("escape_interpolation" "escape_sequence"))) + ("string" (:*unnamed* ("string_content" "string_start" "string_end" "interpolation"))) + ("string_content" (:*unnamed* ("escape_sequence" "escape_interpolation"))) ("string_end" (:*unnamed* nil)) ("string_start" (:*unnamed* nil)) ("subscript" (:*unnamed* nil :subscript ("slice" "expression") :value ("primary_expression"))) ("true" (:*unnamed* nil)) - ("try_statement" (:*unnamed* ("except_clause" "else_clause" "except_group_clause" "finally_clause") :body ("block"))) - ("tuple" (:*unnamed* ("parenthesized_list_splat" "yield" "expression" "list_splat"))) - ("tuple_pattern" (:*unnamed* ("case_pattern" "pattern"))) - ("type" (:*unnamed* ("splat_type" "union_type" "expression" "member_type" "generic_type" "constrained_type"))) + ("try_statement" (:*unnamed* ("finally_clause" "except_clause" "else_clause" "except_group_clause") :body ("block"))) + ("tuple" (:*unnamed* ("parenthesized_list_splat" "list_splat" "yield" "expression"))) + ("tuple_pattern" (:*unnamed* ("pattern" "case_pattern"))) + ("type" (:*unnamed* ("constrained_type" "union_type" "member_type" "expression" "generic_type" "splat_type"))) ("type_alias_statement" (:*unnamed* ("type"))) ("type_conversion" (:*unnamed* nil)) ("type_parameter" (:*unnamed* ("type"))) ("typed_default_parameter" (:*unnamed* nil :name ("identifier") :type ("type") :value ("expression"))) - ("typed_parameter" (:*unnamed* ("list_splat_pattern" "dictionary_splat_pattern" "identifier") :type ("type"))) + ("typed_parameter" (:*unnamed* ("dictionary_splat_pattern" "identifier" "list_splat_pattern") :type ("type"))) ("unary_operator" (:*unnamed* nil :argument ("primary_expression") :operator nil)) - ("union_pattern" (:*unnamed* ("dotted_name" "concatenated_string" "complex_pattern" "true" "string" "class_pattern" "none" "union_pattern" "false" "list_pattern" "integer" "float" "splat_pattern" "tuple_pattern" "dict_pattern"))) + ("union_pattern" (:*unnamed* ("complex_pattern" "integer" "string" "concatenated_string" "union_pattern" "true" "tuple_pattern" "float" "dotted_name" "class_pattern" "none" "list_pattern" "splat_pattern" "dict_pattern" "false"))) ("union_type" (:*unnamed* ("type"))) ("while_statement" (:*unnamed* nil :alternative ("else_clause") :body ("block") :condition ("expression"))) ("wildcard_import" (:*unnamed* nil)) @@ -1630,71 +1630,71 @@ ;; END Production rules for python ;; START Inverse production rules for python (defconst combobulate-rules-python-inverse - '(("aliased_import" ("import_from_statement" "future_import_statement" "import_statement")) + '(("aliased_import" ("future_import_statement" "import_statement" "import_from_statement")) ("argument_list" ("call" "class_definition")) ("as_pattern" ("case_pattern" "expression")) ("as_pattern_target" ("as_pattern")) - ("assert_statement" ("module" "block" "_simple_statement")) - ("assignment" ("assignment" "expression_statement" "augmented_assignment")) - ("attribute" ("list_splat_pattern" "pattern" "primary_expression" "dictionary_splat_pattern" "list_splat")) - ("augmented_assignment" ("assignment" "expression_statement" "augmented_assignment")) + ("assert_statement" ("block" "_simple_statement" "module")) + ("assignment" ("augmented_assignment" "expression_statement" "assignment")) + ("attribute" ("dictionary_splat_pattern" "primary_expression" "list_splat" "pattern" "list_splat_pattern")) + ("augmented_assignment" ("augmented_assignment" "expression_statement" "assignment")) ("await" ("primary_expression")) ("binary_operator" ("primary_expression")) - ("block" ("for_statement" "if_statement" "with_statement" "class_definition" "while_statement" "case_clause" "function_definition" "match_statement" "elif_clause" "else_clause" "except_group_clause" "finally_clause" "except_clause" "try_statement")) + ("block" ("except_clause" "case_clause" "class_definition" "if_statement" "else_clause" "try_statement" "function_definition" "with_statement" "finally_clause" "match_statement" "except_group_clause" "elif_clause" "while_statement" "for_statement")) ("boolean_operator" ("expression")) - ("break_statement" ("module" "block" "_simple_statement")) + ("break_statement" ("block" "_simple_statement" "module")) ("call" ("primary_expression")) ("case_clause" ("block")) - ("case_pattern" ("class_pattern" "case_clause" "list_pattern" "as_pattern" "tuple_pattern" "dict_pattern")) + ("case_pattern" ("case_clause" "tuple_pattern" "as_pattern" "class_pattern" "list_pattern" "dict_pattern")) ("chevron" ("print_statement")) - ("class_definition" ("_compound_statement" "block" "decorated_definition" "module")) - ("class_pattern" ("case_pattern" "union_pattern" "dict_pattern" "keyword_pattern")) + ("class_definition" ("module" "block" "_compound_statement" "decorated_definition")) + ("class_pattern" ("dict_pattern" "case_pattern" "keyword_pattern" "union_pattern")) ("comparison_operator" ("expression")) - ("complex_pattern" ("case_pattern" "union_pattern" "dict_pattern" "keyword_pattern")) - ("concatenated_string" ("primary_expression" "union_pattern" "keyword_pattern" "case_pattern" "dict_pattern")) + ("complex_pattern" ("dict_pattern" "case_pattern" "keyword_pattern" "union_pattern")) + ("concatenated_string" ("union_pattern" "keyword_pattern" "primary_expression" "case_pattern" "dict_pattern")) ("conditional_expression" ("expression")) ("constrained_type" ("type")) - ("continue_statement" ("module" "block" "_simple_statement")) - ("decorated_definition" ("_compound_statement" "block" "module")) + ("continue_statement" ("block" "_simple_statement" "module")) + ("decorated_definition" ("block" "_compound_statement" "module")) ("decorator" ("decorated_definition")) ("default_parameter" ("parameter")) - ("delete_statement" ("module" "block" "_simple_statement")) - ("dict_pattern" ("case_pattern" "union_pattern" "dict_pattern" "keyword_pattern")) + ("delete_statement" ("block" "_simple_statement" "module")) + ("dict_pattern" ("dict_pattern" "case_pattern" "keyword_pattern" "union_pattern")) ("dictionary" ("primary_expression")) ("dictionary_comprehension" ("primary_expression")) - ("dictionary_splat" ("dictionary" "argument_list")) + ("dictionary_splat" ("argument_list" "dictionary")) ("dictionary_splat_pattern" ("parameter" "typed_parameter")) - ("dotted_name" ("class_pattern" "union_pattern" "import_statement" "future_import_statement" "aliased_import" "keyword_pattern" "import_from_statement" "relative_import" "case_pattern" "dict_pattern")) + ("dotted_name" ("union_pattern" "keyword_pattern" "future_import_statement" "aliased_import" "case_pattern" "class_pattern" "import_statement" "relative_import" "dict_pattern" "import_from_statement")) ("elif_clause" ("if_statement")) ("ellipsis" ("primary_expression")) - ("else_clause" ("for_statement" "if_statement" "while_statement" "try_statement")) + ("else_clause" ("while_statement" "if_statement" "try_statement" "for_statement")) ("escape_interpolation" ("string_content")) ("escape_sequence" ("string_content")) ("except_clause" ("try_statement")) ("except_group_clause" ("try_statement")) - ("exec_statement" ("module" "block" "_simple_statement")) - ("expression" ("if_statement" "chevron" "delete_statement" "list" "named_expression" "assignment" "elif_clause" "except_group_clause" "parenthesized_expression" "raise_statement" "default_parameter" "slice" "lambda" "list_comprehension" "dictionary_splat" "match_statement" "format_expression" "yield" "as_pattern" "except_clause" "expression_statement" "typed_default_parameter" "augmented_assignment" "conditional_expression" "not_operator" "print_statement" "expression_list" "return_statement" "while_statement" "for_in_clause" "with_item" "pair" "decorator" "exec_statement" "for_statement" "interpolation" "boolean_operator" "set_comprehension" "subscript" "assert_statement" "keyword_argument" "generator_expression" "if_clause" "type" "tuple" "argument_list" "set" "list_splat")) - ("expression_list" ("for_statement" "return_statement" "interpolation" "delete_statement" "assignment" "format_expression" "yield" "raise_statement" "augmented_assignment")) - ("expression_statement" ("module" "block" "_simple_statement")) - ("false" ("primary_expression" "union_pattern" "keyword_pattern" "case_pattern" "dict_pattern")) + ("exec_statement" ("block" "_simple_statement" "module")) + ("expression" ("if_statement" "keyword_argument" "print_statement" "slice" "except_group_clause" "default_parameter" "interpolation" "while_statement" "match_statement" "except_clause" "list" "not_operator" "return_statement" "for_in_clause" "as_pattern" "elif_clause" "tuple" "format_expression" "with_item" "named_expression" "for_statement" "dictionary_splat" "parenthesized_expression" "set" "decorator" "argument_list" "list_comprehension" "augmented_assignment" "set_comprehension" "subscript" "assert_statement" "assignment" "delete_statement" "generator_expression" "exec_statement" "pair" "boolean_operator" "expression_statement" "lambda" "list_splat" "yield" "conditional_expression" "type" "typed_default_parameter" "chevron" "expression_list" "if_clause" "raise_statement")) + ("expression_list" ("delete_statement" "augmented_assignment" "return_statement" "yield" "interpolation" "format_expression" "for_statement" "assignment" "raise_statement")) + ("expression_statement" ("block" "_simple_statement" "module")) + ("false" ("union_pattern" "keyword_pattern" "primary_expression" "case_pattern" "dict_pattern")) ("finally_clause" ("try_statement")) - ("float" ("complex_pattern" "primary_expression" "union_pattern" "keyword_pattern" "case_pattern" "dict_pattern")) - ("for_in_clause" ("dictionary_comprehension" "set_comprehension" "list_comprehension" "generator_expression")) - ("for_statement" ("_compound_statement" "block" "module")) + ("float" ("complex_pattern" "union_pattern" "keyword_pattern" "primary_expression" "case_pattern" "dict_pattern")) + ("for_in_clause" ("set_comprehension" "generator_expression" "list_comprehension" "dictionary_comprehension")) + ("for_statement" ("block" "_compound_statement" "module")) ("format_expression" ("format_specifier")) ("format_specifier" ("format_expression" "interpolation")) - ("function_definition" ("_compound_statement" "block" "decorated_definition" "module")) - ("future_import_statement" ("module" "block" "_simple_statement")) + ("function_definition" ("module" "block" "_compound_statement" "decorated_definition")) + ("future_import_statement" ("block" "_simple_statement" "module")) ("generator_expression" ("call" "primary_expression")) ("generic_type" ("type")) - ("global_statement" ("module" "block" "_simple_statement")) - ("identifier" ("list_splat_pattern" "class_definition" "named_expression" "default_parameter" "pattern" "member_type" "typed_parameter" "as_pattern" "typed_default_parameter" "primary_expression" "function_definition" "dictionary_splat_pattern" "keyword_pattern" "exec_statement" "generic_type" "attribute" "dotted_name" "global_statement" "nonlocal_statement" "parameter" "splat_type" "keyword_argument" "aliased_import" "splat_pattern" "list_splat")) - ("if_clause" ("dictionary_comprehension" "list_comprehension" "case_clause" "set_comprehension" "generator_expression")) - ("if_statement" ("_compound_statement" "block" "module")) - ("import_from_statement" ("module" "block" "_simple_statement")) + ("global_statement" ("block" "_simple_statement" "module")) + ("identifier" ("keyword_argument" "member_type" "aliased_import" "typed_parameter" "default_parameter" "parameter" "attribute" "keyword_pattern" "primary_expression" "as_pattern" "dotted_name" "pattern" "named_expression" "splat_type" "class_definition" "nonlocal_statement" "global_statement" "list_splat_pattern" "exec_statement" "generic_type" "dictionary_splat_pattern" "function_definition" "list_splat" "typed_default_parameter" "splat_pattern")) + ("if_clause" ("case_clause" "list_comprehension" "generator_expression" "dictionary_comprehension" "set_comprehension")) + ("if_statement" ("block" "_compound_statement" "module")) + ("import_from_statement" ("block" "_simple_statement" "module")) ("import_prefix" ("relative_import")) - ("import_statement" ("module" "block" "_simple_statement")) - ("integer" ("complex_pattern" "primary_expression" "union_pattern" "keyword_pattern" "case_pattern" "dict_pattern")) + ("import_statement" ("block" "_simple_statement" "module")) + ("integer" ("complex_pattern" "union_pattern" "keyword_pattern" "primary_expression" "case_pattern" "dict_pattern")) ("interpolation" ("string")) ("keyword_argument" ("argument_list")) ("keyword_pattern" ("case_pattern")) @@ -1703,58 +1703,58 @@ ("lambda_parameters" ("lambda")) ("list" ("primary_expression")) ("list_comprehension" ("primary_expression")) - ("list_pattern" ("pattern" "union_pattern" "keyword_pattern" "case_pattern" "dict_pattern")) - ("list_splat" ("primary_expression" "parenthesized_list_splat" "list" "parenthesized_expression" "tuple" "argument_list" "set")) - ("list_splat_pattern" ("parameter" "typed_parameter" "pattern")) - ("match_statement" ("_compound_statement" "block" "module")) + ("list_pattern" ("union_pattern" "keyword_pattern" "case_pattern" "dict_pattern" "pattern")) + ("list_splat" ("list" "primary_expression" "tuple" "parenthesized_list_splat" "argument_list" "parenthesized_expression" "set")) + ("list_splat_pattern" ("parameter" "pattern" "typed_parameter")) + ("match_statement" ("block" "_compound_statement" "module")) ("member_type" ("type")) ("named_expression" ("expression")) - ("none" ("primary_expression" "union_pattern" "keyword_pattern" "case_pattern" "dict_pattern")) - ("nonlocal_statement" ("module" "block" "_simple_statement")) + ("none" ("union_pattern" "keyword_pattern" "primary_expression" "case_pattern" "dict_pattern")) + ("nonlocal_statement" ("block" "_simple_statement" "module")) ("not_operator" ("expression")) - ("pair" ("dictionary_comprehension" "dictionary")) - ("parameter" ("lambda_parameters" "parameters")) + ("pair" ("dictionary" "dictionary_comprehension")) + ("parameter" ("parameters" "lambda_parameters")) ("parameters" ("function_definition")) - ("parenthesized_expression" ("parenthesized_list_splat" "argument_list" "parenthesized_expression" "primary_expression")) - ("parenthesized_list_splat" ("tuple" "list" "set")) - ("pass_statement" ("module" "block" "_simple_statement")) - ("pattern" ("for_statement" "for_in_clause" "pattern_list" "assignment" "list_pattern" "tuple_pattern" "augmented_assignment")) - ("pattern_list" ("for_statement" "interpolation" "for_in_clause" "assignment" "format_expression" "augmented_assignment")) + ("parenthesized_expression" ("argument_list" "parenthesized_expression" "primary_expression" "parenthesized_list_splat")) + ("parenthesized_list_splat" ("list" "tuple" "set")) + ("pass_statement" ("block" "_simple_statement" "module")) + ("pattern" ("augmented_assignment" "tuple_pattern" "pattern_list" "for_in_clause" "list_pattern" "for_statement" "assignment")) + ("pattern_list" ("augmented_assignment" "for_in_clause" "interpolation" "format_expression" "for_statement" "assignment")) ("positional_separator" ("parameter")) - ("primary_expression" ("attribute" "expression" "await" "comparison_operator" "call" "binary_operator" "unary_operator" "subscript")) - ("print_statement" ("module" "block" "_simple_statement")) - ("raise_statement" ("module" "block" "_simple_statement")) + ("primary_expression" ("unary_operator" "attribute" "call" "binary_operator" "expression" "subscript" "await" "comparison_operator")) + ("print_statement" ("block" "_simple_statement" "module")) + ("raise_statement" ("block" "_simple_statement" "module")) ("relative_import" ("import_from_statement")) - ("return_statement" ("module" "block" "_simple_statement")) + ("return_statement" ("block" "_simple_statement" "module")) ("set" ("primary_expression")) ("set_comprehension" ("primary_expression")) ("slice" ("subscript")) - ("splat_pattern" ("case_pattern" "union_pattern" "dict_pattern" "keyword_pattern")) + ("splat_pattern" ("dict_pattern" "case_pattern" "keyword_pattern" "union_pattern")) ("splat_type" ("type")) - ("string" ("concatenated_string" "primary_expression" "union_pattern" "exec_statement" "keyword_pattern" "case_pattern" "dict_pattern")) + ("string" ("concatenated_string" "union_pattern" "exec_statement" "keyword_pattern" "primary_expression" "case_pattern" "dict_pattern")) ("string_content" ("string")) ("string_end" ("string")) ("string_start" ("string")) - ("subscript" ("list_splat_pattern" "pattern" "primary_expression" "dictionary_splat_pattern" "list_splat")) - ("true" ("primary_expression" "union_pattern" "keyword_pattern" "case_pattern" "dict_pattern")) - ("try_statement" ("_compound_statement" "block" "module")) + ("subscript" ("dictionary_splat_pattern" "primary_expression" "list_splat" "pattern" "list_splat_pattern")) + ("true" ("union_pattern" "keyword_pattern" "primary_expression" "case_pattern" "dict_pattern")) + ("try_statement" ("block" "_compound_statement" "module")) ("tuple" ("primary_expression")) - ("tuple_pattern" ("default_parameter" "pattern" "union_pattern" "parameter" "keyword_pattern" "case_pattern" "dict_pattern")) - ("type" ("union_type" "member_type" "type_alias_statement" "function_definition" "constrained_type" "assignment" "typed_parameter" "type_parameter" "typed_default_parameter")) - ("type_alias_statement" ("module" "block" "_simple_statement")) + ("tuple_pattern" ("union_pattern" "keyword_pattern" "case_pattern" "default_parameter" "dict_pattern" "parameter" "pattern")) + ("type" ("union_type" "member_type" "function_definition" "constrained_type" "type_alias_statement" "typed_default_parameter" "typed_parameter" "type_parameter" "assignment")) + ("type_alias_statement" ("block" "_simple_statement" "module")) ("type_conversion" ("format_expression" "interpolation")) - ("type_parameter" ("generic_type" "function_definition" "class_definition")) + ("type_parameter" ("generic_type" "class_definition" "function_definition")) ("typed_default_parameter" ("parameter")) ("typed_parameter" ("parameter")) ("unary_operator" ("primary_expression")) - ("union_pattern" ("case_pattern" "union_pattern" "dict_pattern" "keyword_pattern")) + ("union_pattern" ("dict_pattern" "case_pattern" "keyword_pattern" "union_pattern")) ("union_type" ("type")) - ("while_statement" ("_compound_statement" "block" "module")) + ("while_statement" ("block" "_compound_statement" "module")) ("wildcard_import" ("import_from_statement")) ("with_clause" ("with_statement")) ("with_item" ("with_clause")) - ("with_statement" ("_compound_statement" "block" "module")) - ("yield" ("tuple" "interpolation" "list" "assignment" "format_expression" "parenthesized_expression" "expression_statement" "augmented_assignment" "set")) + ("with_statement" ("block" "_compound_statement" "module")) + ("yield" ("list" "augmented_assignment" "expression_statement" "tuple" "interpolation" "format_expression" "parenthesized_expression" "set" "assignment")) ) ) ;; END Inverse production rules for python @@ -1769,303 +1769,25 @@ ) ;; END All supertypes in python -;; START Production rules for c -(defconst combobulate-rules-c - '(("_abstract_declarator" (:*unnamed* ("abstract_function_declarator" "abstract_pointer_declarator" "abstract_parenthesized_declarator" "abstract_array_declarator"))) - ("_declarator" (:*unnamed* ("function_declarator" "parenthesized_declarator" "pointer_declarator" "attributed_declarator" "array_declarator" "identifier"))) - ("_field_declarator" (:*unnamed* ("function_declarator" "attributed_declarator" "parenthesized_declarator" "pointer_declarator" "field_identifier" "array_declarator"))) - ("_type_declarator" (:*unnamed* ("function_declarator" "type_identifier" "parenthesized_declarator" "pointer_declarator" "attributed_declarator" "array_declarator" "primitive_type"))) - ("abstract_array_declarator" (:*unnamed* ("type_qualifier") :declarator ("abstract_function_declarator" "abstract_pointer_declarator" "abstract_parenthesized_declarator" "abstract_array_declarator") :size ("expression"))) - ("abstract_function_declarator" (:*unnamed* nil :declarator ("abstract_function_declarator" "abstract_pointer_declarator" "abstract_parenthesized_declarator" "abstract_array_declarator") :parameters ("parameter_list"))) - ("abstract_parenthesized_declarator" (:*unnamed* ("abstract_pointer_declarator" "abstract_parenthesized_declarator" "ms_call_modifier" "abstract_function_declarator" "abstract_array_declarator"))) - ("abstract_pointer_declarator" (:*unnamed* ("ms_pointer_modifier" "type_qualifier") :declarator ("abstract_function_declarator" "abstract_pointer_declarator" "abstract_parenthesized_declarator" "abstract_array_declarator"))) - ("alignas_qualifier" (:*unnamed* ("expression" "type_descriptor"))) - ("alignof_expression" (:*unnamed* nil :type ("type_descriptor"))) - ("argument_list" (:*unnamed* ("compound_statement" "expression" "preproc_defined"))) - ("array_declarator" (:*unnamed* ("type_qualifier") :declarator ("pointer_declarator" "field_identifier" "identifier" "function_declarator" "type_identifier" "parenthesized_declarator" "attributed_declarator" "array_declarator" "primitive_type") :size ("expression"))) - ("assignment_expression" (:*unnamed* nil :left ("pointer_expression" "parenthesized_expression" "subscript_expression" "field_expression" "identifier" "call_expression") :operator nil :right ("expression"))) - ("attribute" (:*unnamed* ("argument_list") :name ("identifier") :prefix ("identifier"))) - ("attribute_declaration" (:*unnamed* ("attribute"))) - ("attribute_specifier" (:*unnamed* ("argument_list"))) - ("attributed_declarator" (:*unnamed* ("pointer_declarator" "field_identifier" "identifier" "function_declarator" "type_identifier" "parenthesized_declarator" "attributed_declarator" "attribute_declaration" "array_declarator" "primitive_type"))) - ("attributed_statement" (:*unnamed* ("attribute_declaration" "statement"))) - ("binary_expression" (:*unnamed* nil :left ("expression" "preproc_defined") :operator nil :right ("expression" "preproc_defined"))) - ("bitfield_clause" (:*unnamed* ("expression"))) - ("break_statement" (:*unnamed* nil)) - ("call_expression" (:*unnamed* nil :arguments ("argument_list") :function ("expression"))) - ("case_statement" (:*unnamed* ("if_statement" "return_statement" "while_statement" "compound_statement" "break_statement" "continue_statement" "declaration" "attributed_statement" "type_definition" "for_statement" "seh_leave_statement" "switch_statement" "do_statement" "goto_statement" "seh_try_statement" "expression_statement" "labeled_statement") :value ("expression"))) - ("cast_expression" (:*unnamed* nil :type ("type_descriptor") :value ("expression"))) - ("char_literal" (:*unnamed* ("escape_sequence" "character"))) - ("character" (:*unnamed* nil)) - ("comma_expression" (:*unnamed* nil :left ("expression") :right ("expression" "comma_expression"))) - ("comment" (:*unnamed* nil)) - ("compound_literal_expression" (:*unnamed* nil :type ("type_descriptor") :value ("initializer_list"))) - ("compound_statement" (:*unnamed* ("preproc_function_def" "type_specifier" "preproc_include" "statement" "preproc_def" "preproc_if" "function_definition" "preproc_ifdef" "preproc_call" "linkage_specification" "declaration" "type_definition"))) - ("concatenated_string" (:*unnamed* ("string_literal" "identifier"))) - ("conditional_expression" (:*unnamed* nil :alternative ("expression") :condition ("expression") :consequence ("expression" "comma_expression"))) - ("continue_statement" (:*unnamed* nil)) - ("declaration" (:*unnamed* ("type_qualifier" "storage_class_specifier" "attribute_declaration" "ms_declspec_modifier" "attribute_specifier") :declarator ("gnu_asm_expression" "pointer_declarator" "init_declarator" "identifier" "function_declarator" "ms_call_modifier" "parenthesized_declarator" "attributed_declarator" "array_declarator") :type ("type_specifier"))) - ("declaration_list" (:*unnamed* ("preproc_function_def" "type_specifier" "preproc_include" "statement" "preproc_def" "preproc_if" "function_definition" "preproc_ifdef" "preproc_call" "linkage_specification" "declaration" "type_definition"))) - ("do_statement" (:*unnamed* nil :body ("statement") :condition ("parenthesized_expression"))) - ("else_clause" (:*unnamed* ("statement"))) - ("enum_specifier" (:*unnamed* ("attribute_specifier") :body ("enumerator_list") :name ("type_identifier") :underlying_type ("primitive_type"))) - ("enumerator" (:*unnamed* nil :name ("identifier") :value ("expression"))) - ("enumerator_list" (:*unnamed* ("enumerator" "preproc_ifdef" "preproc_call" "preproc_if"))) - ("escape_sequence" (:*unnamed* nil)) - ("expression" (:*unnamed* ("concatenated_string" "true" "gnu_asm_expression" "conditional_expression" "field_expression" "update_expression" "null" "number_literal" "parenthesized_expression" "unary_expression" "compound_literal_expression" "call_expression" "cast_expression" "pointer_expression" "alignof_expression" "sizeof_expression" "assignment_expression" "offsetof_expression" "identifier" "char_literal" "false" "extension_expression" "binary_expression" "string_literal" "subscript_expression" "generic_expression"))) - ("expression_statement" (:*unnamed* ("expression" "comma_expression"))) - ("extension_expression" (:*unnamed* ("expression"))) - ("false" (:*unnamed* nil)) - ("field_declaration" (:*unnamed* ("bitfield_clause" "attribute_specifier" "storage_class_specifier" "attribute_declaration" "ms_declspec_modifier" "type_qualifier") :declarator ("function_declarator" "attributed_declarator" "parenthesized_declarator" "pointer_declarator" "field_identifier" "array_declarator") :type ("type_specifier"))) - ("field_declaration_list" (:*unnamed* ("preproc_ifdef" "preproc_function_def" "preproc_call" "field_declaration" "preproc_if" "preproc_def"))) - ("field_designator" (:*unnamed* ("field_identifier"))) - ("field_expression" (:*unnamed* nil :argument ("expression") :field ("field_identifier") :operator nil)) - ("field_identifier" (:*unnamed* nil)) - ("for_statement" (:*unnamed* nil :body ("statement") :condition ("expression" "comma_expression") :initializer ("declaration" "expression" "comma_expression") :update ("expression" "comma_expression"))) - ("function_declarator" (:*unnamed* ("gnu_asm_expression" "identifier" "call_expression" "attribute_specifier") :declarator ("pointer_declarator" "field_identifier" "identifier" "function_declarator" "type_identifier" "parenthesized_declarator" "attributed_declarator" "array_declarator" "primitive_type") :parameters ("parameter_list"))) - ("function_definition" (:*unnamed* ("attribute_specifier" "ms_call_modifier" "storage_class_specifier" "declaration" "attribute_declaration" "ms_declspec_modifier" "type_qualifier") :body ("compound_statement") :declarator ("function_declarator" "parenthesized_declarator" "pointer_declarator" "attributed_declarator" "array_declarator" "identifier") :type ("type_specifier"))) - ("generic_expression" (:*unnamed* ("expression" "type_descriptor"))) - ("gnu_asm_clobber_list" (:*unnamed* nil :register ("string_literal" "concatenated_string"))) - ("gnu_asm_expression" (:*unnamed* ("gnu_asm_qualifier") :assembly_code ("string_literal" "concatenated_string") :clobbers ("gnu_asm_clobber_list") :goto_labels ("gnu_asm_goto_list") :input_operands ("gnu_asm_input_operand_list") :output_operands ("gnu_asm_output_operand_list"))) - ("gnu_asm_goto_list" (:*unnamed* nil :label ("identifier"))) - ("gnu_asm_input_operand" (:*unnamed* nil :constraint ("string_literal") :symbol ("identifier") :value ("expression"))) - ("gnu_asm_input_operand_list" (:*unnamed* nil :operand ("gnu_asm_input_operand"))) - ("gnu_asm_output_operand" (:*unnamed* nil :constraint ("string_literal") :symbol ("identifier") :value ("expression"))) - ("gnu_asm_output_operand_list" (:*unnamed* nil :operand ("gnu_asm_output_operand"))) - ("gnu_asm_qualifier" (:*unnamed* nil)) - ("goto_statement" (:*unnamed* nil :label ("statement_identifier"))) - ("identifier" (:*unnamed* nil)) - ("if_statement" (:*unnamed* nil :alternative ("else_clause") :condition ("parenthesized_expression") :consequence ("statement"))) - ("init_declarator" (:*unnamed* nil :declarator ("function_declarator" "parenthesized_declarator" "pointer_declarator" "attributed_declarator" "array_declarator" "identifier") :value ("expression" "initializer_list"))) - ("initializer_list" (:*unnamed* ("initializer_pair" "expression" "initializer_list"))) - ("initializer_pair" (:*unnamed* nil :designator ("field_identifier" "field_designator" "subscript_designator" "subscript_range_designator") :value ("expression" "initializer_list"))) - ("labeled_statement" (:*unnamed* ("declaration" "statement") :label ("statement_identifier"))) - ("linkage_specification" (:*unnamed* nil :body ("declaration" "declaration_list" "function_definition") :value ("string_literal"))) - ("macro_type_specifier" (:*unnamed* nil :name ("identifier") :type ("type_descriptor"))) - ("ms_based_modifier" (:*unnamed* ("argument_list"))) - ("ms_call_modifier" (:*unnamed* nil)) - ("ms_declspec_modifier" (:*unnamed* ("identifier"))) - ("ms_pointer_modifier" (:*unnamed* ("ms_restrict_modifier" "ms_unaligned_ptr_modifier" "ms_signed_ptr_modifier" "ms_unsigned_ptr_modifier"))) - ("ms_restrict_modifier" (:*unnamed* nil)) - ("ms_signed_ptr_modifier" (:*unnamed* nil)) - ("ms_unaligned_ptr_modifier" (:*unnamed* nil)) - ("ms_unsigned_ptr_modifier" (:*unnamed* nil)) - ("null" (:*unnamed* nil)) - ("number_literal" (:*unnamed* nil)) - ("offsetof_expression" (:*unnamed* nil :member ("field_identifier") :type ("type_descriptor"))) - ("parameter_declaration" (:*unnamed* ("type_qualifier" "storage_class_specifier" "attribute_declaration" "ms_declspec_modifier" "attribute_specifier") :declarator ("abstract_pointer_declarator" "pointer_declarator" "abstract_function_declarator" "abstract_parenthesized_declarator" "identifier" "function_declarator" "parenthesized_declarator" "attributed_declarator" "array_declarator" "abstract_array_declarator") :type ("type_specifier"))) - ("parameter_list" (:*unnamed* ("variadic_parameter" "parameter_declaration" "compound_statement" "identifier"))) - ("parenthesized_declarator" (:*unnamed* ("pointer_declarator" "field_identifier" "identifier" "function_declarator" "type_identifier" "parenthesized_declarator" "ms_call_modifier" "attributed_declarator" "array_declarator" "primitive_type"))) - ("parenthesized_expression" (:*unnamed* ("compound_statement" "expression" "preproc_defined" "comma_expression"))) - ("pointer_declarator" (:*unnamed* ("ms_based_modifier" "ms_pointer_modifier" "type_qualifier") :declarator ("pointer_declarator" "field_identifier" "identifier" "function_declarator" "type_identifier" "parenthesized_declarator" "attributed_declarator" "array_declarator" "primitive_type"))) - ("pointer_expression" (:*unnamed* nil :argument ("expression") :operator nil)) - ("preproc_arg" (:*unnamed* nil)) - ("preproc_call" (:*unnamed* nil :argument ("preproc_arg") :directive ("preproc_directive"))) - ("preproc_def" (:*unnamed* nil :name ("identifier") :value ("preproc_arg"))) - ("preproc_defined" (:*unnamed* ("identifier"))) - ("preproc_directive" (:*unnamed* nil)) - ("preproc_elif" (:*unnamed* ("preproc_function_def" "type_specifier" "field_declaration" "preproc_include" "statement" "preproc_def" "enumerator" "preproc_if" "function_definition" "preproc_ifdef" "preproc_call" "linkage_specification" "declaration" "type_definition") :alternative ("preproc_elif" "preproc_elifdef" "preproc_else") :condition ("char_literal" "identifier" "number_literal" "binary_expression" "parenthesized_expression" "unary_expression" "preproc_defined" "call_expression"))) - ("preproc_elifdef" (:*unnamed* ("preproc_function_def" "type_specifier" "field_declaration" "preproc_include" "statement" "preproc_def" "enumerator" "preproc_if" "function_definition" "preproc_ifdef" "preproc_call" "linkage_specification" "declaration" "type_definition") :alternative ("preproc_elif" "preproc_elifdef" "preproc_else") :name ("identifier"))) - ("preproc_else" (:*unnamed* ("preproc_function_def" "type_specifier" "field_declaration" "preproc_include" "statement" "preproc_def" "enumerator" "preproc_if" "function_definition" "preproc_ifdef" "preproc_call" "linkage_specification" "declaration" "type_definition"))) - ("preproc_function_def" (:*unnamed* nil :name ("identifier") :parameters ("preproc_params") :value ("preproc_arg"))) - ("preproc_if" (:*unnamed* ("preproc_function_def" "type_specifier" "field_declaration" "preproc_include" "statement" "preproc_def" "enumerator" "preproc_if" "function_definition" "preproc_ifdef" "preproc_call" "linkage_specification" "declaration" "type_definition") :alternative ("preproc_elif" "preproc_elifdef" "preproc_else") :condition ("char_literal" "identifier" "number_literal" "binary_expression" "parenthesized_expression" "unary_expression" "preproc_defined" "call_expression"))) - ("preproc_ifdef" (:*unnamed* ("preproc_function_def" "type_specifier" "field_declaration" "preproc_include" "statement" "preproc_def" "enumerator" "preproc_if" "function_definition" "preproc_ifdef" "preproc_call" "linkage_specification" "declaration" "type_definition") :alternative ("preproc_elif" "preproc_elifdef" "preproc_else") :name ("identifier"))) - ("preproc_include" (:*unnamed* nil :path ("string_literal" "system_lib_string" "identifier" "call_expression"))) - ("preproc_params" (:*unnamed* ("identifier"))) - ("primitive_type" (:*unnamed* nil)) - ("return_statement" (:*unnamed* ("expression" "comma_expression"))) - ("seh_except_clause" (:*unnamed* nil :body ("compound_statement") :filter ("parenthesized_expression"))) - ("seh_finally_clause" (:*unnamed* nil :body ("compound_statement"))) - ("seh_leave_statement" (:*unnamed* nil)) - ("seh_try_statement" (:*unnamed* ("seh_except_clause" "seh_finally_clause") :body ("compound_statement"))) - ("sized_type_specifier" (:*unnamed* ("type_qualifier") :type ("type_identifier" "primitive_type"))) - ("sizeof_expression" (:*unnamed* nil :type ("type_descriptor") :value ("expression"))) - ("statement" (:*unnamed* ("if_statement" "return_statement" "while_statement" "compound_statement" "break_statement" "continue_statement" "attributed_statement" "for_statement" "seh_leave_statement" "case_statement" "switch_statement" "do_statement" "goto_statement" "seh_try_statement" "expression_statement" "labeled_statement"))) - ("statement_identifier" (:*unnamed* nil)) - ("storage_class_specifier" (:*unnamed* nil)) - ("string_content" (:*unnamed* nil)) - ("string_literal" (:*unnamed* ("string_content" "escape_sequence"))) - ("struct_specifier" (:*unnamed* ("ms_declspec_modifier" "attribute_specifier") :body ("field_declaration_list") :name ("type_identifier"))) - ("subscript_designator" (:*unnamed* ("expression"))) - ("subscript_expression" (:*unnamed* nil :argument ("expression") :index ("expression"))) - ("subscript_range_designator" (:*unnamed* nil :end ("expression") :start ("expression"))) - ("switch_statement" (:*unnamed* nil :body ("compound_statement") :condition ("parenthesized_expression"))) - ("system_lib_string" (:*unnamed* nil)) - ("translation_unit" (:*unnamed* ("if_statement" "preproc_function_def" "type_specifier" "return_statement" "while_statement" "function_definition" "compound_statement" "break_statement" "continue_statement" "declaration" "attributed_statement" "type_definition" "for_statement" "preproc_include" "preproc_def" "case_statement" "preproc_if" "switch_statement" "do_statement" "goto_statement" "preproc_ifdef" "preproc_call" "linkage_specification" "expression_statement" "labeled_statement"))) - ("true" (:*unnamed* nil)) - ("type_definition" (:*unnamed* ("type_qualifier" "attribute_specifier") :declarator ("function_declarator" "type_identifier" "parenthesized_declarator" "pointer_declarator" "attributed_declarator" "array_declarator" "primitive_type") :type ("type_specifier"))) - ("type_descriptor" (:*unnamed* ("type_qualifier") :declarator ("abstract_function_declarator" "abstract_pointer_declarator" "abstract_parenthesized_declarator" "abstract_array_declarator") :type ("type_specifier"))) - ("type_identifier" (:*unnamed* nil)) - ("type_qualifier" (:*unnamed* ("alignas_qualifier"))) - ("type_specifier" (:*unnamed* ("type_identifier" "primitive_type" "struct_specifier" "union_specifier" "sized_type_specifier" "macro_type_specifier" "enum_specifier"))) - ("unary_expression" (:*unnamed* nil :argument ("expression" "preproc_defined") :operator nil)) - ("union_specifier" (:*unnamed* ("ms_declspec_modifier" "attribute_specifier") :body ("field_declaration_list") :name ("type_identifier"))) - ("update_expression" (:*unnamed* nil :argument ("expression") :operator nil)) - ("variadic_parameter" (:*unnamed* nil)) - ("while_statement" (:*unnamed* nil :body ("statement") :condition ("parenthesized_expression"))) -)) -;; END Production rules for c -;; START Inverse production rules for c -(defconst combobulate-rules-c-inverse - '(("abstract_array_declarator" ("abstract_pointer_declarator" "abstract_function_declarator" "abstract_parenthesized_declarator" "_abstract_declarator" "parameter_declaration" "type_descriptor" "abstract_array_declarator")) - ("abstract_function_declarator" ("abstract_pointer_declarator" "abstract_function_declarator" "abstract_parenthesized_declarator" "_abstract_declarator" "parameter_declaration" "type_descriptor" "abstract_array_declarator")) - ("abstract_parenthesized_declarator" ("abstract_pointer_declarator" "abstract_function_declarator" "abstract_parenthesized_declarator" "_abstract_declarator" "parameter_declaration" "type_descriptor" "abstract_array_declarator")) - ("abstract_pointer_declarator" ("abstract_pointer_declarator" "abstract_function_declarator" "abstract_parenthesized_declarator" "_abstract_declarator" "parameter_declaration" "type_descriptor" "abstract_array_declarator")) - ("alignas_qualifier" ("type_qualifier")) - ("alignof_expression" ("expression")) - ("argument_list" ("attribute" "ms_based_modifier" "call_expression" "attribute_specifier")) - ("array_declarator" ("field_declaration" "pointer_declarator" "init_declarator" "function_definition" "_type_declarator" "function_declarator" "_declarator" "_field_declarator" "parameter_declaration" "parenthesized_declarator" "attributed_declarator" "declaration" "array_declarator" "type_definition")) - ("assignment_expression" ("expression")) - ("attribute" ("attribute_declaration")) - ("attribute_declaration" ("field_declaration" "function_definition" "parameter_declaration" "attributed_declarator" "declaration" "attributed_statement")) - ("attribute_specifier" ("field_declaration" "function_definition" "enum_specifier" "function_declarator" "parameter_declaration" "struct_specifier" "union_specifier" "declaration" "type_definition")) - ("attributed_declarator" ("field_declaration" "pointer_declarator" "init_declarator" "function_definition" "_type_declarator" "function_declarator" "_declarator" "_field_declarator" "parameter_declaration" "parenthesized_declarator" "attributed_declarator" "declaration" "array_declarator" "type_definition")) - ("attributed_statement" ("case_statement" "translation_unit" "statement")) - ("binary_expression" ("preproc_elif" "expression" "preproc_if")) - ("bitfield_clause" ("field_declaration")) - ("break_statement" ("case_statement" "translation_unit" "statement")) - ("call_expression" ("preproc_elif" "expression" "preproc_include" "preproc_if" "assignment_expression" "function_declarator")) - ("case_statement" ("translation_unit" "statement")) - ("cast_expression" ("expression")) - ("char_literal" ("preproc_elif" "expression" "preproc_if")) - ("character" ("char_literal")) - ("comma_expression" ("for_statement" "conditional_expression" "return_statement" "parenthesized_expression" "comma_expression" "expression_statement")) - ("compound_literal_expression" ("expression")) - ("compound_statement" ("translation_unit" "statement" "case_statement" "parameter_list" "seh_except_clause" "function_definition" "seh_finally_clause" "switch_statement" "parenthesized_expression" "seh_try_statement" "argument_list")) - ("concatenated_string" ("gnu_asm_clobber_list" "gnu_asm_expression" "expression")) - ("conditional_expression" ("expression")) - ("continue_statement" ("case_statement" "translation_unit" "statement")) - ("declaration" ("for_statement" "translation_unit" "preproc_elif" "preproc_if" "case_statement" "declaration_list" "function_definition" "compound_statement" "preproc_elifdef" "preproc_ifdef" "preproc_else" "linkage_specification" "labeled_statement")) - ("declaration_list" ("linkage_specification")) - ("do_statement" ("case_statement" "translation_unit" "statement")) - ("else_clause" ("if_statement")) - ("enum_specifier" ("type_specifier")) - ("enumerator" ("preproc_elif" "preproc_if" "preproc_elifdef" "preproc_ifdef" "preproc_else" "enumerator_list")) - ("enumerator_list" ("enum_specifier")) - ("escape_sequence" ("string_literal" "char_literal")) - ("expression" ("bitfield_clause" "enumerator" "init_declarator" "field_expression" "update_expression" "gnu_asm_output_operand" "parenthesized_expression" "subscript_range_designator" "call_expression" "cast_expression" "case_statement" "subscript_designator" "binary_expression" "alignas_qualifier" "expression_statement" "subscript_expression" "abstract_array_declarator" "conditional_expression" "return_statement" "initializer_list" "gnu_asm_input_operand" "comma_expression" "unary_expression" "array_declarator" "for_statement" "pointer_expression" "sizeof_expression" "assignment_expression" "extension_expression" "initializer_pair" "generic_expression" "argument_list")) - ("expression_statement" ("case_statement" "translation_unit" "statement")) - ("extension_expression" ("expression")) - ("false" ("expression")) - ("field_declaration" ("preproc_elif" "preproc_if" "preproc_elifdef" "preproc_ifdef" "preproc_else" "field_declaration_list")) - ("field_declaration_list" ("struct_specifier" "union_specifier")) - ("field_designator" ("initializer_pair")) - ("field_expression" ("assignment_expression" "expression")) - ("field_identifier" ("field_declaration" "pointer_declarator" "field_expression" "offsetof_expression" "function_declarator" "_field_declarator" "field_designator" "parenthesized_declarator" "initializer_pair" "attributed_declarator" "array_declarator")) - ("for_statement" ("case_statement" "translation_unit" "statement")) - ("function_declarator" ("field_declaration" "pointer_declarator" "init_declarator" "function_definition" "_type_declarator" "function_declarator" "_declarator" "_field_declarator" "parameter_declaration" "parenthesized_declarator" "attributed_declarator" "declaration" "array_declarator" "type_definition")) - ("function_definition" ("translation_unit" "preproc_elif" "preproc_if" "declaration_list" "compound_statement" "preproc_elifdef" "preproc_ifdef" "preproc_else" "linkage_specification")) - ("generic_expression" ("expression")) - ("gnu_asm_clobber_list" ("gnu_asm_expression")) - ("gnu_asm_expression" ("declaration" "expression" "function_declarator")) - ("gnu_asm_goto_list" ("gnu_asm_expression")) - ("gnu_asm_input_operand" ("gnu_asm_input_operand_list")) - ("gnu_asm_input_operand_list" ("gnu_asm_expression")) - ("gnu_asm_output_operand" ("gnu_asm_output_operand_list")) - ("gnu_asm_output_operand_list" ("gnu_asm_expression")) - ("gnu_asm_qualifier" ("gnu_asm_expression")) - ("goto_statement" ("case_statement" "translation_unit" "statement")) - ("identifier" ("concatenated_string" "preproc_function_def" "expression" "enumerator" "init_declarator" "gnu_asm_output_operand" "attributed_declarator" "declaration" "preproc_defined" "preproc_include" "preproc_params" "preproc_ifdef" "ms_declspec_modifier" "preproc_elif" "parameter_list" "function_definition" "preproc_elifdef" "parameter_declaration" "gnu_asm_input_operand" "array_declarator" "attribute" "pointer_declarator" "preproc_def" "preproc_if" "assignment_expression" "function_declarator" "_declarator" "parenthesized_declarator" "macro_type_specifier" "gnu_asm_goto_list")) - ("if_statement" ("case_statement" "translation_unit" "statement")) - ("init_declarator" ("declaration")) - ("initializer_list" ("compound_literal_expression" "init_declarator" "initializer_pair" "initializer_list")) - ("initializer_pair" ("initializer_list")) - ("labeled_statement" ("case_statement" "translation_unit" "statement")) - ("linkage_specification" ("translation_unit" "preproc_elif" "preproc_if" "declaration_list" "compound_statement" "preproc_elifdef" "preproc_ifdef" "preproc_else")) - ("macro_type_specifier" ("type_specifier")) - ("ms_based_modifier" ("pointer_declarator")) - ("ms_call_modifier" ("abstract_parenthesized_declarator" "declaration" "function_definition" "parenthesized_declarator")) - ("ms_declspec_modifier" ("field_declaration" "function_definition" "parameter_declaration" "struct_specifier" "union_specifier" "declaration")) - ("ms_pointer_modifier" ("abstract_pointer_declarator" "pointer_declarator")) - ("ms_restrict_modifier" ("ms_pointer_modifier")) - ("ms_signed_ptr_modifier" ("ms_pointer_modifier")) - ("ms_unaligned_ptr_modifier" ("ms_pointer_modifier")) - ("ms_unsigned_ptr_modifier" ("ms_pointer_modifier")) - ("null" ("expression")) - ("number_literal" ("preproc_elif" "expression" "preproc_if")) - ("offsetof_expression" ("expression")) - ("parameter_declaration" ("parameter_list")) - ("parameter_list" ("abstract_function_declarator" "function_declarator")) - ("parenthesized_declarator" ("field_declaration" "pointer_declarator" "init_declarator" "function_definition" "_type_declarator" "function_declarator" "_declarator" "_field_declarator" "parameter_declaration" "parenthesized_declarator" "attributed_declarator" "declaration" "array_declarator" "type_definition")) - ("parenthesized_expression" ("if_statement" "preproc_elif" "expression" "preproc_if" "while_statement" "seh_except_clause" "switch_statement" "assignment_expression" "do_statement")) - ("pointer_declarator" ("field_declaration" "pointer_declarator" "init_declarator" "function_definition" "_type_declarator" "function_declarator" "_declarator" "_field_declarator" "parameter_declaration" "parenthesized_declarator" "attributed_declarator" "declaration" "array_declarator" "type_definition")) - ("pointer_expression" ("assignment_expression" "expression")) - ("preproc_arg" ("preproc_function_def" "preproc_call" "preproc_def")) - ("preproc_call" ("translation_unit" "preproc_elif" "preproc_if" "declaration_list" "compound_statement" "preproc_elifdef" "preproc_ifdef" "preproc_else" "enumerator_list" "field_declaration_list")) - ("preproc_def" ("translation_unit" "preproc_elif" "preproc_if" "declaration_list" "compound_statement" "preproc_elifdef" "preproc_ifdef" "preproc_else" "field_declaration_list")) - ("preproc_defined" ("preproc_elif" "preproc_if" "parenthesized_expression" "binary_expression" "unary_expression" "argument_list")) - ("preproc_directive" ("preproc_call")) - ("preproc_elif" ("preproc_ifdef" "preproc_elif" "preproc_elifdef" "preproc_if")) - ("preproc_elifdef" ("preproc_ifdef" "preproc_elif" "preproc_elifdef" "preproc_if")) - ("preproc_else" ("preproc_ifdef" "preproc_elif" "preproc_elifdef" "preproc_if")) - ("preproc_function_def" ("translation_unit" "preproc_elif" "preproc_if" "declaration_list" "compound_statement" "preproc_elifdef" "preproc_ifdef" "preproc_else" "field_declaration_list")) - ("preproc_if" ("translation_unit" "preproc_elif" "preproc_if" "declaration_list" "compound_statement" "preproc_elifdef" "preproc_ifdef" "preproc_else" "enumerator_list" "field_declaration_list")) - ("preproc_ifdef" ("translation_unit" "preproc_elif" "preproc_if" "declaration_list" "compound_statement" "preproc_elifdef" "preproc_ifdef" "preproc_else" "enumerator_list" "field_declaration_list")) - ("preproc_include" ("translation_unit" "preproc_elif" "preproc_if" "declaration_list" "compound_statement" "preproc_elifdef" "preproc_ifdef" "preproc_else")) - ("preproc_params" ("preproc_function_def")) - ("primitive_type" ("type_specifier" "pointer_declarator" "sized_type_specifier" "enum_specifier" "_type_declarator" "function_declarator" "parenthesized_declarator" "attributed_declarator" "array_declarator" "type_definition")) - ("return_statement" ("case_statement" "translation_unit" "statement")) - ("seh_except_clause" ("seh_try_statement")) - ("seh_finally_clause" ("seh_try_statement")) - ("seh_leave_statement" ("case_statement" "statement")) - ("seh_try_statement" ("case_statement" "statement")) - ("sized_type_specifier" ("type_specifier")) - ("sizeof_expression" ("expression")) - ("statement" ("for_statement" "if_statement" "preproc_elif" "preproc_if" "while_statement" "declaration_list" "compound_statement" "do_statement" "preproc_elifdef" "labeled_statement" "preproc_ifdef" "else_clause" "preproc_else" "attributed_statement")) - ("statement_identifier" ("labeled_statement" "goto_statement")) - ("storage_class_specifier" ("declaration" "parameter_declaration" "function_definition" "field_declaration")) - ("string_content" ("string_literal")) - ("string_literal" ("concatenated_string" "gnu_asm_expression" "gnu_asm_clobber_list" "expression" "preproc_include" "gnu_asm_output_operand" "gnu_asm_input_operand" "linkage_specification")) - ("struct_specifier" ("type_specifier")) - ("subscript_designator" ("initializer_pair")) - ("subscript_expression" ("assignment_expression" "expression")) - ("subscript_range_designator" ("initializer_pair")) - ("switch_statement" ("case_statement" "translation_unit" "statement")) - ("system_lib_string" ("preproc_include")) - ("true" ("expression")) - ("type_definition" ("translation_unit" "preproc_elif" "preproc_if" "case_statement" "declaration_list" "compound_statement" "preproc_elifdef" "preproc_ifdef" "preproc_else")) - ("type_descriptor" ("cast_expression" "compound_literal_expression" "alignof_expression" "sizeof_expression" "offsetof_expression" "alignas_qualifier" "macro_type_specifier" "generic_expression")) - ("type_identifier" ("type_specifier" "pointer_declarator" "sized_type_specifier" "enum_specifier" "_type_declarator" "function_declarator" "struct_specifier" "union_specifier" "parenthesized_declarator" "attributed_declarator" "array_declarator" "type_definition")) - ("type_qualifier" ("abstract_pointer_declarator" "field_declaration" "pointer_declarator" "sized_type_specifier" "function_definition" "type_definition" "parameter_declaration" "type_descriptor" "declaration" "array_declarator" "abstract_array_declarator")) - ("type_specifier" ("translation_unit" "preproc_elif" "field_declaration" "preproc_if" "declaration_list" "function_definition" "compound_statement" "preproc_elifdef" "parameter_declaration" "preproc_ifdef" "preproc_else" "type_descriptor" "declaration" "type_definition")) - ("unary_expression" ("preproc_elif" "expression" "preproc_if")) - ("union_specifier" ("type_specifier")) - ("update_expression" ("expression")) - ("variadic_parameter" ("parameter_list")) - ("while_statement" ("case_statement" "translation_unit" "statement")) - ) -) -;; END Inverse production rules for c -;; START All node types in c -(defconst combobulate-rules-c-types - '("_abstract_declarator" "_declarator" "_field_declarator" "_type_declarator" "abstract_array_declarator" "abstract_function_declarator" "abstract_parenthesized_declarator" "abstract_pointer_declarator" "alignas_qualifier" "alignof_expression" "argument_list" "array_declarator" "assignment_expression" "attribute" "attribute_declaration" "attribute_specifier" "attributed_declarator" "attributed_statement" "binary_expression" "bitfield_clause" "break_statement" "call_expression" "case_statement" "cast_expression" "char_literal" "character" "comma_expression" "comment" "compound_literal_expression" "compound_statement" "concatenated_string" "conditional_expression" "continue_statement" "declaration" "declaration_list" "do_statement" "else_clause" "enum_specifier" "enumerator" "enumerator_list" "escape_sequence" "expression" "expression_statement" "extension_expression" "false" "field_declaration" "field_declaration_list" "field_designator" "field_expression" "field_identifier" "for_statement" "function_declarator" "function_definition" "generic_expression" "gnu_asm_clobber_list" "gnu_asm_expression" "gnu_asm_goto_list" "gnu_asm_input_operand" "gnu_asm_input_operand_list" "gnu_asm_output_operand" "gnu_asm_output_operand_list" "gnu_asm_qualifier" "goto_statement" "identifier" "if_statement" "init_declarator" "initializer_list" "initializer_pair" "labeled_statement" "linkage_specification" "macro_type_specifier" "ms_based_modifier" "ms_call_modifier" "ms_declspec_modifier" "ms_pointer_modifier" "ms_restrict_modifier" "ms_signed_ptr_modifier" "ms_unaligned_ptr_modifier" "ms_unsigned_ptr_modifier" "null" "number_literal" "offsetof_expression" "parameter_declaration" "parameter_list" "parenthesized_declarator" "parenthesized_expression" "pointer_declarator" "pointer_expression" "preproc_arg" "preproc_call" "preproc_def" "preproc_defined" "preproc_directive" "preproc_elif" "preproc_elifdef" "preproc_else" "preproc_function_def" "preproc_if" "preproc_ifdef" "preproc_include" "preproc_params" "primitive_type" "return_statement" "seh_except_clause" "seh_finally_clause" "seh_leave_statement" "seh_try_statement" "sized_type_specifier" "sizeof_expression" "statement" "statement_identifier" "storage_class_specifier" "string_content" "string_literal" "struct_specifier" "subscript_designator" "subscript_expression" "subscript_range_designator" "switch_statement" "system_lib_string" "translation_unit" "true" "type_definition" "type_descriptor" "type_identifier" "type_qualifier" "type_specifier" "unary_expression" "union_specifier" "update_expression" "variadic_parameter" "while_statement") -) -;; END All node types in c -;; START All supertypes in c -(defconst combobulate-rules-c-supertypes - '("_abstract_declarator" "_declarator" "_field_declarator" "_type_declarator" "expression" "statement" "type_specifier") -) -;; END All supertypes in c - ;; START Production rules for html (defconst combobulate-rules-html - '(("attribute" (:*unnamed* ("quoted_attribute_value" "attribute_name" "attribute_value"))) + '(("attribute" (:*unnamed* ("quoted_attribute_value" "attribute_value" "attribute_name"))) ("attribute_name" (:*unnamed* nil)) ("attribute_value" (:*unnamed* nil)) ("comment" (:*unnamed* nil)) ("doctype" (:*unnamed* nil)) - ("document" (:*unnamed* ("text" "doctype" "entity" "element" "style_element" "erroneous_end_tag" "script_element"))) - ("element" (:*unnamed* ("text" "doctype" "entity" "self_closing_tag" "end_tag" "element" "start_tag" "style_element" "script_element" "erroneous_end_tag"))) + ("document" (:*unnamed* ("element" "entity" "text" "style_element" "script_element" "erroneous_end_tag" "doctype"))) + ("element" (:*unnamed* ("element" "script_element" "style_element" "erroneous_end_tag" "doctype" "self_closing_tag" "entity" "text" "end_tag" "start_tag"))) ("end_tag" (:*unnamed* ("tag_name"))) ("entity" (:*unnamed* nil)) ("erroneous_end_tag" (:*unnamed* ("erroneous_end_tag_name"))) ("erroneous_end_tag_name" (:*unnamed* nil)) ("quoted_attribute_value" (:*unnamed* ("attribute_value"))) ("raw_text" (:*unnamed* nil)) - ("script_element" (:*unnamed* ("raw_text" "end_tag" "start_tag"))) - ("self_closing_tag" (:*unnamed* ("attribute" "tag_name"))) - ("start_tag" (:*unnamed* ("attribute" "tag_name"))) - ("style_element" (:*unnamed* ("raw_text" "end_tag" "start_tag"))) + ("script_element" (:*unnamed* ("raw_text" "start_tag" "end_tag"))) + ("self_closing_tag" (:*unnamed* ("tag_name" "attribute"))) + ("start_tag" (:*unnamed* ("tag_name" "attribute"))) + ("style_element" (:*unnamed* ("raw_text" "start_tag" "end_tag"))) ("tag_name" (:*unnamed* nil)) ("text" (:*unnamed* nil)) )) @@ -2074,21 +1796,21 @@ (defconst combobulate-rules-html-inverse '(("attribute" ("self_closing_tag" "start_tag")) ("attribute_name" ("attribute")) - ("attribute_value" ("attribute" "quoted_attribute_value")) - ("doctype" ("document" "element")) - ("element" ("document" "element")) + ("attribute_value" ("quoted_attribute_value" "attribute")) + ("doctype" ("element" "document")) + ("element" ("element" "document")) ("end_tag" ("script_element" "element" "style_element")) - ("entity" ("document" "element")) - ("erroneous_end_tag" ("document" "element")) + ("entity" ("element" "document")) + ("erroneous_end_tag" ("element" "document")) ("erroneous_end_tag_name" ("erroneous_end_tag")) ("quoted_attribute_value" ("attribute")) ("raw_text" ("script_element" "style_element")) - ("script_element" ("document" "element")) + ("script_element" ("element" "document")) ("self_closing_tag" ("element")) ("start_tag" ("script_element" "element" "style_element")) - ("style_element" ("document" "element")) - ("tag_name" ("self_closing_tag" "end_tag" "start_tag")) - ("text" ("document" "element")) + ("style_element" ("element" "document")) + ("tag_name" ("self_closing_tag" "start_tag" "end_tag")) + ("text" ("element" "document")) ) ) ;; END Inverse production rules for html @@ -2105,12 +1827,12 @@ ;; START Production rules for toml (defconst combobulate-rules-toml - '(("array" (:*unnamed* ("boolean" "string" "integer" "offset_date_time" "float" "array" "inline_table" "local_date" "local_time" "local_date_time"))) + '(("array" (:*unnamed* ("integer" "string" "local_date" "local_date_time" "local_time" "offset_date_time" "array" "float" "boolean" "inline_table"))) ("bare_key" (:*unnamed* nil)) ("boolean" (:*unnamed* nil)) ("comment" (:*unnamed* nil)) - ("document" (:*unnamed* ("pair" "table" "table_array_element"))) - ("dotted_key" (:*unnamed* ("bare_key" "dotted_key" "quoted_key"))) + ("document" (:*unnamed* ("pair" "table_array_element" "table"))) + ("dotted_key" (:*unnamed* ("bare_key" "quoted_key" "dotted_key"))) ("escape_sequence" (:*unnamed* nil)) ("float" (:*unnamed* nil)) ("inline_table" (:*unnamed* ("pair"))) @@ -2119,19 +1841,19 @@ ("local_date_time" (:*unnamed* nil)) ("local_time" (:*unnamed* nil)) ("offset_date_time" (:*unnamed* nil)) - ("pair" (:*unnamed* ("bare_key" "boolean" "string" "quoted_key" "dotted_key" "integer" "offset_date_time" "float" "array" "inline_table" "local_date" "local_time" "local_date_time"))) + ("pair" (:*unnamed* ("integer" "string" "local_date" "local_date_time" "local_time" "offset_date_time" "array" "bare_key" "float" "boolean" "quoted_key" "inline_table" "dotted_key"))) ("quoted_key" (:*unnamed* ("escape_sequence"))) ("string" (:*unnamed* ("escape_sequence"))) - ("table" (:*unnamed* ("bare_key" "dotted_key" "quoted_key" "pair"))) - ("table_array_element" (:*unnamed* ("bare_key" "dotted_key" "quoted_key" "pair"))) + ("table" (:*unnamed* ("bare_key" "quoted_key" "dotted_key" "pair"))) + ("table_array_element" (:*unnamed* ("bare_key" "quoted_key" "dotted_key" "pair"))) )) ;; END Production rules for toml ;; START Inverse production rules for toml (defconst combobulate-rules-toml-inverse '(("array" ("pair" "array")) - ("bare_key" ("pair" "dotted_key" "table" "table_array_element")) + ("bare_key" ("pair" "dotted_key" "table_array_element" "table")) ("boolean" ("pair" "array")) - ("dotted_key" ("pair" "dotted_key" "table" "table_array_element")) + ("dotted_key" ("pair" "dotted_key" "table_array_element" "table")) ("escape_sequence" ("string" "quoted_key")) ("float" ("pair" "array")) ("inline_table" ("pair" "array")) @@ -2140,8 +1862,8 @@ ("local_date_time" ("pair" "array")) ("local_time" ("pair" "array")) ("offset_date_time" ("pair" "array")) - ("pair" ("inline_table" "document" "table" "table_array_element")) - ("quoted_key" ("pair" "dotted_key" "table" "table_array_element")) + ("pair" ("table_array_element" "inline_table" "document" "table")) + ("quoted_key" ("pair" "dotted_key" "table_array_element" "table")) ("string" ("pair" "array")) ("table" ("document")) ("table_array_element" ("document")) @@ -2161,16 +1883,16 @@ ;; START Production rules for json (defconst combobulate-rules-json - '(("_value" (:*unnamed* ("null" "true" "number" "string" "array" "false" "object"))) - ("array" (:*unnamed* ("null" "true" "number" "string" "array" "false" "object"))) + '(("_value" (:*unnamed* ("string" "null" "object" "true" "number" "false" "array"))) + ("array" (:*unnamed* ("string" "null" "object" "true" "number" "false" "array"))) ("comment" (:*unnamed* nil)) - ("document" (:*unnamed* ("null" "true" "number" "string" "array" "false" "object"))) + ("document" (:*unnamed* ("string" "null" "object" "true" "number" "false" "array"))) ("escape_sequence" (:*unnamed* nil)) ("false" (:*unnamed* nil)) ("null" (:*unnamed* nil)) ("number" (:*unnamed* nil)) ("object" (:*unnamed* ("pair"))) - ("pair" (:*unnamed* nil :key ("string") :value ("null" "true" "number" "string" "array" "false" "object"))) + ("pair" (:*unnamed* nil :key ("string") :value ("string" "null" "object" "true" "number" "false" "array"))) ("string" (:*unnamed* ("string_content"))) ("string_content" (:*unnamed* ("escape_sequence"))) ("true" (:*unnamed* nil)) @@ -2178,16 +1900,16 @@ ;; END Production rules for json ;; START Inverse production rules for json (defconst combobulate-rules-json-inverse - '(("array" ("pair" "document" "_value" "array")) + '(("array" ("_value" "pair" "document" "array")) ("escape_sequence" ("string_content")) - ("false" ("pair" "document" "_value" "array")) - ("null" ("pair" "document" "_value" "array")) - ("number" ("pair" "document" "_value" "array")) - ("object" ("pair" "document" "_value" "array")) + ("false" ("_value" "pair" "document" "array")) + ("null" ("_value" "pair" "document" "array")) + ("number" ("_value" "pair" "document" "array")) + ("object" ("_value" "pair" "document" "array")) ("pair" ("object")) - ("string" ("pair" "document" "_value" "array")) + ("string" ("_value" "pair" "document" "array")) ("string_content" ("string")) - ("true" ("pair" "document" "_value" "array")) + ("true" ("_value" "pair" "document" "array")) ) ) ;; END Inverse production rules for json @@ -2202,18 +1924,945 @@ ) ;; END All supertypes in json +;; START Production rules for ocaml +(defconst combobulate-rules-ocaml + '(("_binding_pattern" (:*unnamed* ("tag_pattern" "local_open_pattern" "polymorphic_variant_pattern" "extension" "cons_pattern" "constructor_pattern" "quoted_extension" "tuple_pattern" "array_pattern" "package_pattern" "parenthesized_pattern" "list_pattern" "or_pattern" "value_name" "parenthesized_operator" "range_pattern" "lazy_pattern" "record_pattern" "alias_pattern" "constructor_path" "tag" "typed_pattern"))) + ("_class_expression" (:*unnamed* ("class_function" "let_open_class_expression" "let_class_expression" "class_application"))) + ("_class_field" (:*unnamed* ("quoted_item_extension" "class_initializer" "inheritance_definition" "instance_variable_definition" "type_parameter_constraint" "item_extension" "method_definition"))) + ("_class_field_specification" (:*unnamed* ("quoted_item_extension" "method_specification" "inheritance_specification" "type_parameter_constraint" "instance_variable_specification" "item_extension"))) + ("_class_type" (:*unnamed* ("class_function_type"))) + ("_constant" (:*unnamed* ("string" "boolean" "quoted_string" "character" "unit" "number"))) + ("_effect_pattern" (:*unnamed* ("lazy_pattern" "constructor_pattern" "tag_pattern"))) + ("_expression" (:*unnamed* ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression"))) + ("_infix_operator" (:*unnamed* ("pow_operator" "rel_operator" "concat_operator" "or_operator" "and_operator" "mult_operator" "add_operator" "assign_operator"))) + ("_module_expression" (:*unnamed* ("module_path" "structure" "module_application" "functor"))) + ("_module_type" (:*unnamed* ("module_type_constraint" "functor_type" "extension" "quoted_extension" "module_type_path" "signature" "module_type_of" "parenthesized_module_type"))) + ("_parameter" (:*unnamed* ("parameter" "abstract_type"))) + ("_pattern" (:*unnamed* ("lazy_pattern" "tag_pattern" "effect_pattern" "cons_pattern" "constructor_pattern" "exception_pattern" "tuple_pattern" "alias_pattern" "or_pattern" "range_pattern"))) + ("_polymorphic_type" (:*unnamed* ("polymorphic_type"))) + ("_sequence_expression" (:*unnamed* ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "sequence_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression"))) + ("_signature_item" (:*unnamed* ("module_type_definition" "quoted_item_extension" "class_definition" "module_definition" "open_module" "external" "floating_attribute" "type_definition" "value_specification" "class_type_definition" "include_module_type" "exception_definition" "item_extension"))) + ("_signed_constant" (:*unnamed* ("string" "boolean" "quoted_string" "character" "signed_number" "unit" "number"))) + ("_simple_class_expression" (:*unnamed* ("typed_class_expression" "instantiated_class" "class_path" "extension" "quoted_extension" "parenthesized_class_expression" "object_expression"))) + ("_simple_class_type" (:*unnamed* ("instantiated_class_type" "let_open_class_type" "class_body_type" "class_type_path" "quoted_extension" "extension"))) + ("_simple_expression" (:*unnamed* ("parenthesized_expression" "string" "quoted_string" "character" "hash_expression" "object_copy_expression" "bigarray_get_expression" "number" "extension" "method_invocation" "quoted_extension" "record_expression" "new_expression" "value_path" "array_get_expression" "list_expression" "package_expression" "ocamlyacc_value" "coercion_expression" "unit" "local_open_expression" "object_expression" "prefix_expression" "boolean" "array_expression" "string_get_expression" "field_get_expression" "constructor_path" "tag" "typed_expression"))) + ("_simple_module_expression" (:*unnamed* ("typed_module_expression" "extension" "quoted_extension" "parenthesized_module_expression" "packed_module"))) + ("_simple_pattern" (:*unnamed* ("string" "local_open_pattern" "quoted_string" "character" "polymorphic_variant_pattern" "extension" "number" "quoted_extension" "value_pattern" "array_pattern" "package_pattern" "parenthesized_pattern" "list_pattern" "parenthesized_operator" "record_pattern" "unit" "boolean" "signed_number" "constructor_path" "tag" "typed_pattern"))) + ("_simple_type" (:*unnamed* ("object_type" "type_constructor_path" "constructed_type" "extension" "package_type" "quoted_extension" "type_variable" "parenthesized_type" "polymorphic_variant_type" "hash_type" "local_open_type"))) + ("_structure_item" (:*unnamed* ("module_type_definition" "quoted_item_extension" "class_definition" "module_definition" "open_module" "external" "include_module" "floating_attribute" "type_definition" "value_definition" "class_type_definition" "exception_definition" "item_extension"))) + ("_tuple_type" (:*unnamed* ("object_type" "type_constructor_path" "constructed_type" "extension" "package_type" "quoted_extension" "tuple_type" "type_variable" "parenthesized_type" "polymorphic_variant_type" "hash_type" "local_open_type"))) + ("_type" (:*unnamed* ("function_type" "object_type" "type_constructor_path" "constructed_type" "extension" "package_type" "quoted_extension" "tuple_type" "type_variable" "parenthesized_type" "polymorphic_variant_type" "hash_type" "local_open_type" "aliased_type"))) + ("abstract_type" (:*unnamed* ("type_constructor"))) + ("add_operator" (:*unnamed* nil)) + ("alias_pattern" (:*unnamed* ("tag_pattern" "local_open_pattern" "polymorphic_variant_pattern" "extension" "cons_pattern" "constructor_pattern" "quoted_extension" "tuple_pattern" "array_pattern" "package_pattern" "parenthesized_pattern" "value_pattern" "list_pattern" "or_pattern" "value_name" "parenthesized_operator" "range_pattern" "lazy_pattern" "record_pattern" "effect_pattern" "exception_pattern" "alias_pattern" "constructor_path" "tag" "typed_pattern"))) + ("aliased_type" (:*unnamed* ("function_type" "object_type" "type_constructor_path" "constructed_type" "extension" "package_type" "quoted_extension" "tuple_type" "type_variable" "parenthesized_type" "polymorphic_variant_type" "hash_type" "local_open_type" "aliased_type"))) + ("and_operator" (:*unnamed* nil)) + ("application_expression" (:*unnamed* nil :argument ("parenthesized_expression" "string" "quoted_string" "character" "hash_expression" "object_copy_expression" "bigarray_get_expression" "number" "extension" "method_invocation" "quoted_extension" "record_expression" "new_expression" "value_path" "array_get_expression" "list_expression" "package_expression" "ocamlyacc_value" "coercion_expression" "unit" "local_open_expression" "object_expression" "prefix_expression" "labeled_argument" "boolean" "array_expression" "string_get_expression" "field_get_expression" "constructor_path" "tag" "typed_expression") :function ("parenthesized_expression" "string" "quoted_string" "character" "hash_expression" "object_copy_expression" "bigarray_get_expression" "number" "extension" "method_invocation" "quoted_extension" "record_expression" "new_expression" "value_path" "array_get_expression" "list_expression" "package_expression" "ocamlyacc_value" "coercion_expression" "unit" "local_open_expression" "object_expression" "prefix_expression" "boolean" "array_expression" "string_get_expression" "field_get_expression" "constructor_path" "tag" "typed_expression"))) + ("array_binding_pattern" (:*unnamed* ("tag_pattern" "local_open_pattern" "polymorphic_variant_pattern" "extension" "cons_pattern" "constructor_pattern" "quoted_extension" "tuple_pattern" "array_pattern" "package_pattern" "parenthesized_pattern" "list_pattern" "or_pattern" "value_name" "parenthesized_operator" "range_pattern" "lazy_pattern" "record_pattern" "alias_pattern" "constructor_path" "tag" "typed_pattern"))) + ("array_expression" (:*unnamed* ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression"))) + ("array_get_expression" (:*unnamed* ("sign_expression" "string" "cons_expression" "hash_expression" "bigarray_get_expression" "product_expression" "lazy_expression" "extension" "record_expression" "let_exception_expression" "list_expression" "fun_expression" "function_expression" "sequence_expression" "unit" "for_expression" "local_open_expression" "prefix_expression" "try_expression" "string_get_expression" "indexing_operator_path" "field_get_expression" "parenthesized_expression" "tag" "infix_expression" "let_module_expression" "quoted_string" "character" "object_copy_expression" "number" "application_expression" "method_invocation" "quoted_extension" "new_expression" "value_path" "array_get_expression" "if_expression" "package_expression" "while_expression" "let_open_expression" "ocamlyacc_value" "let_expression" "match_expression" "coercion_expression" "set_expression" "object_expression" "boolean" "array_expression" "constructor_path" "assert_expression" "typed_expression"))) + ("array_pattern" (:*unnamed* ("tag_pattern" "local_open_pattern" "polymorphic_variant_pattern" "extension" "cons_pattern" "constructor_pattern" "quoted_extension" "tuple_pattern" "array_pattern" "package_pattern" "parenthesized_pattern" "list_pattern" "or_pattern" "value_name" "parenthesized_operator" "range_pattern" "lazy_pattern" "record_pattern" "effect_pattern" "exception_pattern" "alias_pattern" "constructor_path" "tag" "typed_pattern"))) + ("assert_expression" (:*unnamed* ("parenthesized_expression" "string" "quoted_string" "character" "hash_expression" "object_copy_expression" "bigarray_get_expression" "number" "extension" "method_invocation" "quoted_extension" "record_expression" "new_expression" "value_path" "array_get_expression" "list_expression" "package_expression" "ocamlyacc_value" "coercion_expression" "unit" "local_open_expression" "object_expression" "prefix_expression" "attribute_id" "boolean" "array_expression" "string_get_expression" "field_get_expression" "constructor_path" "tag" "typed_expression"))) + ("assign_operator" (:*unnamed* nil)) + ("attribute" (:*unnamed* ("attribute_id" "attribute_payload"))) + ("attribute_id" (:*unnamed* nil)) + ("attribute_payload" (:*unnamed* ("tag_pattern" "open_module" "package_type" "extension" "tuple_pattern" "parenthesized_type" "exception_definition" "lazy_pattern" "quoted_item_extension" "function_type" "module_definition" "toplevel_directive" "effect_pattern" "include_module" "type_variable" "polymorphic_variant_type" "type_definition" "value_specification" "hash_type" "value_definition" "class_type_definition" "include_module_type" "aliased_type" "class_definition" "object_type" "constructed_type" "cons_pattern" "constructor_pattern" "external" "quoted_extension" "guard" "or_pattern" "range_pattern" "local_open_type" "type_constructor_path" "tuple_type" "exception_pattern" "floating_attribute" "expression_item" "alias_pattern" "module_type_definition" "item_extension"))) + ("bigarray_get_expression" (:*unnamed* ("sign_expression" "string" "cons_expression" "hash_expression" "bigarray_get_expression" "product_expression" "lazy_expression" "extension" "record_expression" "let_exception_expression" "list_expression" "fun_expression" "function_expression" "sequence_expression" "unit" "for_expression" "local_open_expression" "prefix_expression" "try_expression" "string_get_expression" "indexing_operator_path" "field_get_expression" "parenthesized_expression" "tag" "infix_expression" "let_module_expression" "quoted_string" "character" "object_copy_expression" "number" "application_expression" "method_invocation" "quoted_extension" "new_expression" "value_path" "array_get_expression" "if_expression" "package_expression" "while_expression" "let_open_expression" "ocamlyacc_value" "let_expression" "match_expression" "coercion_expression" "set_expression" "object_expression" "boolean" "array_expression" "constructor_path" "assert_expression" "typed_expression"))) + ("boolean" (:*unnamed* nil)) + ("character" (:*unnamed* ("character_content"))) + ("character_content" (:*unnamed* ("escape_sequence"))) + ("class_application" (:*unnamed* nil :argument ("parenthesized_expression" "string" "quoted_string" "character" "hash_expression" "object_copy_expression" "bigarray_get_expression" "number" "extension" "method_invocation" "quoted_extension" "record_expression" "new_expression" "value_path" "array_get_expression" "list_expression" "package_expression" "ocamlyacc_value" "coercion_expression" "unit" "local_open_expression" "object_expression" "prefix_expression" "labeled_argument" "boolean" "array_expression" "string_get_expression" "field_get_expression" "constructor_path" "tag" "typed_expression") :class ("typed_class_expression" "instantiated_class" "class_path" "extension" "quoted_extension" "parenthesized_class_expression" "object_expression"))) + ("class_binding" (:*unnamed* ("abstract_type" "item_attribute" "parameter" "class_function_type" "type_variable") :body ("class_function" "let_open_class_expression" "let_class_expression" "class_application") :name ("class_name"))) + ("class_body_type" (:*unnamed* ("method_specification" "object_type" "constructed_type" "extension" "type_parameter_constraint" "package_type" "quoted_extension" "parenthesized_type" "instance_variable_specification" "local_open_type" "quoted_item_extension" "function_type" "type_constructor_path" "inheritance_specification" "tuple_type" "floating_attribute" "polymorphic_variant_type" "hash_type" "type_variable" "item_extension" "aliased_type"))) + ("class_definition" (:*unnamed* ("attribute_id" "class_binding"))) + ("class_function" (:*unnamed* ("parameter" "abstract_type") :body ("class_function" "let_open_class_expression" "let_class_expression" "class_application"))) + ("class_function_type" (:*unnamed* ("label_name" "object_type" "type_constructor_path" "constructed_type" "extension" "package_type" "class_function_type" "quoted_extension" "tuple_type" "local_open_type" "parenthesized_type" "polymorphic_variant_type" "hash_type" "type_variable"))) + ("class_initializer" (:*unnamed* ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "sequence_expression" "set_expression" "for_expression" "item_attribute" "try_expression" "infix_expression" "assert_expression" "let_module_expression"))) + ("class_name" (:*unnamed* nil)) + ("class_path" (:*unnamed* ("module_path" "class_name"))) + ("class_type_binding" (:*unnamed* ("item_attribute" "type_variable") :body ("instantiated_class_type" "let_open_class_type" "class_body_type" "class_type_path" "quoted_extension" "extension") :name ("class_type_name"))) + ("class_type_definition" (:*unnamed* ("attribute_id" "class_type_binding"))) + ("class_type_name" (:*unnamed* nil)) + ("class_type_path" (:*unnamed* ("extended_module_path" "class_type_name"))) + ("coercion_expression" (:*unnamed* ("sign_expression" "cons_expression" "package_type" "extension" "product_expression" "lazy_expression" "parenthesized_type" "let_exception_expression" "fun_expression" "function_expression" "function_type" "sequence_expression" "for_expression" "polymorphic_variant_type" "try_expression" "hash_type" "infix_expression" "aliased_type" "let_module_expression" "object_type" "constructed_type" "quoted_extension" "application_expression" "local_open_type" "if_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "type_constructor_path" "tuple_type" "set_expression" "type_variable" "assert_expression"))) + ("comment" (:*unnamed* nil)) + ("compilation_unit" (:*unnamed* ("class_definition" "open_module" "external" "exception_definition" "quoted_item_extension" "toplevel_directive" "shebang" "module_definition" "include_module" "floating_attribute" "expression_item" "type_definition" "value_definition" "class_type_definition" "module_type_definition" "item_extension"))) + ("concat_operator" (:*unnamed* nil)) + ("cons_expression" (:*unnamed* nil :left ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression") :right ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression"))) + ("cons_pattern" (:*unnamed* ("tag_pattern" "local_open_pattern" "polymorphic_variant_pattern" "extension" "cons_pattern" "constructor_pattern" "quoted_extension" "tuple_pattern" "array_pattern" "package_pattern" "parenthesized_pattern" "list_pattern" "or_pattern" "value_name" "parenthesized_operator" "range_pattern" "lazy_pattern" "record_pattern" "effect_pattern" "exception_pattern" "alias_pattern" "constructor_path" "tag" "typed_pattern"))) + ("constrain_module" (:*unnamed* ("module_path" "extended_module_path"))) + ("constrain_module_type" (:*unnamed* ("module_type_constraint" "functor_type" "extension" "quoted_extension" "module_type_path" "signature" "module_type_of" "parenthesized_module_type"))) + ("constrain_type" (:*unnamed* ("function_type" "object_type" "type_constructor_path" "constructed_type" "extension" "package_type" "quoted_extension" "tuple_type" "type_variable" "parenthesized_type" "polymorphic_variant_type" "hash_type" "type_constraint" "local_open_type" "aliased_type"))) + ("constructed_type" (:*unnamed* ("function_type" "object_type" "type_constructor_path" "constructed_type" "extension" "package_type" "quoted_extension" "tuple_type" "type_variable" "parenthesized_type" "polymorphic_variant_type" "hash_type" "local_open_type" "aliased_type"))) + ("constructor_declaration" (:*unnamed* ("object_type" "type_constructor_path" "constructed_type" "extension" "package_type" "quoted_extension" "constructor_name" "record_declaration" "type_variable" "parenthesized_type" "polymorphic_variant_type" "hash_type" "constructor_path" "local_open_type"))) + ("constructor_name" (:*unnamed* nil)) + ("constructor_path" (:*unnamed* ("module_path" "constructor_name"))) + ("constructor_pattern" (:*unnamed* ("lazy_pattern" "tag_pattern" "effect_pattern" "cons_pattern" "constructor_pattern" "exception_pattern" "tuple_pattern" "abstract_type" "alias_pattern" "or_pattern" "constructor_path" "range_pattern") :pattern ("tag_pattern" "local_open_pattern" "polymorphic_variant_pattern" "extension" "cons_pattern" "constructor_pattern" "quoted_extension" "tuple_pattern" "array_pattern" "package_pattern" "parenthesized_pattern" "list_pattern" "or_pattern" "value_name" "parenthesized_operator" "range_pattern" "lazy_pattern" "record_pattern" "alias_pattern" "constructor_path" "tag" "typed_pattern"))) + ("conversion_specification" (:*unnamed* nil)) + ("directive" (:*unnamed* nil)) + ("do_clause" (:*unnamed* ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "sequence_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression"))) + ("effect_pattern" (:*unnamed* nil :continuation ("string" "local_open_pattern" "quoted_string" "character" "polymorphic_variant_pattern" "extension" "number" "quoted_extension" "value_pattern" "array_pattern" "package_pattern" "parenthesized_pattern" "list_pattern" "parenthesized_operator" "record_pattern" "unit" "boolean" "signed_number" "constructor_path" "tag" "typed_pattern") :effect ("lazy_pattern" "constructor_pattern" "tag_pattern"))) + ("else_clause" (:*unnamed* ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression"))) + ("escape_sequence" (:*unnamed* nil)) + ("exception_definition" (:*unnamed* ("attribute_id" "item_attribute" "constructor_declaration"))) + ("exception_pattern" (:*unnamed* ("lazy_pattern" "tag_pattern" "effect_pattern" "cons_pattern" "constructor_pattern" "exception_pattern" "tuple_pattern" "attribute_id" "alias_pattern" "or_pattern" "range_pattern"))) + ("expression_item" (:*unnamed* ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "sequence_expression" "set_expression" "for_expression" "item_attribute" "try_expression" "infix_expression" "assert_expression" "let_module_expression"))) + ("extended_module_path" (:*unnamed* ("module_name" "extended_module_path"))) + ("extension" (:*unnamed* ("attribute_id" "attribute_payload"))) + ("external" (:*unnamed* ("string" "attribute_id" "item_attribute" "parenthesized_operator" "value_name" "polymorphic_type"))) + ("field_declaration" (:*unnamed* ("field_name" "polymorphic_type"))) + ("field_expression" (:*unnamed* ("function_type" "object_type" "type_constructor_path" "constructed_type" "extension" "package_type" "quoted_extension" "tuple_type" "type_variable" "parenthesized_type" "polymorphic_variant_type" "hash_type" "local_open_type" "aliased_type") :body ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression") :name ("field_path"))) + ("field_get_expression" (:*unnamed* ("parenthesized_expression" "string" "quoted_string" "character" "hash_expression" "object_copy_expression" "bigarray_get_expression" "number" "extension" "method_invocation" "quoted_extension" "record_expression" "new_expression" "value_path" "array_get_expression" "list_expression" "package_expression" "ocamlyacc_value" "coercion_expression" "unit" "local_open_expression" "object_expression" "prefix_expression" "boolean" "array_expression" "string_get_expression" "field_get_expression" "constructor_path" "tag" "field_path" "typed_expression"))) + ("field_name" (:*unnamed* nil)) + ("field_path" (:*unnamed* ("field_name" "module_path"))) + ("field_pattern" (:*unnamed* ("tag_pattern" "object_type" "constructed_type" "cons_pattern" "constructor_pattern" "extension" "package_type" "quoted_extension" "tuple_pattern" "parenthesized_type" "or_pattern" "range_pattern" "local_open_type" "lazy_pattern" "function_type" "type_constructor_path" "effect_pattern" "tuple_type" "exception_pattern" "polymorphic_variant_type" "hash_type" "alias_pattern" "type_variable" "field_path" "aliased_type") :pattern ("tag_pattern" "local_open_pattern" "polymorphic_variant_pattern" "extension" "cons_pattern" "constructor_pattern" "quoted_extension" "tuple_pattern" "array_pattern" "package_pattern" "parenthesized_pattern" "list_pattern" "or_pattern" "value_name" "parenthesized_operator" "range_pattern" "lazy_pattern" "record_pattern" "alias_pattern" "constructor_path" "tag" "typed_pattern"))) + ("floating_attribute" (:*unnamed* ("attribute_id" "attribute_payload"))) + ("for_expression" (:*unnamed* ("attribute_id" "do_clause") :from ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "sequence_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression") :name ("parenthesized_operator" "value_pattern") :to ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "sequence_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression"))) + ("fun_expression" (:*unnamed* ("object_type" "type_constructor_path" "constructed_type" "extension" "package_type" "quoted_extension" "local_open_type" "abstract_type" "parenthesized_type" "polymorphic_variant_type" "hash_type" "attribute_id" "parameter" "type_variable") :body ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "sequence_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression"))) + ("function_expression" (:*unnamed* ("attribute_id" "match_case"))) + ("function_type" (:*unnamed* ("function_type" "object_type" "type_constructor_path" "constructed_type" "extension" "package_type" "quoted_extension" "tuple_type" "type_variable" "parenthesized_type" "polymorphic_variant_type" "hash_type" "typed_label" "local_open_type" "aliased_type"))) + ("functor" (:*unnamed* ("module_parameter") :body ("module_path" "structure" "module_application" "functor"))) + ("functor_type" (:*unnamed* ("module_type_constraint" "module_parameter" "functor_type" "extension" "quoted_extension" "module_type_path" "signature" "module_type_of" "parenthesized_module_type"))) + ("guard" (:*unnamed* ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "sequence_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression"))) + ("hash_expression" (:*unnamed* nil :left ("parenthesized_expression" "string" "quoted_string" "character" "hash_expression" "object_copy_expression" "bigarray_get_expression" "number" "extension" "method_invocation" "quoted_extension" "record_expression" "new_expression" "value_path" "array_get_expression" "list_expression" "package_expression" "ocamlyacc_value" "coercion_expression" "unit" "local_open_expression" "object_expression" "prefix_expression" "boolean" "array_expression" "string_get_expression" "field_get_expression" "constructor_path" "tag" "typed_expression") :operator ("hash_operator") :right ("parenthesized_expression" "string" "quoted_string" "character" "hash_expression" "object_copy_expression" "bigarray_get_expression" "number" "extension" "method_invocation" "quoted_extension" "record_expression" "new_expression" "value_path" "array_get_expression" "list_expression" "package_expression" "ocamlyacc_value" "coercion_expression" "unit" "local_open_expression" "object_expression" "prefix_expression" "boolean" "array_expression" "string_get_expression" "field_get_expression" "constructor_path" "tag" "typed_expression"))) + ("hash_operator" (:*unnamed* nil)) + ("hash_type" (:*unnamed* ("function_type" "object_type" "type_constructor_path" "constructed_type" "extension" "package_type" "quoted_extension" "class_type_path" "tuple_type" "type_variable" "parenthesized_type" "polymorphic_variant_type" "hash_type" "local_open_type" "aliased_type"))) + ("if_expression" (:*unnamed* ("attribute_id" "else_clause" "then_clause") :condition ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "sequence_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression"))) + ("include_module" (:*unnamed* ("attribute_id" "item_attribute" "structure" "functor" "module_path" "module_application"))) + ("include_module_type" (:*unnamed* ("module_type_constraint" "functor_type" "extension" "quoted_extension" "module_type_path" "signature" "attribute_id" "item_attribute" "module_type_of" "parenthesized_module_type"))) + ("indexing_operator" (:*unnamed* nil)) + ("indexing_operator_path" (:*unnamed* ("module_path" "indexing_operator"))) + ("infix_expression" (:*unnamed* nil :left ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression") :operator ("pow_operator" "rel_operator" "concat_operator" "or_operator" "and_operator" "mult_operator" "add_operator" "assign_operator") :right ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression"))) + ("inheritance_definition" (:*unnamed* ("class_function" "item_attribute" "class_application" "let_open_class_expression" "parenthesized_operator" "let_class_expression" "value_pattern"))) + ("inheritance_specification" (:*unnamed* ("instantiated_class_type" "let_open_class_type" "class_body_type" "item_attribute" "class_type_path" "quoted_extension" "extension"))) + ("instance_variable_definition" (:*unnamed* ("function_type" "object_type" "type_constructor_path" "constructed_type" "extension" "package_type" "quoted_extension" "tuple_type" "type_variable" "parenthesized_type" "polymorphic_variant_type" "hash_type" "item_attribute" "local_open_type" "aliased_type") :body ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "sequence_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression") :name ("instance_variable_name"))) + ("instance_variable_expression" (:*unnamed* ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "instance_variable_name" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression"))) + ("instance_variable_name" (:*unnamed* nil)) + ("instance_variable_specification" (:*unnamed* ("object_type" "constructed_type" "extension" "package_type" "quoted_extension" "parenthesized_type" "local_open_type" "instance_variable_name" "function_type" "type_constructor_path" "tuple_type" "polymorphic_variant_type" "item_attribute" "hash_type" "type_variable" "aliased_type"))) + ("instantiated_class" (:*unnamed* ("function_type" "class_path" "object_type" "type_constructor_path" "constructed_type" "extension" "package_type" "quoted_extension" "tuple_type" "type_variable" "parenthesized_type" "polymorphic_variant_type" "hash_type" "local_open_type" "aliased_type"))) + ("instantiated_class_type" (:*unnamed* ("function_type" "object_type" "type_constructor_path" "constructed_type" "extension" "package_type" "quoted_extension" "tuple_type" "class_type_path" "type_variable" "parenthesized_type" "polymorphic_variant_type" "hash_type" "local_open_type" "aliased_type"))) + ("item_attribute" (:*unnamed* ("attribute_id" "attribute_payload"))) + ("item_extension" (:*unnamed* ("attribute_id" "item_attribute" "attribute_payload"))) + ("label_name" (:*unnamed* nil)) + ("labeled_argument" (:*unnamed* ("string" "hash_expression" "package_type" "bigarray_get_expression" "extension" "record_expression" "parenthesized_type" "list_expression" "function_type" "unit" "local_open_expression" "prefix_expression" "polymorphic_variant_type" "hash_type" "string_get_expression" "field_get_expression" "parenthesized_expression" "tag" "aliased_type" "label_name" "object_type" "quoted_string" "character" "object_copy_expression" "constructed_type" "number" "method_invocation" "quoted_extension" "new_expression" "value_path" "local_open_type" "array_get_expression" "package_expression" "ocamlyacc_value" "coercion_expression" "type_constructor_path" "tuple_type" "object_expression" "boolean" "array_expression" "constructor_path" "type_variable" "typed_expression"))) + ("lazy_expression" (:*unnamed* ("parenthesized_expression" "string" "quoted_string" "character" "hash_expression" "object_copy_expression" "bigarray_get_expression" "number" "extension" "method_invocation" "quoted_extension" "record_expression" "new_expression" "value_path" "array_get_expression" "list_expression" "package_expression" "ocamlyacc_value" "coercion_expression" "unit" "local_open_expression" "object_expression" "prefix_expression" "attribute_id" "boolean" "array_expression" "string_get_expression" "field_get_expression" "constructor_path" "tag" "typed_expression"))) + ("lazy_pattern" (:*unnamed* ("tag_pattern" "local_open_pattern" "polymorphic_variant_pattern" "extension" "cons_pattern" "constructor_pattern" "quoted_extension" "tuple_pattern" "array_pattern" "package_pattern" "parenthesized_pattern" "list_pattern" "or_pattern" "value_name" "parenthesized_operator" "range_pattern" "lazy_pattern" "record_pattern" "effect_pattern" "exception_pattern" "attribute_id" "alias_pattern" "constructor_path" "tag" "typed_pattern"))) + ("let_and_operator" (:*unnamed* nil)) + ("let_binding" (:*unnamed* ("parameter" "abstract_type" "item_attribute" "polymorphic_type") :body ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "sequence_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression") :pattern ("tag_pattern" "local_open_pattern" "polymorphic_variant_pattern" "extension" "cons_pattern" "constructor_pattern" "quoted_extension" "tuple_pattern" "array_pattern" "package_pattern" "parenthesized_pattern" "list_pattern" "or_pattern" "value_name" "parenthesized_operator" "range_pattern" "lazy_pattern" "record_pattern" "alias_pattern" "constructor_path" "tag" "typed_pattern"))) + ("let_class_expression" (:*unnamed* ("value_definition") :body ("class_function" "let_open_class_expression" "let_class_expression" "class_application"))) + ("let_exception_expression" (:*unnamed* ("exception_definition") :body ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "sequence_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression"))) + ("let_expression" (:*unnamed* ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "sequence_expression" "set_expression" "for_expression" "try_expression" "value_definition" "infix_expression" "assert_expression" "let_module_expression"))) + ("let_module_expression" (:*unnamed* ("module_definition") :body ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "sequence_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression"))) + ("let_open_class_expression" (:*unnamed* ("open_module") :body ("class_function" "let_open_class_expression" "let_class_expression" "class_application"))) + ("let_open_class_type" (:*unnamed* ("open_module") :body ("instantiated_class_type" "let_open_class_type" "class_body_type" "class_type_path" "quoted_extension" "extension"))) + ("let_open_expression" (:*unnamed* ("open_module") :body ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "sequence_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression"))) + ("let_operator" (:*unnamed* nil)) + ("line_number_directive" (:*unnamed* nil)) + ("list_binding_pattern" (:*unnamed* ("tag_pattern" "local_open_pattern" "polymorphic_variant_pattern" "extension" "cons_pattern" "constructor_pattern" "quoted_extension" "tuple_pattern" "array_pattern" "package_pattern" "parenthesized_pattern" "list_pattern" "or_pattern" "value_name" "parenthesized_operator" "range_pattern" "lazy_pattern" "record_pattern" "alias_pattern" "constructor_path" "tag" "typed_pattern"))) + ("list_expression" (:*unnamed* ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression"))) + ("list_pattern" (:*unnamed* ("tag_pattern" "local_open_pattern" "polymorphic_variant_pattern" "extension" "cons_pattern" "constructor_pattern" "quoted_extension" "tuple_pattern" "array_pattern" "package_pattern" "parenthesized_pattern" "list_pattern" "or_pattern" "value_name" "parenthesized_operator" "range_pattern" "lazy_pattern" "record_pattern" "effect_pattern" "exception_pattern" "alias_pattern" "constructor_path" "tag" "typed_pattern"))) + ("local_open_expression" (:*unnamed* ("sign_expression" "cons_expression" "object_copy_expression" "product_expression" "lazy_expression" "application_expression" "record_expression" "module_path" "let_exception_expression" "if_expression" "list_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "package_expression" "let_expression" "match_expression" "sequence_expression" "set_expression" "for_expression" "try_expression" "array_expression" "infix_expression" "assert_expression" "let_module_expression"))) + ("local_open_pattern" (:*unnamed* ("tag_pattern" "local_open_pattern" "polymorphic_variant_pattern" "extension" "cons_pattern" "constructor_pattern" "quoted_extension" "tuple_pattern" "array_pattern" "package_pattern" "parenthesized_pattern" "list_pattern" "or_pattern" "module_path" "value_name" "parenthesized_operator" "range_pattern" "lazy_pattern" "record_pattern" "list_binding_pattern" "effect_pattern" "exception_pattern" "record_binding_pattern" "alias_pattern" "constructor_path" "tag" "array_binding_pattern" "typed_pattern"))) + ("local_open_type" (:*unnamed* ("function_type" "object_type" "type_constructor_path" "constructed_type" "extension" "package_type" "quoted_extension" "tuple_type" "type_variable" "parenthesized_type" "polymorphic_variant_type" "hash_type" "extended_module_path" "local_open_type" "aliased_type"))) + ("match_case" (:*unnamed* ("guard") :body ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "refutation_case" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "sequence_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression") :pattern ("lazy_pattern" "tag_pattern" "effect_pattern" "cons_pattern" "constructor_pattern" "exception_pattern" "tuple_pattern" "alias_pattern" "or_pattern" "range_pattern"))) + ("match_expression" (:*unnamed* ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "match_operator" "let_expression" "match_expression" "sequence_expression" "set_expression" "for_expression" "attribute_id" "try_expression" "match_case" "infix_expression" "assert_expression" "let_module_expression"))) + ("match_operator" (:*unnamed* nil)) + ("method_definition" (:*unnamed* ("parameter" "abstract_type" "item_attribute" "polymorphic_type") :body ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "sequence_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression") :name ("method_name"))) + ("method_invocation" (:*unnamed* ("parenthesized_expression" "string" "quoted_string" "character" "hash_expression" "object_copy_expression" "bigarray_get_expression" "number" "extension" "method_invocation" "quoted_extension" "record_expression" "new_expression" "value_path" "array_get_expression" "list_expression" "package_expression" "ocamlyacc_value" "coercion_expression" "unit" "method_name" "local_open_expression" "object_expression" "prefix_expression" "boolean" "array_expression" "string_get_expression" "field_get_expression" "constructor_path" "tag" "typed_expression"))) + ("method_name" (:*unnamed* nil)) + ("method_specification" (:*unnamed* ("method_name" "item_attribute" "polymorphic_type"))) + ("method_type" (:*unnamed* ("method_name" "polymorphic_type"))) + ("module_application" (:*unnamed* nil :argument ("typed_module_expression" "extension" "quoted_extension" "parenthesized_module_expression" "packed_module") :functor ("module_path" "structure" "module_application" "functor"))) + ("module_binding" (:*unnamed* ("module_type_constraint" "module_parameter" "functor_type" "extension" "quoted_extension" "module_type_path" "signature" "item_attribute" "module_type_of" "parenthesized_module_type") :body ("module_path" "structure" "module_application" "functor") :name ("module_name"))) + ("module_definition" (:*unnamed* ("module_binding" "attribute_id"))) + ("module_name" (:*unnamed* nil)) + ("module_parameter" (:*unnamed* ("module_type_constraint" "functor_type" "extension" "quoted_extension" "module_type_path" "signature" "module_type_of" "parenthesized_module_type") :name ("module_name"))) + ("module_path" (:*unnamed* ("module_path" "module_name"))) + ("module_type_constraint" (:*unnamed* ("module_type_constraint" "constrain_type" "functor_type" "extension" "quoted_extension" "module_type_path" "signature" "constrain_module" "constrain_module_type" "module_type_of" "parenthesized_module_type"))) + ("module_type_definition" (:*unnamed* ("attribute_id" "item_attribute") :body ("module_type_constraint" "functor_type" "extension" "quoted_extension" "module_type_path" "signature" "module_type_of" "parenthesized_module_type") :name ("module_type_name"))) + ("module_type_name" (:*unnamed* nil)) + ("module_type_of" (:*unnamed* ("module_path" "structure" "module_application" "functor"))) + ("module_type_path" (:*unnamed* ("extended_module_path" "module_type_name"))) + ("mult_operator" (:*unnamed* nil)) + ("new_expression" (:*unnamed* ("attribute_id" "class_path"))) + ("number" (:*unnamed* nil)) + ("object_copy_expression" (:*unnamed* ("instance_variable_expression"))) + ("object_expression" (:*unnamed* ("tag_pattern" "package_type" "extension" "tuple_pattern" "parenthesized_type" "quoted_item_extension" "lazy_pattern" "function_type" "inheritance_definition" "effect_pattern" "method_definition" "polymorphic_variant_type" "hash_type" "aliased_type" "class_initializer" "object_type" "constructed_type" "cons_pattern" "type_parameter_constraint" "constructor_pattern" "quoted_extension" "or_pattern" "instance_variable_definition" "range_pattern" "local_open_type" "type_constructor_path" "tuple_type" "exception_pattern" "floating_attribute" "attribute_id" "alias_pattern" "type_variable" "item_extension"))) + ("object_type" (:*unnamed* ("object_type" "type_constructor_path" "constructed_type" "extension" "package_type" "quoted_extension" "type_variable" "parenthesized_type" "polymorphic_variant_type" "hash_type" "method_type" "local_open_type"))) + ("ocamlyacc_value" (:*unnamed* nil)) + ("open_module" (:*unnamed* ("attribute_id" "item_attribute" "structure" "functor" "module_path" "module_application"))) + ("or_operator" (:*unnamed* nil)) + ("or_pattern" (:*unnamed* ("tag_pattern" "local_open_pattern" "polymorphic_variant_pattern" "extension" "cons_pattern" "constructor_pattern" "quoted_extension" "tuple_pattern" "array_pattern" "package_pattern" "parenthesized_pattern" "list_pattern" "or_pattern" "value_name" "parenthesized_operator" "range_pattern" "lazy_pattern" "record_pattern" "effect_pattern" "exception_pattern" "alias_pattern" "constructor_path" "tag" "typed_pattern"))) + ("package_expression" (:*unnamed* ("module_type_constraint" "parenthesized_module_type" "functor_type" "extension" "quoted_extension" "module_type_path" "module_application" "signature" "attribute_id" "module_type_of" "functor" "structure" "module_path"))) + ("package_pattern" (:*unnamed* ("module_type_constraint" "functor_type" "extension" "quoted_extension" "module_name" "module_type_path" "signature" "attribute_id" "module_type_of" "parenthesized_module_type"))) + ("package_type" (:*unnamed* ("module_type_constraint" "functor_type" "extension" "quoted_extension" "module_type_path" "signature" "attribute_id" "module_type_of" "parenthesized_module_type"))) + ("packed_module" (:*unnamed* ("sign_expression" "module_type_constraint" "cons_expression" "functor_type" "extension" "product_expression" "lazy_expression" "application_expression" "quoted_extension" "module_type_of" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "set_expression" "for_expression" "module_type_path" "signature" "try_expression" "parenthesized_module_type" "infix_expression" "assert_expression" "let_module_expression"))) + ("parameter" (:*unnamed* ("sign_expression" "cons_expression" "package_type" "extension" "product_expression" "lazy_expression" "parenthesized_type" "let_exception_expression" "fun_expression" "function_expression" "function_type" "sequence_expression" "for_expression" "polymorphic_variant_type" "try_expression" "hash_type" "infix_expression" "aliased_type" "let_module_expression" "label_name" "object_type" "constructed_type" "quoted_extension" "application_expression" "local_open_type" "if_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "type_constructor_path" "tuple_type" "set_expression" "type_variable" "assert_expression") :pattern ("tag_pattern" "string" "local_open_pattern" "quoted_string" "character" "polymorphic_variant_pattern" "cons_pattern" "constructor_pattern" "extension" "number" "quoted_extension" "tuple_pattern" "value_pattern" "array_pattern" "package_pattern" "parenthesized_pattern" "list_pattern" "or_pattern" "range_pattern" "parenthesized_operator" "lazy_pattern" "signed_number" "record_pattern" "effect_pattern" "unit" "exception_pattern" "boolean" "alias_pattern" "constructor_path" "tag" "typed_pattern"))) + ("parenthesized_class_expression" (:*unnamed* ("class_function" "let_open_class_expression" "let_class_expression" "class_application"))) + ("parenthesized_expression" (:*unnamed* ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "sequence_expression" "set_expression" "for_expression" "attribute_id" "try_expression" "infix_expression" "assert_expression" "let_module_expression"))) + ("parenthesized_module_expression" (:*unnamed* ("module_path" "structure" "module_application" "functor"))) + ("parenthesized_module_type" (:*unnamed* ("module_type_constraint" "functor_type" "extension" "quoted_extension" "module_type_path" "signature" "module_type_of" "parenthesized_module_type"))) + ("parenthesized_operator" (:*unnamed* ("hash_operator" "match_operator" "pow_operator" "let_operator" "rel_operator" "prefix_operator" "concat_operator" "or_operator" "and_operator" "mult_operator" "add_operator" "indexing_operator" "let_and_operator" "assign_operator"))) + ("parenthesized_pattern" (:*unnamed* ("tag_pattern" "local_open_pattern" "polymorphic_variant_pattern" "extension" "cons_pattern" "constructor_pattern" "quoted_extension" "tuple_pattern" "array_pattern" "package_pattern" "parenthesized_pattern" "list_pattern" "or_pattern" "value_name" "parenthesized_operator" "range_pattern" "lazy_pattern" "record_pattern" "effect_pattern" "exception_pattern" "alias_pattern" "constructor_path" "tag" "typed_pattern"))) + ("parenthesized_type" (:*unnamed* ("function_type" "object_type" "type_constructor_path" "constructed_type" "extension" "package_type" "quoted_extension" "tuple_type" "type_variable" "parenthesized_type" "polymorphic_variant_type" "hash_type" "local_open_type" "aliased_type"))) + ("polymorphic_type" (:*unnamed* ("function_type" "object_type" "type_constructor_path" "constructed_type" "extension" "package_type" "quoted_extension" "tuple_type" "type_variable" "parenthesized_type" "polymorphic_variant_type" "hash_type" "abstract_type" "local_open_type" "aliased_type"))) + ("polymorphic_variant_pattern" (:*unnamed* ("type_constructor_path"))) + ("polymorphic_variant_type" (:*unnamed* ("object_type" "constructed_type" "extension" "package_type" "quoted_extension" "parenthesized_type" "local_open_type" "function_type" "tag_specification" "type_constructor_path" "tuple_type" "type_variable" "polymorphic_variant_type" "hash_type" "tag" "aliased_type"))) + ("pow_operator" (:*unnamed* nil)) + ("prefix_expression" (:*unnamed* nil :operator ("prefix_operator") :right ("parenthesized_expression" "string" "quoted_string" "character" "hash_expression" "object_copy_expression" "bigarray_get_expression" "number" "extension" "method_invocation" "quoted_extension" "record_expression" "new_expression" "value_path" "array_get_expression" "list_expression" "package_expression" "ocamlyacc_value" "coercion_expression" "unit" "local_open_expression" "object_expression" "prefix_expression" "boolean" "array_expression" "string_get_expression" "field_get_expression" "constructor_path" "tag" "typed_expression"))) + ("prefix_operator" (:*unnamed* nil)) + ("pretty_printing_indication" (:*unnamed* nil)) + ("product_expression" (:*unnamed* nil :left ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression") :right ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression"))) + ("quoted_extension" (:*unnamed* ("attribute_id" "quoted_string_content"))) + ("quoted_item_extension" (:*unnamed* ("attribute_id" "item_attribute" "quoted_string_content"))) + ("quoted_string" (:*unnamed* ("quoted_string_content"))) + ("quoted_string_content" (:*unnamed* ("pretty_printing_indication" "conversion_specification"))) + ("range_pattern" (:*unnamed* ("string" "boolean" "quoted_string" "character" "signed_number" "unit" "number"))) + ("record_binding_pattern" (:*unnamed* ("field_pattern"))) + ("record_declaration" (:*unnamed* ("field_declaration"))) + ("record_expression" (:*unnamed* ("parenthesized_expression" "string" "quoted_string" "character" "hash_expression" "object_copy_expression" "bigarray_get_expression" "number" "extension" "method_invocation" "quoted_extension" "record_expression" "new_expression" "value_path" "array_get_expression" "list_expression" "package_expression" "ocamlyacc_value" "coercion_expression" "unit" "local_open_expression" "object_expression" "prefix_expression" "field_expression" "boolean" "array_expression" "string_get_expression" "field_get_expression" "constructor_path" "tag" "typed_expression"))) + ("record_pattern" (:*unnamed* ("field_pattern"))) + ("refutation_case" (:*unnamed* nil)) + ("rel_operator" (:*unnamed* nil)) + ("sequence_expression" (:*unnamed* ("attribute_id") :left ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression") :right ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "sequence_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression"))) + ("set_expression" (:*unnamed* ("string_get_expression" "instance_variable_name" "bigarray_get_expression" "array_get_expression" "field_get_expression") :body ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression"))) + ("shebang" (:*unnamed* nil)) + ("sign_expression" (:*unnamed* nil :operator ("sign_operator") :right ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression"))) + ("sign_operator" (:*unnamed* nil)) + ("signature" (:*unnamed* ("module_type_definition" "quoted_item_extension" "class_definition" "module_definition" "open_module" "external" "floating_attribute" "type_definition" "value_specification" "class_type_definition" "include_module_type" "exception_definition" "item_extension"))) + ("signed_number" (:*unnamed* nil)) + ("string" (:*unnamed* ("string_content"))) + ("string_content" (:*unnamed* ("escape_sequence" "pretty_printing_indication" "conversion_specification"))) + ("string_get_expression" (:*unnamed* ("sign_expression" "string" "cons_expression" "hash_expression" "bigarray_get_expression" "product_expression" "lazy_expression" "extension" "record_expression" "let_exception_expression" "list_expression" "fun_expression" "function_expression" "sequence_expression" "unit" "for_expression" "local_open_expression" "prefix_expression" "try_expression" "string_get_expression" "indexing_operator_path" "field_get_expression" "parenthesized_expression" "tag" "infix_expression" "let_module_expression" "quoted_string" "character" "object_copy_expression" "number" "application_expression" "method_invocation" "quoted_extension" "new_expression" "value_path" "array_get_expression" "if_expression" "package_expression" "while_expression" "let_open_expression" "ocamlyacc_value" "let_expression" "match_expression" "coercion_expression" "set_expression" "object_expression" "boolean" "array_expression" "constructor_path" "assert_expression" "typed_expression"))) + ("structure" (:*unnamed* ("module_type_definition" "quoted_item_extension" "toplevel_directive" "class_definition" "module_definition" "open_module" "external" "include_module" "floating_attribute" "expression_item" "type_definition" "value_definition" "class_type_definition" "exception_definition" "item_extension"))) + ("tag" (:*unnamed* nil)) + ("tag_pattern" (:*unnamed* ("lazy_pattern" "tag_pattern" "effect_pattern" "cons_pattern" "constructor_pattern" "exception_pattern" "tuple_pattern" "alias_pattern" "or_pattern" "range_pattern" "tag") :pattern ("tag_pattern" "local_open_pattern" "polymorphic_variant_pattern" "extension" "cons_pattern" "constructor_pattern" "quoted_extension" "tuple_pattern" "array_pattern" "package_pattern" "parenthesized_pattern" "list_pattern" "or_pattern" "value_name" "parenthesized_operator" "range_pattern" "lazy_pattern" "record_pattern" "alias_pattern" "constructor_path" "tag" "typed_pattern"))) + ("tag_specification" (:*unnamed* ("function_type" "object_type" "tag" "type_constructor_path" "constructed_type" "extension" "package_type" "quoted_extension" "tuple_type" "type_variable" "parenthesized_type" "polymorphic_variant_type" "hash_type" "local_open_type" "aliased_type"))) + ("then_clause" (:*unnamed* ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression"))) + ("toplevel_directive" (:*unnamed* ("value_path" "string" "directive" "quoted_string" "character" "unit" "number" "boolean" "module_path"))) + ("try_expression" (:*unnamed* ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "sequence_expression" "set_expression" "for_expression" "attribute_id" "try_expression" "match_case" "infix_expression" "assert_expression" "let_module_expression"))) + ("tuple_pattern" (:*unnamed* ("tag_pattern" "local_open_pattern" "polymorphic_variant_pattern" "extension" "cons_pattern" "constructor_pattern" "quoted_extension" "tuple_pattern" "array_pattern" "package_pattern" "parenthesized_pattern" "list_pattern" "or_pattern" "value_name" "parenthesized_operator" "range_pattern" "lazy_pattern" "record_pattern" "effect_pattern" "exception_pattern" "alias_pattern" "constructor_path" "tag" "typed_pattern"))) + ("tuple_type" (:*unnamed* ("object_type" "type_constructor_path" "constructed_type" "extension" "package_type" "quoted_extension" "tuple_type" "type_variable" "parenthesized_type" "polymorphic_variant_type" "hash_type" "local_open_type"))) + ("type_binding" (:*unnamed* ("object_type" "constructed_type" "extension" "package_type" "quoted_extension" "parenthesized_type" "local_open_type" "function_type" "type_constructor_path" "tuple_type" "polymorphic_variant_type" "item_attribute" "hash_type" "type_constraint" "type_variable" "aliased_type") :body ("variant_declaration" "record_declaration") :name ("type_constructor" "type_constructor_path"))) + ("type_constraint" (:*unnamed* ("function_type" "object_type" "type_constructor_path" "constructed_type" "extension" "package_type" "quoted_extension" "tuple_type" "type_variable" "parenthesized_type" "polymorphic_variant_type" "hash_type" "local_open_type" "aliased_type"))) + ("type_constructor" (:*unnamed* nil)) + ("type_constructor_path" (:*unnamed* ("type_constructor" "extended_module_path"))) + ("type_definition" (:*unnamed* ("attribute_id" "type_binding"))) + ("type_parameter_constraint" (:*unnamed* ("function_type" "object_type" "type_constructor_path" "constructed_type" "extension" "package_type" "quoted_extension" "tuple_type" "type_variable" "parenthesized_type" "polymorphic_variant_type" "hash_type" "item_attribute" "local_open_type" "aliased_type"))) + ("type_variable" (:*unnamed* nil)) + ("typed_class_expression" (:*unnamed* ("let_open_class_expression" "class_application" "class_function" "class_function_type" "let_class_expression"))) + ("typed_expression" (:*unnamed* ("sign_expression" "cons_expression" "package_type" "extension" "product_expression" "lazy_expression" "parenthesized_type" "let_exception_expression" "fun_expression" "function_expression" "function_type" "sequence_expression" "for_expression" "polymorphic_variant_type" "try_expression" "hash_type" "infix_expression" "aliased_type" "let_module_expression" "object_type" "constructed_type" "quoted_extension" "application_expression" "local_open_type" "if_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "type_constructor_path" "tuple_type" "set_expression" "type_variable" "assert_expression"))) + ("typed_label" (:*unnamed* ("function_type" "label_name" "object_type" "type_constructor_path" "constructed_type" "extension" "package_type" "quoted_extension" "tuple_type" "type_variable" "parenthesized_type" "polymorphic_variant_type" "hash_type" "local_open_type" "aliased_type"))) + ("typed_module_expression" (:*unnamed* ("module_type_constraint" "parenthesized_module_type" "functor_type" "extension" "quoted_extension" "module_type_path" "module_application" "signature" "module_type_of" "functor" "structure" "module_path"))) + ("typed_pattern" (:*unnamed* ("tag_pattern" "object_type" "constructed_type" "cons_pattern" "constructor_pattern" "extension" "package_type" "quoted_extension" "tuple_pattern" "parenthesized_type" "or_pattern" "range_pattern" "local_open_type" "lazy_pattern" "function_type" "type_constructor_path" "effect_pattern" "tuple_type" "exception_pattern" "polymorphic_variant_type" "hash_type" "alias_pattern" "type_variable" "aliased_type") :pattern ("tag_pattern" "local_open_pattern" "polymorphic_variant_pattern" "extension" "cons_pattern" "constructor_pattern" "quoted_extension" "tuple_pattern" "array_pattern" "package_pattern" "parenthesized_pattern" "list_pattern" "or_pattern" "value_name" "parenthesized_operator" "range_pattern" "lazy_pattern" "record_pattern" "alias_pattern" "constructor_path" "tag" "typed_pattern"))) + ("unit" (:*unnamed* nil)) + ("value_definition" (:*unnamed* ("attribute_id" "let_operator" "let_and_operator" "let_binding"))) + ("value_name" (:*unnamed* nil)) + ("value_path" (:*unnamed* ("module_path" "value_name" "parenthesized_operator"))) + ("value_pattern" (:*unnamed* nil)) + ("value_specification" (:*unnamed* ("attribute_id" "item_attribute" "parenthesized_operator" "value_name" "polymorphic_type"))) + ("variant_declaration" (:*unnamed* ("constructor_declaration"))) + ("while_expression" (:*unnamed* ("attribute_id" "do_clause") :condition ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "sequence_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression"))) +)) +;; END Production rules for ocaml +;; START Inverse production rules for ocaml +(defconst combobulate-rules-ocaml-inverse + '(("abstract_type" ("fun_expression" "class_binding" "constructor_pattern" "polymorphic_type" "method_definition" "_parameter" "class_function" "let_binding")) + ("add_operator" ("infix_expression" "parenthesized_operator" "_infix_operator")) + ("alias_pattern" ("tag_pattern" "field_pattern" "attribute_payload" "tuple_pattern" "array_pattern" "list_pattern" "parameter" "lazy_pattern" "array_binding_pattern" "let_binding" "typed_pattern" "local_open_pattern" "cons_pattern" "constructor_pattern" "_pattern" "parenthesized_pattern" "or_pattern" "list_binding_pattern" "exception_pattern" "object_expression" "_binding_pattern" "alias_pattern" "match_case")) + ("aliased_type" ("field_pattern" "attribute_payload" "parenthesized_type" "parameter" "instance_variable_specification" "function_type" "constrain_type" "field_expression" "instantiated_class_type" "hash_type" "polymorphic_variant_type" "typed_label" "type_binding" "aliased_type" "labeled_argument" "typed_pattern" "constructed_type" "type_parameter_constraint" "polymorphic_type" "instance_variable_definition" "_type" "local_open_type" "tag_specification" "coercion_expression" "object_expression" "instantiated_class" "class_body_type" "type_constraint" "typed_expression")) + ("and_operator" ("infix_expression" "parenthesized_operator" "_infix_operator")) + ("application_expression" ("sign_expression" "cons_expression" "instance_variable_expression" "bigarray_get_expression" "product_expression" "else_clause" "then_clause" "parameter" "let_exception_expression" "list_expression" "fun_expression" "sequence_expression" "for_expression" "method_definition" "local_open_expression" "field_expression" "try_expression" "string_get_expression" "parenthesized_expression" "infix_expression" "let_binding" "let_module_expression" "class_initializer" "_sequence_expression" "packed_module" "guard" "do_clause" "instance_variable_definition" "array_get_expression" "if_expression" "while_expression" "let_open_expression" "coercion_expression" "let_expression" "match_expression" "set_expression" "expression_item" "array_expression" "_expression" "match_case" "typed_expression")) + ("array_binding_pattern" ("local_open_pattern")) + ("array_expression" ("hash_expression" "class_application" "bigarray_get_expression" "method_invocation" "application_expression" "lazy_expression" "record_expression" "local_open_expression" "prefix_expression" "string_get_expression" "field_get_expression" "_simple_expression" "array_get_expression" "assert_expression" "labeled_argument")) + ("array_get_expression" ("hash_expression" "class_application" "bigarray_get_expression" "method_invocation" "application_expression" "lazy_expression" "record_expression" "set_expression" "prefix_expression" "string_get_expression" "field_get_expression" "_simple_expression" "array_get_expression" "assert_expression" "labeled_argument")) + ("array_pattern" ("tag_pattern" "field_pattern" "tuple_pattern" "array_pattern" "list_pattern" "parameter" "lazy_pattern" "effect_pattern" "array_binding_pattern" "let_binding" "typed_pattern" "local_open_pattern" "cons_pattern" "constructor_pattern" "parenthesized_pattern" "or_pattern" "list_binding_pattern" "_binding_pattern" "alias_pattern" "_simple_pattern")) + ("assert_expression" ("sign_expression" "cons_expression" "instance_variable_expression" "bigarray_get_expression" "product_expression" "else_clause" "then_clause" "parameter" "let_exception_expression" "list_expression" "fun_expression" "sequence_expression" "for_expression" "method_definition" "local_open_expression" "field_expression" "try_expression" "string_get_expression" "parenthesized_expression" "infix_expression" "let_binding" "let_module_expression" "class_initializer" "_sequence_expression" "packed_module" "guard" "do_clause" "instance_variable_definition" "array_get_expression" "if_expression" "while_expression" "let_open_expression" "coercion_expression" "let_expression" "match_expression" "set_expression" "expression_item" "array_expression" "_expression" "match_case" "typed_expression")) + ("assign_operator" ("infix_expression" "parenthesized_operator" "_infix_operator")) + ("attribute_id" ("open_module" "package_type" "extension" "lazy_expression" "package_pattern" "exception_definition" "fun_expression" "function_expression" "lazy_pattern" "module_definition" "quoted_item_extension" "sequence_expression" "attribute" "for_expression" "include_module" "item_attribute" "try_expression" "type_definition" "value_specification" "value_definition" "class_type_definition" "include_module_type" "parenthesized_expression" "class_definition" "external" "quoted_extension" "new_expression" "if_expression" "package_expression" "while_expression" "match_expression" "exception_pattern" "object_expression" "floating_attribute" "module_type_definition" "item_extension" "assert_expression")) + ("attribute_payload" ("attribute" "extension" "floating_attribute" "item_attribute" "item_extension")) + ("bigarray_get_expression" ("hash_expression" "class_application" "bigarray_get_expression" "method_invocation" "application_expression" "lazy_expression" "record_expression" "set_expression" "prefix_expression" "string_get_expression" "field_get_expression" "_simple_expression" "array_get_expression" "assert_expression" "labeled_argument")) + ("boolean" ("hash_expression" "class_application" "_constant" "bigarray_get_expression" "lazy_expression" "record_expression" "parameter" "_simple_expression" "toplevel_directive" "effect_pattern" "prefix_expression" "_signed_constant" "string_get_expression" "field_get_expression" "labeled_argument" "method_invocation" "application_expression" "range_pattern" "array_get_expression" "_simple_pattern" "assert_expression")) + ("character" ("hash_expression" "class_application" "_constant" "bigarray_get_expression" "lazy_expression" "record_expression" "parameter" "_simple_expression" "toplevel_directive" "effect_pattern" "prefix_expression" "_signed_constant" "string_get_expression" "field_get_expression" "labeled_argument" "method_invocation" "application_expression" "range_pattern" "array_get_expression" "_simple_pattern" "assert_expression")) + ("character_content" ("character")) + ("class_application" ("typed_class_expression" "inheritance_definition" "let_open_class_expression" "class_binding" "let_class_expression" "_class_expression" "parenthesized_class_expression" "class_function")) + ("class_binding" ("class_definition")) + ("class_body_type" ("inheritance_specification" "class_type_binding" "let_open_class_type" "_simple_class_type")) + ("class_definition" ("attribute_payload" "_signature_item" "compilation_unit" "signature" "structure" "_structure_item")) + ("class_function" ("typed_class_expression" "inheritance_definition" "let_open_class_expression" "class_binding" "let_class_expression" "_class_expression" "parenthesized_class_expression" "class_function")) + ("class_function_type" ("typed_class_expression" "class_binding" "class_function_type" "_class_type")) + ("class_initializer" ("_class_field" "object_expression")) + ("class_name" ("class_binding" "class_path")) + ("class_path" ("_simple_class_expression" "instantiated_class" "new_expression" "class_application")) + ("class_type_binding" ("class_type_definition")) + ("class_type_definition" ("attribute_payload" "_signature_item" "compilation_unit" "signature" "structure" "_structure_item")) + ("class_type_name" ("class_type_path" "class_type_binding")) + ("class_type_path" ("let_open_class_type" "inheritance_specification" "class_type_binding" "instantiated_class_type" "hash_type" "_simple_class_type")) + ("coercion_expression" ("hash_expression" "class_application" "bigarray_get_expression" "method_invocation" "application_expression" "lazy_expression" "record_expression" "prefix_expression" "string_get_expression" "field_get_expression" "_simple_expression" "array_get_expression" "assert_expression" "labeled_argument")) + ("concat_operator" ("infix_expression" "parenthesized_operator" "_infix_operator")) + ("cons_expression" ("sign_expression" "cons_expression" "instance_variable_expression" "bigarray_get_expression" "product_expression" "else_clause" "then_clause" "parameter" "let_exception_expression" "list_expression" "fun_expression" "sequence_expression" "for_expression" "method_definition" "local_open_expression" "field_expression" "try_expression" "string_get_expression" "parenthesized_expression" "infix_expression" "let_binding" "let_module_expression" "class_initializer" "_sequence_expression" "packed_module" "guard" "do_clause" "instance_variable_definition" "array_get_expression" "if_expression" "while_expression" "let_open_expression" "coercion_expression" "let_expression" "match_expression" "set_expression" "expression_item" "array_expression" "_expression" "match_case" "typed_expression")) + ("cons_pattern" ("tag_pattern" "field_pattern" "attribute_payload" "tuple_pattern" "array_pattern" "list_pattern" "parameter" "lazy_pattern" "array_binding_pattern" "let_binding" "typed_pattern" "local_open_pattern" "cons_pattern" "constructor_pattern" "_pattern" "parenthesized_pattern" "or_pattern" "list_binding_pattern" "exception_pattern" "object_expression" "_binding_pattern" "alias_pattern" "match_case")) + ("constrain_module" ("module_type_constraint")) + ("constrain_module_type" ("module_type_constraint")) + ("constrain_type" ("module_type_constraint")) + ("constructed_type" ("field_pattern" "attribute_payload" "_tuple_type" "constructor_declaration" "parenthesized_type" "parameter" "instance_variable_specification" "fun_expression" "function_type" "constrain_type" "field_expression" "instantiated_class_type" "hash_type" "polymorphic_variant_type" "typed_label" "type_binding" "aliased_type" "labeled_argument" "typed_pattern" "object_type" "constructed_type" "type_parameter_constraint" "class_function_type" "polymorphic_type" "_simple_type" "instance_variable_definition" "_type" "local_open_type" "tag_specification" "coercion_expression" "tuple_type" "object_expression" "instantiated_class" "class_body_type" "type_constraint" "typed_expression")) + ("constructor_declaration" ("exception_definition" "variant_declaration")) + ("constructor_name" ("constructor_declaration" "constructor_path")) + ("constructor_path" ("tag_pattern" "field_pattern" "hash_expression" "class_application" "bigarray_get_expression" "lazy_expression" "record_expression" "tuple_pattern" "array_pattern" "constructor_declaration" "list_pattern" "parameter" "_simple_expression" "lazy_pattern" "effect_pattern" "prefix_expression" "string_get_expression" "field_get_expression" "array_binding_pattern" "labeled_argument" "let_binding" "typed_pattern" "local_open_pattern" "cons_pattern" "constructor_pattern" "application_expression" "method_invocation" "parenthesized_pattern" "or_pattern" "array_get_expression" "list_binding_pattern" "_binding_pattern" "alias_pattern" "_simple_pattern" "assert_expression")) + ("constructor_pattern" ("tag_pattern" "field_pattern" "attribute_payload" "tuple_pattern" "array_pattern" "list_pattern" "parameter" "lazy_pattern" "effect_pattern" "array_binding_pattern" "let_binding" "typed_pattern" "local_open_pattern" "cons_pattern" "constructor_pattern" "_pattern" "parenthesized_pattern" "or_pattern" "list_binding_pattern" "exception_pattern" "object_expression" "_binding_pattern" "_effect_pattern" "alias_pattern" "match_case")) + ("conversion_specification" ("string_content" "quoted_string_content")) + ("directive" ("toplevel_directive")) + ("do_clause" ("while_expression" "for_expression")) + ("effect_pattern" ("tag_pattern" "field_pattern" "attribute_payload" "tuple_pattern" "array_pattern" "list_pattern" "parameter" "lazy_pattern" "typed_pattern" "local_open_pattern" "cons_pattern" "constructor_pattern" "_pattern" "parenthesized_pattern" "or_pattern" "exception_pattern" "object_expression" "alias_pattern" "match_case")) + ("else_clause" ("if_expression")) + ("escape_sequence" ("string_content" "character_content")) + ("exception_definition" ("attribute_payload" "_signature_item" "compilation_unit" "signature" "structure" "_structure_item" "let_exception_expression")) + ("exception_pattern" ("tag_pattern" "field_pattern" "attribute_payload" "tuple_pattern" "array_pattern" "list_pattern" "parameter" "lazy_pattern" "typed_pattern" "local_open_pattern" "cons_pattern" "constructor_pattern" "_pattern" "parenthesized_pattern" "or_pattern" "exception_pattern" "object_expression" "alias_pattern" "match_case")) + ("expression_item" ("compilation_unit" "structure" "attribute_payload")) + ("extended_module_path" ("type_constructor_path" "class_type_path" "module_type_path" "constrain_module" "extended_module_path" "local_open_type")) + ("extension" ("hash_expression" "typed_module_expression" "functor_type" "package_type" "tuple_pattern" "parenthesized_type" "parameter" "_simple_expression" "fun_expression" "constrain_type" "effect_pattern" "instantiated_class_type" "field_get_expression" "type_binding" "polymorphic_type" "packed_module" "_simple_type" "or_pattern" "instance_variable_definition" "class_body_type" "alias_pattern" "module_type_definition" "tag_pattern" "field_pattern" "module_parameter" "package_pattern" "constructor_declaration" "instance_variable_specification" "module_application" "prefix_expression" "field_expression" "typed_label" "array_binding_pattern" "aliased_type" "labeled_argument" "_simple_module_expression" "constructed_type" "cons_pattern" "method_invocation" "application_expression" "class_function_type" "module_binding" "_simple_class_expression" "array_get_expression" "tag_specification" "coercion_expression" "let_open_class_type" "class_type_binding" "constrain_module_type" "instantiated_class" "_simple_class_type" "assert_expression" "typed_expression" "module_type_constraint" "_tuple_type" "record_expression" "lazy_pattern" "inheritance_specification" "local_open_pattern" "object_type" "_type" "list_binding_pattern" "object_expression" "_simple_pattern" "class_application" "attribute_payload" "bigarray_get_expression" "lazy_expression" "array_pattern" "list_pattern" "function_type" "polymorphic_variant_type" "hash_type" "string_get_expression" "include_module_type" "let_binding" "typed_pattern" "constructor_pattern" "type_parameter_constraint" "parenthesized_pattern" "local_open_type" "package_expression" "tuple_type" "_binding_pattern" "_module_type" "parenthesized_module_type" "type_constraint")) + ("external" ("attribute_payload" "_signature_item" "compilation_unit" "signature" "structure" "_structure_item")) + ("field_declaration" ("record_declaration")) + ("field_expression" ("record_expression")) + ("field_get_expression" ("hash_expression" "class_application" "bigarray_get_expression" "method_invocation" "application_expression" "lazy_expression" "record_expression" "set_expression" "prefix_expression" "string_get_expression" "field_get_expression" "_simple_expression" "array_get_expression" "assert_expression" "labeled_argument")) + ("field_name" ("field_path" "field_declaration")) + ("field_path" ("field_get_expression" "field_expression" "field_pattern")) + ("field_pattern" ("record_pattern" "record_binding_pattern")) + ("floating_attribute" ("attribute_payload" "_signature_item" "compilation_unit" "object_expression" "signature" "class_body_type" "structure" "_structure_item")) + ("for_expression" ("sign_expression" "cons_expression" "instance_variable_expression" "bigarray_get_expression" "product_expression" "else_clause" "then_clause" "parameter" "let_exception_expression" "list_expression" "fun_expression" "sequence_expression" "for_expression" "method_definition" "local_open_expression" "field_expression" "try_expression" "string_get_expression" "parenthesized_expression" "infix_expression" "let_binding" "let_module_expression" "class_initializer" "_sequence_expression" "packed_module" "guard" "do_clause" "instance_variable_definition" "array_get_expression" "if_expression" "while_expression" "let_open_expression" "coercion_expression" "let_expression" "match_expression" "set_expression" "expression_item" "array_expression" "_expression" "match_case" "typed_expression")) + ("fun_expression" ("sign_expression" "cons_expression" "instance_variable_expression" "bigarray_get_expression" "product_expression" "else_clause" "then_clause" "parameter" "let_exception_expression" "list_expression" "fun_expression" "sequence_expression" "for_expression" "method_definition" "local_open_expression" "field_expression" "try_expression" "string_get_expression" "parenthesized_expression" "infix_expression" "let_binding" "let_module_expression" "class_initializer" "_sequence_expression" "packed_module" "guard" "do_clause" "instance_variable_definition" "array_get_expression" "if_expression" "while_expression" "let_open_expression" "coercion_expression" "let_expression" "match_expression" "set_expression" "expression_item" "array_expression" "_expression" "match_case" "typed_expression")) + ("function_expression" ("sign_expression" "cons_expression" "instance_variable_expression" "bigarray_get_expression" "product_expression" "else_clause" "then_clause" "parameter" "let_exception_expression" "list_expression" "fun_expression" "sequence_expression" "for_expression" "method_definition" "local_open_expression" "field_expression" "try_expression" "string_get_expression" "parenthesized_expression" "infix_expression" "let_binding" "let_module_expression" "class_initializer" "_sequence_expression" "packed_module" "guard" "do_clause" "instance_variable_definition" "array_get_expression" "if_expression" "while_expression" "let_open_expression" "coercion_expression" "let_expression" "match_expression" "set_expression" "expression_item" "array_expression" "_expression" "match_case" "typed_expression")) + ("function_type" ("field_pattern" "attribute_payload" "parenthesized_type" "parameter" "instance_variable_specification" "function_type" "constrain_type" "field_expression" "instantiated_class_type" "hash_type" "polymorphic_variant_type" "typed_label" "type_binding" "aliased_type" "labeled_argument" "typed_pattern" "constructed_type" "type_parameter_constraint" "polymorphic_type" "instance_variable_definition" "_type" "local_open_type" "tag_specification" "coercion_expression" "object_expression" "instantiated_class" "class_body_type" "type_constraint" "typed_expression")) + ("functor" ("package_expression" "typed_module_expression" "open_module" "module_binding" "include_module" "module_application" "parenthesized_module_expression" "module_type_of" "functor" "_module_expression")) + ("functor_type" ("package_expression" "module_type_constraint" "typed_module_expression" "module_parameter" "functor_type" "module_binding" "package_type" "package_pattern" "packed_module" "_module_type" "constrain_module_type" "parenthesized_module_type" "include_module_type" "module_type_definition")) + ("guard" ("match_case" "attribute_payload")) + ("hash_expression" ("hash_expression" "class_application" "bigarray_get_expression" "method_invocation" "application_expression" "lazy_expression" "record_expression" "prefix_expression" "string_get_expression" "field_get_expression" "_simple_expression" "array_get_expression" "assert_expression" "labeled_argument")) + ("hash_operator" ("parenthesized_operator" "hash_expression")) + ("hash_type" ("field_pattern" "attribute_payload" "_tuple_type" "constructor_declaration" "parenthesized_type" "parameter" "instance_variable_specification" "fun_expression" "function_type" "constrain_type" "field_expression" "instantiated_class_type" "hash_type" "polymorphic_variant_type" "typed_label" "type_binding" "aliased_type" "labeled_argument" "typed_pattern" "object_type" "constructed_type" "type_parameter_constraint" "class_function_type" "polymorphic_type" "_simple_type" "instance_variable_definition" "_type" "local_open_type" "tag_specification" "coercion_expression" "tuple_type" "object_expression" "instantiated_class" "class_body_type" "type_constraint" "typed_expression")) + ("if_expression" ("sign_expression" "cons_expression" "instance_variable_expression" "bigarray_get_expression" "product_expression" "else_clause" "then_clause" "parameter" "let_exception_expression" "list_expression" "fun_expression" "sequence_expression" "for_expression" "method_definition" "local_open_expression" "field_expression" "try_expression" "string_get_expression" "parenthesized_expression" "infix_expression" "let_binding" "let_module_expression" "class_initializer" "_sequence_expression" "packed_module" "guard" "do_clause" "instance_variable_definition" "array_get_expression" "if_expression" "while_expression" "let_open_expression" "coercion_expression" "let_expression" "match_expression" "set_expression" "expression_item" "array_expression" "_expression" "match_case" "typed_expression")) + ("include_module" ("_structure_item" "compilation_unit" "structure" "attribute_payload")) + ("include_module_type" ("signature" "_signature_item" "attribute_payload")) + ("indexing_operator" ("indexing_operator_path" "parenthesized_operator")) + ("indexing_operator_path" ("bigarray_get_expression" "array_get_expression" "string_get_expression")) + ("infix_expression" ("sign_expression" "cons_expression" "instance_variable_expression" "bigarray_get_expression" "product_expression" "else_clause" "then_clause" "parameter" "let_exception_expression" "list_expression" "fun_expression" "sequence_expression" "for_expression" "method_definition" "local_open_expression" "field_expression" "try_expression" "string_get_expression" "parenthesized_expression" "infix_expression" "let_binding" "let_module_expression" "class_initializer" "_sequence_expression" "packed_module" "guard" "do_clause" "instance_variable_definition" "array_get_expression" "if_expression" "while_expression" "let_open_expression" "coercion_expression" "let_expression" "match_expression" "set_expression" "expression_item" "array_expression" "_expression" "match_case" "typed_expression")) + ("inheritance_definition" ("_class_field" "object_expression")) + ("inheritance_specification" ("_class_field_specification" "class_body_type")) + ("instance_variable_definition" ("_class_field" "object_expression")) + ("instance_variable_expression" ("object_copy_expression")) + ("instance_variable_name" ("instance_variable_definition" "set_expression" "instance_variable_specification" "instance_variable_expression")) + ("instance_variable_specification" ("_class_field_specification" "class_body_type")) + ("instantiated_class" ("_simple_class_expression" "class_application")) + ("instantiated_class_type" ("inheritance_specification" "class_type_binding" "let_open_class_type" "_simple_class_type")) + ("item_attribute" ("open_module" "instance_variable_specification" "exception_definition" "quoted_item_extension" "inheritance_definition" "inheritance_specification" "include_module" "method_definition" "value_specification" "include_module_type" "type_binding" "let_binding" "class_initializer" "method_specification" "module_binding" "external" "type_parameter_constraint" "instance_variable_definition" "class_binding" "expression_item" "class_type_binding" "module_type_definition" "item_extension")) + ("item_extension" ("_class_field" "attribute_payload" "_signature_item" "compilation_unit" "object_expression" "_class_field_specification" "signature" "class_body_type" "structure" "_structure_item")) + ("label_name" ("parameter" "class_function_type" "typed_label" "labeled_argument")) + ("labeled_argument" ("application_expression" "class_application")) + ("lazy_expression" ("sign_expression" "cons_expression" "instance_variable_expression" "bigarray_get_expression" "product_expression" "else_clause" "then_clause" "parameter" "let_exception_expression" "list_expression" "fun_expression" "sequence_expression" "for_expression" "method_definition" "local_open_expression" "field_expression" "try_expression" "string_get_expression" "parenthesized_expression" "infix_expression" "let_binding" "let_module_expression" "class_initializer" "_sequence_expression" "packed_module" "guard" "do_clause" "instance_variable_definition" "array_get_expression" "if_expression" "while_expression" "let_open_expression" "coercion_expression" "let_expression" "match_expression" "set_expression" "expression_item" "array_expression" "_expression" "match_case" "typed_expression")) + ("lazy_pattern" ("tag_pattern" "field_pattern" "attribute_payload" "tuple_pattern" "array_pattern" "list_pattern" "parameter" "lazy_pattern" "effect_pattern" "array_binding_pattern" "let_binding" "typed_pattern" "local_open_pattern" "cons_pattern" "constructor_pattern" "_pattern" "parenthesized_pattern" "or_pattern" "list_binding_pattern" "exception_pattern" "object_expression" "_binding_pattern" "_effect_pattern" "alias_pattern" "match_case")) + ("let_and_operator" ("parenthesized_operator" "value_definition")) + ("let_binding" ("value_definition")) + ("let_class_expression" ("typed_class_expression" "inheritance_definition" "let_open_class_expression" "class_binding" "let_class_expression" "_class_expression" "parenthesized_class_expression" "class_function")) + ("let_exception_expression" ("sign_expression" "cons_expression" "instance_variable_expression" "bigarray_get_expression" "product_expression" "else_clause" "then_clause" "parameter" "let_exception_expression" "list_expression" "fun_expression" "sequence_expression" "for_expression" "method_definition" "local_open_expression" "field_expression" "try_expression" "string_get_expression" "parenthesized_expression" "infix_expression" "let_binding" "let_module_expression" "class_initializer" "_sequence_expression" "packed_module" "guard" "do_clause" "instance_variable_definition" "array_get_expression" "if_expression" "while_expression" "let_open_expression" "coercion_expression" "let_expression" "match_expression" "set_expression" "expression_item" "array_expression" "_expression" "match_case" "typed_expression")) + ("let_expression" ("sign_expression" "cons_expression" "instance_variable_expression" "bigarray_get_expression" "product_expression" "else_clause" "then_clause" "parameter" "let_exception_expression" "list_expression" "fun_expression" "sequence_expression" "for_expression" "method_definition" "local_open_expression" "field_expression" "try_expression" "string_get_expression" "parenthesized_expression" "infix_expression" "let_binding" "let_module_expression" "class_initializer" "_sequence_expression" "packed_module" "guard" "do_clause" "instance_variable_definition" "array_get_expression" "if_expression" "while_expression" "let_open_expression" "coercion_expression" "let_expression" "match_expression" "set_expression" "expression_item" "array_expression" "_expression" "match_case" "typed_expression")) + ("let_module_expression" ("sign_expression" "cons_expression" "instance_variable_expression" "bigarray_get_expression" "product_expression" "else_clause" "then_clause" "parameter" "let_exception_expression" "list_expression" "fun_expression" "sequence_expression" "for_expression" "method_definition" "local_open_expression" "field_expression" "try_expression" "string_get_expression" "parenthesized_expression" "infix_expression" "let_binding" "let_module_expression" "class_initializer" "_sequence_expression" "packed_module" "guard" "do_clause" "instance_variable_definition" "array_get_expression" "if_expression" "while_expression" "let_open_expression" "coercion_expression" "let_expression" "match_expression" "set_expression" "expression_item" "array_expression" "_expression" "match_case" "typed_expression")) + ("let_open_class_expression" ("typed_class_expression" "inheritance_definition" "let_open_class_expression" "class_binding" "let_class_expression" "_class_expression" "parenthesized_class_expression" "class_function")) + ("let_open_class_type" ("inheritance_specification" "class_type_binding" "let_open_class_type" "_simple_class_type")) + ("let_open_expression" ("sign_expression" "cons_expression" "instance_variable_expression" "bigarray_get_expression" "product_expression" "else_clause" "then_clause" "parameter" "let_exception_expression" "list_expression" "fun_expression" "sequence_expression" "for_expression" "method_definition" "local_open_expression" "field_expression" "try_expression" "string_get_expression" "parenthesized_expression" "infix_expression" "let_binding" "let_module_expression" "class_initializer" "_sequence_expression" "packed_module" "guard" "do_clause" "instance_variable_definition" "array_get_expression" "if_expression" "while_expression" "let_open_expression" "coercion_expression" "let_expression" "match_expression" "set_expression" "expression_item" "array_expression" "_expression" "match_case" "typed_expression")) + ("let_operator" ("parenthesized_operator" "value_definition")) + ("list_binding_pattern" ("local_open_pattern")) + ("list_expression" ("hash_expression" "class_application" "bigarray_get_expression" "method_invocation" "application_expression" "lazy_expression" "record_expression" "local_open_expression" "prefix_expression" "string_get_expression" "field_get_expression" "_simple_expression" "array_get_expression" "assert_expression" "labeled_argument")) + ("list_pattern" ("tag_pattern" "field_pattern" "tuple_pattern" "array_pattern" "list_pattern" "parameter" "lazy_pattern" "effect_pattern" "array_binding_pattern" "let_binding" "typed_pattern" "local_open_pattern" "cons_pattern" "constructor_pattern" "parenthesized_pattern" "or_pattern" "list_binding_pattern" "_binding_pattern" "alias_pattern" "_simple_pattern")) + ("local_open_expression" ("hash_expression" "class_application" "bigarray_get_expression" "method_invocation" "application_expression" "lazy_expression" "record_expression" "prefix_expression" "string_get_expression" "field_get_expression" "_simple_expression" "array_get_expression" "assert_expression" "labeled_argument")) + ("local_open_pattern" ("tag_pattern" "field_pattern" "tuple_pattern" "array_pattern" "list_pattern" "parameter" "lazy_pattern" "effect_pattern" "array_binding_pattern" "let_binding" "typed_pattern" "local_open_pattern" "cons_pattern" "constructor_pattern" "parenthesized_pattern" "or_pattern" "list_binding_pattern" "_binding_pattern" "alias_pattern" "_simple_pattern")) + ("local_open_type" ("field_pattern" "attribute_payload" "_tuple_type" "constructor_declaration" "parenthesized_type" "parameter" "instance_variable_specification" "fun_expression" "function_type" "constrain_type" "field_expression" "instantiated_class_type" "hash_type" "polymorphic_variant_type" "typed_label" "type_binding" "aliased_type" "labeled_argument" "typed_pattern" "object_type" "constructed_type" "type_parameter_constraint" "class_function_type" "polymorphic_type" "_simple_type" "instance_variable_definition" "_type" "local_open_type" "tag_specification" "coercion_expression" "tuple_type" "object_expression" "instantiated_class" "class_body_type" "type_constraint" "typed_expression")) + ("match_case" ("function_expression" "try_expression" "match_expression")) + ("match_expression" ("sign_expression" "cons_expression" "instance_variable_expression" "bigarray_get_expression" "product_expression" "else_clause" "then_clause" "parameter" "let_exception_expression" "list_expression" "fun_expression" "sequence_expression" "for_expression" "method_definition" "local_open_expression" "field_expression" "try_expression" "string_get_expression" "parenthesized_expression" "infix_expression" "let_binding" "let_module_expression" "class_initializer" "_sequence_expression" "packed_module" "guard" "do_clause" "instance_variable_definition" "array_get_expression" "if_expression" "while_expression" "let_open_expression" "coercion_expression" "let_expression" "match_expression" "set_expression" "expression_item" "array_expression" "_expression" "match_case" "typed_expression")) + ("match_operator" ("parenthesized_operator" "match_expression")) + ("method_definition" ("_class_field" "object_expression")) + ("method_invocation" ("hash_expression" "class_application" "bigarray_get_expression" "method_invocation" "application_expression" "lazy_expression" "record_expression" "prefix_expression" "string_get_expression" "field_get_expression" "_simple_expression" "array_get_expression" "assert_expression" "labeled_argument")) + ("method_name" ("method_specification" "method_invocation" "method_type" "method_definition")) + ("method_specification" ("_class_field_specification" "class_body_type")) + ("method_type" ("object_type")) + ("module_application" ("package_expression" "typed_module_expression" "open_module" "module_binding" "include_module" "module_application" "parenthesized_module_expression" "module_type_of" "functor" "_module_expression")) + ("module_binding" ("module_definition")) + ("module_definition" ("attribute_payload" "_signature_item" "compilation_unit" "signature" "structure" "_structure_item" "let_module_expression")) + ("module_name" ("module_parameter" "module_binding" "package_pattern" "extended_module_path" "module_path")) + ("module_parameter" ("functor_type" "module_binding" "functor")) + ("module_path" ("typed_module_expression" "open_module" "module_type_of" "_module_expression" "toplevel_directive" "include_module" "module_application" "local_open_expression" "constrain_module" "indexing_operator_path" "local_open_pattern" "module_binding" "parenthesized_module_expression" "functor" "module_path" "value_path" "package_expression" "class_path" "constructor_path" "field_path")) + ("module_type_constraint" ("package_expression" "module_type_constraint" "typed_module_expression" "module_parameter" "functor_type" "module_binding" "package_type" "package_pattern" "packed_module" "_module_type" "constrain_module_type" "parenthesized_module_type" "include_module_type" "module_type_definition")) + ("module_type_definition" ("attribute_payload" "_signature_item" "compilation_unit" "signature" "structure" "_structure_item")) + ("module_type_name" ("module_type_definition" "module_type_path")) + ("module_type_of" ("package_expression" "module_type_constraint" "typed_module_expression" "module_parameter" "functor_type" "module_binding" "package_type" "package_pattern" "packed_module" "_module_type" "constrain_module_type" "parenthesized_module_type" "include_module_type" "module_type_definition")) + ("module_type_path" ("package_expression" "module_type_constraint" "typed_module_expression" "module_parameter" "functor_type" "module_binding" "package_type" "package_pattern" "packed_module" "_module_type" "constrain_module_type" "parenthesized_module_type" "include_module_type" "module_type_definition")) + ("mult_operator" ("infix_expression" "parenthesized_operator" "_infix_operator")) + ("new_expression" ("hash_expression" "class_application" "bigarray_get_expression" "method_invocation" "application_expression" "lazy_expression" "record_expression" "prefix_expression" "string_get_expression" "field_get_expression" "_simple_expression" "array_get_expression" "assert_expression" "labeled_argument")) + ("number" ("hash_expression" "class_application" "_constant" "bigarray_get_expression" "lazy_expression" "record_expression" "parameter" "_simple_expression" "toplevel_directive" "effect_pattern" "prefix_expression" "_signed_constant" "string_get_expression" "field_get_expression" "labeled_argument" "method_invocation" "application_expression" "range_pattern" "array_get_expression" "_simple_pattern" "assert_expression")) + ("object_copy_expression" ("hash_expression" "class_application" "bigarray_get_expression" "method_invocation" "application_expression" "lazy_expression" "record_expression" "local_open_expression" "prefix_expression" "string_get_expression" "field_get_expression" "_simple_expression" "array_get_expression" "assert_expression" "labeled_argument")) + ("object_expression" ("hash_expression" "class_application" "bigarray_get_expression" "method_invocation" "application_expression" "lazy_expression" "record_expression" "prefix_expression" "_simple_class_expression" "string_get_expression" "field_get_expression" "_simple_expression" "array_get_expression" "assert_expression" "labeled_argument")) + ("object_type" ("field_pattern" "attribute_payload" "_tuple_type" "constructor_declaration" "parenthesized_type" "parameter" "instance_variable_specification" "fun_expression" "function_type" "constrain_type" "field_expression" "instantiated_class_type" "hash_type" "polymorphic_variant_type" "typed_label" "type_binding" "aliased_type" "labeled_argument" "typed_pattern" "object_type" "constructed_type" "type_parameter_constraint" "class_function_type" "polymorphic_type" "_simple_type" "instance_variable_definition" "_type" "local_open_type" "tag_specification" "coercion_expression" "tuple_type" "object_expression" "instantiated_class" "class_body_type" "type_constraint" "typed_expression")) + ("ocamlyacc_value" ("hash_expression" "class_application" "bigarray_get_expression" "method_invocation" "application_expression" "lazy_expression" "record_expression" "prefix_expression" "string_get_expression" "field_get_expression" "_simple_expression" "array_get_expression" "assert_expression" "labeled_argument")) + ("open_module" ("let_open_expression" "let_open_class_type" "attribute_payload" "let_open_class_expression" "_signature_item" "compilation_unit" "signature" "structure" "_structure_item")) + ("or_operator" ("infix_expression" "parenthesized_operator" "_infix_operator")) + ("or_pattern" ("tag_pattern" "field_pattern" "attribute_payload" "tuple_pattern" "array_pattern" "list_pattern" "parameter" "lazy_pattern" "array_binding_pattern" "let_binding" "typed_pattern" "local_open_pattern" "cons_pattern" "constructor_pattern" "_pattern" "parenthesized_pattern" "or_pattern" "list_binding_pattern" "exception_pattern" "object_expression" "_binding_pattern" "alias_pattern" "match_case")) + ("package_expression" ("hash_expression" "class_application" "bigarray_get_expression" "method_invocation" "application_expression" "lazy_expression" "record_expression" "local_open_expression" "prefix_expression" "string_get_expression" "field_get_expression" "_simple_expression" "array_get_expression" "assert_expression" "labeled_argument")) + ("package_pattern" ("tag_pattern" "field_pattern" "tuple_pattern" "array_pattern" "list_pattern" "parameter" "lazy_pattern" "effect_pattern" "array_binding_pattern" "let_binding" "typed_pattern" "local_open_pattern" "cons_pattern" "constructor_pattern" "parenthesized_pattern" "or_pattern" "list_binding_pattern" "_binding_pattern" "alias_pattern" "_simple_pattern")) + ("package_type" ("field_pattern" "attribute_payload" "_tuple_type" "constructor_declaration" "parenthesized_type" "parameter" "instance_variable_specification" "fun_expression" "function_type" "constrain_type" "field_expression" "instantiated_class_type" "hash_type" "polymorphic_variant_type" "typed_label" "type_binding" "aliased_type" "labeled_argument" "typed_pattern" "object_type" "constructed_type" "type_parameter_constraint" "class_function_type" "polymorphic_type" "_simple_type" "instance_variable_definition" "_type" "local_open_type" "tag_specification" "coercion_expression" "tuple_type" "object_expression" "instantiated_class" "class_body_type" "type_constraint" "typed_expression")) + ("packed_module" ("_simple_module_expression" "module_application")) + ("parameter" ("fun_expression" "class_binding" "method_definition" "_parameter" "class_function" "let_binding")) + ("parenthesized_class_expression" ("_simple_class_expression" "class_application")) + ("parenthesized_expression" ("hash_expression" "class_application" "bigarray_get_expression" "method_invocation" "application_expression" "lazy_expression" "record_expression" "prefix_expression" "string_get_expression" "field_get_expression" "_simple_expression" "array_get_expression" "assert_expression" "labeled_argument")) + ("parenthesized_module_expression" ("_simple_module_expression" "module_application")) + ("parenthesized_module_type" ("package_expression" "module_type_constraint" "typed_module_expression" "module_parameter" "functor_type" "module_binding" "package_type" "package_pattern" "packed_module" "_module_type" "constrain_module_type" "parenthesized_module_type" "include_module_type" "module_type_definition")) + ("parenthesized_operator" ("tag_pattern" "field_pattern" "tuple_pattern" "array_pattern" "list_pattern" "parameter" "lazy_pattern" "effect_pattern" "inheritance_definition" "for_expression" "value_specification" "array_binding_pattern" "let_binding" "typed_pattern" "local_open_pattern" "cons_pattern" "constructor_pattern" "external" "parenthesized_pattern" "or_pattern" "value_path" "list_binding_pattern" "_binding_pattern" "alias_pattern" "_simple_pattern")) + ("parenthesized_pattern" ("tag_pattern" "field_pattern" "tuple_pattern" "array_pattern" "list_pattern" "parameter" "lazy_pattern" "effect_pattern" "array_binding_pattern" "let_binding" "typed_pattern" "local_open_pattern" "cons_pattern" "constructor_pattern" "parenthesized_pattern" "or_pattern" "list_binding_pattern" "_binding_pattern" "alias_pattern" "_simple_pattern")) + ("parenthesized_type" ("field_pattern" "attribute_payload" "_tuple_type" "constructor_declaration" "parenthesized_type" "parameter" "instance_variable_specification" "fun_expression" "function_type" "constrain_type" "field_expression" "instantiated_class_type" "hash_type" "polymorphic_variant_type" "typed_label" "type_binding" "aliased_type" "labeled_argument" "typed_pattern" "object_type" "constructed_type" "type_parameter_constraint" "class_function_type" "polymorphic_type" "_simple_type" "instance_variable_definition" "_type" "local_open_type" "tag_specification" "coercion_expression" "tuple_type" "object_expression" "instantiated_class" "class_body_type" "type_constraint" "typed_expression")) + ("polymorphic_type" ("method_specification" "external" "method_definition" "method_type" "value_specification" "_polymorphic_type" "field_declaration" "let_binding")) + ("polymorphic_variant_pattern" ("tag_pattern" "field_pattern" "tuple_pattern" "array_pattern" "list_pattern" "parameter" "lazy_pattern" "effect_pattern" "array_binding_pattern" "let_binding" "typed_pattern" "local_open_pattern" "cons_pattern" "constructor_pattern" "parenthesized_pattern" "or_pattern" "list_binding_pattern" "_binding_pattern" "alias_pattern" "_simple_pattern")) + ("polymorphic_variant_type" ("field_pattern" "attribute_payload" "_tuple_type" "constructor_declaration" "parenthesized_type" "parameter" "instance_variable_specification" "fun_expression" "function_type" "constrain_type" "field_expression" "instantiated_class_type" "hash_type" "polymorphic_variant_type" "typed_label" "type_binding" "aliased_type" "labeled_argument" "typed_pattern" "object_type" "constructed_type" "type_parameter_constraint" "class_function_type" "polymorphic_type" "_simple_type" "instance_variable_definition" "_type" "local_open_type" "tag_specification" "coercion_expression" "tuple_type" "object_expression" "instantiated_class" "class_body_type" "type_constraint" "typed_expression")) + ("pow_operator" ("infix_expression" "parenthesized_operator" "_infix_operator")) + ("prefix_expression" ("hash_expression" "class_application" "bigarray_get_expression" "method_invocation" "application_expression" "lazy_expression" "record_expression" "prefix_expression" "string_get_expression" "field_get_expression" "_simple_expression" "array_get_expression" "assert_expression" "labeled_argument")) + ("prefix_operator" ("prefix_expression" "parenthesized_operator")) + ("pretty_printing_indication" ("string_content" "quoted_string_content")) + ("product_expression" ("sign_expression" "cons_expression" "instance_variable_expression" "bigarray_get_expression" "product_expression" "else_clause" "then_clause" "parameter" "let_exception_expression" "list_expression" "fun_expression" "sequence_expression" "for_expression" "method_definition" "local_open_expression" "field_expression" "try_expression" "string_get_expression" "parenthesized_expression" "infix_expression" "let_binding" "let_module_expression" "class_initializer" "_sequence_expression" "packed_module" "guard" "do_clause" "instance_variable_definition" "array_get_expression" "if_expression" "while_expression" "let_open_expression" "coercion_expression" "let_expression" "match_expression" "set_expression" "expression_item" "array_expression" "_expression" "match_case" "typed_expression")) + ("quoted_extension" ("hash_expression" "typed_module_expression" "functor_type" "package_type" "tuple_pattern" "parenthesized_type" "parameter" "_simple_expression" "fun_expression" "constrain_type" "effect_pattern" "instantiated_class_type" "field_get_expression" "type_binding" "polymorphic_type" "packed_module" "_simple_type" "or_pattern" "instance_variable_definition" "class_body_type" "alias_pattern" "module_type_definition" "tag_pattern" "field_pattern" "module_parameter" "package_pattern" "constructor_declaration" "instance_variable_specification" "module_application" "prefix_expression" "field_expression" "typed_label" "array_binding_pattern" "aliased_type" "labeled_argument" "_simple_module_expression" "constructed_type" "cons_pattern" "method_invocation" "application_expression" "class_function_type" "module_binding" "_simple_class_expression" "array_get_expression" "tag_specification" "coercion_expression" "let_open_class_type" "class_type_binding" "constrain_module_type" "instantiated_class" "_simple_class_type" "assert_expression" "typed_expression" "module_type_constraint" "_tuple_type" "record_expression" "lazy_pattern" "inheritance_specification" "local_open_pattern" "object_type" "_type" "list_binding_pattern" "object_expression" "_simple_pattern" "class_application" "attribute_payload" "bigarray_get_expression" "lazy_expression" "array_pattern" "list_pattern" "function_type" "polymorphic_variant_type" "hash_type" "string_get_expression" "include_module_type" "let_binding" "typed_pattern" "constructor_pattern" "type_parameter_constraint" "parenthesized_pattern" "local_open_type" "package_expression" "tuple_type" "_binding_pattern" "_module_type" "parenthesized_module_type" "type_constraint")) + ("quoted_item_extension" ("_class_field" "attribute_payload" "_signature_item" "compilation_unit" "object_expression" "_class_field_specification" "signature" "class_body_type" "structure" "_structure_item")) + ("quoted_string" ("hash_expression" "class_application" "_constant" "bigarray_get_expression" "lazy_expression" "record_expression" "parameter" "_simple_expression" "toplevel_directive" "effect_pattern" "prefix_expression" "_signed_constant" "string_get_expression" "field_get_expression" "labeled_argument" "method_invocation" "application_expression" "range_pattern" "array_get_expression" "_simple_pattern" "assert_expression")) + ("quoted_string_content" ("quoted_item_extension" "quoted_extension" "quoted_string")) + ("range_pattern" ("tag_pattern" "field_pattern" "attribute_payload" "tuple_pattern" "array_pattern" "list_pattern" "parameter" "lazy_pattern" "array_binding_pattern" "let_binding" "typed_pattern" "local_open_pattern" "cons_pattern" "constructor_pattern" "_pattern" "parenthesized_pattern" "or_pattern" "list_binding_pattern" "exception_pattern" "object_expression" "_binding_pattern" "alias_pattern" "match_case")) + ("record_binding_pattern" ("local_open_pattern")) + ("record_declaration" ("constructor_declaration" "type_binding")) + ("record_expression" ("hash_expression" "class_application" "bigarray_get_expression" "method_invocation" "application_expression" "lazy_expression" "record_expression" "local_open_expression" "prefix_expression" "string_get_expression" "field_get_expression" "_simple_expression" "array_get_expression" "assert_expression" "labeled_argument")) + ("record_pattern" ("tag_pattern" "field_pattern" "tuple_pattern" "array_pattern" "list_pattern" "parameter" "lazy_pattern" "effect_pattern" "array_binding_pattern" "let_binding" "typed_pattern" "local_open_pattern" "cons_pattern" "constructor_pattern" "parenthesized_pattern" "or_pattern" "list_binding_pattern" "_binding_pattern" "alias_pattern" "_simple_pattern")) + ("refutation_case" ("match_case")) + ("rel_operator" ("infix_expression" "parenthesized_operator" "_infix_operator")) + ("sequence_expression" ("bigarray_get_expression" "parameter" "let_exception_expression" "fun_expression" "sequence_expression" "for_expression" "method_definition" "local_open_expression" "try_expression" "string_get_expression" "parenthesized_expression" "let_module_expression" "let_binding" "class_initializer" "_sequence_expression" "guard" "do_clause" "instance_variable_definition" "array_get_expression" "if_expression" "while_expression" "let_open_expression" "coercion_expression" "let_expression" "match_expression" "expression_item" "match_case" "typed_expression")) + ("set_expression" ("sign_expression" "cons_expression" "instance_variable_expression" "bigarray_get_expression" "product_expression" "else_clause" "then_clause" "parameter" "let_exception_expression" "list_expression" "fun_expression" "sequence_expression" "for_expression" "method_definition" "local_open_expression" "field_expression" "try_expression" "string_get_expression" "parenthesized_expression" "infix_expression" "let_binding" "let_module_expression" "class_initializer" "_sequence_expression" "packed_module" "guard" "do_clause" "instance_variable_definition" "array_get_expression" "if_expression" "while_expression" "let_open_expression" "coercion_expression" "let_expression" "match_expression" "set_expression" "expression_item" "array_expression" "_expression" "match_case" "typed_expression")) + ("shebang" ("compilation_unit")) + ("sign_expression" ("sign_expression" "cons_expression" "instance_variable_expression" "bigarray_get_expression" "product_expression" "else_clause" "then_clause" "parameter" "let_exception_expression" "list_expression" "fun_expression" "sequence_expression" "for_expression" "method_definition" "local_open_expression" "field_expression" "try_expression" "string_get_expression" "parenthesized_expression" "infix_expression" "let_binding" "let_module_expression" "class_initializer" "_sequence_expression" "packed_module" "guard" "do_clause" "instance_variable_definition" "array_get_expression" "if_expression" "while_expression" "let_open_expression" "coercion_expression" "let_expression" "match_expression" "set_expression" "expression_item" "array_expression" "_expression" "match_case" "typed_expression")) + ("sign_operator" ("sign_expression")) + ("signature" ("package_expression" "module_type_constraint" "typed_module_expression" "module_parameter" "functor_type" "module_binding" "package_type" "package_pattern" "packed_module" "_module_type" "constrain_module_type" "parenthesized_module_type" "include_module_type" "module_type_definition")) + ("signed_number" ("effect_pattern" "_signed_constant" "parameter" "range_pattern" "_simple_pattern")) + ("string" ("hash_expression" "class_application" "_constant" "bigarray_get_expression" "lazy_expression" "record_expression" "parameter" "_simple_expression" "toplevel_directive" "effect_pattern" "prefix_expression" "_signed_constant" "string_get_expression" "field_get_expression" "labeled_argument" "external" "application_expression" "method_invocation" "range_pattern" "array_get_expression" "_simple_pattern" "assert_expression")) + ("string_content" ("string")) + ("string_get_expression" ("hash_expression" "class_application" "bigarray_get_expression" "method_invocation" "application_expression" "lazy_expression" "record_expression" "set_expression" "prefix_expression" "string_get_expression" "field_get_expression" "_simple_expression" "array_get_expression" "assert_expression" "labeled_argument")) + ("structure" ("package_expression" "typed_module_expression" "open_module" "module_binding" "include_module" "module_application" "parenthesized_module_expression" "module_type_of" "functor" "_module_expression")) + ("tag" ("tag_pattern" "field_pattern" "hash_expression" "class_application" "bigarray_get_expression" "lazy_expression" "record_expression" "tuple_pattern" "array_pattern" "list_pattern" "parameter" "_simple_expression" "lazy_pattern" "effect_pattern" "prefix_expression" "polymorphic_variant_type" "string_get_expression" "field_get_expression" "array_binding_pattern" "labeled_argument" "let_binding" "typed_pattern" "local_open_pattern" "cons_pattern" "constructor_pattern" "application_expression" "method_invocation" "parenthesized_pattern" "or_pattern" "array_get_expression" "tag_specification" "list_binding_pattern" "_binding_pattern" "alias_pattern" "_simple_pattern" "assert_expression")) + ("tag_pattern" ("tag_pattern" "field_pattern" "attribute_payload" "tuple_pattern" "array_pattern" "list_pattern" "parameter" "lazy_pattern" "effect_pattern" "array_binding_pattern" "let_binding" "typed_pattern" "local_open_pattern" "cons_pattern" "constructor_pattern" "_pattern" "parenthesized_pattern" "or_pattern" "list_binding_pattern" "exception_pattern" "object_expression" "_binding_pattern" "_effect_pattern" "alias_pattern" "match_case")) + ("tag_specification" ("polymorphic_variant_type")) + ("then_clause" ("if_expression")) + ("toplevel_directive" ("compilation_unit" "structure" "attribute_payload")) + ("try_expression" ("sign_expression" "cons_expression" "instance_variable_expression" "bigarray_get_expression" "product_expression" "else_clause" "then_clause" "parameter" "let_exception_expression" "list_expression" "fun_expression" "sequence_expression" "for_expression" "method_definition" "local_open_expression" "field_expression" "try_expression" "string_get_expression" "parenthesized_expression" "infix_expression" "let_binding" "let_module_expression" "class_initializer" "_sequence_expression" "packed_module" "guard" "do_clause" "instance_variable_definition" "array_get_expression" "if_expression" "while_expression" "let_open_expression" "coercion_expression" "let_expression" "match_expression" "set_expression" "expression_item" "array_expression" "_expression" "match_case" "typed_expression")) + ("tuple_pattern" ("tag_pattern" "field_pattern" "attribute_payload" "tuple_pattern" "array_pattern" "list_pattern" "parameter" "lazy_pattern" "array_binding_pattern" "let_binding" "typed_pattern" "local_open_pattern" "cons_pattern" "constructor_pattern" "_pattern" "parenthesized_pattern" "or_pattern" "list_binding_pattern" "exception_pattern" "object_expression" "_binding_pattern" "alias_pattern" "match_case")) + ("tuple_type" ("field_pattern" "attribute_payload" "_tuple_type" "parenthesized_type" "parameter" "instance_variable_specification" "function_type" "constrain_type" "field_expression" "instantiated_class_type" "hash_type" "polymorphic_variant_type" "typed_label" "type_binding" "aliased_type" "labeled_argument" "typed_pattern" "constructed_type" "type_parameter_constraint" "class_function_type" "polymorphic_type" "instance_variable_definition" "_type" "local_open_type" "tag_specification" "coercion_expression" "tuple_type" "object_expression" "instantiated_class" "class_body_type" "type_constraint" "typed_expression")) + ("type_binding" ("type_definition")) + ("type_constraint" ("type_binding" "constrain_type")) + ("type_constructor" ("abstract_type" "type_binding" "type_constructor_path")) + ("type_constructor_path" ("field_pattern" "attribute_payload" "_tuple_type" "constructor_declaration" "parenthesized_type" "parameter" "instance_variable_specification" "fun_expression" "function_type" "constrain_type" "field_expression" "instantiated_class_type" "hash_type" "polymorphic_variant_type" "typed_label" "type_binding" "aliased_type" "labeled_argument" "typed_pattern" "object_type" "polymorphic_variant_pattern" "constructed_type" "type_parameter_constraint" "class_function_type" "polymorphic_type" "_simple_type" "instance_variable_definition" "_type" "local_open_type" "tag_specification" "coercion_expression" "tuple_type" "object_expression" "instantiated_class" "class_body_type" "type_constraint" "typed_expression")) + ("type_definition" ("attribute_payload" "_signature_item" "compilation_unit" "signature" "structure" "_structure_item")) + ("type_parameter_constraint" ("_class_field_specification" "class_body_type" "_class_field" "object_expression")) + ("type_variable" ("field_pattern" "attribute_payload" "_tuple_type" "constructor_declaration" "parenthesized_type" "parameter" "instance_variable_specification" "fun_expression" "function_type" "constrain_type" "field_expression" "instantiated_class_type" "hash_type" "polymorphic_variant_type" "typed_label" "type_binding" "aliased_type" "labeled_argument" "typed_pattern" "object_type" "constructed_type" "type_parameter_constraint" "class_function_type" "polymorphic_type" "_simple_type" "instance_variable_definition" "_type" "local_open_type" "tag_specification" "coercion_expression" "tuple_type" "class_binding" "object_expression" "class_type_binding" "instantiated_class" "class_body_type" "type_constraint" "typed_expression")) + ("typed_class_expression" ("_simple_class_expression" "class_application")) + ("typed_expression" ("hash_expression" "class_application" "bigarray_get_expression" "method_invocation" "application_expression" "lazy_expression" "record_expression" "prefix_expression" "string_get_expression" "field_get_expression" "_simple_expression" "array_get_expression" "assert_expression" "labeled_argument")) + ("typed_label" ("function_type")) + ("typed_module_expression" ("_simple_module_expression" "module_application")) + ("typed_pattern" ("tag_pattern" "field_pattern" "tuple_pattern" "array_pattern" "list_pattern" "parameter" "lazy_pattern" "effect_pattern" "array_binding_pattern" "let_binding" "typed_pattern" "local_open_pattern" "cons_pattern" "constructor_pattern" "parenthesized_pattern" "or_pattern" "list_binding_pattern" "_binding_pattern" "alias_pattern" "_simple_pattern")) + ("unit" ("hash_expression" "class_application" "_constant" "bigarray_get_expression" "lazy_expression" "record_expression" "parameter" "_simple_expression" "toplevel_directive" "effect_pattern" "prefix_expression" "_signed_constant" "string_get_expression" "field_get_expression" "labeled_argument" "method_invocation" "application_expression" "range_pattern" "array_get_expression" "_simple_pattern" "assert_expression")) + ("value_definition" ("let_expression" "attribute_payload" "compilation_unit" "let_class_expression" "structure" "_structure_item")) + ("value_name" ("tag_pattern" "field_pattern" "tuple_pattern" "array_pattern" "list_pattern" "lazy_pattern" "value_specification" "array_binding_pattern" "typed_pattern" "let_binding" "local_open_pattern" "cons_pattern" "constructor_pattern" "external" "parenthesized_pattern" "or_pattern" "value_path" "list_binding_pattern" "_binding_pattern" "alias_pattern")) + ("value_path" ("toplevel_directive" "hash_expression" "class_application" "bigarray_get_expression" "method_invocation" "application_expression" "lazy_expression" "record_expression" "prefix_expression" "string_get_expression" "field_get_expression" "_simple_expression" "array_get_expression" "assert_expression" "labeled_argument")) + ("value_pattern" ("effect_pattern" "inheritance_definition" "for_expression" "alias_pattern" "parameter" "_simple_pattern")) + ("value_specification" ("signature" "_signature_item" "attribute_payload")) + ("variant_declaration" ("type_binding")) + ("while_expression" ("sign_expression" "cons_expression" "instance_variable_expression" "bigarray_get_expression" "product_expression" "else_clause" "then_clause" "parameter" "let_exception_expression" "list_expression" "fun_expression" "sequence_expression" "for_expression" "method_definition" "local_open_expression" "field_expression" "try_expression" "string_get_expression" "parenthesized_expression" "infix_expression" "let_binding" "let_module_expression" "class_initializer" "_sequence_expression" "packed_module" "guard" "do_clause" "instance_variable_definition" "array_get_expression" "if_expression" "while_expression" "let_open_expression" "coercion_expression" "let_expression" "match_expression" "set_expression" "expression_item" "array_expression" "_expression" "match_case" "typed_expression")) + ) +) +;; END Inverse production rules for ocaml +;; START All node types in ocaml +(defconst combobulate-rules-ocaml-types + '("_binding_pattern" "_class_expression" "_class_field" "_class_field_specification" "_class_type" "_constant" "_effect_pattern" "_expression" "_infix_operator" "_module_expression" "_module_type" "_parameter" "_pattern" "_polymorphic_type" "_sequence_expression" "_signature_item" "_signed_constant" "_simple_class_expression" "_simple_class_type" "_simple_expression" "_simple_module_expression" "_simple_pattern" "_simple_type" "_structure_item" "_tuple_type" "_type" "abstract_type" "add_operator" "alias_pattern" "aliased_type" "and_operator" "application_expression" "array_binding_pattern" "array_expression" "array_get_expression" "array_pattern" "assert_expression" "assign_operator" "attribute" "attribute_id" "attribute_payload" "bigarray_get_expression" "boolean" "character" "character_content" "class_application" "class_binding" "class_body_type" "class_definition" "class_function" "class_function_type" "class_initializer" "class_name" "class_path" "class_type_binding" "class_type_definition" "class_type_name" "class_type_path" "coercion_expression" "comment" "compilation_unit" "concat_operator" "cons_expression" "cons_pattern" "constrain_module" "constrain_module_type" "constrain_type" "constructed_type" "constructor_declaration" "constructor_name" "constructor_path" "constructor_pattern" "conversion_specification" "directive" "do_clause" "effect_pattern" "else_clause" "escape_sequence" "exception_definition" "exception_pattern" "expression_item" "extended_module_path" "extension" "external" "field_declaration" "field_expression" "field_get_expression" "field_name" "field_path" "field_pattern" "floating_attribute" "for_expression" "fun_expression" "function_expression" "function_type" "functor" "functor_type" "guard" "hash_expression" "hash_operator" "hash_type" "if_expression" "include_module" "include_module_type" "indexing_operator" "indexing_operator_path" "infix_expression" "inheritance_definition" "inheritance_specification" "instance_variable_definition" "instance_variable_expression" "instance_variable_name" "instance_variable_specification" "instantiated_class" "instantiated_class_type" "item_attribute" "item_extension" "label_name" "labeled_argument" "lazy_expression" "lazy_pattern" "let_and_operator" "let_binding" "let_class_expression" "let_exception_expression" "let_expression" "let_module_expression" "let_open_class_expression" "let_open_class_type" "let_open_expression" "let_operator" "line_number_directive" "list_binding_pattern" "list_expression" "list_pattern" "local_open_expression" "local_open_pattern" "local_open_type" "match_case" "match_expression" "match_operator" "method_definition" "method_invocation" "method_name" "method_specification" "method_type" "module_application" "module_binding" "module_definition" "module_name" "module_parameter" "module_path" "module_type_constraint" "module_type_definition" "module_type_name" "module_type_of" "module_type_path" "mult_operator" "new_expression" "number" "object_copy_expression" "object_expression" "object_type" "ocamlyacc_value" "open_module" "or_operator" "or_pattern" "package_expression" "package_pattern" "package_type" "packed_module" "parameter" "parenthesized_class_expression" "parenthesized_expression" "parenthesized_module_expression" "parenthesized_module_type" "parenthesized_operator" "parenthesized_pattern" "parenthesized_type" "polymorphic_type" "polymorphic_variant_pattern" "polymorphic_variant_type" "pow_operator" "prefix_expression" "prefix_operator" "pretty_printing_indication" "product_expression" "quoted_extension" "quoted_item_extension" "quoted_string" "quoted_string_content" "range_pattern" "record_binding_pattern" "record_declaration" "record_expression" "record_pattern" "refutation_case" "rel_operator" "sequence_expression" "set_expression" "shebang" "sign_expression" "sign_operator" "signature" "signed_number" "string" "string_content" "string_get_expression" "structure" "tag" "tag_pattern" "tag_specification" "then_clause" "toplevel_directive" "try_expression" "tuple_pattern" "tuple_type" "type_binding" "type_constraint" "type_constructor" "type_constructor_path" "type_definition" "type_parameter_constraint" "type_variable" "typed_class_expression" "typed_expression" "typed_label" "typed_module_expression" "typed_pattern" "unit" "value_definition" "value_name" "value_path" "value_pattern" "value_specification" "variant_declaration" "while_expression") +) +;; END All node types in ocaml +;; START All supertypes in ocaml +(defconst combobulate-rules-ocaml-supertypes + '("_binding_pattern" "_class_expression" "_class_field" "_class_field_specification" "_class_type" "_constant" "_effect_pattern" "_expression" "_infix_operator" "_module_expression" "_module_type" "_parameter" "_pattern" "_polymorphic_type" "_sequence_expression" "_signature_item" "_signed_constant" "_simple_class_expression" "_simple_class_type" "_simple_expression" "_simple_module_expression" "_simple_pattern" "_simple_type" "_structure_item" "_tuple_type" "_type") +) +;; END All supertypes in ocaml + +;; START Production rules for ocaml_interface +(defconst combobulate-rules-ocaml_interface + '(("_binding_pattern" (:*unnamed* ("tag_pattern" "local_open_pattern" "polymorphic_variant_pattern" "extension" "cons_pattern" "constructor_pattern" "quoted_extension" "tuple_pattern" "array_pattern" "package_pattern" "parenthesized_pattern" "list_pattern" "or_pattern" "value_name" "parenthesized_operator" "range_pattern" "lazy_pattern" "record_pattern" "alias_pattern" "constructor_path" "tag" "typed_pattern"))) + ("_class_expression" (:*unnamed* ("class_function" "let_open_class_expression" "let_class_expression" "class_application"))) + ("_class_field" (:*unnamed* ("quoted_item_extension" "class_initializer" "inheritance_definition" "instance_variable_definition" "type_parameter_constraint" "item_extension" "method_definition"))) + ("_class_field_specification" (:*unnamed* ("quoted_item_extension" "method_specification" "inheritance_specification" "type_parameter_constraint" "instance_variable_specification" "item_extension"))) + ("_class_type" (:*unnamed* ("class_function_type"))) + ("_constant" (:*unnamed* ("string" "boolean" "quoted_string" "character" "unit" "number"))) + ("_effect_pattern" (:*unnamed* ("lazy_pattern" "constructor_pattern" "tag_pattern"))) + ("_expression" (:*unnamed* ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression"))) + ("_infix_operator" (:*unnamed* ("pow_operator" "rel_operator" "concat_operator" "or_operator" "and_operator" "mult_operator" "add_operator" "assign_operator"))) + ("_module_expression" (:*unnamed* ("module_path" "structure" "module_application" "functor"))) + ("_module_type" (:*unnamed* ("module_type_constraint" "functor_type" "extension" "quoted_extension" "module_type_path" "signature" "module_type_of" "parenthesized_module_type"))) + ("_parameter" (:*unnamed* ("parameter" "abstract_type"))) + ("_pattern" (:*unnamed* ("lazy_pattern" "tag_pattern" "effect_pattern" "cons_pattern" "constructor_pattern" "exception_pattern" "tuple_pattern" "alias_pattern" "or_pattern" "range_pattern"))) + ("_polymorphic_type" (:*unnamed* ("polymorphic_type"))) + ("_sequence_expression" (:*unnamed* ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "sequence_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression"))) + ("_signature_item" (:*unnamed* ("module_type_definition" "quoted_item_extension" "class_definition" "module_definition" "open_module" "external" "floating_attribute" "type_definition" "value_specification" "class_type_definition" "include_module_type" "exception_definition" "item_extension"))) + ("_signed_constant" (:*unnamed* ("string" "boolean" "quoted_string" "character" "signed_number" "unit" "number"))) + ("_simple_class_expression" (:*unnamed* ("typed_class_expression" "instantiated_class" "class_path" "extension" "quoted_extension" "parenthesized_class_expression" "object_expression"))) + ("_simple_class_type" (:*unnamed* ("instantiated_class_type" "let_open_class_type" "class_body_type" "class_type_path" "quoted_extension" "extension"))) + ("_simple_expression" (:*unnamed* ("parenthesized_expression" "string" "quoted_string" "character" "hash_expression" "object_copy_expression" "bigarray_get_expression" "number" "extension" "method_invocation" "quoted_extension" "record_expression" "new_expression" "value_path" "array_get_expression" "list_expression" "package_expression" "ocamlyacc_value" "coercion_expression" "unit" "local_open_expression" "object_expression" "prefix_expression" "boolean" "array_expression" "string_get_expression" "field_get_expression" "constructor_path" "tag" "typed_expression"))) + ("_simple_module_expression" (:*unnamed* ("typed_module_expression" "extension" "quoted_extension" "parenthesized_module_expression" "packed_module"))) + ("_simple_pattern" (:*unnamed* ("string" "local_open_pattern" "quoted_string" "character" "polymorphic_variant_pattern" "extension" "number" "quoted_extension" "value_pattern" "array_pattern" "package_pattern" "parenthesized_pattern" "list_pattern" "parenthesized_operator" "record_pattern" "unit" "boolean" "signed_number" "constructor_path" "tag" "typed_pattern"))) + ("_simple_type" (:*unnamed* ("object_type" "type_constructor_path" "constructed_type" "extension" "package_type" "quoted_extension" "type_variable" "parenthesized_type" "polymorphic_variant_type" "hash_type" "local_open_type"))) + ("_structure_item" (:*unnamed* ("module_type_definition" "quoted_item_extension" "class_definition" "module_definition" "open_module" "external" "include_module" "floating_attribute" "type_definition" "value_definition" "class_type_definition" "exception_definition" "item_extension"))) + ("_tuple_type" (:*unnamed* ("object_type" "type_constructor_path" "constructed_type" "extension" "package_type" "quoted_extension" "tuple_type" "type_variable" "parenthesized_type" "polymorphic_variant_type" "hash_type" "local_open_type"))) + ("_type" (:*unnamed* ("function_type" "object_type" "type_constructor_path" "constructed_type" "extension" "package_type" "quoted_extension" "tuple_type" "type_variable" "parenthesized_type" "polymorphic_variant_type" "hash_type" "local_open_type" "aliased_type"))) + ("abstract_type" (:*unnamed* ("type_constructor"))) + ("add_operator" (:*unnamed* nil)) + ("alias_pattern" (:*unnamed* ("tag_pattern" "local_open_pattern" "polymorphic_variant_pattern" "extension" "cons_pattern" "constructor_pattern" "quoted_extension" "tuple_pattern" "array_pattern" "package_pattern" "parenthesized_pattern" "value_pattern" "list_pattern" "or_pattern" "value_name" "parenthesized_operator" "range_pattern" "lazy_pattern" "record_pattern" "effect_pattern" "exception_pattern" "alias_pattern" "constructor_path" "tag" "typed_pattern"))) + ("aliased_type" (:*unnamed* ("function_type" "object_type" "type_constructor_path" "constructed_type" "extension" "package_type" "quoted_extension" "tuple_type" "type_variable" "parenthesized_type" "polymorphic_variant_type" "hash_type" "local_open_type" "aliased_type"))) + ("and_operator" (:*unnamed* nil)) + ("application_expression" (:*unnamed* nil :argument ("parenthesized_expression" "string" "quoted_string" "character" "hash_expression" "object_copy_expression" "bigarray_get_expression" "number" "extension" "method_invocation" "quoted_extension" "record_expression" "new_expression" "value_path" "array_get_expression" "list_expression" "package_expression" "ocamlyacc_value" "coercion_expression" "unit" "local_open_expression" "object_expression" "prefix_expression" "labeled_argument" "boolean" "array_expression" "string_get_expression" "field_get_expression" "constructor_path" "tag" "typed_expression") :function ("parenthesized_expression" "string" "quoted_string" "character" "hash_expression" "object_copy_expression" "bigarray_get_expression" "number" "extension" "method_invocation" "quoted_extension" "record_expression" "new_expression" "value_path" "array_get_expression" "list_expression" "package_expression" "ocamlyacc_value" "coercion_expression" "unit" "local_open_expression" "object_expression" "prefix_expression" "boolean" "array_expression" "string_get_expression" "field_get_expression" "constructor_path" "tag" "typed_expression"))) + ("array_binding_pattern" (:*unnamed* ("tag_pattern" "local_open_pattern" "polymorphic_variant_pattern" "extension" "cons_pattern" "constructor_pattern" "quoted_extension" "tuple_pattern" "array_pattern" "package_pattern" "parenthesized_pattern" "list_pattern" "or_pattern" "value_name" "parenthesized_operator" "range_pattern" "lazy_pattern" "record_pattern" "alias_pattern" "constructor_path" "tag" "typed_pattern"))) + ("array_expression" (:*unnamed* ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression"))) + ("array_get_expression" (:*unnamed* ("sign_expression" "string" "cons_expression" "hash_expression" "bigarray_get_expression" "product_expression" "lazy_expression" "extension" "record_expression" "let_exception_expression" "list_expression" "fun_expression" "function_expression" "sequence_expression" "unit" "for_expression" "local_open_expression" "prefix_expression" "try_expression" "string_get_expression" "indexing_operator_path" "field_get_expression" "parenthesized_expression" "tag" "infix_expression" "let_module_expression" "quoted_string" "character" "object_copy_expression" "number" "application_expression" "method_invocation" "quoted_extension" "new_expression" "value_path" "array_get_expression" "if_expression" "package_expression" "while_expression" "let_open_expression" "ocamlyacc_value" "let_expression" "match_expression" "coercion_expression" "set_expression" "object_expression" "boolean" "array_expression" "constructor_path" "assert_expression" "typed_expression"))) + ("array_pattern" (:*unnamed* ("tag_pattern" "local_open_pattern" "polymorphic_variant_pattern" "extension" "cons_pattern" "constructor_pattern" "quoted_extension" "tuple_pattern" "array_pattern" "package_pattern" "parenthesized_pattern" "list_pattern" "or_pattern" "value_name" "parenthesized_operator" "range_pattern" "lazy_pattern" "record_pattern" "effect_pattern" "exception_pattern" "alias_pattern" "constructor_path" "tag" "typed_pattern"))) + ("assert_expression" (:*unnamed* ("parenthesized_expression" "string" "quoted_string" "character" "hash_expression" "object_copy_expression" "bigarray_get_expression" "number" "extension" "method_invocation" "quoted_extension" "record_expression" "new_expression" "value_path" "array_get_expression" "list_expression" "package_expression" "ocamlyacc_value" "coercion_expression" "unit" "local_open_expression" "object_expression" "prefix_expression" "attribute_id" "boolean" "array_expression" "string_get_expression" "field_get_expression" "constructor_path" "tag" "typed_expression"))) + ("assign_operator" (:*unnamed* nil)) + ("attribute" (:*unnamed* ("attribute_id" "attribute_payload"))) + ("attribute_id" (:*unnamed* nil)) + ("attribute_payload" (:*unnamed* ("tag_pattern" "open_module" "package_type" "extension" "tuple_pattern" "parenthesized_type" "exception_definition" "lazy_pattern" "quoted_item_extension" "function_type" "module_definition" "toplevel_directive" "effect_pattern" "include_module" "type_variable" "polymorphic_variant_type" "type_definition" "value_specification" "hash_type" "value_definition" "class_type_definition" "include_module_type" "aliased_type" "class_definition" "object_type" "constructed_type" "cons_pattern" "constructor_pattern" "external" "quoted_extension" "guard" "or_pattern" "range_pattern" "local_open_type" "type_constructor_path" "tuple_type" "exception_pattern" "floating_attribute" "expression_item" "alias_pattern" "module_type_definition" "item_extension"))) + ("bigarray_get_expression" (:*unnamed* ("sign_expression" "string" "cons_expression" "hash_expression" "bigarray_get_expression" "product_expression" "lazy_expression" "extension" "record_expression" "let_exception_expression" "list_expression" "fun_expression" "function_expression" "sequence_expression" "unit" "for_expression" "local_open_expression" "prefix_expression" "try_expression" "string_get_expression" "indexing_operator_path" "field_get_expression" "parenthesized_expression" "tag" "infix_expression" "let_module_expression" "quoted_string" "character" "object_copy_expression" "number" "application_expression" "method_invocation" "quoted_extension" "new_expression" "value_path" "array_get_expression" "if_expression" "package_expression" "while_expression" "let_open_expression" "ocamlyacc_value" "let_expression" "match_expression" "coercion_expression" "set_expression" "object_expression" "boolean" "array_expression" "constructor_path" "assert_expression" "typed_expression"))) + ("boolean" (:*unnamed* nil)) + ("character" (:*unnamed* ("character_content"))) + ("character_content" (:*unnamed* ("escape_sequence"))) + ("class_application" (:*unnamed* nil :argument ("parenthesized_expression" "string" "quoted_string" "character" "hash_expression" "object_copy_expression" "bigarray_get_expression" "number" "extension" "method_invocation" "quoted_extension" "record_expression" "new_expression" "value_path" "array_get_expression" "list_expression" "package_expression" "ocamlyacc_value" "coercion_expression" "unit" "local_open_expression" "object_expression" "prefix_expression" "labeled_argument" "boolean" "array_expression" "string_get_expression" "field_get_expression" "constructor_path" "tag" "typed_expression") :class ("typed_class_expression" "instantiated_class" "class_path" "extension" "quoted_extension" "parenthesized_class_expression" "object_expression"))) + ("class_binding" (:*unnamed* ("abstract_type" "item_attribute" "parameter" "class_function_type" "type_variable") :body ("class_function" "let_open_class_expression" "let_class_expression" "class_application") :name ("class_name"))) + ("class_body_type" (:*unnamed* ("method_specification" "object_type" "constructed_type" "extension" "type_parameter_constraint" "package_type" "quoted_extension" "parenthesized_type" "instance_variable_specification" "local_open_type" "quoted_item_extension" "function_type" "type_constructor_path" "inheritance_specification" "tuple_type" "floating_attribute" "polymorphic_variant_type" "hash_type" "type_variable" "item_extension" "aliased_type"))) + ("class_definition" (:*unnamed* ("attribute_id" "class_binding"))) + ("class_function" (:*unnamed* ("parameter" "abstract_type") :body ("class_function" "let_open_class_expression" "let_class_expression" "class_application"))) + ("class_function_type" (:*unnamed* ("label_name" "object_type" "type_constructor_path" "constructed_type" "extension" "package_type" "class_function_type" "quoted_extension" "tuple_type" "local_open_type" "parenthesized_type" "polymorphic_variant_type" "hash_type" "type_variable"))) + ("class_initializer" (:*unnamed* ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "sequence_expression" "set_expression" "for_expression" "item_attribute" "try_expression" "infix_expression" "assert_expression" "let_module_expression"))) + ("class_name" (:*unnamed* nil)) + ("class_path" (:*unnamed* ("module_path" "class_name"))) + ("class_type_binding" (:*unnamed* ("item_attribute" "type_variable") :body ("instantiated_class_type" "let_open_class_type" "class_body_type" "class_type_path" "quoted_extension" "extension") :name ("class_type_name"))) + ("class_type_definition" (:*unnamed* ("attribute_id" "class_type_binding"))) + ("class_type_name" (:*unnamed* nil)) + ("class_type_path" (:*unnamed* ("extended_module_path" "class_type_name"))) + ("coercion_expression" (:*unnamed* ("sign_expression" "cons_expression" "package_type" "extension" "product_expression" "lazy_expression" "parenthesized_type" "let_exception_expression" "fun_expression" "function_expression" "function_type" "sequence_expression" "for_expression" "polymorphic_variant_type" "try_expression" "hash_type" "infix_expression" "aliased_type" "let_module_expression" "object_type" "constructed_type" "quoted_extension" "application_expression" "local_open_type" "if_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "type_constructor_path" "tuple_type" "set_expression" "type_variable" "assert_expression"))) + ("comment" (:*unnamed* nil)) + ("compilation_unit" (:*unnamed* ("module_type_definition" "quoted_item_extension" "class_definition" "module_definition" "open_module" "external" "floating_attribute" "type_definition" "value_specification" "class_type_definition" "include_module_type" "exception_definition" "item_extension"))) + ("concat_operator" (:*unnamed* nil)) + ("cons_expression" (:*unnamed* nil :left ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression") :right ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression"))) + ("cons_pattern" (:*unnamed* ("tag_pattern" "local_open_pattern" "polymorphic_variant_pattern" "extension" "cons_pattern" "constructor_pattern" "quoted_extension" "tuple_pattern" "array_pattern" "package_pattern" "parenthesized_pattern" "list_pattern" "or_pattern" "value_name" "parenthesized_operator" "range_pattern" "lazy_pattern" "record_pattern" "effect_pattern" "exception_pattern" "alias_pattern" "constructor_path" "tag" "typed_pattern"))) + ("constrain_module" (:*unnamed* ("module_path" "extended_module_path"))) + ("constrain_module_type" (:*unnamed* ("module_type_constraint" "functor_type" "extension" "quoted_extension" "module_type_path" "signature" "module_type_of" "parenthesized_module_type"))) + ("constrain_type" (:*unnamed* ("function_type" "object_type" "type_constructor_path" "constructed_type" "extension" "package_type" "quoted_extension" "tuple_type" "type_variable" "parenthesized_type" "polymorphic_variant_type" "hash_type" "type_constraint" "local_open_type" "aliased_type"))) + ("constructed_type" (:*unnamed* ("function_type" "object_type" "type_constructor_path" "constructed_type" "extension" "package_type" "quoted_extension" "tuple_type" "type_variable" "parenthesized_type" "polymorphic_variant_type" "hash_type" "local_open_type" "aliased_type"))) + ("constructor_declaration" (:*unnamed* ("object_type" "type_constructor_path" "constructed_type" "extension" "package_type" "quoted_extension" "constructor_name" "record_declaration" "type_variable" "parenthesized_type" "polymorphic_variant_type" "hash_type" "constructor_path" "local_open_type"))) + ("constructor_name" (:*unnamed* nil)) + ("constructor_path" (:*unnamed* ("module_path" "constructor_name"))) + ("constructor_pattern" (:*unnamed* ("lazy_pattern" "tag_pattern" "effect_pattern" "cons_pattern" "constructor_pattern" "exception_pattern" "tuple_pattern" "abstract_type" "alias_pattern" "or_pattern" "constructor_path" "range_pattern") :pattern ("tag_pattern" "local_open_pattern" "polymorphic_variant_pattern" "extension" "cons_pattern" "constructor_pattern" "quoted_extension" "tuple_pattern" "array_pattern" "package_pattern" "parenthesized_pattern" "list_pattern" "or_pattern" "value_name" "parenthesized_operator" "range_pattern" "lazy_pattern" "record_pattern" "alias_pattern" "constructor_path" "tag" "typed_pattern"))) + ("conversion_specification" (:*unnamed* nil)) + ("directive" (:*unnamed* nil)) + ("do_clause" (:*unnamed* ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "sequence_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression"))) + ("effect_pattern" (:*unnamed* nil :continuation ("string" "local_open_pattern" "quoted_string" "character" "polymorphic_variant_pattern" "extension" "number" "quoted_extension" "value_pattern" "array_pattern" "package_pattern" "parenthesized_pattern" "list_pattern" "parenthesized_operator" "record_pattern" "unit" "boolean" "signed_number" "constructor_path" "tag" "typed_pattern") :effect ("lazy_pattern" "constructor_pattern" "tag_pattern"))) + ("else_clause" (:*unnamed* ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression"))) + ("escape_sequence" (:*unnamed* nil)) + ("exception_definition" (:*unnamed* ("attribute_id" "item_attribute" "constructor_declaration"))) + ("exception_pattern" (:*unnamed* ("lazy_pattern" "tag_pattern" "effect_pattern" "cons_pattern" "constructor_pattern" "exception_pattern" "tuple_pattern" "attribute_id" "alias_pattern" "or_pattern" "range_pattern"))) + ("expression_item" (:*unnamed* ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "sequence_expression" "set_expression" "for_expression" "item_attribute" "try_expression" "infix_expression" "assert_expression" "let_module_expression"))) + ("extended_module_path" (:*unnamed* ("module_name" "extended_module_path"))) + ("extension" (:*unnamed* ("attribute_id" "attribute_payload"))) + ("external" (:*unnamed* ("string" "attribute_id" "item_attribute" "parenthesized_operator" "value_name" "polymorphic_type"))) + ("field_declaration" (:*unnamed* ("field_name" "polymorphic_type"))) + ("field_expression" (:*unnamed* ("function_type" "object_type" "type_constructor_path" "constructed_type" "extension" "package_type" "quoted_extension" "tuple_type" "type_variable" "parenthesized_type" "polymorphic_variant_type" "hash_type" "local_open_type" "aliased_type") :body ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression") :name ("field_path"))) + ("field_get_expression" (:*unnamed* ("parenthesized_expression" "string" "quoted_string" "character" "hash_expression" "object_copy_expression" "bigarray_get_expression" "number" "extension" "method_invocation" "quoted_extension" "record_expression" "new_expression" "value_path" "array_get_expression" "list_expression" "package_expression" "ocamlyacc_value" "coercion_expression" "unit" "local_open_expression" "object_expression" "prefix_expression" "boolean" "array_expression" "string_get_expression" "field_get_expression" "constructor_path" "tag" "field_path" "typed_expression"))) + ("field_name" (:*unnamed* nil)) + ("field_path" (:*unnamed* ("field_name" "module_path"))) + ("field_pattern" (:*unnamed* ("tag_pattern" "object_type" "constructed_type" "cons_pattern" "constructor_pattern" "extension" "package_type" "quoted_extension" "tuple_pattern" "parenthesized_type" "or_pattern" "range_pattern" "local_open_type" "lazy_pattern" "function_type" "type_constructor_path" "effect_pattern" "tuple_type" "exception_pattern" "polymorphic_variant_type" "hash_type" "alias_pattern" "type_variable" "field_path" "aliased_type") :pattern ("tag_pattern" "local_open_pattern" "polymorphic_variant_pattern" "extension" "cons_pattern" "constructor_pattern" "quoted_extension" "tuple_pattern" "array_pattern" "package_pattern" "parenthesized_pattern" "list_pattern" "or_pattern" "value_name" "parenthesized_operator" "range_pattern" "lazy_pattern" "record_pattern" "alias_pattern" "constructor_path" "tag" "typed_pattern"))) + ("floating_attribute" (:*unnamed* ("attribute_id" "attribute_payload"))) + ("for_expression" (:*unnamed* ("attribute_id" "do_clause") :from ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "sequence_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression") :name ("parenthesized_operator" "value_pattern") :to ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "sequence_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression"))) + ("fun_expression" (:*unnamed* ("object_type" "type_constructor_path" "constructed_type" "extension" "package_type" "quoted_extension" "local_open_type" "abstract_type" "parenthesized_type" "polymorphic_variant_type" "hash_type" "attribute_id" "parameter" "type_variable") :body ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "sequence_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression"))) + ("function_expression" (:*unnamed* ("attribute_id" "match_case"))) + ("function_type" (:*unnamed* ("function_type" "object_type" "type_constructor_path" "constructed_type" "extension" "package_type" "quoted_extension" "tuple_type" "type_variable" "parenthesized_type" "polymorphic_variant_type" "hash_type" "typed_label" "local_open_type" "aliased_type"))) + ("functor" (:*unnamed* ("module_parameter") :body ("module_path" "structure" "module_application" "functor"))) + ("functor_type" (:*unnamed* ("module_type_constraint" "module_parameter" "functor_type" "extension" "quoted_extension" "module_type_path" "signature" "module_type_of" "parenthesized_module_type"))) + ("guard" (:*unnamed* ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "sequence_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression"))) + ("hash_expression" (:*unnamed* nil :left ("parenthesized_expression" "string" "quoted_string" "character" "hash_expression" "object_copy_expression" "bigarray_get_expression" "number" "extension" "method_invocation" "quoted_extension" "record_expression" "new_expression" "value_path" "array_get_expression" "list_expression" "package_expression" "ocamlyacc_value" "coercion_expression" "unit" "local_open_expression" "object_expression" "prefix_expression" "boolean" "array_expression" "string_get_expression" "field_get_expression" "constructor_path" "tag" "typed_expression") :operator ("hash_operator") :right ("parenthesized_expression" "string" "quoted_string" "character" "hash_expression" "object_copy_expression" "bigarray_get_expression" "number" "extension" "method_invocation" "quoted_extension" "record_expression" "new_expression" "value_path" "array_get_expression" "list_expression" "package_expression" "ocamlyacc_value" "coercion_expression" "unit" "local_open_expression" "object_expression" "prefix_expression" "boolean" "array_expression" "string_get_expression" "field_get_expression" "constructor_path" "tag" "typed_expression"))) + ("hash_operator" (:*unnamed* nil)) + ("hash_type" (:*unnamed* ("function_type" "object_type" "type_constructor_path" "constructed_type" "extension" "package_type" "quoted_extension" "class_type_path" "tuple_type" "type_variable" "parenthesized_type" "polymorphic_variant_type" "hash_type" "local_open_type" "aliased_type"))) + ("if_expression" (:*unnamed* ("attribute_id" "else_clause" "then_clause") :condition ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "sequence_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression"))) + ("include_module" (:*unnamed* ("attribute_id" "item_attribute" "structure" "functor" "module_path" "module_application"))) + ("include_module_type" (:*unnamed* ("module_type_constraint" "functor_type" "extension" "quoted_extension" "module_type_path" "signature" "attribute_id" "item_attribute" "module_type_of" "parenthesized_module_type"))) + ("indexing_operator" (:*unnamed* nil)) + ("indexing_operator_path" (:*unnamed* ("module_path" "indexing_operator"))) + ("infix_expression" (:*unnamed* nil :left ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression") :operator ("pow_operator" "rel_operator" "concat_operator" "or_operator" "and_operator" "mult_operator" "add_operator" "assign_operator") :right ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression"))) + ("inheritance_definition" (:*unnamed* ("class_function" "item_attribute" "class_application" "let_open_class_expression" "parenthesized_operator" "let_class_expression" "value_pattern"))) + ("inheritance_specification" (:*unnamed* ("instantiated_class_type" "let_open_class_type" "class_body_type" "item_attribute" "class_type_path" "quoted_extension" "extension"))) + ("instance_variable_definition" (:*unnamed* ("function_type" "object_type" "type_constructor_path" "constructed_type" "extension" "package_type" "quoted_extension" "tuple_type" "type_variable" "parenthesized_type" "polymorphic_variant_type" "hash_type" "item_attribute" "local_open_type" "aliased_type") :body ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "sequence_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression") :name ("instance_variable_name"))) + ("instance_variable_expression" (:*unnamed* ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "instance_variable_name" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression"))) + ("instance_variable_name" (:*unnamed* nil)) + ("instance_variable_specification" (:*unnamed* ("object_type" "constructed_type" "extension" "package_type" "quoted_extension" "parenthesized_type" "local_open_type" "instance_variable_name" "function_type" "type_constructor_path" "tuple_type" "polymorphic_variant_type" "item_attribute" "hash_type" "type_variable" "aliased_type"))) + ("instantiated_class" (:*unnamed* ("function_type" "class_path" "object_type" "type_constructor_path" "constructed_type" "extension" "package_type" "quoted_extension" "tuple_type" "type_variable" "parenthesized_type" "polymorphic_variant_type" "hash_type" "local_open_type" "aliased_type"))) + ("instantiated_class_type" (:*unnamed* ("function_type" "object_type" "type_constructor_path" "constructed_type" "extension" "package_type" "quoted_extension" "tuple_type" "class_type_path" "type_variable" "parenthesized_type" "polymorphic_variant_type" "hash_type" "local_open_type" "aliased_type"))) + ("item_attribute" (:*unnamed* ("attribute_id" "attribute_payload"))) + ("item_extension" (:*unnamed* ("attribute_id" "item_attribute" "attribute_payload"))) + ("label_name" (:*unnamed* nil)) + ("labeled_argument" (:*unnamed* ("string" "hash_expression" "package_type" "bigarray_get_expression" "extension" "record_expression" "parenthesized_type" "list_expression" "function_type" "unit" "local_open_expression" "prefix_expression" "polymorphic_variant_type" "hash_type" "string_get_expression" "field_get_expression" "parenthesized_expression" "tag" "aliased_type" "label_name" "object_type" "quoted_string" "character" "object_copy_expression" "constructed_type" "number" "method_invocation" "quoted_extension" "new_expression" "value_path" "local_open_type" "array_get_expression" "package_expression" "ocamlyacc_value" "coercion_expression" "type_constructor_path" "tuple_type" "object_expression" "boolean" "array_expression" "constructor_path" "type_variable" "typed_expression"))) + ("lazy_expression" (:*unnamed* ("parenthesized_expression" "string" "quoted_string" "character" "hash_expression" "object_copy_expression" "bigarray_get_expression" "number" "extension" "method_invocation" "quoted_extension" "record_expression" "new_expression" "value_path" "array_get_expression" "list_expression" "package_expression" "ocamlyacc_value" "coercion_expression" "unit" "local_open_expression" "object_expression" "prefix_expression" "attribute_id" "boolean" "array_expression" "string_get_expression" "field_get_expression" "constructor_path" "tag" "typed_expression"))) + ("lazy_pattern" (:*unnamed* ("tag_pattern" "local_open_pattern" "polymorphic_variant_pattern" "extension" "cons_pattern" "constructor_pattern" "quoted_extension" "tuple_pattern" "array_pattern" "package_pattern" "parenthesized_pattern" "list_pattern" "or_pattern" "value_name" "parenthesized_operator" "range_pattern" "lazy_pattern" "record_pattern" "effect_pattern" "exception_pattern" "attribute_id" "alias_pattern" "constructor_path" "tag" "typed_pattern"))) + ("let_and_operator" (:*unnamed* nil)) + ("let_binding" (:*unnamed* ("parameter" "abstract_type" "item_attribute" "polymorphic_type") :body ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "sequence_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression") :pattern ("tag_pattern" "local_open_pattern" "polymorphic_variant_pattern" "extension" "cons_pattern" "constructor_pattern" "quoted_extension" "tuple_pattern" "array_pattern" "package_pattern" "parenthesized_pattern" "list_pattern" "or_pattern" "value_name" "parenthesized_operator" "range_pattern" "lazy_pattern" "record_pattern" "alias_pattern" "constructor_path" "tag" "typed_pattern"))) + ("let_class_expression" (:*unnamed* ("value_definition") :body ("class_function" "let_open_class_expression" "let_class_expression" "class_application"))) + ("let_exception_expression" (:*unnamed* ("exception_definition") :body ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "sequence_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression"))) + ("let_expression" (:*unnamed* ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "sequence_expression" "set_expression" "for_expression" "try_expression" "value_definition" "infix_expression" "assert_expression" "let_module_expression"))) + ("let_module_expression" (:*unnamed* ("module_definition") :body ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "sequence_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression"))) + ("let_open_class_expression" (:*unnamed* ("open_module") :body ("class_function" "let_open_class_expression" "let_class_expression" "class_application"))) + ("let_open_class_type" (:*unnamed* ("open_module") :body ("instantiated_class_type" "let_open_class_type" "class_body_type" "class_type_path" "quoted_extension" "extension"))) + ("let_open_expression" (:*unnamed* ("open_module") :body ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "sequence_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression"))) + ("let_operator" (:*unnamed* nil)) + ("line_number_directive" (:*unnamed* nil)) + ("list_binding_pattern" (:*unnamed* ("tag_pattern" "local_open_pattern" "polymorphic_variant_pattern" "extension" "cons_pattern" "constructor_pattern" "quoted_extension" "tuple_pattern" "array_pattern" "package_pattern" "parenthesized_pattern" "list_pattern" "or_pattern" "value_name" "parenthesized_operator" "range_pattern" "lazy_pattern" "record_pattern" "alias_pattern" "constructor_path" "tag" "typed_pattern"))) + ("list_expression" (:*unnamed* ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression"))) + ("list_pattern" (:*unnamed* ("tag_pattern" "local_open_pattern" "polymorphic_variant_pattern" "extension" "cons_pattern" "constructor_pattern" "quoted_extension" "tuple_pattern" "array_pattern" "package_pattern" "parenthesized_pattern" "list_pattern" "or_pattern" "value_name" "parenthesized_operator" "range_pattern" "lazy_pattern" "record_pattern" "effect_pattern" "exception_pattern" "alias_pattern" "constructor_path" "tag" "typed_pattern"))) + ("local_open_expression" (:*unnamed* ("sign_expression" "cons_expression" "object_copy_expression" "product_expression" "lazy_expression" "application_expression" "record_expression" "module_path" "let_exception_expression" "if_expression" "list_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "package_expression" "let_expression" "match_expression" "sequence_expression" "set_expression" "for_expression" "try_expression" "array_expression" "infix_expression" "assert_expression" "let_module_expression"))) + ("local_open_pattern" (:*unnamed* ("tag_pattern" "local_open_pattern" "polymorphic_variant_pattern" "extension" "cons_pattern" "constructor_pattern" "quoted_extension" "tuple_pattern" "array_pattern" "package_pattern" "parenthesized_pattern" "list_pattern" "or_pattern" "module_path" "value_name" "parenthesized_operator" "range_pattern" "lazy_pattern" "record_pattern" "list_binding_pattern" "effect_pattern" "exception_pattern" "record_binding_pattern" "alias_pattern" "constructor_path" "tag" "array_binding_pattern" "typed_pattern"))) + ("local_open_type" (:*unnamed* ("function_type" "object_type" "type_constructor_path" "constructed_type" "extension" "package_type" "quoted_extension" "tuple_type" "type_variable" "parenthesized_type" "polymorphic_variant_type" "hash_type" "extended_module_path" "local_open_type" "aliased_type"))) + ("match_case" (:*unnamed* ("guard") :body ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "refutation_case" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "sequence_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression") :pattern ("lazy_pattern" "tag_pattern" "effect_pattern" "cons_pattern" "constructor_pattern" "exception_pattern" "tuple_pattern" "alias_pattern" "or_pattern" "range_pattern"))) + ("match_expression" (:*unnamed* ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "match_operator" "let_expression" "match_expression" "sequence_expression" "set_expression" "for_expression" "attribute_id" "try_expression" "match_case" "infix_expression" "assert_expression" "let_module_expression"))) + ("match_operator" (:*unnamed* nil)) + ("method_definition" (:*unnamed* ("parameter" "abstract_type" "item_attribute" "polymorphic_type") :body ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "sequence_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression") :name ("method_name"))) + ("method_invocation" (:*unnamed* ("parenthesized_expression" "string" "quoted_string" "character" "hash_expression" "object_copy_expression" "bigarray_get_expression" "number" "extension" "method_invocation" "quoted_extension" "record_expression" "new_expression" "value_path" "array_get_expression" "list_expression" "package_expression" "ocamlyacc_value" "coercion_expression" "unit" "method_name" "local_open_expression" "object_expression" "prefix_expression" "boolean" "array_expression" "string_get_expression" "field_get_expression" "constructor_path" "tag" "typed_expression"))) + ("method_name" (:*unnamed* nil)) + ("method_specification" (:*unnamed* ("method_name" "item_attribute" "polymorphic_type"))) + ("method_type" (:*unnamed* ("method_name" "polymorphic_type"))) + ("module_application" (:*unnamed* nil :argument ("typed_module_expression" "extension" "quoted_extension" "parenthesized_module_expression" "packed_module") :functor ("module_path" "structure" "module_application" "functor"))) + ("module_binding" (:*unnamed* ("module_type_constraint" "module_parameter" "functor_type" "extension" "quoted_extension" "module_type_path" "signature" "item_attribute" "module_type_of" "parenthesized_module_type") :body ("module_path" "structure" "module_application" "functor") :name ("module_name"))) + ("module_definition" (:*unnamed* ("module_binding" "attribute_id"))) + ("module_name" (:*unnamed* nil)) + ("module_parameter" (:*unnamed* ("module_type_constraint" "functor_type" "extension" "quoted_extension" "module_type_path" "signature" "module_type_of" "parenthesized_module_type") :name ("module_name"))) + ("module_path" (:*unnamed* ("module_path" "module_name"))) + ("module_type_constraint" (:*unnamed* ("module_type_constraint" "constrain_type" "functor_type" "extension" "quoted_extension" "module_type_path" "signature" "constrain_module" "constrain_module_type" "module_type_of" "parenthesized_module_type"))) + ("module_type_definition" (:*unnamed* ("attribute_id" "item_attribute") :body ("module_type_constraint" "functor_type" "extension" "quoted_extension" "module_type_path" "signature" "module_type_of" "parenthesized_module_type") :name ("module_type_name"))) + ("module_type_name" (:*unnamed* nil)) + ("module_type_of" (:*unnamed* ("module_path" "structure" "module_application" "functor"))) + ("module_type_path" (:*unnamed* ("extended_module_path" "module_type_name"))) + ("mult_operator" (:*unnamed* nil)) + ("new_expression" (:*unnamed* ("attribute_id" "class_path"))) + ("number" (:*unnamed* nil)) + ("object_copy_expression" (:*unnamed* ("instance_variable_expression"))) + ("object_expression" (:*unnamed* ("tag_pattern" "package_type" "extension" "tuple_pattern" "parenthesized_type" "quoted_item_extension" "lazy_pattern" "function_type" "inheritance_definition" "effect_pattern" "method_definition" "polymorphic_variant_type" "hash_type" "aliased_type" "class_initializer" "object_type" "constructed_type" "cons_pattern" "type_parameter_constraint" "constructor_pattern" "quoted_extension" "or_pattern" "instance_variable_definition" "range_pattern" "local_open_type" "type_constructor_path" "tuple_type" "exception_pattern" "floating_attribute" "attribute_id" "alias_pattern" "type_variable" "item_extension"))) + ("object_type" (:*unnamed* ("object_type" "type_constructor_path" "constructed_type" "extension" "package_type" "quoted_extension" "type_variable" "parenthesized_type" "polymorphic_variant_type" "hash_type" "method_type" "local_open_type"))) + ("ocamlyacc_value" (:*unnamed* nil)) + ("open_module" (:*unnamed* ("attribute_id" "item_attribute" "structure" "functor" "module_path" "module_application"))) + ("or_operator" (:*unnamed* nil)) + ("or_pattern" (:*unnamed* ("tag_pattern" "local_open_pattern" "polymorphic_variant_pattern" "extension" "cons_pattern" "constructor_pattern" "quoted_extension" "tuple_pattern" "array_pattern" "package_pattern" "parenthesized_pattern" "list_pattern" "or_pattern" "value_name" "parenthesized_operator" "range_pattern" "lazy_pattern" "record_pattern" "effect_pattern" "exception_pattern" "alias_pattern" "constructor_path" "tag" "typed_pattern"))) + ("package_expression" (:*unnamed* ("module_type_constraint" "parenthesized_module_type" "functor_type" "extension" "quoted_extension" "module_type_path" "module_application" "signature" "attribute_id" "module_type_of" "functor" "structure" "module_path"))) + ("package_pattern" (:*unnamed* ("module_type_constraint" "functor_type" "extension" "quoted_extension" "module_name" "module_type_path" "signature" "attribute_id" "module_type_of" "parenthesized_module_type"))) + ("package_type" (:*unnamed* ("module_type_constraint" "functor_type" "extension" "quoted_extension" "module_type_path" "signature" "attribute_id" "module_type_of" "parenthesized_module_type"))) + ("packed_module" (:*unnamed* ("sign_expression" "module_type_constraint" "cons_expression" "functor_type" "extension" "product_expression" "lazy_expression" "application_expression" "quoted_extension" "module_type_of" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "set_expression" "for_expression" "module_type_path" "signature" "try_expression" "parenthesized_module_type" "infix_expression" "assert_expression" "let_module_expression"))) + ("parameter" (:*unnamed* ("sign_expression" "cons_expression" "package_type" "extension" "product_expression" "lazy_expression" "parenthesized_type" "let_exception_expression" "fun_expression" "function_expression" "function_type" "sequence_expression" "for_expression" "polymorphic_variant_type" "try_expression" "hash_type" "infix_expression" "aliased_type" "let_module_expression" "label_name" "object_type" "constructed_type" "quoted_extension" "application_expression" "local_open_type" "if_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "type_constructor_path" "tuple_type" "set_expression" "type_variable" "assert_expression") :pattern ("tag_pattern" "string" "local_open_pattern" "quoted_string" "character" "polymorphic_variant_pattern" "cons_pattern" "constructor_pattern" "extension" "number" "quoted_extension" "tuple_pattern" "value_pattern" "array_pattern" "package_pattern" "parenthesized_pattern" "list_pattern" "or_pattern" "range_pattern" "parenthesized_operator" "lazy_pattern" "signed_number" "record_pattern" "effect_pattern" "unit" "exception_pattern" "boolean" "alias_pattern" "constructor_path" "tag" "typed_pattern"))) + ("parenthesized_class_expression" (:*unnamed* ("class_function" "let_open_class_expression" "let_class_expression" "class_application"))) + ("parenthesized_expression" (:*unnamed* ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "sequence_expression" "set_expression" "for_expression" "attribute_id" "try_expression" "infix_expression" "assert_expression" "let_module_expression"))) + ("parenthesized_module_expression" (:*unnamed* ("module_path" "structure" "module_application" "functor"))) + ("parenthesized_module_type" (:*unnamed* ("module_type_constraint" "functor_type" "extension" "quoted_extension" "module_type_path" "signature" "module_type_of" "parenthesized_module_type"))) + ("parenthesized_operator" (:*unnamed* ("hash_operator" "match_operator" "pow_operator" "let_operator" "rel_operator" "prefix_operator" "concat_operator" "or_operator" "and_operator" "mult_operator" "add_operator" "indexing_operator" "let_and_operator" "assign_operator"))) + ("parenthesized_pattern" (:*unnamed* ("tag_pattern" "local_open_pattern" "polymorphic_variant_pattern" "extension" "cons_pattern" "constructor_pattern" "quoted_extension" "tuple_pattern" "array_pattern" "package_pattern" "parenthesized_pattern" "list_pattern" "or_pattern" "value_name" "parenthesized_operator" "range_pattern" "lazy_pattern" "record_pattern" "effect_pattern" "exception_pattern" "alias_pattern" "constructor_path" "tag" "typed_pattern"))) + ("parenthesized_type" (:*unnamed* ("function_type" "object_type" "type_constructor_path" "constructed_type" "extension" "package_type" "quoted_extension" "tuple_type" "type_variable" "parenthesized_type" "polymorphic_variant_type" "hash_type" "local_open_type" "aliased_type"))) + ("polymorphic_type" (:*unnamed* ("function_type" "object_type" "type_constructor_path" "constructed_type" "extension" "package_type" "quoted_extension" "tuple_type" "type_variable" "parenthesized_type" "polymorphic_variant_type" "hash_type" "abstract_type" "local_open_type" "aliased_type"))) + ("polymorphic_variant_pattern" (:*unnamed* ("type_constructor_path"))) + ("polymorphic_variant_type" (:*unnamed* ("object_type" "constructed_type" "extension" "package_type" "quoted_extension" "parenthesized_type" "local_open_type" "function_type" "tag_specification" "type_constructor_path" "tuple_type" "type_variable" "polymorphic_variant_type" "hash_type" "tag" "aliased_type"))) + ("pow_operator" (:*unnamed* nil)) + ("prefix_expression" (:*unnamed* nil :operator ("prefix_operator") :right ("parenthesized_expression" "string" "quoted_string" "character" "hash_expression" "object_copy_expression" "bigarray_get_expression" "number" "extension" "method_invocation" "quoted_extension" "record_expression" "new_expression" "value_path" "array_get_expression" "list_expression" "package_expression" "ocamlyacc_value" "coercion_expression" "unit" "local_open_expression" "object_expression" "prefix_expression" "boolean" "array_expression" "string_get_expression" "field_get_expression" "constructor_path" "tag" "typed_expression"))) + ("prefix_operator" (:*unnamed* nil)) + ("pretty_printing_indication" (:*unnamed* nil)) + ("product_expression" (:*unnamed* nil :left ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression") :right ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression"))) + ("quoted_extension" (:*unnamed* ("attribute_id" "quoted_string_content"))) + ("quoted_item_extension" (:*unnamed* ("attribute_id" "item_attribute" "quoted_string_content"))) + ("quoted_string" (:*unnamed* ("quoted_string_content"))) + ("quoted_string_content" (:*unnamed* ("pretty_printing_indication" "conversion_specification"))) + ("range_pattern" (:*unnamed* ("string" "boolean" "quoted_string" "character" "signed_number" "unit" "number"))) + ("record_binding_pattern" (:*unnamed* ("field_pattern"))) + ("record_declaration" (:*unnamed* ("field_declaration"))) + ("record_expression" (:*unnamed* ("parenthesized_expression" "string" "quoted_string" "character" "hash_expression" "object_copy_expression" "bigarray_get_expression" "number" "extension" "method_invocation" "quoted_extension" "record_expression" "new_expression" "value_path" "array_get_expression" "list_expression" "package_expression" "ocamlyacc_value" "coercion_expression" "unit" "local_open_expression" "object_expression" "prefix_expression" "field_expression" "boolean" "array_expression" "string_get_expression" "field_get_expression" "constructor_path" "tag" "typed_expression"))) + ("record_pattern" (:*unnamed* ("field_pattern"))) + ("refutation_case" (:*unnamed* nil)) + ("rel_operator" (:*unnamed* nil)) + ("sequence_expression" (:*unnamed* ("attribute_id") :left ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression") :right ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "sequence_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression"))) + ("set_expression" (:*unnamed* ("string_get_expression" "instance_variable_name" "bigarray_get_expression" "array_get_expression" "field_get_expression") :body ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression"))) + ("sign_expression" (:*unnamed* nil :operator ("sign_operator") :right ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression"))) + ("sign_operator" (:*unnamed* nil)) + ("signature" (:*unnamed* ("module_type_definition" "quoted_item_extension" "class_definition" "module_definition" "open_module" "external" "floating_attribute" "type_definition" "value_specification" "class_type_definition" "include_module_type" "exception_definition" "item_extension"))) + ("signed_number" (:*unnamed* nil)) + ("string" (:*unnamed* ("string_content"))) + ("string_content" (:*unnamed* ("escape_sequence" "pretty_printing_indication" "conversion_specification"))) + ("string_get_expression" (:*unnamed* ("sign_expression" "string" "cons_expression" "hash_expression" "bigarray_get_expression" "product_expression" "lazy_expression" "extension" "record_expression" "let_exception_expression" "list_expression" "fun_expression" "function_expression" "sequence_expression" "unit" "for_expression" "local_open_expression" "prefix_expression" "try_expression" "string_get_expression" "indexing_operator_path" "field_get_expression" "parenthesized_expression" "tag" "infix_expression" "let_module_expression" "quoted_string" "character" "object_copy_expression" "number" "application_expression" "method_invocation" "quoted_extension" "new_expression" "value_path" "array_get_expression" "if_expression" "package_expression" "while_expression" "let_open_expression" "ocamlyacc_value" "let_expression" "match_expression" "coercion_expression" "set_expression" "object_expression" "boolean" "array_expression" "constructor_path" "assert_expression" "typed_expression"))) + ("structure" (:*unnamed* ("module_type_definition" "quoted_item_extension" "toplevel_directive" "class_definition" "module_definition" "open_module" "external" "include_module" "floating_attribute" "expression_item" "type_definition" "value_definition" "class_type_definition" "exception_definition" "item_extension"))) + ("tag" (:*unnamed* nil)) + ("tag_pattern" (:*unnamed* ("lazy_pattern" "tag_pattern" "effect_pattern" "cons_pattern" "constructor_pattern" "exception_pattern" "tuple_pattern" "alias_pattern" "or_pattern" "range_pattern" "tag") :pattern ("tag_pattern" "local_open_pattern" "polymorphic_variant_pattern" "extension" "cons_pattern" "constructor_pattern" "quoted_extension" "tuple_pattern" "array_pattern" "package_pattern" "parenthesized_pattern" "list_pattern" "or_pattern" "value_name" "parenthesized_operator" "range_pattern" "lazy_pattern" "record_pattern" "alias_pattern" "constructor_path" "tag" "typed_pattern"))) + ("tag_specification" (:*unnamed* ("function_type" "object_type" "tag" "type_constructor_path" "constructed_type" "extension" "package_type" "quoted_extension" "tuple_type" "type_variable" "parenthesized_type" "polymorphic_variant_type" "hash_type" "local_open_type" "aliased_type"))) + ("then_clause" (:*unnamed* ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression"))) + ("toplevel_directive" (:*unnamed* ("value_path" "string" "directive" "quoted_string" "character" "unit" "number" "boolean" "module_path"))) + ("try_expression" (:*unnamed* ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "sequence_expression" "set_expression" "for_expression" "attribute_id" "try_expression" "match_case" "infix_expression" "assert_expression" "let_module_expression"))) + ("tuple_pattern" (:*unnamed* ("tag_pattern" "local_open_pattern" "polymorphic_variant_pattern" "extension" "cons_pattern" "constructor_pattern" "quoted_extension" "tuple_pattern" "array_pattern" "package_pattern" "parenthesized_pattern" "list_pattern" "or_pattern" "value_name" "parenthesized_operator" "range_pattern" "lazy_pattern" "record_pattern" "effect_pattern" "exception_pattern" "alias_pattern" "constructor_path" "tag" "typed_pattern"))) + ("tuple_type" (:*unnamed* ("object_type" "type_constructor_path" "constructed_type" "extension" "package_type" "quoted_extension" "tuple_type" "type_variable" "parenthesized_type" "polymorphic_variant_type" "hash_type" "local_open_type"))) + ("type_binding" (:*unnamed* ("object_type" "constructed_type" "extension" "package_type" "quoted_extension" "parenthesized_type" "local_open_type" "function_type" "type_constructor_path" "tuple_type" "polymorphic_variant_type" "item_attribute" "hash_type" "type_constraint" "type_variable" "aliased_type") :body ("variant_declaration" "record_declaration") :name ("type_constructor" "type_constructor_path"))) + ("type_constraint" (:*unnamed* ("function_type" "object_type" "type_constructor_path" "constructed_type" "extension" "package_type" "quoted_extension" "tuple_type" "type_variable" "parenthesized_type" "polymorphic_variant_type" "hash_type" "local_open_type" "aliased_type"))) + ("type_constructor" (:*unnamed* nil)) + ("type_constructor_path" (:*unnamed* ("type_constructor" "extended_module_path"))) + ("type_definition" (:*unnamed* ("attribute_id" "type_binding"))) + ("type_parameter_constraint" (:*unnamed* ("function_type" "object_type" "type_constructor_path" "constructed_type" "extension" "package_type" "quoted_extension" "tuple_type" "type_variable" "parenthesized_type" "polymorphic_variant_type" "hash_type" "item_attribute" "local_open_type" "aliased_type"))) + ("type_variable" (:*unnamed* nil)) + ("typed_class_expression" (:*unnamed* ("let_open_class_expression" "class_application" "class_function" "class_function_type" "let_class_expression"))) + ("typed_expression" (:*unnamed* ("sign_expression" "cons_expression" "package_type" "extension" "product_expression" "lazy_expression" "parenthesized_type" "let_exception_expression" "fun_expression" "function_expression" "function_type" "sequence_expression" "for_expression" "polymorphic_variant_type" "try_expression" "hash_type" "infix_expression" "aliased_type" "let_module_expression" "object_type" "constructed_type" "quoted_extension" "application_expression" "local_open_type" "if_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "type_constructor_path" "tuple_type" "set_expression" "type_variable" "assert_expression"))) + ("typed_label" (:*unnamed* ("function_type" "label_name" "object_type" "type_constructor_path" "constructed_type" "extension" "package_type" "quoted_extension" "tuple_type" "type_variable" "parenthesized_type" "polymorphic_variant_type" "hash_type" "local_open_type" "aliased_type"))) + ("typed_module_expression" (:*unnamed* ("module_type_constraint" "parenthesized_module_type" "functor_type" "extension" "quoted_extension" "module_type_path" "module_application" "signature" "module_type_of" "functor" "structure" "module_path"))) + ("typed_pattern" (:*unnamed* ("tag_pattern" "object_type" "constructed_type" "cons_pattern" "constructor_pattern" "extension" "package_type" "quoted_extension" "tuple_pattern" "parenthesized_type" "or_pattern" "range_pattern" "local_open_type" "lazy_pattern" "function_type" "type_constructor_path" "effect_pattern" "tuple_type" "exception_pattern" "polymorphic_variant_type" "hash_type" "alias_pattern" "type_variable" "aliased_type") :pattern ("tag_pattern" "local_open_pattern" "polymorphic_variant_pattern" "extension" "cons_pattern" "constructor_pattern" "quoted_extension" "tuple_pattern" "array_pattern" "package_pattern" "parenthesized_pattern" "list_pattern" "or_pattern" "value_name" "parenthesized_operator" "range_pattern" "lazy_pattern" "record_pattern" "alias_pattern" "constructor_path" "tag" "typed_pattern"))) + ("unit" (:*unnamed* nil)) + ("value_definition" (:*unnamed* ("attribute_id" "let_operator" "let_and_operator" "let_binding"))) + ("value_name" (:*unnamed* nil)) + ("value_path" (:*unnamed* ("module_path" "value_name" "parenthesized_operator"))) + ("value_pattern" (:*unnamed* nil)) + ("value_specification" (:*unnamed* ("attribute_id" "item_attribute" "parenthesized_operator" "value_name" "polymorphic_type"))) + ("variant_declaration" (:*unnamed* ("constructor_declaration"))) + ("while_expression" (:*unnamed* ("attribute_id" "do_clause") :condition ("sign_expression" "cons_expression" "product_expression" "lazy_expression" "application_expression" "let_exception_expression" "if_expression" "fun_expression" "function_expression" "while_expression" "let_open_expression" "let_expression" "match_expression" "sequence_expression" "set_expression" "for_expression" "try_expression" "infix_expression" "assert_expression" "let_module_expression"))) +)) +;; END Production rules for ocaml_interface +;; START Inverse production rules for ocaml_interface +(defconst combobulate-rules-ocaml_interface-inverse + '(("abstract_type" ("fun_expression" "class_binding" "constructor_pattern" "polymorphic_type" "method_definition" "_parameter" "class_function" "let_binding")) + ("add_operator" ("infix_expression" "parenthesized_operator" "_infix_operator")) + ("alias_pattern" ("tag_pattern" "field_pattern" "attribute_payload" "tuple_pattern" "array_pattern" "list_pattern" "parameter" "lazy_pattern" "array_binding_pattern" "let_binding" "typed_pattern" "local_open_pattern" "cons_pattern" "constructor_pattern" "_pattern" "parenthesized_pattern" "or_pattern" "list_binding_pattern" "exception_pattern" "object_expression" "_binding_pattern" "alias_pattern" "match_case")) + ("aliased_type" ("field_pattern" "attribute_payload" "parenthesized_type" "parameter" "instance_variable_specification" "function_type" "constrain_type" "field_expression" "instantiated_class_type" "hash_type" "polymorphic_variant_type" "typed_label" "type_binding" "aliased_type" "labeled_argument" "typed_pattern" "constructed_type" "type_parameter_constraint" "polymorphic_type" "instance_variable_definition" "_type" "local_open_type" "tag_specification" "coercion_expression" "object_expression" "instantiated_class" "class_body_type" "type_constraint" "typed_expression")) + ("and_operator" ("infix_expression" "parenthesized_operator" "_infix_operator")) + ("application_expression" ("sign_expression" "cons_expression" "instance_variable_expression" "bigarray_get_expression" "product_expression" "else_clause" "then_clause" "parameter" "let_exception_expression" "list_expression" "fun_expression" "sequence_expression" "for_expression" "method_definition" "local_open_expression" "field_expression" "try_expression" "string_get_expression" "parenthesized_expression" "infix_expression" "let_binding" "let_module_expression" "class_initializer" "_sequence_expression" "packed_module" "guard" "do_clause" "instance_variable_definition" "array_get_expression" "if_expression" "while_expression" "let_open_expression" "coercion_expression" "let_expression" "match_expression" "set_expression" "expression_item" "array_expression" "_expression" "match_case" "typed_expression")) + ("array_binding_pattern" ("local_open_pattern")) + ("array_expression" ("hash_expression" "class_application" "bigarray_get_expression" "method_invocation" "application_expression" "lazy_expression" "record_expression" "local_open_expression" "prefix_expression" "string_get_expression" "field_get_expression" "_simple_expression" "array_get_expression" "assert_expression" "labeled_argument")) + ("array_get_expression" ("hash_expression" "class_application" "bigarray_get_expression" "method_invocation" "application_expression" "lazy_expression" "record_expression" "set_expression" "prefix_expression" "string_get_expression" "field_get_expression" "_simple_expression" "array_get_expression" "assert_expression" "labeled_argument")) + ("array_pattern" ("tag_pattern" "field_pattern" "tuple_pattern" "array_pattern" "list_pattern" "parameter" "lazy_pattern" "effect_pattern" "array_binding_pattern" "let_binding" "typed_pattern" "local_open_pattern" "cons_pattern" "constructor_pattern" "parenthesized_pattern" "or_pattern" "list_binding_pattern" "_binding_pattern" "alias_pattern" "_simple_pattern")) + ("assert_expression" ("sign_expression" "cons_expression" "instance_variable_expression" "bigarray_get_expression" "product_expression" "else_clause" "then_clause" "parameter" "let_exception_expression" "list_expression" "fun_expression" "sequence_expression" "for_expression" "method_definition" "local_open_expression" "field_expression" "try_expression" "string_get_expression" "parenthesized_expression" "infix_expression" "let_binding" "let_module_expression" "class_initializer" "_sequence_expression" "packed_module" "guard" "do_clause" "instance_variable_definition" "array_get_expression" "if_expression" "while_expression" "let_open_expression" "coercion_expression" "let_expression" "match_expression" "set_expression" "expression_item" "array_expression" "_expression" "match_case" "typed_expression")) + ("assign_operator" ("infix_expression" "parenthesized_operator" "_infix_operator")) + ("attribute_id" ("open_module" "package_type" "extension" "lazy_expression" "package_pattern" "exception_definition" "fun_expression" "function_expression" "lazy_pattern" "module_definition" "quoted_item_extension" "sequence_expression" "attribute" "for_expression" "include_module" "item_attribute" "try_expression" "type_definition" "value_specification" "value_definition" "class_type_definition" "include_module_type" "parenthesized_expression" "class_definition" "external" "quoted_extension" "new_expression" "if_expression" "package_expression" "while_expression" "match_expression" "exception_pattern" "object_expression" "floating_attribute" "module_type_definition" "item_extension" "assert_expression")) + ("attribute_payload" ("attribute" "extension" "floating_attribute" "item_attribute" "item_extension")) + ("bigarray_get_expression" ("hash_expression" "class_application" "bigarray_get_expression" "method_invocation" "application_expression" "lazy_expression" "record_expression" "set_expression" "prefix_expression" "string_get_expression" "field_get_expression" "_simple_expression" "array_get_expression" "assert_expression" "labeled_argument")) + ("boolean" ("hash_expression" "class_application" "_constant" "bigarray_get_expression" "lazy_expression" "record_expression" "parameter" "_simple_expression" "toplevel_directive" "effect_pattern" "prefix_expression" "_signed_constant" "string_get_expression" "field_get_expression" "labeled_argument" "method_invocation" "application_expression" "range_pattern" "array_get_expression" "_simple_pattern" "assert_expression")) + ("character" ("hash_expression" "class_application" "_constant" "bigarray_get_expression" "lazy_expression" "record_expression" "parameter" "_simple_expression" "toplevel_directive" "effect_pattern" "prefix_expression" "_signed_constant" "string_get_expression" "field_get_expression" "labeled_argument" "method_invocation" "application_expression" "range_pattern" "array_get_expression" "_simple_pattern" "assert_expression")) + ("character_content" ("character")) + ("class_application" ("typed_class_expression" "inheritance_definition" "let_open_class_expression" "class_binding" "let_class_expression" "_class_expression" "parenthesized_class_expression" "class_function")) + ("class_binding" ("class_definition")) + ("class_body_type" ("inheritance_specification" "class_type_binding" "let_open_class_type" "_simple_class_type")) + ("class_definition" ("attribute_payload" "_signature_item" "compilation_unit" "signature" "structure" "_structure_item")) + ("class_function" ("typed_class_expression" "inheritance_definition" "let_open_class_expression" "class_binding" "let_class_expression" "_class_expression" "parenthesized_class_expression" "class_function")) + ("class_function_type" ("typed_class_expression" "class_binding" "class_function_type" "_class_type")) + ("class_initializer" ("_class_field" "object_expression")) + ("class_name" ("class_binding" "class_path")) + ("class_path" ("_simple_class_expression" "instantiated_class" "new_expression" "class_application")) + ("class_type_binding" ("class_type_definition")) + ("class_type_definition" ("attribute_payload" "_signature_item" "compilation_unit" "signature" "structure" "_structure_item")) + ("class_type_name" ("class_type_path" "class_type_binding")) + ("class_type_path" ("let_open_class_type" "inheritance_specification" "class_type_binding" "instantiated_class_type" "hash_type" "_simple_class_type")) + ("coercion_expression" ("hash_expression" "class_application" "bigarray_get_expression" "method_invocation" "application_expression" "lazy_expression" "record_expression" "prefix_expression" "string_get_expression" "field_get_expression" "_simple_expression" "array_get_expression" "assert_expression" "labeled_argument")) + ("concat_operator" ("infix_expression" "parenthesized_operator" "_infix_operator")) + ("cons_expression" ("sign_expression" "cons_expression" "instance_variable_expression" "bigarray_get_expression" "product_expression" "else_clause" "then_clause" "parameter" "let_exception_expression" "list_expression" "fun_expression" "sequence_expression" "for_expression" "method_definition" "local_open_expression" "field_expression" "try_expression" "string_get_expression" "parenthesized_expression" "infix_expression" "let_binding" "let_module_expression" "class_initializer" "_sequence_expression" "packed_module" "guard" "do_clause" "instance_variable_definition" "array_get_expression" "if_expression" "while_expression" "let_open_expression" "coercion_expression" "let_expression" "match_expression" "set_expression" "expression_item" "array_expression" "_expression" "match_case" "typed_expression")) + ("cons_pattern" ("tag_pattern" "field_pattern" "attribute_payload" "tuple_pattern" "array_pattern" "list_pattern" "parameter" "lazy_pattern" "array_binding_pattern" "let_binding" "typed_pattern" "local_open_pattern" "cons_pattern" "constructor_pattern" "_pattern" "parenthesized_pattern" "or_pattern" "list_binding_pattern" "exception_pattern" "object_expression" "_binding_pattern" "alias_pattern" "match_case")) + ("constrain_module" ("module_type_constraint")) + ("constrain_module_type" ("module_type_constraint")) + ("constrain_type" ("module_type_constraint")) + ("constructed_type" ("field_pattern" "attribute_payload" "_tuple_type" "constructor_declaration" "parenthesized_type" "parameter" "instance_variable_specification" "fun_expression" "function_type" "constrain_type" "field_expression" "instantiated_class_type" "hash_type" "polymorphic_variant_type" "typed_label" "type_binding" "aliased_type" "labeled_argument" "typed_pattern" "object_type" "constructed_type" "type_parameter_constraint" "class_function_type" "polymorphic_type" "_simple_type" "instance_variable_definition" "_type" "local_open_type" "tag_specification" "coercion_expression" "tuple_type" "object_expression" "instantiated_class" "class_body_type" "type_constraint" "typed_expression")) + ("constructor_declaration" ("exception_definition" "variant_declaration")) + ("constructor_name" ("constructor_declaration" "constructor_path")) + ("constructor_path" ("tag_pattern" "field_pattern" "hash_expression" "class_application" "bigarray_get_expression" "lazy_expression" "record_expression" "tuple_pattern" "array_pattern" "constructor_declaration" "list_pattern" "parameter" "_simple_expression" "lazy_pattern" "effect_pattern" "prefix_expression" "string_get_expression" "field_get_expression" "array_binding_pattern" "labeled_argument" "let_binding" "typed_pattern" "local_open_pattern" "cons_pattern" "constructor_pattern" "application_expression" "method_invocation" "parenthesized_pattern" "or_pattern" "array_get_expression" "list_binding_pattern" "_binding_pattern" "alias_pattern" "_simple_pattern" "assert_expression")) + ("constructor_pattern" ("tag_pattern" "field_pattern" "attribute_payload" "tuple_pattern" "array_pattern" "list_pattern" "parameter" "lazy_pattern" "effect_pattern" "array_binding_pattern" "let_binding" "typed_pattern" "local_open_pattern" "cons_pattern" "constructor_pattern" "_pattern" "parenthesized_pattern" "or_pattern" "list_binding_pattern" "exception_pattern" "object_expression" "_binding_pattern" "_effect_pattern" "alias_pattern" "match_case")) + ("conversion_specification" ("string_content" "quoted_string_content")) + ("directive" ("toplevel_directive")) + ("do_clause" ("while_expression" "for_expression")) + ("effect_pattern" ("tag_pattern" "field_pattern" "attribute_payload" "tuple_pattern" "array_pattern" "list_pattern" "parameter" "lazy_pattern" "typed_pattern" "local_open_pattern" "cons_pattern" "constructor_pattern" "_pattern" "parenthesized_pattern" "or_pattern" "exception_pattern" "object_expression" "alias_pattern" "match_case")) + ("else_clause" ("if_expression")) + ("escape_sequence" ("string_content" "character_content")) + ("exception_definition" ("attribute_payload" "_signature_item" "compilation_unit" "signature" "structure" "_structure_item" "let_exception_expression")) + ("exception_pattern" ("tag_pattern" "field_pattern" "attribute_payload" "tuple_pattern" "array_pattern" "list_pattern" "parameter" "lazy_pattern" "typed_pattern" "local_open_pattern" "cons_pattern" "constructor_pattern" "_pattern" "parenthesized_pattern" "or_pattern" "exception_pattern" "object_expression" "alias_pattern" "match_case")) + ("expression_item" ("structure" "attribute_payload")) + ("extended_module_path" ("type_constructor_path" "class_type_path" "module_type_path" "constrain_module" "extended_module_path" "local_open_type")) + ("extension" ("hash_expression" "typed_module_expression" "functor_type" "package_type" "tuple_pattern" "parenthesized_type" "parameter" "_simple_expression" "fun_expression" "constrain_type" "effect_pattern" "instantiated_class_type" "field_get_expression" "type_binding" "polymorphic_type" "packed_module" "_simple_type" "or_pattern" "instance_variable_definition" "class_body_type" "alias_pattern" "module_type_definition" "tag_pattern" "field_pattern" "module_parameter" "package_pattern" "constructor_declaration" "instance_variable_specification" "module_application" "prefix_expression" "field_expression" "typed_label" "array_binding_pattern" "aliased_type" "labeled_argument" "_simple_module_expression" "constructed_type" "cons_pattern" "method_invocation" "application_expression" "class_function_type" "module_binding" "_simple_class_expression" "array_get_expression" "tag_specification" "coercion_expression" "let_open_class_type" "class_type_binding" "constrain_module_type" "instantiated_class" "_simple_class_type" "assert_expression" "typed_expression" "module_type_constraint" "_tuple_type" "record_expression" "lazy_pattern" "inheritance_specification" "local_open_pattern" "object_type" "_type" "list_binding_pattern" "object_expression" "_simple_pattern" "class_application" "attribute_payload" "bigarray_get_expression" "lazy_expression" "array_pattern" "list_pattern" "function_type" "polymorphic_variant_type" "hash_type" "string_get_expression" "include_module_type" "let_binding" "typed_pattern" "constructor_pattern" "type_parameter_constraint" "parenthesized_pattern" "local_open_type" "package_expression" "tuple_type" "_binding_pattern" "_module_type" "parenthesized_module_type" "type_constraint")) + ("external" ("attribute_payload" "_signature_item" "compilation_unit" "signature" "structure" "_structure_item")) + ("field_declaration" ("record_declaration")) + ("field_expression" ("record_expression")) + ("field_get_expression" ("hash_expression" "class_application" "bigarray_get_expression" "method_invocation" "application_expression" "lazy_expression" "record_expression" "set_expression" "prefix_expression" "string_get_expression" "field_get_expression" "_simple_expression" "array_get_expression" "assert_expression" "labeled_argument")) + ("field_name" ("field_path" "field_declaration")) + ("field_path" ("field_get_expression" "field_expression" "field_pattern")) + ("field_pattern" ("record_pattern" "record_binding_pattern")) + ("floating_attribute" ("attribute_payload" "_signature_item" "compilation_unit" "object_expression" "signature" "class_body_type" "structure" "_structure_item")) + ("for_expression" ("sign_expression" "cons_expression" "instance_variable_expression" "bigarray_get_expression" "product_expression" "else_clause" "then_clause" "parameter" "let_exception_expression" "list_expression" "fun_expression" "sequence_expression" "for_expression" "method_definition" "local_open_expression" "field_expression" "try_expression" "string_get_expression" "parenthesized_expression" "infix_expression" "let_binding" "let_module_expression" "class_initializer" "_sequence_expression" "packed_module" "guard" "do_clause" "instance_variable_definition" "array_get_expression" "if_expression" "while_expression" "let_open_expression" "coercion_expression" "let_expression" "match_expression" "set_expression" "expression_item" "array_expression" "_expression" "match_case" "typed_expression")) + ("fun_expression" ("sign_expression" "cons_expression" "instance_variable_expression" "bigarray_get_expression" "product_expression" "else_clause" "then_clause" "parameter" "let_exception_expression" "list_expression" "fun_expression" "sequence_expression" "for_expression" "method_definition" "local_open_expression" "field_expression" "try_expression" "string_get_expression" "parenthesized_expression" "infix_expression" "let_binding" "let_module_expression" "class_initializer" "_sequence_expression" "packed_module" "guard" "do_clause" "instance_variable_definition" "array_get_expression" "if_expression" "while_expression" "let_open_expression" "coercion_expression" "let_expression" "match_expression" "set_expression" "expression_item" "array_expression" "_expression" "match_case" "typed_expression")) + ("function_expression" ("sign_expression" "cons_expression" "instance_variable_expression" "bigarray_get_expression" "product_expression" "else_clause" "then_clause" "parameter" "let_exception_expression" "list_expression" "fun_expression" "sequence_expression" "for_expression" "method_definition" "local_open_expression" "field_expression" "try_expression" "string_get_expression" "parenthesized_expression" "infix_expression" "let_binding" "let_module_expression" "class_initializer" "_sequence_expression" "packed_module" "guard" "do_clause" "instance_variable_definition" "array_get_expression" "if_expression" "while_expression" "let_open_expression" "coercion_expression" "let_expression" "match_expression" "set_expression" "expression_item" "array_expression" "_expression" "match_case" "typed_expression")) + ("function_type" ("field_pattern" "attribute_payload" "parenthesized_type" "parameter" "instance_variable_specification" "function_type" "constrain_type" "field_expression" "instantiated_class_type" "hash_type" "polymorphic_variant_type" "typed_label" "type_binding" "aliased_type" "labeled_argument" "typed_pattern" "constructed_type" "type_parameter_constraint" "polymorphic_type" "instance_variable_definition" "_type" "local_open_type" "tag_specification" "coercion_expression" "object_expression" "instantiated_class" "class_body_type" "type_constraint" "typed_expression")) + ("functor" ("package_expression" "typed_module_expression" "open_module" "module_binding" "include_module" "module_application" "parenthesized_module_expression" "module_type_of" "functor" "_module_expression")) + ("functor_type" ("package_expression" "module_type_constraint" "typed_module_expression" "module_parameter" "functor_type" "module_binding" "package_type" "package_pattern" "packed_module" "_module_type" "constrain_module_type" "parenthesized_module_type" "include_module_type" "module_type_definition")) + ("guard" ("match_case" "attribute_payload")) + ("hash_expression" ("hash_expression" "class_application" "bigarray_get_expression" "method_invocation" "application_expression" "lazy_expression" "record_expression" "prefix_expression" "string_get_expression" "field_get_expression" "_simple_expression" "array_get_expression" "assert_expression" "labeled_argument")) + ("hash_operator" ("parenthesized_operator" "hash_expression")) + ("hash_type" ("field_pattern" "attribute_payload" "_tuple_type" "constructor_declaration" "parenthesized_type" "parameter" "instance_variable_specification" "fun_expression" "function_type" "constrain_type" "field_expression" "instantiated_class_type" "hash_type" "polymorphic_variant_type" "typed_label" "type_binding" "aliased_type" "labeled_argument" "typed_pattern" "object_type" "constructed_type" "type_parameter_constraint" "class_function_type" "polymorphic_type" "_simple_type" "instance_variable_definition" "_type" "local_open_type" "tag_specification" "coercion_expression" "tuple_type" "object_expression" "instantiated_class" "class_body_type" "type_constraint" "typed_expression")) + ("if_expression" ("sign_expression" "cons_expression" "instance_variable_expression" "bigarray_get_expression" "product_expression" "else_clause" "then_clause" "parameter" "let_exception_expression" "list_expression" "fun_expression" "sequence_expression" "for_expression" "method_definition" "local_open_expression" "field_expression" "try_expression" "string_get_expression" "parenthesized_expression" "infix_expression" "let_binding" "let_module_expression" "class_initializer" "_sequence_expression" "packed_module" "guard" "do_clause" "instance_variable_definition" "array_get_expression" "if_expression" "while_expression" "let_open_expression" "coercion_expression" "let_expression" "match_expression" "set_expression" "expression_item" "array_expression" "_expression" "match_case" "typed_expression")) + ("include_module" ("_structure_item" "structure" "attribute_payload")) + ("include_module_type" ("signature" "_signature_item" "compilation_unit" "attribute_payload")) + ("indexing_operator" ("indexing_operator_path" "parenthesized_operator")) + ("indexing_operator_path" ("bigarray_get_expression" "array_get_expression" "string_get_expression")) + ("infix_expression" ("sign_expression" "cons_expression" "instance_variable_expression" "bigarray_get_expression" "product_expression" "else_clause" "then_clause" "parameter" "let_exception_expression" "list_expression" "fun_expression" "sequence_expression" "for_expression" "method_definition" "local_open_expression" "field_expression" "try_expression" "string_get_expression" "parenthesized_expression" "infix_expression" "let_binding" "let_module_expression" "class_initializer" "_sequence_expression" "packed_module" "guard" "do_clause" "instance_variable_definition" "array_get_expression" "if_expression" "while_expression" "let_open_expression" "coercion_expression" "let_expression" "match_expression" "set_expression" "expression_item" "array_expression" "_expression" "match_case" "typed_expression")) + ("inheritance_definition" ("_class_field" "object_expression")) + ("inheritance_specification" ("_class_field_specification" "class_body_type")) + ("instance_variable_definition" ("_class_field" "object_expression")) + ("instance_variable_expression" ("object_copy_expression")) + ("instance_variable_name" ("instance_variable_definition" "set_expression" "instance_variable_specification" "instance_variable_expression")) + ("instance_variable_specification" ("_class_field_specification" "class_body_type")) + ("instantiated_class" ("_simple_class_expression" "class_application")) + ("instantiated_class_type" ("inheritance_specification" "class_type_binding" "let_open_class_type" "_simple_class_type")) + ("item_attribute" ("open_module" "instance_variable_specification" "exception_definition" "quoted_item_extension" "inheritance_definition" "inheritance_specification" "include_module" "method_definition" "value_specification" "include_module_type" "type_binding" "let_binding" "class_initializer" "method_specification" "module_binding" "external" "type_parameter_constraint" "instance_variable_definition" "class_binding" "expression_item" "class_type_binding" "module_type_definition" "item_extension")) + ("item_extension" ("_class_field" "attribute_payload" "_signature_item" "compilation_unit" "object_expression" "_class_field_specification" "signature" "class_body_type" "structure" "_structure_item")) + ("label_name" ("parameter" "class_function_type" "typed_label" "labeled_argument")) + ("labeled_argument" ("application_expression" "class_application")) + ("lazy_expression" ("sign_expression" "cons_expression" "instance_variable_expression" "bigarray_get_expression" "product_expression" "else_clause" "then_clause" "parameter" "let_exception_expression" "list_expression" "fun_expression" "sequence_expression" "for_expression" "method_definition" "local_open_expression" "field_expression" "try_expression" "string_get_expression" "parenthesized_expression" "infix_expression" "let_binding" "let_module_expression" "class_initializer" "_sequence_expression" "packed_module" "guard" "do_clause" "instance_variable_definition" "array_get_expression" "if_expression" "while_expression" "let_open_expression" "coercion_expression" "let_expression" "match_expression" "set_expression" "expression_item" "array_expression" "_expression" "match_case" "typed_expression")) + ("lazy_pattern" ("tag_pattern" "field_pattern" "attribute_payload" "tuple_pattern" "array_pattern" "list_pattern" "parameter" "lazy_pattern" "effect_pattern" "array_binding_pattern" "let_binding" "typed_pattern" "local_open_pattern" "cons_pattern" "constructor_pattern" "_pattern" "parenthesized_pattern" "or_pattern" "list_binding_pattern" "exception_pattern" "object_expression" "_binding_pattern" "_effect_pattern" "alias_pattern" "match_case")) + ("let_and_operator" ("parenthesized_operator" "value_definition")) + ("let_binding" ("value_definition")) + ("let_class_expression" ("typed_class_expression" "inheritance_definition" "let_open_class_expression" "class_binding" "let_class_expression" "_class_expression" "parenthesized_class_expression" "class_function")) + ("let_exception_expression" ("sign_expression" "cons_expression" "instance_variable_expression" "bigarray_get_expression" "product_expression" "else_clause" "then_clause" "parameter" "let_exception_expression" "list_expression" "fun_expression" "sequence_expression" "for_expression" "method_definition" "local_open_expression" "field_expression" "try_expression" "string_get_expression" "parenthesized_expression" "infix_expression" "let_binding" "let_module_expression" "class_initializer" "_sequence_expression" "packed_module" "guard" "do_clause" "instance_variable_definition" "array_get_expression" "if_expression" "while_expression" "let_open_expression" "coercion_expression" "let_expression" "match_expression" "set_expression" "expression_item" "array_expression" "_expression" "match_case" "typed_expression")) + ("let_expression" ("sign_expression" "cons_expression" "instance_variable_expression" "bigarray_get_expression" "product_expression" "else_clause" "then_clause" "parameter" "let_exception_expression" "list_expression" "fun_expression" "sequence_expression" "for_expression" "method_definition" "local_open_expression" "field_expression" "try_expression" "string_get_expression" "parenthesized_expression" "infix_expression" "let_binding" "let_module_expression" "class_initializer" "_sequence_expression" "packed_module" "guard" "do_clause" "instance_variable_definition" "array_get_expression" "if_expression" "while_expression" "let_open_expression" "coercion_expression" "let_expression" "match_expression" "set_expression" "expression_item" "array_expression" "_expression" "match_case" "typed_expression")) + ("let_module_expression" ("sign_expression" "cons_expression" "instance_variable_expression" "bigarray_get_expression" "product_expression" "else_clause" "then_clause" "parameter" "let_exception_expression" "list_expression" "fun_expression" "sequence_expression" "for_expression" "method_definition" "local_open_expression" "field_expression" "try_expression" "string_get_expression" "parenthesized_expression" "infix_expression" "let_binding" "let_module_expression" "class_initializer" "_sequence_expression" "packed_module" "guard" "do_clause" "instance_variable_definition" "array_get_expression" "if_expression" "while_expression" "let_open_expression" "coercion_expression" "let_expression" "match_expression" "set_expression" "expression_item" "array_expression" "_expression" "match_case" "typed_expression")) + ("let_open_class_expression" ("typed_class_expression" "inheritance_definition" "let_open_class_expression" "class_binding" "let_class_expression" "_class_expression" "parenthesized_class_expression" "class_function")) + ("let_open_class_type" ("inheritance_specification" "class_type_binding" "let_open_class_type" "_simple_class_type")) + ("let_open_expression" ("sign_expression" "cons_expression" "instance_variable_expression" "bigarray_get_expression" "product_expression" "else_clause" "then_clause" "parameter" "let_exception_expression" "list_expression" "fun_expression" "sequence_expression" "for_expression" "method_definition" "local_open_expression" "field_expression" "try_expression" "string_get_expression" "parenthesized_expression" "infix_expression" "let_binding" "let_module_expression" "class_initializer" "_sequence_expression" "packed_module" "guard" "do_clause" "instance_variable_definition" "array_get_expression" "if_expression" "while_expression" "let_open_expression" "coercion_expression" "let_expression" "match_expression" "set_expression" "expression_item" "array_expression" "_expression" "match_case" "typed_expression")) + ("let_operator" ("parenthesized_operator" "value_definition")) + ("list_binding_pattern" ("local_open_pattern")) + ("list_expression" ("hash_expression" "class_application" "bigarray_get_expression" "method_invocation" "application_expression" "lazy_expression" "record_expression" "local_open_expression" "prefix_expression" "string_get_expression" "field_get_expression" "_simple_expression" "array_get_expression" "assert_expression" "labeled_argument")) + ("list_pattern" ("tag_pattern" "field_pattern" "tuple_pattern" "array_pattern" "list_pattern" "parameter" "lazy_pattern" "effect_pattern" "array_binding_pattern" "let_binding" "typed_pattern" "local_open_pattern" "cons_pattern" "constructor_pattern" "parenthesized_pattern" "or_pattern" "list_binding_pattern" "_binding_pattern" "alias_pattern" "_simple_pattern")) + ("local_open_expression" ("hash_expression" "class_application" "bigarray_get_expression" "method_invocation" "application_expression" "lazy_expression" "record_expression" "prefix_expression" "string_get_expression" "field_get_expression" "_simple_expression" "array_get_expression" "assert_expression" "labeled_argument")) + ("local_open_pattern" ("tag_pattern" "field_pattern" "tuple_pattern" "array_pattern" "list_pattern" "parameter" "lazy_pattern" "effect_pattern" "array_binding_pattern" "let_binding" "typed_pattern" "local_open_pattern" "cons_pattern" "constructor_pattern" "parenthesized_pattern" "or_pattern" "list_binding_pattern" "_binding_pattern" "alias_pattern" "_simple_pattern")) + ("local_open_type" ("field_pattern" "attribute_payload" "_tuple_type" "constructor_declaration" "parenthesized_type" "parameter" "instance_variable_specification" "fun_expression" "function_type" "constrain_type" "field_expression" "instantiated_class_type" "hash_type" "polymorphic_variant_type" "typed_label" "type_binding" "aliased_type" "labeled_argument" "typed_pattern" "object_type" "constructed_type" "type_parameter_constraint" "class_function_type" "polymorphic_type" "_simple_type" "instance_variable_definition" "_type" "local_open_type" "tag_specification" "coercion_expression" "tuple_type" "object_expression" "instantiated_class" "class_body_type" "type_constraint" "typed_expression")) + ("match_case" ("function_expression" "try_expression" "match_expression")) + ("match_expression" ("sign_expression" "cons_expression" "instance_variable_expression" "bigarray_get_expression" "product_expression" "else_clause" "then_clause" "parameter" "let_exception_expression" "list_expression" "fun_expression" "sequence_expression" "for_expression" "method_definition" "local_open_expression" "field_expression" "try_expression" "string_get_expression" "parenthesized_expression" "infix_expression" "let_binding" "let_module_expression" "class_initializer" "_sequence_expression" "packed_module" "guard" "do_clause" "instance_variable_definition" "array_get_expression" "if_expression" "while_expression" "let_open_expression" "coercion_expression" "let_expression" "match_expression" "set_expression" "expression_item" "array_expression" "_expression" "match_case" "typed_expression")) + ("match_operator" ("parenthesized_operator" "match_expression")) + ("method_definition" ("_class_field" "object_expression")) + ("method_invocation" ("hash_expression" "class_application" "bigarray_get_expression" "method_invocation" "application_expression" "lazy_expression" "record_expression" "prefix_expression" "string_get_expression" "field_get_expression" "_simple_expression" "array_get_expression" "assert_expression" "labeled_argument")) + ("method_name" ("method_specification" "method_invocation" "method_type" "method_definition")) + ("method_specification" ("_class_field_specification" "class_body_type")) + ("method_type" ("object_type")) + ("module_application" ("package_expression" "typed_module_expression" "open_module" "module_binding" "include_module" "module_application" "parenthesized_module_expression" "module_type_of" "functor" "_module_expression")) + ("module_binding" ("module_definition")) + ("module_definition" ("attribute_payload" "_signature_item" "compilation_unit" "signature" "structure" "_structure_item" "let_module_expression")) + ("module_name" ("module_parameter" "module_binding" "package_pattern" "extended_module_path" "module_path")) + ("module_parameter" ("functor_type" "module_binding" "functor")) + ("module_path" ("typed_module_expression" "open_module" "module_type_of" "_module_expression" "toplevel_directive" "include_module" "module_application" "local_open_expression" "constrain_module" "indexing_operator_path" "local_open_pattern" "module_binding" "parenthesized_module_expression" "functor" "module_path" "value_path" "package_expression" "class_path" "constructor_path" "field_path")) + ("module_type_constraint" ("package_expression" "module_type_constraint" "typed_module_expression" "module_parameter" "functor_type" "module_binding" "package_type" "package_pattern" "packed_module" "_module_type" "constrain_module_type" "parenthesized_module_type" "include_module_type" "module_type_definition")) + ("module_type_definition" ("attribute_payload" "_signature_item" "compilation_unit" "signature" "structure" "_structure_item")) + ("module_type_name" ("module_type_definition" "module_type_path")) + ("module_type_of" ("package_expression" "module_type_constraint" "typed_module_expression" "module_parameter" "functor_type" "module_binding" "package_type" "package_pattern" "packed_module" "_module_type" "constrain_module_type" "parenthesized_module_type" "include_module_type" "module_type_definition")) + ("module_type_path" ("package_expression" "module_type_constraint" "typed_module_expression" "module_parameter" "functor_type" "module_binding" "package_type" "package_pattern" "packed_module" "_module_type" "constrain_module_type" "parenthesized_module_type" "include_module_type" "module_type_definition")) + ("mult_operator" ("infix_expression" "parenthesized_operator" "_infix_operator")) + ("new_expression" ("hash_expression" "class_application" "bigarray_get_expression" "method_invocation" "application_expression" "lazy_expression" "record_expression" "prefix_expression" "string_get_expression" "field_get_expression" "_simple_expression" "array_get_expression" "assert_expression" "labeled_argument")) + ("number" ("hash_expression" "class_application" "_constant" "bigarray_get_expression" "lazy_expression" "record_expression" "parameter" "_simple_expression" "toplevel_directive" "effect_pattern" "prefix_expression" "_signed_constant" "string_get_expression" "field_get_expression" "labeled_argument" "method_invocation" "application_expression" "range_pattern" "array_get_expression" "_simple_pattern" "assert_expression")) + ("object_copy_expression" ("hash_expression" "class_application" "bigarray_get_expression" "method_invocation" "application_expression" "lazy_expression" "record_expression" "local_open_expression" "prefix_expression" "string_get_expression" "field_get_expression" "_simple_expression" "array_get_expression" "assert_expression" "labeled_argument")) + ("object_expression" ("hash_expression" "class_application" "bigarray_get_expression" "method_invocation" "application_expression" "lazy_expression" "record_expression" "prefix_expression" "_simple_class_expression" "string_get_expression" "field_get_expression" "_simple_expression" "array_get_expression" "assert_expression" "labeled_argument")) + ("object_type" ("field_pattern" "attribute_payload" "_tuple_type" "constructor_declaration" "parenthesized_type" "parameter" "instance_variable_specification" "fun_expression" "function_type" "constrain_type" "field_expression" "instantiated_class_type" "hash_type" "polymorphic_variant_type" "typed_label" "type_binding" "aliased_type" "labeled_argument" "typed_pattern" "object_type" "constructed_type" "type_parameter_constraint" "class_function_type" "polymorphic_type" "_simple_type" "instance_variable_definition" "_type" "local_open_type" "tag_specification" "coercion_expression" "tuple_type" "object_expression" "instantiated_class" "class_body_type" "type_constraint" "typed_expression")) + ("ocamlyacc_value" ("hash_expression" "class_application" "bigarray_get_expression" "method_invocation" "application_expression" "lazy_expression" "record_expression" "prefix_expression" "string_get_expression" "field_get_expression" "_simple_expression" "array_get_expression" "assert_expression" "labeled_argument")) + ("open_module" ("let_open_expression" "let_open_class_type" "attribute_payload" "let_open_class_expression" "_signature_item" "compilation_unit" "signature" "structure" "_structure_item")) + ("or_operator" ("infix_expression" "parenthesized_operator" "_infix_operator")) + ("or_pattern" ("tag_pattern" "field_pattern" "attribute_payload" "tuple_pattern" "array_pattern" "list_pattern" "parameter" "lazy_pattern" "array_binding_pattern" "let_binding" "typed_pattern" "local_open_pattern" "cons_pattern" "constructor_pattern" "_pattern" "parenthesized_pattern" "or_pattern" "list_binding_pattern" "exception_pattern" "object_expression" "_binding_pattern" "alias_pattern" "match_case")) + ("package_expression" ("hash_expression" "class_application" "bigarray_get_expression" "method_invocation" "application_expression" "lazy_expression" "record_expression" "local_open_expression" "prefix_expression" "string_get_expression" "field_get_expression" "_simple_expression" "array_get_expression" "assert_expression" "labeled_argument")) + ("package_pattern" ("tag_pattern" "field_pattern" "tuple_pattern" "array_pattern" "list_pattern" "parameter" "lazy_pattern" "effect_pattern" "array_binding_pattern" "let_binding" "typed_pattern" "local_open_pattern" "cons_pattern" "constructor_pattern" "parenthesized_pattern" "or_pattern" "list_binding_pattern" "_binding_pattern" "alias_pattern" "_simple_pattern")) + ("package_type" ("field_pattern" "attribute_payload" "_tuple_type" "constructor_declaration" "parenthesized_type" "parameter" "instance_variable_specification" "fun_expression" "function_type" "constrain_type" "field_expression" "instantiated_class_type" "hash_type" "polymorphic_variant_type" "typed_label" "type_binding" "aliased_type" "labeled_argument" "typed_pattern" "object_type" "constructed_type" "type_parameter_constraint" "class_function_type" "polymorphic_type" "_simple_type" "instance_variable_definition" "_type" "local_open_type" "tag_specification" "coercion_expression" "tuple_type" "object_expression" "instantiated_class" "class_body_type" "type_constraint" "typed_expression")) + ("packed_module" ("_simple_module_expression" "module_application")) + ("parameter" ("fun_expression" "class_binding" "method_definition" "_parameter" "class_function" "let_binding")) + ("parenthesized_class_expression" ("_simple_class_expression" "class_application")) + ("parenthesized_expression" ("hash_expression" "class_application" "bigarray_get_expression" "method_invocation" "application_expression" "lazy_expression" "record_expression" "prefix_expression" "string_get_expression" "field_get_expression" "_simple_expression" "array_get_expression" "assert_expression" "labeled_argument")) + ("parenthesized_module_expression" ("_simple_module_expression" "module_application")) + ("parenthesized_module_type" ("package_expression" "module_type_constraint" "typed_module_expression" "module_parameter" "functor_type" "module_binding" "package_type" "package_pattern" "packed_module" "_module_type" "constrain_module_type" "parenthesized_module_type" "include_module_type" "module_type_definition")) + ("parenthesized_operator" ("tag_pattern" "field_pattern" "tuple_pattern" "array_pattern" "list_pattern" "parameter" "lazy_pattern" "effect_pattern" "inheritance_definition" "for_expression" "value_specification" "array_binding_pattern" "let_binding" "typed_pattern" "local_open_pattern" "cons_pattern" "constructor_pattern" "external" "parenthesized_pattern" "or_pattern" "value_path" "list_binding_pattern" "_binding_pattern" "alias_pattern" "_simple_pattern")) + ("parenthesized_pattern" ("tag_pattern" "field_pattern" "tuple_pattern" "array_pattern" "list_pattern" "parameter" "lazy_pattern" "effect_pattern" "array_binding_pattern" "let_binding" "typed_pattern" "local_open_pattern" "cons_pattern" "constructor_pattern" "parenthesized_pattern" "or_pattern" "list_binding_pattern" "_binding_pattern" "alias_pattern" "_simple_pattern")) + ("parenthesized_type" ("field_pattern" "attribute_payload" "_tuple_type" "constructor_declaration" "parenthesized_type" "parameter" "instance_variable_specification" "fun_expression" "function_type" "constrain_type" "field_expression" "instantiated_class_type" "hash_type" "polymorphic_variant_type" "typed_label" "type_binding" "aliased_type" "labeled_argument" "typed_pattern" "object_type" "constructed_type" "type_parameter_constraint" "class_function_type" "polymorphic_type" "_simple_type" "instance_variable_definition" "_type" "local_open_type" "tag_specification" "coercion_expression" "tuple_type" "object_expression" "instantiated_class" "class_body_type" "type_constraint" "typed_expression")) + ("polymorphic_type" ("method_specification" "external" "method_definition" "method_type" "value_specification" "_polymorphic_type" "field_declaration" "let_binding")) + ("polymorphic_variant_pattern" ("tag_pattern" "field_pattern" "tuple_pattern" "array_pattern" "list_pattern" "parameter" "lazy_pattern" "effect_pattern" "array_binding_pattern" "let_binding" "typed_pattern" "local_open_pattern" "cons_pattern" "constructor_pattern" "parenthesized_pattern" "or_pattern" "list_binding_pattern" "_binding_pattern" "alias_pattern" "_simple_pattern")) + ("polymorphic_variant_type" ("field_pattern" "attribute_payload" "_tuple_type" "constructor_declaration" "parenthesized_type" "parameter" "instance_variable_specification" "fun_expression" "function_type" "constrain_type" "field_expression" "instantiated_class_type" "hash_type" "polymorphic_variant_type" "typed_label" "type_binding" "aliased_type" "labeled_argument" "typed_pattern" "object_type" "constructed_type" "type_parameter_constraint" "class_function_type" "polymorphic_type" "_simple_type" "instance_variable_definition" "_type" "local_open_type" "tag_specification" "coercion_expression" "tuple_type" "object_expression" "instantiated_class" "class_body_type" "type_constraint" "typed_expression")) + ("pow_operator" ("infix_expression" "parenthesized_operator" "_infix_operator")) + ("prefix_expression" ("hash_expression" "class_application" "bigarray_get_expression" "method_invocation" "application_expression" "lazy_expression" "record_expression" "prefix_expression" "string_get_expression" "field_get_expression" "_simple_expression" "array_get_expression" "assert_expression" "labeled_argument")) + ("prefix_operator" ("prefix_expression" "parenthesized_operator")) + ("pretty_printing_indication" ("string_content" "quoted_string_content")) + ("product_expression" ("sign_expression" "cons_expression" "instance_variable_expression" "bigarray_get_expression" "product_expression" "else_clause" "then_clause" "parameter" "let_exception_expression" "list_expression" "fun_expression" "sequence_expression" "for_expression" "method_definition" "local_open_expression" "field_expression" "try_expression" "string_get_expression" "parenthesized_expression" "infix_expression" "let_binding" "let_module_expression" "class_initializer" "_sequence_expression" "packed_module" "guard" "do_clause" "instance_variable_definition" "array_get_expression" "if_expression" "while_expression" "let_open_expression" "coercion_expression" "let_expression" "match_expression" "set_expression" "expression_item" "array_expression" "_expression" "match_case" "typed_expression")) + ("quoted_extension" ("hash_expression" "typed_module_expression" "functor_type" "package_type" "tuple_pattern" "parenthesized_type" "parameter" "_simple_expression" "fun_expression" "constrain_type" "effect_pattern" "instantiated_class_type" "field_get_expression" "type_binding" "polymorphic_type" "packed_module" "_simple_type" "or_pattern" "instance_variable_definition" "class_body_type" "alias_pattern" "module_type_definition" "tag_pattern" "field_pattern" "module_parameter" "package_pattern" "constructor_declaration" "instance_variable_specification" "module_application" "prefix_expression" "field_expression" "typed_label" "array_binding_pattern" "aliased_type" "labeled_argument" "_simple_module_expression" "constructed_type" "cons_pattern" "method_invocation" "application_expression" "class_function_type" "module_binding" "_simple_class_expression" "array_get_expression" "tag_specification" "coercion_expression" "let_open_class_type" "class_type_binding" "constrain_module_type" "instantiated_class" "_simple_class_type" "assert_expression" "typed_expression" "module_type_constraint" "_tuple_type" "record_expression" "lazy_pattern" "inheritance_specification" "local_open_pattern" "object_type" "_type" "list_binding_pattern" "object_expression" "_simple_pattern" "class_application" "attribute_payload" "bigarray_get_expression" "lazy_expression" "array_pattern" "list_pattern" "function_type" "polymorphic_variant_type" "hash_type" "string_get_expression" "include_module_type" "let_binding" "typed_pattern" "constructor_pattern" "type_parameter_constraint" "parenthesized_pattern" "local_open_type" "package_expression" "tuple_type" "_binding_pattern" "_module_type" "parenthesized_module_type" "type_constraint")) + ("quoted_item_extension" ("_class_field" "attribute_payload" "_signature_item" "compilation_unit" "object_expression" "_class_field_specification" "signature" "class_body_type" "structure" "_structure_item")) + ("quoted_string" ("hash_expression" "class_application" "_constant" "bigarray_get_expression" "lazy_expression" "record_expression" "parameter" "_simple_expression" "toplevel_directive" "effect_pattern" "prefix_expression" "_signed_constant" "string_get_expression" "field_get_expression" "labeled_argument" "method_invocation" "application_expression" "range_pattern" "array_get_expression" "_simple_pattern" "assert_expression")) + ("quoted_string_content" ("quoted_item_extension" "quoted_extension" "quoted_string")) + ("range_pattern" ("tag_pattern" "field_pattern" "attribute_payload" "tuple_pattern" "array_pattern" "list_pattern" "parameter" "lazy_pattern" "array_binding_pattern" "let_binding" "typed_pattern" "local_open_pattern" "cons_pattern" "constructor_pattern" "_pattern" "parenthesized_pattern" "or_pattern" "list_binding_pattern" "exception_pattern" "object_expression" "_binding_pattern" "alias_pattern" "match_case")) + ("record_binding_pattern" ("local_open_pattern")) + ("record_declaration" ("constructor_declaration" "type_binding")) + ("record_expression" ("hash_expression" "class_application" "bigarray_get_expression" "method_invocation" "application_expression" "lazy_expression" "record_expression" "local_open_expression" "prefix_expression" "string_get_expression" "field_get_expression" "_simple_expression" "array_get_expression" "assert_expression" "labeled_argument")) + ("record_pattern" ("tag_pattern" "field_pattern" "tuple_pattern" "array_pattern" "list_pattern" "parameter" "lazy_pattern" "effect_pattern" "array_binding_pattern" "let_binding" "typed_pattern" "local_open_pattern" "cons_pattern" "constructor_pattern" "parenthesized_pattern" "or_pattern" "list_binding_pattern" "_binding_pattern" "alias_pattern" "_simple_pattern")) + ("refutation_case" ("match_case")) + ("rel_operator" ("infix_expression" "parenthesized_operator" "_infix_operator")) + ("sequence_expression" ("bigarray_get_expression" "parameter" "let_exception_expression" "fun_expression" "sequence_expression" "for_expression" "method_definition" "local_open_expression" "try_expression" "string_get_expression" "parenthesized_expression" "let_module_expression" "let_binding" "class_initializer" "_sequence_expression" "guard" "do_clause" "instance_variable_definition" "array_get_expression" "if_expression" "while_expression" "let_open_expression" "coercion_expression" "let_expression" "match_expression" "expression_item" "match_case" "typed_expression")) + ("set_expression" ("sign_expression" "cons_expression" "instance_variable_expression" "bigarray_get_expression" "product_expression" "else_clause" "then_clause" "parameter" "let_exception_expression" "list_expression" "fun_expression" "sequence_expression" "for_expression" "method_definition" "local_open_expression" "field_expression" "try_expression" "string_get_expression" "parenthesized_expression" "infix_expression" "let_binding" "let_module_expression" "class_initializer" "_sequence_expression" "packed_module" "guard" "do_clause" "instance_variable_definition" "array_get_expression" "if_expression" "while_expression" "let_open_expression" "coercion_expression" "let_expression" "match_expression" "set_expression" "expression_item" "array_expression" "_expression" "match_case" "typed_expression")) + ("sign_expression" ("sign_expression" "cons_expression" "instance_variable_expression" "bigarray_get_expression" "product_expression" "else_clause" "then_clause" "parameter" "let_exception_expression" "list_expression" "fun_expression" "sequence_expression" "for_expression" "method_definition" "local_open_expression" "field_expression" "try_expression" "string_get_expression" "parenthesized_expression" "infix_expression" "let_binding" "let_module_expression" "class_initializer" "_sequence_expression" "packed_module" "guard" "do_clause" "instance_variable_definition" "array_get_expression" "if_expression" "while_expression" "let_open_expression" "coercion_expression" "let_expression" "match_expression" "set_expression" "expression_item" "array_expression" "_expression" "match_case" "typed_expression")) + ("sign_operator" ("sign_expression")) + ("signature" ("package_expression" "module_type_constraint" "typed_module_expression" "module_parameter" "functor_type" "module_binding" "package_type" "package_pattern" "packed_module" "_module_type" "constrain_module_type" "parenthesized_module_type" "include_module_type" "module_type_definition")) + ("signed_number" ("effect_pattern" "_signed_constant" "parameter" "range_pattern" "_simple_pattern")) + ("string" ("hash_expression" "class_application" "_constant" "bigarray_get_expression" "lazy_expression" "record_expression" "parameter" "_simple_expression" "toplevel_directive" "effect_pattern" "prefix_expression" "_signed_constant" "string_get_expression" "field_get_expression" "labeled_argument" "external" "application_expression" "method_invocation" "range_pattern" "array_get_expression" "_simple_pattern" "assert_expression")) + ("string_content" ("string")) + ("string_get_expression" ("hash_expression" "class_application" "bigarray_get_expression" "method_invocation" "application_expression" "lazy_expression" "record_expression" "set_expression" "prefix_expression" "string_get_expression" "field_get_expression" "_simple_expression" "array_get_expression" "assert_expression" "labeled_argument")) + ("structure" ("package_expression" "typed_module_expression" "open_module" "module_binding" "include_module" "module_application" "parenthesized_module_expression" "module_type_of" "functor" "_module_expression")) + ("tag" ("tag_pattern" "field_pattern" "hash_expression" "class_application" "bigarray_get_expression" "lazy_expression" "record_expression" "tuple_pattern" "array_pattern" "list_pattern" "parameter" "_simple_expression" "lazy_pattern" "effect_pattern" "prefix_expression" "polymorphic_variant_type" "string_get_expression" "field_get_expression" "array_binding_pattern" "labeled_argument" "let_binding" "typed_pattern" "local_open_pattern" "cons_pattern" "constructor_pattern" "application_expression" "method_invocation" "parenthesized_pattern" "or_pattern" "array_get_expression" "tag_specification" "list_binding_pattern" "_binding_pattern" "alias_pattern" "_simple_pattern" "assert_expression")) + ("tag_pattern" ("tag_pattern" "field_pattern" "attribute_payload" "tuple_pattern" "array_pattern" "list_pattern" "parameter" "lazy_pattern" "effect_pattern" "array_binding_pattern" "let_binding" "typed_pattern" "local_open_pattern" "cons_pattern" "constructor_pattern" "_pattern" "parenthesized_pattern" "or_pattern" "list_binding_pattern" "exception_pattern" "object_expression" "_binding_pattern" "_effect_pattern" "alias_pattern" "match_case")) + ("tag_specification" ("polymorphic_variant_type")) + ("then_clause" ("if_expression")) + ("toplevel_directive" ("structure" "attribute_payload")) + ("try_expression" ("sign_expression" "cons_expression" "instance_variable_expression" "bigarray_get_expression" "product_expression" "else_clause" "then_clause" "parameter" "let_exception_expression" "list_expression" "fun_expression" "sequence_expression" "for_expression" "method_definition" "local_open_expression" "field_expression" "try_expression" "string_get_expression" "parenthesized_expression" "infix_expression" "let_binding" "let_module_expression" "class_initializer" "_sequence_expression" "packed_module" "guard" "do_clause" "instance_variable_definition" "array_get_expression" "if_expression" "while_expression" "let_open_expression" "coercion_expression" "let_expression" "match_expression" "set_expression" "expression_item" "array_expression" "_expression" "match_case" "typed_expression")) + ("tuple_pattern" ("tag_pattern" "field_pattern" "attribute_payload" "tuple_pattern" "array_pattern" "list_pattern" "parameter" "lazy_pattern" "array_binding_pattern" "let_binding" "typed_pattern" "local_open_pattern" "cons_pattern" "constructor_pattern" "_pattern" "parenthesized_pattern" "or_pattern" "list_binding_pattern" "exception_pattern" "object_expression" "_binding_pattern" "alias_pattern" "match_case")) + ("tuple_type" ("field_pattern" "attribute_payload" "_tuple_type" "parenthesized_type" "parameter" "instance_variable_specification" "function_type" "constrain_type" "field_expression" "instantiated_class_type" "hash_type" "polymorphic_variant_type" "typed_label" "type_binding" "aliased_type" "labeled_argument" "typed_pattern" "constructed_type" "type_parameter_constraint" "class_function_type" "polymorphic_type" "instance_variable_definition" "_type" "local_open_type" "tag_specification" "coercion_expression" "tuple_type" "object_expression" "instantiated_class" "class_body_type" "type_constraint" "typed_expression")) + ("type_binding" ("type_definition")) + ("type_constraint" ("type_binding" "constrain_type")) + ("type_constructor" ("abstract_type" "type_binding" "type_constructor_path")) + ("type_constructor_path" ("field_pattern" "attribute_payload" "_tuple_type" "constructor_declaration" "parenthesized_type" "parameter" "instance_variable_specification" "fun_expression" "function_type" "constrain_type" "field_expression" "instantiated_class_type" "hash_type" "polymorphic_variant_type" "typed_label" "type_binding" "aliased_type" "labeled_argument" "typed_pattern" "object_type" "polymorphic_variant_pattern" "constructed_type" "type_parameter_constraint" "class_function_type" "polymorphic_type" "_simple_type" "instance_variable_definition" "_type" "local_open_type" "tag_specification" "coercion_expression" "tuple_type" "object_expression" "instantiated_class" "class_body_type" "type_constraint" "typed_expression")) + ("type_definition" ("attribute_payload" "_signature_item" "compilation_unit" "signature" "structure" "_structure_item")) + ("type_parameter_constraint" ("_class_field_specification" "class_body_type" "_class_field" "object_expression")) + ("type_variable" ("field_pattern" "attribute_payload" "_tuple_type" "constructor_declaration" "parenthesized_type" "parameter" "instance_variable_specification" "fun_expression" "function_type" "constrain_type" "field_expression" "instantiated_class_type" "hash_type" "polymorphic_variant_type" "typed_label" "type_binding" "aliased_type" "labeled_argument" "typed_pattern" "object_type" "constructed_type" "type_parameter_constraint" "class_function_type" "polymorphic_type" "_simple_type" "instance_variable_definition" "_type" "local_open_type" "tag_specification" "coercion_expression" "tuple_type" "class_binding" "object_expression" "class_type_binding" "instantiated_class" "class_body_type" "type_constraint" "typed_expression")) + ("typed_class_expression" ("_simple_class_expression" "class_application")) + ("typed_expression" ("hash_expression" "class_application" "bigarray_get_expression" "method_invocation" "application_expression" "lazy_expression" "record_expression" "prefix_expression" "string_get_expression" "field_get_expression" "_simple_expression" "array_get_expression" "assert_expression" "labeled_argument")) + ("typed_label" ("function_type")) + ("typed_module_expression" ("_simple_module_expression" "module_application")) + ("typed_pattern" ("tag_pattern" "field_pattern" "tuple_pattern" "array_pattern" "list_pattern" "parameter" "lazy_pattern" "effect_pattern" "array_binding_pattern" "let_binding" "typed_pattern" "local_open_pattern" "cons_pattern" "constructor_pattern" "parenthesized_pattern" "or_pattern" "list_binding_pattern" "_binding_pattern" "alias_pattern" "_simple_pattern")) + ("unit" ("hash_expression" "class_application" "_constant" "bigarray_get_expression" "lazy_expression" "record_expression" "parameter" "_simple_expression" "toplevel_directive" "effect_pattern" "prefix_expression" "_signed_constant" "string_get_expression" "field_get_expression" "labeled_argument" "method_invocation" "application_expression" "range_pattern" "array_get_expression" "_simple_pattern" "assert_expression")) + ("value_definition" ("let_expression" "attribute_payload" "let_class_expression" "structure" "_structure_item")) + ("value_name" ("tag_pattern" "field_pattern" "tuple_pattern" "array_pattern" "list_pattern" "lazy_pattern" "value_specification" "array_binding_pattern" "typed_pattern" "let_binding" "local_open_pattern" "cons_pattern" "constructor_pattern" "external" "parenthesized_pattern" "or_pattern" "value_path" "list_binding_pattern" "_binding_pattern" "alias_pattern")) + ("value_path" ("toplevel_directive" "hash_expression" "class_application" "bigarray_get_expression" "method_invocation" "application_expression" "lazy_expression" "record_expression" "prefix_expression" "string_get_expression" "field_get_expression" "_simple_expression" "array_get_expression" "assert_expression" "labeled_argument")) + ("value_pattern" ("effect_pattern" "inheritance_definition" "for_expression" "alias_pattern" "parameter" "_simple_pattern")) + ("value_specification" ("signature" "_signature_item" "compilation_unit" "attribute_payload")) + ("variant_declaration" ("type_binding")) + ("while_expression" ("sign_expression" "cons_expression" "instance_variable_expression" "bigarray_get_expression" "product_expression" "else_clause" "then_clause" "parameter" "let_exception_expression" "list_expression" "fun_expression" "sequence_expression" "for_expression" "method_definition" "local_open_expression" "field_expression" "try_expression" "string_get_expression" "parenthesized_expression" "infix_expression" "let_binding" "let_module_expression" "class_initializer" "_sequence_expression" "packed_module" "guard" "do_clause" "instance_variable_definition" "array_get_expression" "if_expression" "while_expression" "let_open_expression" "coercion_expression" "let_expression" "match_expression" "set_expression" "expression_item" "array_expression" "_expression" "match_case" "typed_expression")) + ) +) +;; END Inverse production rules for ocaml_interface +;; START All node types in ocaml_interface +(defconst combobulate-rules-ocaml_interface-types + '("_binding_pattern" "_class_expression" "_class_field" "_class_field_specification" "_class_type" "_constant" "_effect_pattern" "_expression" "_infix_operator" "_module_expression" "_module_type" "_parameter" "_pattern" "_polymorphic_type" "_sequence_expression" "_signature_item" "_signed_constant" "_simple_class_expression" "_simple_class_type" "_simple_expression" "_simple_module_expression" "_simple_pattern" "_simple_type" "_structure_item" "_tuple_type" "_type" "abstract_type" "add_operator" "alias_pattern" "aliased_type" "and_operator" "application_expression" "array_binding_pattern" "array_expression" "array_get_expression" "array_pattern" "assert_expression" "assign_operator" "attribute" "attribute_id" "attribute_payload" "bigarray_get_expression" "boolean" "character" "character_content" "class_application" "class_binding" "class_body_type" "class_definition" "class_function" "class_function_type" "class_initializer" "class_name" "class_path" "class_type_binding" "class_type_definition" "class_type_name" "class_type_path" "coercion_expression" "comment" "compilation_unit" "concat_operator" "cons_expression" "cons_pattern" "constrain_module" "constrain_module_type" "constrain_type" "constructed_type" "constructor_declaration" "constructor_name" "constructor_path" "constructor_pattern" "conversion_specification" "directive" "do_clause" "effect_pattern" "else_clause" "escape_sequence" "exception_definition" "exception_pattern" "expression_item" "extended_module_path" "extension" "external" "field_declaration" "field_expression" "field_get_expression" "field_name" "field_path" "field_pattern" "floating_attribute" "for_expression" "fun_expression" "function_expression" "function_type" "functor" "functor_type" "guard" "hash_expression" "hash_operator" "hash_type" "if_expression" "include_module" "include_module_type" "indexing_operator" "indexing_operator_path" "infix_expression" "inheritance_definition" "inheritance_specification" "instance_variable_definition" "instance_variable_expression" "instance_variable_name" "instance_variable_specification" "instantiated_class" "instantiated_class_type" "item_attribute" "item_extension" "label_name" "labeled_argument" "lazy_expression" "lazy_pattern" "let_and_operator" "let_binding" "let_class_expression" "let_exception_expression" "let_expression" "let_module_expression" "let_open_class_expression" "let_open_class_type" "let_open_expression" "let_operator" "line_number_directive" "list_binding_pattern" "list_expression" "list_pattern" "local_open_expression" "local_open_pattern" "local_open_type" "match_case" "match_expression" "match_operator" "method_definition" "method_invocation" "method_name" "method_specification" "method_type" "module_application" "module_binding" "module_definition" "module_name" "module_parameter" "module_path" "module_type_constraint" "module_type_definition" "module_type_name" "module_type_of" "module_type_path" "mult_operator" "new_expression" "number" "object_copy_expression" "object_expression" "object_type" "ocamlyacc_value" "open_module" "or_operator" "or_pattern" "package_expression" "package_pattern" "package_type" "packed_module" "parameter" "parenthesized_class_expression" "parenthesized_expression" "parenthesized_module_expression" "parenthesized_module_type" "parenthesized_operator" "parenthesized_pattern" "parenthesized_type" "polymorphic_type" "polymorphic_variant_pattern" "polymorphic_variant_type" "pow_operator" "prefix_expression" "prefix_operator" "pretty_printing_indication" "product_expression" "quoted_extension" "quoted_item_extension" "quoted_string" "quoted_string_content" "range_pattern" "record_binding_pattern" "record_declaration" "record_expression" "record_pattern" "refutation_case" "rel_operator" "sequence_expression" "set_expression" "sign_expression" "sign_operator" "signature" "signed_number" "string" "string_content" "string_get_expression" "structure" "tag" "tag_pattern" "tag_specification" "then_clause" "toplevel_directive" "try_expression" "tuple_pattern" "tuple_type" "type_binding" "type_constraint" "type_constructor" "type_constructor_path" "type_definition" "type_parameter_constraint" "type_variable" "typed_class_expression" "typed_expression" "typed_label" "typed_module_expression" "typed_pattern" "unit" "value_definition" "value_name" "value_path" "value_pattern" "value_specification" "variant_declaration" "while_expression") +) +;; END All node types in ocaml_interface +;; START All supertypes in ocaml_interface +(defconst combobulate-rules-ocaml_interface-supertypes + '("_binding_pattern" "_class_expression" "_class_field" "_class_field_specification" "_class_type" "_constant" "_effect_pattern" "_expression" "_infix_operator" "_module_expression" "_module_type" "_parameter" "_pattern" "_polymorphic_type" "_sequence_expression" "_signature_item" "_signed_constant" "_simple_class_expression" "_simple_class_type" "_simple_expression" "_simple_module_expression" "_simple_pattern" "_simple_type" "_structure_item" "_tuple_type" "_type") +) +;; END All supertypes in ocaml_interface + ;; START Auto-generated list of all languages (defconst combobulate-rules-languages - '(c css go html javascript json python toml tsx typescript yaml) + '(css go html javascript json ocaml ocaml_interface python toml tsx typescript yaml) "A list of all the languages that have production rules.") ;; END Auto-generated list of all languages (defconst combobulate-rules-alist - `((c ,combobulate-rules-c) - (css ,combobulate-rules-css) + `((css ,combobulate-rules-css) (go ,combobulate-rules-go) (html ,combobulate-rules-html) (javascript ,combobulate-rules-javascript) (json ,combobulate-rules-json) + (ocaml ,combobulate-rules-ocaml) + (ocaml_interface ,combobulate-rules-ocaml_interface) (python ,combobulate-rules-python) (toml ,combobulate-rules-toml) (tsx ,combobulate-rules-tsx) @@ -2222,12 +2871,13 @@ )) (defconst combobulate-rules-inverse-alist - `((c ,combobulate-rules-c-inverse) - (css ,combobulate-rules-css-inverse) + `((css ,combobulate-rules-css-inverse) (go ,combobulate-rules-go-inverse) (html ,combobulate-rules-html-inverse) (javascript ,combobulate-rules-javascript-inverse) (json ,combobulate-rules-json-inverse) + (ocaml ,combobulate-rules-ocaml-inverse) + (ocaml_interface ,combobulate-rules-ocaml_interface-inverse) (python ,combobulate-rules-python-inverse) (toml ,combobulate-rules-toml-inverse) (tsx ,combobulate-rules-tsx-inverse) @@ -2236,12 +2886,13 @@ )) (defconst combobulate-rules-types-alist - `((c ,combobulate-rules-c-types) - (css ,combobulate-rules-css-types) + `((css ,combobulate-rules-css-types) (go ,combobulate-rules-go-types) (html ,combobulate-rules-html-types) (javascript ,combobulate-rules-javascript-types) (json ,combobulate-rules-json-types) + (ocaml ,combobulate-rules-ocaml-types) + (ocaml_interface ,combobulate-rules-ocaml_interface-types) (python ,combobulate-rules-python-types) (toml ,combobulate-rules-toml-types) (tsx ,combobulate-rules-tsx-types) @@ -2250,12 +2901,13 @@ )) (defconst combobulate-rules-supertypes-alist - `((c ,combobulate-rules-c-supertypes) - (css ,combobulate-rules-css-supertypes) + `((css ,combobulate-rules-css-supertypes) (go ,combobulate-rules-go-supertypes) (html ,combobulate-rules-html-supertypes) (javascript ,combobulate-rules-javascript-supertypes) (json ,combobulate-rules-json-supertypes) + (ocaml ,combobulate-rules-ocaml-supertypes) + (ocaml_interface ,combobulate-rules-ocaml_interface-supertypes) (python ,combobulate-rules-python-supertypes) (toml ,combobulate-rules-toml-supertypes) (tsx ,combobulate-rules-tsx-supertypes) From 6c7916fccb4040f953971ead271451814fe8bd1e Mon Sep 17 00:00:00 2001 From: xvw Date: Wed, 25 Mar 2026 08:02:51 +0100 Subject: [PATCH 05/24] Fix `cl-assert` and add `setup` helpers - Fix cl-assert it is checking for a symbol not a list. - This converts Combobulate names (with hyphens) to tree-sitter language names (with underscores). This matches the grammar naming for ocaml_interface and ocaml_type, which matches the .so/dylib library names that tree-sitter creates. Co-authored-by: Tim McGilchrist Co-authored-by: PizieDust --- combobulate-setup.el | 86 ++++++++++++++++++++++++++++++++------------ 1 file changed, 63 insertions(+), 23 deletions(-) diff --git a/combobulate-setup.el b/combobulate-setup.el index 51af882..f0e6363 100644 --- a/combobulate-setup.el +++ b/combobulate-setup.el @@ -146,16 +146,18 @@ (defvar combobulate-registered-languages-alist nil - "Alist of tree-sitter languages and major modes supported by Combobulate. + "Alist of Combobulate languages and major modes supported by Combobulate. Each entry must be of the form - (LANGUAGE MAJOR-MODES MINOR-MODE-FN) + (NAME MAJOR-MODES MINOR-MODE-FN TREESIT-LANGUAGE) -Where LANGUAGE is the tree-sitter language symbol; MAJOR-MODES is -a list of supported major modes; and MINOR-MODE-FN is a minor -mode function that Combobulate must use for that language and -those major modes.") +Where NAME is the Combobulate language name (used for Emacs Lisp symbols); +MAJOR-MODES is a list of supported major modes; MINOR-MODE-FN is a minor +mode function that Combobulate must use for that language and those major +modes; and TREESIT-LANGUAGE is the tree-sitter grammar name (which may +differ from NAME if it contains characters invalid in Emacs Lisp symbols, +such as underscores).") (defvar-local combobulate-mode nil "Non-nil if the language-specific minor mode is enabled in this buffer. @@ -446,11 +448,30 @@ A complete list of known shorthands are found in (defun combobulate-get-registered-language (mm) "Get the registered language for a major mode MM. -Returns a list of the form `(LANGUAGE MAJOR-MODES MINOR-MODE-FN)'." - (seq-find (pcase-lambda (`(_ ,major-modes _)) +Returns a list of the form `(NAME MAJOR-MODES MINOR-MODE-FN TREESIT-LANGUAGE)'." + (seq-find (pcase-lambda (`(_ ,major-modes _ _)) (member mm major-modes)) combobulate-registered-languages-alist)) +(defun combobulate-get-language-name-from-treesit (treesit-lang) + "Get the Combobulate language name for a tree-sitter language TREESIT-LANG. + +Returns the NAME from the registered language alist, or TREESIT-LANG if not found." + (or (car (seq-find (pcase-lambda (`(_ _ _ ,ts-lang)) + (eq ts-lang treesit-lang)) + combobulate-registered-languages-alist)) + treesit-lang)) + +(defun combobulate-get-treesit-language-from-name (combobulate-name) + "Get the tree-sitter language for a Combobulate language name COMBOBULATE-NAME. + +Returns the tree-sitter LANGUAGE from the registered language alist, or +COMBOBULATE-NAME if not found." + (or (nth 3 (seq-find (pcase-lambda (`(,name _ _ _)) + (eq name combobulate-name)) + combobulate-registered-languages-alist)) + combobulate-name)) + (defun combobulate-maybe-activate (&optional raise-if-missing called-interactively) "Maybe activate Combobulate in the current buffer. @@ -461,34 +482,41 @@ enable Combobulate." ;; Combobulate can activate in any major mode provided it's listed ;; in `combobulate-registered-languages-alist'. ;; - (when-let (match (combobulate-get-registered-language major-mode)) - (pcase-let ((`(,language _ ,minor-mode-fn) match)) + ;; If there's already a parser in the buffer, use that to find the right registration + (when-let (match (or (when-let ((existing-parsers (combobulate-parser-list))) + (let ((ts-lang (combobulate-parser-language (car existing-parsers)))) + (seq-find (pcase-lambda (`(_ _ _ ,lang)) + (eq lang ts-lang)) + combobulate-registered-languages-alist))) + (combobulate-get-registered-language major-mode))) + (pcase-let ((`(,name _ ,minor-mode-fn ,treesit-language) match)) ;; Only error out if RAISE-IF-MISSING is non-nil. The expected ;; behaviour is that Combobulate may get activated in major ;; modes for which no grammar exists. Raising an error ;; unconditionally in that case would be annoying to users. - (if (and raise-if-missing (not (combobulate-language-available-p language))) + (if (and raise-if-missing (not (combobulate-language-available-p treesit-language))) (error "Cannot activate Combobulate in buffer `%s' because tree-sitter is missing a language library. The major mode `%s' is registered as supporting the tree-sitter language `%s' but that language is not known to tree-sitter. Try reinstalling the grammar for that language and try again." - (current-buffer) major-mode language) + (current-buffer) major-mode treesit-language) ;; Language parser exists. Make sure that, if we already have ;; an initialised language in the buffer that it is not ;; different from the one we think it should be. (when-let ((existing-parsers (mapcar #'combobulate-parser-language (combobulate-parser-list)))) - (unless (member language existing-parsers) + (unless (member treesit-language existing-parsers) (error "Cannot activate Combobulate in buffer `%s' because of a parser mismatch. The buffer's language is `%s' and does not match Combobulate's expected language of `%s'. This can happen if you have major modes with conflicting ideas of what type of language to use." - (current-buffer) (car-safe existing-parsers) language))) + (current-buffer) (car-safe existing-parsers) treesit-language))) ;; Okay. All good, then... Create the language parser. - (combobulate-create-language language (current-buffer) nil) - (let ((toggle (if (combobulate-read minor-mode language) -1 1))) + (combobulate-create-language treesit-language (current-buffer) nil) + ;; Use the Combobulate name (not tree-sitter language) for symbol lookups + (let ((toggle (if (combobulate-read minor-mode name) -1 1))) (prog1 (funcall minor-mode-fn toggle) (when (and (> toggle 0) called-interactively) @@ -505,13 +533,20 @@ Combobulate minor mode suitable for the current buffer." ;; This is no longer an actual minor mode, but instead a function. (combobulate-maybe-activate nil (not (null arg)))) -(defun combobulate-register-language (language major-modes minor-mode-fn) - (if-let ((def (cdr (assoc language combobulate-registered-languages-alist)))) +(defun combobulate-register-language (name major-modes minor-mode-fn treesit-language) + "Register a Combobulate language. + +NAME is the Combobulate language name (used for Emacs Lisp symbol names). +MAJOR-MODES is a list of major modes that use this language. +MINOR-MODE-FN is the minor mode function for this language. +TREESIT-LANGUAGE is the tree-sitter grammar name (may differ from NAME +if it contains characters like underscores that are invalid in Emacs Lisp symbols)." + (if-let ((def (cdr (assoc name combobulate-registered-languages-alist)))) ;; Check if the definition's identical to what we want to ;; add. If it is, do nothing; if it is not, raise an error. - (unless (equal def (list major-modes minor-mode-fn)) - (error "Language `%s' is already registered with a different definition." language)) - (push (list language major-modes minor-mode-fn) + (unless (equal def (list major-modes minor-mode-fn treesit-language)) + (error "Language `%s' is already registered with a different definition." name)) + (push (list name major-modes minor-mode-fn treesit-language) combobulate-registered-languages-alist))) (cl-defmacro define-combobulate-language (&key name language @@ -526,7 +561,7 @@ NAME is the name of the language as it'll be known to Combobulate; LANGUAGE is the tree sitter language symbol, and MAJOR-MODES is a list of major modes that should be set up for this language." - (cl-assert (symbolp language) t "LANGUAGE must be a list") + (cl-assert (symbolp language) t "LANGUAGE must be a symbol") (cl-assert (symbolp name) t "NAME must be a symbol") (let ((group-name (intern (format "combobulate-language-%s" name)))) ;; Create a customize group for the language @@ -645,7 +680,12 @@ support where you still want to use Combobulate's features." ,(when setup-fn `(,setup-fn ',language))) decls) - (push `(combobulate-register-language ',language ',major-modes #',minor-mode-fn) + ;; Register using the :name parameter (e.g., 'ocaml-interface') as the key + ;; rather than :language (e.g., 'ocaml_interface') because :name is used to + ;; construct all Emacs Lisp symbol names. This allows tree-sitter grammars with + ;; underscores in their names (like 'ocaml_interface') to work correctly. + ;; We also store the tree-sitter language name for use with tree-sitter APIs. + (push `(combobulate-register-language ',name ',major-modes #',minor-mode-fn ',language) decls) (push `(defconst ,(intern-lang-var "defined-variables") ',known-variable-shorthands From a5a381f597e7970a7c52880f4a8f1c214e405c88 Mon Sep 17 00:00:00 2001 From: xvw Date: Wed, 25 Mar 2026 16:29:01 +0100 Subject: [PATCH 06/24] Update submodules URLs --- .gitmodules | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 6f34717..a365f56 100644 --- a/.gitmodules +++ b/.gitmodules @@ -3,7 +3,7 @@ url = https://github.com/mickeynp/html-ts-mode.git [submodule "test/tuareg"] path = tests/tuareg - url = git@github.com:ocaml/tuareg.git + url = https://github.com/ocaml/tuareg.git [submodule "test/ocaml-ts-mode"] path = tests/ocaml-ts-mode - url = git@github.com:terrateamio/ocaml-ts-mode.git + url = https://github.com/terrateamio/ocaml-ts-mode.git From a5e5490d00bcac1ed8f4be1cbc87b28042ab7c91 Mon Sep 17 00:00:00 2001 From: xvw Date: Wed, 25 Mar 2026 16:30:43 +0100 Subject: [PATCH 07/24] Introduce `tuareg-treesit-bridge` and adapt test-prelude Co-authored-by: Tim McGilchrist Co-authored-by: PizieDust --- tests/combobulate-test-prelude.el | 4 ++- tests/combobulate-test-suite.el | 3 ++- tests/tuareg-treesit-bridge.el | 43 +++++++++++++++++++++++++++++++ 3 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 tests/tuareg-treesit-bridge.el diff --git a/tests/combobulate-test-prelude.el b/tests/combobulate-test-prelude.el index 481eaf3..3889759 100644 --- a/tests/combobulate-test-prelude.el +++ b/tests/combobulate-test-prelude.el @@ -36,6 +36,8 @@ (require 'js) (require 'yaml-ts-mode) (require 'json-ts-mode) +(require 'tuareg) +(require 'tuareg-treesit-bridge) ;;; Helpers for writing procedures @@ -443,7 +445,7 @@ Returns nil if no match is found." (result (aref (ert--stats-test-results stats) pos))) (apply #'ediff-files (plist-get (cdadr (with-no-warnings (cl-etypecase result - (ert-test-failed-condition + (ert-test-failed (ert-test-result-with-condition-condition result))))) :files)))) diff --git a/tests/combobulate-test-suite.el b/tests/combobulate-test-suite.el index 3362120..b3d367c 100644 --- a/tests/combobulate-test-suite.el +++ b/tests/combobulate-test-suite.el @@ -288,7 +288,8 @@ doesn't exist." (save-window-excursion (save-excursion (let* ((auto-mode-alist (append auto-mode-alist - '(("\\.go\\'" . go-ts-mode)))) + '(("\\.go\\'" . go-ts-mode) + ("\\.ml[i]?\\'" . tuareg-mode)))) ;; required to ensure the right major mode is chosen. (major-mode-remap-alist '((python-mode . python-ts-mode) (css-mode . css-ts-mode) diff --git a/tests/tuareg-treesit-bridge.el b/tests/tuareg-treesit-bridge.el new file mode 100644 index 0000000..00cf316 --- /dev/null +++ b/tests/tuareg-treesit-bridge.el @@ -0,0 +1,43 @@ +(require 'tuareg) +(require 'treesit) + +(defgroup tuareg-treesit-bridge nil + "Create Tree-sitter parsers in Tuareg buffers for tools like Combobulate." + :group 'tuareg) + +(defcustom tuareg-treesit-bridge-enable t + "Whether to auto-create a Tree-sitter parser in Tuareg buffers." + :type 'boolean + :group 'tuareg-treesit-bridge) + +(defcustom tuareg-treesit-bridge-install-missing-grammars nil + "If non-nil, attempt to install OCaml grammars when missing." + :type 'boolean + :group 'tuareg-treesit-bridge) + +(defun tuareg-treesit-bridge--ensure-grammars () + (when (and tuareg-treesit-bridge-install-missing-grammars + (not (treesit-language-available-p 'ocaml))) + (add-to-list 'treesit-language-source-alist + '(ocaml "https://github.com/tree-sitter/tree-sitter-ocaml" + "grammars/ocaml/src" "grammars/interface/src")) + (ignore-errors + (treesit-install-language-grammar 'ocaml)))) + +(defun tuareg-treesit-bridge--maybe-create-parser () + "Create a Tree-sitter parser in the current Tuareg buffer if absent." + (when (and tuareg-treesit-bridge-enable + (derived-mode-p 'tuareg-mode) + (fboundp 'treesit-available-p) (treesit-available-p)) + (tuareg-treesit-bridge--ensure-grammars) + (when (treesit-language-available-p 'ocaml) + (unless (treesit-parser-list) + (treesit-parser-create + (if (and buffer-file-name (string-match-p "\\.mli\\'" buffer-file-name)) + 'ocaml_interface + 'ocaml)))))) + +(add-hook 'tuareg-mode-hook #'tuareg-treesit-bridge--maybe-create-parser) + +(provide 'tuareg-treesit-bridge) +;;; tuareg-treesit-bridge.el ends here From c374baa9881f6a571f57b5594638fc1d3f48751a Mon Sep 17 00:00:00 2001 From: xvw Date: Wed, 25 Mar 2026 16:32:06 +0100 Subject: [PATCH 08/24] Add `combobulate-ocaml` for Implementation and Interfaces Co-authored-by: Tim McGilchrist Co-authored-by: PizieDust --- combobulate-ocaml.el | 508 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 508 insertions(+) create mode 100644 combobulate-ocaml.el diff --git a/combobulate-ocaml.el b/combobulate-ocaml.el new file mode 100644 index 0000000..b7cfb48 --- /dev/null +++ b/combobulate-ocaml.el @@ -0,0 +1,508 @@ +;;; combobulate-ocaml.el --- ocaml support for combobulate -*- lexical-binding: t; -*- + +;; Copyright (C) 2025 Tim McGilchrsit + +;; Author: Tim McGilchrist +;; Pixie Dust +;; Xavier Van de Woestyne +;; Keywords: convenience, tools, languages, ocaml + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;; + +;;; Code: + +(require 'combobulate-settings) +(require 'combobulate-navigation) +(require 'combobulate-setup) +(require 'combobulate-manipulation) +(require 'combobulate-rules) + +(defgroup combobulate-ocaml nil + "Configuration switches for OCaml." + :group 'combobulate + :prefix "combobulate-ocaml-") + +(defun combobulate-ocaml-pretty-print-node-name (node default-name) + "Pretty print the NODE name (fallbacking on DEFAULT-NAME) for OCaml mode." + (combobulate-string-truncate + (replace-regexp-in-string + (rx (| (>= 2 " ") "\n")) " " + (let ((name (combobulate-ocaml-imenu-name-function node))) + (if (not (string= name "Anonymous")) + name + default-name))) + 40)) + +(defun combobulate-ocaml-imenu-node-p (node) + "Return t if NODE is a valid imenu node for OCaml." + (member (treesit-node-type node) + '("type_definition" "exception_definition" "external" + "value_definition" "method_definition" + "instance_variable_definition" "module_definition" + "module_type_definition" "class_definition" + "class_type_definition" "include_module" "include_module_type" + "open_module" "value_specification"))) + +(defun combobulate-ocaml-imenu-name-function (node) + "Return the name of the imenu entry for NODE in OCaml." + (or + (pcase (treesit-node-type node) + ;; For value definitions (let bindings), get the pattern name + ("value_definition" + (when-let* + ((let-binding (treesit-search-subtree node "let_binding")) + (pattern (treesit-node-child-by-field-name let-binding "pattern")) + (name-node (or (treesit-search-subtree pattern "value_name") + (treesit-search-subtree pattern "value_pattern")))) + (concat "let " (treesit-node-text name-node t)))) + + ;; For type definitions, get the type name + ("type_definition" + (when-let* + ((type-binding (treesit-search-subtree node "type_binding")) + (name-node (treesit-search-subtree type-binding "type_constructor"))) + (concat "type " (treesit-node-text name-node t)))) + + ;; For module definitions, get the module name + ("module_definition" + (when-let* + ((module-binding (treesit-search-subtree node "module_binding")) + (name-node (treesit-search-subtree module-binding "module_name"))) + (concat "module " (treesit-node-text name-node t)))) + + ;; For class definitions, get the class name + ("class_definition" + (when-let* + ((class-binding (treesit-search-subtree node "class_binding")) + (name-node (treesit-search-subtree class-binding "class_name"))) + (concat "class " (treesit-node-text name-node t)))) + + ;; For exception definitions, get the exception name + ("exception_definition" + (when-let* + ((name-node (treesit-search-subtree node "constructor_name"))) + (concat "exception " (treesit-node-text name-node t)))) + + ;; For external definitions, get the name + ("external" + (when-let* + ((name-node (treesit-search-subtree node "value_name"))) + (concat "external " (treesit-node-text name-node t)))) + + ;; For module type definitions + ("module_type_definition" + (when-let* + ((name-node (treesit-search-subtree node "module_type_name"))) + (concat "module type " (treesit-node-text name-node t)))) + + ;; For value specifications (in .mli files) + ("value_specification" + (when-let* + ((name-node (treesit-search-subtree node "value_name"))) + (concat "val " (treesit-node-text name-node t)))) + + ;; For method definitions + ("method_definition" + (when-let* + ((name-node (treesit-search-subtree node "method_name"))) + (concat "method " (treesit-node-text name-node t)))) + + ;; For class type definitions + ("class_type_definition" + (when-let* + ((class-type-binding (treesit-search-subtree node "class_type_binding")) + (name-node (treesit-search-subtree class-type-binding "class_type_name"))) + (concat "class type " (treesit-node-text name-node t)))) + + ;; For include_module + ("include_module" + (when-let + ((module-node (treesit-node-child-by-field-name node "module"))) + (concat "include " (treesit-node-text module-node t)))) + + ;; For include_module_type + ("include_module_type" + (when-let + ((sig-node (treesit-search-subtree node "signature"))) "include "))) + + ;; Fallback to just the first text content we can find + "Anonymous")) + +(eval-and-compile + + ;; Combobulate for implementation files (`ml'). + (defconst combobulate-ocaml-definitions + '((context-nodes + '("false" "true" "number" "class_name" "value_name" + "module_name" "module_type_name" "field_name" "false" "true")) + + (envelope-indent-region-function #'indent-region) + (pretty-print-node-name-function #'combobulate-ocaml-pretty-print-node-name) + (plausible-separators '(";" "," "|" "struct" "sig" "end" "begin" "{" "}")) + + (display-ignored-node-types + '("let" "module" "struct" "sig" "external" + "val" "type" "class" "exception" "open" "include")) + + (procedures-logical '((:activation-nodes ((:nodes (all)))))) + + (procedures-defun + '((:activation-nodes + ((:nodes ("type_definition" "exception_definition" "external" + "value_definition" "method_definition" + "instance_variable_definition" "module_definition" + "module_type_definition" "class_definition")))))) + + (procedures-sibling + '((:activation-nodes + ((:nodes ( "constructor_pattern" ))) + :selector (:choose parent :match-siblings t)) + + (:activation-nodes + ((:nodes ( "match_case" ))) + :selector (:choose node :match-siblings t)) + + (:activation-nodes + ((:nodes ("parameter") + :has-parent ("let_binding"))) + :selector (:choose node :match-siblings t)) + + (:activation-nodes + ((:nodes ("variant_declaration" + "record_declaration" + "list_expression" + "cons_expression" + "field_get_expression" + "function_type" + "tuple_pattern" + "value_pattern"))) + :selector (:choose node :match-children t)) + + (:activation-nodes + ((:nodes ("value_definition" + "value_pattern" + "let_expression") + :has-parent ("let_expression"))) + :selector (:choose parent :match-children t)) + + (:activation-nodes + ((:nodes ("type_variable" + "parameter" + "value_path" + "add_operator" + "mult_operator" + "pow_operator" + "rel_operator" + "concat_operator" + "or_operator" + "and_operator" + "assign_operator" + "infix_expression" + "type_constructor_path" + "field_declaration" + "tag_specification" + "match_case" + "field_expression" + "application_expression")) + (:nodes ((rule "signature") + (rule "structure")) + :has-ancestor ("module_definition"))) + :selector (:choose node :match-siblings t)) + + (:activation-nodes + ((:nodes ("signature" + "structure" + "module_name" + "module_path" + "module_type_constraint") + :has-ancestor ("module_definition" + "module_type_definition" + "package_expression")) + (:nodes ("attribute" + "field_declaration" + "function_expression" + (rule "function_type") + (rule "attribute_payload") + (rule "record_expression") + (rule "object_expression") + (rule "constructor_declaration") + (rule "class_binding") + (rule "class_application") + (rule "type_binding") + (rule "method_definition") + (rule "structure") + (rule "signature") + (irule "signature") + (irule "structure") + (rule "_class_field_specification") + (rule "_sequence_expression") + (rule "_signature_item") + (rule "_structure_item")))) + :selector (:choose node :match-siblings t)) + + (:activation-nodes + ((:nodes ((rule "compilation_unit")))) + :selector (:choose node :match-children t)))) + + (procedures-hierarchy + + ;; NOTE: Known limitation regarding navigation within class + ;; hierarchies. + ;; Navigation will go through: + ;; class + ;; → class_definition + ;; → class_binding + ;; → class_name + ;; → parameter + ;; → parameter + ;; → object_expression + ;; But we want: + ;; class + ;; → class_name + ;; → object + ;; → instance_variable_definition + ;; This appears to be either: + ;; 1. A limitation in how combobulate processes selector + ;; rules for certain grammars + ;; 2. An issue specific to the OCaml tree-sitter grammar structure + ;; 3. A bug in the combobulate procedure matching logic + + ;; Pretty printing rules for `class_binding' gives us: + ;; - :*unnamed*: ("abstract_type" "item_attribute" + ;; "parameter" "class_function_type" "type_variable") + ;; - :body: ("class_function" "let_open_class_expression" + ;; "let_class_expression" "class_application") + ;; - :name ("class_name") + + ;; the object expression does not appear in these rules which is probably + ;; part of the problem. + + '((:activation-nodes + ((:nodes ("field_get_expression" + "value_path" + "paranthesized_operator" + "application_expression" + "constructor_declaration" + "parameter")) + (:nodes ((rule "polymorphic_variant_type")))) + :selector (:choose node :match-children t)) + + (:activation-nodes + ((:nodes ("object_expression" + (rule "class_definition") + (rule "object_expression") + (rule "class_binding")))) + :selector (:choose node :match-children + (:discard-rules ("tag_specification")))) + + ;; Specific rules for converting from a constructor + ;; (of a Sum type) to its type + (:activation-nodes + ((:nodes ("constructor_name") + :has-parent ("constructor_declaration"))) + :selector (:choose parent :match-children + (:nodes ("type_constructor_path")))) + + ;; Specific rules for converting from a constructor + ;; (of a Sum type) to its type + (:activation-nodes + ((:nodes ("type_constructor_path"))) + :selector (:choose node :match-children + (:nodes ("type_constructor")))) + + (:activation-nodes + ((:nodes ("signature" + "structure" + "module_name" + "module_path") + :has-ancestor ("module_definition" + "module_type_definition" + "package_expression")) + + ;; We remove class_application, class_binding and object_expression + ;; to avoid conflict (See the rules above) + (:nodes ((rule "module_definition") + (rule "record_declaration") + (rule "attribute_payload") + (rule "function_type") + (irule "function_type") + (irule "set_expression") + (irule "infix_expression") + (rule "constructor_declaration") + (rule "type_binding") + (rule "method_definition") + (irule "value_path") + (irule "signature") + (irule "structure") + (rule "_signature_item") + (rule "_structure_item")))) + :selector (:choose node :match-children t)) + + ;; This should be equivalent to listing everything in "compilation_unit" + (:activation-nodes + ((:nodes (rule "compilation_unit"))) + :selector (:choose node :match-children t)))))) + + + ;; Combobulate for interface files (`mli'). + ;; Asubset of constructs compared to implementation files + (defconst combobulate-ocaml-interface-definitions + '((context-nodes + '("false" "true" "number" "class_name" "value_name" + "module_name" "module_type_name" "field_name" + "module" "sig" "end" "val" "type" "class" "exception" + "open" "external" ":" ";" "," "|" "->" "=" "(" ")" "[" "]" "{" "}")) + + (envelope-indent-region-function #'indent-region) + (pretty-print-node-name-function #'combobulate-ocaml-pretty-print-node-name) + (plausible-separators '(";" ",", "|")) + + ;; Interface files only have specifications, not definitions + ;; This is why declaration and type_specs are discared. + (procedures-defun + '((:activation-nodes + ((:nodes ("type_definition" + "exception_definition" + "value_specification" + "module_definition" + "module_type_definition" + "class_definition" + "class_type_definition" + "include_module" + "include_module_type" + "open_module")))))) + + (procedures-logical '((:activation-nodes ((:nodes (all)))))) + + (procedures-sibling + '((:activation-nodes + ((:nodes ("variant_declaration" + "record_declaration"))) + :selector (:choose node :match-children t)) + + (:activation-nodes + ((:nodes ( + ;; Top-level interface items - using rule to get + ;; all _signature_item types + (rule "_signature_item") + + ;; Regular nodes + "attribute" + "field_declaration" + (rule "attribute_payload") + (rule "object_expression") + (rule "constructor_declaration") + (rule "class_binding") + (rule "type_binding") + (rule "signature") + (irule "signature") + (rule "_class_field_specification")))) + :selector (:choose node :match-siblings t)) + + (:activation-nodes + ((:nodes ((rule "compilation_unit")))) + :selector (:choose node :match-children t)) )) + + (procedures-hierarchy + '( + + ;; From module_name, navigate up to parent then to signature + (:activation-nodes + ((:nodes ("module_name"))) + :selector (:choose parent :match-children + (:match-rules ("signature")))) + + ;; From sig keyword, navigate to sibling signature items + ;; (type_definition, value_specification, etc.) + (:activation-nodes + ((:nodes ("sig"))) + :selector (:choose node :match-siblings + (:match-rules ((rule "_signature_item"))))) + + ;; From method keyword, navigate to parent then to method_name + (:activation-nodes + ((:nodes ("method"))) + :selector (:choose parent :match-children + (:match-rules ("method_name")))) + + ;; For signature and other structural nodes, match their children + (:activation-nodes + ((:nodes ((rule "attribute_payload") + (rule "object_expression") + (rule "constructor_declaration") + (rule "class_binding") + "class_body_type" + "method_specification" + (rule "type_binding") + (rule "signature") + (irule "signature") + (rule "_signature_item")))) + :selector (:choose node :match-children t)) + + (:activation-nodes + ((:nodes (rule "compilation_unit"))) + :selector (:choose node :match-children t))))))) + +;; NOTE: OCaml has two tree-sitter grammars: 'ocaml' for .ml files and +;; 'ocaml_interface' for .mli files. +;; We register both as separate "languages" in Combobulate terms with their own +;; rule sets. Interface files (.mli) have a more restricted set of top-level +;; constructs (specifications rather than implementations). +;; The `:language' parameter matches what tree-sitter uses, +;; while the :name is used for Emacs Lisp symbol names. + +(define-combobulate-language + :name ocaml + :language ocaml + :major-modes (caml-mode tuareg-mode neocaml-mode) + :custom combobulate-ocaml-definitions + :setup-fn combobulate-ocaml-setup) + +(define-combobulate-language + :name ocaml-interface + :language ocaml_interface + :major-modes (caml-mode tuareg-mode neocaml-interface-mode) + :custom combobulate-ocaml-interface-definitions + :setup-fn combobulate-ocaml-setup) + +(defun combobulate-ocaml-setup (_) + "Setup function for OCaml mode with Combobulate." + ;; Configure imenu for OCaml files + (setq-local + + ;; Use tree-sitter based imenu (treesit-simple-imenu creates the index + ;; from the settings above) + treesit-simple-imenu-settings + `(("Type" "type_definition" nil combobulate-ocaml-imenu-name-function) + ("Module" "module_definition" nil combobulate-ocaml-imenu-name-function) + ("Class" "class_definition" nil combobulate-ocaml-imenu-name-function) + ("Class Type" "class_type_definition" nil combobulate-ocaml-imenu-name-function) + ("Value" "value_definition" nil combobulate-ocaml-imenu-name-function) + ("Function" "value_definition" nil combobulate-ocaml-imenu-name-function) + ("Exception" "exception_definition" nil combobulate-ocaml-imenu-name-function) + ("External" "external" nil combobulate-ocaml-imenu-name-function) + ("Module Type" "module_type_definition" nil combobulate-ocaml-imenu-name-function) + ("Include" "include_module" nil combobulate-ocaml-imenu-name-function) + ("Include Sig" "include_module_type" nil combobulate-ocaml-imenu-name-function) + ("Value Spec" "value_specification" nil combobulate-ocaml-imenu-name-function))) + +(setq-local imenu-create-index-function #'treesit-simple-imenu) +(setq-local combobulate-navigate-down-into-lists nil)) + +(provide 'combobulate-ocaml) +;;; combobulate-ocaml.el ends here From ca64d74677dde36c5d3420d474b1d65cf528bb9f Mon Sep 17 00:00:00 2001 From: xvw Date: Wed, 25 Mar 2026 16:32:53 +0100 Subject: [PATCH 09/24] Adapt `settings` Co-authored-by: Tim McGilchrist Co-authored-by: PizieDust --- combobulate-settings.el | 1 + 1 file changed, 1 insertion(+) diff --git a/combobulate-settings.el b/combobulate-settings.el index a8e86ca..5be0246 100644 --- a/combobulate-settings.el +++ b/combobulate-settings.el @@ -297,6 +297,7 @@ use the name of the face to highlight with. See (css . combobulate-css-setup) (yaml . combobulate-yaml-setup) (toml . combobulate-toml-setup) + (ocaml . combobulate-ocaml-setup) (html . combobulate-html-setup)) "Alist of setup functions to call when \\[combobulate-mode] is enabled. From 45f20fa44f9df3f9fdc228c4fb324390f588654b Mon Sep 17 00:00:00 2001 From: xvw Date: Wed, 25 Mar 2026 16:33:06 +0100 Subject: [PATCH 10/24] Adapt `query` Co-authored-by: Tim McGilchrist Co-authored-by: PizieDust --- combobulate-query.el | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/combobulate-query.el b/combobulate-query.el index f114f8b..166eba1 100644 --- a/combobulate-query.el +++ b/combobulate-query.el @@ -1151,19 +1151,21 @@ highlight Combobulate highlighters.") If QUIET is non-nil, then do not display any warning messages if the query fails to compile." + (declare-function combobulate-get-treesit-language-from-name "combobulate-setup") (if-let (err (combobulate-query-builder-validate-query query)) (progn (unless quiet (warn "Query %s failed to compile: %s." query err)) nil) - (setq treesit-font-lock-settings - (append treesit-font-lock-settings - (treesit-font-lock-rules - :language language - :override t - :feature combobulate-highlight-feature-symbol - query))) - ;; required for the font lock machinery to take effect. - (treesit-font-lock-recompute-features) - (font-lock-flush) - query)) + (let ((ts-lang (combobulate-get-treesit-language-from-name language))) + (setq treesit-font-lock-settings + (append treesit-font-lock-settings + (treesit-font-lock-rules + :language ts-lang + :override t + :feature combobulate-highlight-feature-symbol + query))) + ;; required for the font lock machinery to take effect. + (treesit-font-lock-recompute-features) + (font-lock-flush) + query))) (defun combobulate-highlight-install (language) "Install the font lock rules for LANGUAGE in the current buffer." From 0f80adb1c5554d1cd00a0a7ca77a36131231fbb0 Mon Sep 17 00:00:00 2001 From: xvw Date: Wed, 25 Mar 2026 16:33:27 +0100 Subject: [PATCH 11/24] Adapt `procedure` Co-authored-by: Tim McGilchrist Co-authored-by: PizieDust --- combobulate-procedure.el | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/combobulate-procedure.el b/combobulate-procedure.el index 424a551..e6834a3 100644 --- a/combobulate-procedure.el +++ b/combobulate-procedure.el @@ -595,8 +595,13 @@ defaults to `combobulate'. `:discard-rules' is a list of rules (cadr (assoc-string rule-name (combobulate-production-rules--get combobulate-rules-inverse-alist language)))) (defun combobulate-production-rules--get (variable &optional language) - "Get the production rules from VARIABLE." - (cadr (assoc (or language (combobulate-primary-language)) variable))) + "Get the production rules from VARIABLE. +LANGUAGE can be a Combobulate language name or tree-sitter language. +Converts Combobulate names to tree-sitter names before lookup." + (declare-function combobulate-get-treesit-language-from-name "combobulate-setup") + (let ((lang (or language (combobulate-primary-language)))) + ;; Convert Combobulate language name to tree-sitter language name if needed + (cadr (assoc (combobulate-get-treesit-language-from-name lang) variable)))) (defun combobulate-production-rules-get-types (&optional language skip-discard-rules) "Return a list of all node types in LANGUAGE. From dce87d9f7d62cf57bcea8dc5e36d40205b7a6b54 Mon Sep 17 00:00:00 2001 From: xvw Date: Wed, 25 Mar 2026 16:33:39 +0100 Subject: [PATCH 12/24] Adapt `interface` Co-authored-by: Tim McGilchrist Co-authored-by: PizieDust --- combobulate-interface.el | 68 +++++++++++++++++++++++++++++++--------- 1 file changed, 53 insertions(+), 15 deletions(-) diff --git a/combobulate-interface.el b/combobulate-interface.el index a3431af..2730ed7 100644 --- a/combobulate-interface.el +++ b/combobulate-interface.el @@ -42,14 +42,36 @@ (defsubst combobulate-node-p (node) (treesit-node-p node)) -(defsubst combobulate-buffer-root-node (&optional language) - (treesit-buffer-root-node (or language (combobulate-primary-language)))) - -(defsubst combobulate-node-on (beg end &optional parser-or-lang named) - (treesit-node-on beg end (or parser-or-lang (combobulate-primary-language)) named)) - -(defsubst combobulate-node-at (pos &optional parser-or-lang named) - (treesit-node-at pos (or parser-or-lang (combobulate-primary-language)) named)) +(defun combobulate-buffer-root-node (&optional language) + "Get the root node for LANGUAGE in the current buffer. +LANGUAGE can be either a Combobulate language name or tree-sitter language symbol." + (declare-function combobulate-get-treesit-language-from-name "combobulate-setup") + (let ((ts-lang (if language + (combobulate-get-treesit-language-from-name language) + (combobulate-get-treesit-language-from-name (combobulate-primary-language))))) + (treesit-buffer-root-node ts-lang))) + +(defun combobulate-node-on (beg end &optional parser-or-lang named) + "Get the smallest node covering BEG to END for PARSER-OR-LANG. +PARSER-OR-LANG can be a parser, Combobulate language name, or tree-sitter language." + (declare-function combobulate-get-treesit-language-from-name "combobulate-setup") + (let ((ts-lang (if parser-or-lang + (if (treesit-parser-p parser-or-lang) + parser-or-lang + (combobulate-get-treesit-language-from-name parser-or-lang)) + (combobulate-get-treesit-language-from-name (combobulate-primary-language))))) + (treesit-node-on beg end ts-lang named))) + +(defun combobulate-node-at (pos &optional parser-or-lang named) + "Get the smallest node at POS for PARSER-OR-LANG. +PARSER-OR-LANG can be a parser, Combobulate language name, or tree-sitter language." + (declare-function combobulate-get-treesit-language-from-name "combobulate-setup") + (let ((ts-lang (if parser-or-lang + (if (treesit-parser-p parser-or-lang) + parser-or-lang + (combobulate-get-treesit-language-from-name parser-or-lang)) + (combobulate-get-treesit-language-from-name (combobulate-primary-language))))) + (treesit-node-at pos ts-lang named))) (defsubst combobulate-induce-sparse-tree (root predicate &optional process-fn limit) (treesit-induce-sparse-tree root predicate process-fn limit)) @@ -70,11 +92,22 @@ (treesit-node-parser node)) (defun combobulate-primary-language (&optional quiet) + "Get the Combobulate language name for the current buffer. + +Returns the Combobulate language NAME (e.g., 'ocaml-interface'), not the +tree-sitter language (e.g., 'ocaml_interface'). This ensures symbol names +are valid Emacs Lisp identifiers." + (declare-function combobulate-get-language-name-from-treesit "combobulate-setup") + (declare-function combobulate-get-registered-language "combobulate-setup") (or - (treesit-language-at (point)) + ;; First try to get language from parser at point and map to Combobulate name + (when-let ((ts-lang (treesit-language-at (point)))) + (combobulate-get-language-name-from-treesit ts-lang)) + ;; Fallback to registered language for this major mode (car (combobulate-get-registered-language major-mode)) - (when-let ((first-language (car (combobulate-parser-list)))) - (combobulate-parser-language first-language)) + ;; Last resort: get first parser and map to Combobulate name + (when-let ((first-parser (car (combobulate-parser-list)))) + (combobulate-get-language-name-from-treesit (combobulate-parser-language first-parser))) (unless quiet (error "No parsers available")))) @@ -82,8 +115,11 @@ (cl-assert (combobulate-node-p node) t "Must be a real tree-sitter node") (treesit-node-buffer node)) -(defsubst combobulate-query-validate (language query) - (treesit-query-validate language query)) +(defun combobulate-query-validate (language query) + "Validate QUERY for LANGUAGE. +LANGUAGE can be a Combobulate name or tree-sitter language." + (declare-function combobulate-get-treesit-language-from-name "combobulate-setup") + (treesit-query-validate (combobulate-get-treesit-language-from-name language) query)) (defsubst combobulate-query-capture (node query &optional beg end node-only) (treesit-query-capture node query beg end node-only)) @@ -148,9 +184,11 @@ (treesit-node-eq node1 node2) (eq node1 node2))) -(defsubst combobulate-root-node () +(defun combobulate-root-node () + "Get the root node for the primary language in the current buffer." + (declare-function combobulate-get-treesit-language-from-name "combobulate-setup") (treesit-buffer-root-node - (combobulate-primary-language))) + (combobulate-get-treesit-language-from-name (combobulate-primary-language)))) (defsubst combobulate-node-descendant-for-range (node beg end &optional all) (treesit-node-descendant-for-range node beg end (not all))) From 5750e6adffd6c90834ab63de9e66b8f9cf150dce Mon Sep 17 00:00:00 2001 From: xvw Date: Wed, 25 Mar 2026 16:33:51 +0100 Subject: [PATCH 13/24] Autoload `combobulate-ocaml` Co-authored-by: Tim McGilchrist Co-authored-by: PizieDust --- combobulate.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/combobulate.el b/combobulate.el index 74076e0..58393d0 100644 --- a/combobulate.el +++ b/combobulate.el @@ -84,6 +84,8 @@ (require 'combobulate-json) ;;;###autoload (require 'combobulate-go) +;;;###autoload +(require 'combobulate-ocaml) ;;; end language support (provide 'combobulate) From 826c68e6ae4efce2e3eb81017daf582c86fe6f84 Mon Sep 17 00:00:00 2001 From: xvw Date: Wed, 25 Mar 2026 16:34:48 +0100 Subject: [PATCH 14/24] Add Sibiling tests Co-authored-by: Tim McGilchrist Co-authored-by: PizieDust --- .../sibling/class_type_expressions.ml | 8 ++ .../sibling/class_value_expressions.ml | 13 ++ tests/fixtures/sibling/extension_points.ml | 14 ++ tests/fixtures/sibling/gadt.ml | 6 + tests/fixtures/sibling/let_bindings.ml | 22 ++++ tests/fixtures/sibling/module_sig_a.ml | 12 ++ tests/fixtures/sibling/module_sig_b.ml | 27 ++++ tests/fixtures/sibling/module_string.ml | 11 ++ .../sibling/module_type_expressions.ml | 35 +++++ .../sibling/module_value_expressions.ml | 51 +++++++ tests/fixtures/sibling/modules.ml | 44 +++++++ tests/fixtures/sibling/nested_type_records.ml | 11 ++ tests/fixtures/sibling/patterns.ml | 75 +++++++++++ tests/fixtures/sibling/type_declarations.ml | 48 +++++++ tests/fixtures/sibling/type_expressions.ml | 21 +++ tests/fixtures/sibling/type_records.ml | 8 ++ tests/fixtures/sibling/value_expressions.ml | 124 ++++++++++++++++++ 17 files changed, 530 insertions(+) create mode 100644 tests/fixtures/sibling/class_type_expressions.ml create mode 100644 tests/fixtures/sibling/class_value_expressions.ml create mode 100644 tests/fixtures/sibling/extension_points.ml create mode 100644 tests/fixtures/sibling/gadt.ml create mode 100644 tests/fixtures/sibling/let_bindings.ml create mode 100644 tests/fixtures/sibling/module_sig_a.ml create mode 100644 tests/fixtures/sibling/module_sig_b.ml create mode 100644 tests/fixtures/sibling/module_string.ml create mode 100644 tests/fixtures/sibling/module_type_expressions.ml create mode 100644 tests/fixtures/sibling/module_value_expressions.ml create mode 100644 tests/fixtures/sibling/modules.ml create mode 100644 tests/fixtures/sibling/nested_type_records.ml create mode 100644 tests/fixtures/sibling/patterns.ml create mode 100644 tests/fixtures/sibling/type_declarations.ml create mode 100644 tests/fixtures/sibling/type_expressions.ml create mode 100644 tests/fixtures/sibling/type_records.ml create mode 100644 tests/fixtures/sibling/value_expressions.ml diff --git a/tests/fixtures/sibling/class_type_expressions.ml b/tests/fixtures/sibling/class_type_expressions.ml new file mode 100644 index 0000000..2a504ec --- /dev/null +++ b/tests/fixtures/sibling/class_type_expressions.ml @@ -0,0 +1,8 @@ +(* -*- combobulate-test-point-overlays: ((1 outline 185) (2 outline 209) (3 outline 241)); eval: (combobulate-test-fixture-mode t); -*- *) + +class type ['a] basic_widget = + object + method get_id : int + method set_id : int -> unit + method draw : 'a -> unit + end diff --git a/tests/fixtures/sibling/class_value_expressions.ml b/tests/fixtures/sibling/class_value_expressions.ml new file mode 100644 index 0000000..b4b20d9 --- /dev/null +++ b/tests/fixtures/sibling/class_value_expressions.ml @@ -0,0 +1,13 @@ +(* -*- combobulate-test-point-overlays: ((1 outline 192) (2 outline 226) (3 outline 288)); eval: (combobulate-test-fixture-mode t); -*- *) + +class virtual file_handler filename = + object + val mutable file_descr = None + method open_file = file_descr <- Some (open_out filename) + method write_line str = + match file_descr with + | Some oc -> output_string oc (str ^ "\n") + | None -> failwith "File not open" + end + + diff --git a/tests/fixtures/sibling/extension_points.ml b/tests/fixtures/sibling/extension_points.ml new file mode 100644 index 0000000..b2fd503 --- /dev/null +++ b/tests/fixtures/sibling/extension_points.ml @@ -0,0 +1,14 @@ +(* -*- combobulate-test-point-overlays: ((1 outline 253) (2 outline 284) (3 outline 312) (4 outline 338) (5 outline 363) (6 outline 449) (7 outline 548) (8 outline 577) (9 outline 586) (10 outline 596)); eval: (combobulate-test-fixture-mode t); -*- *) +let with_structure_payload = 1 [@payload let x = 10 in x] + +let with_type_payload = 1 [@payload: int -> bool] + +let with_pattern_payload = function + | Some x [@payload? Some y] -> x + | None -> 0 + +let with_pattern_and_guard = function + | Some x [@payload? Some y when y > 0] -> x + | None -> 0 + +let multiple_attributes = 42 [@first] [@second] [@third] diff --git a/tests/fixtures/sibling/gadt.ml b/tests/fixtures/sibling/gadt.ml new file mode 100644 index 0000000..305490d --- /dev/null +++ b/tests/fixtures/sibling/gadt.ml @@ -0,0 +1,6 @@ +(* -*- combobulate-test-point-overlays: ((1 outline 159) (2 outline 185) (3 outline 229)); eval: (combobulate-test-fixture-mode t); -*- *) + +type _ term = + | Int : int -> int term + | Add : (int term * int term) -> int term + | Bool : bool -> bool term diff --git a/tests/fixtures/sibling/let_bindings.ml b/tests/fixtures/sibling/let_bindings.ml new file mode 100644 index 0000000..1aef2e0 --- /dev/null +++ b/tests/fixtures/sibling/let_bindings.ml @@ -0,0 +1,22 @@ +(* -*- combobulate-test-point-overlays: ((1 outline 270) (2 outline 295) (3 outline 320) (4 outline 345) (5 outline 374) (6 outline 406) (7 outline 430) (8 outline 466) (9 outline 532) (10 outline 561) (11 outline 603)); eval: (combobulate-test-fixture-mode t); -*- *) +let simple_integer = 42 + +let int32_literal = 42l + +let int64_literal = 42L + +let nativeint_literal = 42n + +let integer_with_suffix = 42g + +let char_literal = 'a' + +let string_literal = "hello world" + +let quoted_string_literal = {|A string with "quotes" inside it|} + +let float_literal = 3.14159 + +let scientific_notation_float = 6.022e23 + +let float_with_suffix = 1.0g diff --git a/tests/fixtures/sibling/module_sig_a.ml b/tests/fixtures/sibling/module_sig_a.ml new file mode 100644 index 0000000..bb07d13 --- /dev/null +++ b/tests/fixtures/sibling/module_sig_a.ml @@ -0,0 +1,12 @@ +(* -*- combobulate-test-point-overlays: ((1 outline 181) (2 outline 204) (3 outline 280) (4 outline 304)); eval: (combobulate-test-fixture-mode t); -*- *) +module Positive : sig + type t = private int + val make : int -> t (* sibling navigation should go to val to_int *) + val to_int : t -> int + val add : t -> t -> t +end = struct + type t = int + let make i = if i > 0 then i else invalid_arg "make" + let to_int x = x + let add x y = x + y +end diff --git a/tests/fixtures/sibling/module_sig_b.ml b/tests/fixtures/sibling/module_sig_b.ml new file mode 100644 index 0000000..564363e --- /dev/null +++ b/tests/fixtures/sibling/module_sig_b.ml @@ -0,0 +1,27 @@ +(* -*- combobulate-test-point-overlays: ((1 outline 148) (2 outline 159) (3 outline 308)); eval: (combobulate-test-fixture-mode t); -*- *) + +module Positive : sig (* sibling navigation should go to struct *) + type t = private int + val make : int -> t + val to_int : t -> int + val add : t -> t -> t +end = struct + type t = int + let make i = if i > 0 then i else invalid_arg "make" + let to_int x = x + let add x y = x + y +end + +(* Module for mathematical operations *) +module Math = struct + let square x = x * x + let cube x = x * x * x + let double x = x + x + let half x = x / 2 + + module Constants = struct + let pi = 3.14159 + let e = 2.71828 + let golden_ratio = 1.61803 + end +end diff --git a/tests/fixtures/sibling/module_string.ml b/tests/fixtures/sibling/module_string.ml new file mode 100644 index 0000000..a3a5160 --- /dev/null +++ b/tests/fixtures/sibling/module_string.ml @@ -0,0 +1,11 @@ +(* -*- combobulate-test-point-overlays: ((1 outline 264) (2 outline 297)); eval: (combobulate-test-fixture-mode t); -*- *) +module StringOps = struct + let uppercase s u = String.uppercase_ascii s + let lowercase s = String.lowercase_ascii s + let reverse s = + let len = String.length s in + String.init len (fun i -> s.[len - 1 - i]) + let concat_with sep strs = String.concat sep strs +end + +(* sibling navigation from String.init to previous sibling should go to "let len. *) diff --git a/tests/fixtures/sibling/module_type_expressions.ml b/tests/fixtures/sibling/module_type_expressions.ml new file mode 100644 index 0000000..2b6aac3 --- /dev/null +++ b/tests/fixtures/sibling/module_type_expressions.ml @@ -0,0 +1,35 @@ +(* -*- combobulate-test-point-overlays: ((1 outline 189) (2 outline 353) (3 outline 688) (4 outline 802) (5 outline 845) (6 outline 889)); eval: (combobulate-test-fixture-mode t); -*- *) + +module type KEY_VALUE_STORE = sig + type key + type t + val connect : string -> t + val get : t -> key -> string option + val set : t -> key -> string -> unit +end + +module type DATABASE_CONNECTION = sig + + val connection_pool_size : int + external get_driver_version : unit -> string = "caml_get_db_driver_version" + + type 'a query_result = Row of 'a | Error of string + and row_id = int + + exception Connection_failed of string + + module Utils : sig val normalize_query : string -> string end + +end + +module type MAKE_CACHE = + functor (Db : DATABASE_CONNECTION) -> + sig + val get_user : id:int -> string + end + +module My_db = struct let version = 1 end + +module type DB_TYPE = module type of My_db + +module type CONNECTION_ALIAS = DATABASE_CONNECTION diff --git a/tests/fixtures/sibling/module_value_expressions.ml b/tests/fixtures/sibling/module_value_expressions.ml new file mode 100644 index 0000000..2751bfb --- /dev/null +++ b/tests/fixtures/sibling/module_value_expressions.ml @@ -0,0 +1,51 @@ +(* -*- combobulate-test-point-overlays: ((1 outline 191) (2 outline 263) (3 outline 315) (4 outline 389) (5 outline 1069) (6 outline 1187)); eval: (combobulate-test-fixture-mode t); -*- *) + +module Core_utils = struct + let normalize_query s = String.trim s +end + +module Redis = struct + type connection = true +end + +module Http = struct + module Request = struct + type t = .. + end +end + +module Redis_client = struct + + open Core_utils + + type connection = Redis.connection + type 'a query_result = Success of 'a | Failure of exn + type Http.Request.t += Redis_command of string + + exception Connection_failed of string + exception Query_failed of { query: string; reason: string } + + external get_redis_version_major : unit -> int = "caml_redis_major_version" + + let default_port = 6379 + + module type LOGGER = sig + val log : string -> unit + end + + include (val (failwith "Unimplemented") : LOGGER) + + class type redis_connection_obj = object method send: string -> unit end + class default_connection = object + method send cmd = print_endline cmd + end + +end + +module Safe_redis_client = (Redis_client : sig + exception Connection_failed of string + val default_port : int +end) + +module Redis = Redis_client + diff --git a/tests/fixtures/sibling/modules.ml b/tests/fixtures/sibling/modules.ml new file mode 100644 index 0000000..aa55ce8 --- /dev/null +++ b/tests/fixtures/sibling/modules.ml @@ -0,0 +1,44 @@ +(* -*- combobulate-test-point-overlays: ((1 outline 503) (2 outline 522) (3 outline 559) (4 outline 615) (5 outline 665) (6 outline 705) (7 outline 923) (8 outline 950) (9 outline 1013) (10 outline 1066) (11 outline 1144)); eval: (combobulate-test-fixture-mode t); -*- *) +module Core_utils = struct + let normalize_query s = String.trim s +end + +module Redis = struct + type connection = true +end + +module Http = struct + module Request = struct + type t = .. + end +end + +module Redis_client = struct + + open Core_utils + + type connection = Redis.connection + type 'a query_result = Success of 'a | Failure of exn + type Http.Request.t += Redis_command of string + + exception Connection_failed of string + exception Query_failed of { query: string; reason: string } + + (* the external keyword is behaving unexpectedly in this context *) + (* external get_redis_version_major : unit -> int = "caml_redis_major_version" *) + + let default_port = 6379 + + module type LOGGER = sig + val log : string -> unit + end + + include (val (failwith "Unimplemented") : LOGGER) + + class type redis_connection_obj = object method send: string -> unit end + + class default_connection = object + method send cmd = print_endline cmd + end + +end diff --git a/tests/fixtures/sibling/nested_type_records.ml b/tests/fixtures/sibling/nested_type_records.ml new file mode 100644 index 0000000..8afdab1 --- /dev/null +++ b/tests/fixtures/sibling/nested_type_records.ml @@ -0,0 +1,11 @@ +(* -*- combobulate-test-point-overlays: ((1 outline 153) (2 outline 228)); eval: (combobulate-test-fixture-mode t); -*- *) +type second_level_page = + | Regular of { + header : string; + entries : string list; + } + | Compressed of { + header : string; + encoding_array : string list; + entries : string list; + } diff --git a/tests/fixtures/sibling/patterns.ml b/tests/fixtures/sibling/patterns.ml new file mode 100644 index 0000000..5065eb3 --- /dev/null +++ b/tests/fixtures/sibling/patterns.ml @@ -0,0 +1,75 @@ +(* -*- combobulate-test-point-overlays: ((1 outline 402) (2 outline 441) (3 outline 476) (4 outline 540) (5 outline 630) (6 outline 908) (7 outline 1121) (8 outline 1203) (9 outline 1370) (10 outline 1465) (11 outline 1718) (12 outline 1839) (13 outline 1912) (14 outline 2067) (15 outline 2106) (16 outline 2148) (17 outline 2236) (18 outline 2296)); eval: (combobulate-test-fixture-mode t); -*- *) + +type user = { name: string; id: int } + +type role = Admin of user | Guest + +let is_admin = function + | Admin _ -> true + | Guest -> false + +let is_admin_b user_type = + match user_type with + | Admin _ -> true + | Guest -> false + +let classify_char = function + | 'a' | 'e' | 'i' | 'o' | 'u' as vowel -> Printf.printf "%c is a vowel\n" vowel + | 'a' .. 'z' -> print_endline "lowercase letter" + | '0' .. '9' -> print_endline "digit" + | '.' -> print_endline "period" + | _ -> print_endline "other character" + +let describe_point = function + | (0, 0) -> "origin" + | (x, 0) -> Printf.sprintf "on the x-axis at %d" x + | (0, y) -> Printf.sprintf "on the y-axis at %d" y + | (x, y) -> Printf.sprintf "point at (%d, %d)" x y + +let rec list_length = function + | [] -> 0 + | _ :: tail -> 1 + list_length tail + +let handle_http_method = function + | `GET -> "Fetching resource" + | `POST -> "Creating resource" + | `PUT -> "Updating resource" + | `DELETE -> "Deleting resource" + +let get_user_name = function + | { name; id = 0 } -> name ^ " (root)" + | { name; _ } -> name + +let get_array_header = function + | [||] -> "empty array" + | [| x |] -> Printf.sprintf "single element: %d" x + | [| x; y; z |] -> Printf.sprintf "three elements: %d, %d, %d" x y z + | [| h; _ |] -> Printf.sprintf "header: %d" h + | _ -> "long array" + +let process_int_list (l: int list) = + match l with + | (x : int) :: _ -> Printf.printf "The head is %d" x + | [] -> () + +let force_lazy_int = function + | lazy (Some x) -> x + | lazy None -> 0 + +let handle_exception = function + | Not_found -> "Resource not found" + | Invalid_argument msg -> "Invalid argument: " ^ msg + | _ -> "Unknown exception" + +module type ID = sig val id : int end + +let get_module_id (module M : ID) = M.id + +let get_list_head_with_open = function + | List.[] -> None + | List.(x :: _) -> Some x + +class type logger = object method log : string -> unit end + +let log_message (l : #logger) msg = + l#log msg diff --git a/tests/fixtures/sibling/type_declarations.ml b/tests/fixtures/sibling/type_declarations.ml new file mode 100644 index 0000000..c8f0225 --- /dev/null +++ b/tests/fixtures/sibling/type_declarations.ml @@ -0,0 +1,48 @@ +(* -*- combobulate-test-point-overlays: ((1 outline 361) (2 outline 375) (3 outline 400) (4 outline 440) (5 outline 483) (6 outline 548) (7 outline 601) (8 outline 712) (9 outline 800) (10 outline 879) (11 outline 988) (12 outline 1007) (13 outline 1079) (14 outline 1122) (15 outline 1149) (16 outline 1204)); eval: (combobulate-test-fixture-mode t); -*- *) + +type user_id + +type file_handle = int + +type 'a cache = ('a, float) Hashtbl.t + +type 'a internal_state = private 'a list + +type ('a, 'b) constrained_pair = 'a * 'b constraint 'a = string + +type http_status = Success | NotFound | ServerError + +type expression = + | Const of int + | Add of expression * expression + | Multiply of expression * expression + +type ui_event = + | MouseClick of { x: int; y: int } + | KeyPress of { key_code: int } + +type _ value = + | Int : int -> int value + | String : string -> string value + +type user_profile = { + id: user_id; + name: string; + email: string option; + mutable last_login: float; +} + +type command = .. + +type command += + | Login of { user: string; pass: string } + | Logout + +type command += + | SendMessage of string + +exception Timeout_expired + +exception Api_error of { code: int; message: string } + +exception Old_error_name = Not_found diff --git a/tests/fixtures/sibling/type_expressions.ml b/tests/fixtures/sibling/type_expressions.ml new file mode 100644 index 0000000..39821b4 --- /dev/null +++ b/tests/fixtures/sibling/type_expressions.ml @@ -0,0 +1,21 @@ +(* -*- combobulate-test-point-overlays: ((1 outline 220) (2 outline 284) (3 outline 325) (4 outline 382) (5 outline 433) (6 outline 516) (7 outline 581) (8 outline 688)); eval: (combobulate-test-fixture-mode t); -*- *) +type ('data, 'error) network_response = ('data, 'error) result + +module Date = struct type t = float end + +type extensible_config = < port : int; host : string; > + +class base_widget = object method id = "base" end + +class type db_connection = object method query : string -> string array array end + +type shape = [ `Circle of float | `Rectangle of float * float ] + +let zip_with_value : 'a 'b. 'a -> 'b list -> ('a * 'b) list = + fun x ys -> List.map (fun y -> (x, y)) ys + +module type KV_STORE = sig + type key + type t + val get : t -> key -> string option +end diff --git a/tests/fixtures/sibling/type_records.ml b/tests/fixtures/sibling/type_records.ml new file mode 100644 index 0000000..c61f6a1 --- /dev/null +++ b/tests/fixtures/sibling/type_records.ml @@ -0,0 +1,8 @@ +(* -*- combobulate-test-point-overlays: ((1 outline 181) (2 outline 192) (3 outline 208) (4 outline 232)); eval: (combobulate-test-fixture-mode t); -*- *) + +type user_profile = { + id: int; + name: string; + email: string option; + mutable last_login: float; +} diff --git a/tests/fixtures/sibling/value_expressions.ml b/tests/fixtures/sibling/value_expressions.ml new file mode 100644 index 0000000..c5b6d71 --- /dev/null +++ b/tests/fixtures/sibling/value_expressions.ml @@ -0,0 +1,124 @@ +(* -*- combobulate-test-point-overlays: ((1 outline 962) (2 outline 976) (3 outline 999) (4 outline 1040) (5 outline 1061) (6 outline 1140) (7 outline 1209) (8 outline 1256) (9 outline 1288) (10 outline 1331) (11 outline 1377) (12 outline 1409) (13 outline 1459) (14 outline 1499) (15 outline 1588) (16 outline 1660) (17 outline 1686) (18 outline 1720) (19 outline 1744) (20 outline 1772) (21 outline 1797) (22 outline 1820) (23 outline 1841) (24 outline 1889) (25 outline 1934) (26 outline 1966) (27 outline 2011) (28 outline 2039) (29 outline 2074) (30 outline 2133) (31 outline 2193) (32 outline 2285) (33 outline 2340) (34 outline 2401) (35 outline 2425) (36 outline 2463) (37 outline 2510) (38 outline 2634) (39 outline 2664) (40 outline 2688) (41 outline 2737) (42 outline 2779) (43 outline 2865) (44 outline 2984) (45 outline 3045) (46 outline 3126) (47 outline 3158) (48 outline 3211) (49 outline 3236)); eval: (combobulate-test-fixture-mode t); -*- *) +let pi = 4.14 +let two_pi = 2.0 *. pi +module Math = struct let e = 2.71828 end +let euler = Math.e + +let area_of_circle radius = + let pi = 3.14159 in + pi *. (radius *. radius) + +let rec factorial n = + if n <= 1 then 1 else n * factorial (n - 1) + +let is_zero = function 0 -> true | _ -> false + +let increment = fun x -> x + 1 + +let greet = fun ~name -> "Hello, " ^ name + +let get_config = fun ?(port=8080) () -> port + +let _ = print_endline "Hello" + +let _ = List.iter (fun x -> print_int x) [1; 2] + +let _ = [1;2;3] |> List.map increment + +let number_to_string n = + match n with + | 0 -> "zero" + | 1 -> "one" + | _ -> "other" + +let get_env_var var = + try Sys.getenv var with Not_found -> "default" + +let point = (10, 20, 30) + +type role = Admin | Guest of int + +let admin_role = Admin + +let guest_role = Guest 123 + +let an_option = Some 42 + +let http_ok = `Ok 200 + +let http_get = `GET + +type user = { name: string; mutable age: int } + +let new_user = { name = "Alice"; age = 30 } + +let alice_name = new_user.name + +let older_user = { new_user with age = 31 } + +let _ = new_user.age <- 32 + +let primes = [| 2; 3; 5; 7; 11 |] + +let sign n = if n > 0 then 1 else if n < 0 then -1 else 0 + +let _ = print_endline "Starting"; print_endline "Finished" + +let countdown n = + let i = ref n in + while !i > 0 do + print_int !i; + decr i + done + +let print_upto n = for i = 1 to n do print_int i done + +let print_downto n = for i = n downto 0 do print_int i done + +let an_int = (1 : int) + +let an_obj = object method x = 1 end + +let coerced_obj = (an_obj :> < x : int; .. >) + +class counter = + object (self) + val mutable count = 0 + method get = count + method inc = count <- count + 1 + end + +let my_counter = new counter + +let _ = my_counter#inc + +let custom_obj = object method value = 42 end + + +module type ID = sig val id : string end + +let local_module = + let module M = struct let id = "local" end in + (module M : ID) + +let _ = + let exception My_error of string in + try raise (My_error "test") + with My_error msg -> print_endline msg + + +let lazy_computation = lazy (print_endline "computing"; 42) + +let make_id_gen () = + fun (type a) -> (Hashtbl.create 16 : (a, int) Hashtbl.t) + +let len = List.(length [1;2;3]) +let len_block = + let open List in + length [1;2;3] + +let (let*) = Option.bind +let add_options opt_a opt_b = + let* a = opt_a in + let* b = opt_b in + Some (a + b) From c1e0d1920da7c6a7697b0fea14597b0e549f3c9b Mon Sep 17 00:00:00 2001 From: xvw Date: Wed, 25 Mar 2026 16:35:13 +0100 Subject: [PATCH 15/24] Add Down tests Co-authored-by: Tim McGilchrist Co-authored-by: PizieDust --- tests/fixtures/down/class_types.ml | 5 +++++ tests/fixtures/down/class_types_b.ml | 5 +++++ tests/fixtures/down/classes.ml | 14 ++++++++++++++ tests/fixtures/down/functors.ml | 16 ++++++++++++++++ tests/fixtures/down/matches.ml | 4 ++++ tests/fixtures/down/module_sig_a.ml | 12 ++++++++++++ tests/fixtures/down/module_sig_b.ml | 12 ++++++++++++ tests/fixtures/down/module_string.ml | 11 +++++++++++ tests/fixtures/down/nested_matches.ml | 9 +++++++++ tests/fixtures/down/type_declarations.ml | 11 +++++++++++ 10 files changed, 99 insertions(+) create mode 100644 tests/fixtures/down/class_types.ml create mode 100644 tests/fixtures/down/class_types_b.ml create mode 100644 tests/fixtures/down/classes.ml create mode 100644 tests/fixtures/down/functors.ml create mode 100644 tests/fixtures/down/matches.ml create mode 100644 tests/fixtures/down/module_sig_a.ml create mode 100644 tests/fixtures/down/module_sig_b.ml create mode 100644 tests/fixtures/down/module_string.ml create mode 100644 tests/fixtures/down/nested_matches.ml create mode 100644 tests/fixtures/down/type_declarations.ml diff --git a/tests/fixtures/down/class_types.ml b/tests/fixtures/down/class_types.ml new file mode 100644 index 0000000..67989a6 --- /dev/null +++ b/tests/fixtures/down/class_types.ml @@ -0,0 +1,5 @@ +(* -*- combobulate-test-point-overlays: ((1 outline 146)); eval: (combobulate-test-fixture-mode t); -*- *) +class type shape_class = + object + method area : float + end diff --git a/tests/fixtures/down/class_types_b.ml b/tests/fixtures/down/class_types_b.ml new file mode 100644 index 0000000..5237911 --- /dev/null +++ b/tests/fixtures/down/class_types_b.ml @@ -0,0 +1,5 @@ +(* -*- combobulate-test-point-overlays: ((1 outline 119)); eval: (combobulate-test-fixture-mode t); -*- *) +class type shape_class = + object + method area : float + end diff --git a/tests/fixtures/down/classes.ml b/tests/fixtures/down/classes.ml new file mode 100644 index 0000000..89b67aa --- /dev/null +++ b/tests/fixtures/down/classes.ml @@ -0,0 +1,14 @@ +(* -*- combobulate-test-point-overlays: ((1 outline 165) (2 outline 173)); eval: (combobulate-test-fixture-mode t); -*- *) +class counter = + object + val mutable count = 0 + + method increment = + count <- count + 1 + + method reset = + count <- 0 + + method get = + count + end diff --git a/tests/fixtures/down/functors.ml b/tests/fixtures/down/functors.ml new file mode 100644 index 0000000..e152a3c --- /dev/null +++ b/tests/fixtures/down/functors.ml @@ -0,0 +1,16 @@ +(* -*- combobulate-test-point-overlays: ((1 outline 136) (2 outline 146)); eval: (combobulate-test-fixture-mode t); -*- *) +module type ORDERED = sig + type t = A | B | C | D + + val compare : t -> t -> int +end + +module F = +functor + (M : ORDERED) (N : ORDERED) +-> struct + module P = + struct + type t + end +end diff --git a/tests/fixtures/down/matches.ml b/tests/fixtures/down/matches.ml new file mode 100644 index 0000000..5ea6a45 --- /dev/null +++ b/tests/fixtures/down/matches.ml @@ -0,0 +1,4 @@ +(* -*- combobulate-test-point-overlays: ((1 outline 160) (2 outline 200)); eval: (combobulate-test-fixture-mode t); -*- *) +let is_positive_even = function + | x when x > 0 && x mod 2 = 0 -> true + | _ -> false diff --git a/tests/fixtures/down/module_sig_a.ml b/tests/fixtures/down/module_sig_a.ml new file mode 100644 index 0000000..faa8dbd --- /dev/null +++ b/tests/fixtures/down/module_sig_a.ml @@ -0,0 +1,12 @@ +(* -*- combobulate-test-point-overlays: ((1 outline 180) (2 outline 259) (3 outline 281) (4 outline 305)); eval: (combobulate-test-fixture-mode t); -*- *) +module Positive : sig + type t = private int (* Hierarchy navigation should go from sig to type t *) + val make : int -> t + val to_int : t -> int + val add : t -> t -> t +end = struct + type t = int + let make i = if i > 0 then i else invalid_arg "make" + let to_int x = x + let add x y = x + y +end diff --git a/tests/fixtures/down/module_sig_b.ml b/tests/fixtures/down/module_sig_b.ml new file mode 100644 index 0000000..4928aef --- /dev/null +++ b/tests/fixtures/down/module_sig_b.ml @@ -0,0 +1,12 @@ +(* -*- combobulate-test-point-overlays: ((1 outline 345) (2 outline 360) (3 outline 415) (4 outline 434)); eval: (combobulate-test-fixture-mode t); -*- *) +module Positive : sig + type t = private int + val make : int -> t + val to_int : t -> int + val add : t -> t -> t +end = struct (* Hierarchy navigation should go from struct to type t *) + type t = int + let make i = if i > 0 then i else invalid_arg "make" + let to_int x = x + let add x y = x + y +end diff --git a/tests/fixtures/down/module_string.ml b/tests/fixtures/down/module_string.ml new file mode 100644 index 0000000..7ef18f9 --- /dev/null +++ b/tests/fixtures/down/module_string.ml @@ -0,0 +1,11 @@ +(* -*- combobulate-test-point-overlays: ((1 outline 232)); eval: (combobulate-test-fixture-mode t); -*- *) +module StringOps = struct + let uppercase s u = String.uppercase_ascii s + let lowercase s = String.lowercase_ascii s + let reverse s = + let len = String.length s in + String.init len (fun i -> s.[len - 1 - i]) + let concat_with sep strs = String.concat sep strs +end + +(* hierarchy navigation from let. *) diff --git a/tests/fixtures/down/nested_matches.ml b/tests/fixtures/down/nested_matches.ml new file mode 100644 index 0000000..805d145 --- /dev/null +++ b/tests/fixtures/down/nested_matches.ml @@ -0,0 +1,9 @@ +(* -*- combobulate-test-point-overlays: ((1 outline 223) (2 outline 248)); eval: (combobulate-test-fixture-mode t); -*- *) +let nested_match pair = + match pair with + | (Some x, Some y) -> begin + match x with + | 0 -> "x is zero" + | _ -> "x is not zero" + end + | _ -> "one or both are None" diff --git a/tests/fixtures/down/type_declarations.ml b/tests/fixtures/down/type_declarations.ml new file mode 100644 index 0000000..376c826 --- /dev/null +++ b/tests/fixtures/down/type_declarations.ml @@ -0,0 +1,11 @@ +(* -*- combobulate-test-point-overlays: ((1 outline 129) (2 outline 151)); eval: (combobulate-test-fixture-mode t); -*- *) +type second_level_page = + | Regular of { + header : unwind_info_section_header; + entries : unwind_info_regular_second_level_entry array; + } + | Compressed of { + header : unwind_info_compressed_section_header; + encoding_array : compact_unwind_encoding array; + entries : unwind_info_compressed_second_level_entry array; + } From 8992c4cef836db297f87000b7de52a55a5632494 Mon Sep 17 00:00:00 2001 From: xvw Date: Wed, 25 Mar 2026 16:35:25 +0100 Subject: [PATCH 16/24] Add `imenu` tests Co-authored-by: Tim McGilchrist Co-authored-by: PizieDust --- tests/fixtures/imenu/demo.ml | 1587 +++++++++++++++++++++++++ tests/fixtures/imenu/demo.mli | 640 ++++++++++ tests/fixtures/imenu/ocaml-sample.ml | 22 + tests/fixtures/imenu/ocaml-sample.mli | 26 + 4 files changed, 2275 insertions(+) create mode 100644 tests/fixtures/imenu/demo.ml create mode 100644 tests/fixtures/imenu/demo.mli create mode 100644 tests/fixtures/imenu/ocaml-sample.ml create mode 100644 tests/fixtures/imenu/ocaml-sample.mli diff --git a/tests/fixtures/imenu/demo.ml b/tests/fixtures/imenu/demo.ml new file mode 100644 index 0000000..9857498 --- /dev/null +++ b/tests/fixtures/imenu/demo.ml @@ -0,0 +1,1587 @@ +(* ========== Polymorphic Variants ========== *) + +(* Simple polymorphic variant *) +type color = [ `Red | `Green | `Blue | `RGB of int * int * int ] + +type color_2 = [ `Red | `Green | `Blue | `RGB of int * string * bool ] + +(* Polymorphic variant with inheritance *) +type basic_color = [ `Red | `Green | `Blue ] +type extended_color = [ basic_color | `Yellow | `Orange ] + +(* Open polymorphic variant *) +let color_to_string : [> `Red | `Green | `Blue ] -> string = function + | `Red -> "red" + | `Green -> "green" + | `Blue -> "blue" + | _ -> "unknown" + +(* Closed polymorphic variant *) +let string_to_color s : [< `Red | `Green | `Blue | `Unknown ] option = + match s with + | "red" -> Some `Red + | "green" -> Some `Green + | "blue" -> Some `Blue + | _ -> Some `Unknown + +(* Pattern matching with polymorphic variants *) +let color_brightness = function + | `Red -> 0.299 + | `Green -> 0.587 + | `Blue -> 0.114 + | `RGB (r, g, b) -> + (float_of_int r *. 0.299 +. + float_of_int g *. 0.587 +. + float_of_int b *. 0.114) /. 255.0 + +(* ========== Class Types and Implementations ========== *) + +(* Basic class implementation matching point_type *) +class point initial_x initial_y = object + val mutable x = initial_x + val mutable y = initial_y + method x = x + method y = y + method move dx dy = + x <- x + dx; + y <- y + dy +end + +(* Shape classes *) +class virtual shape = object + method virtual area : float + method virtual perimeter : float +end + +class circle radius = object + inherit shape + method area = 3.14159 *. radius *. radius + method perimeter = 2.0 *. 3.14159 *. radius +end + +class rectangle width height = object + inherit shape + method area = width *. height + method perimeter = 2.0 *. (width +. height) +end + +(* Colored shape *) +class colored_circle radius initial_color = object + inherit circle radius + val mutable current_color = initial_color + method color = current_color + method set_color c = current_color <- c +end + +(* Counter with instance variables *) +class counter = object + val mutable count = 0 + method increment = count <- count + 1 + method get_count = count +end + +(* ========== Include Statements ========== *) + +(* Module types for inclusion *) +module type COMPARABLE = sig + type t + val compare : t -> t -> int +end + +module type PRINTABLE = sig + type t + val to_string : t -> string +end + +module type COMPARABLE_PRINTABLE = sig + include COMPARABLE + include PRINTABLE with type t := t +end + +(* Module implementing the combined interface *) +module IntComparablePrintable = struct + type t = int + let compare = compare + let to_string = string_of_int +end + +(* Using include in module implementation *) +module ExtendedInt = struct + include IntComparablePrintable + let add x y = x + y + let multiply x y = x * y +end + +(* ========== Attributes and Extensions ========== *) + +(* Deprecated function *) +let old_function x = x + 1 [@@deprecated "Use new_function instead"] + +(* New replacement function *) +let new_function x = x + 1 + +(* Inline function *) +let inline_me x = x * 2 [@@inline] + +(* External with attributes *) +external get_time : unit -> float = "caml_sys_time" [@@noalloc] + +(* Type with attributes on constructors *) +type message = + | Info of string + | Warning of string [@warn_on_literal_pattern] + | Error of string + +(* Alert attribute *) +let experimental_feature () = + print_endline "This is experimental" [@@alert experimental "This feature is experimental"] + +(* Function with multiple attributes *) +let optimized_function x = + x * x * x + [@@inline] + [@@specialise] + +(* GADT Example *) +type _ expression = + | Int : int -> int expression + | Bool : bool -> bool expression + | Add : int expression * int expression -> int expression + | Eq : 'a expression * 'a expression -> bool expression + +let rec eval : type a. a expression -> a = function + | Int n -> n + | Bool b -> b + | Add (e1, e2) -> eval e1 + eval e2 + | Eq (e1, e2) -> eval e1 = eval e2 + +(* First-class module example *) +module type SHOW = sig + type t + val show : t -> string +end + +let int_show = (module struct + type t = int + let show = string_of_int +end : SHOW with type t = int) + +let show_value (type a) (module S : SHOW with type t = a) (x : a) = + S.show x + +(* ========== Original Module Examples ========== *) + +(* Simple module with signature *) +module Positive : sig + type t = private int + val make : int -> t + val to_int : t -> int + val add : t -> t -> t +end = struct + type t = int + let make i = if i > 0 then i else invalid_arg "make" + let to_int x = x + let add x y = x + y +end + +(* Module for mathematical operations *) +module Math = struct (* TODO hierarchy navigation should skip visiting struct and go directly + to let/type bindings *) + let all x = x * x + x - x / x + let square x = x * x + let cube x = x * x * x + let double x = x + x + let half x = x / 2 + + module Constants = struct + let pi = 3.14159 (* TODO sibling navigation should move between this let binding and the following let bindings. *) + let e = 2.71828 + let golden_ratio = 1.61803 + end +end + +(* Module with abstract type *) +module Stack : sig + type 'a t + val empty : 'a t + val push : 'a -> 'a t -> 'a t + val pop : 'a t -> ('a * 'a t) option + val size : 'a t -> int +end = struct + type 'a t = 'a list + let empty = [] + let push x s = x :: s + let pop = function + | [] -> None + | x :: xs -> Some (x, xs) + let size = List.length +end + +(* Module for string operations *) +module StringOps = struct + let uppercase s = String.uppercase_ascii s + let lowercase s = String.lowercase_ascii s + let reverse s = (* TODO hierarchy navigation from argument s goes to fun i skipping the let binding. It should go to the let binding. *) + let len = String.length s in + String.init len (fun i -> s.[len - 1 - i]) (* TODO sibling navigation to previous sibling should go to "let len" *) + let concat_with sep strs = String.concat sep strs +end + +(* Module with French Latin-1 characters *) +module Operations = struct + let creer x = x + let detruire _ = () + let repeter n f x = + let rec aux acc = function + | 0 -> acc + | n -> aux (f acc) (n - 1) + in aux x n + + module Mathematiques = struct + let carre x = x * x + let racine_carree x = sqrt (float_of_int x) + let perimetre_cercle rayon = 2.0 *. 3.14159 *. rayon + let ete x = x + 10 (* ete = summer *) + let hiver x = x - 10 (* hiver = winter *) + end + + module Chaines = struct + let longueur s = String.length s + let premiere_lettre s = if String.length s > 0 then Some s.[0] else None + let derniere_lettre s = + let len = String.length s in + if len > 0 then Some s.[len - 1] else None + let resume s = if String.length s > 10 then String.sub s 0 10 else s + end +end + +(* Module avec caracteres accentues *) +module Francais = struct + let prenom = "Francois" + let age = 25 + let ville = "Montreal" + + module Numeros = struct + let zero = 0 + let numero_un = 1 + let numero_prefere = 42 + let systeme_decimal = 10 + end + + module Evenements = struct + type evenement = { + nom: string; + annee: int; + saison: string; + } + + let creer_evenement nom annee saison = + { nom; annee; saison } + + let annee_evenement evt = evt.annee + let nom_evenement evt = evt.nom + end +end + +(* Nested module hierarchy for collections *) +module Collections = struct + module List = struct + module Ops = struct + let rec take n lst = + match n, lst with + | 0, _ | _, [] -> [] + | n, x :: xs -> x :: take (n - 1) xs + + let rec drop n lst = + match n, lst with + | 0, _ -> lst + | _, [] -> [] + | n, _ :: xs -> drop (n - 1) xs + + let split_at n lst = (take n lst, drop n lst) + end + + module Fold = struct + let sum = List.fold_left (+) 0 + let product = List.fold_left ( * ) 1 + let max_elem lst = List.fold_left max min_int lst + let min_elem lst = List.fold_left min max_int lst + end + + module Transform = struct + let squares = List.map (fun x -> x * x) + let cubes = List.map (fun x -> x * x * x) + let doubles = List.map (fun x -> x * 2) + let increments = List.map (fun x -> x + 1) + end + end + + module Array = struct + module Create = struct + let range start stop = + Array.init (stop - start) (fun i -> start + i) + + let constant n value = + Array.make n value + + let fibonacci n = + let arr = Array.make n 0 in (* TODO sibling navigation between let,if,for, done, arr doesn't work here. *) + if n > 0 then arr.(0) <- 0; + if n > 1 then arr.(1) <- 1; + for i = 2 to n - 1 do + arr.(i) <- arr.(i-1) + arr.(i-2) + done; + arr + end + + module Stats = struct + let sum arr = Array.fold_left (+) 0 arr + let mean arr = + let len = Array.length arr in + if len = 0 then 0.0 + else float_of_int (sum arr) /. float_of_int len + + let max arr = Array.fold_left max min_int arr + let min arr = Array.fold_left min max_int arr + end + end + + module Tree = struct + type 'a t = (* TODO hierarchy navigation between type and constructor declaration should skip the variant declaration. Then sibling navigation between constructor declarations works correctly. *) + | Leaf + | Node of 'a * 'a t * 'a t + + module Build = struct + let leaf = Leaf + let node v l r = Node (v, l, r) + let singleton v = Node (v, Leaf, Leaf) + end + + module Ops = struct + let rec size = function + | Leaf -> 0 + | Node (_, l, r) -> 1 + size l + size r + + let rec height = function + | Leaf -> 0 + | Node (_, l, r) -> 1 + max (height l) (height r) + + let rec map f = function + | Leaf -> Leaf + | Node (v, l, r) -> Node (f v, map f l, map f r) + + let rec fold f acc = function + | Leaf -> acc + | Node (v, l, r) -> + let acc' = fold f acc l in + let acc'' = f acc' v in + fold f acc'' r + end + end +end + +(* Deeply nested module for data structures *) +module DataStructures = struct + module Linear = struct + module Queue = struct + type 'a t = { + front: 'a list; + back: 'a list; + } + + let empty = { front = []; back = [] } + + let enqueue x q = { q with back = x :: q.back } + + let dequeue q = + match q.front with + | x :: xs -> Some (x, { q with front = xs }) + | [] -> + match List.rev q.back with + | [] -> None + | x :: xs -> Some (x, { front = xs; back = [] }) + + let size q = List.length q.front + List.length q.back + end + + module Deque = struct + type 'a t = 'a list * 'a list + + let empty = ([], []) + + let push_front x (front, back) = (x :: front, back) + let push_back x (front, back) = (front, x :: back) + + let pop_front = function + | (x :: xs, back) -> Some (x, (xs, back)) + | ([], back) -> + match List.rev back with + | [] -> None + | x :: xs -> Some (x, (xs, [])) + + let pop_back = function + | (front, x :: xs) -> Some (x, (front, xs)) + | (front, []) -> + match List.rev front with + | [] -> None + | x :: xs -> Some (x, ([], xs)) + end + end + + module Associative = struct + module HashMap = struct + type ('k, 'v) t = ('k * 'v) list array + + let create size = Array.make size [] + + let hash_function key size = + (Hashtbl.hash key) mod size + + let add key value map = + let size = Array.length map in + let idx = hash_function key size in + let bucket = map.(idx) in + let new_bucket = (key, value) :: List.filter (fun (k, _) -> k <> key) bucket in + map.(idx) <- new_bucket; + map + + let find key map = + let size = Array.length map in + let idx = hash_function key size in + List.assoc_opt key map.(idx) + end + + module Trie = struct + type t = { + is_end: bool; + children: (char * t) list; + } + + let empty = { is_end = false; children = [] } + + let rec insert word trie = + match word with + | [] -> { trie with is_end = true } + | c :: cs -> + let child = + match List.assoc_opt c trie.children with + | Some node -> insert cs node + | None -> insert cs empty + in + let new_children = (c, child) :: List.filter (fun (ch, _) -> ch <> c) trie.children in + { trie with children = new_children } + + let rec search word trie = + match word with + | [] -> trie.is_end + | c :: cs -> + match List.assoc_opt c trie.children with + | None -> false + | Some child -> search cs child + end + end +end + +(* Module for functional programming utilities *) +module Functional = struct + module Combinators = struct + let id x = x + let const x _ = x + let flip f x y = f y x + + module Compose = struct + let (<|) f g x = f (g x) + let (|>) x f = f x + let (>>) f g x = g (f x) + let (<<) f g x = f (g x) + end + end + + module Curry = struct + let curry f x y = f (x, y) + let uncurry f (x, y) = f x y + + let curry3 f x y z = f (x, y, z) + let uncurry3 f (x, y, z) = f x y z + end + + module Partial = struct + let apply_first f x = fun y -> f x y + let apply_second f y = fun x -> f x y + + let compose_left f g = fun x -> f (g x) + let compose_right f g = fun x -> g (f x) + end +end + +(* Module for mathematical operations with nested modules *) +module Mathematics = struct + module Arithmetic = struct + module Basic = struct + let add x y = x + y + let sub x y = x - y + let mul x y = x * y + let div x y = if y <> 0 then Some (x / y) else None + end + + module Advanced = struct + let rec gcd a b = + if b = 0 then a else gcd b (a mod b) + + let lcm a b = + (a * b) / gcd a b + + let rec factorial = function + | 0 | 1 -> 1 + | n -> n * factorial (n - 1) + + let rec fibonacci = function + | 0 -> 0 + | 1 -> 1 + | n -> fibonacci (n - 1) + fibonacci (n - 2) + end + end + + module Algebra = struct + module Polynomial = struct + type t = float list + + let eval coeffs x = + List.fold_left (fun acc c -> acc *. x +. c) 0.0 (List.rev coeffs) + + let add p1 p2 = + let rec aux acc l1 l2 = + match l1, l2 with + | [], [] -> List.rev acc + | x :: xs, [] | [], x :: xs -> aux (x :: acc) xs [] + | x :: xs, y :: ys -> aux ((x +. y) :: acc) xs ys + in aux [] p1 p2 + + let scale s p = List.map (fun c -> s *. c) p + end + + module Matrix = struct + type t = float array array + + let create rows cols init = + Array.make_matrix rows cols init + + let get m i j = m.(i).(j) + let set m i j v = m.(i).(j) <- v + + let dimensions m = + (Array.length m, if Array.length m > 0 then Array.length m.(0) else 0) + end + end + + module Statistics = struct + module Descriptive = struct + let mean lst = + let sum = List.fold_left (+.) 0.0 lst in + let count = float_of_int (List.length lst) in + sum /. count + + let variance lst = + let m = mean lst in + let squared_diffs = List.map (fun x -> (x -. m) ** 2.0) lst in + mean squared_diffs + + let std_dev lst = + sqrt (variance lst) + end + + module Correlation = struct + let covariance xs ys = + let mean_x = Descriptive.mean xs in + let mean_y = Descriptive.mean ys in + let pairs = List.combine xs ys in + let prods = List.map (fun (x, y) -> (x -. mean_x) *. (y -. mean_y)) pairs in + Descriptive.mean prods + + let correlation xs ys = + let cov = covariance xs ys in + let std_x = Descriptive.std_dev xs in + let std_y = Descriptive.std_dev ys in + cov /. (std_x *. std_y) + end + end + + (* Statistiques en francais *) + module Statistiques = struct + let mediane lst = + let sorted = List.sort compare lst in + let len = List.length sorted in + if len = 0 then 0.0 + else if len mod 2 = 1 then + List.nth sorted (len / 2) + else + let mid1 = List.nth sorted (len / 2 - 1) in + let mid2 = List.nth sorted (len / 2) in + (mid1 +. mid2) /. 2.0 + + let etendue lst = + if lst = [] then 0.0 + else + let sorted = List.sort compare lst in + List.nth sorted (List.length sorted - 1) -. List.hd sorted + + let quartiles lst = + let sorted = List.sort compare lst in + let len = List.length sorted in + if len < 4 then (0.0, 0.0, 0.0) + else + let q1 = List.nth sorted (len / 4) in + let q2 = List.nth sorted (len / 2) in + let q3 = List.nth sorted (3 * len / 4) in + (q1, q2, q3) + end + + (* Geometrie avec caracteres accentues *) + module Geometrie = struct + module Cercle = struct + let perimetre rayon = 2.0 *. 3.14159 *. rayon + let aire rayon = 3.14159 *. rayon *. rayon + let diametre rayon = 2.0 *. rayon + end + + module Triangle = struct + let perimetre cote1 cote2 cote3 = cote1 +. cote2 +. cote3 + let aire base hauteur = 0.5 *. base *. hauteur + let est_equilateral a b c = a = b && b = c + end + + module Carre = struct + let perimetre cote = 4.0 *. cote + let aire cote = cote *. cote + let diagonale cote = cote *. sqrt 2.0 + end + end +end + +(* ========== Functor Examples ========== *) + +(* Functor: Module parameterized by another module *) +module type ORDERED = sig + type t + val compare : t -> t -> int +end + +module type SORTABLE = sig + type elem + val sort : elem list -> elem list +end + +module MakeSort (Ord : ORDERED) : SORTABLE with type elem = Ord.t = struct + type elem = Ord.t + + let rec insert x = function + | [] -> [x] + | y :: ys -> + if Ord.compare x y <= 0 then x :: y :: ys + else y :: insert x ys + + let rec sort = function + | [] -> [] + | x :: xs -> insert x (sort xs) +end + +(* Create instances of the functor *) +module IntOrder = struct + type t = int + let compare = compare +end + +module StringOrder = struct + type t = string + let compare = String.compare +end + +module IntSort = MakeSort(IntOrder) (* TODO hierarchy navigation up from IntOrder skips MakeSort, it should visit it like it does for navigating down. *) +module StringSort = MakeSort(StringOrder) + +(* Another functor for creating collections *) +module type COMPARABLE = sig + type t + val compare : t -> t -> int + val to_string : t -> string +end + +module type SET = sig + type elem + type t + val empty : t + val add : elem -> t -> t + val mem : elem -> t -> bool + val to_list : t -> elem list +end + +module MakeSet (C : COMPARABLE) : SET with type elem = C.t = struct + type elem = C.t + type t = elem list + + let empty = [] + + let rec add x = function + | [] -> [x] + | y :: ys -> + match C.compare x y with + | 0 -> y :: ys + | n when n < 0 -> x :: y :: ys + | _ -> y :: add x ys + + let rec mem x = function (* TODO Navigating down from function goes to ] rather than [] *) + | [] -> false + | y :: ys -> + match C.compare x y with + | 0 -> true (* TODO Navigating between match_case doesn't work here *) + | n when n < 0 -> false + | _ -> mem x ys + + let to_list s = s +end + +module IntComparable = struct + type t = int + let compare = compare + let to_string = string_of_int +end + +module IntSet = MakeSet(IntComparable) + +(* ========== First-Class Functions ========== *) + +(* Functions that return functions *) +let make_adder n = fun x -> x + n + +let make_multiplier n = fun x -> x * n + +let make_power n = fun x -> + let rec power acc = function + | 0 -> acc + | n -> power (acc * x) (n - 1) + in power 1 n + +(* Functions that take functions as arguments *) +let apply_twice f x = f (f x) + +let compose f g x = f (g x) + +let apply_n_times n f x = + let rec aux acc = function + | 0 -> acc + | n -> aux (f acc) (n - 1) + in aux x n + +(* Higher-order functions *) +let map_pair f (x, y) = (f x, f y) + +let apply_to_list fs x = List.map (fun f -> f x) fs + +let filter_and_map pred f lst = + List.map f (List.filter pred lst) + +(* Fonctions de premiere classe avec caracteres francais *) +let creer_additionneur n = fun x -> x + n + +let creer_multiplicateur n = fun x -> x * n + +let appliquer_repete n f x = + let rec aux acc = function + | 0 -> acc + | i -> aux (f acc) (i - 1) + in aux x n + +let composer_fonctions f g x = f (g x) + +(* Fonctions d'ordre superieur *) +let transformer_paire f (x, y) = (f x, f y) + +let filtrer_et_transformer predicat transformeur liste = + List.map transformeur (List.filter predicat liste) + +let appliquer_a_tous operation liste = + List.map operation liste + +let reduire combineur initial liste = + List.fold_left combineur initial liste + +(* ========== Partially Applied Functions ========== *) + +(* Create partially applied functions *) +let add x y = x + y +let add_five = add 5 +let add_ten = add 10 + +let multiply x y = x * y +let double = multiply 2 +let triple = multiply 3 +let quadruple = multiply 4 + +let power base exp = + let rec pow acc = function + | 0 -> acc + | n -> pow (acc * base) (n - 1) + in pow 1 exp + +let square_via_power = power 2 +let cube_via_power = power 3 + +(* More complex partial application *) +let fold_sum = List.fold_left (+) 0 +let fold_product = List.fold_left ( * ) 1 +let fold_max = List.fold_left max min_int + +let map_square = List.map (fun x -> x * x) +let map_double = List.map (fun x -> x * 2) +let map_negate = List.map (fun x -> -x) + +let filter_positive = List.filter (fun x -> x > 0) +let filter_even = List.filter (fun x -> x mod 2 = 0) +let filter_odd = List.filter (fun x -> x mod 2 <> 0) + +(* ========== Anonymous Functions ========== *) + +(* List of anonymous functions *) +let math_ops = [ + (fun x -> x + 1); + (fun x -> x * 2); + (fun x -> x * x); + (fun x -> x - 10); +] + +(* Using anonymous functions with higher-order functions *) +let transform_list lst = + lst + |> List.map (fun x -> x * 2) + |> List.filter (fun x -> x > 10) + |> List.map (fun x -> x + 5) + +let process_pairs pairs = + List.map (fun (x, y) -> x + y) pairs + +let nested_functions x = + (fun y -> (fun z -> x + y + z)) + +(* Anonymous functions in pattern matching *) +let apply_op op x y = + match op with + | "add" -> (fun a b -> a + b) x y + | "mul" -> (fun a b -> a * b) x y + | "sub" -> (fun a b -> a - b) x y + | _ -> 0 + +(* ========== Combined Examples ========== *) + +(* Combining modules, functors, and higher-order functions *) +module type MONAD = sig + type 'a t + val return : 'a -> 'a t + val bind : 'a t -> ('a -> 'b t) -> 'b t +end + +module OptionMonad : MONAD with type 'a t = 'a option = struct + type 'a t = 'a option + let return x = Some x + let bind m f = + match m with + | None -> None + | Some x -> f x +end + +module ListMonad : MONAD with type 'a t = 'a list = struct + type 'a t = 'a list + let return x = [x] + let bind m f = List.concat (List.map f m) +end + +(* Complex example combining all concepts *) +let pipeline_example () = + let add_partial = (+) 10 in + let multiply_partial = ( * ) 3 in + + let pipeline = + [1; 2; 3; 4; 5] + |> List.map add_partial + |> List.filter (fun x -> x mod 2 = 0) + |> List.map multiply_partial + |> List.fold_left (+) 0 + in + pipeline + +(* ========== Extended Indexing Operators ========== *) + +(* Custom indexing operators for different data structures *) +module CustomIndexing = struct + (* Array-like indexing with .() *) + type int_array = int array + + let ( .%() ) arr i = Array.get arr i + let ( .%()<- ) arr i v = Array.set arr i v + + (* String indexing with .[] *) + type text = string + + let (.%[]) str i = String.get str i + let (.%[]<-) str i c = + let bytes = Bytes.of_string str in + Bytes.set bytes i c; + Bytes.to_string bytes + + (* Map-like indexing with .{} *) + type ('k, 'v) map = ('k * 'v) list + + let (.%{}) map key = List.assoc_opt key map + let (.%{}<-) map key value = (key, value) :: List.remove_assoc key map + + + (* Custom collection with .@() *) + type 'a circular_buffer = { + data: 'a array; + size: int; + } + + let (.@()) buf i = + let actual_i = i mod buf.size in + buf.data.(actual_i) +end + +(* ========== Let Punning Examples ========== *) + +(* Let punning allows omitting the pattern when it matches the expression *) +module LetPunning = struct + (* Record type for demonstrating punning *) + type person = { + name: string; + age: int; + city: string; + } + + type coordinates = { + x: float; + y: float; + z: float; + } + + (* Function using let punning in record construction *) + let make_person name age city = + { name; age; city } (* equivalent to { name = name; age = age; city = city } *) + + let make_coords x y z = + { x; y; z } + + (* Pattern matching with punning *) + let get_person_info { name; age; city } = + Printf.sprintf "%s is %d years old and lives in %s" name age city + + let distance_from_origin { x; y; z } = + sqrt (x *. x +. y *. y +. z *. z) + + (* Nested record with punning *) + type address = { + street: string; + number: int; + postal_code: string; + } + + type employee = { + name: string; + employee_id: int; + address: address; + } + + let make_address street number postal_code = + { street; number; postal_code } + + let make_employee name employee_id address = + { name; employee_id; address } + + (* Using punning in let bindings *) + let process_employee emp = + let { name; employee_id; address } = emp in + let { street; number; postal_code } = address in + Printf.sprintf "Employee %s (#%d) lives at %d %s, %s" + name employee_id number street postal_code +end + +(* ========== Monadic Bind (>>=) Examples ========== *) + +(* Option monad with bind operator *) +module OptionOps = struct + let (>>=) opt f = + match opt with + | None -> None + | Some x -> f x + + let (>>|) opt f = + match opt with + | None -> None + | Some x -> Some (f x) + + let return x = Some x + + (* Example: safe division chain *) + let safe_div x y = + if y = 0 then None else Some (x / y) + + let safe_sqrt x = + if x < 0.0 then None else Some (sqrt x) + + let safe_log x = + if x <= 0.0 then None else Some (log x) + + (* Chaining operations with >>= *) + let complex_calculation x y z = + safe_div x y >>= fun result1 -> + safe_sqrt (float_of_int result1) >>= fun result2 -> + safe_log result2 >>= fun result3 -> + return (result3 *. float_of_int z) + + (* Using >>| for mapping *) + let simple_calc x = + Some x >>| (fun n -> n * 2) >>| (fun n -> n + 10) +end + +(* Result monad with bind operator *) +module ResultOps = struct + type ('a, 'e) result = ('a, 'e) Result.t + + let (>>=) res f = + match res with + | Error e -> Error e + | Ok x -> f x + + let (>>|) res f = + match res with + | Error e -> Error e + | Ok x -> Ok (f x) + + let return x = Ok x + + (* Example: parsing and validation *) + let parse_int s = + try Ok (int_of_string s) + with Failure _ -> Error ("Failed to parse: " ^ s) + + let validate_positive x = + if x > 0 then Ok x + else Error "Number must be positive" + + let validate_range min max x = + if x >= min && x <= max then Ok x + else Error (Printf.sprintf "Number must be between %d and %d" min max) + + (* Chaining with >>= *) + let parse_and_validate s = + parse_int s >>= fun num -> + validate_positive num >>= fun pos_num -> + validate_range 1 100 pos_num >>= fun valid_num -> + return (valid_num * 2) +end + +(* List monad with bind operator *) +module ListOps = struct + let (>>=) lst f = List.concat_map f lst + let (>>|) lst f = List.map f lst + let return x = [x] + + (* Example: non-deterministic computation *) + let choices = [1; 2; 3] + + let computation = + choices >>= fun x -> + [x; x * 2] >>= fun y -> + [y + 1; y + 2] >>= fun z -> + return (x, y, z) + + (* Cartesian product using bind *) + let cartesian_product xs ys = + xs >>= fun x -> + ys >>= fun y -> + return (x, y) +end + +(* State monad with bind operator *) +module StateOps = struct + type ('s, 'a) state = 's -> ('a * 's) + + let (>>=) m f = fun s -> + let (a, s') = m s in + f a s' + + let return x = fun s -> (x, s) + + let get = fun s -> (s, s) + let put s' = fun _ -> ((), s') + let modify f = fun s -> ((), f s) + + let run_state m s = m s + + (* Example: counter *) + let increment = modify ((+) 1) + let decrement = modify (fun x -> x - 1) + let get_count = get + + let counter_computation = + increment >>= fun () -> + increment >>= fun () -> + get_count >>= fun count1 -> + increment >>= fun () -> + get_count >>= fun count2 -> + return (count1, count2) +end + +(* Custom monad: Writer for logging *) +module WriterOps = struct + type ('w, 'a) writer = 'a * 'w list + + let (>>=) (a, log) f = + let (b, log2) = f a in + (b, log @ log2) + + let return x = (x, []) + + let tell msg = ((), [msg]) + + let run_writer (a, log) = (a, log) + + (* Example: computation with logging *) + let logged_add x y = + tell (Printf.sprintf "Adding %d + %d" x y) >>= fun () -> + return (x + y) + + let logged_multiply x y = + tell (Printf.sprintf "Multiplying %d * %d" x y) >>= fun () -> + return (x * y) + + let computation x y = + logged_add x y >>= fun sum -> + logged_multiply sum 2 >>= fun result -> + tell "Computation finished" >>= fun () -> + return result +end + +(* Combining monadic operations with let* syntax (OCaml 4.08+) *) +module MonadicSyntax = struct + (* Option monad *) + module Option = struct + let ( let* ) = OptionOps.(>>=) + let ( and* ) opt1 opt2 = + match opt1, opt2 with + | Some x, Some y -> Some (x, y) + | _ -> None + + let example x y = + let* a = OptionOps.safe_div x y in + let* b = OptionOps.safe_sqrt (float_of_int a) in + Some (b *. 2.0) + + let parallel_example x y z = + let* a = Some x + and* b = Some y + and* c = Some z in + Some (a + b + c) + end + + (* Result monad *) + module Result = struct + let ( let* ) = ResultOps.(>>=) + + let parse_and_process s = + let* num = ResultOps.parse_int s in + let* validated = ResultOps.validate_positive num in + Ok (validated * 3) + end + + (* List monad *) + module List = struct + let ( let* ) = ListOps.(>>=) + + let combinations = + let* x = [1; 2; 3] in + let* y = [10; 20] in + [(x, y)] + end +end + +(* ========== Main Test Section ========== *) + +let () = + (* Test Positive module *) + let p1 = Positive.make 5 in + let p2 = Positive.make 10 in + let sum = Positive.add p1 p2 in + let _ = Positive.to_int sum in + + (* Test Math module *) + let _ = Math.square 5 in + let _ = Math.cube 3 in + let _ = Math.Constants.pi in + + (* Test Stack module *) + let s = Stack.empty in + let s = Stack.push 1 s in + let s = Stack.push 2 s in + let s = Stack.push 3 s in + let _ = Stack.size s in + + (* Test nested Collections modules *) + let test_list = [1; 2; 3; 4; 5; 6; 7; 8; 9; 10] in + let _ = Collections.List.Ops.take 5 test_list in + let _ = Collections.List.Ops.drop 3 test_list in + let (_first_half, _second_half) = Collections.List.Ops.split_at 5 test_list in + + let _ = Collections.List.Fold.sum test_list in + let _ = Collections.List.Fold.product [1; 2; 3; 4] in + let _ = Collections.List.Fold.max_elem test_list in + + let _ = Collections.List.Transform.squares test_list in + let _ = Collections.List.Transform.cubes [1; 2; 3] in + let _ = Collections.List.Transform.doubles test_list in + + (* Test Collections.Array nested modules *) + let arr = Collections.Array.Create.range 0 10 in + let _ = Collections.Array.Create.constant 5 42 in + let _fib_arr = Collections.Array.Create.fibonacci 10 in + + let _ = Collections.Array.Stats.sum arr in + let _ = Collections.Array.Stats.mean arr in + let _ = Collections.Array.Stats.max arr in + + (* Test Collections.Tree nested modules *) + let tree = Collections.Tree.Build.node 5 + (Collections.Tree.Build.node 3 + (Collections.Tree.Build.singleton 1) + (Collections.Tree.Build.singleton 4)) + (Collections.Tree.Build.node 8 + (Collections.Tree.Build.singleton 6) + (Collections.Tree.Build.singleton 10)) in + + let _ = Collections.Tree.Ops.size tree in + let _ = Collections.Tree.Ops.height tree in + let _doubled_tree = Collections.Tree.Ops.map (fun x -> x * 2) tree in + let tree_sum = Collections.Tree.Ops.fold (+) 0 tree in + + (* Test DataStructures.Linear modules *) + let q = DataStructures.Linear.Queue.empty in + let q = DataStructures.Linear.Queue.enqueue 1 q in + let q = DataStructures.Linear.Queue.enqueue 2 q in + let q = DataStructures.Linear.Queue.enqueue 3 q in + let _ = DataStructures.Linear.Queue.size q in + let _result_q = DataStructures.Linear.Queue.dequeue q in + + let dq = DataStructures.Linear.Deque.empty in + let dq = DataStructures.Linear.Deque.push_front 1 dq in + let dq = DataStructures.Linear.Deque.push_back 2 dq in + let dq = DataStructures.Linear.Deque.push_front 0 dq in + let _ = DataStructures.Linear.Deque.pop_front dq in + + (* Test DataStructures.Associative modules *) + let hmap = DataStructures.Associative.HashMap.create 10 in + let hmap = DataStructures.Associative.HashMap.add "key1" 100 hmap in + let hmap = DataStructures.Associative.HashMap.add "key2" 200 hmap in + let _ = DataStructures.Associative.HashMap.find "key1" hmap in + + let trie = DataStructures.Associative.Trie.empty in + let trie = DataStructures.Associative.Trie.insert ['h'; 'e'; 'l'; 'l'; 'o'] trie in + let trie = DataStructures.Associative.Trie.insert ['h'; 'e'; 'l'; 'p'] trie in + let _ = DataStructures.Associative.Trie.search ['h'; 'e'; 'l'; 'l'; 'o'] trie in + let _ = DataStructures.Associative.Trie.search ['h'; 'i'] trie in + + (* Test Functional.Combinators modules *) + let _ = Functional.Combinators.id 42 in + let const_5 = Functional.Combinators.const 5 in + let _ = const_5 "anything" in + let flipped_sub = Functional.Combinators.flip (-) in + let _ = flipped_sub 3 10 in + + let open Functional.Combinators.Compose in + let add1 = (+) 1 in + let mul2 = ( * ) 2 in + let composed = add1 << mul2 in + let _ = composed 5 in + + (* Test Functional.Curry *) + let add_tuple (x, y) = x + y in + let curried_add = Functional.Curry.curry add_tuple in + let _ = curried_add 3 4 in + + let curried_mul x y = x * y in + let uncurried_mul = Functional.Curry.uncurry curried_mul in + let _ = uncurried_mul (5, 6) in + + (* Test Functional.Partial *) + let add_fn x y = x + y in + let add_10 = Functional.Partial.apply_first add_fn 10 in + let _ = add_10 5 in + + (* Test Mathematics.Arithmetic modules *) + let _ = Mathematics.Arithmetic.Basic.add 5 3 in + let _ = Mathematics.Arithmetic.Basic.mul 4 7 in + let _ = Mathematics.Arithmetic.Basic.div 10 3 in + + let _ = Mathematics.Arithmetic.Advanced.gcd 48 18 in + let _ = Mathematics.Arithmetic.Advanced.lcm 12 15 in + let _ = Mathematics.Arithmetic.Advanced.factorial 5 in + let _ = Mathematics.Arithmetic.Advanced.fibonacci 10 in + + (* Test Mathematics.Algebra modules *) + let poly = [1.0; 2.0; 3.0] in + let _ = Mathematics.Algebra.Polynomial.eval poly 2.0 in + let poly2 = [2.0; 3.0; 1.0] in + let _ = Mathematics.Algebra.Polynomial.add poly poly2 in + let _ = Mathematics.Algebra.Polynomial.scale 2.0 poly in + + let matrix = Mathematics.Algebra.Matrix.create 3 3 0.0 in + Mathematics.Algebra.Matrix.set matrix 0 0 1.0; + Mathematics.Algebra.Matrix.set matrix 1 1 2.0; + let _ = Mathematics.Algebra.Matrix.get matrix 0 0 in + let _ = Mathematics.Algebra.Matrix.dimensions matrix in + + (* Test Mathematics.Statistics modules *) + let data = [1.0; 2.0; 3.0; 4.0; 5.0] in + let _ = Mathematics.Statistics.Descriptive.mean data in + let _ = Mathematics.Statistics.Descriptive.variance data in + let _ = Mathematics.Statistics.Descriptive.std_dev data in + + let x_data = [1.0; 2.0; 3.0; 4.0; 5.0] in + let y_data = [2.0; 4.0; 6.0; 8.0; 10.0] in + let _ = Mathematics.Statistics.Correlation.covariance x_data y_data in + let _ = Mathematics.Statistics.Correlation.correlation x_data y_data in + + (* Test French modules with Latin-1 characters *) + let _ = Operations.creer 42 in + let _ = Operations.detruire () in + let _ = Operations.repeter 3 (fun x -> x + 1) 0 in + + let _ = Operations.Mathematiques.carre 5 in + let _ = Operations.Mathematiques.racine_carree 16 in + let _ = Operations.Mathematiques.perimetre_cercle 5.0 in + let _ = Operations.Mathematiques.ete 20 in + let _ = Operations.Mathematiques.hiver 30 in + + let _ = Operations.Chaines.longueur "bonjour" in + let _ = Operations.Chaines.premiere_lettre "hello" in + let _ = Operations.Chaines.derniere_lettre "world" in + let _ = Operations.Chaines.resume "this is a very long string" in + + let _ = Francais.prenom in + let _ = Francais.age in + let _ = Francais.ville in + let _ = Francais.Numeros.zero in + let _ = Francais.Numeros.numero_prefere in + + let evt = Francais.Evenements.creer_evenement "Noel" 2024 "hiver" in + let _ = Francais.Evenements.annee_evenement evt in + let _ = Francais.Evenements.nom_evenement evt in + + (* Test French statistics functions *) + let donnees = [5.0; 2.0; 8.0; 1.0; 9.0; 3.0; 7.0] in + let _ = Mathematics.Statistiques.mediane donnees in + let _ = Mathematics.Statistiques.etendue donnees in + let (_q1, _q2, _q3) = Mathematics.Statistiques.quartiles donnees in + + (* Test French geometry functions *) + let _ = Mathematics.Geometrie.Cercle.perimetre 5.0 in + let _ = Mathematics.Geometrie.Cercle.aire 5.0 in + let _ = Mathematics.Geometrie.Cercle.diametre 5.0 in + + let _ = Mathematics.Geometrie.Triangle.perimetre 3.0 4.0 5.0 in + let _ = Mathematics.Geometrie.Triangle.aire 4.0 3.0 in + let _ = Mathematics.Geometrie.Triangle.est_equilateral 5.0 5.0 5.0 in + + let _ = Mathematics.Geometrie.Carre.perimetre 4.0 in + let _ = Mathematics.Geometrie.Carre.aire 4.0 in + let _ = Mathematics.Geometrie.Carre.diagonale 4.0 in + + (* Test French first-class functions *) + let additionneur = creer_additionneur 10 in + let _ = additionneur 5 in + + let multiplicateur = creer_multiplicateur 3 in + let _ = multiplicateur 7 in + + let _ = appliquer_repete 3 (fun x -> x * 2) 1 in + let _ = composer_fonctions (fun x -> x * 2) (fun x -> x + 1) 5 in + + let _ = transformer_paire (fun x -> x * x) (3, 4) in + let _ = filtrer_et_transformer (fun x -> x > 2) (fun x -> x * 2) [1; 2; 3; 4; 5] in + let _ = appliquer_a_tous (fun x -> x + 1) [1; 2; 3] in + let _ = reduire (+) 0 [1; 2; 3; 4; 5] in + + (* Test functors *) + let int_list = [5; 2; 8; 1; 9] in + let sorted_ints = IntSort.sort int_list in + + let str_list = ["zebra"; "apple"; "mango"; "banana"] in + let _sorted_strs = StringSort.sort str_list in + + (* Test IntSet functor *) + let set = IntSet.empty in + let set = IntSet.add 5 set in + let set = IntSet.add 2 set in + let set = IntSet.add 8 set in + let _ = IntSet.mem 5 set in + + (* Test first-class functions *) + let adder = make_adder 10 in + let _ = adder 5 in + + let multiplier = make_multiplier 3 in + let _ = multiplier 7 in + + let _ = apply_twice (fun x -> x + 1) 5 in + let _ = compose (fun x -> x * 2) (fun x -> x + 1) 5 in + + (* Test partially applied functions *) + let _ = add_five 10 in + let _ = double 7 in + let _ = triple 4 in + + let numbers = [1; 2; 3; 4; 5] in + let _ = fold_sum numbers in + let _ = fold_product numbers in + + let _ = map_square numbers in + let _ = filter_positive [-2; -1; 0; 1; 2] in + let _ = filter_even [1; 2; 3; 4; 5; 6] in + + (* Test anonymous functions *) + let _ = List.map (fun x -> x * x) numbers in + let _ = List.filter (fun x -> x > 3) numbers in + let _ = transform_list [1; 2; 3; 4; 5; 6; 7; 8] in + + let pairs = [(1, 2); (3, 4); (5, 6)] in + let _ = process_pairs pairs in + + let curried = nested_functions 1 in + let _ = curried 2 3 in + + (* Test combined example *) + let result = pipeline_example () in + + (* Final computation combining everything *) + let final_result = + sorted_ints + |> List.map (fun x -> x * 2) + |> List.filter (fun x -> x > 5) + |> List.fold_left (+) result + |> (+) tree_sum + in + + Printf.printf "Final result: %d\n" final_result; + + (* ========== Test Extended Indexing Operators ========== *) + + (* Test array indexing with .%() *) + let arr = [| 10; 20; 30; 40; 50 |] in + let open CustomIndexing in + let _ = arr.%(2) in + arr.%(1) <- 99; + let _ = arr.(1) in + + (* Test string indexing with .%[] *) + let str = "hello" in + let _ = str.%[0] in + let _ = str.%[0] <- 'H' in + + (* Test map indexing with .%{} *) + let map = [("a", 1); ("b", 2); ("c", 3)] in + let _ = map.%{"b"} in + let map2 = map.%{"d"} <- 4 in + let _ = map2.%{"d"} in + + (* Test circular buffer indexing with .@() *) + let cbuf = { data = [| 1; 2; 3; 4; 5 |]; size = 5 } in + let _ = cbuf.@(7) in (* wraps around to index 2 *) + let _ = cbuf.@(12) in (* wraps around to index 2 *) + + (* ========== Test Let Punning ========== *) + + (* Test basic record punning *) + let name = "Alice" in + let age = 30 in + let city = "Paris" in + let person = LetPunning.make_person name age city in + let _ = LetPunning.get_person_info person in + + (* Test coordinate punning *) + let x = 3.0 in + let y = 4.0 in + let z = 0.0 in + let coords = LetPunning.make_coords x y z in + let _ = LetPunning.distance_from_origin coords in + + (* Test nested record punning *) + let street = "Main St" in + let number = 123 in + let postal_code = "12345" in + let addr = LetPunning.make_address street number postal_code in + + let employee_id = 42 in + let emp = LetPunning.make_employee name employee_id addr in + let _ = LetPunning.process_employee emp in + + (* Test pattern matching with punning *) + let LetPunning.{ name = pname; age = page; city = _ } = person in + let _ = Printf.sprintf "%s is %d" pname page in + + (* ========== Test Monadic Bind (>>=) ========== *) + + (* Test Option monad *) + let opt_result = OptionOps.complex_calculation 100 5 3 in + let _ = match opt_result with + | Some v -> Printf.sprintf "Result: %f" v + | None -> "Failed" in + + let simple_opt = OptionOps.simple_calc 5 in + let _ = simple_opt in + + (* Test Option monad failure case *) + let opt_fail = OptionOps.safe_div 10 0 in + let _ = opt_fail in + + (* Test Result monad *) + let res_ok = ResultOps.parse_and_validate "42" in + let _ = match res_ok with + | Ok v -> Printf.sprintf "Validated: %d" v + | Error e -> e in + + let res_err = ResultOps.parse_and_validate "150" in + let _ = match res_err with + | Ok v -> Printf.sprintf "Value: %d" v + | Error e -> e in + + let res_parse_err = ResultOps.parse_and_validate "not-a-number" in + let _ = res_parse_err in + + (* Test List monad *) + let list_result = ListOps.computation in + let _ = List.length list_result in + + let cartesian = ListOps.cartesian_product [1; 2; 3] ['a'; 'b'] in + let _ = List.length cartesian in + + (* Test State monad *) + let (count_result, final_state) = StateOps.run_state StateOps.counter_computation 0 in + let _ = Printf.sprintf "Counts: (%d, %d), Final state: %d" + (fst count_result) (snd count_result) final_state in + + (* Test Writer monad *) + let (writer_result, log) = WriterOps.run_writer (WriterOps.computation 5 3) in + let _ = Printf.sprintf "Result: %d" writer_result in + let _ = String.concat "; " log in + + (* Test let* syntax *) + let monadic_opt = MonadicSyntax.Option.example 20 4 in + let _ = monadic_opt in + + let parallel_opt = MonadicSyntax.Option.parallel_example 1 2 3 in + let _ = parallel_opt in + + let monadic_result = MonadicSyntax.Result.parse_and_process "25" in + let _ = monadic_result in + + let monadic_list = MonadicSyntax.List.combinations in + let _ = List.length monadic_list in + + Printf.printf "All extended examples tested successfully!\n" diff --git a/tests/fixtures/imenu/demo.mli b/tests/fixtures/imenu/demo.mli new file mode 100644 index 0000000..6dd5bb2 --- /dev/null +++ b/tests/fixtures/imenu/demo.mli @@ -0,0 +1,640 @@ +(* ========== Polymorphic Variants ========== *) + +(* Simple polymorphic variant *) +type color = [ `Red | `Green | `Blue | `RGB of int * int * int ] + +(* Polymorphic variant with inheritance *) +type basic_color = [ `Red | `Green | `Blue ] +type extended_color = [ basic_color | `Yellow | `Orange ] + +(* Open polymorphic variant *) +val color_to_string : [> `Red | `Green | `Blue ] -> string + +(* Closed polymorphic variant *) +val string_to_color : string -> [< `Red | `Green | `Blue | `Unknown ] option + +(* ========== Class Types ========== *) + +(* Basic class type *) +class type point_type = object + method x : int + method y : int + method move : int -> int -> unit +end + +(* Class type with inheritance *) +class type shape_type = object + method area : float + method perimeter : float +end + +class type colored_shape_type = object + inherit shape_type + method color : color + method set_color : color -> unit +end + +(* Class type with instance variables *) +class type counter_type = object + val mutable count : int + method increment : unit + method get_count : int +end + +(* ========== Include Statements ========== *) + +(* Include a module signature *) +module type COMPARABLE = sig + type t + val compare : t -> t -> int +end + +module type PRINTABLE = sig + type t + val to_string : t -> string +end + +module type COMPARABLE_PRINTABLE = sig + include COMPARABLE + include PRINTABLE with type t := t +end + +(* Include with constraints *) +module type MAP_LIKE = sig + type key + type 'a t + val empty : 'a t + val add : key -> 'a -> 'a t -> 'a t + val find : key -> 'a t -> 'a option +end + +(* ========== Attributes and Extensions ========== *) + +(* Deprecated value *) +val old_function : int -> int [@@deprecated "Use new_function instead"] + +(* OCaml attribute *) +val inline_me : int -> int [@@inline] + +(* External with attributes *) +external get_time : unit -> float = "caml_sys_time" [@@noalloc] + +(* Type with attributes *) +type message = + | Info of string + | Warning of string [@warn_on_literal_pattern] + | Error of string + +(* Alert attribute *) +val experimental_feature : unit -> unit [@@alert experimental "This feature is experimental"] + +(* ========== Original Examples ========== *) + +module Positive : sig + type t = private int + + val make : int -> t + val to_int : t -> int + val add : t -> t -> t +end + +module Math : sig + val square : int -> int + val cube : int -> int + val double : int -> int + val half : int -> int + + module Constants : sig + val pi : float + val e : float + val golden_ratio : float + end +end + +module Stack : sig + type 'a t + + val empty : 'a t + val push : 'a -> 'a t -> 'a t + val pop : 'a t -> ('a * 'a t) option + val size : 'a t -> int +end + +module StringOps : sig + val uppercase : string -> string + val lowercase : string -> string + val reverse : string -> string + val concat_with : string -> string list -> string +end + +module Operations : sig + val creer : 'a -> 'a + val detruire : 'a -> unit + val repeter : int -> ('a -> 'a) -> 'a -> 'a + + module Mathematiques : sig + val carre : int -> int + val racine_carree : int -> float + val perimetre_cercle : float -> float + val ete : int -> int + val hiver : int -> int + end + + module Chaines : sig + val longueur : string -> int + val premiere_lettre : string -> char option + val derniere_lettre : string -> char option + val resume : string -> string + end +end + +module Francais : sig + val prenom : string + val age : int + val ville : string + + module Numeros : sig + val zero : int + val numero_un : int + val numero_prefere : int + val systeme_decimal : int + end + + module Evenements : sig + type evenement = { nom : string; annee : int; saison : string } + + val creer_evenement : string -> int -> string -> evenement + val annee_evenement : evenement -> int + val nom_evenement : evenement -> string + end +end + +module Collections : sig + module List : sig + module Ops : sig + val take : int -> 'a list -> 'a list + val drop : int -> 'a list -> 'a list + val split_at : int -> 'a list -> 'a list * 'a list + end + + module Fold : sig + val sum : int list -> int + val product : int list -> int + val max_elem : int list -> int + val min_elem : int list -> int + end + + module Transform : sig + val squares : int list -> int list + val cubes : int list -> int list + val doubles : int list -> int list + val increments : int list -> int list + end + end + + module Array : sig + module Create : sig + val range : int -> int -> int array + val constant : int -> 'a -> 'a array + val fibonacci : int -> int array + end + + module Stats : sig + val sum : int array -> int + val mean : int array -> float + val max : int array -> int + val min : int array -> int + end + end + + module Tree : sig + type 'a t = Leaf | Node of 'a * 'a t * 'a t + + module Build : sig + val leaf : 'a t + val node : 'a -> 'a t -> 'a t -> 'a t + val singleton : 'a -> 'a t + end + + module Ops : sig + val size : 'a t -> int + val height : 'a t -> int + val map : ('a -> 'b) -> 'a t -> 'b t + val fold : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a + end + end +end + +module DataStructures : sig + module Linear : sig + module Queue : sig + type 'a t = { front : 'a list; back : 'a list } + + val empty : 'a t + val enqueue : 'a -> 'a t -> 'a t + val dequeue : 'a t -> ('a * 'a t) option + val size : 'a t -> int + end + + module Deque : sig + type 'a t = 'a list * 'a list + + val empty : 'a list * 'b list + val push_front : 'a -> 'a list * 'b -> 'a list * 'b + val push_back : 'a -> 'b * 'a list -> 'b * 'a list + val pop_front : 'a list * 'a list -> ('a * ('a list * 'a list)) option + val pop_back : 'a list * 'a list -> ('a * ('a list * 'a list)) option + end + end + + module Associative : sig + module HashMap : sig + type ('k, 'v) t = ('k * 'v) list array + + val create : int -> 'a list array + val hash_function : 'a -> int -> int + val add : 'a -> 'b -> ('a * 'b) list array -> ('a * 'b) list array + val find : 'a -> ('a * 'b) list array -> 'b option + end + + module Trie : sig + type t = { is_end : bool; children : (char * t) list } + + val empty : t + val insert : char list -> t -> t + val search : char list -> t -> bool + end + end +end + +module Functional : sig + module Combinators : sig + val id : 'a -> 'a + val const : 'a -> 'b -> 'a + val flip : ('a -> 'b -> 'c) -> 'b -> 'a -> 'c + + module Compose : sig + val ( <| ) : ('a -> 'b) -> ('c -> 'a) -> 'c -> 'b + val ( |> ) : 'a -> ('a -> 'b) -> 'b + val ( >> ) : ('a -> 'b) -> ('b -> 'c) -> 'a -> 'c + val ( << ) : ('a -> 'b) -> ('c -> 'a) -> 'c -> 'b + end + end + + module Curry : sig + val curry : ('a * 'b -> 'c) -> 'a -> 'b -> 'c + val uncurry : ('a -> 'b -> 'c) -> 'a * 'b -> 'c + val curry3 : ('a * 'b * 'c -> 'd) -> 'a -> 'b -> 'c -> 'd + val uncurry3 : ('a -> 'b -> 'c -> 'd) -> 'a * 'b * 'c -> 'd + end + + module Partial : sig + val apply_first : ('a -> 'b -> 'c) -> 'a -> 'b -> 'c + val apply_second : ('a -> 'b -> 'c) -> 'b -> 'a -> 'c + val compose_left : ('a -> 'b) -> ('c -> 'a) -> 'c -> 'b + val compose_right : ('a -> 'b) -> ('b -> 'c) -> 'a -> 'c + end +end + +module Mathematics : sig + module Arithmetic : sig + module Basic : sig + val add : int -> int -> int + val sub : int -> int -> int + val mul : int -> int -> int + val div : int -> int -> int option + end + + module Advanced : sig + val gcd : int -> int -> int + val lcm : int -> int -> int + val factorial : int -> int + val fibonacci : int -> int + end + end + + module Algebra : sig + module Polynomial : sig + type t = float list + + val eval : float list -> float -> float + val add : float list -> float list -> float list + val scale : float -> float list -> float list + end + + module Matrix : sig + type t = float array array + + val create : int -> int -> 'a -> 'a array array + val get : 'a array array -> int -> int -> 'a + val set : 'a array array -> int -> int -> 'a -> unit + val dimensions : 'a array array -> int * int + end + end + + module Statistics : sig + module Descriptive : sig + val mean : float list -> float + val variance : float list -> float + val std_dev : float list -> float + end + + module Correlation : sig + val covariance : float list -> float list -> float + val correlation : float list -> float list -> float + end + end + + module Statistiques : sig + val mediane : float list -> float + val etendue : float list -> float + val quartiles : float list -> float * float * float + end + + module Geometrie : sig + module Cercle : sig + val perimetre : float -> float + val aire : float -> float + val diametre : float -> float + end + + module Triangle : sig + val perimetre : float -> float -> float -> float + val aire : float -> float -> float + val est_equilateral : 'a -> 'a -> 'a -> bool + end + + module Carre : sig + val perimetre : float -> float + val aire : float -> float + val diagonale : float -> float + end + end +end + +module type ORDERED = sig + type t + + val compare : t -> t -> int +end + +module type SORTABLE = sig + type elem + + val sort : elem list -> elem list +end + +module MakeSort : (Ord : ORDERED) -> sig + type elem = Ord.t + + val sort : elem list -> elem list +end + +module IntOrder : sig + type t = int + + val compare : 'a -> 'a -> int +end + +module StringOrder : sig + type t = string + + val compare : string -> string -> int +end + +module IntSort : sig + type elem = int + + val sort : elem list -> elem list +end + +module StringSort : sig + type elem = string + + val sort : elem list -> elem list +end + +module type COMPARABLE = sig + type t + + val compare : t -> t -> int + val to_string : t -> string +end + +module type SET = sig + type elem + type t + + val empty : t + val add : elem -> t -> t + val mem : elem -> t -> bool + val to_list : t -> elem list +end + +module MakeSet : (C : COMPARABLE) -> sig + type elem = C.t + type t + + val empty : t + val add : elem -> t -> t + val mem : elem -> t -> bool + val to_list : t -> elem list +end + +module IntComparable : sig + type t = int + + val compare : 'a -> 'a -> int + val to_string : int -> string +end + +module IntSet : sig + type elem = int + type t = MakeSet(IntComparable).t + + val empty : t + val add : elem -> t -> t + val mem : elem -> t -> bool + val to_list : t -> elem list +end + +val make_adder : int -> int -> int +val make_multiplier : int -> int -> int +val make_power : int -> int -> int +val apply_twice : ('a -> 'a) -> 'a -> 'a +val compose : ('a -> 'b) -> ('c -> 'a) -> 'c -> 'b +val apply_n_times : int -> ('a -> 'a) -> 'a -> 'a +val map_pair : ('a -> 'b) -> 'a * 'a -> 'b * 'b +val apply_to_list : ('a -> 'b) list -> 'a -> 'b list +val filter_and_map : ('a -> bool) -> ('a -> 'b) -> 'a list -> 'b list +val creer_additionneur : int -> int -> int +val creer_multiplicateur : int -> int -> int +val appliquer_repete : int -> ('a -> 'a) -> 'a -> 'a +val composer_fonctions : ('a -> 'b) -> ('c -> 'a) -> 'c -> 'b +val transformer_paire : ('a -> 'b) -> 'a * 'a -> 'b * 'b +val filtrer_et_transformer : ('a -> bool) -> ('a -> 'b) -> 'a list -> 'b list +val appliquer_a_tous : ('a -> 'b) -> 'a list -> 'b list +val reduire : ('a -> 'b -> 'a) -> 'a -> 'b list -> 'a +val add : int -> int -> int +val add_five : int -> int +val add_ten : int -> int +val multiply : int -> int -> int +val double : int -> int +val triple : int -> int +val quadruple : int -> int +val power : int -> int -> int +val square_via_power : int -> int +val cube_via_power : int -> int +val fold_sum : int list -> int +val fold_product : int list -> int +val fold_max : int list -> int +val map_square : int list -> int list +val map_double : int list -> int list +val map_negate : int list -> int list +val filter_positive : int list -> int list +val filter_even : int list -> int list +val filter_odd : int list -> int list +val math_ops : (int -> int) list +val transform_list : int list -> int list +val process_pairs : (int * int) list -> int list +val nested_functions : int -> int -> int -> int +val apply_op : string -> int -> int -> int + +module type MONAD = sig + type 'a t + + val return : 'a -> 'a t + val bind : 'a t -> ('a -> 'b t) -> 'b t +end + +module OptionMonad : sig + type 'a t = 'a option + + val return : 'a -> 'a t + val bind : 'a t -> ('a -> 'b t) -> 'b t +end + +module ListMonad : sig + type 'a t = 'a list + + val return : 'a -> 'a t + val bind : 'a t -> ('a -> 'b t) -> 'b t +end + +val pipeline_example : unit -> int + +module CustomIndexing : sig + type int_array = int array + + val ( .%() ) : 'a array -> int -> 'a + val ( .%()<- ) : 'a array -> int -> 'a -> unit + + type text = string + + val ( .%[] ) : string -> int -> char + val ( .%[]<- ) : string -> int -> char -> string + + type ('k, 'v) map = ('k * 'v) list + + val ( .%{} ) : ('a * 'b) list -> 'a -> 'b option + val ( .%{}<- ) : ('a * 'b) list -> 'a -> 'b -> ('a * 'b) list + + type 'a circular_buffer = { data : 'a array; size : int } + + val ( .@() ) : 'a circular_buffer -> int -> 'a +end + +module LetPunning : sig + type person = { name : string; age : int; city : string } + type coordinates = { x : float; y : float; z : float } + + val make_person : string -> int -> string -> person + val make_coords : float -> float -> float -> coordinates + val get_person_info : person -> string + val distance_from_origin : coordinates -> float + + type address = { street : string; number : int; postal_code : string } + type employee = { name : string; employee_id : int; address : address } + + val make_address : string -> int -> string -> address + val make_employee : string -> int -> address -> employee + val process_employee : employee -> string +end + +module OptionOps : sig + val ( >>= ) : 'a option -> ('a -> 'b option) -> 'b option + val ( >>| ) : 'a option -> ('a -> 'b) -> 'b option + val return : 'a -> 'a option + val safe_div : int -> int -> int option + val safe_sqrt : float -> float option + val safe_log : float -> float option + val complex_calculation : int -> int -> int -> float option + val simple_calc : int -> int option +end + +module ResultOps : sig + type ('a, 'e) result = ('a, 'e) result + + val ( >>= ) : ('a, 'b) result -> ('a -> ('c, 'b) result) -> ('c, 'b) result + val ( >>| ) : ('a, 'b) result -> ('a -> 'c) -> ('c, 'b) result + val return : 'a -> ('a, 'b) result + val parse_int : string -> (int, string) result + val validate_positive : int -> (int, string) result + val validate_range : int -> int -> int -> (int, string) result + val parse_and_validate : string -> (int, string) result +end + +module ListOps : sig + val ( >>= ) : 'a list -> ('a -> 'b list) -> 'b list + val ( >>| ) : 'a list -> ('a -> 'b) -> 'b list + val return : 'a -> 'a list + val choices : int list + val computation : (int * int * int) list + val cartesian_product : 'a list -> 'b list -> ('a * 'b) list +end + +module StateOps : sig + type ('s, 'a) state = 's -> 'a * 's + + val ( >>= ) : ('a -> 'b * 'c) -> ('b -> 'c -> 'd) -> 'a -> 'd + val return : 'a -> 'b -> 'a * 'b + val get : 'a -> 'a * 'a + val put : 'a -> 'b -> unit * 'a + val modify : ('a -> 'b) -> 'a -> unit * 'b + val run_state : ('a -> 'b) -> 'a -> 'b + val increment : int -> unit * int + val decrement : int -> unit * int + val get_count : 'a -> 'a * 'a + val counter_computation : int -> (int * int) * int +end + +module WriterOps : sig + type ('w, 'a) writer = 'a * 'w list + + val ( >>= ) : 'a * 'b list -> ('a -> 'c * 'b list) -> 'c * 'b list + val return : 'a -> 'a * 'b list + val tell : 'a -> unit * 'a list + val run_writer : 'a * 'b -> 'a * 'b + val logged_add : int -> int -> int * string list + val logged_multiply : int -> int -> int * string list + val computation : int -> int -> int * string list +end + +module MonadicSyntax : sig + module Option : sig + val ( let* ) : 'a option -> ('a -> 'b option) -> 'b option + val ( and* ) : 'a option -> 'b option -> ('a * 'b) option + val example : int -> int -> float option + val parallel_example : int -> int -> int -> int option + end + + module Result : sig + val ( let* ) : ('a, 'b) result -> ('a -> ('c, 'b) result) -> ('c, 'b) result + val parse_and_process : string -> (int, string) result + end + + module List : sig + val ( let* ) : 'a list -> ('a -> 'b list) -> 'b list + val combinations : (int * int) list + end +end diff --git a/tests/fixtures/imenu/ocaml-sample.ml b/tests/fixtures/imenu/ocaml-sample.ml new file mode 100644 index 0000000..2821570 --- /dev/null +++ b/tests/fixtures/imenu/ocaml-sample.ml @@ -0,0 +1,22 @@ +(* Test OCaml imenu *) + +let my_function x = x + 1 + +let another_value = 42 + +type my_type = + | Foo + | Bar of int + +module MyModule = struct + let inner_function y = y * 2 +end + +class my_class = + object + method get_value = 10 + end + +exception MyException of string + +external my_external : int -> int = "native_function" diff --git a/tests/fixtures/imenu/ocaml-sample.mli b/tests/fixtures/imenu/ocaml-sample.mli new file mode 100644 index 0000000..a3d0c7d --- /dev/null +++ b/tests/fixtures/imenu/ocaml-sample.mli @@ -0,0 +1,26 @@ +(* Test OCaml interface imenu *) + +val my_function : int -> int + +val another_value : int + +type my_type = + | Foo + | Bar of int + +module MyModule : sig + val inner_function : int -> int +end + +class my_class : + object + method get_value : int + end + +exception MyException of string + +module type MyModuleType = sig + type t + val operation : string -> string + val double : int -> int +end From 2de683bac4e2c8259ddc12ca77cabc1161ee0783 Mon Sep 17 00:00:00 2001 From: xvw Date: Wed, 25 Mar 2026 16:42:46 +0100 Subject: [PATCH 17/24] Fix name provider for `tuareg-treesit` --- tests/combobulate-test-prelude.el | 2 +- tests/{tuareg-treesit-bridge.el => tuareg-treesit.el} | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) rename tests/{tuareg-treesit-bridge.el => tuareg-treesit.el} (95%) diff --git a/tests/combobulate-test-prelude.el b/tests/combobulate-test-prelude.el index 3889759..a441df8 100644 --- a/tests/combobulate-test-prelude.el +++ b/tests/combobulate-test-prelude.el @@ -37,7 +37,7 @@ (require 'yaml-ts-mode) (require 'json-ts-mode) (require 'tuareg) -(require 'tuareg-treesit-bridge) +(require 'tuareg-treesit) ;;; Helpers for writing procedures diff --git a/tests/tuareg-treesit-bridge.el b/tests/tuareg-treesit.el similarity index 95% rename from tests/tuareg-treesit-bridge.el rename to tests/tuareg-treesit.el index 00cf316..36968e1 100644 --- a/tests/tuareg-treesit-bridge.el +++ b/tests/tuareg-treesit.el @@ -39,5 +39,5 @@ (add-hook 'tuareg-mode-hook #'tuareg-treesit-bridge--maybe-create-parser) -(provide 'tuareg-treesit-bridge) -;;; tuareg-treesit-bridge.el ends here +(provide 'tuareg-treesit) +;;; tuareg-treesit.el ends here From 6ab58cae71a79089b463211e263dc2bb8e608946 Mon Sep 17 00:00:00 2001 From: PizieDust Date: Thu, 26 Mar 2026 22:51:50 +0100 Subject: [PATCH 18/24] add support for envelope --- combobulate-ocaml.el | 118 +++++++++++++++++++++++++++++++ tests/fixtures/envelope/blank.ml | 2 + tests/generate-harnesses.el | 43 +++++++++++ 3 files changed, 163 insertions(+) create mode 100644 tests/fixtures/envelope/blank.ml diff --git a/combobulate-ocaml.el b/combobulate-ocaml.el index b7cfb48..27bc7df 100644 --- a/combobulate-ocaml.el +++ b/combobulate-ocaml.el @@ -152,6 +152,124 @@ "module_name" "module_type_name" "field_name" "false" "true")) (envelope-indent-region-function #'indent-region) + (envelope-list + '((:description "let ... = ... in ..." + :key "l" + :name "let-binding" + :template ("let " (p name "Name") " =" n> @ r> n> "in" n> @ n>)) + + (:description "match ... with | ... -> ..." + :key "m" + :name "match-statement" + :template ("match " (p expr "Expression") " with" n> + "| " (p pat "Pattern") " ->" n> @ r> n> + (choice* :missing nil + :rest ("| " (p pat2 "Next Pattern") " ->" n> @ n>) + :name "add-pattern"))) + + (:description "if ... then ... else ..." + :key "i" + :name "if-statement" + :template ("if " (p cond "Condition") " then" n> @ r> n> + (choice* :missing nil + :rest ("else" n> @ n>) + :name "else-branch"))) + + (:description "try ... with | ... -> ..." + :key "t" + :name "try-with" + :template ("try" n> @ r> n> + "with" n> + "| " (p exc "Exception") " ->" n> @ n>)) + + (:description "module ... = struct ... end" + :key "M" + :name "module-struct" + :template ("module " (p name "Module Name") " = struct" n> + @ r> n> + "end" > n>)) + + (:description "begin ... end" + :key "b" + :name "begin-end" + :template ("begin" n> @ r> n> "end" > n>)) + + (:description "fun ... -> ..." + :key "f" + :name "fun-expression" + :template ("fun " (p args "Arguments") " ->" n> @ r> n>)) + + (:description "function | ... -> ..." + :key "F" + :name "function-expression" + :template ("function" n> + "| " (p pat "Pattern") " ->" n> @ r> n> + (choice* :missing nil + :rest ("| " (p pat2 "Next Pattern") " ->" n> @ n>) + :name "add-pattern"))) + + (:description "type ... = ..." + :key "T" + :name "type-definition" + :template ("type " (p name "Type Name") " =" n> @ r> n>)) + + (:description "module type ... = sig ... end" + :key "S" + :name "module-sig" + :template ("module type " (p name "Signature Name") " = sig" n> + @ r> n> + "end" > n>)) + + (:description "let open ... in ..." + :key "o" + :name "let-open" + :template ("let open " (p mod "Module") " in" n> @ r> n>)) + + (:description "for ... = ... to ... do ... done" + :key "4" + :name "for-loop" + :template ("for " (p var "Variable") " = " (p start "Start") " to " (p end "End") " do" n> + @ r> n> + "done" > n>)) + + (:description "while ... do ... done" + :key "w" + :name "while-loop" + :template ("while " (p cond "Condition") " do" n> + @ r> n> + "done" > n>)) + + (:description "class ... = object ... end" + :key "c" + :name "class-definition" + :template ("class " (p name "Class Name") " = object" + (choice* :missing nil + :rest (" (" (p self "self") ")") + :name "self-binding") + n> @ r> n> + "end" > n>)) + + (:description "let rec ... = ... in ..." + :key "r" + :name "let-rec" + :template ("let rec " (p name "Function Name") " =" n> + @ r> n> + "in" n> @ n>)) + + (:description "struct ... end" + :key "st" + :name "anonymous-struct" + :template ("struct" n> @ r> n> "end" > n>)) + + (:description "type ... = | ... : ..." + :key "G" + :name "gadt-definition" + :template ("type " (p params "Parameters") " " (p name "Type Name") " =" n> + "| " (p cons "Constructor") " : " (p ty "Constructor Type") n> + @ r> n> + (choice* :missing nil + :rest ("| " (p cons2 "Next Constructor") " : " (p ty2 "Next Type") n> @ n>) + :name "add-constructor"))))) (pretty-print-node-name-function #'combobulate-ocaml-pretty-print-node-name) (plausible-separators '(";" "," "|" "struct" "sig" "end" "begin" "{" "}")) diff --git a/tests/fixtures/envelope/blank.ml b/tests/fixtures/envelope/blank.ml new file mode 100644 index 0000000..a11de8c --- /dev/null +++ b/tests/fixtures/envelope/blank.ml @@ -0,0 +1,2 @@ +(* -*- combobulate-test-point-overlays: ((1 outline 108)); eval: (combobulate-test-fixture-mode t); -*- *) + diff --git a/tests/generate-harnesses.el b/tests/generate-harnesses.el index f8f3672..d198ca1 100644 --- a/tests/generate-harnesses.el +++ b/tests/generate-harnesses.el @@ -176,6 +176,49 @@ (:test-name "choice-has-choice-3" :instructions ("{a + " (choice "1" (choice "1.1") (choice "1.2")) (choice "2") "}") :mock-proffer-choices (1 1)))) + (combobulate-test-suite + :harness-factory #'combobulate-test-harness-envelope + :fixture-files '("fixtures/envelope/blank.ml") + :collection-name "combobulate-envelope-expand-ocaml" + :action-body '((combobulate-envelope-expand-instructions instructions)) + :per-marker nil + :reverse nil + :harness-factory-matrix + '( + (:test-name "ocaml-begin-end-with-region" + :instructions ("begin" n> @ r> n> "end" > n>) + :mock-registers ((region . "print_endline \"Hello, World!\"")) + :mock-proffer-choices (0)) + (:test-name "ocaml-let-binding" + :instructions ("let " (p name "Name") " =" n> @ r> n> "in" n> @ n>) + :mock-prompt-actions ("my_var") + :mock-registers ((region . "42 + 1")) + :mock-proffer-choices (0)) + (:test-name "ocaml-for-loop" + :instructions ("for " (p var "Variable") " = " (p start "Start") " to " (p end "End") " do" n> + @ r> n> + "done" > n>) + :mock-prompt-actions ("i" "0" "10") + :mock-registers ((region . "print_int i")) + :mock-proffer-choices (0)) + (:test-name "ocaml-match-statement-single-case" + :instructions ("match " (p expr "Expression") " with" n> + "| " (p pat "Pattern") " ->" n> @ r> n> + (choice* :missing nil + :rest ("| " (p pat2 "Next Pattern") " ->" n> @ n>) + :name "add-pattern")) + :mock-prompt-actions ("my_list" "[]") + :mock-registers ((region . "0")) + :mock-proffer-choices (1 0)) + (:test-name "ocaml-match-statement-multiple-cases" + :instructions ("match " (p expr "Expression") " with" n> + "| " (p pat "Pattern") " ->" n> @ r> n> + (choice* :missing nil + :rest ("| " (p pat2 "Next Pattern") " ->" n> @ n>) + :name "add-pattern")) + :mock-prompt-actions ("my_list" "[]" "x :: xs") + :mock-registers ((region . "0")) + :mock-proffer-choices (0 1)))) ;; Dragging (combobulate-test-suite :harness-factory #'combobulate-test-harness-with-fixture-delta From 8a4efe673255f0c23e1d75bbcafa30397ad548ab Mon Sep 17 00:00:00 2001 From: xvw Date: Fri, 27 Mar 2026 09:51:34 +0100 Subject: [PATCH 19/24] Very small lint for indent --- combobulate-ocaml.el | 104 +++++++++++++++++++++--------------- tests/generate-harnesses.el | 4 +- 2 files changed, 64 insertions(+), 44 deletions(-) diff --git a/combobulate-ocaml.el b/combobulate-ocaml.el index 27bc7df..14033c8 100644 --- a/combobulate-ocaml.el +++ b/combobulate-ocaml.el @@ -153,123 +153,143 @@ (envelope-indent-region-function #'indent-region) (envelope-list - '((:description "let ... = ... in ..." + '((:description + "let ... = ... in ..." :key "l" :name "let-binding" :template ("let " (p name "Name") " =" n> @ r> n> "in" n> @ n>)) - (:description "match ... with | ... -> ..." + (:description + "match ... with | ... -> ..." :key "m" :name "match-statement" :template ("match " (p expr "Expression") " with" n> - "| " (p pat "Pattern") " ->" n> @ r> n> - (choice* :missing nil + "| " (p pat "Pattern") " ->" n> @ r> n> + (choice* :missing nil :rest ("| " (p pat2 "Next Pattern") " ->" n> @ n>) :name "add-pattern"))) - (:description "if ... then ... else ..." + (:description + "if ... then ... else ..." :key "i" :name "if-statement" :template ("if " (p cond "Condition") " then" n> @ r> n> - (choice* :missing nil + (choice* :missing nil :rest ("else" n> @ n>) :name "else-branch"))) - (:description "try ... with | ... -> ..." + (:description + "try ... with | ... -> ..." :key "t" :name "try-with" :template ("try" n> @ r> n> - "with" n> - "| " (p exc "Exception") " ->" n> @ n>)) + "with" n> + "| " (p exc "Exception") " ->" n> @ n>)) - (:description "module ... = struct ... end" + (:description + "module ... = struct ... end" :key "M" :name "module-struct" :template ("module " (p name "Module Name") " = struct" n> - @ r> n> - "end" > n>)) + @ r> n> + "end" > n>)) - (:description "begin ... end" + (:description + "begin ... end" :key "b" :name "begin-end" :template ("begin" n> @ r> n> "end" > n>)) - (:description "fun ... -> ..." + (:description + "fun ... -> ..." :key "f" :name "fun-expression" :template ("fun " (p args "Arguments") " ->" n> @ r> n>)) - (:description "function | ... -> ..." + (:description + "function | ... -> ..." :key "F" :name "function-expression" :template ("function" n> - "| " (p pat "Pattern") " ->" n> @ r> n> - (choice* :missing nil + "| " (p pat "Pattern") " ->" n> @ r> n> + (choice* :missing nil :rest ("| " (p pat2 "Next Pattern") " ->" n> @ n>) :name "add-pattern"))) - (:description "type ... = ..." + (:description + "type ... = ..." :key "T" :name "type-definition" :template ("type " (p name "Type Name") " =" n> @ r> n>)) - (:description "module type ... = sig ... end" + (:description + "module type ... = sig ... end" :key "S" :name "module-sig" :template ("module type " (p name "Signature Name") " = sig" n> - @ r> n> - "end" > n>)) + @ r> n> + "end" > n>)) - (:description "let open ... in ..." + (:description + "let open ... in ..." :key "o" :name "let-open" :template ("let open " (p mod "Module") " in" n> @ r> n>)) - (:description "for ... = ... to ... do ... done" + (:description + "for ... = ... to ... do ... done" :key "4" :name "for-loop" - :template ("for " (p var "Variable") " = " (p start "Start") " to " (p end "End") " do" n> - @ r> n> - "done" > n>)) + :template ("for " (p var "Variable") " = " + (p start "Start") " to " (p end "End") " do" n> + @ r> n> + "done" > n>)) - (:description "while ... do ... done" + (:description + "while ... do ... done" :key "w" :name "while-loop" :template ("while " (p cond "Condition") " do" n> - @ r> n> - "done" > n>)) + @ r> n> + "done" > n>)) - (:description "class ... = object ... end" + (:description + "class ... = object ... end" :key "c" :name "class-definition" :template ("class " (p name "Class Name") " = object" - (choice* :missing nil + (choice* :missing nil :rest (" (" (p self "self") ")") :name "self-binding") - n> @ r> n> - "end" > n>)) + n> @ r> n> + "end" > n>)) - (:description "let rec ... = ... in ..." + (:description + "let rec ... = ... in ..." :key "r" :name "let-rec" :template ("let rec " (p name "Function Name") " =" n> - @ r> n> - "in" n> @ n>)) + @ r> n> + "in" n> @ n>)) - (:description "struct ... end" + (:description + "struct ... end" :key "st" :name "anonymous-struct" :template ("struct" n> @ r> n> "end" > n>)) - (:description "type ... = | ... : ..." + (:description + "type ... = | ... : ..." :key "G" :name "gadt-definition" :template ("type " (p params "Parameters") " " (p name "Type Name") " =" n> - "| " (p cons "Constructor") " : " (p ty "Constructor Type") n> - @ r> n> - (choice* :missing nil - :rest ("| " (p cons2 "Next Constructor") " : " (p ty2 "Next Type") n> @ n>) + "| " (p cons "Constructor") " : " (p ty "Constructor Type") n> + @ r> n> + (choice* :missing nil + :rest ("| " (p cons2 "Next Constructor") + " : " (p ty2 "Next Type") n> @ n>) :name "add-constructor"))))) + (pretty-print-node-name-function #'combobulate-ocaml-pretty-print-node-name) (plausible-separators '(";" "," "|" "struct" "sig" "end" "begin" "{" "}")) diff --git a/tests/generate-harnesses.el b/tests/generate-harnesses.el index d198ca1..2f61feb 100644 --- a/tests/generate-harnesses.el +++ b/tests/generate-harnesses.el @@ -209,14 +209,14 @@ :name "add-pattern")) :mock-prompt-actions ("my_list" "[]") :mock-registers ((region . "0")) - :mock-proffer-choices (1 0)) + :mock-proffer-choices (1 0)) (:test-name "ocaml-match-statement-multiple-cases" :instructions ("match " (p expr "Expression") " with" n> "| " (p pat "Pattern") " ->" n> @ r> n> (choice* :missing nil :rest ("| " (p pat2 "Next Pattern") " ->" n> @ n>) :name "add-pattern")) - :mock-prompt-actions ("my_list" "[]" "x :: xs") + :mock-prompt-actions ("my_list" "[]" "x :: xs") :mock-registers ((region . "0")) :mock-proffer-choices (0 1)))) ;; Dragging From eed66b792bc9014e19ac1f274aaeed0773bc82ea Mon Sep 17 00:00:00 2001 From: PizieDust Date: Fri, 27 Mar 2026 05:04:13 +0100 Subject: [PATCH 20/24] update readme --- README.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index cf5d026..0f63dc6 100644 --- a/README.rst +++ b/README.rst @@ -111,6 +111,8 @@ Here is a list of the languages currently supported. +--------------------+--------------------------------------------------------------+--------------------+ |Go |go-mode, go-ts-mode |v0.20.0 | +--------------------+--------------------------------------------------------------+--------------------+ +|OCaml |tuareg, ocaml-ts-mode |v0.24.2 | ++--------------------+--------------------------------------------------------------+--------------------+ *Don't see your language? If you want your favourite language added, then why not try it yourself? Have a look at ``combobulate-json.el`` for an example.* @@ -225,7 +227,9 @@ Note that this example uses ``major-mode-remap-alist`` to turn your regular majo (toml . ("https://github.com/tree-sitter/tree-sitter-toml" "v0.5.1")) (tsx . ("https://github.com/tree-sitter/tree-sitter-typescript" "v0.20.3" "tsx/src")) (typescript . ("https://github.com/tree-sitter/tree-sitter-typescript" "v0.20.3" "typescript/src")) - (yaml . ("https://github.com/ikatyang/tree-sitter-yaml" "v0.5.0")))) + (yaml . ("https://github.com/ikatyang/tree-sitter-yaml" "v0.5.0")) + (ocaml . ("https://github.com/tree-sitter/tree-sitter-ocaml" "v0.24.2" "grammars/ocaml/src")) + (ocaml_interface . ("https://github.com/tree-sitter/tree-sitter-ocaml" "v0.24.2" "grammars/interface/src")))) (add-to-list 'treesit-language-source-alist grammar) ;; Only install `grammar' if we don't already have it ;; installed. However, if you want to *update* a grammar then From 74c08e7db4b8c13ddc0e2e74e269dd93190f1669 Mon Sep 17 00:00:00 2001 From: PizieDust Date: Fri, 27 Mar 2026 05:16:42 +0100 Subject: [PATCH 21/24] add all supported major modes for ocaml --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 0f63dc6..9b8890e 100644 --- a/README.rst +++ b/README.rst @@ -111,7 +111,7 @@ Here is a list of the languages currently supported. +--------------------+--------------------------------------------------------------+--------------------+ |Go |go-mode, go-ts-mode |v0.20.0 | +--------------------+--------------------------------------------------------------+--------------------+ -|OCaml |tuareg, ocaml-ts-mode |v0.24.2 | +|OCaml |caml-mode, tuareg-mode, neocaml-mode, neocaml-interface-mode |v0.24.2 | +--------------------+--------------------------------------------------------------+--------------------+ From f3900cac91525b6a1662332ab4fb6277894944d1 Mon Sep 17 00:00:00 2001 From: PizieDust Date: Fri, 27 Mar 2026 13:02:32 +0100 Subject: [PATCH 22/24] add tests for cloning --- tests/fixtures/clone/module.ml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 tests/fixtures/clone/module.ml diff --git a/tests/fixtures/clone/module.ml b/tests/fixtures/clone/module.ml new file mode 100644 index 0000000..0f951b8 --- /dev/null +++ b/tests/fixtures/clone/module.ml @@ -0,0 +1,21 @@ +(* -*- combobulate-test-point-overlays: ((1 outline 228) (2 outline 263) (3 outline 301) (4 outline 357) (5 outline 460) (6 outline 493) (7 outline 526)); eval: (combobulate-test-fixture-mode t); -*- *) +module Math = struct + + type point = { x: int; y: int } + + type vector = { dx: int; dy: int } + + type rect = { top_left: point; bottom_right: point } + + type shape = + | Point of point + | Rect of rect + | Circle of { center: point; radius: int } + + let origin = { x = 0; y = 0 } + + let make_point x y = { x; y } + + let make_vector dx dy = { dx; dy } + +end From 00d8eb15a8897c6c9b088a83832c8434133a0ca5 Mon Sep 17 00:00:00 2001 From: PizieDust Date: Wed, 1 Apr 2026 07:08:25 +0100 Subject: [PATCH 23/24] remove imenu support --- combobulate-ocaml.el | 130 +- tests/fixtures/imenu/demo.ml | 1587 ------------------------- tests/fixtures/imenu/demo.mli | 640 ---------- tests/fixtures/imenu/ocaml-sample.ml | 22 - tests/fixtures/imenu/ocaml-sample.mli | 26 - 5 files changed, 6 insertions(+), 2399 deletions(-) delete mode 100644 tests/fixtures/imenu/demo.ml delete mode 100644 tests/fixtures/imenu/demo.mli delete mode 100644 tests/fixtures/imenu/ocaml-sample.ml delete mode 100644 tests/fixtures/imenu/ocaml-sample.mli diff --git a/combobulate-ocaml.el b/combobulate-ocaml.el index 14033c8..a8f1d92 100644 --- a/combobulate-ocaml.el +++ b/combobulate-ocaml.el @@ -39,109 +39,11 @@ (defun combobulate-ocaml-pretty-print-node-name (node default-name) "Pretty print the NODE name (fallbacking on DEFAULT-NAME) for OCaml mode." - (combobulate-string-truncate - (replace-regexp-in-string - (rx (| (>= 2 " ") "\n")) " " - (let ((name (combobulate-ocaml-imenu-name-function node))) - (if (not (string= name "Anonymous")) - name - default-name))) - 40)) - -(defun combobulate-ocaml-imenu-node-p (node) - "Return t if NODE is a valid imenu node for OCaml." - (member (treesit-node-type node) - '("type_definition" "exception_definition" "external" - "value_definition" "method_definition" - "instance_variable_definition" "module_definition" - "module_type_definition" "class_definition" - "class_type_definition" "include_module" "include_module_type" - "open_module" "value_specification"))) - -(defun combobulate-ocaml-imenu-name-function (node) - "Return the name of the imenu entry for NODE in OCaml." - (or - (pcase (treesit-node-type node) - ;; For value definitions (let bindings), get the pattern name - ("value_definition" - (when-let* - ((let-binding (treesit-search-subtree node "let_binding")) - (pattern (treesit-node-child-by-field-name let-binding "pattern")) - (name-node (or (treesit-search-subtree pattern "value_name") - (treesit-search-subtree pattern "value_pattern")))) - (concat "let " (treesit-node-text name-node t)))) - - ;; For type definitions, get the type name - ("type_definition" - (when-let* - ((type-binding (treesit-search-subtree node "type_binding")) - (name-node (treesit-search-subtree type-binding "type_constructor"))) - (concat "type " (treesit-node-text name-node t)))) - - ;; For module definitions, get the module name - ("module_definition" - (when-let* - ((module-binding (treesit-search-subtree node "module_binding")) - (name-node (treesit-search-subtree module-binding "module_name"))) - (concat "module " (treesit-node-text name-node t)))) - - ;; For class definitions, get the class name - ("class_definition" - (when-let* - ((class-binding (treesit-search-subtree node "class_binding")) - (name-node (treesit-search-subtree class-binding "class_name"))) - (concat "class " (treesit-node-text name-node t)))) - - ;; For exception definitions, get the exception name - ("exception_definition" - (when-let* - ((name-node (treesit-search-subtree node "constructor_name"))) - (concat "exception " (treesit-node-text name-node t)))) - - ;; For external definitions, get the name - ("external" - (when-let* - ((name-node (treesit-search-subtree node "value_name"))) - (concat "external " (treesit-node-text name-node t)))) - - ;; For module type definitions - ("module_type_definition" - (when-let* - ((name-node (treesit-search-subtree node "module_type_name"))) - (concat "module type " (treesit-node-text name-node t)))) - - ;; For value specifications (in .mli files) - ("value_specification" - (when-let* - ((name-node (treesit-search-subtree node "value_name"))) - (concat "val " (treesit-node-text name-node t)))) - - ;; For method definitions - ("method_definition" - (when-let* - ((name-node (treesit-search-subtree node "method_name"))) - (concat "method " (treesit-node-text name-node t)))) - - ;; For class type definitions - ("class_type_definition" - (when-let* - ((class-type-binding (treesit-search-subtree node "class_type_binding")) - (name-node (treesit-search-subtree class-type-binding "class_type_name"))) - (concat "class type " (treesit-node-text name-node t)))) - - ;; For include_module - ("include_module" - (when-let - ((module-node (treesit-node-child-by-field-name node "module"))) - (concat "include " (treesit-node-text module-node t)))) - - ;; For include_module_type - ("include_module_type" - (when-let - ((sig-node (treesit-search-subtree node "signature"))) "include "))) - - ;; Fallback to just the first text content we can find - "Anonymous")) + (let ((name (treesit-node-text node t))) + (if (string-empty-p name) + default-name + (combobulate-string-truncate + (replace-regexp-in-string (rx (| (>= 2 " ") "\n")) " " name) 40)))) (eval-and-compile @@ -620,27 +522,7 @@ (defun combobulate-ocaml-setup (_) "Setup function for OCaml mode with Combobulate." - ;; Configure imenu for OCaml files - (setq-local - - ;; Use tree-sitter based imenu (treesit-simple-imenu creates the index - ;; from the settings above) - treesit-simple-imenu-settings - `(("Type" "type_definition" nil combobulate-ocaml-imenu-name-function) - ("Module" "module_definition" nil combobulate-ocaml-imenu-name-function) - ("Class" "class_definition" nil combobulate-ocaml-imenu-name-function) - ("Class Type" "class_type_definition" nil combobulate-ocaml-imenu-name-function) - ("Value" "value_definition" nil combobulate-ocaml-imenu-name-function) - ("Function" "value_definition" nil combobulate-ocaml-imenu-name-function) - ("Exception" "exception_definition" nil combobulate-ocaml-imenu-name-function) - ("External" "external" nil combobulate-ocaml-imenu-name-function) - ("Module Type" "module_type_definition" nil combobulate-ocaml-imenu-name-function) - ("Include" "include_module" nil combobulate-ocaml-imenu-name-function) - ("Include Sig" "include_module_type" nil combobulate-ocaml-imenu-name-function) - ("Value Spec" "value_specification" nil combobulate-ocaml-imenu-name-function))) - -(setq-local imenu-create-index-function #'treesit-simple-imenu) -(setq-local combobulate-navigate-down-into-lists nil)) + (setq-local combobulate-navigate-down-into-lists nil)) (provide 'combobulate-ocaml) ;;; combobulate-ocaml.el ends here diff --git a/tests/fixtures/imenu/demo.ml b/tests/fixtures/imenu/demo.ml deleted file mode 100644 index 9857498..0000000 --- a/tests/fixtures/imenu/demo.ml +++ /dev/null @@ -1,1587 +0,0 @@ -(* ========== Polymorphic Variants ========== *) - -(* Simple polymorphic variant *) -type color = [ `Red | `Green | `Blue | `RGB of int * int * int ] - -type color_2 = [ `Red | `Green | `Blue | `RGB of int * string * bool ] - -(* Polymorphic variant with inheritance *) -type basic_color = [ `Red | `Green | `Blue ] -type extended_color = [ basic_color | `Yellow | `Orange ] - -(* Open polymorphic variant *) -let color_to_string : [> `Red | `Green | `Blue ] -> string = function - | `Red -> "red" - | `Green -> "green" - | `Blue -> "blue" - | _ -> "unknown" - -(* Closed polymorphic variant *) -let string_to_color s : [< `Red | `Green | `Blue | `Unknown ] option = - match s with - | "red" -> Some `Red - | "green" -> Some `Green - | "blue" -> Some `Blue - | _ -> Some `Unknown - -(* Pattern matching with polymorphic variants *) -let color_brightness = function - | `Red -> 0.299 - | `Green -> 0.587 - | `Blue -> 0.114 - | `RGB (r, g, b) -> - (float_of_int r *. 0.299 +. - float_of_int g *. 0.587 +. - float_of_int b *. 0.114) /. 255.0 - -(* ========== Class Types and Implementations ========== *) - -(* Basic class implementation matching point_type *) -class point initial_x initial_y = object - val mutable x = initial_x - val mutable y = initial_y - method x = x - method y = y - method move dx dy = - x <- x + dx; - y <- y + dy -end - -(* Shape classes *) -class virtual shape = object - method virtual area : float - method virtual perimeter : float -end - -class circle radius = object - inherit shape - method area = 3.14159 *. radius *. radius - method perimeter = 2.0 *. 3.14159 *. radius -end - -class rectangle width height = object - inherit shape - method area = width *. height - method perimeter = 2.0 *. (width +. height) -end - -(* Colored shape *) -class colored_circle radius initial_color = object - inherit circle radius - val mutable current_color = initial_color - method color = current_color - method set_color c = current_color <- c -end - -(* Counter with instance variables *) -class counter = object - val mutable count = 0 - method increment = count <- count + 1 - method get_count = count -end - -(* ========== Include Statements ========== *) - -(* Module types for inclusion *) -module type COMPARABLE = sig - type t - val compare : t -> t -> int -end - -module type PRINTABLE = sig - type t - val to_string : t -> string -end - -module type COMPARABLE_PRINTABLE = sig - include COMPARABLE - include PRINTABLE with type t := t -end - -(* Module implementing the combined interface *) -module IntComparablePrintable = struct - type t = int - let compare = compare - let to_string = string_of_int -end - -(* Using include in module implementation *) -module ExtendedInt = struct - include IntComparablePrintable - let add x y = x + y - let multiply x y = x * y -end - -(* ========== Attributes and Extensions ========== *) - -(* Deprecated function *) -let old_function x = x + 1 [@@deprecated "Use new_function instead"] - -(* New replacement function *) -let new_function x = x + 1 - -(* Inline function *) -let inline_me x = x * 2 [@@inline] - -(* External with attributes *) -external get_time : unit -> float = "caml_sys_time" [@@noalloc] - -(* Type with attributes on constructors *) -type message = - | Info of string - | Warning of string [@warn_on_literal_pattern] - | Error of string - -(* Alert attribute *) -let experimental_feature () = - print_endline "This is experimental" [@@alert experimental "This feature is experimental"] - -(* Function with multiple attributes *) -let optimized_function x = - x * x * x - [@@inline] - [@@specialise] - -(* GADT Example *) -type _ expression = - | Int : int -> int expression - | Bool : bool -> bool expression - | Add : int expression * int expression -> int expression - | Eq : 'a expression * 'a expression -> bool expression - -let rec eval : type a. a expression -> a = function - | Int n -> n - | Bool b -> b - | Add (e1, e2) -> eval e1 + eval e2 - | Eq (e1, e2) -> eval e1 = eval e2 - -(* First-class module example *) -module type SHOW = sig - type t - val show : t -> string -end - -let int_show = (module struct - type t = int - let show = string_of_int -end : SHOW with type t = int) - -let show_value (type a) (module S : SHOW with type t = a) (x : a) = - S.show x - -(* ========== Original Module Examples ========== *) - -(* Simple module with signature *) -module Positive : sig - type t = private int - val make : int -> t - val to_int : t -> int - val add : t -> t -> t -end = struct - type t = int - let make i = if i > 0 then i else invalid_arg "make" - let to_int x = x - let add x y = x + y -end - -(* Module for mathematical operations *) -module Math = struct (* TODO hierarchy navigation should skip visiting struct and go directly - to let/type bindings *) - let all x = x * x + x - x / x - let square x = x * x - let cube x = x * x * x - let double x = x + x - let half x = x / 2 - - module Constants = struct - let pi = 3.14159 (* TODO sibling navigation should move between this let binding and the following let bindings. *) - let e = 2.71828 - let golden_ratio = 1.61803 - end -end - -(* Module with abstract type *) -module Stack : sig - type 'a t - val empty : 'a t - val push : 'a -> 'a t -> 'a t - val pop : 'a t -> ('a * 'a t) option - val size : 'a t -> int -end = struct - type 'a t = 'a list - let empty = [] - let push x s = x :: s - let pop = function - | [] -> None - | x :: xs -> Some (x, xs) - let size = List.length -end - -(* Module for string operations *) -module StringOps = struct - let uppercase s = String.uppercase_ascii s - let lowercase s = String.lowercase_ascii s - let reverse s = (* TODO hierarchy navigation from argument s goes to fun i skipping the let binding. It should go to the let binding. *) - let len = String.length s in - String.init len (fun i -> s.[len - 1 - i]) (* TODO sibling navigation to previous sibling should go to "let len" *) - let concat_with sep strs = String.concat sep strs -end - -(* Module with French Latin-1 characters *) -module Operations = struct - let creer x = x - let detruire _ = () - let repeter n f x = - let rec aux acc = function - | 0 -> acc - | n -> aux (f acc) (n - 1) - in aux x n - - module Mathematiques = struct - let carre x = x * x - let racine_carree x = sqrt (float_of_int x) - let perimetre_cercle rayon = 2.0 *. 3.14159 *. rayon - let ete x = x + 10 (* ete = summer *) - let hiver x = x - 10 (* hiver = winter *) - end - - module Chaines = struct - let longueur s = String.length s - let premiere_lettre s = if String.length s > 0 then Some s.[0] else None - let derniere_lettre s = - let len = String.length s in - if len > 0 then Some s.[len - 1] else None - let resume s = if String.length s > 10 then String.sub s 0 10 else s - end -end - -(* Module avec caracteres accentues *) -module Francais = struct - let prenom = "Francois" - let age = 25 - let ville = "Montreal" - - module Numeros = struct - let zero = 0 - let numero_un = 1 - let numero_prefere = 42 - let systeme_decimal = 10 - end - - module Evenements = struct - type evenement = { - nom: string; - annee: int; - saison: string; - } - - let creer_evenement nom annee saison = - { nom; annee; saison } - - let annee_evenement evt = evt.annee - let nom_evenement evt = evt.nom - end -end - -(* Nested module hierarchy for collections *) -module Collections = struct - module List = struct - module Ops = struct - let rec take n lst = - match n, lst with - | 0, _ | _, [] -> [] - | n, x :: xs -> x :: take (n - 1) xs - - let rec drop n lst = - match n, lst with - | 0, _ -> lst - | _, [] -> [] - | n, _ :: xs -> drop (n - 1) xs - - let split_at n lst = (take n lst, drop n lst) - end - - module Fold = struct - let sum = List.fold_left (+) 0 - let product = List.fold_left ( * ) 1 - let max_elem lst = List.fold_left max min_int lst - let min_elem lst = List.fold_left min max_int lst - end - - module Transform = struct - let squares = List.map (fun x -> x * x) - let cubes = List.map (fun x -> x * x * x) - let doubles = List.map (fun x -> x * 2) - let increments = List.map (fun x -> x + 1) - end - end - - module Array = struct - module Create = struct - let range start stop = - Array.init (stop - start) (fun i -> start + i) - - let constant n value = - Array.make n value - - let fibonacci n = - let arr = Array.make n 0 in (* TODO sibling navigation between let,if,for, done, arr doesn't work here. *) - if n > 0 then arr.(0) <- 0; - if n > 1 then arr.(1) <- 1; - for i = 2 to n - 1 do - arr.(i) <- arr.(i-1) + arr.(i-2) - done; - arr - end - - module Stats = struct - let sum arr = Array.fold_left (+) 0 arr - let mean arr = - let len = Array.length arr in - if len = 0 then 0.0 - else float_of_int (sum arr) /. float_of_int len - - let max arr = Array.fold_left max min_int arr - let min arr = Array.fold_left min max_int arr - end - end - - module Tree = struct - type 'a t = (* TODO hierarchy navigation between type and constructor declaration should skip the variant declaration. Then sibling navigation between constructor declarations works correctly. *) - | Leaf - | Node of 'a * 'a t * 'a t - - module Build = struct - let leaf = Leaf - let node v l r = Node (v, l, r) - let singleton v = Node (v, Leaf, Leaf) - end - - module Ops = struct - let rec size = function - | Leaf -> 0 - | Node (_, l, r) -> 1 + size l + size r - - let rec height = function - | Leaf -> 0 - | Node (_, l, r) -> 1 + max (height l) (height r) - - let rec map f = function - | Leaf -> Leaf - | Node (v, l, r) -> Node (f v, map f l, map f r) - - let rec fold f acc = function - | Leaf -> acc - | Node (v, l, r) -> - let acc' = fold f acc l in - let acc'' = f acc' v in - fold f acc'' r - end - end -end - -(* Deeply nested module for data structures *) -module DataStructures = struct - module Linear = struct - module Queue = struct - type 'a t = { - front: 'a list; - back: 'a list; - } - - let empty = { front = []; back = [] } - - let enqueue x q = { q with back = x :: q.back } - - let dequeue q = - match q.front with - | x :: xs -> Some (x, { q with front = xs }) - | [] -> - match List.rev q.back with - | [] -> None - | x :: xs -> Some (x, { front = xs; back = [] }) - - let size q = List.length q.front + List.length q.back - end - - module Deque = struct - type 'a t = 'a list * 'a list - - let empty = ([], []) - - let push_front x (front, back) = (x :: front, back) - let push_back x (front, back) = (front, x :: back) - - let pop_front = function - | (x :: xs, back) -> Some (x, (xs, back)) - | ([], back) -> - match List.rev back with - | [] -> None - | x :: xs -> Some (x, (xs, [])) - - let pop_back = function - | (front, x :: xs) -> Some (x, (front, xs)) - | (front, []) -> - match List.rev front with - | [] -> None - | x :: xs -> Some (x, ([], xs)) - end - end - - module Associative = struct - module HashMap = struct - type ('k, 'v) t = ('k * 'v) list array - - let create size = Array.make size [] - - let hash_function key size = - (Hashtbl.hash key) mod size - - let add key value map = - let size = Array.length map in - let idx = hash_function key size in - let bucket = map.(idx) in - let new_bucket = (key, value) :: List.filter (fun (k, _) -> k <> key) bucket in - map.(idx) <- new_bucket; - map - - let find key map = - let size = Array.length map in - let idx = hash_function key size in - List.assoc_opt key map.(idx) - end - - module Trie = struct - type t = { - is_end: bool; - children: (char * t) list; - } - - let empty = { is_end = false; children = [] } - - let rec insert word trie = - match word with - | [] -> { trie with is_end = true } - | c :: cs -> - let child = - match List.assoc_opt c trie.children with - | Some node -> insert cs node - | None -> insert cs empty - in - let new_children = (c, child) :: List.filter (fun (ch, _) -> ch <> c) trie.children in - { trie with children = new_children } - - let rec search word trie = - match word with - | [] -> trie.is_end - | c :: cs -> - match List.assoc_opt c trie.children with - | None -> false - | Some child -> search cs child - end - end -end - -(* Module for functional programming utilities *) -module Functional = struct - module Combinators = struct - let id x = x - let const x _ = x - let flip f x y = f y x - - module Compose = struct - let (<|) f g x = f (g x) - let (|>) x f = f x - let (>>) f g x = g (f x) - let (<<) f g x = f (g x) - end - end - - module Curry = struct - let curry f x y = f (x, y) - let uncurry f (x, y) = f x y - - let curry3 f x y z = f (x, y, z) - let uncurry3 f (x, y, z) = f x y z - end - - module Partial = struct - let apply_first f x = fun y -> f x y - let apply_second f y = fun x -> f x y - - let compose_left f g = fun x -> f (g x) - let compose_right f g = fun x -> g (f x) - end -end - -(* Module for mathematical operations with nested modules *) -module Mathematics = struct - module Arithmetic = struct - module Basic = struct - let add x y = x + y - let sub x y = x - y - let mul x y = x * y - let div x y = if y <> 0 then Some (x / y) else None - end - - module Advanced = struct - let rec gcd a b = - if b = 0 then a else gcd b (a mod b) - - let lcm a b = - (a * b) / gcd a b - - let rec factorial = function - | 0 | 1 -> 1 - | n -> n * factorial (n - 1) - - let rec fibonacci = function - | 0 -> 0 - | 1 -> 1 - | n -> fibonacci (n - 1) + fibonacci (n - 2) - end - end - - module Algebra = struct - module Polynomial = struct - type t = float list - - let eval coeffs x = - List.fold_left (fun acc c -> acc *. x +. c) 0.0 (List.rev coeffs) - - let add p1 p2 = - let rec aux acc l1 l2 = - match l1, l2 with - | [], [] -> List.rev acc - | x :: xs, [] | [], x :: xs -> aux (x :: acc) xs [] - | x :: xs, y :: ys -> aux ((x +. y) :: acc) xs ys - in aux [] p1 p2 - - let scale s p = List.map (fun c -> s *. c) p - end - - module Matrix = struct - type t = float array array - - let create rows cols init = - Array.make_matrix rows cols init - - let get m i j = m.(i).(j) - let set m i j v = m.(i).(j) <- v - - let dimensions m = - (Array.length m, if Array.length m > 0 then Array.length m.(0) else 0) - end - end - - module Statistics = struct - module Descriptive = struct - let mean lst = - let sum = List.fold_left (+.) 0.0 lst in - let count = float_of_int (List.length lst) in - sum /. count - - let variance lst = - let m = mean lst in - let squared_diffs = List.map (fun x -> (x -. m) ** 2.0) lst in - mean squared_diffs - - let std_dev lst = - sqrt (variance lst) - end - - module Correlation = struct - let covariance xs ys = - let mean_x = Descriptive.mean xs in - let mean_y = Descriptive.mean ys in - let pairs = List.combine xs ys in - let prods = List.map (fun (x, y) -> (x -. mean_x) *. (y -. mean_y)) pairs in - Descriptive.mean prods - - let correlation xs ys = - let cov = covariance xs ys in - let std_x = Descriptive.std_dev xs in - let std_y = Descriptive.std_dev ys in - cov /. (std_x *. std_y) - end - end - - (* Statistiques en francais *) - module Statistiques = struct - let mediane lst = - let sorted = List.sort compare lst in - let len = List.length sorted in - if len = 0 then 0.0 - else if len mod 2 = 1 then - List.nth sorted (len / 2) - else - let mid1 = List.nth sorted (len / 2 - 1) in - let mid2 = List.nth sorted (len / 2) in - (mid1 +. mid2) /. 2.0 - - let etendue lst = - if lst = [] then 0.0 - else - let sorted = List.sort compare lst in - List.nth sorted (List.length sorted - 1) -. List.hd sorted - - let quartiles lst = - let sorted = List.sort compare lst in - let len = List.length sorted in - if len < 4 then (0.0, 0.0, 0.0) - else - let q1 = List.nth sorted (len / 4) in - let q2 = List.nth sorted (len / 2) in - let q3 = List.nth sorted (3 * len / 4) in - (q1, q2, q3) - end - - (* Geometrie avec caracteres accentues *) - module Geometrie = struct - module Cercle = struct - let perimetre rayon = 2.0 *. 3.14159 *. rayon - let aire rayon = 3.14159 *. rayon *. rayon - let diametre rayon = 2.0 *. rayon - end - - module Triangle = struct - let perimetre cote1 cote2 cote3 = cote1 +. cote2 +. cote3 - let aire base hauteur = 0.5 *. base *. hauteur - let est_equilateral a b c = a = b && b = c - end - - module Carre = struct - let perimetre cote = 4.0 *. cote - let aire cote = cote *. cote - let diagonale cote = cote *. sqrt 2.0 - end - end -end - -(* ========== Functor Examples ========== *) - -(* Functor: Module parameterized by another module *) -module type ORDERED = sig - type t - val compare : t -> t -> int -end - -module type SORTABLE = sig - type elem - val sort : elem list -> elem list -end - -module MakeSort (Ord : ORDERED) : SORTABLE with type elem = Ord.t = struct - type elem = Ord.t - - let rec insert x = function - | [] -> [x] - | y :: ys -> - if Ord.compare x y <= 0 then x :: y :: ys - else y :: insert x ys - - let rec sort = function - | [] -> [] - | x :: xs -> insert x (sort xs) -end - -(* Create instances of the functor *) -module IntOrder = struct - type t = int - let compare = compare -end - -module StringOrder = struct - type t = string - let compare = String.compare -end - -module IntSort = MakeSort(IntOrder) (* TODO hierarchy navigation up from IntOrder skips MakeSort, it should visit it like it does for navigating down. *) -module StringSort = MakeSort(StringOrder) - -(* Another functor for creating collections *) -module type COMPARABLE = sig - type t - val compare : t -> t -> int - val to_string : t -> string -end - -module type SET = sig - type elem - type t - val empty : t - val add : elem -> t -> t - val mem : elem -> t -> bool - val to_list : t -> elem list -end - -module MakeSet (C : COMPARABLE) : SET with type elem = C.t = struct - type elem = C.t - type t = elem list - - let empty = [] - - let rec add x = function - | [] -> [x] - | y :: ys -> - match C.compare x y with - | 0 -> y :: ys - | n when n < 0 -> x :: y :: ys - | _ -> y :: add x ys - - let rec mem x = function (* TODO Navigating down from function goes to ] rather than [] *) - | [] -> false - | y :: ys -> - match C.compare x y with - | 0 -> true (* TODO Navigating between match_case doesn't work here *) - | n when n < 0 -> false - | _ -> mem x ys - - let to_list s = s -end - -module IntComparable = struct - type t = int - let compare = compare - let to_string = string_of_int -end - -module IntSet = MakeSet(IntComparable) - -(* ========== First-Class Functions ========== *) - -(* Functions that return functions *) -let make_adder n = fun x -> x + n - -let make_multiplier n = fun x -> x * n - -let make_power n = fun x -> - let rec power acc = function - | 0 -> acc - | n -> power (acc * x) (n - 1) - in power 1 n - -(* Functions that take functions as arguments *) -let apply_twice f x = f (f x) - -let compose f g x = f (g x) - -let apply_n_times n f x = - let rec aux acc = function - | 0 -> acc - | n -> aux (f acc) (n - 1) - in aux x n - -(* Higher-order functions *) -let map_pair f (x, y) = (f x, f y) - -let apply_to_list fs x = List.map (fun f -> f x) fs - -let filter_and_map pred f lst = - List.map f (List.filter pred lst) - -(* Fonctions de premiere classe avec caracteres francais *) -let creer_additionneur n = fun x -> x + n - -let creer_multiplicateur n = fun x -> x * n - -let appliquer_repete n f x = - let rec aux acc = function - | 0 -> acc - | i -> aux (f acc) (i - 1) - in aux x n - -let composer_fonctions f g x = f (g x) - -(* Fonctions d'ordre superieur *) -let transformer_paire f (x, y) = (f x, f y) - -let filtrer_et_transformer predicat transformeur liste = - List.map transformeur (List.filter predicat liste) - -let appliquer_a_tous operation liste = - List.map operation liste - -let reduire combineur initial liste = - List.fold_left combineur initial liste - -(* ========== Partially Applied Functions ========== *) - -(* Create partially applied functions *) -let add x y = x + y -let add_five = add 5 -let add_ten = add 10 - -let multiply x y = x * y -let double = multiply 2 -let triple = multiply 3 -let quadruple = multiply 4 - -let power base exp = - let rec pow acc = function - | 0 -> acc - | n -> pow (acc * base) (n - 1) - in pow 1 exp - -let square_via_power = power 2 -let cube_via_power = power 3 - -(* More complex partial application *) -let fold_sum = List.fold_left (+) 0 -let fold_product = List.fold_left ( * ) 1 -let fold_max = List.fold_left max min_int - -let map_square = List.map (fun x -> x * x) -let map_double = List.map (fun x -> x * 2) -let map_negate = List.map (fun x -> -x) - -let filter_positive = List.filter (fun x -> x > 0) -let filter_even = List.filter (fun x -> x mod 2 = 0) -let filter_odd = List.filter (fun x -> x mod 2 <> 0) - -(* ========== Anonymous Functions ========== *) - -(* List of anonymous functions *) -let math_ops = [ - (fun x -> x + 1); - (fun x -> x * 2); - (fun x -> x * x); - (fun x -> x - 10); -] - -(* Using anonymous functions with higher-order functions *) -let transform_list lst = - lst - |> List.map (fun x -> x * 2) - |> List.filter (fun x -> x > 10) - |> List.map (fun x -> x + 5) - -let process_pairs pairs = - List.map (fun (x, y) -> x + y) pairs - -let nested_functions x = - (fun y -> (fun z -> x + y + z)) - -(* Anonymous functions in pattern matching *) -let apply_op op x y = - match op with - | "add" -> (fun a b -> a + b) x y - | "mul" -> (fun a b -> a * b) x y - | "sub" -> (fun a b -> a - b) x y - | _ -> 0 - -(* ========== Combined Examples ========== *) - -(* Combining modules, functors, and higher-order functions *) -module type MONAD = sig - type 'a t - val return : 'a -> 'a t - val bind : 'a t -> ('a -> 'b t) -> 'b t -end - -module OptionMonad : MONAD with type 'a t = 'a option = struct - type 'a t = 'a option - let return x = Some x - let bind m f = - match m with - | None -> None - | Some x -> f x -end - -module ListMonad : MONAD with type 'a t = 'a list = struct - type 'a t = 'a list - let return x = [x] - let bind m f = List.concat (List.map f m) -end - -(* Complex example combining all concepts *) -let pipeline_example () = - let add_partial = (+) 10 in - let multiply_partial = ( * ) 3 in - - let pipeline = - [1; 2; 3; 4; 5] - |> List.map add_partial - |> List.filter (fun x -> x mod 2 = 0) - |> List.map multiply_partial - |> List.fold_left (+) 0 - in - pipeline - -(* ========== Extended Indexing Operators ========== *) - -(* Custom indexing operators for different data structures *) -module CustomIndexing = struct - (* Array-like indexing with .() *) - type int_array = int array - - let ( .%() ) arr i = Array.get arr i - let ( .%()<- ) arr i v = Array.set arr i v - - (* String indexing with .[] *) - type text = string - - let (.%[]) str i = String.get str i - let (.%[]<-) str i c = - let bytes = Bytes.of_string str in - Bytes.set bytes i c; - Bytes.to_string bytes - - (* Map-like indexing with .{} *) - type ('k, 'v) map = ('k * 'v) list - - let (.%{}) map key = List.assoc_opt key map - let (.%{}<-) map key value = (key, value) :: List.remove_assoc key map - - - (* Custom collection with .@() *) - type 'a circular_buffer = { - data: 'a array; - size: int; - } - - let (.@()) buf i = - let actual_i = i mod buf.size in - buf.data.(actual_i) -end - -(* ========== Let Punning Examples ========== *) - -(* Let punning allows omitting the pattern when it matches the expression *) -module LetPunning = struct - (* Record type for demonstrating punning *) - type person = { - name: string; - age: int; - city: string; - } - - type coordinates = { - x: float; - y: float; - z: float; - } - - (* Function using let punning in record construction *) - let make_person name age city = - { name; age; city } (* equivalent to { name = name; age = age; city = city } *) - - let make_coords x y z = - { x; y; z } - - (* Pattern matching with punning *) - let get_person_info { name; age; city } = - Printf.sprintf "%s is %d years old and lives in %s" name age city - - let distance_from_origin { x; y; z } = - sqrt (x *. x +. y *. y +. z *. z) - - (* Nested record with punning *) - type address = { - street: string; - number: int; - postal_code: string; - } - - type employee = { - name: string; - employee_id: int; - address: address; - } - - let make_address street number postal_code = - { street; number; postal_code } - - let make_employee name employee_id address = - { name; employee_id; address } - - (* Using punning in let bindings *) - let process_employee emp = - let { name; employee_id; address } = emp in - let { street; number; postal_code } = address in - Printf.sprintf "Employee %s (#%d) lives at %d %s, %s" - name employee_id number street postal_code -end - -(* ========== Monadic Bind (>>=) Examples ========== *) - -(* Option monad with bind operator *) -module OptionOps = struct - let (>>=) opt f = - match opt with - | None -> None - | Some x -> f x - - let (>>|) opt f = - match opt with - | None -> None - | Some x -> Some (f x) - - let return x = Some x - - (* Example: safe division chain *) - let safe_div x y = - if y = 0 then None else Some (x / y) - - let safe_sqrt x = - if x < 0.0 then None else Some (sqrt x) - - let safe_log x = - if x <= 0.0 then None else Some (log x) - - (* Chaining operations with >>= *) - let complex_calculation x y z = - safe_div x y >>= fun result1 -> - safe_sqrt (float_of_int result1) >>= fun result2 -> - safe_log result2 >>= fun result3 -> - return (result3 *. float_of_int z) - - (* Using >>| for mapping *) - let simple_calc x = - Some x >>| (fun n -> n * 2) >>| (fun n -> n + 10) -end - -(* Result monad with bind operator *) -module ResultOps = struct - type ('a, 'e) result = ('a, 'e) Result.t - - let (>>=) res f = - match res with - | Error e -> Error e - | Ok x -> f x - - let (>>|) res f = - match res with - | Error e -> Error e - | Ok x -> Ok (f x) - - let return x = Ok x - - (* Example: parsing and validation *) - let parse_int s = - try Ok (int_of_string s) - with Failure _ -> Error ("Failed to parse: " ^ s) - - let validate_positive x = - if x > 0 then Ok x - else Error "Number must be positive" - - let validate_range min max x = - if x >= min && x <= max then Ok x - else Error (Printf.sprintf "Number must be between %d and %d" min max) - - (* Chaining with >>= *) - let parse_and_validate s = - parse_int s >>= fun num -> - validate_positive num >>= fun pos_num -> - validate_range 1 100 pos_num >>= fun valid_num -> - return (valid_num * 2) -end - -(* List monad with bind operator *) -module ListOps = struct - let (>>=) lst f = List.concat_map f lst - let (>>|) lst f = List.map f lst - let return x = [x] - - (* Example: non-deterministic computation *) - let choices = [1; 2; 3] - - let computation = - choices >>= fun x -> - [x; x * 2] >>= fun y -> - [y + 1; y + 2] >>= fun z -> - return (x, y, z) - - (* Cartesian product using bind *) - let cartesian_product xs ys = - xs >>= fun x -> - ys >>= fun y -> - return (x, y) -end - -(* State monad with bind operator *) -module StateOps = struct - type ('s, 'a) state = 's -> ('a * 's) - - let (>>=) m f = fun s -> - let (a, s') = m s in - f a s' - - let return x = fun s -> (x, s) - - let get = fun s -> (s, s) - let put s' = fun _ -> ((), s') - let modify f = fun s -> ((), f s) - - let run_state m s = m s - - (* Example: counter *) - let increment = modify ((+) 1) - let decrement = modify (fun x -> x - 1) - let get_count = get - - let counter_computation = - increment >>= fun () -> - increment >>= fun () -> - get_count >>= fun count1 -> - increment >>= fun () -> - get_count >>= fun count2 -> - return (count1, count2) -end - -(* Custom monad: Writer for logging *) -module WriterOps = struct - type ('w, 'a) writer = 'a * 'w list - - let (>>=) (a, log) f = - let (b, log2) = f a in - (b, log @ log2) - - let return x = (x, []) - - let tell msg = ((), [msg]) - - let run_writer (a, log) = (a, log) - - (* Example: computation with logging *) - let logged_add x y = - tell (Printf.sprintf "Adding %d + %d" x y) >>= fun () -> - return (x + y) - - let logged_multiply x y = - tell (Printf.sprintf "Multiplying %d * %d" x y) >>= fun () -> - return (x * y) - - let computation x y = - logged_add x y >>= fun sum -> - logged_multiply sum 2 >>= fun result -> - tell "Computation finished" >>= fun () -> - return result -end - -(* Combining monadic operations with let* syntax (OCaml 4.08+) *) -module MonadicSyntax = struct - (* Option monad *) - module Option = struct - let ( let* ) = OptionOps.(>>=) - let ( and* ) opt1 opt2 = - match opt1, opt2 with - | Some x, Some y -> Some (x, y) - | _ -> None - - let example x y = - let* a = OptionOps.safe_div x y in - let* b = OptionOps.safe_sqrt (float_of_int a) in - Some (b *. 2.0) - - let parallel_example x y z = - let* a = Some x - and* b = Some y - and* c = Some z in - Some (a + b + c) - end - - (* Result monad *) - module Result = struct - let ( let* ) = ResultOps.(>>=) - - let parse_and_process s = - let* num = ResultOps.parse_int s in - let* validated = ResultOps.validate_positive num in - Ok (validated * 3) - end - - (* List monad *) - module List = struct - let ( let* ) = ListOps.(>>=) - - let combinations = - let* x = [1; 2; 3] in - let* y = [10; 20] in - [(x, y)] - end -end - -(* ========== Main Test Section ========== *) - -let () = - (* Test Positive module *) - let p1 = Positive.make 5 in - let p2 = Positive.make 10 in - let sum = Positive.add p1 p2 in - let _ = Positive.to_int sum in - - (* Test Math module *) - let _ = Math.square 5 in - let _ = Math.cube 3 in - let _ = Math.Constants.pi in - - (* Test Stack module *) - let s = Stack.empty in - let s = Stack.push 1 s in - let s = Stack.push 2 s in - let s = Stack.push 3 s in - let _ = Stack.size s in - - (* Test nested Collections modules *) - let test_list = [1; 2; 3; 4; 5; 6; 7; 8; 9; 10] in - let _ = Collections.List.Ops.take 5 test_list in - let _ = Collections.List.Ops.drop 3 test_list in - let (_first_half, _second_half) = Collections.List.Ops.split_at 5 test_list in - - let _ = Collections.List.Fold.sum test_list in - let _ = Collections.List.Fold.product [1; 2; 3; 4] in - let _ = Collections.List.Fold.max_elem test_list in - - let _ = Collections.List.Transform.squares test_list in - let _ = Collections.List.Transform.cubes [1; 2; 3] in - let _ = Collections.List.Transform.doubles test_list in - - (* Test Collections.Array nested modules *) - let arr = Collections.Array.Create.range 0 10 in - let _ = Collections.Array.Create.constant 5 42 in - let _fib_arr = Collections.Array.Create.fibonacci 10 in - - let _ = Collections.Array.Stats.sum arr in - let _ = Collections.Array.Stats.mean arr in - let _ = Collections.Array.Stats.max arr in - - (* Test Collections.Tree nested modules *) - let tree = Collections.Tree.Build.node 5 - (Collections.Tree.Build.node 3 - (Collections.Tree.Build.singleton 1) - (Collections.Tree.Build.singleton 4)) - (Collections.Tree.Build.node 8 - (Collections.Tree.Build.singleton 6) - (Collections.Tree.Build.singleton 10)) in - - let _ = Collections.Tree.Ops.size tree in - let _ = Collections.Tree.Ops.height tree in - let _doubled_tree = Collections.Tree.Ops.map (fun x -> x * 2) tree in - let tree_sum = Collections.Tree.Ops.fold (+) 0 tree in - - (* Test DataStructures.Linear modules *) - let q = DataStructures.Linear.Queue.empty in - let q = DataStructures.Linear.Queue.enqueue 1 q in - let q = DataStructures.Linear.Queue.enqueue 2 q in - let q = DataStructures.Linear.Queue.enqueue 3 q in - let _ = DataStructures.Linear.Queue.size q in - let _result_q = DataStructures.Linear.Queue.dequeue q in - - let dq = DataStructures.Linear.Deque.empty in - let dq = DataStructures.Linear.Deque.push_front 1 dq in - let dq = DataStructures.Linear.Deque.push_back 2 dq in - let dq = DataStructures.Linear.Deque.push_front 0 dq in - let _ = DataStructures.Linear.Deque.pop_front dq in - - (* Test DataStructures.Associative modules *) - let hmap = DataStructures.Associative.HashMap.create 10 in - let hmap = DataStructures.Associative.HashMap.add "key1" 100 hmap in - let hmap = DataStructures.Associative.HashMap.add "key2" 200 hmap in - let _ = DataStructures.Associative.HashMap.find "key1" hmap in - - let trie = DataStructures.Associative.Trie.empty in - let trie = DataStructures.Associative.Trie.insert ['h'; 'e'; 'l'; 'l'; 'o'] trie in - let trie = DataStructures.Associative.Trie.insert ['h'; 'e'; 'l'; 'p'] trie in - let _ = DataStructures.Associative.Trie.search ['h'; 'e'; 'l'; 'l'; 'o'] trie in - let _ = DataStructures.Associative.Trie.search ['h'; 'i'] trie in - - (* Test Functional.Combinators modules *) - let _ = Functional.Combinators.id 42 in - let const_5 = Functional.Combinators.const 5 in - let _ = const_5 "anything" in - let flipped_sub = Functional.Combinators.flip (-) in - let _ = flipped_sub 3 10 in - - let open Functional.Combinators.Compose in - let add1 = (+) 1 in - let mul2 = ( * ) 2 in - let composed = add1 << mul2 in - let _ = composed 5 in - - (* Test Functional.Curry *) - let add_tuple (x, y) = x + y in - let curried_add = Functional.Curry.curry add_tuple in - let _ = curried_add 3 4 in - - let curried_mul x y = x * y in - let uncurried_mul = Functional.Curry.uncurry curried_mul in - let _ = uncurried_mul (5, 6) in - - (* Test Functional.Partial *) - let add_fn x y = x + y in - let add_10 = Functional.Partial.apply_first add_fn 10 in - let _ = add_10 5 in - - (* Test Mathematics.Arithmetic modules *) - let _ = Mathematics.Arithmetic.Basic.add 5 3 in - let _ = Mathematics.Arithmetic.Basic.mul 4 7 in - let _ = Mathematics.Arithmetic.Basic.div 10 3 in - - let _ = Mathematics.Arithmetic.Advanced.gcd 48 18 in - let _ = Mathematics.Arithmetic.Advanced.lcm 12 15 in - let _ = Mathematics.Arithmetic.Advanced.factorial 5 in - let _ = Mathematics.Arithmetic.Advanced.fibonacci 10 in - - (* Test Mathematics.Algebra modules *) - let poly = [1.0; 2.0; 3.0] in - let _ = Mathematics.Algebra.Polynomial.eval poly 2.0 in - let poly2 = [2.0; 3.0; 1.0] in - let _ = Mathematics.Algebra.Polynomial.add poly poly2 in - let _ = Mathematics.Algebra.Polynomial.scale 2.0 poly in - - let matrix = Mathematics.Algebra.Matrix.create 3 3 0.0 in - Mathematics.Algebra.Matrix.set matrix 0 0 1.0; - Mathematics.Algebra.Matrix.set matrix 1 1 2.0; - let _ = Mathematics.Algebra.Matrix.get matrix 0 0 in - let _ = Mathematics.Algebra.Matrix.dimensions matrix in - - (* Test Mathematics.Statistics modules *) - let data = [1.0; 2.0; 3.0; 4.0; 5.0] in - let _ = Mathematics.Statistics.Descriptive.mean data in - let _ = Mathematics.Statistics.Descriptive.variance data in - let _ = Mathematics.Statistics.Descriptive.std_dev data in - - let x_data = [1.0; 2.0; 3.0; 4.0; 5.0] in - let y_data = [2.0; 4.0; 6.0; 8.0; 10.0] in - let _ = Mathematics.Statistics.Correlation.covariance x_data y_data in - let _ = Mathematics.Statistics.Correlation.correlation x_data y_data in - - (* Test French modules with Latin-1 characters *) - let _ = Operations.creer 42 in - let _ = Operations.detruire () in - let _ = Operations.repeter 3 (fun x -> x + 1) 0 in - - let _ = Operations.Mathematiques.carre 5 in - let _ = Operations.Mathematiques.racine_carree 16 in - let _ = Operations.Mathematiques.perimetre_cercle 5.0 in - let _ = Operations.Mathematiques.ete 20 in - let _ = Operations.Mathematiques.hiver 30 in - - let _ = Operations.Chaines.longueur "bonjour" in - let _ = Operations.Chaines.premiere_lettre "hello" in - let _ = Operations.Chaines.derniere_lettre "world" in - let _ = Operations.Chaines.resume "this is a very long string" in - - let _ = Francais.prenom in - let _ = Francais.age in - let _ = Francais.ville in - let _ = Francais.Numeros.zero in - let _ = Francais.Numeros.numero_prefere in - - let evt = Francais.Evenements.creer_evenement "Noel" 2024 "hiver" in - let _ = Francais.Evenements.annee_evenement evt in - let _ = Francais.Evenements.nom_evenement evt in - - (* Test French statistics functions *) - let donnees = [5.0; 2.0; 8.0; 1.0; 9.0; 3.0; 7.0] in - let _ = Mathematics.Statistiques.mediane donnees in - let _ = Mathematics.Statistiques.etendue donnees in - let (_q1, _q2, _q3) = Mathematics.Statistiques.quartiles donnees in - - (* Test French geometry functions *) - let _ = Mathematics.Geometrie.Cercle.perimetre 5.0 in - let _ = Mathematics.Geometrie.Cercle.aire 5.0 in - let _ = Mathematics.Geometrie.Cercle.diametre 5.0 in - - let _ = Mathematics.Geometrie.Triangle.perimetre 3.0 4.0 5.0 in - let _ = Mathematics.Geometrie.Triangle.aire 4.0 3.0 in - let _ = Mathematics.Geometrie.Triangle.est_equilateral 5.0 5.0 5.0 in - - let _ = Mathematics.Geometrie.Carre.perimetre 4.0 in - let _ = Mathematics.Geometrie.Carre.aire 4.0 in - let _ = Mathematics.Geometrie.Carre.diagonale 4.0 in - - (* Test French first-class functions *) - let additionneur = creer_additionneur 10 in - let _ = additionneur 5 in - - let multiplicateur = creer_multiplicateur 3 in - let _ = multiplicateur 7 in - - let _ = appliquer_repete 3 (fun x -> x * 2) 1 in - let _ = composer_fonctions (fun x -> x * 2) (fun x -> x + 1) 5 in - - let _ = transformer_paire (fun x -> x * x) (3, 4) in - let _ = filtrer_et_transformer (fun x -> x > 2) (fun x -> x * 2) [1; 2; 3; 4; 5] in - let _ = appliquer_a_tous (fun x -> x + 1) [1; 2; 3] in - let _ = reduire (+) 0 [1; 2; 3; 4; 5] in - - (* Test functors *) - let int_list = [5; 2; 8; 1; 9] in - let sorted_ints = IntSort.sort int_list in - - let str_list = ["zebra"; "apple"; "mango"; "banana"] in - let _sorted_strs = StringSort.sort str_list in - - (* Test IntSet functor *) - let set = IntSet.empty in - let set = IntSet.add 5 set in - let set = IntSet.add 2 set in - let set = IntSet.add 8 set in - let _ = IntSet.mem 5 set in - - (* Test first-class functions *) - let adder = make_adder 10 in - let _ = adder 5 in - - let multiplier = make_multiplier 3 in - let _ = multiplier 7 in - - let _ = apply_twice (fun x -> x + 1) 5 in - let _ = compose (fun x -> x * 2) (fun x -> x + 1) 5 in - - (* Test partially applied functions *) - let _ = add_five 10 in - let _ = double 7 in - let _ = triple 4 in - - let numbers = [1; 2; 3; 4; 5] in - let _ = fold_sum numbers in - let _ = fold_product numbers in - - let _ = map_square numbers in - let _ = filter_positive [-2; -1; 0; 1; 2] in - let _ = filter_even [1; 2; 3; 4; 5; 6] in - - (* Test anonymous functions *) - let _ = List.map (fun x -> x * x) numbers in - let _ = List.filter (fun x -> x > 3) numbers in - let _ = transform_list [1; 2; 3; 4; 5; 6; 7; 8] in - - let pairs = [(1, 2); (3, 4); (5, 6)] in - let _ = process_pairs pairs in - - let curried = nested_functions 1 in - let _ = curried 2 3 in - - (* Test combined example *) - let result = pipeline_example () in - - (* Final computation combining everything *) - let final_result = - sorted_ints - |> List.map (fun x -> x * 2) - |> List.filter (fun x -> x > 5) - |> List.fold_left (+) result - |> (+) tree_sum - in - - Printf.printf "Final result: %d\n" final_result; - - (* ========== Test Extended Indexing Operators ========== *) - - (* Test array indexing with .%() *) - let arr = [| 10; 20; 30; 40; 50 |] in - let open CustomIndexing in - let _ = arr.%(2) in - arr.%(1) <- 99; - let _ = arr.(1) in - - (* Test string indexing with .%[] *) - let str = "hello" in - let _ = str.%[0] in - let _ = str.%[0] <- 'H' in - - (* Test map indexing with .%{} *) - let map = [("a", 1); ("b", 2); ("c", 3)] in - let _ = map.%{"b"} in - let map2 = map.%{"d"} <- 4 in - let _ = map2.%{"d"} in - - (* Test circular buffer indexing with .@() *) - let cbuf = { data = [| 1; 2; 3; 4; 5 |]; size = 5 } in - let _ = cbuf.@(7) in (* wraps around to index 2 *) - let _ = cbuf.@(12) in (* wraps around to index 2 *) - - (* ========== Test Let Punning ========== *) - - (* Test basic record punning *) - let name = "Alice" in - let age = 30 in - let city = "Paris" in - let person = LetPunning.make_person name age city in - let _ = LetPunning.get_person_info person in - - (* Test coordinate punning *) - let x = 3.0 in - let y = 4.0 in - let z = 0.0 in - let coords = LetPunning.make_coords x y z in - let _ = LetPunning.distance_from_origin coords in - - (* Test nested record punning *) - let street = "Main St" in - let number = 123 in - let postal_code = "12345" in - let addr = LetPunning.make_address street number postal_code in - - let employee_id = 42 in - let emp = LetPunning.make_employee name employee_id addr in - let _ = LetPunning.process_employee emp in - - (* Test pattern matching with punning *) - let LetPunning.{ name = pname; age = page; city = _ } = person in - let _ = Printf.sprintf "%s is %d" pname page in - - (* ========== Test Monadic Bind (>>=) ========== *) - - (* Test Option monad *) - let opt_result = OptionOps.complex_calculation 100 5 3 in - let _ = match opt_result with - | Some v -> Printf.sprintf "Result: %f" v - | None -> "Failed" in - - let simple_opt = OptionOps.simple_calc 5 in - let _ = simple_opt in - - (* Test Option monad failure case *) - let opt_fail = OptionOps.safe_div 10 0 in - let _ = opt_fail in - - (* Test Result monad *) - let res_ok = ResultOps.parse_and_validate "42" in - let _ = match res_ok with - | Ok v -> Printf.sprintf "Validated: %d" v - | Error e -> e in - - let res_err = ResultOps.parse_and_validate "150" in - let _ = match res_err with - | Ok v -> Printf.sprintf "Value: %d" v - | Error e -> e in - - let res_parse_err = ResultOps.parse_and_validate "not-a-number" in - let _ = res_parse_err in - - (* Test List monad *) - let list_result = ListOps.computation in - let _ = List.length list_result in - - let cartesian = ListOps.cartesian_product [1; 2; 3] ['a'; 'b'] in - let _ = List.length cartesian in - - (* Test State monad *) - let (count_result, final_state) = StateOps.run_state StateOps.counter_computation 0 in - let _ = Printf.sprintf "Counts: (%d, %d), Final state: %d" - (fst count_result) (snd count_result) final_state in - - (* Test Writer monad *) - let (writer_result, log) = WriterOps.run_writer (WriterOps.computation 5 3) in - let _ = Printf.sprintf "Result: %d" writer_result in - let _ = String.concat "; " log in - - (* Test let* syntax *) - let monadic_opt = MonadicSyntax.Option.example 20 4 in - let _ = monadic_opt in - - let parallel_opt = MonadicSyntax.Option.parallel_example 1 2 3 in - let _ = parallel_opt in - - let monadic_result = MonadicSyntax.Result.parse_and_process "25" in - let _ = monadic_result in - - let monadic_list = MonadicSyntax.List.combinations in - let _ = List.length monadic_list in - - Printf.printf "All extended examples tested successfully!\n" diff --git a/tests/fixtures/imenu/demo.mli b/tests/fixtures/imenu/demo.mli deleted file mode 100644 index 6dd5bb2..0000000 --- a/tests/fixtures/imenu/demo.mli +++ /dev/null @@ -1,640 +0,0 @@ -(* ========== Polymorphic Variants ========== *) - -(* Simple polymorphic variant *) -type color = [ `Red | `Green | `Blue | `RGB of int * int * int ] - -(* Polymorphic variant with inheritance *) -type basic_color = [ `Red | `Green | `Blue ] -type extended_color = [ basic_color | `Yellow | `Orange ] - -(* Open polymorphic variant *) -val color_to_string : [> `Red | `Green | `Blue ] -> string - -(* Closed polymorphic variant *) -val string_to_color : string -> [< `Red | `Green | `Blue | `Unknown ] option - -(* ========== Class Types ========== *) - -(* Basic class type *) -class type point_type = object - method x : int - method y : int - method move : int -> int -> unit -end - -(* Class type with inheritance *) -class type shape_type = object - method area : float - method perimeter : float -end - -class type colored_shape_type = object - inherit shape_type - method color : color - method set_color : color -> unit -end - -(* Class type with instance variables *) -class type counter_type = object - val mutable count : int - method increment : unit - method get_count : int -end - -(* ========== Include Statements ========== *) - -(* Include a module signature *) -module type COMPARABLE = sig - type t - val compare : t -> t -> int -end - -module type PRINTABLE = sig - type t - val to_string : t -> string -end - -module type COMPARABLE_PRINTABLE = sig - include COMPARABLE - include PRINTABLE with type t := t -end - -(* Include with constraints *) -module type MAP_LIKE = sig - type key - type 'a t - val empty : 'a t - val add : key -> 'a -> 'a t -> 'a t - val find : key -> 'a t -> 'a option -end - -(* ========== Attributes and Extensions ========== *) - -(* Deprecated value *) -val old_function : int -> int [@@deprecated "Use new_function instead"] - -(* OCaml attribute *) -val inline_me : int -> int [@@inline] - -(* External with attributes *) -external get_time : unit -> float = "caml_sys_time" [@@noalloc] - -(* Type with attributes *) -type message = - | Info of string - | Warning of string [@warn_on_literal_pattern] - | Error of string - -(* Alert attribute *) -val experimental_feature : unit -> unit [@@alert experimental "This feature is experimental"] - -(* ========== Original Examples ========== *) - -module Positive : sig - type t = private int - - val make : int -> t - val to_int : t -> int - val add : t -> t -> t -end - -module Math : sig - val square : int -> int - val cube : int -> int - val double : int -> int - val half : int -> int - - module Constants : sig - val pi : float - val e : float - val golden_ratio : float - end -end - -module Stack : sig - type 'a t - - val empty : 'a t - val push : 'a -> 'a t -> 'a t - val pop : 'a t -> ('a * 'a t) option - val size : 'a t -> int -end - -module StringOps : sig - val uppercase : string -> string - val lowercase : string -> string - val reverse : string -> string - val concat_with : string -> string list -> string -end - -module Operations : sig - val creer : 'a -> 'a - val detruire : 'a -> unit - val repeter : int -> ('a -> 'a) -> 'a -> 'a - - module Mathematiques : sig - val carre : int -> int - val racine_carree : int -> float - val perimetre_cercle : float -> float - val ete : int -> int - val hiver : int -> int - end - - module Chaines : sig - val longueur : string -> int - val premiere_lettre : string -> char option - val derniere_lettre : string -> char option - val resume : string -> string - end -end - -module Francais : sig - val prenom : string - val age : int - val ville : string - - module Numeros : sig - val zero : int - val numero_un : int - val numero_prefere : int - val systeme_decimal : int - end - - module Evenements : sig - type evenement = { nom : string; annee : int; saison : string } - - val creer_evenement : string -> int -> string -> evenement - val annee_evenement : evenement -> int - val nom_evenement : evenement -> string - end -end - -module Collections : sig - module List : sig - module Ops : sig - val take : int -> 'a list -> 'a list - val drop : int -> 'a list -> 'a list - val split_at : int -> 'a list -> 'a list * 'a list - end - - module Fold : sig - val sum : int list -> int - val product : int list -> int - val max_elem : int list -> int - val min_elem : int list -> int - end - - module Transform : sig - val squares : int list -> int list - val cubes : int list -> int list - val doubles : int list -> int list - val increments : int list -> int list - end - end - - module Array : sig - module Create : sig - val range : int -> int -> int array - val constant : int -> 'a -> 'a array - val fibonacci : int -> int array - end - - module Stats : sig - val sum : int array -> int - val mean : int array -> float - val max : int array -> int - val min : int array -> int - end - end - - module Tree : sig - type 'a t = Leaf | Node of 'a * 'a t * 'a t - - module Build : sig - val leaf : 'a t - val node : 'a -> 'a t -> 'a t -> 'a t - val singleton : 'a -> 'a t - end - - module Ops : sig - val size : 'a t -> int - val height : 'a t -> int - val map : ('a -> 'b) -> 'a t -> 'b t - val fold : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a - end - end -end - -module DataStructures : sig - module Linear : sig - module Queue : sig - type 'a t = { front : 'a list; back : 'a list } - - val empty : 'a t - val enqueue : 'a -> 'a t -> 'a t - val dequeue : 'a t -> ('a * 'a t) option - val size : 'a t -> int - end - - module Deque : sig - type 'a t = 'a list * 'a list - - val empty : 'a list * 'b list - val push_front : 'a -> 'a list * 'b -> 'a list * 'b - val push_back : 'a -> 'b * 'a list -> 'b * 'a list - val pop_front : 'a list * 'a list -> ('a * ('a list * 'a list)) option - val pop_back : 'a list * 'a list -> ('a * ('a list * 'a list)) option - end - end - - module Associative : sig - module HashMap : sig - type ('k, 'v) t = ('k * 'v) list array - - val create : int -> 'a list array - val hash_function : 'a -> int -> int - val add : 'a -> 'b -> ('a * 'b) list array -> ('a * 'b) list array - val find : 'a -> ('a * 'b) list array -> 'b option - end - - module Trie : sig - type t = { is_end : bool; children : (char * t) list } - - val empty : t - val insert : char list -> t -> t - val search : char list -> t -> bool - end - end -end - -module Functional : sig - module Combinators : sig - val id : 'a -> 'a - val const : 'a -> 'b -> 'a - val flip : ('a -> 'b -> 'c) -> 'b -> 'a -> 'c - - module Compose : sig - val ( <| ) : ('a -> 'b) -> ('c -> 'a) -> 'c -> 'b - val ( |> ) : 'a -> ('a -> 'b) -> 'b - val ( >> ) : ('a -> 'b) -> ('b -> 'c) -> 'a -> 'c - val ( << ) : ('a -> 'b) -> ('c -> 'a) -> 'c -> 'b - end - end - - module Curry : sig - val curry : ('a * 'b -> 'c) -> 'a -> 'b -> 'c - val uncurry : ('a -> 'b -> 'c) -> 'a * 'b -> 'c - val curry3 : ('a * 'b * 'c -> 'd) -> 'a -> 'b -> 'c -> 'd - val uncurry3 : ('a -> 'b -> 'c -> 'd) -> 'a * 'b * 'c -> 'd - end - - module Partial : sig - val apply_first : ('a -> 'b -> 'c) -> 'a -> 'b -> 'c - val apply_second : ('a -> 'b -> 'c) -> 'b -> 'a -> 'c - val compose_left : ('a -> 'b) -> ('c -> 'a) -> 'c -> 'b - val compose_right : ('a -> 'b) -> ('b -> 'c) -> 'a -> 'c - end -end - -module Mathematics : sig - module Arithmetic : sig - module Basic : sig - val add : int -> int -> int - val sub : int -> int -> int - val mul : int -> int -> int - val div : int -> int -> int option - end - - module Advanced : sig - val gcd : int -> int -> int - val lcm : int -> int -> int - val factorial : int -> int - val fibonacci : int -> int - end - end - - module Algebra : sig - module Polynomial : sig - type t = float list - - val eval : float list -> float -> float - val add : float list -> float list -> float list - val scale : float -> float list -> float list - end - - module Matrix : sig - type t = float array array - - val create : int -> int -> 'a -> 'a array array - val get : 'a array array -> int -> int -> 'a - val set : 'a array array -> int -> int -> 'a -> unit - val dimensions : 'a array array -> int * int - end - end - - module Statistics : sig - module Descriptive : sig - val mean : float list -> float - val variance : float list -> float - val std_dev : float list -> float - end - - module Correlation : sig - val covariance : float list -> float list -> float - val correlation : float list -> float list -> float - end - end - - module Statistiques : sig - val mediane : float list -> float - val etendue : float list -> float - val quartiles : float list -> float * float * float - end - - module Geometrie : sig - module Cercle : sig - val perimetre : float -> float - val aire : float -> float - val diametre : float -> float - end - - module Triangle : sig - val perimetre : float -> float -> float -> float - val aire : float -> float -> float - val est_equilateral : 'a -> 'a -> 'a -> bool - end - - module Carre : sig - val perimetre : float -> float - val aire : float -> float - val diagonale : float -> float - end - end -end - -module type ORDERED = sig - type t - - val compare : t -> t -> int -end - -module type SORTABLE = sig - type elem - - val sort : elem list -> elem list -end - -module MakeSort : (Ord : ORDERED) -> sig - type elem = Ord.t - - val sort : elem list -> elem list -end - -module IntOrder : sig - type t = int - - val compare : 'a -> 'a -> int -end - -module StringOrder : sig - type t = string - - val compare : string -> string -> int -end - -module IntSort : sig - type elem = int - - val sort : elem list -> elem list -end - -module StringSort : sig - type elem = string - - val sort : elem list -> elem list -end - -module type COMPARABLE = sig - type t - - val compare : t -> t -> int - val to_string : t -> string -end - -module type SET = sig - type elem - type t - - val empty : t - val add : elem -> t -> t - val mem : elem -> t -> bool - val to_list : t -> elem list -end - -module MakeSet : (C : COMPARABLE) -> sig - type elem = C.t - type t - - val empty : t - val add : elem -> t -> t - val mem : elem -> t -> bool - val to_list : t -> elem list -end - -module IntComparable : sig - type t = int - - val compare : 'a -> 'a -> int - val to_string : int -> string -end - -module IntSet : sig - type elem = int - type t = MakeSet(IntComparable).t - - val empty : t - val add : elem -> t -> t - val mem : elem -> t -> bool - val to_list : t -> elem list -end - -val make_adder : int -> int -> int -val make_multiplier : int -> int -> int -val make_power : int -> int -> int -val apply_twice : ('a -> 'a) -> 'a -> 'a -val compose : ('a -> 'b) -> ('c -> 'a) -> 'c -> 'b -val apply_n_times : int -> ('a -> 'a) -> 'a -> 'a -val map_pair : ('a -> 'b) -> 'a * 'a -> 'b * 'b -val apply_to_list : ('a -> 'b) list -> 'a -> 'b list -val filter_and_map : ('a -> bool) -> ('a -> 'b) -> 'a list -> 'b list -val creer_additionneur : int -> int -> int -val creer_multiplicateur : int -> int -> int -val appliquer_repete : int -> ('a -> 'a) -> 'a -> 'a -val composer_fonctions : ('a -> 'b) -> ('c -> 'a) -> 'c -> 'b -val transformer_paire : ('a -> 'b) -> 'a * 'a -> 'b * 'b -val filtrer_et_transformer : ('a -> bool) -> ('a -> 'b) -> 'a list -> 'b list -val appliquer_a_tous : ('a -> 'b) -> 'a list -> 'b list -val reduire : ('a -> 'b -> 'a) -> 'a -> 'b list -> 'a -val add : int -> int -> int -val add_five : int -> int -val add_ten : int -> int -val multiply : int -> int -> int -val double : int -> int -val triple : int -> int -val quadruple : int -> int -val power : int -> int -> int -val square_via_power : int -> int -val cube_via_power : int -> int -val fold_sum : int list -> int -val fold_product : int list -> int -val fold_max : int list -> int -val map_square : int list -> int list -val map_double : int list -> int list -val map_negate : int list -> int list -val filter_positive : int list -> int list -val filter_even : int list -> int list -val filter_odd : int list -> int list -val math_ops : (int -> int) list -val transform_list : int list -> int list -val process_pairs : (int * int) list -> int list -val nested_functions : int -> int -> int -> int -val apply_op : string -> int -> int -> int - -module type MONAD = sig - type 'a t - - val return : 'a -> 'a t - val bind : 'a t -> ('a -> 'b t) -> 'b t -end - -module OptionMonad : sig - type 'a t = 'a option - - val return : 'a -> 'a t - val bind : 'a t -> ('a -> 'b t) -> 'b t -end - -module ListMonad : sig - type 'a t = 'a list - - val return : 'a -> 'a t - val bind : 'a t -> ('a -> 'b t) -> 'b t -end - -val pipeline_example : unit -> int - -module CustomIndexing : sig - type int_array = int array - - val ( .%() ) : 'a array -> int -> 'a - val ( .%()<- ) : 'a array -> int -> 'a -> unit - - type text = string - - val ( .%[] ) : string -> int -> char - val ( .%[]<- ) : string -> int -> char -> string - - type ('k, 'v) map = ('k * 'v) list - - val ( .%{} ) : ('a * 'b) list -> 'a -> 'b option - val ( .%{}<- ) : ('a * 'b) list -> 'a -> 'b -> ('a * 'b) list - - type 'a circular_buffer = { data : 'a array; size : int } - - val ( .@() ) : 'a circular_buffer -> int -> 'a -end - -module LetPunning : sig - type person = { name : string; age : int; city : string } - type coordinates = { x : float; y : float; z : float } - - val make_person : string -> int -> string -> person - val make_coords : float -> float -> float -> coordinates - val get_person_info : person -> string - val distance_from_origin : coordinates -> float - - type address = { street : string; number : int; postal_code : string } - type employee = { name : string; employee_id : int; address : address } - - val make_address : string -> int -> string -> address - val make_employee : string -> int -> address -> employee - val process_employee : employee -> string -end - -module OptionOps : sig - val ( >>= ) : 'a option -> ('a -> 'b option) -> 'b option - val ( >>| ) : 'a option -> ('a -> 'b) -> 'b option - val return : 'a -> 'a option - val safe_div : int -> int -> int option - val safe_sqrt : float -> float option - val safe_log : float -> float option - val complex_calculation : int -> int -> int -> float option - val simple_calc : int -> int option -end - -module ResultOps : sig - type ('a, 'e) result = ('a, 'e) result - - val ( >>= ) : ('a, 'b) result -> ('a -> ('c, 'b) result) -> ('c, 'b) result - val ( >>| ) : ('a, 'b) result -> ('a -> 'c) -> ('c, 'b) result - val return : 'a -> ('a, 'b) result - val parse_int : string -> (int, string) result - val validate_positive : int -> (int, string) result - val validate_range : int -> int -> int -> (int, string) result - val parse_and_validate : string -> (int, string) result -end - -module ListOps : sig - val ( >>= ) : 'a list -> ('a -> 'b list) -> 'b list - val ( >>| ) : 'a list -> ('a -> 'b) -> 'b list - val return : 'a -> 'a list - val choices : int list - val computation : (int * int * int) list - val cartesian_product : 'a list -> 'b list -> ('a * 'b) list -end - -module StateOps : sig - type ('s, 'a) state = 's -> 'a * 's - - val ( >>= ) : ('a -> 'b * 'c) -> ('b -> 'c -> 'd) -> 'a -> 'd - val return : 'a -> 'b -> 'a * 'b - val get : 'a -> 'a * 'a - val put : 'a -> 'b -> unit * 'a - val modify : ('a -> 'b) -> 'a -> unit * 'b - val run_state : ('a -> 'b) -> 'a -> 'b - val increment : int -> unit * int - val decrement : int -> unit * int - val get_count : 'a -> 'a * 'a - val counter_computation : int -> (int * int) * int -end - -module WriterOps : sig - type ('w, 'a) writer = 'a * 'w list - - val ( >>= ) : 'a * 'b list -> ('a -> 'c * 'b list) -> 'c * 'b list - val return : 'a -> 'a * 'b list - val tell : 'a -> unit * 'a list - val run_writer : 'a * 'b -> 'a * 'b - val logged_add : int -> int -> int * string list - val logged_multiply : int -> int -> int * string list - val computation : int -> int -> int * string list -end - -module MonadicSyntax : sig - module Option : sig - val ( let* ) : 'a option -> ('a -> 'b option) -> 'b option - val ( and* ) : 'a option -> 'b option -> ('a * 'b) option - val example : int -> int -> float option - val parallel_example : int -> int -> int -> int option - end - - module Result : sig - val ( let* ) : ('a, 'b) result -> ('a -> ('c, 'b) result) -> ('c, 'b) result - val parse_and_process : string -> (int, string) result - end - - module List : sig - val ( let* ) : 'a list -> ('a -> 'b list) -> 'b list - val combinations : (int * int) list - end -end diff --git a/tests/fixtures/imenu/ocaml-sample.ml b/tests/fixtures/imenu/ocaml-sample.ml deleted file mode 100644 index 2821570..0000000 --- a/tests/fixtures/imenu/ocaml-sample.ml +++ /dev/null @@ -1,22 +0,0 @@ -(* Test OCaml imenu *) - -let my_function x = x + 1 - -let another_value = 42 - -type my_type = - | Foo - | Bar of int - -module MyModule = struct - let inner_function y = y * 2 -end - -class my_class = - object - method get_value = 10 - end - -exception MyException of string - -external my_external : int -> int = "native_function" diff --git a/tests/fixtures/imenu/ocaml-sample.mli b/tests/fixtures/imenu/ocaml-sample.mli deleted file mode 100644 index a3d0c7d..0000000 --- a/tests/fixtures/imenu/ocaml-sample.mli +++ /dev/null @@ -1,26 +0,0 @@ -(* Test OCaml interface imenu *) - -val my_function : int -> int - -val another_value : int - -type my_type = - | Foo - | Bar of int - -module MyModule : sig - val inner_function : int -> int -end - -class my_class : - object - method get_value : int - end - -exception MyException of string - -module type MyModuleType = sig - type t - val operation : string -> string - val double : int -> int -end From 73e3796e1a1f3d32371b3e1d8875ee6ae898a4ff Mon Sep 17 00:00:00 2001 From: PizieDust Date: Wed, 1 Apr 2026 08:15:24 +0100 Subject: [PATCH 24/24] add authors --- README.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 9b8890e..d462f9b 100644 --- a/README.rst +++ b/README.rst @@ -111,7 +111,7 @@ Here is a list of the languages currently supported. +--------------------+--------------------------------------------------------------+--------------------+ |Go |go-mode, go-ts-mode |v0.20.0 | +--------------------+--------------------------------------------------------------+--------------------+ -|OCaml |caml-mode, tuareg-mode, neocaml-mode, neocaml-interface-mode |v0.24.2 | +|OCaml [2] |caml-mode, tuareg-mode, neocaml-mode, neocaml-interface-mode |v0.24.2 | +--------------------+--------------------------------------------------------------+--------------------+ @@ -129,6 +129,8 @@ Furthermore, Combobulate ships with a Magit-like transient UI that you can acces [1] Either use the version built into *Emacs 30*, or you can download my ``html-ts-mode`` `here `__, and read more about how to build your own tree-sitter major mode by reading `Let's Write a Tree-Sitter Major Mode `__. + [2] OCaml support written by `Pixie Dust `__, `Tim McGilchrist `__ & `Xavier Van de Woestyne `__. + Recent Changes / What's New ~~~~~~~~~~~~~~~~~~~~~~~~~~~