(grammar (start program) (matching longest) (settling tokens precedence dynamic ambiguity))
(extra (ref comment))
(extra (ref html_comment))
(extra (class plain (char %20) (char %09) (char %0A) (char %0D) (char %0C) (char %0B) (category Zs) (char %EF%BB%BF) (char %E2%80%A8) (char %E2%80%A9) (char %E2%81%A0) (char %E2%80%8B)))
(conflict primary_expression property_name)
(conflict primary_expression property_name arrow_function)
(conflict primary_expression arrow_function)
(conflict primary_expression method_definition)
(conflict primary_expression rest_pattern)
(conflict primary_expression pattern)
(conflict primary_expression for_header)
(conflict variable_declarator for_header)
(conflict array array_pattern)
(conflict object object_pattern)
(conflict assignment_expression pattern)
(conflict assignment_expression object_assignment_pattern)
(conflict labeled_statement property_name)
(conflict computed_property_name array)
(conflict binary_expression initializer)
(conflict class_static_block property_name)
(conflict call_expression instantiation_expression binary_expression)
(conflict call_expression instantiation_expression binary_expression unary_expression)
(conflict call_expression instantiation_expression binary_expression update_expression)
(conflict call_expression instantiation_expression binary_expression await_expression)
(conflict class)
(conflict nested_identifier nested_type_identifier primary_expression)
(conflict nested_identifier nested_type_identifier)
(conflict call_signature_parts function_type)
(conflict call_signature_parts constructor_type)
(conflict primary_expression parameter_name)
(conflict primary_expression parameter_name primary_type)
(conflict primary_expression literal_type)
(conflict primary_expression literal_type rest_pattern)
(conflict primary_expression predefined_type rest_pattern)
(conflict primary_expression primary_type)
(conflict primary_expression generic_type)
(conflict primary_expression predefined_type)
(conflict primary_expression pattern primary_type)
(conflict parameter_name primary_type)
(conflict pattern primary_type)
(conflict optional_tuple_parameter primary_type)
(conflict rest_pattern primary_type primary_expression)
(conflict object object_type)
(conflict object object_pattern object_type)
(conflict object object_pattern property_name)
(conflict object_pattern object_type)
(conflict object_pattern object_type)
(conflict array tuple_type)
(conflict array array_pattern tuple_type)
(conflict array_pattern tuple_type)
(conflict template_literal_type template_string)
(conflict primary_type type_parameter)
(precedences (name member) (name template_call) (name call) (rule update_expression) (name unary_void) (name binary_exp) (name binary_times) (name binary_plus) (name binary_shift) (name binary_compare) (name binary_relation) (name binary_equality) (name bitwise_and) (name bitwise_xor) (name bitwise_or) (name logical_and) (name logical_or) (name ternary) (rule sequence_expression) (rule arrow_function))
(precedences (name assign) (rule primary_expression))
(precedences (name member) (name template_call) (name new) (name call) (rule expression))
(precedences (name declaration) (name literal))
(precedences (rule primary_expression) (rule statement_block) (name object))
(precedences (rule meta_property) (rule import))
(precedences (rule import_statement) (rule import))
(precedences (rule export_statement) (rule primary_expression))
(precedences (rule lexical_declaration) (rule primary_expression))
(precedences (name call) (name instantiation) (name unary) (name binary) (rule await_expression) (rule arrow_function))
(precedences (name extends) (name instantiation))
(precedences (rule intersection_type) (rule union_type) (rule conditional_type) (rule function_type) (name binary) (rule type_predicate) (rule readonly_type))
(precedences (rule mapped_type_clause) (rule primary_expression))
(precedences (rule accessibility_modifier) (rule primary_expression))
(precedences (name unary_void) (rule expression))
(precedences (rule extends_clause) (rule primary_expression))
(precedences (name unary) (name assign))
(precedences (name declaration) (rule expression))
(precedences (rule predefined_type) (rule unary_expression))
(precedences (rule type) (rule flow_maybe_type))
(precedences (rule tuple_type) (rule array_type) (rule pattern) (rule type))
(precedences (rule readonly_type) (rule pattern))
(precedences (rule readonly_type) (rule primary_expression))
(precedences (rule type_query) (rule subscript_expression) (rule expression))
(precedences (rule type_query) (rule type_query_subscript_expression))
(precedences (rule nested_type_identifier) (rule generic_type) (rule primary_type) (rule lookup_type) (rule index_type_query) (rule type))
(precedences (rule as_expression) (rule satisfies_expression) (rule primary_type))
(precedences (rule type_query_member_expression) (rule member_expression))
(precedences (rule member_expression) (rule type_query_member_expression_in_type_annotation))
(precedences (rule type_query_member_expression) (rule primary_expression))
(precedences (rule type_query_subscript_expression) (rule subscript_expression))
(precedences (rule type_query_subscript_expression) (rule primary_expression))
(precedences (rule type_query_call_expression) (rule primary_expression))
(precedences (rule type_query_instantiation_expression) (rule primary_expression))
(precedences (rule type_query) (rule primary_expression))
(precedences (rule override_modifier) (rule primary_expression))
(precedences (rule decorator_call_expression) (rule decorator))
(precedences (rule literal_type) (rule pattern))
(precedences (rule predefined_type) (rule pattern))
(precedences (rule call_expression) (rule type_query_call_expression))
(precedences (rule call_expression) (rule type_query_call_expression_in_type_annotation))
(precedences (rule new_expression) (rule primary_expression))
(precedences (rule meta_property) (rule primary_expression))
(precedences (rule construct_signature) (rule property_name))
(scanner automatic_semicolon (tokens automatic_semicolon) (operations (if atEnd (then (emit automatic_semicolon))) mark (push looking (integer 1)) (while (greater (depth looking) (integer 0)) (do (if atEnd (then (while (greater (depth looking) (integer 0)) (do (pop looking))) (emit automatic_semicolon))) (if (next (literal %7D)) (then (while (greater (depth looking) (integer 0)) (do (pop looking))) advance (while (next (class plain (char %20) (char %09) (char %0A) (char %0B) (char %0C) (char %0D))) (do advance)) (if (all (next (literal %3A)) (not (expected (literal %7C%7C)))) (then fail)) (emit automatic_semicolon))) (if (not (next (class plain (char %20) (char %09) (char %0A) (char %0B) (char %0C) (char %0D)))) (then fail)) (if (next (literal %0A)) (then (while (greater (depth looking) (integer 0)) (do (pop looking)))) (else advance)))) advance (push scanning (integer 1)) (while (greater (depth scanning) (integer 0)) (do (while (next (class plain (char %20) (char %09) (char %0A) (char %0B) (char %0C) (char %0D))) (do advance)) (if (next (literal %2F)) (then advance (if (next (literal %2F)) (then advance (while (not (some atEnd (next (literal %0A)))) (do advance))) (else (if (next (literal %2A)) (then advance (push block (integer 1)) (while (all (greater (depth block) (integer 0)) (not atEnd)) (do (if (next (literal %2A)) (then advance (if (next (literal %2F)) (then advance (while (greater (depth block) (integer 0)) (do (pop block)))))) (else advance)))) (while (greater (depth block) (integer 0)) (do (pop block)))) (else fail))))) (else (while (greater (depth scanning) (integer 0)) (do (pop scanning))))))) (if (some (next (literal %60)) (next (literal %2C)) (next (literal .)) (next (literal %3B)) (next (literal %2A)) (next (literal %25)) (next (literal %3E)) (next (literal %3C)) (next (literal %3D)) (next (literal %3F)) (next (literal %5E)) (next (literal %7C)) (next (literal %26)) (next (literal %2F)) (next (literal %3A))) (then fail)) (if (all (next (literal %7B)) (expected (ref function_signature_automatic_semicolon))) (then fail)) (if (all (some (next (literal %28)) (next (literal %5B))) (expected (literal %7C%7C))) (then fail)) (if (next (literal %2B)) (then (if (next (literal %2B%2B)) (then (emit automatic_semicolon)) (else fail)))) (if (next (literal -)) (then (if (next (literal --)) (then (emit automatic_semicolon)) (else fail)))) (if (next (literal %21)) (then (if (next (literal %21%3D)) (then fail) (else (emit automatic_semicolon))))) (if (next (literal in)) (then (if (not (next (seq (literal in) (class plain (range a z) (range A Z))))) (then fail)) (if (next (literal instanceof)) (then (if (not (next (seq (literal instanceof) (class plain (range a z) (range A Z))))) (then fail)))))) (emit automatic_semicolon)))
(scanner template_characters (tokens template_characters) (operations (while (not atEnd) (do mark (if (some (next (literal %60)) (next (literal %5C)) (next (literal %24%7B))) (then (if (greater (depth content) (integer 0)) (then (while (greater (depth content) (integer 0)) (do (pop content))) (emit template_characters)) (else fail)))) advance (if (equal (depth content) (integer 0)) (then (push content (integer 1)))))) fail))
(scanner ternary_question_mark (tokens ternary_question_mark) (operations (while (next (class plain (char %20) (char %09) (char %0A) (char %0B) (char %0C) (char %0D))) (do (skip (class plain (char %20) (char %09) (char %0A) (char %0B) (char %0C) (char %0D))))) (consume (literal %3F)) (if (some (next (literal %3F)) (next (literal .))) (then fail)) mark (while (next (class plain (char %20) (char %09) (char %0A) (char %0B) (char %0C) (char %0D))) (do advance)) (if (some (next (literal %3A)) (next (literal %29)) (next (literal %2C))) (then fail)) (if (next (literal .)) (then advance (if (not (next (class plain (range 0 9)))) (then fail)))) (emit ternary_question_mark)))
(scanner html_comment (tokens html_comment) (operations (if (next (literal %3C%21--)) (then (consume (literal %3C%21--))) (else (consume (literal --%3E)))) (while (not (some atEnd (some (next (literal %0A)) (next (literal %E2%80%A8)) (next (literal %E2%80%A9))))) (do advance)) (if (some (expected (literal %7C%7C)) (expected (ref escape_sequence)) (expected (ref regular_expression_pattern))) (then fail)) mark (emit html_comment)))
(scanner jsx_text (tokens jsx_text) (operations (while (not (some atEnd (some (next (literal %3C)) (next (literal %3E)) (next (literal %7B)) (next (literal %7D)) (next (literal %26))))) (do (if (next (literal %0A)) (then (if (equal (depth at_newline) (integer 0)) (then (push at_newline (integer 1))))) (else (if (not (next (class plain (char %20) (char %09) (char %0A) (char %0B) (char %0C) (char %0D)))) (then (while (greater (depth at_newline) (integer 0)) (do (pop at_newline))))) (if (not (greater (depth at_newline) (integer 0))) (then (if (equal (depth text) (integer 0)) (then (push text (integer 1)))))))) advance)) (while (greater (depth at_newline) (integer 0)) (do (pop at_newline))) (if (greater (depth text) (integer 0)) (then (while (greater (depth text) (integer 0)) (do (pop text))) (emit jsx_text))) fail))
(scanner function_signature_automatic_semicolon (tokens function_signature_automatic_semicolon) (operations fail))
(scanner error_recovery (tokens error_recovery) (operations fail))
(rule program normal (seq (optional (ref hash_bang_line)) (repeat0 (ref statement))) (concept grammar.program))
(rule hash_bang_line token (seq (literal %23%21) (repeat0 (class negated (char %0A)))) (concept grammar.hash-bang-line))
(rule export_statement normal (choice unordered (choice unordered (seq (token (seq (literal export) (not (ref word_characters)))) (choice unordered (seq (literal %2A) (ref from_clause)) (seq (ref namespace_export) (ref from_clause)) (seq (ref export_clause) (ref from_clause)) (ref export_clause)) (ref semicolon)) (seq (repeat0 (capture labeled decorator (ref decorator))) (token (seq (literal export) (not (ref word_characters)))) (choice unordered (capture labeled declaration (ref declaration)) (seq (token (seq (literal default) (not (ref word_characters)))) (choice unordered (capture labeled declaration (ref declaration)) (seq (capture labeled value (ref expression)) (ref semicolon))))))) (seq (token (seq (literal export) (not (ref word_characters)))) (token (seq (literal type) (not (ref word_characters)))) (ref export_clause) (optional (ref from_clause)) (ref semicolon)) (seq (token (seq (literal export) (not (ref word_characters)))) (literal %3D) (ref expression) (ref semicolon)) (seq (token (seq (literal export) (not (ref word_characters)))) (token (seq (literal as) (not (ref word_characters)))) (token (seq (literal namespace) (not (ref word_characters)))) (ref identifier) (ref semicolon))) (concept grammar.export-statement))
(rule namespace_export normal (seq (literal %2A) (token (seq (literal as) (not (ref word_characters)))) (ref module_export_name)) (concept grammar.namespace-export))
(rule export_clause normal (seq (literal %7B) (optional (seq (ref export_specifier) (repeat0 (seq (literal %2C) (ref export_specifier))))) (optional (literal %2C)) (literal %7D)) (concept grammar.export-clause))
(rule export_specifier normal (seq (optional (choice unordered (token (seq (literal type) (not (ref word_characters)))) (token (seq (literal typeof) (not (ref word_characters)))))) (seq (capture labeled name (ref module_export_name)) (optional (seq (token (seq (literal as) (not (ref word_characters)))) (capture labeled alias (ref module_export_name)))))) (concept grammar.export-specifier))
(rule module_export_name silent (choice unordered (ref identifier) (ref string)) (concept grammar.module-export-name) (source-names (tree-sitter _module_export_name)))
(rule declaration silent (choice unordered (choice unordered (ref function_declaration) (ref generator_function_declaration) (ref class_declaration) (ref lexical_declaration) (ref variable_declaration)) (ref function_signature) (ref abstract_class_declaration) (ref module) (namedPrecedence declaration none (ref internal_module)) (ref type_alias_declaration) (ref enumeration_declaration) (ref interface_declaration) (ref import_alias) (ref ambient_declaration)) (concept grammar.declaration))
(rule import normal (token (seq (literal import) (not (ref word_characters)))) (concept grammar.import))
(rule import_statement normal (seq (token (seq (literal import) (not (ref word_characters)))) (optional (choice unordered (token (seq (literal type) (not (ref word_characters)))) (token (seq (literal typeof) (not (ref word_characters)))))) (choice unordered (seq (ref import_clause) (ref from_clause)) (ref import_require_clause) (capture labeled source (ref string))) (optional (ref import_attribute)) (ref semicolon)) (concept grammar.import-statement))
(rule import_clause normal (choice unordered (ref namespace_import) (ref named_imports) (seq (ref import_identifier) (optional (seq (literal %2C) (choice unordered (ref namespace_import) (ref named_imports)))))) (concept grammar.import-clause))
(rule from_clause silent (seq (token (seq (literal from) (not (ref word_characters)))) (capture labeled source (ref string))) (concept grammar.from-clause) (source-names (tree-sitter _from_clause)))
(rule namespace_import normal (seq (literal %2A) (token (seq (literal as) (not (ref word_characters)))) (ref identifier)) (concept grammar.namespace-import))
(rule named_imports normal (seq (literal %7B) (optional (seq (ref import_specifier) (repeat0 (seq (literal %2C) (ref import_specifier))))) (optional (literal %2C)) (literal %7D)) (concept grammar.named-imports))
(rule import_specifier normal (seq (optional (choice unordered (token (seq (literal type) (not (ref word_characters)))) (token (seq (literal typeof) (not (ref word_characters)))))) (choice unordered (capture labeled name (ref import_identifier)) (seq (capture labeled name (choice unordered (ref module_export_name) (alias identifier (token (seq (literal type) (not (ref word_characters))))))) (token (seq (literal as) (not (ref word_characters)))) (capture labeled alias (ref import_identifier))))) (concept grammar.import-specifier))
(rule import_attribute normal (seq (choice unordered (token (seq (literal with) (not (ref word_characters)))) (token (seq (literal assert) (not (ref word_characters))))) (ref object)) (concept grammar.import-attribute))
(rule statement silent (choice unordered (ref export_statement) (ref import_statement) (ref debugger_statement) (ref expression_statement) (ref declaration) (ref statement_block) (ref if_statement) (ref switch_statement) (ref for_statement) (ref for_in_statement) (ref while_statement) (ref do_statement) (ref try_statement) (ref with_statement) (ref break_statement) (ref continue_statement) (ref return_statement) (ref throw_statement) (ref empty_statement) (ref labeled_statement)) (concept grammar.statement))
(rule expression_statement normal (seq (ref expressions) (ref semicolon)) (concept grammar.expression-statement))
(rule variable_declaration normal (seq (token (seq (literal var) (not (ref word_characters)))) (seq (ref variable_declarator) (repeat0 (seq (literal %2C) (ref variable_declarator)))) (ref semicolon)) (concept grammar.variable-declaration))
(rule lexical_declaration normal (seq (capture labeled kind (choice unordered (token (seq (literal let) (not (ref word_characters)))) (token (seq (literal const) (not (ref word_characters)))))) (seq (ref variable_declarator) (repeat0 (seq (literal %2C) (ref variable_declarator)))) (ref semicolon)) (concept grammar.lexical-declaration))
(rule variable_declarator normal (choice unordered (seq (capture labeled name (choice unordered (ref identifier) (ref destructuring_pattern))) (capture labeled type (optional (ref type_annotation))) (optional (ref initializer))) (namedPrecedence declaration none (seq (capture labeled name (ref identifier)) (literal %21) (capture labeled type (ref type_annotation))))) (concept grammar.variable-declarator))
(rule statement_block normal (precedence 0 right (seq (literal %7B) (repeat0 (ref statement)) (literal %7D) (optional (alias unnamed_token (immediateToken (ref automatic_semicolon)))))) (concept grammar.statement-block))
(rule else_clause normal (seq (token (seq (literal else) (not (ref word_characters)))) (ref statement)) (concept grammar.else-clause))
(rule if_statement normal (precedence 0 right (seq (token (seq (literal if) (not (ref word_characters)))) (capture labeled condition (ref parenthesized_expression)) (capture labeled consequence (ref statement)) (optional (capture labeled alternative (ref else_clause))))) (concept grammar.if-statement))
(rule switch_statement normal (seq (token (seq (literal switch) (not (ref word_characters)))) (capture labeled value (ref parenthesized_expression)) (capture labeled body (ref switch_body))) (concept grammar.switch-statement))
(rule for_statement normal (seq (token (seq (literal for) (not (ref word_characters)))) (literal %28) (choice unordered (capture labeled initializer (choice unordered (ref lexical_declaration) (ref variable_declaration))) (seq (capture labeled initializer (ref expressions)) (literal %3B)) (capture labeled initializer (ref empty_statement))) (capture labeled condition (choice unordered (seq (ref expressions) (literal %3B)) (ref empty_statement))) (capture labeled increment (optional (ref expressions))) (literal %29) (capture labeled body (ref statement))) (concept grammar.for-statement))
(rule for_in_statement normal (seq (token (seq (literal for) (not (ref word_characters)))) (optional (token (seq (literal await) (not (ref word_characters))))) (ref for_header) (capture labeled body (ref statement))) (concept grammar.for-in-statement))
(rule for_header silent (seq (literal %28) (choice unordered (capture labeled left (choice unordered (ref left_hand_side_expression) (ref parenthesized_expression))) (seq (capture labeled kind (token (seq (literal var) (not (ref word_characters))))) (capture labeled left (choice unordered (ref identifier) (ref destructuring_pattern))) (optional (ref initializer))) (seq (capture labeled kind (choice unordered (token (seq (literal let) (not (ref word_characters)))) (token (seq (literal const) (not (ref word_characters)))))) (capture labeled left (choice unordered (ref identifier) (ref destructuring_pattern))) (optional (alias unnamed_token (immediateToken (ref automatic_semicolon)))))) (capture labeled operator (choice unordered (token (seq (literal in) (not (ref word_characters)))) (token (seq (literal of) (not (ref word_characters)))))) (capture labeled right (ref expressions)) (literal %29)) (concept grammar.for-header) (source-names (tree-sitter _for_header)))
(rule while_statement normal (seq (token (seq (literal while) (not (ref word_characters)))) (capture labeled condition (ref parenthesized_expression)) (capture labeled body (ref statement))) (concept grammar.while-statement))
(rule do_statement normal (precedence 0 right (seq (token (seq (literal do) (not (ref word_characters)))) (capture labeled body (ref statement)) (token (seq (literal while) (not (ref word_characters)))) (capture labeled condition (ref parenthesized_expression)) (optional (ref semicolon)))) (concept grammar.do-statement))
(rule try_statement normal (seq (token (seq (literal try) (not (ref word_characters)))) (capture labeled body (ref statement_block)) (optional (capture labeled handler (ref catch_clause))) (optional (capture labeled finalizer (ref finally_clause)))) (concept grammar.try-statement))
(rule with_statement normal (seq (token (seq (literal with) (not (ref word_characters)))) (capture labeled object (ref parenthesized_expression)) (capture labeled body (ref statement))) (concept grammar.with-statement))
(rule break_statement normal (seq (token (seq (literal break) (not (ref word_characters)))) (capture labeled label (optional (alias statement_identifier (ref identifier)))) (ref semicolon)) (concept grammar.break-statement))
(rule continue_statement normal (seq (token (seq (literal continue) (not (ref word_characters)))) (capture labeled label (optional (alias statement_identifier (ref identifier)))) (ref semicolon)) (concept grammar.continue-statement))
(rule debugger_statement normal (seq (token (seq (literal debugger) (not (ref word_characters)))) (ref semicolon)) (concept grammar.debugger-statement))
(rule return_statement normal (seq (token (seq (literal return) (not (ref word_characters)))) (optional (ref expressions)) (ref semicolon)) (concept grammar.return-statement))
(rule throw_statement normal (seq (token (seq (literal throw) (not (ref word_characters)))) (ref expressions) (ref semicolon)) (concept grammar.throw-statement))
(rule empty_statement normal (literal %3B) (concept grammar.empty-statement))
(rule labeled_statement normal (dynamicPrecedence -1 (seq (capture labeled label (alias statement_identifier (choice unordered (ref identifier) (ref reserved_identifier)))) (literal %3A) (capture labeled body (ref statement)))) (concept grammar.labeled-statement))
(rule switch_body normal (seq (literal %7B) (repeat0 (choice unordered (ref switch_case) (ref switch_default))) (literal %7D)) (concept grammar.switch-body))
(rule switch_case normal (seq (token (seq (literal case) (not (ref word_characters)))) (capture labeled value (ref expressions)) (literal %3A) (capture labeled body (repeat0 (ref statement)))) (concept grammar.switch-case))
(rule switch_default normal (seq (token (seq (literal default) (not (ref word_characters)))) (literal %3A) (capture labeled body (repeat0 (ref statement)))) (concept grammar.switch-default))
(rule catch_clause normal (seq (token (seq (literal catch) (not (ref word_characters)))) (optional (seq (literal %28) (capture labeled parameter (choice unordered (ref identifier) (ref destructuring_pattern))) (optional (capture labeled type (ref type_annotation))) (literal %29))) (capture labeled body (ref statement_block))) (concept grammar.catch-clause))
(rule finally_clause normal (seq (token (seq (literal finally) (not (ref word_characters)))) (capture labeled body (ref statement_block))) (concept grammar.finally-clause))
(rule parenthesized_expression normal (seq (literal %28) (choice unordered (seq (ref expression) (capture labeled type (optional (ref type_annotation)))) (ref sequence_expression)) (literal %29)) (concept grammar.parenthesized-expression))
(rule expressions silent (choice unordered (ref expression) (ref sequence_expression)) (concept grammar.expression-or-sequence) (source-names (tree-sitter _expressions)))
(rule expression silent (choice unordered (ref as_expression) (ref satisfies_expression) (ref instantiation_expression) (ref internal_module) (ref type_assertion) (ref primary_expression) (ref assignment_expression) (ref augmented_assignment_expression) (ref await_expression) (ref unary_expression) (ref binary_expression) (ref ternary_expression) (ref update_expression) (ref new_expression) (ref yield_expression)) (concept grammar.expression))
(rule primary_expression silent (choice unordered (choice unordered (ref subscript_expression) (ref member_expression) (ref parenthesized_expression) (ref identifier_choice) (alias identifier (choice unordered (token (seq (literal declare) (not (ref word_characters)))) (token (seq (literal namespace) (not (ref word_characters)))) (token (seq (literal type) (not (ref word_characters)))) (token (seq (literal public) (not (ref word_characters)))) (token (seq (literal private) (not (ref word_characters)))) (token (seq (literal protected) (not (ref word_characters)))) (token (seq (literal override) (not (ref word_characters)))) (token (seq (literal readonly) (not (ref word_characters)))) (token (seq (literal module) (not (ref word_characters)))) (token (seq (literal any) (not (ref word_characters)))) (token (seq (literal number) (not (ref word_characters)))) (token (seq (literal boolean) (not (ref word_characters)))) (token (seq (literal string) (not (ref word_characters)))) (token (seq (literal symbol) (not (ref word_characters)))) (token (seq (literal export) (not (ref word_characters)))) (token (seq (literal object) (not (ref word_characters)))) (token (seq (literal new) (not (ref word_characters)))) (token (seq (literal readonly) (not (ref word_characters)))) (choice unordered (token (seq (literal get) (not (ref word_characters)))) (token (seq (literal set) (not (ref word_characters)))) (token (seq (literal async) (not (ref word_characters)))) (token (seq (literal static) (not (ref word_characters)))) (token (seq (literal export) (not (ref word_characters)))) (token (seq (literal let) (not (ref word_characters))))))) (ref this) (ref super) (ref number) (ref string) (ref template_string) (ref regular_expression) (ref true) (ref false) (ref null) (ref object) (ref array) (ref function_expression) (ref arrow_function) (ref generator_function) (ref class) (ref meta_property) (ref call_expression)) (ref non_null_expression)) (concept grammar.primary-expression))
(rule yield_expression normal (precedence 0 right (seq (token (seq (literal yield) (not (ref word_characters)))) (choice unordered (seq (literal %2A) (ref expression)) (optional (ref expression))))) (concept grammar.yield-expression))
(rule object normal (namedPrecedence object none (seq (literal %7B) (optional (seq (optional (choice unordered (ref pair) (ref spread_element) (ref method_definition) (alias shorthand_property_identifier (choice unordered (ref identifier) (ref reserved_identifier))))) (repeat0 (seq (literal %2C) (optional (choice unordered (ref pair) (ref spread_element) (ref method_definition) (alias shorthand_property_identifier (choice unordered (ref identifier) (ref reserved_identifier))))))))) (literal %7D))) (concept grammar.object))
(rule object_pattern normal (namedPrecedence object none (seq (literal %7B) (optional (seq (optional (choice unordered (ref pair_pattern) (ref rest_pattern) (ref object_assignment_pattern) (alias shorthand_property_identifier_pattern (choice unordered (ref identifier) (ref reserved_identifier))))) (repeat0 (seq (literal %2C) (optional (choice unordered (ref pair_pattern) (ref rest_pattern) (ref object_assignment_pattern) (alias shorthand_property_identifier_pattern (choice unordered (ref identifier) (ref reserved_identifier))))))))) (literal %7D))) (concept grammar.object-pattern))
(rule assignment_pattern normal (seq (capture labeled left (ref pattern)) (literal %3D) (capture labeled right (ref expression))) (concept grammar.assignment-pattern))
(rule object_assignment_pattern normal (seq (capture labeled left (choice unordered (alias shorthand_property_identifier_pattern (choice unordered (ref reserved_identifier) (ref identifier))) (ref destructuring_pattern))) (literal %3D) (capture labeled right (ref expression))) (concept grammar.object-assignment-pattern))
(rule array normal (seq (literal %5B) (optional (seq (optional (choice unordered (ref expression) (ref spread_element))) (repeat0 (seq (literal %2C) (optional (choice unordered (ref expression) (ref spread_element))))))) (literal %5D)) (concept grammar.array))
(rule array_pattern normal (seq (literal %5B) (optional (seq (optional (choice unordered (ref pattern) (ref assignment_pattern))) (repeat0 (seq (literal %2C) (optional (choice unordered (ref pattern) (ref assignment_pattern))))))) (literal %5D)) (concept grammar.array-pattern))
(rule jsx_element_choice silent (choice unordered (ref jsx_element) (ref jsx_self_closing_element)) (concept grammar.jsx-element-choice) (source-names (tree-sitter _jsx_element)))
(rule jsx_element normal (seq (capture labeled open_tag (ref jsx_opening_element)) (repeat0 (ref jsx_child)) (capture labeled close_tag (ref jsx_closing_element))) (concept grammar.jsx-element))
(rule html_character_reference token (seq (literal %26) (choice unordered (seq (literal %23) (choice unordered (seq (class plain (char x) (char X)) (repeat 1 6 (class plain (range 0 9) (range a f) (range A F)))) (repeat 1 5 (class plain (range 0 9))))) (repeat 1 30 (class plain (range A Z) (range a z)))) (literal %3B)) (concept grammar.html-character-reference))
(rule jsx_expression normal (seq (literal %7B) (optional (choice unordered (ref expression) (ref sequence_expression) (ref spread_element))) (literal %7D)) (concept grammar.jsx-expression))
(rule jsx_child silent (choice unordered (alias jsx_text (immediateToken (ref jsx_text))) (ref html_character_reference) (ref jsx_element_choice) (ref jsx_expression)) (concept grammar.jsx-child) (source-names (tree-sitter _jsx_child)))
(rule jsx_opening_element normal (dynamicPrecedence -1 (seq (ref jsx_start_opening_element) (literal %3E))) (concept grammar.jsx-opening-element))
(rule jsx_identifier token (seq (class plain (range a z) (range A Z) (char _) (char %24)) (repeat0 (class plain (range a z) (range A Z) (range 0 9) (char _) (char %24))) (literal -) (repeat0 (class plain (range a z) (range A Z) (range 0 9) (char _) (char %24) (char -)))) (concept grammar.jsx-identifier))
(rule jsx_identifier_choice silent (choice unordered (alias identifier (ref jsx_identifier)) (ref identifier)) (concept grammar.jsx-identifier-choice) (source-names (tree-sitter _jsx_identifier)))
(rule nested_identifier normal (namedPrecedence member none (seq (capture labeled object (choice unordered (ref identifier) (alias member_expression (ref nested_identifier)))) (literal .) (capture labeled property (alias property_identifier (ref identifier))))) (concept grammar.nested-identifier))
(rule jsx_namespace_name normal (seq (ref jsx_identifier_choice) (literal %3A) (ref jsx_identifier_choice)) (concept grammar.jsx-namespace-name))
(rule jsx_element_name silent (choice unordered (ref jsx_identifier_choice) (alias member_expression (ref nested_identifier)) (ref jsx_namespace_name)) (concept grammar.jsx-element-name) (source-names (tree-sitter _jsx_element_name)))
(rule jsx_closing_element normal (seq (literal %3C%2F) (optional (capture labeled name (ref jsx_element_name))) (literal %3E)) (concept grammar.jsx-closing-element))
(rule jsx_self_closing_element normal (dynamicPrecedence -1 (seq (ref jsx_start_opening_element) (literal %2F%3E))) (concept grammar.jsx-self-closing-element))
(rule jsx_attribute_choice silent (choice unordered (ref jsx_attribute) (ref jsx_expression)) (concept grammar.jsx-attribute-choice) (source-names (tree-sitter _jsx_attribute)))
(rule jsx_attribute_name silent (choice unordered (alias property_identifier (choice unordered (alias identifier (ref jsx_identifier)) (ref identifier))) (ref jsx_namespace_name)) (concept grammar.jsx-attribute-name) (source-names (tree-sitter _jsx_attribute_name)))
(rule jsx_attribute normal (seq (ref jsx_attribute_name) (optional (seq (literal %3D) (ref jsx_attribute_value)))) (concept grammar.jsx-attribute))
(rule jsx_string silent (choice unordered (seq (literal %22) (repeat0 (choice unordered (alias string_fragment (immediateToken (lexicalPrecedence 1 (repeat1 (choice unordered (class negated (char %22) (char %26)) (seq (literal %26) (class negated (char %23) (range A Z) (range a z)))))))) (ref html_character_reference))) (literal %22)) (seq (literal %27) (repeat0 (choice unordered (alias string_fragment (immediateToken (lexicalPrecedence 1 (repeat1 (choice unordered (class negated (char %27) (char %26)) (seq (literal %26) (class negated (char %23) (range A Z) (range a z)))))))) (ref html_character_reference))) (literal %27))) (concept grammar.jsx-string) (source-names (tree-sitter _jsx_string)))
(rule unescaped_double_jsx_string_fragment silent (alias unescaped_double_jsx_string_fragment (immediateToken (lexicalPrecedence 1 (repeat1 (choice unordered (class negated (char %22) (char %26)) (seq (literal %26) (class negated (char %23) (range A Z) (range a z)))))))) (concept grammar.unescaped-double-jsx-string-fragment))
(rule unescaped_single_jsx_string_fragment silent (alias unescaped_single_jsx_string_fragment (immediateToken (lexicalPrecedence 1 (repeat1 (choice unordered (class negated (char %27) (char %26)) (seq (literal %26) (class negated (char %23) (range A Z) (range a z)))))))) (concept grammar.unescaped-single-jsx-string-fragment))
(rule jsx_attribute_value silent (choice unordered (alias string (ref jsx_string)) (ref jsx_expression) (ref jsx_element_choice)) (concept grammar.jsx-attribute-value) (source-names (tree-sitter _jsx_attribute_value)))
(rule class normal (namedPrecedence literal none (seq (repeat0 (capture labeled decorator (ref decorator))) (token (seq (literal class) (not (ref word_characters)))) (capture labeled name (optional (ref type_identifier_alias))) (capture labeled type_parameters (optional (ref type_parameters))) (optional (ref class_heritage)) (capture labeled body (ref class_body)))) (concept grammar.class))
(rule class_declaration normal (namedPrecedence declaration left (seq (repeat0 (capture labeled decorator (ref decorator))) (token (seq (literal class) (not (ref word_characters)))) (capture labeled name (ref type_identifier_alias)) (capture labeled type_parameters (optional (ref type_parameters))) (optional (ref class_heritage)) (capture labeled body (ref class_body)) (optional (alias unnamed_token (immediateToken (ref automatic_semicolon)))))) (concept grammar.class-declaration))
(rule class_heritage normal (choice unordered (seq (ref extends_clause) (optional (ref implements_clause))) (ref implements_clause)) (concept grammar.class-heritage))
(rule function_expression normal (namedPrecedence literal none (seq (optional (token (seq (literal async) (not (ref word_characters))))) (token (seq (literal function) (not (ref word_characters)))) (capture labeled name (optional (ref identifier))) (ref call_signature_parts) (capture labeled body (ref statement_block)))) (concept grammar.function-expression))
(rule function_declaration normal (namedPrecedence declaration right (seq (optional (token (seq (literal async) (not (ref word_characters))))) (token (seq (literal function) (not (ref word_characters)))) (capture labeled name (ref identifier)) (ref call_signature_parts) (capture labeled body (ref statement_block)) (optional (alias unnamed_token (immediateToken (ref automatic_semicolon)))))) (concept grammar.function-declaration))
(rule generator_function normal (namedPrecedence literal none (seq (optional (token (seq (literal async) (not (ref word_characters))))) (token (seq (literal function) (not (ref word_characters)))) (literal %2A) (capture labeled name (optional (ref identifier))) (ref call_signature_parts) (capture labeled body (ref statement_block)))) (concept grammar.generator-function))
(rule generator_function_declaration normal (namedPrecedence declaration right (seq (optional (token (seq (literal async) (not (ref word_characters))))) (token (seq (literal function) (not (ref word_characters)))) (literal %2A) (capture labeled name (ref identifier)) (ref call_signature_parts) (capture labeled body (ref statement_block)) (optional (alias unnamed_token (immediateToken (ref automatic_semicolon)))))) (concept grammar.generator-function-declaration))
(rule arrow_function normal (seq (optional (token (seq (literal async) (not (ref word_characters))))) (choice unordered (capture labeled parameter (choice unordered (alias identifier (choice unordered (token (seq (literal declare) (not (ref word_characters)))) (token (seq (literal namespace) (not (ref word_characters)))) (token (seq (literal type) (not (ref word_characters)))) (token (seq (literal public) (not (ref word_characters)))) (token (seq (literal private) (not (ref word_characters)))) (token (seq (literal protected) (not (ref word_characters)))) (token (seq (literal override) (not (ref word_characters)))) (token (seq (literal readonly) (not (ref word_characters)))) (token (seq (literal module) (not (ref word_characters)))) (token (seq (literal any) (not (ref word_characters)))) (token (seq (literal number) (not (ref word_characters)))) (token (seq (literal boolean) (not (ref word_characters)))) (token (seq (literal string) (not (ref word_characters)))) (token (seq (literal symbol) (not (ref word_characters)))) (token (seq (literal export) (not (ref word_characters)))) (token (seq (literal object) (not (ref word_characters)))) (token (seq (literal new) (not (ref word_characters)))) (token (seq (literal readonly) (not (ref word_characters)))) (choice unordered (token (seq (literal get) (not (ref word_characters)))) (token (seq (literal set) (not (ref word_characters)))) (token (seq (literal async) (not (ref word_characters)))) (token (seq (literal static) (not (ref word_characters)))) (token (seq (literal export) (not (ref word_characters)))) (token (seq (literal let) (not (ref word_characters))))))) (ref identifier))) (ref call_signature_parts)) (literal %3D%3E) (capture labeled body (choice unordered (ref expression) (ref statement_block)))) (concept grammar.arrow-function))
(rule call_signature_parts silent (seq (capture labeled type_parameters (optional (ref type_parameters))) (capture labeled parameters (ref formal_parameters)) (capture labeled return_type (optional (choice unordered (ref type_annotation) (ref asserts_annotation) (ref type_predicate_annotation))))) (concept grammar.call-signature-parts) (source-names (tree-sitter _call_signature)))
(rule formal_parameter silent (choice unordered (ref required_parameter) (ref optional_parameter)) (concept grammar.formal-parameter) (source-names (tree-sitter _formal_parameter)))
(rule optional_chain normal (literal %3F.) (concept grammar.optional-chain))
(rule call_expression normal (choice unordered (namedPrecedence call none (seq (capture labeled function (choice unordered (ref expression) (ref import))) (capture labeled type_arguments (optional (ref type_arguments))) (capture labeled arguments (ref arguments)))) (namedPrecedence template_call none (seq (capture labeled function (choice unordered (ref primary_expression) (ref new_expression))) (capture labeled arguments (ref template_string)))) (namedPrecedence member none (seq (capture labeled function (ref primary_expression)) (literal %3F.) (capture labeled type_arguments (optional (ref type_arguments))) (capture labeled arguments (ref arguments))))) (concept grammar.call-expression))
(rule new_expression normal (namedPrecedence new right (seq (token (seq (literal new) (not (ref word_characters)))) (capture labeled constructor (ref primary_expression)) (capture labeled type_arguments (optional (ref type_arguments))) (capture labeled arguments (optional (ref arguments))))) (concept grammar.new-expression))
(rule await_expression normal (namedPrecedence unary_void none (seq (token (seq (literal await) (not (ref word_characters)))) (ref expression))) (concept grammar.await-expression))
(rule member_expression normal (namedPrecedence member none (seq (capture labeled object (choice unordered (ref expression) (ref primary_expression) (ref import))) (choice unordered (literal .) (capture labeled optional_chain (ref optional_chain))) (capture labeled property (choice unordered (ref private_property_identifier) (alias property_identifier (ref identifier)))))) (concept grammar.member-expression))
(rule subscript_expression normal (namedPrecedence member right (seq (capture labeled object (choice unordered (ref expression) (ref primary_expression))) (optional (capture labeled optional_chain (ref optional_chain))) (literal %5B) (capture labeled index (ref expressions)) (literal %5D))) (concept grammar.subscript-expression))
(rule left_hand_side_expression silent (choice unordered (choice unordered (ref member_expression) (ref subscript_expression) (ref identifier_choice) (alias identifier (choice unordered (token (seq (literal declare) (not (ref word_characters)))) (token (seq (literal namespace) (not (ref word_characters)))) (token (seq (literal type) (not (ref word_characters)))) (token (seq (literal public) (not (ref word_characters)))) (token (seq (literal private) (not (ref word_characters)))) (token (seq (literal protected) (not (ref word_characters)))) (token (seq (literal override) (not (ref word_characters)))) (token (seq (literal readonly) (not (ref word_characters)))) (token (seq (literal module) (not (ref word_characters)))) (token (seq (literal any) (not (ref word_characters)))) (token (seq (literal number) (not (ref word_characters)))) (token (seq (literal boolean) (not (ref word_characters)))) (token (seq (literal string) (not (ref word_characters)))) (token (seq (literal symbol) (not (ref word_characters)))) (token (seq (literal export) (not (ref word_characters)))) (token (seq (literal object) (not (ref word_characters)))) (token (seq (literal new) (not (ref word_characters)))) (token (seq (literal readonly) (not (ref word_characters)))) (choice unordered (token (seq (literal get) (not (ref word_characters)))) (token (seq (literal set) (not (ref word_characters)))) (token (seq (literal async) (not (ref word_characters)))) (token (seq (literal static) (not (ref word_characters)))) (token (seq (literal export) (not (ref word_characters)))) (token (seq (literal let) (not (ref word_characters))))))) (ref destructuring_pattern)) (ref non_null_expression)) (concept grammar.left-hand-side-expression) (source-names (tree-sitter _lhs_expression)))
(rule assignment_expression normal (namedPrecedence assign right (seq (optional (token (seq (literal using) (not (ref word_characters))))) (capture labeled left (choice unordered (ref parenthesized_expression) (ref left_hand_side_expression))) (literal %3D) (capture labeled right (ref expression)))) (concept grammar.assignment-expression))
(rule augmented_assignment_left_hand_side silent (choice unordered (choice unordered (ref member_expression) (ref subscript_expression) (alias identifier (choice unordered (token (seq (literal declare) (not (ref word_characters)))) (token (seq (literal namespace) (not (ref word_characters)))) (token (seq (literal type) (not (ref word_characters)))) (token (seq (literal public) (not (ref word_characters)))) (token (seq (literal private) (not (ref word_characters)))) (token (seq (literal protected) (not (ref word_characters)))) (token (seq (literal override) (not (ref word_characters)))) (token (seq (literal readonly) (not (ref word_characters)))) (token (seq (literal module) (not (ref word_characters)))) (token (seq (literal any) (not (ref word_characters)))) (token (seq (literal number) (not (ref word_characters)))) (token (seq (literal boolean) (not (ref word_characters)))) (token (seq (literal string) (not (ref word_characters)))) (token (seq (literal symbol) (not (ref word_characters)))) (token (seq (literal export) (not (ref word_characters)))) (token (seq (literal object) (not (ref word_characters)))) (token (seq (literal new) (not (ref word_characters)))) (token (seq (literal readonly) (not (ref word_characters)))) (choice unordered (token (seq (literal get) (not (ref word_characters)))) (token (seq (literal set) (not (ref word_characters)))) (token (seq (literal async) (not (ref word_characters)))) (token (seq (literal static) (not (ref word_characters)))) (token (seq (literal export) (not (ref word_characters)))) (token (seq (literal let) (not (ref word_characters))))))) (ref identifier) (ref parenthesized_expression)) (ref non_null_expression)) (concept grammar.augmented-assignment-left-hand-side) (source-names (tree-sitter _augmented_assignment_lhs)))
(rule augmented_assignment_expression normal (namedPrecedence assign right (seq (capture labeled left (ref augmented_assignment_left_hand_side)) (capture labeled operator (choice unordered (literal %2B%3D) (literal -%3D) (literal %2A%3D) (literal %2F%3D) (literal %25%3D) (literal %5E%3D) (literal %26%3D) (literal %7C%3D) (literal %3E%3E%3D) (literal %3E%3E%3E%3D) (literal %3C%3C%3D) (literal %2A%2A%3D) (literal %26%26%3D) (literal %7C%7C%3D) (literal %3F%3F%3D))) (capture labeled right (ref expression)))) (concept grammar.augmented-assignment-expression))
(rule initializer silent (seq (literal %3D) (capture labeled value (ref expression))) (concept grammar.initializer) (source-names (tree-sitter _initializer)))
(rule destructuring_pattern silent (choice unordered (ref object_pattern) (ref array_pattern)) (concept grammar.destructuring-pattern) (source-names (tree-sitter _destructuring_pattern)))
(rule spread_element normal (seq (literal ...) (ref expression)) (concept grammar.spread-element))
(rule ternary_expression normal (namedPrecedence ternary right (seq (capture labeled condition (ref expression)) (alias %27%3F (ref ternary_question_mark)) (capture labeled consequence (ref expression)) (literal %3A) (capture labeled alternative (ref expression)))) (concept grammar.ternary-expression))
(rule binary_expression normal (choice unordered (namedPrecedence logical_and left (seq (capture labeled left (ref expression)) (capture labeled operator (literal %26%26)) (capture labeled right (ref expression)))) (namedPrecedence logical_or left (seq (capture labeled left (ref expression)) (capture labeled operator (literal %7C%7C)) (capture labeled right (ref expression)))) (namedPrecedence binary_shift left (seq (capture labeled left (ref expression)) (capture labeled operator (literal %3E%3E)) (capture labeled right (ref expression)))) (namedPrecedence binary_shift left (seq (capture labeled left (ref expression)) (capture labeled operator (literal %3E%3E%3E)) (capture labeled right (ref expression)))) (namedPrecedence binary_shift left (seq (capture labeled left (ref expression)) (capture labeled operator (literal %3C%3C)) (capture labeled right (ref expression)))) (namedPrecedence bitwise_and left (seq (capture labeled left (ref expression)) (capture labeled operator (literal %26)) (capture labeled right (ref expression)))) (namedPrecedence bitwise_xor left (seq (capture labeled left (ref expression)) (capture labeled operator (literal %5E)) (capture labeled right (ref expression)))) (namedPrecedence bitwise_or left (seq (capture labeled left (ref expression)) (capture labeled operator (literal %7C)) (capture labeled right (ref expression)))) (namedPrecedence binary_plus left (seq (capture labeled left (ref expression)) (capture labeled operator (literal %2B)) (capture labeled right (ref expression)))) (namedPrecedence binary_plus left (seq (capture labeled left (ref expression)) (capture labeled operator (literal -)) (capture labeled right (ref expression)))) (namedPrecedence binary_times left (seq (capture labeled left (ref expression)) (capture labeled operator (literal %2A)) (capture labeled right (ref expression)))) (namedPrecedence binary_times left (seq (capture labeled left (ref expression)) (capture labeled operator (literal %2F)) (capture labeled right (ref expression)))) (namedPrecedence binary_times left (seq (capture labeled left (ref expression)) (capture labeled operator (literal %25)) (capture labeled right (ref expression)))) (namedPrecedence binary_exp right (seq (capture labeled left (ref expression)) (capture labeled operator (literal %2A%2A)) (capture labeled right (ref expression)))) (namedPrecedence binary_relation left (seq (capture labeled left (ref expression)) (capture labeled operator (literal %3C)) (capture labeled right (ref expression)))) (namedPrecedence binary_relation left (seq (capture labeled left (ref expression)) (capture labeled operator (literal %3C%3D)) (capture labeled right (ref expression)))) (namedPrecedence binary_equality left (seq (capture labeled left (ref expression)) (capture labeled operator (literal %3D%3D)) (capture labeled right (ref expression)))) (namedPrecedence binary_equality left (seq (capture labeled left (ref expression)) (capture labeled operator (literal %3D%3D%3D)) (capture labeled right (ref expression)))) (namedPrecedence binary_equality left (seq (capture labeled left (ref expression)) (capture labeled operator (literal %21%3D)) (capture labeled right (ref expression)))) (namedPrecedence binary_equality left (seq (capture labeled left (ref expression)) (capture labeled operator (literal %21%3D%3D)) (capture labeled right (ref expression)))) (namedPrecedence binary_relation left (seq (capture labeled left (ref expression)) (capture labeled operator (literal %3E%3D)) (capture labeled right (ref expression)))) (namedPrecedence binary_relation left (seq (capture labeled left (ref expression)) (capture labeled operator (literal %3E)) (capture labeled right (ref expression)))) (namedPrecedence ternary left (seq (capture labeled left (ref expression)) (capture labeled operator (literal %3F%3F)) (capture labeled right (ref expression)))) (namedPrecedence binary_relation left (seq (capture labeled left (ref expression)) (capture labeled operator (token (seq (literal instanceof) (not (ref word_characters))))) (capture labeled right (ref expression)))) (namedPrecedence binary_relation left (seq (capture labeled left (choice unordered (ref expression) (ref private_property_identifier))) (capture labeled operator (token (seq (literal in) (not (ref word_characters))))) (capture labeled right (ref expression))))) (concept grammar.binary-expression))
(rule unary_expression normal (namedPrecedence unary_void left (seq (capture labeled operator (choice unordered (literal %21) (literal %7E) (literal -) (literal %2B) (token (seq (literal typeof) (not (ref word_characters)))) (token (seq (literal void) (not (ref word_characters)))) (token (seq (literal delete) (not (ref word_characters)))))) (capture labeled argument (ref expression)))) (concept grammar.unary-expression))
(rule update_expression normal (precedence 0 left (choice unordered (seq (capture labeled argument (ref expression)) (capture labeled operator (choice unordered (literal %2B%2B) (literal --)))) (seq (capture labeled operator (choice unordered (literal %2B%2B) (literal --))) (capture labeled argument (ref expression))))) (concept grammar.update-expression))
(rule sequence_expression normal (precedence 0 right (seq (ref expression) (repeat0 (seq (literal %2C) (ref expression))))) (concept grammar.sequence-expression))
(rule string normal (choice unordered (seq (literal %22) (repeat0 (choice unordered (alias string_fragment (immediateToken (lexicalPrecedence 1 (repeat1 (class negated (char %22) (char %5C) (char %0D) (char %0A)))))) (ref escape_sequence))) (literal %22)) (seq (literal %27) (repeat0 (choice unordered (alias string_fragment (immediateToken (lexicalPrecedence 1 (repeat1 (class negated (char %27) (char %5C) (char %0D) (char %0A)))))) (ref escape_sequence))) (literal %27))) (concept grammar.string))
(rule unescaped_double_string_fragment silent (alias unescaped_double_string_fragment (immediateToken (lexicalPrecedence 1 (repeat1 (class negated (char %22) (char %5C) (char %0D) (char %0A)))))) (concept grammar.unescaped-double-string-fragment))
(rule unescaped_single_string_fragment silent (alias unescaped_single_string_fragment (immediateToken (lexicalPrecedence 1 (repeat1 (class negated (char %27) (char %5C) (char %0D) (char %0A)))))) (concept grammar.unescaped-single-string-fragment))
(rule escape_sequence silent (alias escape_sequence (immediateToken (seq (literal %5C) (choice unordered (class negated (char x) (char u) (range 0 7)) (repeat 1 3 (class plain (range 0 7))) (seq (literal x) (repeat 2 2 (class plain (range 0 9) (range a f) (range A F)))) (seq (literal u) (repeat 4 4 (class plain (range 0 9) (range a f) (range A F)))) (seq (literal u%7B) (repeat1 (class plain (range 0 9) (range a f) (range A F))) (literal %7D)) (seq (class plain (char %0D) (char %3F)) (class plain (char %0A) (char %E2%80%A8) (char %E2%80%A9))))))) (concept grammar.escape-sequence))
(rule comment token (choice unordered (seq (literal %2F%2F) (repeat0 (class negated (char %0D) (char %0A) (char %E2%80%A8) (char %E2%80%A9)))) (seq (literal %2F%2A) (seq (repeat0 (class negated (char %2A))) (repeat1 (literal %2A)) (repeat0 (seq (class negated (char %2F) (char %2A)) (repeat0 (class negated (char %2A))) (repeat1 (literal %2A))))) (literal %2F))) (concept grammar.comment))
(rule template_string normal (seq (literal %60) (repeat0 (choice unordered (alias string_fragment (immediateToken (ref template_characters))) (ref escape_sequence) (ref template_substitution))) (literal %60)) (concept grammar.template-string))
(rule template_substitution normal (seq (literal %24%7B) (ref expressions) (literal %7D)) (concept grammar.template-substitution))
(rule regular_expression normal (seq (literal %2F) (capture labeled pattern (ref regular_expression_pattern)) (immediateToken (lexicalPrecedence 1 (literal %2F))) (optional (capture labeled flags (ref regular_expression_flags)))) (concept grammar.regular-expression) (source-names (tree-sitter regex)))
(rule regular_expression_pattern silent (alias regular_expression_pattern (immediateToken (lexicalPrecedence -1 (repeat1 (choice unordered (seq (literal %5B) (repeat0 (choice unordered (seq (literal %5C) (class negated (char %0A))) (class negated (char %5D) (char %0A) (char %5C)))) (literal %5D)) (seq (literal %5C) (class negated (char %0A))) (class negated (char %2F) (char %5C) (char %5B) (char %0A))))))) (concept grammar.regular-expression-pattern) (source-names (tree-sitter regex_pattern)))
(rule regular_expression_flags silent (alias regular_expression_flags (immediateToken (repeat1 (class plain (range a z))))) (concept grammar.regular-expression-flags) (source-names (tree-sitter regex_flags)))
(rule number token (choice unordered (seq (choice unordered (literal 0x) (literal 0X)) (seq (class plain (range 0 9) (range a f) (range A F)) (repeat0 (seq (optional (literal _)) (class plain (range 0 9) (range a f) (range A F)))))) (choice unordered (seq (choice unordered (literal 0) (seq (optional (literal 0)) (class plain (range 1 9)) (optional (seq (optional (literal _)) (seq (class plain (range 0 9)) (repeat0 (seq (optional (literal _)) (class plain (range 0 9))))))))) (literal .) (optional (seq (class plain (range 0 9)) (repeat0 (seq (optional (literal _)) (class plain (range 0 9)))))) (optional (seq (choice unordered (literal e) (literal E)) (seq (optional (choice unordered (literal -) (literal %2B))) (seq (class plain (range 0 9)) (repeat0 (seq (optional (literal _)) (class plain (range 0 9))))))))) (seq (literal .) (seq (class plain (range 0 9)) (repeat0 (seq (optional (literal _)) (class plain (range 0 9))))) (optional (seq (choice unordered (literal e) (literal E)) (seq (optional (choice unordered (literal -) (literal %2B))) (seq (class plain (range 0 9)) (repeat0 (seq (optional (literal _)) (class plain (range 0 9))))))))) (seq (choice unordered (literal 0) (seq (optional (literal 0)) (class plain (range 1 9)) (optional (seq (optional (literal _)) (seq (class plain (range 0 9)) (repeat0 (seq (optional (literal _)) (class plain (range 0 9))))))))) (seq (choice unordered (literal e) (literal E)) (seq (optional (choice unordered (literal -) (literal %2B))) (seq (class plain (range 0 9)) (repeat0 (seq (optional (literal _)) (class plain (range 0 9)))))))) (seq (class plain (range 0 9)) (repeat0 (seq (optional (literal _)) (class plain (range 0 9)))))) (seq (choice unordered (literal 0b) (literal 0B)) (seq (class plain (range 0 1)) (repeat0 (seq (optional (literal _)) (class plain (range 0 1)))))) (seq (choice unordered (literal 0o) (literal 0O)) (seq (class plain (range 0 7)) (repeat0 (seq (optional (literal _)) (class plain (range 0 7)))))) (seq (choice unordered (seq (choice unordered (literal 0x) (literal 0X)) (seq (class plain (range 0 9) (range a f) (range A F)) (repeat0 (seq (optional (literal _)) (class plain (range 0 9) (range a f) (range A F)))))) (seq (choice unordered (literal 0b) (literal 0B)) (seq (class plain (range 0 1)) (repeat0 (seq (optional (literal _)) (class plain (range 0 1)))))) (seq (choice unordered (literal 0o) (literal 0O)) (seq (class plain (range 0 7)) (repeat0 (seq (optional (literal _)) (class plain (range 0 7)))))) (seq (class plain (range 0 9)) (repeat0 (seq (optional (literal _)) (class plain (range 0 9)))))) (literal n))) (concept grammar.number))
(rule identifier_choice silent (choice unordered (ref undefined) (ref identifier)) (concept grammar.identifier-choice) (source-names (tree-sitter _identifier)))
(rule identifier token (seq (choice unordered (class negated (range %00 %1F) (char %20) (char %09) (char %0A) (char %0D) (char %0C) (char %0B) (category Zs) (range 0 9) (char %3A) (char %3B) (char %60) (char %22) (char %27) (char %40) (char %23) (char .) (char %2C) (char %7C) (char %5E) (char %26) (char %3C) (char %3D) (char %3E) (char %2B) (char -) (char %2A) (char %2F) (char %5C) (char %25) (char %3F) (char %21) (char %7E) (char %28) (char %29) (char %5B) (char %5D) (char %7B) (char %7D) (char %EF%BB%BF) (char %E2%81%A0) (char %E2%80%8B) (char %E2%80%A8) (char %E2%80%A9)) (seq (literal %5Cu) (repeat 4 4 (class plain (range 0 9) (range a f) (range A F)))) (seq (literal %5Cu%7B) (repeat1 (class plain (range 0 9) (range a f) (range A F))) (literal %7D))) (repeat0 (choice unordered (class negated (range %00 %1F) (char %20) (char %09) (char %0A) (char %0D) (char %0C) (char %0B) (category Zs) (char %3A) (char %3B) (char %60) (char %22) (char %27) (char %40) (char %23) (char .) (char %2C) (char %7C) (char %5E) (char %26) (char %3C) (char %3D) (char %3E) (char %2B) (char -) (char %2A) (char %2F) (char %5C) (char %25) (char %3F) (char %21) (char %7E) (char %28) (char %29) (char %5B) (char %5D) (char %7B) (char %7D) (char %EF%BB%BF) (char %E2%81%A0) (char %E2%80%8B) (char %E2%80%A8) (char %E2%80%A9)) (seq (literal %5Cu) (repeat 4 4 (class plain (range 0 9) (range a f) (range A F)))) (seq (literal %5Cu%7B) (repeat1 (class plain (range 0 9) (range a f) (range A F))) (literal %7D))))) (concept grammar.identifier))
(rule private_property_identifier token (seq (literal %23) (choice unordered (class negated (range %00 %1F) (char %20) (char %09) (char %0A) (char %0D) (char %0C) (char %0B) (category Zs) (range 0 9) (char %3A) (char %3B) (char %60) (char %22) (char %27) (char %40) (char %23) (char .) (char %2C) (char %7C) (char %5E) (char %26) (char %3C) (char %3D) (char %3E) (char %2B) (char -) (char %2A) (char %2F) (char %5C) (char %25) (char %3F) (char %21) (char %7E) (char %28) (char %29) (char %5B) (char %5D) (char %7B) (char %7D) (char %EF%BB%BF) (char %E2%81%A0) (char %E2%80%8B) (char %E2%80%A8) (char %E2%80%A9)) (seq (literal %5Cu) (repeat 4 4 (class plain (range 0 9) (range a f) (range A F)))) (seq (literal %5Cu%7B) (repeat1 (class plain (range 0 9) (range a f) (range A F))) (literal %7D))) (repeat0 (choice unordered (class negated (range %00 %1F) (char %20) (char %09) (char %0A) (char %0D) (char %0C) (char %0B) (category Zs) (char %3A) (char %3B) (char %60) (char %22) (char %27) (char %40) (char %23) (char .) (char %2C) (char %7C) (char %5E) (char %26) (char %3C) (char %3D) (char %3E) (char %2B) (char -) (char %2A) (char %2F) (char %5C) (char %25) (char %3F) (char %21) (char %7E) (char %28) (char %29) (char %5B) (char %5D) (char %7B) (char %7D) (char %EF%BB%BF) (char %E2%81%A0) (char %E2%80%8B) (char %E2%80%A8) (char %E2%80%A9)) (seq (literal %5Cu) (repeat 4 4 (class plain (range 0 9) (range a f) (range A F)))) (seq (literal %5Cu%7B) (repeat1 (class plain (range 0 9) (range a f) (range A F))) (literal %7D))))) (concept grammar.private-property-identifier))
(rule meta_property normal (choice unordered (seq (token (seq (literal new) (not (ref word_characters)))) (literal .) (token (seq (literal target) (not (ref word_characters))))) (seq (token (seq (literal import) (not (ref word_characters)))) (literal .) (token (seq (literal meta) (not (ref word_characters)))))) (concept grammar.meta-property))
(rule this token (seq (literal this) (not (ref word_characters))) (concept grammar.this))
(rule super token (seq (literal super) (not (ref word_characters))) (concept grammar.super))
(rule true token (seq (literal true) (not (ref word_characters))) (concept grammar.true-value))
(rule false token (seq (literal false) (not (ref word_characters))) (concept grammar.false-value))
(rule null token (seq (literal null) (not (ref word_characters))) (concept grammar.null))
(rule undefined token (seq (literal undefined) (not (ref word_characters))) (concept grammar.undefined-value))
(rule arguments normal (seq (literal %28) (optional (seq (optional (choice unordered (ref expression) (ref spread_element))) (repeat0 (seq (literal %2C) (optional (choice unordered (ref expression) (ref spread_element))))))) (literal %29)) (concept grammar.argument-list))
(rule decorator normal (seq (literal %40) (choice unordered (ref identifier) (alias member_expression (ref decorator_member_expression)) (alias call_expression (ref decorator_call_expression)) (alias parenthesized_expression (ref decorator_parenthesized_expression)))) (concept grammar.decorator))
(rule decorator_member_expression normal (namedPrecedence member none (seq (capture labeled object (choice unordered (ref identifier) (alias member_expression (ref decorator_member_expression)))) (literal .) (capture labeled property (alias property_identifier (ref identifier))))) (concept grammar.decorator-member-expression))
(rule decorator_call_expression normal (namedPrecedence call none (seq (capture labeled function (choice unordered (ref identifier) (alias member_expression (ref decorator_member_expression)))) (optional (capture labeled type_arguments (ref type_arguments))) (capture labeled arguments (ref arguments)))) (concept grammar.decorator-call-expression))
(rule class_body normal (seq (literal %7B) (repeat0 (choice unordered (seq (repeat0 (capture labeled decorator (ref decorator))) (ref method_definition) (optional (ref semicolon))) (seq (ref method_signature) (choice unordered (alias unnamed_token (immediateToken (ref function_signature_automatic_semicolon))) (literal %2C))) (ref class_static_block) (seq (choice unordered (ref abstract_method_signature) (ref index_signature) (ref method_signature) (ref public_field_definition)) (choice unordered (ref semicolon) (literal %2C))) (literal %3B))) (literal %7D)) (concept grammar.class-body))
(rule field_definition normal (seq (repeat0 (capture labeled decorator (ref decorator))) (optional (token (seq (literal static) (not (ref word_characters))))) (capture labeled property (ref property_name)) (optional (ref initializer))) (concept grammar.field-definition))
(rule formal_parameters normal (seq (literal %28) (optional (seq (seq (ref formal_parameter) (repeat0 (seq (literal %2C) (ref formal_parameter)))) (optional (literal %2C)))) (literal %29)) (concept grammar.formal-parameter-list))
(rule class_static_block normal (seq (token (seq (literal static) (not (ref word_characters)))) (optional (alias unnamed_token (immediateToken (ref automatic_semicolon)))) (capture labeled body (ref statement_block))) (concept grammar.class-static-block))
(rule pattern silent (dynamicPrecedence -1 (choice unordered (ref left_hand_side_expression) (ref rest_pattern))) (concept grammar.pattern))
(rule rest_pattern normal (precedence 0 right (seq (literal ...) (ref left_hand_side_expression))) (concept grammar.rest-pattern))
(rule method_definition normal (precedence 0 left (seq (optional (ref accessibility_modifier)) (optional (token (seq (literal static) (not (ref word_characters))))) (optional (ref override_modifier)) (optional (token (seq (literal readonly) (not (ref word_characters))))) (optional (token (seq (literal async) (not (ref word_characters))))) (optional (choice unordered (token (seq (literal get) (not (ref word_characters)))) (token (seq (literal set) (not (ref word_characters)))) (literal %2A))) (capture labeled name (ref property_name)) (optional (literal %3F)) (ref call_signature_parts) (capture labeled body (ref statement_block)))) (concept grammar.method-definition))
(rule pair normal (seq (capture labeled key (ref property_name)) (literal %3A) (capture labeled value (ref expression))) (concept grammar.pair))
(rule pair_pattern normal (seq (capture labeled key (ref property_name)) (literal %3A) (capture labeled value (choice unordered (ref pattern) (ref assignment_pattern)))) (concept grammar.pair-pattern))
(rule property_name silent (choice unordered (alias property_identifier (choice unordered (ref identifier) (ref reserved_identifier))) (ref private_property_identifier) (ref string) (ref number) (ref computed_property_name)) (concept grammar.property-name) (source-names (tree-sitter _property_name)))
(rule computed_property_name normal (seq (literal %5B) (ref expression) (literal %5D)) (concept grammar.computed-property-name))
(rule reserved_identifier silent (choice unordered (token (seq (literal declare) (not (ref word_characters)))) (token (seq (literal namespace) (not (ref word_characters)))) (token (seq (literal type) (not (ref word_characters)))) (token (seq (literal public) (not (ref word_characters)))) (token (seq (literal private) (not (ref word_characters)))) (token (seq (literal protected) (not (ref word_characters)))) (token (seq (literal override) (not (ref word_characters)))) (token (seq (literal readonly) (not (ref word_characters)))) (token (seq (literal module) (not (ref word_characters)))) (token (seq (literal any) (not (ref word_characters)))) (token (seq (literal number) (not (ref word_characters)))) (token (seq (literal boolean) (not (ref word_characters)))) (token (seq (literal string) (not (ref word_characters)))) (token (seq (literal symbol) (not (ref word_characters)))) (token (seq (literal export) (not (ref word_characters)))) (token (seq (literal object) (not (ref word_characters)))) (token (seq (literal new) (not (ref word_characters)))) (token (seq (literal readonly) (not (ref word_characters)))) (choice unordered (token (seq (literal get) (not (ref word_characters)))) (token (seq (literal set) (not (ref word_characters)))) (token (seq (literal async) (not (ref word_characters)))) (token (seq (literal static) (not (ref word_characters)))) (token (seq (literal export) (not (ref word_characters)))) (token (seq (literal let) (not (ref word_characters)))))) (concept grammar.reserved-identifier) (source-names (tree-sitter _reserved_identifier)))
(rule semicolon silent (choice unordered (alias unnamed_token (immediateToken (ref automatic_semicolon))) (literal %3B)) (concept grammar.semicolon) (source-names (tree-sitter _semicolon)))
(rule public_field_definition normal (seq (repeat0 (capture labeled decorator (ref decorator))) (optional (choice unordered (seq (token (seq (literal declare) (not (ref word_characters)))) (optional (ref accessibility_modifier))) (seq (ref accessibility_modifier) (optional (token (seq (literal declare) (not (ref word_characters)))))))) (choice unordered (seq (optional (token (seq (literal static) (not (ref word_characters))))) (optional (ref override_modifier)) (optional (token (seq (literal readonly) (not (ref word_characters)))))) (seq (optional (token (seq (literal abstract) (not (ref word_characters))))) (optional (token (seq (literal readonly) (not (ref word_characters)))))) (seq (optional (token (seq (literal readonly) (not (ref word_characters))))) (optional (token (seq (literal abstract) (not (ref word_characters)))))) (optional (token (seq (literal accessor) (not (ref word_characters)))))) (capture labeled name (ref property_name)) (optional (choice unordered (literal %3F) (literal %21))) (capture labeled type (optional (ref type_annotation))) (optional (ref initializer))) (concept grammar.public-field-definition))
(rule jsx_start_opening_element silent (seq (literal %3C) (optional (seq (choice unordered (capture labeled name (choice unordered (ref jsx_identifier_choice) (ref jsx_namespace_name))) (seq (capture labeled name (choice unordered (ref identifier) (alias member_expression (ref nested_identifier)))) (capture labeled type_arguments (optional (ref type_arguments))))) (repeat0 (capture labeled attribute (ref jsx_attribute_choice)))))) (concept grammar.jsx-start-opening-element) (source-names (tree-sitter _jsx_start_opening_element)))
(rule import_identifier silent (choice unordered (ref identifier) (alias identifier (token (seq (literal type) (not (ref word_characters)))))) (concept grammar.import-identifier) (source-names (tree-sitter _import_identifier)))
(rule non_null_expression normal (namedPrecedence unary left (seq (ref expression) (literal %21))) (concept grammar.non-null-expression))
(rule method_signature normal (seq (optional (ref accessibility_modifier)) (optional (token (seq (literal static) (not (ref word_characters))))) (optional (ref override_modifier)) (optional (token (seq (literal readonly) (not (ref word_characters))))) (optional (token (seq (literal async) (not (ref word_characters))))) (optional (choice unordered (token (seq (literal get) (not (ref word_characters)))) (token (seq (literal set) (not (ref word_characters)))) (literal %2A))) (capture labeled name (ref property_name)) (optional (literal %3F)) (ref call_signature_parts)) (concept grammar.method-signature))
(rule abstract_method_signature normal (seq (optional (ref accessibility_modifier)) (token (seq (literal abstract) (not (ref word_characters)))) (optional (ref override_modifier)) (optional (choice unordered (token (seq (literal get) (not (ref word_characters)))) (token (seq (literal set) (not (ref word_characters)))) (literal %2A))) (capture labeled name (ref property_name)) (optional (literal %3F)) (ref call_signature_parts)) (concept grammar.abstract-method-signature))
(rule function_signature normal (seq (optional (token (seq (literal async) (not (ref word_characters))))) (token (seq (literal function) (not (ref word_characters)))) (capture labeled name (ref identifier)) (ref call_signature_parts) (choice unordered (ref semicolon) (alias unnamed_token (immediateToken (ref function_signature_automatic_semicolon))))) (concept grammar.function-signature))
(rule decorator_parenthesized_expression normal (seq (literal %28) (choice unordered (ref identifier) (alias member_expression (ref decorator_member_expression)) (alias call_expression (ref decorator_call_expression))) (literal %29)) (concept grammar.decorator-parenthesized-expression))
(rule type_assertion normal (namedPrecedence unary left (seq (ref type_arguments) (ref expression))) (concept grammar.type-assertion))
(rule as_expression normal (namedPrecedence binary left (seq (ref expression) (token (seq (literal as) (not (ref word_characters)))) (choice unordered (token (seq (literal const) (not (ref word_characters)))) (ref type)))) (concept grammar.as-expression))
(rule satisfies_expression normal (namedPrecedence binary left (seq (ref expression) (token (seq (literal satisfies) (not (ref word_characters)))) (ref type))) (concept grammar.satisfies-expression))
(rule instantiation_expression normal (namedPrecedence instantiation none (seq (ref expression) (capture labeled type_arguments (ref type_arguments)))) (concept grammar.instantiation-expression))
(rule import_require_clause normal (seq (ref identifier) (literal %3D) (token (seq (literal require) (not (ref word_characters)))) (literal %28) (capture labeled source (ref string)) (literal %29)) (concept grammar.import-require-clause))
(rule extends_clause normal (seq (token (seq (literal extends) (not (ref word_characters)))) (seq (ref extends_clause_single) (repeat0 (seq (literal %2C) (ref extends_clause_single))))) (concept grammar.extends-clause))
(rule extends_clause_single silent (namedPrecedence extends none (seq (capture labeled value (ref expression)) (capture labeled type_arguments (optional (ref type_arguments))))) (concept grammar.extends-clause-single) (source-names (tree-sitter _extends_clause_single)))
(rule implements_clause normal (seq (token (seq (literal implements) (not (ref word_characters)))) (seq (ref type) (repeat0 (seq (literal %2C) (ref type))))) (concept grammar.implements-clause))
(rule ambient_declaration normal (seq (token (seq (literal declare) (not (ref word_characters)))) (choice unordered (ref declaration) (seq (token (seq (literal global) (not (ref word_characters)))) (ref statement_block)) (seq (token (seq (literal module) (not (ref word_characters)))) (literal .) (alias property_identifier (ref identifier)) (literal %3A) (ref type) (ref semicolon)))) (concept grammar.ambient-declaration))
(rule abstract_class_declaration normal (namedPrecedence declaration none (seq (repeat0 (capture labeled decorator (ref decorator))) (token (seq (literal abstract) (not (ref word_characters)))) (token (seq (literal class) (not (ref word_characters)))) (capture labeled name (ref type_identifier_alias)) (capture labeled type_parameters (optional (ref type_parameters))) (optional (ref class_heritage)) (capture labeled body (ref class_body)))) (concept grammar.abstract-class-declaration))
(rule module normal (seq (token (seq (literal module) (not (ref word_characters)))) (ref module_name_and_body)) (concept grammar.module))
(rule internal_module normal (seq (token (seq (literal namespace) (not (ref word_characters)))) (ref module_name_and_body)) (concept grammar.internal-module))
(rule module_name_and_body silent (precedence 0 right (seq (capture labeled name (choice unordered (ref string) (ref identifier) (ref nested_identifier))) (capture labeled body (optional (ref statement_block))))) (concept grammar.module-name-and-body) (source-names (tree-sitter _module)))
(rule import_alias normal (seq (token (seq (literal import) (not (ref word_characters)))) (ref identifier) (literal %3D) (choice unordered (ref identifier) (ref nested_identifier)) (ref semicolon)) (concept grammar.import-alias))
(rule nested_type_identifier normal (namedPrecedence member none (seq (capture labeled module (choice unordered (ref identifier) (ref nested_identifier))) (literal .) (capture labeled name (ref type_identifier_alias)))) (concept grammar.nested-type-identifier))
(rule interface_declaration normal (seq (token (seq (literal interface) (not (ref word_characters)))) (capture labeled name (ref type_identifier_alias)) (capture labeled type_parameters (optional (ref type_parameters))) (optional (ref extends_type_clause)) (capture labeled body (alias interface_body (ref object_type)))) (concept grammar.interface-declaration))
(rule extends_type_clause normal (seq (token (seq (literal extends) (not (ref word_characters)))) (seq (capture labeled type (choice unordered (ref type_identifier_alias) (ref nested_type_identifier) (ref generic_type))) (repeat0 (seq (literal %2C) (capture labeled type (choice unordered (ref type_identifier_alias) (ref nested_type_identifier) (ref generic_type))))))) (concept grammar.extends-type-clause))
(rule enumeration_declaration normal (seq (optional (token (seq (literal const) (not (ref word_characters))))) (token (seq (literal enum) (not (ref word_characters)))) (capture labeled name (ref identifier)) (capture labeled body (ref enumeration_body))) (concept grammar.enumeration-declaration) (source-names (tree-sitter enum_declaration)))
(rule enumeration_body normal (seq (literal %7B) (optional (seq (seq (choice unordered (capture labeled name (ref property_name)) (ref enumeration_assignment)) (repeat0 (seq (literal %2C) (choice unordered (capture labeled name (ref property_name)) (ref enumeration_assignment))))) (optional (literal %2C)))) (literal %7D)) (concept grammar.enumeration-body) (source-names (tree-sitter enum_body)))
(rule enumeration_assignment normal (seq (capture labeled name (ref property_name)) (ref initializer)) (concept grammar.enumeration-assignment) (source-names (tree-sitter enum_assignment)))
(rule type_alias_declaration normal (seq (token (seq (literal type) (not (ref word_characters)))) (capture labeled name (ref type_identifier_alias)) (capture labeled type_parameters (optional (ref type_parameters))) (literal %3D) (capture labeled value (ref type)) (ref semicolon)) (concept grammar.type-alias-declaration))
(rule accessibility_modifier normal (choice unordered (token (seq (literal public) (not (ref word_characters)))) (token (seq (literal private) (not (ref word_characters)))) (token (seq (literal protected) (not (ref word_characters))))) (concept grammar.accessibility-modifier))
(rule override_modifier normal (token (seq (literal override) (not (ref word_characters)))) (concept grammar.override-modifier))
(rule required_parameter normal (seq (ref parameter_name) (capture labeled type (optional (ref type_annotation))) (optional (ref initializer))) (concept grammar.required-parameter))
(rule optional_parameter normal (seq (ref parameter_name) (literal %3F) (capture labeled type (optional (ref type_annotation))) (optional (ref initializer))) (concept grammar.optional-parameter))
(rule parameter_name silent (seq (repeat0 (capture labeled decorator (ref decorator))) (optional (ref accessibility_modifier)) (optional (ref override_modifier)) (optional (token (seq (literal readonly) (not (ref word_characters))))) (capture labeled pattern (choice unordered (ref pattern) (ref this)))) (concept grammar.parameter-name) (source-names (tree-sitter _parameter_name)))
(rule required_type_annotation normal (seq (literal -%3F%3A) (ref type)) (concept grammar.required-type-annotation) (source-names (tree-sitter omitting_type_annotation)))
(rule adding_type_annotation normal (seq (literal %2B%3F%3A) (ref type)) (concept grammar.adding-type-annotation))
(rule opting_type_annotation normal (seq (literal %3F%3A) (ref type)) (concept grammar.opting-type-annotation))
(rule type_annotation normal (seq (literal %3A) (ref type)) (concept grammar.type-annotation))
(rule type_query_member_expression_in_type_annotation silent (seq (capture labeled object (choice unordered (ref import) (alias member_expression (ref type_query_member_expression_in_type_annotation)) (alias call_expression (ref type_query_call_expression_in_type_annotation)))) (literal .) (capture labeled property (choice unordered (ref private_property_identifier) (alias property_identifier (ref identifier))))) (concept grammar.type-query-member-expression-in-type-annotation) (source-names (tree-sitter _type_query_member_expression_in_type_annotation)))
(rule type_query_call_expression_in_type_annotation silent (seq (capture labeled function (choice unordered (ref import) (alias member_expression (ref type_query_member_expression_in_type_annotation)))) (capture labeled arguments (ref arguments))) (concept grammar.type-query-call-expression-in-type-annotation) (source-names (tree-sitter _type_query_call_expression_in_type_annotation)))
(rule assertion_signature normal (seq (token (seq (literal asserts) (not (ref word_characters)))) (choice unordered (ref type_predicate) (ref identifier) (ref this))) (concept grammar.assertion-signature) (source-names (tree-sitter asserts)))
(rule asserts_annotation normal (seq (literal %3A) (ref assertion_signature)) (concept grammar.asserts-annotation))
(rule type silent (choice unordered (ref primary_type) (ref function_type) (ref readonly_type) (ref constructor_type) (ref infer_type) (precedence -1 none (alias member_expression (ref type_query_member_expression_in_type_annotation))) (precedence -1 none (alias call_expression (ref type_query_call_expression_in_type_annotation)))) (concept grammar.type))
(rule tuple_parameter normal (seq (capture labeled name (choice unordered (ref identifier) (ref rest_pattern))) (capture labeled type (ref type_annotation))) (concept grammar.tuple-parameter))
(rule optional_tuple_parameter normal (seq (capture labeled name (ref identifier)) (literal %3F) (capture labeled type (ref type_annotation))) (concept grammar.optional-tuple-parameter))
(rule optional_type normal (seq (ref type) (literal %3F)) (concept grammar.optional-type))
(rule rest_type normal (seq (literal ...) (ref type)) (concept grammar.rest-type))
(rule tuple_type_member silent (choice unordered (alias required_parameter (ref tuple_parameter)) (alias optional_parameter (ref optional_tuple_parameter)) (ref optional_type) (ref rest_type) (ref type)) (concept grammar.tuple-type-member) (source-names (tree-sitter _tuple_type_member)))
(rule constructor_type normal (precedence 0 left (seq (optional (token (seq (literal abstract) (not (ref word_characters))))) (token (seq (literal new) (not (ref word_characters)))) (capture labeled type_parameters (optional (ref type_parameters))) (capture labeled parameters (ref formal_parameters)) (literal %3D%3E) (capture labeled type (ref type)))) (concept grammar.constructor-type))
(rule primary_type silent (choice unordered (ref parenthesized_type) (ref predefined_type) (ref type_identifier_alias) (ref nested_type_identifier) (ref generic_type) (ref object_type) (ref array_type) (ref tuple_type) (ref flow_maybe_type) (ref type_query) (ref index_type_query) (alias this_type (ref this)) (ref existential_type) (ref literal_type) (ref lookup_type) (ref conditional_type) (ref template_literal_type) (ref intersection_type) (ref union_type) (token (seq (literal const) (not (ref word_characters))))) (concept grammar.primary-type))
(rule template_type normal (seq (literal %24%7B) (choice unordered (ref primary_type) (ref infer_type)) (literal %7D)) (concept grammar.template-type))
(rule template_literal_type normal (seq (literal %60) (repeat0 (choice unordered (alias string_fragment (immediateToken (ref template_characters))) (ref template_type))) (literal %60)) (concept grammar.template-literal-type))
(rule infer_type normal (precedence 0 right (seq (token (seq (literal infer) (not (ref word_characters)))) (ref type_identifier_alias) (optional (seq (token (seq (literal extends) (not (ref word_characters)))) (ref type))))) (concept grammar.infer-type))
(rule conditional_type normal (precedence 0 right (seq (capture labeled left (ref type)) (token (seq (literal extends) (not (ref word_characters)))) (capture labeled right (ref type)) (literal %3F) (capture labeled consequence (ref type)) (literal %3A) (capture labeled alternative (ref type)))) (concept grammar.conditional-type))
(rule generic_type normal (namedPrecedence call none (seq (capture labeled name (choice unordered (ref type_identifier_alias) (ref nested_type_identifier))) (capture labeled type_arguments (ref type_arguments)))) (concept grammar.generic-type))
(rule type_predicate normal (seq (capture labeled name (choice unordered (ref identifier) (ref this) (alias identifier (ref predefined_type)))) (token (seq (literal is) (not (ref word_characters)))) (capture labeled type (ref type))) (concept grammar.type-predicate))
(rule type_predicate_annotation normal (seq (literal %3A) (ref type_predicate)) (concept grammar.type-predicate-annotation))
(rule type_query_member_expression silent (seq (capture labeled object (choice unordered (ref identifier) (ref this) (alias subscript_expression (ref type_query_subscript_expression)) (alias member_expression (ref type_query_member_expression)) (alias call_expression (ref type_query_call_expression)))) (choice unordered (literal .) (literal %3F.)) (capture labeled property (choice unordered (ref private_property_identifier) (alias property_identifier (ref identifier))))) (concept grammar.type-query-member-expression) (source-names (tree-sitter _type_query_member_expression)))
(rule type_query_subscript_expression silent (seq (capture labeled object (choice unordered (ref identifier) (ref this) (alias subscript_expression (ref type_query_subscript_expression)) (alias member_expression (ref type_query_member_expression)) (alias call_expression (ref type_query_call_expression)))) (optional (literal %3F.)) (literal %5B) (capture labeled index (choice unordered (ref predefined_type) (ref string) (ref number))) (literal %5D)) (concept grammar.type-query-subscript-expression) (source-names (tree-sitter _type_query_subscript_expression)))
(rule type_query_call_expression silent (seq (capture labeled function (choice unordered (ref import) (ref identifier) (alias member_expression (ref type_query_member_expression)) (alias subscript_expression (ref type_query_subscript_expression)))) (capture labeled arguments (ref arguments))) (concept grammar.type-query-call-expression) (source-names (tree-sitter _type_query_call_expression)))
(rule type_query_instantiation_expression silent (seq (capture labeled function (choice unordered (ref import) (ref identifier) (alias member_expression (ref type_query_member_expression)) (alias subscript_expression (ref type_query_subscript_expression)))) (capture labeled type_arguments (ref type_arguments))) (concept grammar.type-query-instantiation-expression) (source-names (tree-sitter _type_query_instantiation_expression)))
(rule type_query normal (precedence 0 right (seq (token (seq (literal typeof) (not (ref word_characters)))) (choice unordered (alias subscript_expression (ref type_query_subscript_expression)) (alias member_expression (ref type_query_member_expression)) (alias call_expression (ref type_query_call_expression)) (alias instantiation_expression (ref type_query_instantiation_expression)) (ref identifier) (ref this)))) (concept grammar.type-query))
(rule index_type_query normal (seq (token (seq (literal keyof) (not (ref word_characters)))) (ref primary_type)) (concept grammar.index-type-query))
(rule lookup_type normal (seq (ref primary_type) (literal %5B) (ref type) (literal %5D)) (concept grammar.lookup-type))
(rule mapped_type_clause normal (seq (capture labeled name (ref type_identifier_alias)) (token (seq (literal in) (not (ref word_characters)))) (capture labeled type (ref type)) (optional (seq (token (seq (literal as) (not (ref word_characters)))) (capture labeled alias (ref type))))) (concept grammar.mapped-type-clause))
(rule literal_type normal (choice unordered (alias unary_expression (ref signed_number)) (ref number) (ref string) (ref true) (ref false) (ref null) (ref undefined)) (concept grammar.literal-type))
(rule signed_number silent (precedence 1 left (seq (capture labeled operator (choice unordered (literal -) (literal %2B))) (capture labeled argument (ref number)))) (concept grammar.signed-number) (source-names (tree-sitter _number)))
(rule existential_type normal (literal %2A) (concept grammar.existential-type))
(rule flow_maybe_type normal (precedence 0 right (seq (literal %3F) (ref primary_type))) (concept grammar.flow-maybe-type))
(rule parenthesized_type normal (seq (literal %28) (ref type) (literal %29)) (concept grammar.parenthesized-type))
(rule predefined_type normal (choice unordered (token (seq (literal any) (not (ref word_characters)))) (token (seq (literal number) (not (ref word_characters)))) (token (seq (literal boolean) (not (ref word_characters)))) (token (seq (literal string) (not (ref word_characters)))) (token (seq (literal symbol) (not (ref word_characters)))) (seq (alias %27unique%20symbol (token (seq (literal unique) (not (ref word_characters))))) (alias %27unique%20symbol (token (seq (literal symbol) (not (ref word_characters)))))) (token (seq (literal void) (not (ref word_characters)))) (token (seq (literal unknown) (not (ref word_characters)))) (token (seq (literal string) (not (ref word_characters)))) (token (seq (literal never) (not (ref word_characters)))) (token (seq (literal object) (not (ref word_characters))))) (concept grammar.predefined-type))
(rule type_arguments normal (seq (literal %3C) (seq (ref type) (repeat0 (seq (literal %2C) (ref type)))) (optional (literal %2C)) (literal %3E)) (concept grammar.type-argument-list))
(rule object_type normal (seq (choice unordered (literal %7B) (literal %7B%7C)) (optional (seq (optional (choice unordered (literal %2C) (literal %3B))) (seq (choice unordered (ref export_statement) (ref property_signature) (ref call_signature) (ref construct_signature) (ref index_signature) (ref method_signature)) (repeat0 (seq (choice unordered (literal %2C) (ref semicolon)) (choice unordered (ref export_statement) (ref property_signature) (ref call_signature) (ref construct_signature) (ref index_signature) (ref method_signature))))) (optional (choice unordered (literal %2C) (ref semicolon))))) (choice unordered (literal %7D) (literal %7C%7D))) (concept grammar.object-type))
(rule call_signature normal (ref call_signature_parts) (concept grammar.call-signature))
(rule property_signature normal (seq (optional (ref accessibility_modifier)) (optional (token (seq (literal static) (not (ref word_characters))))) (optional (ref override_modifier)) (optional (token (seq (literal readonly) (not (ref word_characters))))) (capture labeled name (ref property_name)) (optional (literal %3F)) (capture labeled type (optional (ref type_annotation)))) (concept grammar.property-signature))
(rule type_parameters normal (seq (literal %3C) (seq (ref type_parameter) (repeat0 (seq (literal %2C) (ref type_parameter)))) (optional (literal %2C)) (literal %3E)) (concept grammar.type-parameter-list))
(rule type_parameter normal (seq (optional (token (seq (literal const) (not (ref word_characters))))) (capture labeled name (ref type_identifier_alias)) (capture labeled constraint (optional (ref constraint))) (capture labeled value (optional (ref default_type)))) (concept grammar.type-parameter))
(rule default_type normal (seq (literal %3D) (ref type)) (concept grammar.default-type))
(rule constraint normal (seq (choice unordered (token (seq (literal extends) (not (ref word_characters)))) (literal %3A)) (ref type)) (concept grammar.constraint))
(rule construct_signature normal (seq (optional (token (seq (literal abstract) (not (ref word_characters))))) (token (seq (literal new) (not (ref word_characters)))) (capture labeled type_parameters (optional (ref type_parameters))) (capture labeled parameters (ref formal_parameters)) (capture labeled type (optional (ref type_annotation)))) (concept grammar.construct-signature))
(rule index_signature normal (seq (optional (seq (capture labeled sign (optional (choice unordered (literal -) (literal %2B)))) (token (seq (literal readonly) (not (ref word_characters)))))) (literal %5B) (choice unordered (seq (capture labeled name (choice unordered (ref identifier) (alias identifier (choice unordered (token (seq (literal declare) (not (ref word_characters)))) (token (seq (literal namespace) (not (ref word_characters)))) (token (seq (literal type) (not (ref word_characters)))) (token (seq (literal public) (not (ref word_characters)))) (token (seq (literal private) (not (ref word_characters)))) (token (seq (literal protected) (not (ref word_characters)))) (token (seq (literal override) (not (ref word_characters)))) (token (seq (literal readonly) (not (ref word_characters)))) (token (seq (literal module) (not (ref word_characters)))) (token (seq (literal any) (not (ref word_characters)))) (token (seq (literal number) (not (ref word_characters)))) (token (seq (literal boolean) (not (ref word_characters)))) (token (seq (literal string) (not (ref word_characters)))) (token (seq (literal symbol) (not (ref word_characters)))) (token (seq (literal export) (not (ref word_characters)))) (token (seq (literal object) (not (ref word_characters)))) (token (seq (literal new) (not (ref word_characters)))) (token (seq (literal readonly) (not (ref word_characters)))) (choice unordered (token (seq (literal get) (not (ref word_characters)))) (token (seq (literal set) (not (ref word_characters)))) (token (seq (literal async) (not (ref word_characters)))) (token (seq (literal static) (not (ref word_characters)))) (token (seq (literal export) (not (ref word_characters)))) (token (seq (literal let) (not (ref word_characters))))))))) (literal %3A) (capture labeled index_type (ref type))) (ref mapped_type_clause)) (literal %5D) (capture labeled type (choice unordered (ref type_annotation) (ref required_type_annotation) (ref adding_type_annotation) (ref opting_type_annotation)))) (concept grammar.index-signature))
(rule array_type normal (seq (ref primary_type) (literal %5B) (literal %5D)) (concept grammar.array-type))
(rule tuple_type normal (seq (literal %5B) (optional (seq (ref tuple_type_member) (repeat0 (seq (literal %2C) (ref tuple_type_member))))) (optional (literal %2C)) (literal %5D)) (concept grammar.tuple-type))
(rule readonly_type normal (seq (token (seq (literal readonly) (not (ref word_characters)))) (ref type)) (concept grammar.readonly-type))
(rule union_type normal (precedence 0 left (seq (optional (ref type)) (literal %7C) (ref type))) (concept grammar.union-type))
(rule intersection_type normal (precedence 0 left (seq (optional (ref type)) (literal %26) (ref type))) (concept grammar.intersection-type))
(rule function_type normal (precedence 0 left (seq (capture labeled type_parameters (optional (ref type_parameters))) (capture labeled parameters (ref formal_parameters)) (literal %3D%3E) (capture labeled return_type (choice unordered (ref type) (ref assertion_signature) (ref type_predicate))))) (concept grammar.function-type))
(rule type_identifier_alias silent (alias type_identifier (ref identifier)) (concept grammar.type-identifier-alias) (source-names (tree-sitter _type_identifier)))
(rule word_characters token (seq (choice unordered (class negated (range %00 %1F) (char %20) (char %09) (char %0A) (char %0D) (char %0C) (char %0B) (category Zs) (range 0 9) (char %3A) (char %3B) (char %60) (char %22) (char %27) (char %40) (char %23) (char .) (char %2C) (char %7C) (char %5E) (char %26) (char %3C) (char %3D) (char %3E) (char %2B) (char -) (char %2A) (char %2F) (char %5C) (char %25) (char %3F) (char %21) (char %7E) (char %28) (char %29) (char %5B) (char %5D) (char %7B) (char %7D) (char %EF%BB%BF) (char %E2%81%A0) (char %E2%80%8B) (char %E2%80%A8) (char %E2%80%A9)) (seq (literal %5Cu) (repeat 4 4 (class plain (range 0 9) (range a f) (range A F)))) (seq (literal %5Cu%7B) (repeat1 (class plain (range 0 9) (range a f) (range A F))) (literal %7D))) (repeat0 (choice unordered (class negated (range %00 %1F) (char %20) (char %09) (char %0A) (char %0D) (char %0C) (char %0B) (category Zs) (char %3A) (char %3B) (char %60) (char %22) (char %27) (char %40) (char %23) (char .) (char %2C) (char %7C) (char %5E) (char %26) (char %3C) (char %3D) (char %3E) (char %2B) (char -) (char %2A) (char %2F) (char %5C) (char %25) (char %3F) (char %21) (char %7E) (char %28) (char %29) (char %5B) (char %5D) (char %7B) (char %7D) (char %EF%BB%BF) (char %E2%81%A0) (char %E2%80%8B) (char %E2%80%A8) (char %E2%80%A9)) (seq (literal %5Cu) (repeat 4 4 (class plain (range 0 9) (range a f) (range A F)))) (seq (literal %5Cu%7B) (repeat1 (class plain (range 0 9) (range a f) (range A F))) (literal %7D))))) (concept grammar.word-characters))