From c7239b2906abb48110e3d41a18e94810af8ab915 Mon Sep 17 00:00:00 2001 From: Mitja Felicijan Date: Thu, 22 Jan 2026 01:44:22 +0100 Subject: Add JavaScript grammar --- Makefile | 35 +- main.c | 6 + queries/javascript.h | 28 + queries/javascript.scm | 12 + tests.sh | 7 + tests/test.js | 23 + vendor/tree-sitter-javascript/LICENSE | 21 + vendor/tree-sitter-javascript/Makefile | 109 + vendor/tree-sitter-javascript/src/grammar.json | 6914 + vendor/tree-sitter-javascript/src/node-types.json | 3605 + vendor/tree-sitter-javascript/src/parser.c | 149972 ++++++++++++++++++ vendor/tree-sitter-javascript/src/scanner.c | 293 + .../tree-sitter-javascript/src/tree_sitter/alloc.h | 54 + .../tree-sitter-javascript/src/tree_sitter/array.h | 290 + .../src/tree_sitter/parser.h | 230 + 15 files changed, 161582 insertions(+), 17 deletions(-) create mode 100644 queries/javascript.h create mode 100644 queries/javascript.scm create mode 100644 tests/test.js create mode 100644 vendor/tree-sitter-javascript/LICENSE create mode 100644 vendor/tree-sitter-javascript/Makefile create mode 100644 vendor/tree-sitter-javascript/src/grammar.json create mode 100644 vendor/tree-sitter-javascript/src/node-types.json create mode 100644 vendor/tree-sitter-javascript/src/parser.c create mode 100644 vendor/tree-sitter-javascript/src/scanner.c create mode 100644 vendor/tree-sitter-javascript/src/tree_sitter/alloc.h create mode 100644 vendor/tree-sitter-javascript/src/tree_sitter/array.h create mode 100644 vendor/tree-sitter-javascript/src/tree_sitter/parser.h diff --git a/Makefile b/Makefile index 13267a0..22d5afc 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: all query ts-build ts-clean valgrind tests format clean +.PHONY: all query tsbuild valgrind tests format clean TARGET = crep SOURCES = $(wildcard *.c *.h) @@ -16,7 +16,7 @@ $(info LIBS: $(LIBS)) $(TARGET): $(CC) $(CFLAGS) $(SOURCES) $(LIBS) -o $(TARGET) $(TS_ALIBS) -all: ts-build query $(TARGET) +all: query tsbuild $(TARGET) query: xxd -i -n query_c queries/c.scm > queries/c.h @@ -24,22 +24,16 @@ query: xxd -i -n query_php queries/php.scm > queries/php.h xxd -i -n query_go queries/go.scm > queries/go.h xxd -i -n query_rust queries/rust.scm > queries/rust.h + xxd -i -n query_javascript queries/javascript.scm > queries/javascript.h -ts-build: - -cd vendor/tree-sitter && make -B - -cd vendor/tree-sitter-c && make -B - -cd vendor/tree-sitter-python && make -B - -cd vendor/tree-sitter-php && make -B - -cd vendor/tree-sitter-go && make -B - -cd vendor/tree-sitter-rust && make -B - -ts-clean: - -cd vendor/tree-sitter && make clean - -cd vendor/tree-sitter-c && make clean - -cd vendor/tree-sitter-python && make clean - -cd vendor/tree-sitter-php && make clean - -cd vendor/tree-sitter-go && make clean - -cd vendor/tree-sitter-rust && make clean +tsbuild: + -$(MAKE) -C vendor/tree-sitter -B + -$(MAKE) -C vendor/tree-sitter-c -B + -$(MAKE) -C vendor/tree-sitter-python -B + -$(MAKE) -C vendor/tree-sitter-php -B + -$(MAKE) -C vendor/tree-sitter-go -B + -$(MAKE) -C vendor/tree-sitter-rust -B + -$(MAKE) -C vendor/tree-sitter-javascript -B valgrind: valgrind -s --leak-check=full ./$(TARGET) @@ -52,3 +46,10 @@ format: clean: rm -f *.o $(TARGET) callgrind.out.* + $(MAKE) -C vendor/tree-sitter -B clean + $(MAKE) -C vendor/tree-sitter-c -B clean + $(MAKE) -C vendor/tree-sitter-python -B clean + $(MAKE) -C vendor/tree-sitter-php -B clean + $(MAKE) -C vendor/tree-sitter-go -B clean + $(MAKE) -C vendor/tree-sitter-rust -B clean + $(MAKE) -C vendor/tree-sitter-javascript -B clean diff --git a/main.c b/main.c index 85ffc55..3c8f58d 100644 --- a/main.c +++ b/main.c @@ -28,6 +28,7 @@ #include "queries/php.h" #include "queries/python.h" #include "queries/rust.h" +#include "queries/javascript.h" int debug_enabled = 0; @@ -36,6 +37,7 @@ TSLanguage *tree_sitter_go(void); TSLanguage *tree_sitter_python(void); TSLanguage *tree_sitter_php(void); TSLanguage *tree_sitter_rust(void); +TSLanguage *tree_sitter_javascript(void); typedef struct { const char *fname; @@ -258,6 +260,10 @@ int main(int argc, char *argv[]) { lang = tree_sitter_rust(); query_string = (const char *)query_rust; query_len = query_rust_len; + } else if (strcmp(extension, "js") == 0) { + lang = tree_sitter_javascript(); + query_string = (const char *)query_javascript; + query_len = query_javascript_len; } } diff --git a/queries/javascript.h b/queries/javascript.h new file mode 100644 index 0000000..81152e3 --- /dev/null +++ b/queries/javascript.h @@ -0,0 +1,28 @@ +unsigned char query_javascript[] = { + 0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, + 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x20, 0x20, + 0x22, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x20, 0x40, + 0x66, 0x74, 0x79, 0x70, 0x65, 0x0a, 0x20, 0x20, 0x6e, 0x61, 0x6d, 0x65, + 0x3a, 0x20, 0x28, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, + 0x72, 0x29, 0x20, 0x40, 0x66, 0x6e, 0x61, 0x6d, 0x65, 0x0a, 0x20, 0x20, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x3a, 0x20, + 0x28, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x5f, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x29, 0x20, 0x40, 0x66, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x29, 0x0a, 0x0a, 0x28, 0x6d, 0x65, 0x74, 0x68, + 0x6f, 0x64, 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x0a, 0x20, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3a, 0x20, 0x5b, 0x28, + 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x29, 0x20, 0x28, 0x69, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x29, 0x5d, 0x20, 0x40, + 0x66, 0x6e, 0x61, 0x6d, 0x65, 0x0a, 0x20, 0x20, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x3a, 0x20, 0x28, 0x66, 0x6f, 0x72, + 0x6d, 0x61, 0x6c, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, + 0x72, 0x73, 0x29, 0x20, 0x40, 0x66, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x29, 0x0a, 0x0a, 0x28, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x64, 0x65, + 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x20, 0x20, + 0x22, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x22, 0x20, 0x40, 0x66, 0x74, 0x79, + 0x70, 0x65, 0x0a, 0x20, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3a, 0x20, 0x28, + 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x29, 0x20, + 0x40, 0x66, 0x6e, 0x61, 0x6d, 0x65, 0x29, 0x0a +}; +unsigned int query_javascript_len = 296; diff --git a/queries/javascript.scm b/queries/javascript.scm new file mode 100644 index 0000000..fb0b755 --- /dev/null +++ b/queries/javascript.scm @@ -0,0 +1,12 @@ +(function_declaration + "function" @ftype + name: (identifier) @fname + parameters: (formal_parameters) @fparams) + +(method_definition + name: [(property_identifier) (identifier)] @fname + parameters: (formal_parameters) @fparams) + +(class_declaration + "class" @ftype + name: (identifier) @fname) diff --git a/tests.sh b/tests.sh index 25c02cf..09f4190 100644 --- a/tests.sh +++ b/tests.sh @@ -63,6 +63,13 @@ run_test "Go Struct" "Point" "$TEST_DIR/test.go" "type Point struct" run_test "Go Interface" "Describer" "$TEST_DIR/test.go" "type Describer interface" run_test "Go Const" "MaxValue" "$TEST_DIR/test.go" "const MaxValue" +# JavaScript Tests +run_test "JS Func" "hello" "$TEST_DIR/test.js" "function hello ()" +run_test "JS Params" "add" "$TEST_DIR/test.js" "function add (a, b)" +run_test "JS Class" "MyClass" "$TEST_DIR/test.js" "class MyClass" +run_test "JS Method" "myMethod" "$TEST_DIR/test.js" "myMethod (x)" +run_test "JS Object Method" "shortMethod" "$TEST_DIR/test.js" "shortMethod (a)" + echo "----------------" if [ $failed -eq 0 ]; then echo "All tests passed!" diff --git a/tests/test.js b/tests/test.js new file mode 100644 index 0000000..0bd4dc7 --- /dev/null +++ b/tests/test.js @@ -0,0 +1,23 @@ +function hello() { + console.log("Hello, World!"); +} + +function add(a, b) { + return a + b; +} + +class MyClass { + constructor() { + this.value = 42; + } + + myMethod(x) { + return x + this.value; + } +} + +const obj = { + shortMethod(a) { + return a; + } +}; diff --git a/vendor/tree-sitter-javascript/LICENSE b/vendor/tree-sitter-javascript/LICENSE new file mode 100644 index 0000000..4b52d19 --- /dev/null +++ b/vendor/tree-sitter-javascript/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Max Brunsfeld + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vendor/tree-sitter-javascript/Makefile b/vendor/tree-sitter-javascript/Makefile new file mode 100644 index 0000000..1371f81 --- /dev/null +++ b/vendor/tree-sitter-javascript/Makefile @@ -0,0 +1,109 @@ +VERSION := 0.19.0 + +# Repository +SRC_DIR := src + +PARSER_REPO_URL := $(shell git -C $(SRC_DIR) remote get-url origin ) +PARSER_NAME := javascript + +ifeq (, $(PARSER_URL)) + PARSER_URL := $(subst :,/,$(PARSER_REPO_URL)) + PARSER_URL := $(subst git@,https://,$(PARSER_URL)) + PARSER_URL := $(subst .git,,$(PARSER_URL)) +endif + +UPPER_PARSER_NAME := $(shell echo $(PARSER_NAME) | tr a-z A-Z ) + +# install directory layout +PREFIX ?= /usr/local +INCLUDEDIR ?= $(PREFIX)/include +LIBDIR ?= $(PREFIX)/lib +PCLIBDIR ?= $(LIBDIR)/pkgconfig + +# collect C++ sources, and link if necessary +CPPSRC := $(wildcard $(SRC_DIR)/*.cc) + +ifeq (, $(CPPSRC)) + ADDITIONALLIBS := +else + ADDITIONALLIBS := -lc++ +endif + +# collect sources +SRC := $(wildcard $(SRC_DIR)/*.c) +SRC += $(CPPSRC) +OBJ := $(addsuffix .o,$(basename $(SRC))) + +# ABI versioning +SONAME_MAJOR := 0 +SONAME_MINOR := 0 + +CFLAGS ?= -O3 -Wall -Wextra -I$(SRC_DIR) +CXXFLAGS ?= -O3 -Wall -Wextra -I$(SRC_DIR) +override CFLAGS += -std=gnu99 -fPIC +override CXXFLAGS += -fPIC + +# OS-specific bits +ifeq ($(shell uname),Darwin) + SOEXT = dylib + SOEXTVER_MAJOR = $(SONAME_MAJOR).dylib + SOEXTVER = $(SONAME_MAJOR).$(SONAME_MINOR).dylib + LINKSHARED := $(LINKSHARED)-dynamiclib -Wl, + ifneq ($(ADDITIONALLIBS),) + LINKSHARED := $(LINKSHARED)$(ADDITIONALLIBS), + endif + LINKSHARED := $(LINKSHARED)-install_name,$(LIBDIR)/libtree-sitter-$(PARSER_NAME).$(SONAME_MAJOR).dylib,-rpath,@executable_path/../Frameworks +else + SOEXT = so + SOEXTVER_MAJOR = so.$(SONAME_MAJOR) + SOEXTVER = so.$(SONAME_MAJOR).$(SONAME_MINOR) + LINKSHARED := $(LINKSHARED)-shared -Wl, + ifneq ($(ADDITIONALLIBS),) + LINKSHARED := $(LINKSHARED)$(ADDITIONALLIBS), + endif + LINKSHARED := $(LINKSHARED)-soname,libtree-sitter-$(PARSER_NAME).so.$(SONAME_MAJOR) +endif +ifneq (,$(filter $(shell uname),FreeBSD NetBSD DragonFly)) + PCLIBDIR := $(PREFIX)/libdata/pkgconfig +endif + +all: libtree-sitter-$(PARSER_NAME).a libtree-sitter-$(PARSER_NAME).$(SOEXTVER) bindings/c/$(PARSER_NAME).h bindings/c/tree-sitter-$(PARSER_NAME).pc + +libtree-sitter-$(PARSER_NAME).a: $(OBJ) + $(AR) rcs $@ $^ + +libtree-sitter-$(PARSER_NAME).$(SOEXTVER): $(OBJ) + $(CC) $(LDFLAGS) $(LINKSHARED) $^ $(LDLIBS) -o $@ + ln -sf $@ libtree-sitter-$(PARSER_NAME).$(SOEXT) + ln -sf $@ libtree-sitter-$(PARSER_NAME).$(SOEXTVER_MAJOR) + +bindings/c/$(PARSER_NAME).h: + sed -e 's|@UPPER_PARSERNAME@|$(UPPER_PARSER_NAME)|' \ + -e 's|@PARSERNAME@|$(PARSER_NAME)|' \ + bindings/c/tree-sitter.h.in > $@ + +bindings/c/tree-sitter-$(PARSER_NAME).pc: + sed -e 's|@LIBDIR@|$(LIBDIR)|;s|@INCLUDEDIR@|$(INCLUDEDIR)|;s|@VERSION@|$(VERSION)|' \ + -e 's|=$(PREFIX)|=$${prefix}|' \ + -e 's|@PREFIX@|$(PREFIX)|' \ + -e 's|@ADDITIONALLIBS@|$(ADDITIONALLIBS)|' \ + -e 's|@PARSERNAME@|$(PARSER_NAME)|' \ + -e 's|@PARSERURL@|$(PARSER_URL)|' \ + bindings/c/tree-sitter.pc.in > $@ + +install: all + install -d '$(DESTDIR)$(LIBDIR)' + install -m755 libtree-sitter-$(PARSER_NAME).a '$(DESTDIR)$(LIBDIR)'/libtree-sitter-$(PARSER_NAME).a + install -m755 libtree-sitter-$(PARSER_NAME).$(SOEXTVER) '$(DESTDIR)$(LIBDIR)'/libtree-sitter-$(PARSER_NAME).$(SOEXTVER) + ln -sf libtree-sitter-$(PARSER_NAME).$(SOEXTVER) '$(DESTDIR)$(LIBDIR)'/libtree-sitter-$(PARSER_NAME).$(SOEXTVER_MAJOR) + ln -sf libtree-sitter-$(PARSER_NAME).$(SOEXTVER) '$(DESTDIR)$(LIBDIR)'/libtree-sitter-$(PARSER_NAME).$(SOEXT) + install -d '$(DESTDIR)$(INCLUDEDIR)'/tree_sitter + install -m644 bindings/c/$(PARSER_NAME).h '$(DESTDIR)$(INCLUDEDIR)'/tree_sitter/ + install -d '$(DESTDIR)$(PCLIBDIR)' + install -m644 bindings/c/tree-sitter-$(PARSER_NAME).pc '$(DESTDIR)$(PCLIBDIR)'/ + +clean: + rm -f $(OBJ) libtree-sitter-$(PARSER_NAME).a libtree-sitter-$(PARSER_NAME).$(SOEXT) libtree-sitter-$(PARSER_NAME).$(SOEXTVER_MAJOR) libtree-sitter-$(PARSER_NAME).$(SOEXTVER) + rm -f bindings/c/$(PARSER_NAME).h bindings/c/tree-sitter-$(PARSER_NAME).pc + +.PHONY: all install clean diff --git a/vendor/tree-sitter-javascript/src/grammar.json b/vendor/tree-sitter-javascript/src/grammar.json new file mode 100644 index 0000000..7168bb4 --- /dev/null +++ b/vendor/tree-sitter-javascript/src/grammar.json @@ -0,0 +1,6914 @@ +{ + "name": "javascript", + "word": "identifier", + "rules": { + "program": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "hash_bang_line" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "statement" + } + } + ] + }, + "hash_bang_line": { + "type": "PATTERN", + "value": "#!.*" + }, + "export_statement": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "export" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "*" + }, + { + "type": "SYMBOL", + "name": "_from_clause" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "namespace_export" + }, + { + "type": "SYMBOL", + "name": "_from_clause" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "export_clause" + }, + { + "type": "SYMBOL", + "name": "_from_clause" + } + ] + }, + { + "type": "SYMBOL", + "name": "export_clause" + } + ] + }, + { + "type": "SYMBOL", + "name": "_semicolon" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "REPEAT", + "content": { + "type": "FIELD", + "name": "decorator", + "content": { + "type": "SYMBOL", + "name": "decorator" + } + } + }, + { + "type": "STRING", + "value": "export" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "FIELD", + "name": "declaration", + "content": { + "type": "SYMBOL", + "name": "declaration" + } + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "default" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "FIELD", + "name": "declaration", + "content": { + "type": "SYMBOL", + "name": "declaration" + } + }, + { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "value", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "SYMBOL", + "name": "_semicolon" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + "namespace_export": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "*" + }, + { + "type": "STRING", + "value": "as" + }, + { + "type": "SYMBOL", + "name": "_module_export_name" + } + ] + }, + "export_clause": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "export_specifier" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "export_specifier" + } + ] + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "export_specifier": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "_module_export_name" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "as" + }, + { + "type": "FIELD", + "name": "alias", + "content": { + "type": "SYMBOL", + "name": "_module_export_name" + } + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "_module_export_name": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "SYMBOL", + "name": "string" + } + ] + }, + "declaration": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "function_declaration" + }, + { + "type": "SYMBOL", + "name": "generator_function_declaration" + }, + { + "type": "SYMBOL", + "name": "class_declaration" + }, + { + "type": "SYMBOL", + "name": "lexical_declaration" + }, + { + "type": "SYMBOL", + "name": "variable_declaration" + } + ] + }, + "import": { + "type": "TOKEN", + "content": { + "type": "STRING", + "value": "import" + } + }, + "import_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "import" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "import_clause" + }, + { + "type": "SYMBOL", + "name": "_from_clause" + } + ] + }, + { + "type": "FIELD", + "name": "source", + "content": { + "type": "SYMBOL", + "name": "string" + } + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "import_attribute" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_semicolon" + } + ] + }, + "import_clause": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "namespace_import" + }, + { + "type": "SYMBOL", + "name": "named_imports" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "namespace_import" + }, + { + "type": "SYMBOL", + "name": "named_imports" + } + ] + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + } + ] + }, + "_from_clause": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "from" + }, + { + "type": "FIELD", + "name": "source", + "content": { + "type": "SYMBOL", + "name": "string" + } + } + ] + }, + "namespace_import": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "*" + }, + { + "type": "STRING", + "value": "as" + }, + { + "type": "SYMBOL", + "name": "identifier" + } + ] + }, + "named_imports": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "import_specifier" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "import_specifier" + } + ] + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "import_specifier": { + "type": "CHOICE", + "members": [ + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + }, + { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "_module_export_name" + } + }, + { + "type": "STRING", + "value": "as" + }, + { + "type": "FIELD", + "name": "alias", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + } + ] + } + ] + }, + "import_attribute": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "with" + }, + { + "type": "SYMBOL", + "name": "object" + } + ] + }, + "statement": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "export_statement" + }, + { + "type": "SYMBOL", + "name": "import_statement" + }, + { + "type": "SYMBOL", + "name": "debugger_statement" + }, + { + "type": "SYMBOL", + "name": "expression_statement" + }, + { + "type": "SYMBOL", + "name": "declaration" + }, + { + "type": "SYMBOL", + "name": "statement_block" + }, + { + "type": "SYMBOL", + "name": "if_statement" + }, + { + "type": "SYMBOL", + "name": "switch_statement" + }, + { + "type": "SYMBOL", + "name": "for_statement" + }, + { + "type": "SYMBOL", + "name": "for_in_statement" + }, + { + "type": "SYMBOL", + "name": "while_statement" + }, + { + "type": "SYMBOL", + "name": "do_statement" + }, + { + "type": "SYMBOL", + "name": "try_statement" + }, + { + "type": "SYMBOL", + "name": "with_statement" + }, + { + "type": "SYMBOL", + "name": "break_statement" + }, + { + "type": "SYMBOL", + "name": "continue_statement" + }, + { + "type": "SYMBOL", + "name": "return_statement" + }, + { + "type": "SYMBOL", + "name": "throw_statement" + }, + { + "type": "SYMBOL", + "name": "empty_statement" + }, + { + "type": "SYMBOL", + "name": "labeled_statement" + } + ] + }, + "expression_statement": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_expressions" + }, + { + "type": "SYMBOL", + "name": "_semicolon" + } + ] + }, + "variable_declaration": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "var" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "variable_declarator" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "variable_declarator" + } + ] + } + } + ] + }, + { + "type": "SYMBOL", + "name": "_semicolon" + } + ] + }, + "lexical_declaration": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "kind", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "let" + }, + { + "type": "STRING", + "value": "const" + } + ] + } + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "variable_declarator" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "variable_declarator" + } + ] + } + } + ] + }, + { + "type": "SYMBOL", + "name": "_semicolon" + } + ] + }, + "variable_declarator": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "name", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "SYMBOL", + "name": "_destructuring_pattern" + } + ] + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_initializer" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "statement_block": { + "type": "PREC_RIGHT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "statement" + } + }, + { + "type": "STRING", + "value": "}" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_automatic_semicolon" + }, + { + "type": "BLANK" + } + ] + } + ] + } + }, + "else_clause": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "else" + }, + { + "type": "SYMBOL", + "name": "statement" + } + ] + }, + "if_statement": { + "type": "PREC_RIGHT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "if" + }, + { + "type": "FIELD", + "name": "condition", + "content": { + "type": "SYMBOL", + "name": "parenthesized_expression" + } + }, + { + "type": "FIELD", + "name": "consequence", + "content": { + "type": "SYMBOL", + "name": "statement" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "FIELD", + "name": "alternative", + "content": { + "type": "SYMBOL", + "name": "else_clause" + } + }, + { + "type": "BLANK" + } + ] + } + ] + } + }, + "switch_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "switch" + }, + { + "type": "FIELD", + "name": "value", + "content": { + "type": "SYMBOL", + "name": "parenthesized_expression" + } + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "switch_body" + } + } + ] + }, + "for_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "for" + }, + { + "type": "STRING", + "value": "(" + }, + { + "type": "FIELD", + "name": "initializer", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "lexical_declaration" + }, + { + "type": "SYMBOL", + "name": "variable_declaration" + }, + { + "type": "SYMBOL", + "name": "expression_statement" + }, + { + "type": "SYMBOL", + "name": "empty_statement" + } + ] + } + }, + { + "type": "FIELD", + "name": "condition", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "expression_statement" + }, + { + "type": "SYMBOL", + "name": "empty_statement" + } + ] + } + }, + { + "type": "FIELD", + "name": "increment", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_expressions" + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "STRING", + "value": ")" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "statement" + } + } + ] + }, + "for_in_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "for" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "await" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_for_header" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "statement" + } + } + ] + }, + "_for_header": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_lhs_expression" + }, + { + "type": "SYMBOL", + "name": "parenthesized_expression" + } + ] + } + }, + { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "kind", + "content": { + "type": "STRING", + "value": "var" + } + }, + { + "type": "FIELD", + "name": "left", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "SYMBOL", + "name": "_destructuring_pattern" + } + ] + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_initializer" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "kind", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "let" + }, + { + "type": "STRING", + "value": "const" + } + ] + } + }, + { + "type": "FIELD", + "name": "left", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "SYMBOL", + "name": "_destructuring_pattern" + } + ] + } + } + ] + } + ] + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "in" + }, + { + "type": "STRING", + "value": "of" + } + ] + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "_expressions" + } + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "while_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "while" + }, + { + "type": "FIELD", + "name": "condition", + "content": { + "type": "SYMBOL", + "name": "parenthesized_expression" + } + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "statement" + } + } + ] + }, + "do_statement": { + "type": "PREC_RIGHT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "do" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "statement" + } + }, + { + "type": "STRING", + "value": "while" + }, + { + "type": "FIELD", + "name": "condition", + "content": { + "type": "SYMBOL", + "name": "parenthesized_expression" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_semicolon" + }, + { + "type": "BLANK" + } + ] + } + ] + } + }, + "try_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "try" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "statement_block" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "FIELD", + "name": "handler", + "content": { + "type": "SYMBOL", + "name": "catch_clause" + } + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "FIELD", + "name": "finalizer", + "content": { + "type": "SYMBOL", + "name": "finally_clause" + } + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "with_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "with" + }, + { + "type": "FIELD", + "name": "object", + "content": { + "type": "SYMBOL", + "name": "parenthesized_expression" + } + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "statement" + } + } + ] + }, + "break_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "break" + }, + { + "type": "FIELD", + "name": "label", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "identifier" + }, + "named": true, + "value": "statement_identifier" + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "SYMBOL", + "name": "_semicolon" + } + ] + }, + "continue_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "continue" + }, + { + "type": "FIELD", + "name": "label", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "identifier" + }, + "named": true, + "value": "statement_identifier" + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "SYMBOL", + "name": "_semicolon" + } + ] + }, + "debugger_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "debugger" + }, + { + "type": "SYMBOL", + "name": "_semicolon" + } + ] + }, + "return_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "return" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_expressions" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "_semicolon" + } + ] + }, + "throw_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "throw" + }, + { + "type": "SYMBOL", + "name": "_expressions" + }, + { + "type": "SYMBOL", + "name": "_semicolon" + } + ] + }, + "empty_statement": { + "type": "STRING", + "value": ";" + }, + "labeled_statement": { + "type": "PREC_DYNAMIC", + "value": -1, + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "label", + "content": { + "type": "ALIAS", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "SYMBOL", + "name": "_reserved_identifier" + } + ] + }, + "named": true, + "value": "statement_identifier" + } + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "statement" + } + } + ] + } + }, + "switch_body": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "REPEAT", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "switch_case" + }, + { + "type": "SYMBOL", + "name": "switch_default" + } + ] + } + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "switch_case": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "case" + }, + { + "type": "FIELD", + "name": "value", + "content": { + "type": "SYMBOL", + "name": "_expressions" + } + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "statement" + } + } + } + ] + }, + "switch_default": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "default" + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "statement" + } + } + } + ] + }, + "catch_clause": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "catch" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "FIELD", + "name": "parameter", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "SYMBOL", + "name": "_destructuring_pattern" + } + ] + } + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "statement_block" + } + } + ] + }, + "finally_clause": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "finally" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "statement_block" + } + } + ] + }, + "parenthesized_expression": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SYMBOL", + "name": "_expressions" + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "_expressions": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "SYMBOL", + "name": "sequence_expression" + } + ] + }, + "expression": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "primary_expression" + }, + { + "type": "SYMBOL", + "name": "glimmer_template" + }, + { + "type": "SYMBOL", + "name": "_jsx_element" + }, + { + "type": "SYMBOL", + "name": "assignment_expression" + }, + { + "type": "SYMBOL", + "name": "augmented_assignment_expression" + }, + { + "type": "SYMBOL", + "name": "await_expression" + }, + { + "type": "SYMBOL", + "name": "unary_expression" + }, + { + "type": "SYMBOL", + "name": "binary_expression" + }, + { + "type": "SYMBOL", + "name": "ternary_expression" + }, + { + "type": "SYMBOL", + "name": "update_expression" + }, + { + "type": "SYMBOL", + "name": "new_expression" + }, + { + "type": "SYMBOL", + "name": "yield_expression" + } + ] + }, + "primary_expression": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "subscript_expression" + }, + { + "type": "SYMBOL", + "name": "member_expression" + }, + { + "type": "SYMBOL", + "name": "parenthesized_expression" + }, + { + "type": "SYMBOL", + "name": "_identifier" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_reserved_identifier" + }, + "named": true, + "value": "identifier" + }, + { + "type": "SYMBOL", + "name": "this" + }, + { + "type": "SYMBOL", + "name": "super" + }, + { + "type": "SYMBOL", + "name": "number" + }, + { + "type": "SYMBOL", + "name": "string" + }, + { + "type": "SYMBOL", + "name": "template_string" + }, + { + "type": "SYMBOL", + "name": "regex" + }, + { + "type": "SYMBOL", + "name": "true" + }, + { + "type": "SYMBOL", + "name": "false" + }, + { + "type": "SYMBOL", + "name": "null" + }, + { + "type": "SYMBOL", + "name": "object" + }, + { + "type": "SYMBOL", + "name": "array" + }, + { + "type": "SYMBOL", + "name": "function_expression" + }, + { + "type": "SYMBOL", + "name": "arrow_function" + }, + { + "type": "SYMBOL", + "name": "generator_function" + }, + { + "type": "SYMBOL", + "name": "class" + }, + { + "type": "SYMBOL", + "name": "meta_property" + }, + { + "type": "SYMBOL", + "name": "call_expression" + } + ] + }, + "yield_expression": { + "type": "PREC_RIGHT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "yield" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "*" + }, + { + "type": "SYMBOL", + "name": "expression" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "BLANK" + } + ] + } + ] + } + ] + } + }, + "object": { + "type": "PREC", + "value": "object", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "pair" + }, + { + "type": "SYMBOL", + "name": "spread_element" + }, + { + "type": "SYMBOL", + "name": "method_definition" + }, + { + "type": "ALIAS", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "SYMBOL", + "name": "_reserved_identifier" + } + ] + }, + "named": true, + "value": "shorthand_property_identifier" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "pair" + }, + { + "type": "SYMBOL", + "name": "spread_element" + }, + { + "type": "SYMBOL", + "name": "method_definition" + }, + { + "type": "ALIAS", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "SYMBOL", + "name": "_reserved_identifier" + } + ] + }, + "named": true, + "value": "shorthand_property_identifier" + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "}" + } + ] + } + }, + "object_pattern": { + "type": "PREC", + "value": "object", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "pair_pattern" + }, + { + "type": "SYMBOL", + "name": "rest_pattern" + }, + { + "type": "SYMBOL", + "name": "object_assignment_pattern" + }, + { + "type": "ALIAS", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "SYMBOL", + "name": "_reserved_identifier" + } + ] + }, + "named": true, + "value": "shorthand_property_identifier_pattern" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "pair_pattern" + }, + { + "type": "SYMBOL", + "name": "rest_pattern" + }, + { + "type": "SYMBOL", + "name": "object_assignment_pattern" + }, + { + "type": "ALIAS", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "SYMBOL", + "name": "_reserved_identifier" + } + ] + }, + "named": true, + "value": "shorthand_property_identifier_pattern" + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "}" + } + ] + } + }, + "assignment_pattern": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "pattern" + } + }, + { + "type": "STRING", + "value": "=" + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + }, + "object_assignment_pattern": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_reserved_identifier" + }, + { + "type": "SYMBOL", + "name": "identifier" + } + ] + }, + "named": true, + "value": "shorthand_property_identifier_pattern" + }, + { + "type": "SYMBOL", + "name": "_destructuring_pattern" + } + ] + } + }, + { + "type": "STRING", + "value": "=" + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + }, + "array": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "SYMBOL", + "name": "spread_element" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "SYMBOL", + "name": "spread_element" + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "]" + } + ] + }, + "array_pattern": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "pattern" + }, + { + "type": "SYMBOL", + "name": "assignment_pattern" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "pattern" + }, + { + "type": "SYMBOL", + "name": "assignment_pattern" + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "]" + } + ] + }, + "glimmer_template": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "open_tag", + "content": { + "type": "SYMBOL", + "name": "glimmer_opening_tag" + } + }, + { + "type": "FIELD", + "name": "content", + "content": { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_glimmer_template_content" + } + } + }, + { + "type": "FIELD", + "name": "close_tag", + "content": { + "type": "SYMBOL", + "name": "glimmer_closing_tag" + } + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "open_tag", + "content": { + "type": "SYMBOL", + "name": "glimmer_opening_tag" + } + }, + { + "type": "FIELD", + "name": "close_tag", + "content": { + "type": "SYMBOL", + "name": "glimmer_closing_tag" + } + } + ] + } + ] + }, + "_glimmer_template_content": { + "type": "PATTERN", + "value": ".{1,}" + }, + "glimmer_opening_tag": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "" + } + ] + }, + "_jsx_element": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "jsx_element" + }, + { + "type": "SYMBOL", + "name": "jsx_self_closing_element" + } + ] + }, + "jsx_element": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "open_tag", + "content": { + "type": "SYMBOL", + "name": "jsx_opening_element" + } + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_jsx_child" + } + }, + { + "type": "FIELD", + "name": "close_tag", + "content": { + "type": "SYMBOL", + "name": "jsx_closing_element" + } + } + ] + }, + "jsx_text": { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "[^{}<>\\n& ]([^{}<>\\n&]*[^{}<>\\n& ])?" + }, + { + "type": "PATTERN", + "value": "\\/\\/[^\\n]*" + } + ] + }, + "html_character_reference": { + "type": "PATTERN", + "value": "&(#([xX][0-9a-fA-F]{1,6}|[0-9]{1,5})|[A-Za-z]{1,30});" + }, + "jsx_expression": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "SYMBOL", + "name": "sequence_expression" + }, + { + "type": "SYMBOL", + "name": "spread_element" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "_jsx_child": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "jsx_text" + }, + { + "type": "SYMBOL", + "name": "html_character_reference" + }, + { + "type": "SYMBOL", + "name": "_jsx_element" + }, + { + "type": "SYMBOL", + "name": "jsx_expression" + } + ] + }, + "jsx_opening_element": { + "type": "PREC_DYNAMIC", + "value": -1, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "<" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "_jsx_element_name" + } + }, + { + "type": "REPEAT", + "content": { + "type": "FIELD", + "name": "attribute", + "content": { + "type": "SYMBOL", + "name": "_jsx_attribute" + } + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ">" + } + ] + } + }, + "jsx_identifier": { + "type": "PATTERN", + "value": "[a-zA-Z_$][a-zA-Z\\d_$]*-[a-zA-Z\\d_$\\-]*" + }, + "_jsx_identifier": { + "type": "CHOICE", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "jsx_identifier" + }, + "named": true, + "value": "identifier" + }, + { + "type": "SYMBOL", + "name": "identifier" + } + ] + }, + "nested_identifier": { + "type": "PREC", + "value": "member", + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "object", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "nested_identifier" + }, + "named": true, + "value": "member_expression" + } + ] + } + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "FIELD", + "name": "property", + "content": { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "identifier" + }, + "named": true, + "value": "property_identifier" + } + } + ] + } + }, + "jsx_namespace_name": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_jsx_identifier" + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "SYMBOL", + "name": "_jsx_identifier" + } + ] + }, + "_jsx_element_name": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_jsx_identifier" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "nested_identifier" + }, + "named": true, + "value": "member_expression" + }, + { + "type": "SYMBOL", + "name": "jsx_namespace_name" + } + ] + }, + "jsx_closing_element": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "" + } + ] + }, + "jsx_self_closing_element": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "<" + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "_jsx_element_name" + } + }, + { + "type": "REPEAT", + "content": { + "type": "FIELD", + "name": "attribute", + "content": { + "type": "SYMBOL", + "name": "_jsx_attribute" + } + } + }, + { + "type": "STRING", + "value": "/>" + } + ] + }, + "_jsx_attribute": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "jsx_attribute" + }, + { + "type": "SYMBOL", + "name": "jsx_expression" + } + ] + }, + "_jsx_attribute_name": { + "type": "CHOICE", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_jsx_identifier" + }, + "named": true, + "value": "property_identifier" + }, + { + "type": "SYMBOL", + "name": "jsx_namespace_name" + } + ] + }, + "jsx_attribute": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_jsx_attribute_name" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "=" + }, + { + "type": "SYMBOL", + "name": "_jsx_attribute_value" + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "_jsx_string": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "\"" + }, + { + "type": "REPEAT", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "unescaped_double_jsx_string_fragment" + }, + "named": true, + "value": "string_fragment" + }, + { + "type": "SYMBOL", + "name": "html_character_reference" + } + ] + } + }, + { + "type": "STRING", + "value": "\"" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "'" + }, + { + "type": "REPEAT", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "unescaped_single_jsx_string_fragment" + }, + "named": true, + "value": "string_fragment" + }, + { + "type": "SYMBOL", + "name": "html_character_reference" + } + ] + } + }, + { + "type": "STRING", + "value": "'" + } + ] + } + ] + }, + "unescaped_double_jsx_string_fragment": { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "PREC", + "value": 1, + "content": { + "type": "PATTERN", + "value": "([^\"&]|&[^#A-Za-z])+" + } + } + }, + "unescaped_single_jsx_string_fragment": { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "PREC", + "value": 1, + "content": { + "type": "PATTERN", + "value": "([^'&]|&[^#A-Za-z])+" + } + } + }, + "_jsx_attribute_value": { + "type": "CHOICE", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_jsx_string" + }, + "named": true, + "value": "string" + }, + { + "type": "SYMBOL", + "name": "jsx_expression" + }, + { + "type": "SYMBOL", + "name": "_jsx_element" + } + ] + }, + "class": { + "type": "PREC", + "value": "literal", + "content": { + "type": "SEQ", + "members": [ + { + "type": "REPEAT", + "content": { + "type": "FIELD", + "name": "decorator", + "content": { + "type": "SYMBOL", + "name": "decorator" + } + } + }, + { + "type": "STRING", + "value": "class" + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "class_heritage" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "class_body" + } + } + ] + } + }, + "class_declaration": { + "type": "PREC", + "value": "declaration", + "content": { + "type": "SEQ", + "members": [ + { + "type": "REPEAT", + "content": { + "type": "FIELD", + "name": "decorator", + "content": { + "type": "SYMBOL", + "name": "decorator" + } + } + }, + { + "type": "STRING", + "value": "class" + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "class_heritage" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "class_body" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_automatic_semicolon" + }, + { + "type": "BLANK" + } + ] + } + ] + } + }, + "class_heritage": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "extends" + }, + { + "type": "SYMBOL", + "name": "expression" + } + ] + }, + "function_expression": { + "type": "PREC", + "value": "literal", + "content": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "async" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "function" + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "SYMBOL", + "name": "_call_signature" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "statement_block" + } + } + ] + } + }, + "function_declaration": { + "type": "PREC_RIGHT", + "value": "declaration", + "content": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "async" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "function" + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + }, + { + "type": "SYMBOL", + "name": "_call_signature" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "statement_block" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_automatic_semicolon" + }, + { + "type": "BLANK" + } + ] + } + ] + } + }, + "generator_function": { + "type": "PREC", + "value": "literal", + "content": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "async" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "function" + }, + { + "type": "STRING", + "value": "*" + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "BLANK" + } + ] + } + }, + { + "type": "SYMBOL", + "name": "_call_signature" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "statement_block" + } + } + ] + } + }, + "generator_function_declaration": { + "type": "PREC_RIGHT", + "value": "declaration", + "content": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "async" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "function" + }, + { + "type": "STRING", + "value": "*" + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "identifier" + } + }, + { + "type": "SYMBOL", + "name": "_call_signature" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "statement_block" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_automatic_semicolon" + }, + { + "type": "BLANK" + } + ] + } + ] + } + }, + "arrow_function": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "async" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "FIELD", + "name": "parameter", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_reserved_identifier" + }, + "named": true, + "value": "identifier" + }, + { + "type": "SYMBOL", + "name": "identifier" + } + ] + } + }, + { + "type": "SYMBOL", + "name": "_call_signature" + } + ] + }, + { + "type": "STRING", + "value": "=>" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "SYMBOL", + "name": "statement_block" + } + ] + } + } + ] + }, + "_call_signature": { + "type": "FIELD", + "name": "parameters", + "content": { + "type": "SYMBOL", + "name": "formal_parameters" + } + }, + "_formal_parameter": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "pattern" + }, + { + "type": "SYMBOL", + "name": "assignment_pattern" + } + ] + }, + "optional_chain": { + "type": "STRING", + "value": "?." + }, + "call_expression": { + "type": "CHOICE", + "members": [ + { + "type": "PREC", + "value": "call", + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "function", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "SYMBOL", + "name": "import" + } + ] + } + }, + { + "type": "FIELD", + "name": "arguments", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "arguments" + }, + { + "type": "SYMBOL", + "name": "template_string" + } + ] + } + } + ] + } + }, + { + "type": "PREC", + "value": "member", + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "function", + "content": { + "type": "SYMBOL", + "name": "primary_expression" + } + }, + { + "type": "FIELD", + "name": "optional_chain", + "content": { + "type": "SYMBOL", + "name": "optional_chain" + } + }, + { + "type": "FIELD", + "name": "arguments", + "content": { + "type": "SYMBOL", + "name": "arguments" + } + } + ] + } + } + ] + }, + "new_expression": { + "type": "PREC_RIGHT", + "value": "new", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "new" + }, + { + "type": "FIELD", + "name": "constructor", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "primary_expression" + }, + { + "type": "SYMBOL", + "name": "new_expression" + } + ] + } + }, + { + "type": "FIELD", + "name": "arguments", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "PREC_DYNAMIC", + "value": 1, + "content": { + "type": "SYMBOL", + "name": "arguments" + } + }, + { + "type": "BLANK" + } + ] + } + } + ] + } + }, + "await_expression": { + "type": "PREC", + "value": "unary_void", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "await" + }, + { + "type": "SYMBOL", + "name": "expression" + } + ] + } + }, + "member_expression": { + "type": "PREC", + "value": "member", + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "object", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "SYMBOL", + "name": "primary_expression" + }, + { + "type": "SYMBOL", + "name": "import" + } + ] + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "." + }, + { + "type": "FIELD", + "name": "optional_chain", + "content": { + "type": "SYMBOL", + "name": "optional_chain" + } + } + ] + }, + { + "type": "FIELD", + "name": "property", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "private_property_identifier" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "identifier" + }, + "named": true, + "value": "property_identifier" + } + ] + } + } + ] + } + }, + "subscript_expression": { + "type": "PREC_RIGHT", + "value": "member", + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "object", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "SYMBOL", + "name": "primary_expression" + } + ] + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "FIELD", + "name": "optional_chain", + "content": { + "type": "SYMBOL", + "name": "optional_chain" + } + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "[" + }, + { + "type": "FIELD", + "name": "index", + "content": { + "type": "SYMBOL", + "name": "_expressions" + } + }, + { + "type": "STRING", + "value": "]" + } + ] + } + }, + "_lhs_expression": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "member_expression" + }, + { + "type": "SYMBOL", + "name": "subscript_expression" + }, + { + "type": "SYMBOL", + "name": "_identifier" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_reserved_identifier" + }, + "named": true, + "value": "identifier" + }, + { + "type": "SYMBOL", + "name": "_destructuring_pattern" + } + ] + }, + "assignment_expression": { + "type": "PREC_RIGHT", + "value": "assign", + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "parenthesized_expression" + }, + { + "type": "SYMBOL", + "name": "_lhs_expression" + } + ] + } + }, + { + "type": "STRING", + "value": "=" + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + "_augmented_assignment_lhs": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "member_expression" + }, + { + "type": "SYMBOL", + "name": "subscript_expression" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_reserved_identifier" + }, + "named": true, + "value": "identifier" + }, + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "SYMBOL", + "name": "parenthesized_expression" + } + ] + }, + "augmented_assignment_expression": { + "type": "PREC_RIGHT", + "value": "assign", + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "_augmented_assignment_lhs" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "+=" + }, + { + "type": "STRING", + "value": "-=" + }, + { + "type": "STRING", + "value": "*=" + }, + { + "type": "STRING", + "value": "/=" + }, + { + "type": "STRING", + "value": "%=" + }, + { + "type": "STRING", + "value": "^=" + }, + { + "type": "STRING", + "value": "&=" + }, + { + "type": "STRING", + "value": "|=" + }, + { + "type": "STRING", + "value": ">>=" + }, + { + "type": "STRING", + "value": ">>>=" + }, + { + "type": "STRING", + "value": "<<=" + }, + { + "type": "STRING", + "value": "**=" + }, + { + "type": "STRING", + "value": "&&=" + }, + { + "type": "STRING", + "value": "||=" + }, + { + "type": "STRING", + "value": "??=" + } + ] + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + "_initializer": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "=" + }, + { + "type": "FIELD", + "name": "value", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + }, + "_destructuring_pattern": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "object_pattern" + }, + { + "type": "SYMBOL", + "name": "array_pattern" + } + ] + }, + "spread_element": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "..." + }, + { + "type": "SYMBOL", + "name": "expression" + } + ] + }, + "ternary_expression": { + "type": "PREC_RIGHT", + "value": "ternary", + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "condition", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_ternary_qmark" + }, + "named": false, + "value": "?" + }, + { + "type": "FIELD", + "name": "consequence", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "FIELD", + "name": "alternative", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + "binary_expression": { + "type": "CHOICE", + "members": [ + { + "type": "PREC_LEFT", + "value": "logical_and", + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "&&" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": "logical_or", + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "||" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": "binary_shift", + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": ">>" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": "binary_shift", + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": ">>>" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": "binary_shift", + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "<<" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": "bitwise_and", + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "&" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": "bitwise_xor", + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "^" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": "bitwise_or", + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "|" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": "binary_plus", + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "+" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": "binary_plus", + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "-" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": "binary_times", + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "*" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": "binary_times", + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "/" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": "binary_times", + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "%" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + { + "type": "PREC_RIGHT", + "value": "binary_exp", + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "**" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": "binary_relation", + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "<" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": "binary_relation", + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "<=" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": "binary_equality", + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "==" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": "binary_equality", + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "===" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": "binary_equality", + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "!=" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": "binary_equality", + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "!==" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": "binary_relation", + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": ">=" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": "binary_relation", + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": ">" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": "ternary", + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "??" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": "binary_relation", + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "instanceof" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": "binary_relation", + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "left", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "SYMBOL", + "name": "private_property_identifier" + } + ] + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "STRING", + "value": "in" + } + }, + { + "type": "FIELD", + "name": "right", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + } + ] + }, + "unary_expression": { + "type": "PREC_LEFT", + "value": "unary_void", + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "!" + }, + { + "type": "STRING", + "value": "~" + }, + { + "type": "STRING", + "value": "-" + }, + { + "type": "STRING", + "value": "+" + }, + { + "type": "STRING", + "value": "typeof" + }, + { + "type": "STRING", + "value": "void" + }, + { + "type": "STRING", + "value": "delete" + } + ] + } + }, + { + "type": "FIELD", + "name": "argument", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + }, + "update_expression": { + "type": "PREC_LEFT", + "value": 0, + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "argument", + "content": { + "type": "SYMBOL", + "name": "expression" + } + }, + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "++" + }, + { + "type": "STRING", + "value": "--" + } + ] + } + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "operator", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "++" + }, + { + "type": "STRING", + "value": "--" + } + ] + } + }, + { + "type": "FIELD", + "name": "argument", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + } + ] + } + }, + "sequence_expression": { + "type": "PREC_RIGHT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "expression" + } + ] + } + } + ] + } + }, + "string": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "\"" + }, + { + "type": "REPEAT", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "unescaped_double_string_fragment" + }, + "named": true, + "value": "string_fragment" + }, + { + "type": "SYMBOL", + "name": "escape_sequence" + } + ] + } + }, + { + "type": "STRING", + "value": "\"" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "'" + }, + { + "type": "REPEAT", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "unescaped_single_string_fragment" + }, + "named": true, + "value": "string_fragment" + }, + { + "type": "SYMBOL", + "name": "escape_sequence" + } + ] + } + }, + { + "type": "STRING", + "value": "'" + } + ] + } + ] + }, + "unescaped_double_string_fragment": { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "PREC", + "value": 1, + "content": { + "type": "PATTERN", + "value": "[^\"\\\\\\r\\n]+" + } + } + }, + "unescaped_single_string_fragment": { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "PREC", + "value": 1, + "content": { + "type": "PATTERN", + "value": "[^'\\\\\\r\\n]+" + } + } + }, + "escape_sequence": { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "\\" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "[^xu0-7]" + }, + { + "type": "PATTERN", + "value": "[0-7]{1,3}" + }, + { + "type": "PATTERN", + "value": "x[0-9a-fA-F]{2}" + }, + { + "type": "PATTERN", + "value": "u[0-9a-fA-F]{4}" + }, + { + "type": "PATTERN", + "value": "u\\{[0-9a-fA-F]+\\}" + }, + { + "type": "PATTERN", + "value": "[\\r?][\\n\\u2028\\u2029]" + } + ] + } + ] + } + }, + "comment": { + "type": "CHOICE", + "members": [ + { + "type": "TOKEN", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "//" + }, + { + "type": "PATTERN", + "value": ".*" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "/*" + }, + { + "type": "PATTERN", + "value": "[^*]*\\*+([^/*][^*]*\\*+)*" + }, + { + "type": "STRING", + "value": "/" + } + ] + } + ] + } + } + ] + }, + "template_string": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "`" + }, + { + "type": "REPEAT", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_template_chars" + }, + "named": true, + "value": "string_fragment" + }, + { + "type": "SYMBOL", + "name": "escape_sequence" + }, + { + "type": "SYMBOL", + "name": "template_substitution" + } + ] + } + }, + { + "type": "STRING", + "value": "`" + } + ] + }, + "template_substitution": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "${" + }, + { + "type": "SYMBOL", + "name": "_expressions" + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "regex": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "/" + }, + { + "type": "FIELD", + "name": "pattern", + "content": { + "type": "SYMBOL", + "name": "regex_pattern" + } + }, + { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "PREC", + "value": 1, + "content": { + "type": "STRING", + "value": "/" + } + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "FIELD", + "name": "flags", + "content": { + "type": "SYMBOL", + "name": "regex_flags" + } + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "regex_pattern": { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "PREC", + "value": -1, + "content": { + "type": "REPEAT1", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[" + }, + { + "type": "REPEAT", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "\\" + }, + { + "type": "PATTERN", + "value": "." + } + ] + }, + { + "type": "PATTERN", + "value": "[^\\]\\n\\\\]" + } + ] + } + }, + { + "type": "STRING", + "value": "]" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "\\" + }, + { + "type": "PATTERN", + "value": "." + } + ] + }, + { + "type": "PATTERN", + "value": "[^/\\\\\\[\\n]" + } + ] + } + } + } + }, + "regex_flags": { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "PATTERN", + "value": "[a-z]+" + } + }, + "number": { + "type": "TOKEN", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "0x" + }, + { + "type": "STRING", + "value": "0X" + } + ] + }, + { + "type": "PATTERN", + "value": "[\\da-fA-F](_?[\\da-fA-F])*" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "0" + }, + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "0" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "PATTERN", + "value": "[1-9]" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "_" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "PATTERN", + "value": "\\d(_?\\d)*" + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + } + ] + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "\\d(_?\\d)*" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "e" + }, + { + "type": "STRING", + "value": "E" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "-" + }, + { + "type": "STRING", + "value": "+" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "PATTERN", + "value": "\\d(_?\\d)*" + } + ] + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "." + }, + { + "type": "PATTERN", + "value": "\\d(_?\\d)*" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "e" + }, + { + "type": "STRING", + "value": "E" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "-" + }, + { + "type": "STRING", + "value": "+" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "PATTERN", + "value": "\\d(_?\\d)*" + } + ] + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "0" + }, + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "0" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "PATTERN", + "value": "[1-9]" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "_" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "PATTERN", + "value": "\\d(_?\\d)*" + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "e" + }, + { + "type": "STRING", + "value": "E" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "-" + }, + { + "type": "STRING", + "value": "+" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "PATTERN", + "value": "\\d(_?\\d)*" + } + ] + } + ] + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "PATTERN", + "value": "\\d(_?\\d)*" + } + ] + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "0b" + }, + { + "type": "STRING", + "value": "0B" + } + ] + }, + { + "type": "PATTERN", + "value": "[0-1](_?[0-1])*" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "0o" + }, + { + "type": "STRING", + "value": "0O" + } + ] + }, + { + "type": "PATTERN", + "value": "[0-7](_?[0-7])*" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "0x" + }, + { + "type": "STRING", + "value": "0X" + } + ] + }, + { + "type": "PATTERN", + "value": "[\\da-fA-F](_?[\\da-fA-F])*" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "0b" + }, + { + "type": "STRING", + "value": "0B" + } + ] + }, + { + "type": "PATTERN", + "value": "[0-1](_?[0-1])*" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "0o" + }, + { + "type": "STRING", + "value": "0O" + } + ] + }, + { + "type": "PATTERN", + "value": "[0-7](_?[0-7])*" + } + ] + }, + { + "type": "PATTERN", + "value": "\\d(_?\\d)*" + } + ] + }, + { + "type": "STRING", + "value": "n" + } + ] + } + ] + } + }, + "_identifier": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "undefined" + }, + { + "type": "SYMBOL", + "name": "identifier" + } + ] + }, + "identifier": { + "type": "TOKEN", + "content": { + "type": "SEQ", + "members": [ + { + "type": "PATTERN", + "value": "[^\\x00-\\x1F\\s\\p{Zs}0-9:;`\"'@#.,|^&<=>+\\-*/\\\\%?!~()\\[\\]{}\\uFEFF\\u2060\\u200B]|\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}" + }, + { + "type": "REPEAT", + "content": { + "type": "PATTERN", + "value": "[^\\x00-\\x1F\\s\\p{Zs}:;`\"'@#.,|^&<=>+\\-*/\\\\%?!~()\\[\\]{}\\uFEFF\\u2060\\u200B]|\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}" + } + } + ] + } + }, + "private_property_identifier": { + "type": "TOKEN", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "#" + }, + { + "type": "PATTERN", + "value": "[^\\x00-\\x1F\\s\\p{Zs}0-9:;`\"'@#.,|^&<=>+\\-*/\\\\%?!~()\\[\\]{}\\uFEFF\\u2060\\u200B]|\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}" + }, + { + "type": "REPEAT", + "content": { + "type": "PATTERN", + "value": "[^\\x00-\\x1F\\s\\p{Zs}:;`\"'@#.,|^&<=>+\\-*/\\\\%?!~()\\[\\]{}\\uFEFF\\u2060\\u200B]|\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}" + } + } + ] + } + }, + "meta_property": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "new" + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "STRING", + "value": "target" + } + ] + }, + "this": { + "type": "STRING", + "value": "this" + }, + "super": { + "type": "STRING", + "value": "super" + }, + "true": { + "type": "STRING", + "value": "true" + }, + "false": { + "type": "STRING", + "value": "false" + }, + "null": { + "type": "STRING", + "value": "null" + }, + "undefined": { + "type": "STRING", + "value": "undefined" + }, + "arguments": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "SYMBOL", + "name": "spread_element" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "SYMBOL", + "name": "spread_element" + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "decorator": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "@" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "decorator_member_expression" + }, + "named": true, + "value": "member_expression" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "decorator_call_expression" + }, + "named": true, + "value": "call_expression" + } + ] + } + ] + }, + "decorator_member_expression": { + "type": "PREC", + "value": "member", + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "object", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "decorator_member_expression" + }, + "named": true, + "value": "member_expression" + } + ] + } + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "FIELD", + "name": "property", + "content": { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "identifier" + }, + "named": true, + "value": "property_identifier" + } + } + ] + } + }, + "decorator_call_expression": { + "type": "PREC", + "value": "call", + "content": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "function", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "decorator_member_expression" + }, + "named": true, + "value": "member_expression" + } + ] + } + }, + { + "type": "FIELD", + "name": "arguments", + "content": { + "type": "SYMBOL", + "name": "arguments" + } + } + ] + } + }, + "class_body": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "REPEAT", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "member", + "content": { + "type": "SYMBOL", + "name": "method_definition" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "member", + "content": { + "type": "SYMBOL", + "name": "field_definition" + } + }, + { + "type": "SYMBOL", + "name": "_semicolon" + } + ] + }, + { + "type": "FIELD", + "name": "member", + "content": { + "type": "SYMBOL", + "name": "class_static_block" + } + }, + { + "type": "FIELD", + "name": "template", + "content": { + "type": "SYMBOL", + "name": "glimmer_template" + } + }, + { + "type": "STRING", + "value": ";" + } + ] + } + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "field_definition": { + "type": "SEQ", + "members": [ + { + "type": "REPEAT", + "content": { + "type": "FIELD", + "name": "decorator", + "content": { + "type": "SYMBOL", + "name": "decorator" + } + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "static" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "FIELD", + "name": "property", + "content": { + "type": "SYMBOL", + "name": "_property_name" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_initializer" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "formal_parameters": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_formal_parameter" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "_formal_parameter" + } + ] + } + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "class_static_block": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "static" + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "statement_block" + } + } + ] + }, + "pattern": { + "type": "PREC_DYNAMIC", + "value": -1, + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_lhs_expression" + }, + { + "type": "SYMBOL", + "name": "rest_pattern" + } + ] + } + }, + "rest_pattern": { + "type": "PREC_RIGHT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "..." + }, + { + "type": "SYMBOL", + "name": "_lhs_expression" + } + ] + } + }, + "method_definition": { + "type": "SEQ", + "members": [ + { + "type": "REPEAT", + "content": { + "type": "FIELD", + "name": "decorator", + "content": { + "type": "SYMBOL", + "name": "decorator" + } + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "static" + }, + { + "type": "ALIAS", + "content": { + "type": "TOKEN", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "static" + }, + { + "type": "PATTERN", + "value": "\\s+" + }, + { + "type": "STRING", + "value": "get" + }, + { + "type": "PATTERN", + "value": "\\s*\\n" + } + ] + } + }, + "named": false, + "value": "static get" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "async" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "get" + }, + { + "type": "STRING", + "value": "set" + }, + { + "type": "STRING", + "value": "*" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "SYMBOL", + "name": "_property_name" + } + }, + { + "type": "FIELD", + "name": "parameters", + "content": { + "type": "SYMBOL", + "name": "formal_parameters" + } + }, + { + "type": "FIELD", + "name": "body", + "content": { + "type": "SYMBOL", + "name": "statement_block" + } + } + ] + }, + "pair": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "key", + "content": { + "type": "SYMBOL", + "name": "_property_name" + } + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "FIELD", + "name": "value", + "content": { + "type": "SYMBOL", + "name": "expression" + } + } + ] + }, + "pair_pattern": { + "type": "SEQ", + "members": [ + { + "type": "FIELD", + "name": "key", + "content": { + "type": "SYMBOL", + "name": "_property_name" + } + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "FIELD", + "name": "value", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "pattern" + }, + { + "type": "SYMBOL", + "name": "assignment_pattern" + } + ] + } + } + ] + }, + "_property_name": { + "type": "CHOICE", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "SYMBOL", + "name": "_reserved_identifier" + } + ] + }, + "named": true, + "value": "property_identifier" + }, + { + "type": "SYMBOL", + "name": "private_property_identifier" + }, + { + "type": "SYMBOL", + "name": "string" + }, + { + "type": "SYMBOL", + "name": "number" + }, + { + "type": "SYMBOL", + "name": "computed_property_name" + } + ] + }, + "computed_property_name": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[" + }, + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "STRING", + "value": "]" + } + ] + }, + "_reserved_identifier": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "get" + }, + { + "type": "STRING", + "value": "set" + }, + { + "type": "STRING", + "value": "async" + }, + { + "type": "STRING", + "value": "static" + }, + { + "type": "STRING", + "value": "export" + }, + { + "type": "STRING", + "value": "let" + } + ] + }, + "_semicolon": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_automatic_semicolon" + }, + { + "type": "STRING", + "value": ";" + } + ] + } + }, + "extras": [ + { + "type": "SYMBOL", + "name": "comment" + }, + { + "type": "SYMBOL", + "name": "html_comment" + }, + { + "type": "PATTERN", + "value": "[\\s\\p{Zs}\\uFEFF\\u2028\\u2029\\u2060\\u200B]" + } + ], + "conflicts": [ + [ + "primary_expression", + "_property_name" + ], + [ + "primary_expression", + "_property_name", + "arrow_function" + ], + [ + "primary_expression", + "arrow_function" + ], + [ + "primary_expression", + "method_definition" + ], + [ + "primary_expression", + "rest_pattern" + ], + [ + "primary_expression", + "pattern" + ], + [ + "primary_expression", + "_for_header" + ], + [ + "array", + "array_pattern" + ], + [ + "object", + "object_pattern" + ], + [ + "assignment_expression", + "pattern" + ], + [ + "assignment_expression", + "object_assignment_pattern" + ], + [ + "labeled_statement", + "_property_name" + ], + [ + "computed_property_name", + "array" + ], + [ + "binary_expression", + "_initializer" + ] + ], + "precedences": [ + [ + { + "type": "STRING", + "value": "member" + }, + { + "type": "STRING", + "value": "call" + }, + { + "type": "SYMBOL", + "name": "update_expression" + }, + { + "type": "STRING", + "value": "unary_void" + }, + { + "type": "STRING", + "value": "binary_exp" + }, + { + "type": "STRING", + "value": "binary_times" + }, + { + "type": "STRING", + "value": "binary_plus" + }, + { + "type": "STRING", + "value": "binary_shift" + }, + { + "type": "STRING", + "value": "binary_compare" + }, + { + "type": "STRING", + "value": "binary_relation" + }, + { + "type": "STRING", + "value": "binary_equality" + }, + { + "type": "STRING", + "value": "bitwise_and" + }, + { + "type": "STRING", + "value": "bitwise_xor" + }, + { + "type": "STRING", + "value": "bitwise_or" + }, + { + "type": "STRING", + "value": "logical_and" + }, + { + "type": "STRING", + "value": "logical_or" + }, + { + "type": "STRING", + "value": "ternary" + }, + { + "type": "SYMBOL", + "name": "sequence_expression" + }, + { + "type": "SYMBOL", + "name": "arrow_function" + } + ], + [ + { + "type": "STRING", + "value": "assign" + }, + { + "type": "SYMBOL", + "name": "primary_expression" + } + ], + [ + { + "type": "STRING", + "value": "member" + }, + { + "type": "STRING", + "value": "new" + }, + { + "type": "STRING", + "value": "call" + }, + { + "type": "SYMBOL", + "name": "expression" + } + ], + [ + { + "type": "STRING", + "value": "declaration" + }, + { + "type": "STRING", + "value": "literal" + } + ], + [ + { + "type": "SYMBOL", + "name": "primary_expression" + }, + { + "type": "SYMBOL", + "name": "statement_block" + }, + { + "type": "STRING", + "value": "object" + } + ], + [ + { + "type": "SYMBOL", + "name": "import_statement" + }, + { + "type": "SYMBOL", + "name": "import" + } + ], + [ + { + "type": "SYMBOL", + "name": "export_statement" + }, + { + "type": "SYMBOL", + "name": "primary_expression" + } + ], + [ + { + "type": "SYMBOL", + "name": "lexical_declaration" + }, + { + "type": "SYMBOL", + "name": "primary_expression" + } + ] + ], + "externals": [ + { + "type": "SYMBOL", + "name": "_automatic_semicolon" + }, + { + "type": "SYMBOL", + "name": "_template_chars" + }, + { + "type": "SYMBOL", + "name": "_ternary_qmark" + }, + { + "type": "SYMBOL", + "name": "html_comment" + }, + { + "type": "STRING", + "value": "||" + }, + { + "type": "SYMBOL", + "name": "escape_sequence" + }, + { + "type": "SYMBOL", + "name": "regex_pattern" + } + ], + "inline": [ + "_call_signature", + "_formal_parameter", + "statement", + "_expressions", + "_semicolon", + "_identifier", + "_reserved_identifier", + "_jsx_attribute", + "_jsx_element_name", + "_jsx_child", + "_jsx_element", + "_jsx_attribute_name", + "_jsx_attribute_value", + "_jsx_identifier", + "_lhs_expression" + ], + "supertypes": [ + "statement", + "declaration", + "expression", + "primary_expression", + "pattern" + ] +} diff --git a/vendor/tree-sitter-javascript/src/node-types.json b/vendor/tree-sitter-javascript/src/node-types.json new file mode 100644 index 0000000..ec93c93 --- /dev/null +++ b/vendor/tree-sitter-javascript/src/node-types.json @@ -0,0 +1,3605 @@ +[ + { + "type": "declaration", + "named": true, + "subtypes": [ + { + "type": "class_declaration", + "named": true + }, + { + "type": "function_declaration", + "named": true + }, + { + "type": "generator_function_declaration", + "named": true + }, + { + "type": "lexical_declaration", + "named": true + }, + { + "type": "variable_declaration", + "named": true + } + ] + }, + { + "type": "expression", + "named": true, + "subtypes": [ + { + "type": "assignment_expression", + "named": true + }, + { + "type": "augmented_assignment_expression", + "named": true + }, + { + "type": "await_expression", + "named": true + }, + { + "type": "binary_expression", + "named": true + }, + { + "type": "glimmer_template", + "named": true + }, + { + "type": "jsx_element", + "named": true + }, + { + "type": "jsx_self_closing_element", + "named": true + }, + { + "type": "new_expression", + "named": true + }, + { + "type": "primary_expression", + "named": true + }, + { + "type": "ternary_expression", + "named": true + }, + { + "type": "unary_expression", + "named": true + }, + { + "type": "update_expression", + "named": true + }, + { + "type": "yield_expression", + "named": true + } + ] + }, + { + "type": "pattern", + "named": true, + "subtypes": [ + { + "type": "array_pattern", + "named": true + }, + { + "type": "identifier", + "named": true + }, + { + "type": "member_expression", + "named": true + }, + { + "type": "object_pattern", + "named": true + }, + { + "type": "rest_pattern", + "named": true + }, + { + "type": "subscript_expression", + "named": true + }, + { + "type": "undefined", + "named": true + } + ] + }, + { + "type": "primary_expression", + "named": true, + "subtypes": [ + { + "type": "array", + "named": true + }, + { + "type": "arrow_function", + "named": true + }, + { + "type": "call_expression", + "named": true + }, + { + "type": "class", + "named": true + }, + { + "type": "false", + "named": true + }, + { + "type": "function_expression", + "named": true + }, + { + "type": "generator_function", + "named": true + }, + { + "type": "identifier", + "named": true + }, + { + "type": "member_expression", + "named": true + }, + { + "type": "meta_property", + "named": true + }, + { + "type": "null", + "named": true + }, + { + "type": "number", + "named": true + }, + { + "type": "object", + "named": true + }, + { + "type": "parenthesized_expression", + "named": true + }, + { + "type": "regex", + "named": true + }, + { + "type": "string", + "named": true + }, + { + "type": "subscript_expression", + "named": true + }, + { + "type": "super", + "named": true + }, + { + "type": "template_string", + "named": true + }, + { + "type": "this", + "named": true + }, + { + "type": "true", + "named": true + }, + { + "type": "undefined", + "named": true + } + ] + }, + { + "type": "statement", + "named": true, + "subtypes": [ + { + "type": "break_statement", + "named": true + }, + { + "type": "continue_statement", + "named": true + }, + { + "type": "debugger_statement", + "named": true + }, + { + "type": "declaration", + "named": true + }, + { + "type": "do_statement", + "named": true + }, + { + "type": "empty_statement", + "named": true + }, + { + "type": "export_statement", + "named": true + }, + { + "type": "expression_statement", + "named": true + }, + { + "type": "for_in_statement", + "named": true + }, + { + "type": "for_statement", + "named": true + }, + { + "type": "if_statement", + "named": true + }, + { + "type": "import_statement", + "named": true + }, + { + "type": "labeled_statement", + "named": true + }, + { + "type": "return_statement", + "named": true + }, + { + "type": "statement_block", + "named": true + }, + { + "type": "switch_statement", + "named": true + }, + { + "type": "throw_statement", + "named": true + }, + { + "type": "try_statement", + "named": true + }, + { + "type": "while_statement", + "named": true + }, + { + "type": "with_statement", + "named": true + } + ] + }, + { + "type": "arguments", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "expression", + "named": true + }, + { + "type": "spread_element", + "named": true + } + ] + } + }, + { + "type": "array", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "expression", + "named": true + }, + { + "type": "spread_element", + "named": true + } + ] + } + }, + { + "type": "array_pattern", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "assignment_pattern", + "named": true + }, + { + "type": "pattern", + "named": true + } + ] + } + }, + { + "type": "arrow_function", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + }, + { + "type": "statement_block", + "named": true + } + ] + }, + "parameter": { + "multiple": false, + "required": false, + "types": [ + { + "type": "identifier", + "named": true + } + ] + }, + "parameters": { + "multiple": false, + "required": false, + "types": [ + { + "type": "formal_parameters", + "named": true + } + ] + } + } + }, + { + "type": "assignment_expression", + "named": true, + "fields": { + "left": { + "multiple": false, + "required": true, + "types": [ + { + "type": "array_pattern", + "named": true + }, + { + "type": "identifier", + "named": true + }, + { + "type": "member_expression", + "named": true + }, + { + "type": "object_pattern", + "named": true + }, + { + "type": "parenthesized_expression", + "named": true + }, + { + "type": "subscript_expression", + "named": true + }, + { + "type": "undefined", + "named": true + } + ] + }, + "right": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + } + }, + { + "type": "assignment_pattern", + "named": true, + "fields": { + "left": { + "multiple": false, + "required": true, + "types": [ + { + "type": "pattern", + "named": true + } + ] + }, + "right": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + } + }, + { + "type": "augmented_assignment_expression", + "named": true, + "fields": { + "left": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + }, + { + "type": "member_expression", + "named": true + }, + { + "type": "parenthesized_expression", + "named": true + }, + { + "type": "subscript_expression", + "named": true + } + ] + }, + "operator": { + "multiple": false, + "required": true, + "types": [ + { + "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 + } + ] + }, + "right": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + } + }, + { + "type": "await_expression", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + }, + { + "type": "binary_expression", + "named": true, + "fields": { + "left": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + }, + { + "type": "private_property_identifier", + "named": true + } + ] + }, + "operator": { + "multiple": false, + "required": true, + "types": [ + { + "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": "in", + "named": false + }, + { + "type": "instanceof", + "named": false + }, + { + "type": "|", + "named": false + }, + { + "type": "||", + "named": false + } + ] + }, + "right": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + } + }, + { + "type": "break_statement", + "named": true, + "fields": { + "label": { + "multiple": false, + "required": false, + "types": [ + { + "type": "statement_identifier", + "named": true + } + ] + } + } + }, + { + "type": "call_expression", + "named": true, + "fields": { + "arguments": { + "multiple": false, + "required": true, + "types": [ + { + "type": "arguments", + "named": true + }, + { + "type": "template_string", + "named": true + } + ] + }, + "function": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + }, + { + "type": "import", + "named": true + } + ] + }, + "optional_chain": { + "multiple": false, + "required": false, + "types": [ + { + "type": "optional_chain", + "named": true + } + ] + } + } + }, + { + "type": "catch_clause", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "statement_block", + "named": true + } + ] + }, + "parameter": { + "multiple": false, + "required": false, + "types": [ + { + "type": "array_pattern", + "named": true + }, + { + "type": "identifier", + "named": true + }, + { + "type": "object_pattern", + "named": true + } + ] + } + } + }, + { + "type": "class", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "class_body", + "named": true + } + ] + }, + "decorator": { + "multiple": true, + "required": false, + "types": [ + { + "type": "decorator", + "named": true + } + ] + }, + "name": { + "multiple": false, + "required": false, + "types": [ + { + "type": "identifier", + "named": true + } + ] + } + }, + "children": { + "multiple": false, + "required": false, + "types": [ + { + "type": "class_heritage", + "named": true + } + ] + } + }, + { + "type": "class_body", + "named": true, + "fields": { + "member": { + "multiple": true, + "required": false, + "types": [ + { + "type": "class_static_block", + "named": true + }, + { + "type": "field_definition", + "named": true + }, + { + "type": "method_definition", + "named": true + } + ] + }, + "template": { + "multiple": true, + "required": false, + "types": [ + { + "type": "glimmer_template", + "named": true + } + ] + } + } + }, + { + "type": "class_declaration", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "class_body", + "named": true + } + ] + }, + "decorator": { + "multiple": true, + "required": false, + "types": [ + { + "type": "decorator", + "named": true + } + ] + }, + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + } + }, + "children": { + "multiple": false, + "required": false, + "types": [ + { + "type": "class_heritage", + "named": true + } + ] + } + }, + { + "type": "class_heritage", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + }, + { + "type": "class_static_block", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "statement_block", + "named": true + } + ] + } + } + }, + { + "type": "comment", + "named": true, + "fields": {} + }, + { + "type": "computed_property_name", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + }, + { + "type": "continue_statement", + "named": true, + "fields": { + "label": { + "multiple": false, + "required": false, + "types": [ + { + "type": "statement_identifier", + "named": true + } + ] + } + } + }, + { + "type": "debugger_statement", + "named": true, + "fields": {} + }, + { + "type": "decorator", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "call_expression", + "named": true + }, + { + "type": "identifier", + "named": true + }, + { + "type": "member_expression", + "named": true + } + ] + } + }, + { + "type": "do_statement", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "statement", + "named": true + } + ] + }, + "condition": { + "multiple": false, + "required": true, + "types": [ + { + "type": "parenthesized_expression", + "named": true + } + ] + } + } + }, + { + "type": "else_clause", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "statement", + "named": true + } + ] + } + }, + { + "type": "empty_statement", + "named": true, + "fields": {} + }, + { + "type": "export_clause", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "export_specifier", + "named": true + } + ] + } + }, + { + "type": "export_specifier", + "named": true, + "fields": { + "alias": { + "multiple": false, + "required": false, + "types": [ + { + "type": "identifier", + "named": true + }, + { + "type": "string", + "named": true + } + ] + }, + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + }, + { + "type": "string", + "named": true + } + ] + } + } + }, + { + "type": "export_statement", + "named": true, + "fields": { + "declaration": { + "multiple": false, + "required": false, + "types": [ + { + "type": "declaration", + "named": true + } + ] + }, + "decorator": { + "multiple": true, + "required": false, + "types": [ + { + "type": "decorator", + "named": true + } + ] + }, + "source": { + "multiple": false, + "required": false, + "types": [ + { + "type": "string", + "named": true + } + ] + }, + "value": { + "multiple": false, + "required": false, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + }, + "children": { + "multiple": false, + "required": false, + "types": [ + { + "type": "export_clause", + "named": true + }, + { + "type": "namespace_export", + "named": true + } + ] + } + }, + { + "type": "expression_statement", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + }, + { + "type": "sequence_expression", + "named": true + } + ] + } + }, + { + "type": "field_definition", + "named": true, + "fields": { + "decorator": { + "multiple": true, + "required": false, + "types": [ + { + "type": "decorator", + "named": true + } + ] + }, + "property": { + "multiple": false, + "required": true, + "types": [ + { + "type": "computed_property_name", + "named": true + }, + { + "type": "number", + "named": true + }, + { + "type": "private_property_identifier", + "named": true + }, + { + "type": "property_identifier", + "named": true + }, + { + "type": "string", + "named": true + } + ] + }, + "value": { + "multiple": false, + "required": false, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + } + }, + { + "type": "finally_clause", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "statement_block", + "named": true + } + ] + } + } + }, + { + "type": "for_in_statement", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "statement", + "named": true + } + ] + }, + "kind": { + "multiple": false, + "required": false, + "types": [ + { + "type": "const", + "named": false + }, + { + "type": "let", + "named": false + }, + { + "type": "var", + "named": false + } + ] + }, + "left": { + "multiple": false, + "required": true, + "types": [ + { + "type": "array_pattern", + "named": true + }, + { + "type": "identifier", + "named": true + }, + { + "type": "member_expression", + "named": true + }, + { + "type": "object_pattern", + "named": true + }, + { + "type": "parenthesized_expression", + "named": true + }, + { + "type": "subscript_expression", + "named": true + }, + { + "type": "undefined", + "named": true + } + ] + }, + "operator": { + "multiple": false, + "required": true, + "types": [ + { + "type": "in", + "named": false + }, + { + "type": "of", + "named": false + } + ] + }, + "right": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + }, + { + "type": "sequence_expression", + "named": true + } + ] + }, + "value": { + "multiple": false, + "required": false, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + } + }, + { + "type": "for_statement", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "statement", + "named": true + } + ] + }, + "condition": { + "multiple": false, + "required": true, + "types": [ + { + "type": "empty_statement", + "named": true + }, + { + "type": "expression_statement", + "named": true + } + ] + }, + "increment": { + "multiple": false, + "required": false, + "types": [ + { + "type": "expression", + "named": true + }, + { + "type": "sequence_expression", + "named": true + } + ] + }, + "initializer": { + "multiple": false, + "required": true, + "types": [ + { + "type": "empty_statement", + "named": true + }, + { + "type": "expression_statement", + "named": true + }, + { + "type": "lexical_declaration", + "named": true + }, + { + "type": "variable_declaration", + "named": true + } + ] + } + } + }, + { + "type": "formal_parameters", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "assignment_pattern", + "named": true + }, + { + "type": "pattern", + "named": true + } + ] + } + }, + { + "type": "function_declaration", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "statement_block", + "named": true + } + ] + }, + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + }, + "parameters": { + "multiple": false, + "required": true, + "types": [ + { + "type": "formal_parameters", + "named": true + } + ] + } + } + }, + { + "type": "function_expression", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "statement_block", + "named": true + } + ] + }, + "name": { + "multiple": false, + "required": false, + "types": [ + { + "type": "identifier", + "named": true + } + ] + }, + "parameters": { + "multiple": false, + "required": true, + "types": [ + { + "type": "formal_parameters", + "named": true + } + ] + } + } + }, + { + "type": "generator_function", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "statement_block", + "named": true + } + ] + }, + "name": { + "multiple": false, + "required": false, + "types": [ + { + "type": "identifier", + "named": true + } + ] + }, + "parameters": { + "multiple": false, + "required": true, + "types": [ + { + "type": "formal_parameters", + "named": true + } + ] + } + } + }, + { + "type": "generator_function_declaration", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "statement_block", + "named": true + } + ] + }, + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + }, + "parameters": { + "multiple": false, + "required": true, + "types": [ + { + "type": "formal_parameters", + "named": true + } + ] + } + } + }, + { + "type": "glimmer_closing_tag", + "named": true, + "fields": {} + }, + { + "type": "glimmer_opening_tag", + "named": true, + "fields": {} + }, + { + "type": "glimmer_template", + "named": true, + "fields": { + "close_tag": { + "multiple": false, + "required": true, + "types": [ + { + "type": "glimmer_closing_tag", + "named": true + } + ] + }, + "open_tag": { + "multiple": false, + "required": true, + "types": [ + { + "type": "glimmer_opening_tag", + "named": true + } + ] + } + } + }, + { + "type": "if_statement", + "named": true, + "fields": { + "alternative": { + "multiple": false, + "required": false, + "types": [ + { + "type": "else_clause", + "named": true + } + ] + }, + "condition": { + "multiple": false, + "required": true, + "types": [ + { + "type": "parenthesized_expression", + "named": true + } + ] + }, + "consequence": { + "multiple": false, + "required": true, + "types": [ + { + "type": "statement", + "named": true + } + ] + } + } + }, + { + "type": "import", + "named": true, + "fields": {} + }, + { + "type": "import_attribute", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "object", + "named": true + } + ] + } + }, + { + "type": "import_clause", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + }, + { + "type": "named_imports", + "named": true + }, + { + "type": "namespace_import", + "named": true + } + ] + } + }, + { + "type": "import_specifier", + "named": true, + "fields": { + "alias": { + "multiple": false, + "required": false, + "types": [ + { + "type": "identifier", + "named": true + } + ] + }, + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + }, + { + "type": "string", + "named": true + } + ] + } + } + }, + { + "type": "import_statement", + "named": true, + "fields": { + "source": { + "multiple": false, + "required": true, + "types": [ + { + "type": "string", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "import_attribute", + "named": true + }, + { + "type": "import_clause", + "named": true + } + ] + } + }, + { + "type": "jsx_attribute", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "jsx_element", + "named": true + }, + { + "type": "jsx_expression", + "named": true + }, + { + "type": "jsx_namespace_name", + "named": true + }, + { + "type": "jsx_self_closing_element", + "named": true + }, + { + "type": "property_identifier", + "named": true + }, + { + "type": "string", + "named": true + } + ] + } + }, + { + "type": "jsx_closing_element", + "named": true, + "fields": { + "name": { + "multiple": false, + "required": false, + "types": [ + { + "type": "identifier", + "named": true + }, + { + "type": "jsx_namespace_name", + "named": true + }, + { + "type": "member_expression", + "named": true + } + ] + } + } + }, + { + "type": "jsx_element", + "named": true, + "fields": { + "close_tag": { + "multiple": false, + "required": true, + "types": [ + { + "type": "jsx_closing_element", + "named": true + } + ] + }, + "open_tag": { + "multiple": false, + "required": true, + "types": [ + { + "type": "jsx_opening_element", + "named": true + } + ] + } + }, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "html_character_reference", + "named": true + }, + { + "type": "jsx_element", + "named": true + }, + { + "type": "jsx_expression", + "named": true + }, + { + "type": "jsx_self_closing_element", + "named": true + }, + { + "type": "jsx_text", + "named": true + } + ] + } + }, + { + "type": "jsx_expression", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": false, + "types": [ + { + "type": "expression", + "named": true + }, + { + "type": "sequence_expression", + "named": true + }, + { + "type": "spread_element", + "named": true + } + ] + } + }, + { + "type": "jsx_namespace_name", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + } + }, + { + "type": "jsx_opening_element", + "named": true, + "fields": { + "attribute": { + "multiple": true, + "required": false, + "types": [ + { + "type": "jsx_attribute", + "named": true + }, + { + "type": "jsx_expression", + "named": true + } + ] + }, + "name": { + "multiple": false, + "required": false, + "types": [ + { + "type": "identifier", + "named": true + }, + { + "type": "jsx_namespace_name", + "named": true + }, + { + "type": "member_expression", + "named": true + } + ] + } + } + }, + { + "type": "jsx_self_closing_element", + "named": true, + "fields": { + "attribute": { + "multiple": true, + "required": false, + "types": [ + { + "type": "jsx_attribute", + "named": true + }, + { + "type": "jsx_expression", + "named": true + } + ] + }, + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + }, + { + "type": "jsx_namespace_name", + "named": true + }, + { + "type": "member_expression", + "named": true + } + ] + } + } + }, + { + "type": "jsx_text", + "named": true, + "fields": {} + }, + { + "type": "labeled_statement", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "statement", + "named": true + } + ] + }, + "label": { + "multiple": false, + "required": true, + "types": [ + { + "type": "statement_identifier", + "named": true + } + ] + } + } + }, + { + "type": "lexical_declaration", + "named": true, + "fields": { + "kind": { + "multiple": false, + "required": true, + "types": [ + { + "type": "const", + "named": false + }, + { + "type": "let", + "named": false + } + ] + } + }, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "variable_declarator", + "named": true + } + ] + } + }, + { + "type": "member_expression", + "named": true, + "fields": { + "object": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + }, + { + "type": "import", + "named": true + } + ] + }, + "optional_chain": { + "multiple": false, + "required": false, + "types": [ + { + "type": "optional_chain", + "named": true + } + ] + }, + "property": { + "multiple": false, + "required": true, + "types": [ + { + "type": "private_property_identifier", + "named": true + }, + { + "type": "property_identifier", + "named": true + } + ] + } + } + }, + { + "type": "meta_property", + "named": true, + "fields": {} + }, + { + "type": "method_definition", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "statement_block", + "named": true + } + ] + }, + "decorator": { + "multiple": true, + "required": false, + "types": [ + { + "type": "decorator", + "named": true + } + ] + }, + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "computed_property_name", + "named": true + }, + { + "type": "number", + "named": true + }, + { + "type": "private_property_identifier", + "named": true + }, + { + "type": "property_identifier", + "named": true + }, + { + "type": "string", + "named": true + } + ] + }, + "parameters": { + "multiple": false, + "required": true, + "types": [ + { + "type": "formal_parameters", + "named": true + } + ] + } + } + }, + { + "type": "named_imports", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "import_specifier", + "named": true + } + ] + } + }, + { + "type": "namespace_export", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + }, + { + "type": "string", + "named": true + } + ] + } + }, + { + "type": "namespace_import", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + } + }, + { + "type": "new_expression", + "named": true, + "fields": { + "arguments": { + "multiple": false, + "required": false, + "types": [ + { + "type": "arguments", + "named": true + } + ] + }, + "constructor": { + "multiple": false, + "required": true, + "types": [ + { + "type": "new_expression", + "named": true + }, + { + "type": "primary_expression", + "named": true + } + ] + } + } + }, + { + "type": "object", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "method_definition", + "named": true + }, + { + "type": "pair", + "named": true + }, + { + "type": "shorthand_property_identifier", + "named": true + }, + { + "type": "spread_element", + "named": true + } + ] + } + }, + { + "type": "object_assignment_pattern", + "named": true, + "fields": { + "left": { + "multiple": false, + "required": true, + "types": [ + { + "type": "array_pattern", + "named": true + }, + { + "type": "object_pattern", + "named": true + }, + { + "type": "shorthand_property_identifier_pattern", + "named": true + } + ] + }, + "right": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + } + }, + { + "type": "object_pattern", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "object_assignment_pattern", + "named": true + }, + { + "type": "pair_pattern", + "named": true + }, + { + "type": "rest_pattern", + "named": true + }, + { + "type": "shorthand_property_identifier_pattern", + "named": true + } + ] + } + }, + { + "type": "pair", + "named": true, + "fields": { + "key": { + "multiple": false, + "required": true, + "types": [ + { + "type": "computed_property_name", + "named": true + }, + { + "type": "number", + "named": true + }, + { + "type": "private_property_identifier", + "named": true + }, + { + "type": "property_identifier", + "named": true + }, + { + "type": "string", + "named": true + } + ] + }, + "value": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + } + }, + { + "type": "pair_pattern", + "named": true, + "fields": { + "key": { + "multiple": false, + "required": true, + "types": [ + { + "type": "computed_property_name", + "named": true + }, + { + "type": "number", + "named": true + }, + { + "type": "private_property_identifier", + "named": true + }, + { + "type": "property_identifier", + "named": true + }, + { + "type": "string", + "named": true + } + ] + }, + "value": { + "multiple": false, + "required": true, + "types": [ + { + "type": "assignment_pattern", + "named": true + }, + { + "type": "pattern", + "named": true + } + ] + } + } + }, + { + "type": "parenthesized_expression", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + }, + { + "type": "sequence_expression", + "named": true + } + ] + } + }, + { + "type": "program", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "hash_bang_line", + "named": true + }, + { + "type": "statement", + "named": true + } + ] + } + }, + { + "type": "regex", + "named": true, + "fields": { + "flags": { + "multiple": false, + "required": false, + "types": [ + { + "type": "regex_flags", + "named": true + } + ] + }, + "pattern": { + "multiple": false, + "required": true, + "types": [ + { + "type": "regex_pattern", + "named": true + } + ] + } + } + }, + { + "type": "rest_pattern", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "array_pattern", + "named": true + }, + { + "type": "identifier", + "named": true + }, + { + "type": "member_expression", + "named": true + }, + { + "type": "object_pattern", + "named": true + }, + { + "type": "subscript_expression", + "named": true + }, + { + "type": "undefined", + "named": true + } + ] + } + }, + { + "type": "return_statement", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": false, + "types": [ + { + "type": "expression", + "named": true + }, + { + "type": "sequence_expression", + "named": true + } + ] + } + }, + { + "type": "sequence_expression", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + }, + { + "type": "spread_element", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + }, + { + "type": "statement_block", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "statement", + "named": true + } + ] + } + }, + { + "type": "string", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "escape_sequence", + "named": true + }, + { + "type": "html_character_reference", + "named": true + }, + { + "type": "string_fragment", + "named": true + } + ] + } + }, + { + "type": "subscript_expression", + "named": true, + "fields": { + "index": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + }, + { + "type": "sequence_expression", + "named": true + } + ] + }, + "object": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + }, + "optional_chain": { + "multiple": false, + "required": false, + "types": [ + { + "type": "optional_chain", + "named": true + } + ] + } + } + }, + { + "type": "switch_body", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "switch_case", + "named": true + }, + { + "type": "switch_default", + "named": true + } + ] + } + }, + { + "type": "switch_case", + "named": true, + "fields": { + "body": { + "multiple": true, + "required": false, + "types": [ + { + "type": "statement", + "named": true + } + ] + }, + "value": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + }, + { + "type": "sequence_expression", + "named": true + } + ] + } + } + }, + { + "type": "switch_default", + "named": true, + "fields": { + "body": { + "multiple": true, + "required": false, + "types": [ + { + "type": "statement", + "named": true + } + ] + } + } + }, + { + "type": "switch_statement", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "switch_body", + "named": true + } + ] + }, + "value": { + "multiple": false, + "required": true, + "types": [ + { + "type": "parenthesized_expression", + "named": true + } + ] + } + } + }, + { + "type": "template_string", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "escape_sequence", + "named": true + }, + { + "type": "string_fragment", + "named": true + }, + { + "type": "template_substitution", + "named": true + } + ] + } + }, + { + "type": "template_substitution", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + }, + { + "type": "sequence_expression", + "named": true + } + ] + } + }, + { + "type": "ternary_expression", + "named": true, + "fields": { + "alternative": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + }, + "condition": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + }, + "consequence": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + } + }, + { + "type": "throw_statement", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + }, + { + "type": "sequence_expression", + "named": true + } + ] + } + }, + { + "type": "try_statement", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "statement_block", + "named": true + } + ] + }, + "finalizer": { + "multiple": false, + "required": false, + "types": [ + { + "type": "finally_clause", + "named": true + } + ] + }, + "handler": { + "multiple": false, + "required": false, + "types": [ + { + "type": "catch_clause", + "named": true + } + ] + } + } + }, + { + "type": "unary_expression", + "named": true, + "fields": { + "argument": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + }, + "operator": { + "multiple": false, + "required": true, + "types": [ + { + "type": "!", + "named": false + }, + { + "type": "+", + "named": false + }, + { + "type": "-", + "named": false + }, + { + "type": "delete", + "named": false + }, + { + "type": "typeof", + "named": false + }, + { + "type": "void", + "named": false + }, + { + "type": "~", + "named": false + } + ] + } + } + }, + { + "type": "update_expression", + "named": true, + "fields": { + "argument": { + "multiple": false, + "required": true, + "types": [ + { + "type": "expression", + "named": true + } + ] + }, + "operator": { + "multiple": false, + "required": true, + "types": [ + { + "type": "++", + "named": false + }, + { + "type": "--", + "named": false + } + ] + } + } + }, + { + "type": "variable_declaration", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "variable_declarator", + "named": true + } + ] + } + }, + { + "type": "variable_declarator", + "named": true, + "fields": { + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "array_pattern", + "named": true + }, + { + "type": "identifier", + "named": true + }, + { + "type": "object_pattern", + "named": true + } + ] + }, + "value": { + "multiple": false, + "required": false, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + } + }, + { + "type": "while_statement", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "statement", + "named": true + } + ] + }, + "condition": { + "multiple": false, + "required": true, + "types": [ + { + "type": "parenthesized_expression", + "named": true + } + ] + } + } + }, + { + "type": "with_statement", + "named": true, + "fields": { + "body": { + "multiple": false, + "required": true, + "types": [ + { + "type": "statement", + "named": true + } + ] + }, + "object": { + "multiple": false, + "required": true, + "types": [ + { + "type": "parenthesized_expression", + "named": true + } + ] + } + } + }, + { + "type": "yield_expression", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": false, + "types": [ + { + "type": "expression", + "named": true + } + ] + } + }, + { + "type": "!", + "named": false + }, + { + "type": "!=", + "named": false + }, + { + "type": "!==", + "named": false + }, + { + "type": "\"", + "named": false + }, + { + "type": "${", + "named": false + }, + { + "type": "%", + "named": false + }, + { + "type": "%=", + "named": false + }, + { + "type": "&", + "named": false + }, + { + "type": "&&", + "named": false + }, + { + "type": "&&=", + "named": false + }, + { + "type": "&=", + "named": false + }, + { + "type": "'", + "named": false + }, + { + "type": "(", + "named": false + }, + { + "type": ")", + "named": false + }, + { + "type": "*", + "named": false + }, + { + "type": "**", + "named": false + }, + { + "type": "**=", + "named": false + }, + { + "type": "*=", + "named": false + }, + { + "type": "+", + "named": false + }, + { + "type": "++", + "named": false + }, + { + "type": "+=", + "named": false + }, + { + "type": ",", + "named": false + }, + { + "type": "-", + "named": false + }, + { + "type": "--", + "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": "