diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..d7f550a --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,34 @@ +module.exports = { + 'env': { + 'commonjs': true, + 'es2021': true, + 'node': true, + }, + 'extends': 'google', + 'overrides': [ + { + 'env': { + 'node': true, + }, + 'files': [ + '.eslintrc.{js,cjs}', + ], + 'parserOptions': { + 'sourceType': 'script', + }, + }, + ], + 'parserOptions': { + 'ecmaVersion': 'latest', + 'sourceType': 'module', + }, + 'rules': { + 'indent': ['error', 2, {'SwitchCase': 1}], + 'max-len': [ + 'error', + {'code': 120, 'ignoreComments': true, 'ignoreUrls': true, 'ignoreStrings': true}, + ], + 'arrow-parens': 'off', + 'camelcase': 'off', + }, +}; diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..1491f7e --- /dev/null +++ b/.gitattributes @@ -0,0 +1,10 @@ +/src/** linguist-vendored +/examples/* linguist-vendored + +src/grammar.json linguist-generated +src/node-types.json linguist-generated +src/parser.c linguist-generated + +src/grammar.json -diff +src/node-types.json -diff +src/parser.c -diff diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..f4d1399 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +github: amaanq diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..78a2903 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,23 @@ +name: Test grammar + +on: + push: + branches: ["*"] + paths: + - grammar.js + - src/** + - bindings/** + - binding.gyp + pull_request: + branches: ["*"] + paths: + - grammar.js + - src/** + - bindings/** + - binding.gyp + +jobs: + test: + uses: tree-sitter-grammars/.github/.github/workflows/ci.yml@main + with: + test-library: true diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml new file mode 100644 index 0000000..8429a2b --- /dev/null +++ b/.github/workflows/dependencies.yml @@ -0,0 +1,9 @@ +name: Update dependencies + +on: + schedule: + - cron: '0 0 * * 0' + +jobs: + test: + uses: tree-sitter-grammars/.github/.github/workflows/dependencies.yml@main diff --git a/.github/workflows/fuzz.yml b/.github/workflows/fuzz.yml new file mode 100644 index 0000000..05ff719 --- /dev/null +++ b/.github/workflows/fuzz.yml @@ -0,0 +1,17 @@ +name: Fuzz scanner + +on: + push: + branches: ["*"] + paths: + - src/scanner.c + pull_request: + branches: ["*"] + paths: + - src/scanner.c + +jobs: + test: + uses: tree-sitter-grammars/.github/.github/workflows/fuzz.yml@main + with: + language: svelte diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..8cbe243 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,15 @@ +name: Lint grammar + +on: + push: + branches: ["*"] + paths: + - grammar.js + pull_request: + branches: ["*"] + paths: + - grammar.js + +jobs: + test: + uses: tree-sitter-grammars/.github/.github/workflows/lint.yml@main diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bd77f41 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +Cargo.lock +node_modules +build +package-lock.json +/target/ +.build/ \ No newline at end of file diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..194ff84 --- /dev/null +++ b/.npmignore @@ -0,0 +1,5 @@ +/test +/examples +/build +/script +/target diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..4e62a2c --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,24 @@ +[package] +name = "tree-sitter-svelte" +description = "Svelte grammar for tree-sitter" +version = "0.0.1" +authors = ["Amaan Qureshi "] +license = "MIT" +readme = "bindings/rust/README.md" +keywords = ["incremental", "parsing", "svelte"] +categories = ["parsing", "text-editors"] +repository = "https://github.com/tree-sitter-grammars/tree-sitter-svelte" +edition = "2021" +autoexamples = false + +build = "bindings/rust/build.rs" +include = ["bindings/rust/*", "grammar.js", "queries/*", "src/*"] + +[lib] +path = "bindings/rust/lib.rs" + +[dependencies] +tree-sitter = "~0.20.10" + +[build-dependencies] +cc = "1.0" diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..4e8c9b3 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2024 Amaan Qureshi + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..cba602f --- /dev/null +++ b/Package.swift @@ -0,0 +1,37 @@ +// swift-tools-version:5.3 +import PackageDescription + +let package = Package( + name: "TreeSitterSvelte", + platforms: [.macOS(.v10_13), .iOS(.v11)], + products: [ + .library(name: "TreeSitterSvelte", targets: ["TreeSitterSvelte"]), + ], + dependencies: [], + targets: [ + .target(name: "TreeSitterSvelte", + path: ".", + exclude: [ + "binding.gyp", + "bindings", + "Cargo.toml", + "test", + "grammar.js", + "LICENSE", + "package.json", + "README.md", + "script", + "src/grammar.json", + "src/node-types.json", + ], + sources: [ + "src/parser.c", + "src/scanner.c", + ], + resources: [ + .copy("queries") + ], + publicHeadersPath: "bindings/swift", + cSettings: [.headerSearchPath("src")]) + ] +) diff --git a/README.md b/README.md new file mode 100644 index 0000000..50746b4 --- /dev/null +++ b/README.md @@ -0,0 +1,11 @@ +# tree-sitter-svelte + +[![CI][ci]](https://github.com/tree-sitter-grammars/tree-sitter-svelte/actions/workflows/ci.yml) +[![discord][discord]](https://discord.gg/w7nTvsVJhm) +[![matrix][matrix]](https://matrix.to/#/#tree-sitter-chat:matrix.org) + +[Svelte](https://svelte.dev/) grammar for [tree-sitter](https://tree-sitter.github.io) + +[ci]: https://img.shields.io/github/actions/workflow/status/tree-sitter-grammars/tree-sitter-svelte/ci.yml?logo=github&label=CI +[discord]: https://img.shields.io/discord/1063097320771698699?logo=discord&label=discord +[matrix]: https://img.shields.io/matrix/tree-sitter-chat%3Amatrix.org?logo=matrix&label=matrix diff --git a/binding.gyp b/binding.gyp new file mode 100644 index 0000000..490a3dd --- /dev/null +++ b/binding.gyp @@ -0,0 +1,19 @@ +{ + "targets": [ + { + "target_name": "tree_sitter_svelte_binding", + "include_dirs": [ + " +#include "nan.h" + +using namespace v8; + +extern "C" TSLanguage * tree_sitter_svelte(); + +namespace { + +NAN_METHOD(New) {} + +void Init(Local exports, Local module) { + Local tpl = Nan::New(New); + tpl->SetClassName(Nan::New("Language").ToLocalChecked()); + tpl->InstanceTemplate()->SetInternalFieldCount(1); + + Local constructor = Nan::GetFunction(tpl).ToLocalChecked(); + Local instance = constructor->NewInstance(Nan::GetCurrentContext()).ToLocalChecked(); + Nan::SetInternalFieldPointer(instance, 0, tree_sitter_svelte()); + + Nan::Set(instance, Nan::New("name").ToLocalChecked(), Nan::New("svelte").ToLocalChecked()); + Nan::Set(module, Nan::New("exports").ToLocalChecked(), instance); +} + +NODE_MODULE(tree_sitter_svelte_binding, Init) + +} // namespace diff --git a/bindings/node/index.js b/bindings/node/index.js new file mode 100644 index 0000000..6bc6fc8 --- /dev/null +++ b/bindings/node/index.js @@ -0,0 +1,19 @@ +try { + module.exports = require("../../build/Release/tree_sitter_svelte_binding"); +} catch (error1) { + if (error1.code !== 'MODULE_NOT_FOUND') { + throw error1; + } + try { + module.exports = require("../../build/Debug/tree_sitter_svelte_binding"); + } catch (error2) { + if (error2.code !== 'MODULE_NOT_FOUND') { + throw error2; + } + throw error1 + } +} + +try { + module.exports.nodeTypeInfo = require("../../src/node-types.json"); +} catch (_) {} diff --git a/bindings/rust/README.md b/bindings/rust/README.md new file mode 100644 index 0000000..8f0983a --- /dev/null +++ b/bindings/rust/README.md @@ -0,0 +1,39 @@ +# tree-sitter-svelte + +This crate provides an Svelte grammar for the [tree-sitter][] parsing library. To +use this crate, add it to the `[dependencies]` section of your `Cargo.toml` +file. (Note that you will probably also need to depend on the +[`tree-sitter`][tree-sitter crate] crate to use the parsed result in any useful +way.) + +```toml +[dependencies] +tree-sitter = "~0.20.10" +tree-sitter-svelte = "0.0.1" +``` + +Typically, you will use the [language][language func] function to add this +grammar to a tree-sitter [Parser][], and then use the parser to parse some code: + +```rust +let code = r#" + +"#; +let mut parser = Parser::new(); +parser.set_language(tree_sitter_svelte::language()).expect("Error loading Svelte grammar"); +let parsed = parser.parse(code, None); +``` + +If you have any questions, please reach out to us in the [tree-sitter +discussions] page. + +[language func]: https://docs.rs/tree-sitter-svelte/*/tree_sitter_svelte/fn.language.html +[parser]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Parser.html +[tree-sitter]: https://tree-sitter.github.io/ +[tree-sitter crate]: https://crates.io/crates/tree-sitter +[tree-sitter discussions]: https://github.com/tree-sitter/tree-sitter/discussions diff --git a/bindings/rust/build.rs b/bindings/rust/build.rs new file mode 100644 index 0000000..8851fed --- /dev/null +++ b/bindings/rust/build.rs @@ -0,0 +1,19 @@ +fn main() { + let src_dir = std::path::Path::new("src"); + + let mut c_config = cc::Build::new(); + c_config.include(src_dir); + c_config + .flag_if_supported("-Wno-unused-parameter") + .flag_if_supported("-Wno-unused-but-set-variable") + .flag_if_supported("-Wno-trigraphs"); + let parser_path = src_dir.join("parser.c"); + c_config.file(&parser_path); + + let scanner_path = src_dir.join("scanner.c"); + c_config.file(&scanner_path); + println!("cargo:rerun-if-changed={}", scanner_path.to_str().unwrap()); + + c_config.compile("parser"); + println!("cargo:rerun-if-changed={}", parser_path.to_str().unwrap()); +} diff --git a/bindings/rust/lib.rs b/bindings/rust/lib.rs new file mode 100644 index 0000000..97d8d83 --- /dev/null +++ b/bindings/rust/lib.rs @@ -0,0 +1,49 @@ +//! This crate provides Svelte language support for the [tree-sitter][] parsing library. +//! +//! Typically, you will use the [language][language func] function to add this language to a +//! tree-sitter [Parser][], and then use the parser to parse some code: +//! +//! ``` +//! let code = ""; +//! let mut parser = tree_sitter::Parser::new(); +//! parser.set_language(tree_sitter_svelte::language()).expect("Error loading Svelte grammar"); +//! let tree = parser.parse(code, None).unwrap(); +//! ``` +//! +//! [Language]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Language.html +//! [language func]: fn.language.html +//! [Parser]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Parser.html +//! [tree-sitter]: https://tree-sitter.github.io/ + +use tree_sitter::Language; + +extern "C" { + fn tree_sitter_svelte() -> Language; +} + +/// Get the tree-sitter [Language][] for this grammar. +/// +/// [Language]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Language.html +pub fn language() -> Language { + unsafe { tree_sitter_svelte() } +} + +/// The content of the [`node-types.json`][] file for this grammar. +/// +/// [`node-types.json`]: https://tree-sitter.github.io/tree-sitter/using-parsers#static-node-types +pub const NODE_TYPES: &str = include_str!("../../src/node-types.json"); + +pub const HIGHLIGHTS_QUERY: &str = include_str!("../../queries/highlights.scm"); +pub const INJECTIONS_QUERY: &str = include_str!("../../queries/injections.scm"); +pub const LOCALS_QUERY: &str = include_str!("../../queries/locals.scm"); + +#[cfg(test)] +mod tests { + #[test] + fn test_can_load_grammar() { + let mut parser = tree_sitter::Parser::new(); + parser + .set_language(super::language()) + .expect("Error loading Svelte grammar"); + } +} diff --git a/bindings/swift/TreeSitterSvelte/svelte.h b/bindings/swift/TreeSitterSvelte/svelte.h new file mode 100644 index 0000000..75c7ebd --- /dev/null +++ b/bindings/swift/TreeSitterSvelte/svelte.h @@ -0,0 +1,16 @@ +#ifndef TREE_SITTER_SVELTE_H_ +#define TREE_SITTER_SVELTE_H_ + +typedef struct TSLanguage TSLanguage; + +#ifdef __cplusplus +extern "C" { +#endif + +extern TSLanguage *tree_sitter_svelte(); + +#ifdef __cplusplus +} +#endif + +#endif // TREE_SITTER_SVELTE_H_ diff --git a/grammar.js b/grammar.js new file mode 100644 index 0000000..2d7ab85 --- /dev/null +++ b/grammar.js @@ -0,0 +1,222 @@ +// eslint-disable-next-line spaced-comment +/// +// @ts-check + +const HTML = require('tree-sitter-html/grammar'); + +module.exports = grammar(HTML, { + name: 'svelte', + + conflicts: $ => [ + [$.else_if_block], + [$.else_block], + ], + + externals: $ => [ + $._start_tag_name, + $._script_start_tag_name, + $._style_start_tag_name, + $._end_tag_name, + $.erroneous_end_tag_name, + '/>', + $._implicit_end_tag, + $.raw_text, + $.comment, + $.raw_text_svelte, + $.raw_text_svelte_each, + '@', + '#', + '/', + ':', + ], + + extras: $ => [ + $.comment, + /\s+/, + ], + + inline: $ => [ + $._raw_text_svelte, + ], + + supertypes: $ => [ + $._node, + ], + + rules: { + _node: ($, original) => choice( + original, + + $.if_statement, + $.each_statement, + $.await_statement, + $.key_statement, + $.snippet_statement, + + $.expression, + $.html_tag, + $.const_tag, + $.debug_tag, + $.render_tag, + ), + + attribute: $ => seq( + choice( + seq( + $.attribute_name, + optional(seq( + '=', + choice( + $.attribute_value, + $.quoted_attribute_value, + $.expression, + ), + )), + ), + alias($.expression, $.attribute_name), + ), + ), + + if_statement: $ => seq( + $.if_start, + repeat($._node), + repeat($.else_if_block), + optional($.else_block), + $.if_end, + ), + + if_start: $ => seq('{', '#', token.immediate('if'), $._raw_text_svelte, '}'), + + else_if_block: $ => seq( + '{', + ':', + token.immediate('else'), + 'if', + $._raw_text_svelte, + '}', + repeat($._node), + ), + + else_block: $ => seq( + '{', + ':', + token.immediate('else'), + '}', + repeat($._node), + ), + + if_end: _ => seq('{', '/', token.immediate('if'), '}'), + + each_statement: $ => seq( + $.each_start, + repeat($._node), + optional(seq($.else_block, repeat($._node))), + $.each_end, + ), + + each_start: $ => seq( + '{', + '#', + token.immediate('each'), + choice( + $._raw_text_svelte, + seq($._raw_text_svelte_each, 'as', $._raw_text_svelte), + ), + '}', + ), + + each_end: _ => seq('{', '/', token.immediate('each'), '}'), + + await_statement: $ => seq( + $.await_start, + repeat($._node), + optional(seq($.then_block, repeat($._node))), + optional(seq($.catch_block, repeat($._node))), + $.await_end, + ), + + await_start: $ => seq('{', '#', token.immediate('await'), $._raw_text_svelte, '}'), + + then_block: $ => seq('{', ':', token.immediate('then'), optional($._raw_text_svelte), '}'), + + catch_block: $ => seq('{', ':', 'catch', optional($._raw_text_svelte), '}'), + + await_end: _ => seq('{', '/', token.immediate('await'), '}'), + + key_statement: $ => seq( + $.key_start, + repeat($._node), + $.key_end, + ), + + key_start: $ => seq( + '{', + '#', + token.immediate('key'), + $._raw_text_svelte, + '}', + ), + + key_end: _ => seq('{', '/', token.immediate('key'), '}'), + + snippet_statement: $ => seq( + $.snippet_start, + repeat($._node), + $.snippet_end, + ), + + snippet_start: $ => seq( + '{', + '#', + token.immediate('snippet'), + $._raw_text_svelte, + '}', + ), + + snippet_end: _ => seq('{', '/', token.immediate('snippet'), '}'), + + expression: $ => seq('{', $._raw_text_svelte, '}'), + + html_tag: $ => seq( + '{', + '@', + token.immediate('html'), + $._raw_text_svelte, + '}', + ), + + const_tag: $ => seq( + '{', + '@', + token.immediate('const'), + $._raw_text_svelte, + '}', + ), + + debug_tag: $ => seq( + '{', + '@', + token.immediate('debug'), + $._raw_text_svelte, + '}', + ), + + render_tag: $ => seq( + '{', + '@', + token.immediate('render'), + $._raw_text_svelte, + '}', + ), + + attribute_name: _ => /[^<>{}"'/=\s]+/, + + attribute_value: _ => /[^<>{}"'=\s]+/, + + text: _ => /[^<>{}&\s]([^<>{}&]*[^<>{}&\s])?/, + + _raw_text_svelte: $ => alias($.raw_text_svelte, $.raw_text), + + _raw_text_svelte_each: $ => alias($.raw_text_svelte_each, $.raw_text), + }, +}); diff --git a/package.json b/package.json new file mode 100644 index 0000000..f537cdf --- /dev/null +++ b/package.json @@ -0,0 +1,49 @@ +{ + "name": "tree-sitter-svelte", + "version": "0.0.1", + "description": "Svelte grammar for tree-sitter", + "main": "bindings/node", + "keywords": [ + "parsing", + "incremental", + "svelte" + ], + "author": { + "name": "Amaan Qureshi", + "email": "amaanq12@gmail.com" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/tree-sitter-grammars/tree-sitter-svelte/issues" + }, + "homepage": "https://github.com/tree-sitter-grammars/tree-sitter-svelte#readme", + "repository": "https://github.com/tree-sitter-grammars/tree-sitter-svelte", + "dependencies": { + "nan": "^2.18.0", + "tree-sitter-html": "^0.20.1" + }, + "devDependencies": { + "eslint": ">=8.56.0", + "eslint-config-google": "^0.14.0", + "tree-sitter-cli": "^0.20.8" + }, + "scripts": { + "build": "tree-sitter generate && node-gyp build", + "lint": "eslint grammar.js", + "parse": "tree-sitter parse", + "test": "tree-sitter test && script/parse-examples", + "test-windows": "tree-sitter test" + }, + "tree-sitter": [ + { + "scope": "source.svelte", + "injection-regex": "svelte", + "file-types": [ + "svelte" + ], + "highlights": [ + "queries/highlights.scm" + ] + } + ] +} diff --git a/queries/folds.scm b/queries/folds.scm new file mode 100644 index 0000000..6440301 --- /dev/null +++ b/queries/folds.scm @@ -0,0 +1,13 @@ +; inherits: html + +[ + (if_statement) + (else_if_block) + (else_block) + (each_statement) + (await_statement) + (then_block) + (catch_block) + (key_statement) + (snippet_statement) +] @fold diff --git a/queries/highlights.scm b/queries/highlights.scm new file mode 100644 index 0000000..33812d1 --- /dev/null +++ b/queries/highlights.scm @@ -0,0 +1,42 @@ +; inherits: html + +(raw_text) @none + +[ + "as" + "key" + "snippet" + "render" +] @keyword + +"const" @type.qualifier + +[ + "if" + "else" + "then" + "html" +] @keyword.conditional + +"each" @keyword.repeat + +[ + "await" + "then" +] @keyword.coroutine + +"catch" @keyword.exception + +"debug" @keyword.debug + +[ + "{" + "}" +] @punctuation.bracket + +[ + "#" + ":" + "/" + "@" +] @tag.delimiter diff --git a/queries/indents.scm b/queries/indents.scm new file mode 100644 index 0000000..0c67647 --- /dev/null +++ b/queries/indents.scm @@ -0,0 +1,34 @@ +; inherits: html + +[ + (if_statement) + (each_statement) + (await_statement) + (key_statement) + (snippet_statement) +] @indent.begin + +(if_end + "}" @indent.end) + +(each_end + "}" @indent.end) + +(await_end + "}" @indent.end) + +(key_end + "}" @indent.end) + +(snippet_end + "}" @indent.end) + +[ + (if_end) + (else_if_block) + (else_block) + (each_end) + (await_end) + (key_end) + (snippet_end) +] @indent.branch diff --git a/queries/injections.scm b/queries/injections.scm new file mode 100644 index 0000000..bea4984 --- /dev/null +++ b/queries/injections.scm @@ -0,0 +1,36 @@ +; inherits: html_tags + +((style_element + (start_tag + (attribute + (attribute_name) @_attr + (quoted_attribute_value + (attribute_value) @_lang))) + (raw_text) @injection.content) + (#eq? @_attr "lang") + (#any-of? @_lang "scss" "postcss" "less") + (#set! injection.language "scss")) + +(raw_text + (#set! injection.language "javascript")) + +((script_element + (start_tag + (attribute + (attribute_name) @_attr + (quoted_attribute_value + (attribute_value) @_lang))) + (raw_text) @injection.content) + (#eq? @_attr "lang") + (#any-of? @_lang "ts" "typescript") + (#set! injection.language "typescript")) + +((element + (start_tag + (attribute + (attribute_name) @_attr + (quoted_attribute_value + (attribute_value) @injection.language))) + (text) @injection.content) + (#eq? @_attr "lang") + (#eq? @injection.language "pug")) diff --git a/queries/locals.scm b/queries/locals.scm new file mode 100644 index 0000000..1f2129c --- /dev/null +++ b/queries/locals.scm @@ -0,0 +1 @@ +; inherits: html diff --git a/script/known_failures.txt b/script/known_failures.txt new file mode 100644 index 0000000..0096510 --- /dev/null +++ b/script/known_failures.txt @@ -0,0 +1,83 @@ +examples/svelte/packages/svelte/tests/compiler-errors/samples/attribute-empty/main.svelte +examples/svelte/packages/svelte/tests/compiler-errors/samples/catch-before-closing/main.svelte +examples/svelte/packages/svelte/tests/compiler-errors/samples/catch-without-await/main.svelte +examples/svelte/packages/svelte/tests/compiler-errors/samples/comment-unclosed/main.svelte +examples/svelte/packages/svelte/tests/compiler-errors/samples/else-before-closing/main.svelte +examples/svelte/packages/svelte/tests/compiler-errors/samples/else-before-closing-2/main.svelte +examples/svelte/packages/svelte/tests/compiler-errors/samples/else-before-closing-3/main.svelte +examples/svelte/packages/svelte/tests/compiler-errors/samples/else-if-before-closing/main.svelte +examples/svelte/packages/svelte/tests/compiler-errors/samples/else-if-before-closing-2/main.svelte +examples/svelte/packages/svelte/tests/compiler-errors/samples/else-if-without-if/main.svelte +examples/svelte/packages/svelte/tests/compiler-errors/samples/empty-attribute-shorthand/main.svelte +examples/svelte/packages/svelte/tests/compiler-errors/samples/runes-invalid-each-binding/main.svelte +examples/svelte/packages/svelte/tests/compiler-errors/samples/script-unclosed/main.svelte +examples/svelte/packages/svelte/tests/compiler-errors/samples/script-unclosed-eof/main.svelte +examples/svelte/packages/svelte/tests/compiler-errors/samples/style-unclosed/main.svelte +examples/svelte/packages/svelte/tests/compiler-errors/samples/style-unclosed-eof/main.svelte +examples/svelte/packages/svelte/tests/compiler-errors/samples/then-before-closing/main.svelte +examples/svelte/packages/svelte/tests/compiler-errors/samples/then-without-await/main.svelte +examples/svelte/packages/svelte/tests/compiler-errors/samples/unclosed-attribute-self-close-tag/main.svelte +examples/svelte/packages/svelte/tests/compiler-errors/samples/unexpected-end-of-input/main.svelte +examples/svelte/packages/svelte/tests/compiler-errors/samples/unexpected-end-of-input-b/main.svelte +examples/svelte/packages/svelte/tests/compiler-errors/samples/unexpected-end-of-input-c/main.svelte +examples/svelte/packages/svelte/tests/compiler-errors/samples/unexpected-end-of-input-d/main.svelte +examples/svelte/packages/svelte/tests/compiler-errors/samples/unmatched-closing-tag/main.svelte +examples/svelte/packages/svelte/tests/compiler-errors/samples/unmatched-closing-tag-autoclose/main.svelte +examples/svelte/packages/svelte/tests/compiler-errors/samples/unmatched-closing-tag-autoclose-2/main.svelte +examples/svelte/packages/svelte/tests/parser-legacy/samples/implicitly-closed-li-block/input.svelte +examples/svelte/packages/svelte/tests/parser-legacy/samples/no-error-if-before-closing/input.svelte +examples/svelte/packages/svelte/tests/parser-legacy/samples/textarea-end-tag/input.svelte +examples/svelte/packages/svelte/tests/preprocess/samples/script-self-closing/input.svelte +examples/svelte/packages/svelte/tests/preprocess/samples/style-self-closing/input.svelte +examples/svelte/packages/svelte/tests/runtime-legacy/samples/await-catch-no-expression/main.svelte +examples/svelte/packages/svelte/tests/runtime-legacy/samples/binding-input-checkbox-with-event-in-each/main.svelte +examples/svelte/packages/svelte/tests/runtime-legacy/samples/each-block-deconflict-name-context/main.svelte +examples/svelte/packages/svelte/tests/runtime-legacy/samples/each-block-scope-shadow-self/main.svelte +examples/svelte/packages/svelte/tests/runtime-legacy/samples/escape-template-literals/main.svelte +examples/svelte/packages/svelte/tests/runtime-legacy/samples/event-handler-removal/main.svelte +examples/svelte/packages/svelte/tests/runtime-legacy/samples/store-each-binding/main.svelte +examples/svelte/packages/svelte/tests/runtime-legacy/samples/store-each-binding-deep/main.svelte +examples/svelte/packages/svelte/tests/runtime-legacy/samples/store-each-binding-destructuring/main.svelte +examples/svelte/packages/svelte/tests/runtime-legacy/samples/unchanged-expression-escape/main.svelte +examples/svelte/packages/svelte/tests/validator/samples/attribute-expected-equals/input.svelte +examples/svelte/packages/svelte/tests/validator/samples/attribute-invalid-name/input.svelte +examples/svelte/sites/svelte-5-preview/src/lib/Output/CompilerOptions.svelte +examples/svelte/sites/svelte-5-preview/static/svelte/tests/compiler-errors/samples/attribute-empty/main.svelte +examples/svelte/sites/svelte-5-preview/static/svelte/tests/compiler-errors/samples/catch-before-closing/main.svelte +examples/svelte/sites/svelte-5-preview/static/svelte/tests/compiler-errors/samples/comment-unclosed/main.svelte +examples/svelte/sites/svelte-5-preview/static/svelte/tests/compiler-errors/samples/else-before-closing/main.svelte +examples/svelte/sites/svelte-5-preview/static/svelte/tests/compiler-errors/samples/else-before-closing-2/main.svelte +examples/svelte/sites/svelte-5-preview/static/svelte/tests/compiler-errors/samples/else-if-before-closing/main.svelte +examples/svelte/sites/svelte-5-preview/static/svelte/tests/compiler-errors/samples/else-if-before-closing-2/main.svelte +examples/svelte/sites/svelte-5-preview/static/svelte/tests/compiler-errors/samples/else-if-without-if/main.svelte +examples/svelte/sites/svelte-5-preview/static/svelte/tests/compiler-errors/samples/empty-attribute-shorthand/main.svelte +examples/svelte/sites/svelte-5-preview/static/svelte/tests/compiler-errors/samples/runes-invalid-each-binding/main.svelte +examples/svelte/sites/svelte-5-preview/static/svelte/tests/compiler-errors/samples/script-unclosed/main.svelte +examples/svelte/sites/svelte-5-preview/static/svelte/tests/compiler-errors/samples/script-unclosed-eof/main.svelte +examples/svelte/sites/svelte-5-preview/static/svelte/tests/compiler-errors/samples/style-unclosed/main.svelte +examples/svelte/sites/svelte-5-preview/static/svelte/tests/compiler-errors/samples/style-unclosed-eof/main.svelte +examples/svelte/sites/svelte-5-preview/static/svelte/tests/compiler-errors/samples/then-before-closing/main.svelte +examples/svelte/sites/svelte-5-preview/static/svelte/tests/compiler-errors/samples/unclosed-attribute-self-close-tag/main.svelte +examples/svelte/sites/svelte-5-preview/static/svelte/tests/compiler-errors/samples/unexpected-end-of-input/main.svelte +examples/svelte/sites/svelte-5-preview/static/svelte/tests/compiler-errors/samples/unexpected-end-of-input-b/main.svelte +examples/svelte/sites/svelte-5-preview/static/svelte/tests/compiler-errors/samples/unexpected-end-of-input-c/main.svelte +examples/svelte/sites/svelte-5-preview/static/svelte/tests/compiler-errors/samples/unexpected-end-of-input-d/main.svelte +examples/svelte/sites/svelte-5-preview/static/svelte/tests/compiler-errors/samples/unmatched-closing-tag/main.svelte +examples/svelte/sites/svelte-5-preview/static/svelte/tests/compiler-errors/samples/unmatched-closing-tag-autoclose/main.svelte +examples/svelte/sites/svelte-5-preview/static/svelte/tests/compiler-errors/samples/unmatched-closing-tag-autoclose-2/main.svelte +examples/svelte/sites/svelte-5-preview/static/svelte/tests/parser-legacy/samples/implicitly-closed-li-block/input.svelte +examples/svelte/sites/svelte-5-preview/static/svelte/tests/parser-legacy/samples/no-error-if-before-closing/input.svelte +examples/svelte/sites/svelte-5-preview/static/svelte/tests/parser-legacy/samples/textarea-end-tag/input.svelte +examples/svelte/sites/svelte-5-preview/static/svelte/tests/preprocess/samples/script-self-closing/input.svelte +examples/svelte/sites/svelte-5-preview/static/svelte/tests/preprocess/samples/style-self-closing/input.svelte +examples/svelte/sites/svelte-5-preview/static/svelte/tests/runtime-legacy/samples/binding-input-checkbox-with-event-in-each/main.svelte +examples/svelte/sites/svelte-5-preview/static/svelte/tests/runtime-legacy/samples/each-block-deconflict-name-context/main.svelte +examples/svelte/sites/svelte-5-preview/static/svelte/tests/runtime-legacy/samples/each-block-scope-shadow-self/main.svelte +examples/svelte/sites/svelte-5-preview/static/svelte/tests/runtime-legacy/samples/escape-template-literals/main.svelte +examples/svelte/sites/svelte-5-preview/static/svelte/tests/runtime-legacy/samples/event-handler-removal/main.svelte +examples/svelte/sites/svelte-5-preview/static/svelte/tests/runtime-legacy/samples/store-each-binding/main.svelte +examples/svelte/sites/svelte-5-preview/static/svelte/tests/runtime-legacy/samples/store-each-binding-deep/main.svelte +examples/svelte/sites/svelte-5-preview/static/svelte/tests/runtime-legacy/samples/store-each-binding-destructuring/main.svelte +examples/svelte/sites/svelte-5-preview/static/svelte/tests/runtime-legacy/samples/unchanged-expression-escape/main.svelte +examples/svelte/sites/svelte-5-preview/static/svelte/tests/validator/samples/attribute-expected-equals/input.svelte +examples/svelte/sites/svelte-5-preview/static/svelte/tests/validator/samples/attribute-invalid-name/input.svelte diff --git a/script/parse-examples b/script/parse-examples new file mode 100755 index 0000000..5a7a1d2 --- /dev/null +++ b/script/parse-examples @@ -0,0 +1,44 @@ +#!/usr/bin/env bash + +set -eu + +cd "$(dirname "$0")/.." + +function clone_repo { + owner=$1 + name=$2 + sha=$3 + + path=examples/$name + if [ ! -d "$path" ]; then + echo "Cloning $owner/$name" + git clone "https://github.com/$owner/$name" "$path" + fi + + pushd "$path" >/dev/null + actual_sha=$(git rev-parse HEAD) + if [ "$actual_sha" != "$sha" ]; then + echo "Updating $owner/$name to $sha" + git fetch + git reset --hard "$sha" + fi + popd >/dev/null +} + +clone_repo sveltejs svelte a279e802d53cd84008a1016b88c2d3280d35aabf + +known_failures=$(cat script/known_failures.txt) + +# shellcheck disable=2046 +tree-sitter parse -q \ + examples/**/*.svelte \ + $(for file in $known_failures; do echo "!${file}"; done) + +example_count=$(find examples -name '*.svelte' | wc -l) +failure_count=$(wc -w <<<"$known_failures") +success_count=$(("$example_count" - "$failure_count")) +success_percent=$(bc -l <<<"100*${success_count}/${example_count}") + +printf \ + "Successfully parsed %d of %d example files (%.1f%%)\n" \ + "$success_count" "$example_count" "$success_percent" diff --git a/src/grammar.json b/src/grammar.json new file mode 100644 index 0000000..2d204b4 --- /dev/null +++ b/src/grammar.json @@ -0,0 +1,1362 @@ +{ + "name": "svelte", + "rules": { + "document": { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_node" + } + }, + "doctype": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "]+" + }, + { + "type": "STRING", + "value": ">" + } + ] + }, + "_doctype": { + "type": "PATTERN", + "value": "[Dd][Oo][Cc][Tt][Yy][Pp][Ee]" + }, + "_node": { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "doctype" + }, + { + "type": "SYMBOL", + "name": "entity" + }, + { + "type": "SYMBOL", + "name": "text" + }, + { + "type": "SYMBOL", + "name": "element" + }, + { + "type": "SYMBOL", + "name": "script_element" + }, + { + "type": "SYMBOL", + "name": "style_element" + }, + { + "type": "SYMBOL", + "name": "erroneous_end_tag" + } + ] + }, + { + "type": "SYMBOL", + "name": "if_statement" + }, + { + "type": "SYMBOL", + "name": "each_statement" + }, + { + "type": "SYMBOL", + "name": "await_statement" + }, + { + "type": "SYMBOL", + "name": "key_statement" + }, + { + "type": "SYMBOL", + "name": "snippet_statement" + }, + { + "type": "SYMBOL", + "name": "expression" + }, + { + "type": "SYMBOL", + "name": "html_tag" + }, + { + "type": "SYMBOL", + "name": "const_tag" + }, + { + "type": "SYMBOL", + "name": "debug_tag" + }, + { + "type": "SYMBOL", + "name": "render_tag" + } + ] + }, + "element": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "start_tag" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_node" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "end_tag" + }, + { + "type": "SYMBOL", + "name": "_implicit_end_tag" + } + ] + } + ] + }, + { + "type": "SYMBOL", + "name": "self_closing_tag" + } + ] + }, + "script_element": { + "type": "SEQ", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "script_start_tag" + }, + "named": true, + "value": "start_tag" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "raw_text" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "end_tag" + } + ] + }, + "style_element": { + "type": "SEQ", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "style_start_tag" + }, + "named": true, + "value": "start_tag" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "raw_text" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "end_tag" + } + ] + }, + "start_tag": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "<" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_start_tag_name" + }, + "named": true, + "value": "tag_name" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "attribute" + } + }, + { + "type": "STRING", + "value": ">" + } + ] + }, + "script_start_tag": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "<" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_script_start_tag_name" + }, + "named": true, + "value": "tag_name" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "attribute" + } + }, + { + "type": "STRING", + "value": ">" + } + ] + }, + "style_start_tag": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "<" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_style_start_tag_name" + }, + "named": true, + "value": "tag_name" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "attribute" + } + }, + { + "type": "STRING", + "value": ">" + } + ] + }, + "self_closing_tag": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "<" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_start_tag_name" + }, + "named": true, + "value": "tag_name" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "attribute" + } + }, + { + "type": "STRING", + "value": "/>" + } + ] + }, + "end_tag": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "" + } + ] + }, + "erroneous_end_tag": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "" + } + ] + }, + "attribute": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "attribute_name" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "=" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "attribute_value" + }, + { + "type": "SYMBOL", + "name": "quoted_attribute_value" + }, + { + "type": "SYMBOL", + "name": "expression" + } + ] + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "expression" + }, + "named": true, + "value": "attribute_name" + } + ] + } + ] + }, + "attribute_name": { + "type": "PATTERN", + "value": "[^<>{}\"'/=\\s]+" + }, + "attribute_value": { + "type": "PATTERN", + "value": "[^<>{}\"'=\\s]+" + }, + "entity": { + "type": "PATTERN", + "value": "&(#([xX][0-9a-fA-F]{1,6}|[0-9]{1,5})|[A-Za-z]{1,30});?" + }, + "quoted_attribute_value": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "'" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "PATTERN", + "value": "[^']+" + }, + "named": true, + "value": "attribute_value" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "'" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "\"" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "PATTERN", + "value": "[^\"]+" + }, + "named": true, + "value": "attribute_value" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "\"" + } + ] + } + ] + }, + "text": { + "type": "PATTERN", + "value": "[^<>{}&\\s]([^<>{}&]*[^<>{}&\\s])?" + }, + "if_statement": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "if_start" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_node" + } + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "else_if_block" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "else_block" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "if_end" + } + ] + }, + "if_start": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "STRING", + "value": "#" + }, + { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "STRING", + "value": "if" + } + }, + { + "type": "SYMBOL", + "name": "_raw_text_svelte" + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "else_if_block": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "STRING", + "value": "else" + } + }, + { + "type": "STRING", + "value": "if" + }, + { + "type": "SYMBOL", + "name": "_raw_text_svelte" + }, + { + "type": "STRING", + "value": "}" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_node" + } + } + ] + }, + "else_block": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "STRING", + "value": "else" + } + }, + { + "type": "STRING", + "value": "}" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_node" + } + } + ] + }, + "if_end": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "STRING", + "value": "/" + }, + { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "STRING", + "value": "if" + } + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "each_statement": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "each_start" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_node" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "else_block" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_node" + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "each_end" + } + ] + }, + "each_start": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "STRING", + "value": "#" + }, + { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "STRING", + "value": "each" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_raw_text_svelte" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_raw_text_svelte_each" + }, + { + "type": "STRING", + "value": "as" + }, + { + "type": "SYMBOL", + "name": "_raw_text_svelte" + } + ] + } + ] + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "each_end": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "STRING", + "value": "/" + }, + { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "STRING", + "value": "each" + } + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "await_statement": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "await_start" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_node" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "then_block" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_node" + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "catch_block" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_node" + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "await_end" + } + ] + }, + "await_start": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "STRING", + "value": "#" + }, + { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "STRING", + "value": "await" + } + }, + { + "type": "SYMBOL", + "name": "_raw_text_svelte" + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "then_block": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "STRING", + "value": "then" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_raw_text_svelte" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "catch_block": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "STRING", + "value": ":" + }, + { + "type": "STRING", + "value": "catch" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_raw_text_svelte" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "await_end": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "STRING", + "value": "/" + }, + { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "STRING", + "value": "await" + } + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "key_statement": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "key_start" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_node" + } + }, + { + "type": "SYMBOL", + "name": "key_end" + } + ] + }, + "key_start": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "STRING", + "value": "#" + }, + { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "STRING", + "value": "key" + } + }, + { + "type": "SYMBOL", + "name": "_raw_text_svelte" + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "key_end": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "STRING", + "value": "/" + }, + { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "STRING", + "value": "key" + } + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "snippet_statement": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "snippet_start" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_node" + } + }, + { + "type": "SYMBOL", + "name": "snippet_end" + } + ] + }, + "snippet_start": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "STRING", + "value": "#" + }, + { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "STRING", + "value": "snippet" + } + }, + { + "type": "SYMBOL", + "name": "_raw_text_svelte" + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "snippet_end": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "STRING", + "value": "/" + }, + { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "STRING", + "value": "snippet" + } + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "expression": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "SYMBOL", + "name": "_raw_text_svelte" + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "html_tag": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "STRING", + "value": "@" + }, + { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "STRING", + "value": "html" + } + }, + { + "type": "SYMBOL", + "name": "_raw_text_svelte" + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "const_tag": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "STRING", + "value": "@" + }, + { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "STRING", + "value": "const" + } + }, + { + "type": "SYMBOL", + "name": "_raw_text_svelte" + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "debug_tag": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "STRING", + "value": "@" + }, + { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "STRING", + "value": "debug" + } + }, + { + "type": "SYMBOL", + "name": "_raw_text_svelte" + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "render_tag": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "{" + }, + { + "type": "STRING", + "value": "@" + }, + { + "type": "IMMEDIATE_TOKEN", + "content": { + "type": "STRING", + "value": "render" + } + }, + { + "type": "SYMBOL", + "name": "_raw_text_svelte" + }, + { + "type": "STRING", + "value": "}" + } + ] + }, + "_raw_text_svelte": { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "raw_text_svelte" + }, + "named": true, + "value": "raw_text" + }, + "_raw_text_svelte_each": { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "raw_text_svelte_each" + }, + "named": true, + "value": "raw_text" + } + }, + "extras": [ + { + "type": "SYMBOL", + "name": "comment" + }, + { + "type": "PATTERN", + "value": "\\s+" + } + ], + "conflicts": [ + [ + "else_if_block" + ], + [ + "else_block" + ] + ], + "precedences": [], + "externals": [ + { + "type": "SYMBOL", + "name": "_start_tag_name" + }, + { + "type": "SYMBOL", + "name": "_script_start_tag_name" + }, + { + "type": "SYMBOL", + "name": "_style_start_tag_name" + }, + { + "type": "SYMBOL", + "name": "_end_tag_name" + }, + { + "type": "SYMBOL", + "name": "erroneous_end_tag_name" + }, + { + "type": "STRING", + "value": "/>" + }, + { + "type": "SYMBOL", + "name": "_implicit_end_tag" + }, + { + "type": "SYMBOL", + "name": "raw_text" + }, + { + "type": "SYMBOL", + "name": "comment" + }, + { + "type": "SYMBOL", + "name": "raw_text_svelte" + }, + { + "type": "SYMBOL", + "name": "raw_text_svelte_each" + }, + { + "type": "STRING", + "value": "@" + }, + { + "type": "STRING", + "value": "#" + }, + { + "type": "STRING", + "value": "/" + }, + { + "type": "STRING", + "value": ":" + } + ], + "inline": [ + "_raw_text_svelte" + ], + "supertypes": [ + "_node" + ] +} diff --git a/src/node-types.json b/src/node-types.json new file mode 100644 index 0000000..b327f8a --- /dev/null +++ b/src/node-types.json @@ -0,0 +1,808 @@ +[ + { + "type": "_node", + "named": true, + "subtypes": [ + { + "type": "await_statement", + "named": true + }, + { + "type": "const_tag", + "named": true + }, + { + "type": "debug_tag", + "named": true + }, + { + "type": "doctype", + "named": true + }, + { + "type": "each_statement", + "named": true + }, + { + "type": "element", + "named": true + }, + { + "type": "entity", + "named": true + }, + { + "type": "erroneous_end_tag", + "named": true + }, + { + "type": "expression", + "named": true + }, + { + "type": "html_tag", + "named": true + }, + { + "type": "if_statement", + "named": true + }, + { + "type": "key_statement", + "named": true + }, + { + "type": "render_tag", + "named": true + }, + { + "type": "script_element", + "named": true + }, + { + "type": "snippet_statement", + "named": true + }, + { + "type": "style_element", + "named": true + }, + { + "type": "text", + "named": true + } + ] + }, + { + "type": "attribute", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "attribute_name", + "named": true + }, + { + "type": "attribute_value", + "named": true + }, + { + "type": "expression", + "named": true + }, + { + "type": "quoted_attribute_value", + "named": true + } + ] + } + }, + { + "type": "attribute_name", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": false, + "types": [ + { + "type": "raw_text", + "named": true + } + ] + } + }, + { + "type": "await_end", + "named": true, + "fields": {} + }, + { + "type": "await_start", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "raw_text", + "named": true + } + ] + } + }, + { + "type": "await_statement", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_node", + "named": true + }, + { + "type": "await_end", + "named": true + }, + { + "type": "await_start", + "named": true + }, + { + "type": "catch_block", + "named": true + }, + { + "type": "then_block", + "named": true + } + ] + } + }, + { + "type": "catch_block", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": false, + "types": [ + { + "type": "raw_text", + "named": true + } + ] + } + }, + { + "type": "const_tag", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "raw_text", + "named": true + } + ] + } + }, + { + "type": "debug_tag", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "raw_text", + "named": true + } + ] + } + }, + { + "type": "doctype", + "named": true, + "fields": {} + }, + { + "type": "document", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "_node", + "named": true + } + ] + } + }, + { + "type": "each_end", + "named": true, + "fields": {} + }, + { + "type": "each_start", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "raw_text", + "named": true + } + ] + } + }, + { + "type": "each_statement", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_node", + "named": true + }, + { + "type": "each_end", + "named": true + }, + { + "type": "each_start", + "named": true + }, + { + "type": "else_block", + "named": true + } + ] + } + }, + { + "type": "element", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_node", + "named": true + }, + { + "type": "end_tag", + "named": true + }, + { + "type": "self_closing_tag", + "named": true + }, + { + "type": "start_tag", + "named": true + } + ] + } + }, + { + "type": "else_block", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "_node", + "named": true + } + ] + } + }, + { + "type": "else_if_block", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_node", + "named": true + }, + { + "type": "raw_text", + "named": true + } + ] + } + }, + { + "type": "end_tag", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "tag_name", + "named": true + } + ] + } + }, + { + "type": "erroneous_end_tag", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "erroneous_end_tag_name", + "named": true + } + ] + } + }, + { + "type": "expression", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "raw_text", + "named": true + } + ] + } + }, + { + "type": "html_tag", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "raw_text", + "named": true + } + ] + } + }, + { + "type": "if_end", + "named": true, + "fields": {} + }, + { + "type": "if_start", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "raw_text", + "named": true + } + ] + } + }, + { + "type": "if_statement", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_node", + "named": true + }, + { + "type": "else_block", + "named": true + }, + { + "type": "else_if_block", + "named": true + }, + { + "type": "if_end", + "named": true + }, + { + "type": "if_start", + "named": true + } + ] + } + }, + { + "type": "key_end", + "named": true, + "fields": {} + }, + { + "type": "key_start", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "raw_text", + "named": true + } + ] + } + }, + { + "type": "key_statement", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_node", + "named": true + }, + { + "type": "key_end", + "named": true + }, + { + "type": "key_start", + "named": true + } + ] + } + }, + { + "type": "quoted_attribute_value", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": false, + "types": [ + { + "type": "attribute_value", + "named": true + } + ] + } + }, + { + "type": "render_tag", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "raw_text", + "named": true + } + ] + } + }, + { + "type": "script_element", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "end_tag", + "named": true + }, + { + "type": "raw_text", + "named": true + }, + { + "type": "start_tag", + "named": true + } + ] + } + }, + { + "type": "self_closing_tag", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "attribute", + "named": true + }, + { + "type": "tag_name", + "named": true + } + ] + } + }, + { + "type": "snippet_end", + "named": true, + "fields": {} + }, + { + "type": "snippet_start", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "raw_text", + "named": true + } + ] + } + }, + { + "type": "snippet_statement", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "_node", + "named": true + }, + { + "type": "snippet_end", + "named": true + }, + { + "type": "snippet_start", + "named": true + } + ] + } + }, + { + "type": "start_tag", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "attribute", + "named": true + }, + { + "type": "tag_name", + "named": true + } + ] + } + }, + { + "type": "style_element", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "end_tag", + "named": true + }, + { + "type": "raw_text", + "named": true + }, + { + "type": "start_tag", + "named": true + } + ] + } + }, + { + "type": "then_block", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": false, + "types": [ + { + "type": "raw_text", + "named": true + } + ] + } + }, + { + "type": "\"", + "named": false + }, + { + "type": "#", + "named": false + }, + { + "type": "'", + "named": false + }, + { + "type": "/", + "named": false + }, + { + "type": "/>", + "named": false + }, + { + "type": ":", + "named": false + }, + { + "type": "<", + "named": false + }, + { + "type": "", + "named": false + }, + { + "type": "@", + "named": false + }, + { + "type": "as", + "named": false + }, + { + "type": "attribute_value", + "named": true + }, + { + "type": "await", + "named": false + }, + { + "type": "catch", + "named": false + }, + { + "type": "comment", + "named": true + }, + { + "type": "const", + "named": false + }, + { + "type": "debug", + "named": false + }, + { + "type": "doctype", + "named": false + }, + { + "type": "each", + "named": false + }, + { + "type": "else", + "named": false + }, + { + "type": "entity", + "named": true + }, + { + "type": "erroneous_end_tag_name", + "named": true + }, + { + "type": "html", + "named": false + }, + { + "type": "if", + "named": false + }, + { + "type": "key", + "named": false + }, + { + "type": "raw_text", + "named": true + }, + { + "type": "render", + "named": false + }, + { + "type": "snippet", + "named": false + }, + { + "type": "tag_name", + "named": true + }, + { + "type": "text", + "named": true + }, + { + "type": "then", + "named": false + }, + { + "type": "{", + "named": false + }, + { + "type": "}", + "named": false + } +] \ No newline at end of file diff --git a/src/parser.c b/src/parser.c new file mode 100644 index 0000000..60819c2 --- /dev/null +++ b/src/parser.c @@ -0,0 +1,8882 @@ +#include "tree_sitter/parser.h" + +#if defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" +#endif + +#define LANGUAGE_VERSION 14 +#define STATE_COUNT 330 +#define LARGE_STATE_COUNT 2 +#define SYMBOL_COUNT 89 +#define ALIAS_COUNT 0 +#define TOKEN_COUNT 47 +#define EXTERNAL_TOKEN_COUNT 15 +#define FIELD_COUNT 0 +#define MAX_ALIAS_SEQUENCE_LENGTH 7 +#define PRODUCTION_ID_COUNT 2 + +enum ts_symbol_identifiers { + anon_sym_LT_BANG = 1, + aux_sym_doctype_token1 = 2, + anon_sym_GT = 3, + sym__doctype = 4, + anon_sym_LT = 5, + anon_sym_SLASH_GT = 6, + anon_sym_LT_SLASH = 7, + anon_sym_EQ = 8, + sym_attribute_name = 9, + sym_attribute_value = 10, + sym_entity = 11, + anon_sym_SQUOTE = 12, + aux_sym_quoted_attribute_value_token1 = 13, + anon_sym_DQUOTE = 14, + aux_sym_quoted_attribute_value_token2 = 15, + sym_text = 16, + anon_sym_LBRACE = 17, + anon_sym_POUND = 18, + anon_sym_if = 19, + anon_sym_RBRACE = 20, + anon_sym_COLON = 21, + anon_sym_else = 22, + anon_sym_if2 = 23, + anon_sym_SLASH = 24, + anon_sym_each = 25, + anon_sym_as = 26, + anon_sym_await = 27, + anon_sym_then = 28, + anon_sym_catch = 29, + anon_sym_key = 30, + anon_sym_snippet = 31, + anon_sym_AT = 32, + anon_sym_html = 33, + anon_sym_const = 34, + anon_sym_debug = 35, + anon_sym_render = 36, + sym__start_tag_name = 37, + sym__script_start_tag_name = 38, + sym__style_start_tag_name = 39, + sym__end_tag_name = 40, + sym_erroneous_end_tag_name = 41, + sym__implicit_end_tag = 42, + sym_raw_text = 43, + sym_comment = 44, + sym_raw_text_svelte = 45, + sym_raw_text_svelte_each = 46, + sym_document = 47, + sym_doctype = 48, + sym__node = 49, + sym_element = 50, + sym_script_element = 51, + sym_style_element = 52, + sym_start_tag = 53, + sym_script_start_tag = 54, + sym_style_start_tag = 55, + sym_self_closing_tag = 56, + sym_end_tag = 57, + sym_erroneous_end_tag = 58, + sym_attribute = 59, + sym_quoted_attribute_value = 60, + sym_if_statement = 61, + sym_if_start = 62, + sym_else_if_block = 63, + sym_else_block = 64, + sym_if_end = 65, + sym_each_statement = 66, + sym_each_start = 67, + sym_each_end = 68, + sym_await_statement = 69, + sym_await_start = 70, + sym_then_block = 71, + sym_catch_block = 72, + sym_await_end = 73, + sym_key_statement = 74, + sym_key_start = 75, + sym_key_end = 76, + sym_snippet_statement = 77, + sym_snippet_start = 78, + sym_snippet_end = 79, + sym_expression = 80, + sym_html_tag = 81, + sym_const_tag = 82, + sym_debug_tag = 83, + sym_render_tag = 84, + sym__raw_text_svelte_each = 85, + aux_sym_document_repeat1 = 86, + aux_sym_start_tag_repeat1 = 87, + aux_sym_if_statement_repeat1 = 88, +}; + +static const char * const ts_symbol_names[] = { + [ts_builtin_sym_end] = "end", + [anon_sym_LT_BANG] = "", + [sym__doctype] = "doctype", + [anon_sym_LT] = "<", + [anon_sym_SLASH_GT] = "/>", + [anon_sym_LT_SLASH] = "') + : (c <= '{' || c == '}')))); +} + +static bool ts_lex(TSLexer *lexer, TSStateId state) { + START_LEXER(); + eof = lexer->eof(lexer); + switch (state) { + case 0: + if (eof) ADVANCE(67); + if (lookahead == '"') ADVANCE(122); + if (lookahead == '#') ADVANCE(127); + if (lookahead == '&') ADVANCE(5); + if (lookahead == '\'') ADVANCE(119); + if (lookahead == '/') ADVANCE(134); + if (lookahead == ':') ADVANCE(130); + if (lookahead == '<') ADVANCE(73); + if (lookahead == '=') ADVANCE(76); + if (lookahead == '>') ADVANCE(71); + if (lookahead == '@') ADVANCE(142); + if (lookahead == 'D') ADVANCE(57); + if (lookahead == 'a') ADVANCE(44); + if (lookahead == 'c') ADVANCE(12); + if (lookahead == 'd') ADVANCE(18); + if (lookahead == 'e') ADVANCE(10); + if (lookahead == 'h') ADVANCE(47); + if (lookahead == 'i') ADVANCE(25); + if (lookahead == 'k') ADVANCE(19); + if (lookahead == 'r') ADVANCE(22); + if (lookahead == 's') ADVANCE(36); + if (lookahead == 't') ADVANCE(30); + if (lookahead == '{') ADVANCE(126); + if (lookahead == '}') ADVANCE(129); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(65) + END_STATE(); + case 1: + if (lookahead == '"') ADVANCE(122); + if (lookahead == '\'') ADVANCE(119); + if (lookahead == '{') ADVANCE(126); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(1) + if (lookahead != 0 && + (lookahead < '<' || '>' < lookahead) && + lookahead != '}') ADVANCE(78); + END_STATE(); + case 2: + if (lookahead == '"') ADVANCE(122); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') ADVANCE(123); + if (lookahead != 0) ADVANCE(124); + END_STATE(); + case 3: + if (lookahead == '#') ADVANCE(127); + if (lookahead == '/') ADVANCE(133); + if (lookahead == ':') ADVANCE(130); + if (lookahead == '@') ADVANCE(142); + if (lookahead == 'a') ADVANCE(53); + if (lookahead == 'e') ADVANCE(9); + if (lookahead == 'i') ADVANCE(25); + if (lookahead == 'k') ADVANCE(19); + if (lookahead == 's') ADVANCE(36); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(4) + END_STATE(); + case 4: + if (lookahead == '#') ADVANCE(127); + if (lookahead == '/') ADVANCE(133); + if (lookahead == ':') ADVANCE(130); + if (lookahead == '@') ADVANCE(142); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(4) + END_STATE(); + case 5: + if (lookahead == '#') ADVANCE(60); + if (('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(118); + END_STATE(); + case 6: + if (lookahead == '\'') ADVANCE(119); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') ADVANCE(120); + if (lookahead != 0) ADVANCE(121); + END_STATE(); + case 7: + if (lookahead == '/') ADVANCE(8); + if (lookahead == '=') ADVANCE(76); + if (lookahead == '>') ADVANCE(71); + if (lookahead == '{') ADVANCE(126); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(7) + if (lookahead != 0 && + lookahead != '"' && + lookahead != '\'' && + lookahead != '<' && + lookahead != '}') ADVANCE(77); + END_STATE(); + case 8: + if (lookahead == '>') ADVANCE(74); + END_STATE(); + case 9: + if (lookahead == 'a') ADVANCE(15); + END_STATE(); + case 10: + if (lookahead == 'a') ADVANCE(15); + if (lookahead == 'l') ADVANCE(45); + END_STATE(); + case 11: + if (lookahead == 'a') ADVANCE(51); + END_STATE(); + case 12: + if (lookahead == 'a') ADVANCE(51); + if (lookahead == 'o') ADVANCE(39); + END_STATE(); + case 13: + if (lookahead == 'a') ADVANCE(33); + END_STATE(); + case 14: + if (lookahead == 'b') ADVANCE(52); + END_STATE(); + case 15: + if (lookahead == 'c') ADVANCE(28); + END_STATE(); + case 16: + if (lookahead == 'c') ADVANCE(29); + END_STATE(); + case 17: + if (lookahead == 'd') ADVANCE(21); + END_STATE(); + case 18: + if (lookahead == 'e') ADVANCE(14); + if (lookahead == 'O' || + lookahead == 'o') ADVANCE(55); + END_STATE(); + case 19: + if (lookahead == 'e') ADVANCE(54); + END_STATE(); + case 20: + if (lookahead == 'e') ADVANCE(131); + END_STATE(); + case 21: + if (lookahead == 'e') ADVANCE(42); + END_STATE(); + case 22: + if (lookahead == 'e') ADVANCE(37); + END_STATE(); + case 23: + if (lookahead == 'e') ADVANCE(38); + END_STATE(); + case 24: + if (lookahead == 'e') ADVANCE(50); + END_STATE(); + case 25: + if (lookahead == 'f') ADVANCE(128); + END_STATE(); + case 26: + if (lookahead == 'f') ADVANCE(132); + END_STATE(); + case 27: + if (lookahead == 'g') ADVANCE(145); + END_STATE(); + case 28: + if (lookahead == 'h') ADVANCE(135); + END_STATE(); + case 29: + if (lookahead == 'h') ADVANCE(139); + END_STATE(); + case 30: + if (lookahead == 'h') ADVANCE(23); + END_STATE(); + case 31: + if (lookahead == 'i') ADVANCE(40); + END_STATE(); + case 32: + if (lookahead == 'i') ADVANCE(26); + if (lookahead == '}') ADVANCE(129); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(32) + END_STATE(); + case 33: + if (lookahead == 'i') ADVANCE(48); + END_STATE(); + case 34: + if (lookahead == 'l') ADVANCE(143); + END_STATE(); + case 35: + if (lookahead == 'm') ADVANCE(34); + END_STATE(); + case 36: + if (lookahead == 'n') ADVANCE(31); + END_STATE(); + case 37: + if (lookahead == 'n') ADVANCE(17); + END_STATE(); + case 38: + if (lookahead == 'n') ADVANCE(138); + END_STATE(); + case 39: + if (lookahead == 'n') ADVANCE(46); + END_STATE(); + case 40: + if (lookahead == 'p') ADVANCE(41); + END_STATE(); + case 41: + if (lookahead == 'p') ADVANCE(24); + END_STATE(); + case 42: + if (lookahead == 'r') ADVANCE(146); + END_STATE(); + case 43: + if (lookahead == 's') ADVANCE(136); + END_STATE(); + case 44: + if (lookahead == 's') ADVANCE(136); + if (lookahead == 'w') ADVANCE(13); + END_STATE(); + case 45: + if (lookahead == 's') ADVANCE(20); + END_STATE(); + case 46: + if (lookahead == 's') ADVANCE(49); + END_STATE(); + case 47: + if (lookahead == 't') ADVANCE(35); + END_STATE(); + case 48: + if (lookahead == 't') ADVANCE(137); + END_STATE(); + case 49: + if (lookahead == 't') ADVANCE(144); + END_STATE(); + case 50: + if (lookahead == 't') ADVANCE(141); + END_STATE(); + case 51: + if (lookahead == 't') ADVANCE(16); + END_STATE(); + case 52: + if (lookahead == 'u') ADVANCE(27); + END_STATE(); + case 53: + if (lookahead == 'w') ADVANCE(13); + END_STATE(); + case 54: + if (lookahead == 'y') ADVANCE(140); + END_STATE(); + case 55: + if (lookahead == 'C' || + lookahead == 'c') ADVANCE(59); + END_STATE(); + case 56: + if (lookahead == 'E' || + lookahead == 'e') ADVANCE(72); + END_STATE(); + case 57: + if (lookahead == 'O' || + lookahead == 'o') ADVANCE(55); + END_STATE(); + case 58: + if (lookahead == 'P' || + lookahead == 'p') ADVANCE(56); + END_STATE(); + case 59: + if (lookahead == 'T' || + lookahead == 't') ADVANCE(61); + END_STATE(); + case 60: + if (lookahead == 'X' || + lookahead == 'x') ADVANCE(64); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(84); + END_STATE(); + case 61: + if (lookahead == 'Y' || + lookahead == 'y') ADVANCE(58); + END_STATE(); + case 62: + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') ADVANCE(62); + if (lookahead != 0 && + lookahead != '&' && + lookahead != '<' && + lookahead != '>' && + lookahead != '{' && + lookahead != '}') ADVANCE(125); + END_STATE(); + case 63: + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') ADVANCE(69); + if (lookahead != 0 && + lookahead != '>') ADVANCE(70); + END_STATE(); + case 64: + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(89); + END_STATE(); + case 65: + if (eof) ADVANCE(67); + if (lookahead == '"') ADVANCE(122); + if (lookahead == '#') ADVANCE(127); + if (lookahead == '&') ADVANCE(5); + if (lookahead == '\'') ADVANCE(119); + if (lookahead == '/') ADVANCE(134); + if (lookahead == ':') ADVANCE(130); + if (lookahead == '<') ADVANCE(73); + if (lookahead == '=') ADVANCE(76); + if (lookahead == '>') ADVANCE(71); + if (lookahead == '@') ADVANCE(142); + if (lookahead == 'a') ADVANCE(43); + if (lookahead == 'c') ADVANCE(11); + if (lookahead == 'i') ADVANCE(26); + if (lookahead == '{') ADVANCE(126); + if (lookahead == '}') ADVANCE(129); + if (lookahead == 'D' || + lookahead == 'd') ADVANCE(57); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(65) + END_STATE(); + case 66: + if (eof) ADVANCE(67); + if (lookahead == '&') ADVANCE(5); + if (lookahead == '<') ADVANCE(73); + if (lookahead == '{') ADVANCE(126); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(66) + if (lookahead != 0 && + lookahead != '>' && + lookahead != '}') ADVANCE(125); + END_STATE(); + case 67: + ACCEPT_TOKEN(ts_builtin_sym_end); + END_STATE(); + case 68: + ACCEPT_TOKEN(anon_sym_LT_BANG); + END_STATE(); + case 69: + ACCEPT_TOKEN(aux_sym_doctype_token1); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') ADVANCE(69); + if (lookahead != 0 && + lookahead != '>') ADVANCE(70); + END_STATE(); + case 70: + ACCEPT_TOKEN(aux_sym_doctype_token1); + if (lookahead != 0 && + lookahead != '>') ADVANCE(70); + END_STATE(); + case 71: + ACCEPT_TOKEN(anon_sym_GT); + END_STATE(); + case 72: + ACCEPT_TOKEN(sym__doctype); + END_STATE(); + case 73: + ACCEPT_TOKEN(anon_sym_LT); + if (lookahead == '!') ADVANCE(68); + if (lookahead == '/') ADVANCE(75); + END_STATE(); + case 74: + ACCEPT_TOKEN(anon_sym_SLASH_GT); + END_STATE(); + case 75: + ACCEPT_TOKEN(anon_sym_LT_SLASH); + END_STATE(); + case 76: + ACCEPT_TOKEN(anon_sym_EQ); + END_STATE(); + case 77: + ACCEPT_TOKEN(sym_attribute_name); + if (!sym_attribute_name_character_set_1(lookahead)) ADVANCE(77); + END_STATE(); + case 78: + ACCEPT_TOKEN(sym_attribute_value); + if (lookahead != 0 && + (lookahead < '\t' || '\r' < lookahead) && + lookahead != ' ' && + lookahead != '"' && + lookahead != '\'' && + (lookahead < '<' || '>' < lookahead) && + lookahead != '{' && + lookahead != '}') ADVANCE(78); + END_STATE(); + case 79: + ACCEPT_TOKEN(sym_entity); + END_STATE(); + case 80: + ACCEPT_TOKEN(sym_entity); + if (lookahead == ';') ADVANCE(79); + END_STATE(); + case 81: + ACCEPT_TOKEN(sym_entity); + if (lookahead == ';') ADVANCE(79); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(80); + END_STATE(); + case 82: + ACCEPT_TOKEN(sym_entity); + if (lookahead == ';') ADVANCE(79); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(81); + END_STATE(); + case 83: + ACCEPT_TOKEN(sym_entity); + if (lookahead == ';') ADVANCE(79); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(82); + END_STATE(); + case 84: + ACCEPT_TOKEN(sym_entity); + if (lookahead == ';') ADVANCE(79); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(83); + END_STATE(); + case 85: + ACCEPT_TOKEN(sym_entity); + if (lookahead == ';') ADVANCE(79); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(80); + END_STATE(); + case 86: + ACCEPT_TOKEN(sym_entity); + if (lookahead == ';') ADVANCE(79); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(85); + END_STATE(); + case 87: + ACCEPT_TOKEN(sym_entity); + if (lookahead == ';') ADVANCE(79); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(86); + END_STATE(); + case 88: + ACCEPT_TOKEN(sym_entity); + if (lookahead == ';') ADVANCE(79); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(87); + END_STATE(); + case 89: + ACCEPT_TOKEN(sym_entity); + if (lookahead == ';') ADVANCE(79); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(88); + END_STATE(); + case 90: + ACCEPT_TOKEN(sym_entity); + if (lookahead == ';') ADVANCE(79); + if (('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(80); + END_STATE(); + case 91: + ACCEPT_TOKEN(sym_entity); + if (lookahead == ';') ADVANCE(79); + if (('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(90); + END_STATE(); + case 92: + ACCEPT_TOKEN(sym_entity); + if (lookahead == ';') ADVANCE(79); + if (('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(91); + END_STATE(); + case 93: + ACCEPT_TOKEN(sym_entity); + if (lookahead == ';') ADVANCE(79); + if (('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(92); + END_STATE(); + case 94: + ACCEPT_TOKEN(sym_entity); + if (lookahead == ';') ADVANCE(79); + if (('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(93); + END_STATE(); + case 95: + ACCEPT_TOKEN(sym_entity); + if (lookahead == ';') ADVANCE(79); + if (('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(94); + END_STATE(); + case 96: + ACCEPT_TOKEN(sym_entity); + if (lookahead == ';') ADVANCE(79); + if (('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(95); + END_STATE(); + case 97: + ACCEPT_TOKEN(sym_entity); + if (lookahead == ';') ADVANCE(79); + if (('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(96); + END_STATE(); + case 98: + ACCEPT_TOKEN(sym_entity); + if (lookahead == ';') ADVANCE(79); + if (('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(97); + END_STATE(); + case 99: + ACCEPT_TOKEN(sym_entity); + if (lookahead == ';') ADVANCE(79); + if (('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(98); + END_STATE(); + case 100: + ACCEPT_TOKEN(sym_entity); + if (lookahead == ';') ADVANCE(79); + if (('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(99); + END_STATE(); + case 101: + ACCEPT_TOKEN(sym_entity); + if (lookahead == ';') ADVANCE(79); + if (('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(100); + END_STATE(); + case 102: + ACCEPT_TOKEN(sym_entity); + if (lookahead == ';') ADVANCE(79); + if (('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(101); + END_STATE(); + case 103: + ACCEPT_TOKEN(sym_entity); + if (lookahead == ';') ADVANCE(79); + if (('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(102); + END_STATE(); + case 104: + ACCEPT_TOKEN(sym_entity); + if (lookahead == ';') ADVANCE(79); + if (('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(103); + END_STATE(); + case 105: + ACCEPT_TOKEN(sym_entity); + if (lookahead == ';') ADVANCE(79); + if (('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(104); + END_STATE(); + case 106: + ACCEPT_TOKEN(sym_entity); + if (lookahead == ';') ADVANCE(79); + if (('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(105); + END_STATE(); + case 107: + ACCEPT_TOKEN(sym_entity); + if (lookahead == ';') ADVANCE(79); + if (('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(106); + END_STATE(); + case 108: + ACCEPT_TOKEN(sym_entity); + if (lookahead == ';') ADVANCE(79); + if (('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(107); + END_STATE(); + case 109: + ACCEPT_TOKEN(sym_entity); + if (lookahead == ';') ADVANCE(79); + if (('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(108); + END_STATE(); + case 110: + ACCEPT_TOKEN(sym_entity); + if (lookahead == ';') ADVANCE(79); + if (('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(109); + END_STATE(); + case 111: + ACCEPT_TOKEN(sym_entity); + if (lookahead == ';') ADVANCE(79); + if (('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(110); + END_STATE(); + case 112: + ACCEPT_TOKEN(sym_entity); + if (lookahead == ';') ADVANCE(79); + if (('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(111); + END_STATE(); + case 113: + ACCEPT_TOKEN(sym_entity); + if (lookahead == ';') ADVANCE(79); + if (('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(112); + END_STATE(); + case 114: + ACCEPT_TOKEN(sym_entity); + if (lookahead == ';') ADVANCE(79); + if (('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(113); + END_STATE(); + case 115: + ACCEPT_TOKEN(sym_entity); + if (lookahead == ';') ADVANCE(79); + if (('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(114); + END_STATE(); + case 116: + ACCEPT_TOKEN(sym_entity); + if (lookahead == ';') ADVANCE(79); + if (('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(115); + END_STATE(); + case 117: + ACCEPT_TOKEN(sym_entity); + if (lookahead == ';') ADVANCE(79); + if (('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(116); + END_STATE(); + case 118: + ACCEPT_TOKEN(sym_entity); + if (lookahead == ';') ADVANCE(79); + if (('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(117); + END_STATE(); + case 119: + ACCEPT_TOKEN(anon_sym_SQUOTE); + END_STATE(); + case 120: + ACCEPT_TOKEN(aux_sym_quoted_attribute_value_token1); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') ADVANCE(120); + if (lookahead != 0 && + lookahead != '\'') ADVANCE(121); + END_STATE(); + case 121: + ACCEPT_TOKEN(aux_sym_quoted_attribute_value_token1); + if (lookahead != 0 && + lookahead != '\'') ADVANCE(121); + END_STATE(); + case 122: + ACCEPT_TOKEN(anon_sym_DQUOTE); + END_STATE(); + case 123: + ACCEPT_TOKEN(aux_sym_quoted_attribute_value_token2); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') ADVANCE(123); + if (lookahead != 0 && + lookahead != '"') ADVANCE(124); + END_STATE(); + case 124: + ACCEPT_TOKEN(aux_sym_quoted_attribute_value_token2); + if (lookahead != 0 && + lookahead != '"') ADVANCE(124); + END_STATE(); + case 125: + ACCEPT_TOKEN(sym_text); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') ADVANCE(62); + if (lookahead != 0 && + lookahead != '&' && + lookahead != '<' && + lookahead != '>' && + lookahead != '{' && + lookahead != '}') ADVANCE(125); + END_STATE(); + case 126: + ACCEPT_TOKEN(anon_sym_LBRACE); + END_STATE(); + case 127: + ACCEPT_TOKEN(anon_sym_POUND); + END_STATE(); + case 128: + ACCEPT_TOKEN(anon_sym_if); + END_STATE(); + case 129: + ACCEPT_TOKEN(anon_sym_RBRACE); + END_STATE(); + case 130: + ACCEPT_TOKEN(anon_sym_COLON); + END_STATE(); + case 131: + ACCEPT_TOKEN(anon_sym_else); + END_STATE(); + case 132: + ACCEPT_TOKEN(anon_sym_if2); + END_STATE(); + case 133: + ACCEPT_TOKEN(anon_sym_SLASH); + END_STATE(); + case 134: + ACCEPT_TOKEN(anon_sym_SLASH); + if (lookahead == '>') ADVANCE(74); + END_STATE(); + case 135: + ACCEPT_TOKEN(anon_sym_each); + END_STATE(); + case 136: + ACCEPT_TOKEN(anon_sym_as); + END_STATE(); + case 137: + ACCEPT_TOKEN(anon_sym_await); + END_STATE(); + case 138: + ACCEPT_TOKEN(anon_sym_then); + END_STATE(); + case 139: + ACCEPT_TOKEN(anon_sym_catch); + END_STATE(); + case 140: + ACCEPT_TOKEN(anon_sym_key); + END_STATE(); + case 141: + ACCEPT_TOKEN(anon_sym_snippet); + END_STATE(); + case 142: + ACCEPT_TOKEN(anon_sym_AT); + END_STATE(); + case 143: + ACCEPT_TOKEN(anon_sym_html); + END_STATE(); + case 144: + ACCEPT_TOKEN(anon_sym_const); + END_STATE(); + case 145: + ACCEPT_TOKEN(anon_sym_debug); + END_STATE(); + case 146: + ACCEPT_TOKEN(anon_sym_render); + END_STATE(); + default: + return false; + } +} + +static const TSLexMode ts_lex_modes[STATE_COUNT] = { + [0] = {.lex_state = 0, .external_lex_state = 1}, + [1] = {.lex_state = 66, .external_lex_state = 2}, + [2] = {.lex_state = 66, .external_lex_state = 2}, + [3] = {.lex_state = 66, .external_lex_state = 2}, + [4] = {.lex_state = 66, .external_lex_state = 2}, + [5] = {.lex_state = 66, .external_lex_state = 2}, + [6] = {.lex_state = 66, .external_lex_state = 2}, + [7] = {.lex_state = 66, .external_lex_state = 2}, + [8] = {.lex_state = 66, .external_lex_state = 2}, + [9] = {.lex_state = 66, .external_lex_state = 2}, + [10] = {.lex_state = 66, .external_lex_state = 2}, + [11] = {.lex_state = 66, .external_lex_state = 2}, + [12] = {.lex_state = 66, .external_lex_state = 3}, + [13] = {.lex_state = 66, .external_lex_state = 2}, + [14] = {.lex_state = 66, .external_lex_state = 2}, + [15] = {.lex_state = 66, .external_lex_state = 3}, + [16] = {.lex_state = 66, .external_lex_state = 2}, + [17] = {.lex_state = 66, .external_lex_state = 2}, + [18] = {.lex_state = 66, .external_lex_state = 2}, + [19] = {.lex_state = 66, .external_lex_state = 2}, + [20] = {.lex_state = 66, .external_lex_state = 2}, + [21] = {.lex_state = 66, .external_lex_state = 2}, + [22] = {.lex_state = 66, .external_lex_state = 3}, + [23] = {.lex_state = 66, .external_lex_state = 2}, + [24] = {.lex_state = 66, .external_lex_state = 2}, + [25] = {.lex_state = 66, .external_lex_state = 3}, + [26] = {.lex_state = 66, .external_lex_state = 2}, + [27] = {.lex_state = 66, .external_lex_state = 2}, + [28] = {.lex_state = 66, .external_lex_state = 2}, + [29] = {.lex_state = 66, .external_lex_state = 2}, + [30] = {.lex_state = 66, .external_lex_state = 2}, + [31] = {.lex_state = 66, .external_lex_state = 2}, + [32] = {.lex_state = 66, .external_lex_state = 2}, + [33] = {.lex_state = 66, .external_lex_state = 2}, + [34] = {.lex_state = 66, .external_lex_state = 2}, + [35] = {.lex_state = 66, .external_lex_state = 2}, + [36] = {.lex_state = 66, .external_lex_state = 2}, + [37] = {.lex_state = 66, .external_lex_state = 2}, + [38] = {.lex_state = 66, .external_lex_state = 2}, + [39] = {.lex_state = 66, .external_lex_state = 2}, + [40] = {.lex_state = 66, .external_lex_state = 2}, + [41] = {.lex_state = 66, .external_lex_state = 2}, + [42] = {.lex_state = 66, .external_lex_state = 2}, + [43] = {.lex_state = 66, .external_lex_state = 3}, + [44] = {.lex_state = 66, .external_lex_state = 2}, + [45] = {.lex_state = 66, .external_lex_state = 2}, + [46] = {.lex_state = 66, .external_lex_state = 2}, + [47] = {.lex_state = 66, .external_lex_state = 2}, + [48] = {.lex_state = 66, .external_lex_state = 2}, + [49] = {.lex_state = 66, .external_lex_state = 2}, + [50] = {.lex_state = 66, .external_lex_state = 2}, + [51] = {.lex_state = 66, .external_lex_state = 2}, + [52] = {.lex_state = 66, .external_lex_state = 2}, + [53] = {.lex_state = 66, .external_lex_state = 2}, + [54] = {.lex_state = 66, .external_lex_state = 2}, + [55] = {.lex_state = 66, .external_lex_state = 2}, + [56] = {.lex_state = 66, .external_lex_state = 2}, + [57] = {.lex_state = 66, .external_lex_state = 2}, + [58] = {.lex_state = 66, .external_lex_state = 2}, + [59] = {.lex_state = 66, .external_lex_state = 2}, + [60] = {.lex_state = 66, .external_lex_state = 2}, + [61] = {.lex_state = 66, .external_lex_state = 2}, + [62] = {.lex_state = 66, .external_lex_state = 2}, + [63] = {.lex_state = 66, .external_lex_state = 2}, + [64] = {.lex_state = 66, .external_lex_state = 2}, + [65] = {.lex_state = 66, .external_lex_state = 2}, + [66] = {.lex_state = 66, .external_lex_state = 2}, + [67] = {.lex_state = 66, .external_lex_state = 2}, + [68] = {.lex_state = 66, .external_lex_state = 3}, + [69] = {.lex_state = 66, .external_lex_state = 3}, + [70] = {.lex_state = 66, .external_lex_state = 3}, + [71] = {.lex_state = 66, .external_lex_state = 2}, + [72] = {.lex_state = 66, .external_lex_state = 2}, + [73] = {.lex_state = 66, .external_lex_state = 2}, + [74] = {.lex_state = 66, .external_lex_state = 3}, + [75] = {.lex_state = 66, .external_lex_state = 3}, + [76] = {.lex_state = 66, .external_lex_state = 2}, + [77] = {.lex_state = 66, .external_lex_state = 2}, + [78] = {.lex_state = 66, .external_lex_state = 3}, + [79] = {.lex_state = 66, .external_lex_state = 2}, + [80] = {.lex_state = 7, .external_lex_state = 4}, + [81] = {.lex_state = 66, .external_lex_state = 3}, + [82] = {.lex_state = 66, .external_lex_state = 3}, + [83] = {.lex_state = 66, .external_lex_state = 2}, + [84] = {.lex_state = 66, .external_lex_state = 2}, + [85] = {.lex_state = 66, .external_lex_state = 2}, + [86] = {.lex_state = 66, .external_lex_state = 2}, + [87] = {.lex_state = 7, .external_lex_state = 4}, + [88] = {.lex_state = 66, .external_lex_state = 2}, + [89] = {.lex_state = 66, .external_lex_state = 2}, + [90] = {.lex_state = 66, .external_lex_state = 2}, + [91] = {.lex_state = 66, .external_lex_state = 2}, + [92] = {.lex_state = 66, .external_lex_state = 2}, + [93] = {.lex_state = 66, .external_lex_state = 2}, + [94] = {.lex_state = 7, .external_lex_state = 4}, + [95] = {.lex_state = 66, .external_lex_state = 2}, + [96] = {.lex_state = 66, .external_lex_state = 3}, + [97] = {.lex_state = 66, .external_lex_state = 2}, + [98] = {.lex_state = 66, .external_lex_state = 2}, + [99] = {.lex_state = 66, .external_lex_state = 2}, + [100] = {.lex_state = 66, .external_lex_state = 2}, + [101] = {.lex_state = 66, .external_lex_state = 3}, + [102] = {.lex_state = 66, .external_lex_state = 2}, + [103] = {.lex_state = 66, .external_lex_state = 3}, + [104] = {.lex_state = 66, .external_lex_state = 3}, + [105] = {.lex_state = 66, .external_lex_state = 2}, + [106] = {.lex_state = 66, .external_lex_state = 2}, + [107] = {.lex_state = 66, .external_lex_state = 2}, + [108] = {.lex_state = 66, .external_lex_state = 2}, + [109] = {.lex_state = 66, .external_lex_state = 3}, + [110] = {.lex_state = 66, .external_lex_state = 3}, + [111] = {.lex_state = 66, .external_lex_state = 2}, + [112] = {.lex_state = 7, .external_lex_state = 4}, + [113] = {.lex_state = 66, .external_lex_state = 3}, + [114] = {.lex_state = 66, .external_lex_state = 3}, + [115] = {.lex_state = 66, .external_lex_state = 3}, + [116] = {.lex_state = 66, .external_lex_state = 3}, + [117] = {.lex_state = 66, .external_lex_state = 3}, + [118] = {.lex_state = 66, .external_lex_state = 3}, + [119] = {.lex_state = 66, .external_lex_state = 3}, + [120] = {.lex_state = 66, .external_lex_state = 3}, + [121] = {.lex_state = 66, .external_lex_state = 2}, + [122] = {.lex_state = 66, .external_lex_state = 3}, + [123] = {.lex_state = 66, .external_lex_state = 3}, + [124] = {.lex_state = 66, .external_lex_state = 3}, + [125] = {.lex_state = 66, .external_lex_state = 2}, + [126] = {.lex_state = 66, .external_lex_state = 2}, + [127] = {.lex_state = 66, .external_lex_state = 3}, + [128] = {.lex_state = 66, .external_lex_state = 2}, + [129] = {.lex_state = 66, .external_lex_state = 3}, + [130] = {.lex_state = 66, .external_lex_state = 3}, + [131] = {.lex_state = 66, .external_lex_state = 3}, + [132] = {.lex_state = 66, .external_lex_state = 3}, + [133] = {.lex_state = 66, .external_lex_state = 2}, + [134] = {.lex_state = 66, .external_lex_state = 3}, + [135] = {.lex_state = 66, .external_lex_state = 3}, + [136] = {.lex_state = 66, .external_lex_state = 3}, + [137] = {.lex_state = 66, .external_lex_state = 3}, + [138] = {.lex_state = 66, .external_lex_state = 3}, + [139] = {.lex_state = 66, .external_lex_state = 2}, + [140] = {.lex_state = 7, .external_lex_state = 4}, + [141] = {.lex_state = 66, .external_lex_state = 3}, + [142] = {.lex_state = 66, .external_lex_state = 3}, + [143] = {.lex_state = 66, .external_lex_state = 3}, + [144] = {.lex_state = 66, .external_lex_state = 3}, + [145] = {.lex_state = 66, .external_lex_state = 3}, + [146] = {.lex_state = 66, .external_lex_state = 3}, + [147] = {.lex_state = 66, .external_lex_state = 3}, + [148] = {.lex_state = 66, .external_lex_state = 2}, + [149] = {.lex_state = 66, .external_lex_state = 2}, + [150] = {.lex_state = 66, .external_lex_state = 3}, + [151] = {.lex_state = 66, .external_lex_state = 2}, + [152] = {.lex_state = 66, .external_lex_state = 2}, + [153] = {.lex_state = 66, .external_lex_state = 2}, + [154] = {.lex_state = 66, .external_lex_state = 2}, + [155] = {.lex_state = 66, .external_lex_state = 2}, + [156] = {.lex_state = 7, .external_lex_state = 2}, + [157] = {.lex_state = 66, .external_lex_state = 2}, + [158] = {.lex_state = 7, .external_lex_state = 2}, + [159] = {.lex_state = 66, .external_lex_state = 2}, + [160] = {.lex_state = 66, .external_lex_state = 2}, + [161] = {.lex_state = 66, .external_lex_state = 2}, + [162] = {.lex_state = 7, .external_lex_state = 2}, + [163] = {.lex_state = 66, .external_lex_state = 2}, + [164] = {.lex_state = 7, .external_lex_state = 2}, + [165] = {.lex_state = 1, .external_lex_state = 2}, + [166] = {.lex_state = 66, .external_lex_state = 2}, + [167] = {.lex_state = 66, .external_lex_state = 2}, + [168] = {.lex_state = 66, .external_lex_state = 2}, + [169] = {.lex_state = 66, .external_lex_state = 2}, + [170] = {.lex_state = 66, .external_lex_state = 2}, + [171] = {.lex_state = 1, .external_lex_state = 2}, + [172] = {.lex_state = 7, .external_lex_state = 2}, + [173] = {.lex_state = 3, .external_lex_state = 5}, + [174] = {.lex_state = 3, .external_lex_state = 5}, + [175] = {.lex_state = 0, .external_lex_state = 2}, + [176] = {.lex_state = 3, .external_lex_state = 2}, + [177] = {.lex_state = 0, .external_lex_state = 2}, + [178] = {.lex_state = 7, .external_lex_state = 4}, + [179] = {.lex_state = 3, .external_lex_state = 5}, + [180] = {.lex_state = 3, .external_lex_state = 5}, + [181] = {.lex_state = 3, .external_lex_state = 5}, + [182] = {.lex_state = 0, .external_lex_state = 2}, + [183] = {.lex_state = 3, .external_lex_state = 5}, + [184] = {.lex_state = 3, .external_lex_state = 5}, + [185] = {.lex_state = 3, .external_lex_state = 5}, + [186] = {.lex_state = 0, .external_lex_state = 2}, + [187] = {.lex_state = 0, .external_lex_state = 2}, + [188] = {.lex_state = 7, .external_lex_state = 2}, + [189] = {.lex_state = 7, .external_lex_state = 4}, + [190] = {.lex_state = 3, .external_lex_state = 6}, + [191] = {.lex_state = 3, .external_lex_state = 6}, + [192] = {.lex_state = 3, .external_lex_state = 6}, + [193] = {.lex_state = 0, .external_lex_state = 2}, + [194] = {.lex_state = 3, .external_lex_state = 6}, + [195] = {.lex_state = 3, .external_lex_state = 6}, + [196] = {.lex_state = 7, .external_lex_state = 4}, + [197] = {.lex_state = 3, .external_lex_state = 6}, + [198] = {.lex_state = 3, .external_lex_state = 6}, + [199] = {.lex_state = 7, .external_lex_state = 4}, + [200] = {.lex_state = 7, .external_lex_state = 4}, + [201] = {.lex_state = 3, .external_lex_state = 6}, + [202] = {.lex_state = 7, .external_lex_state = 4}, + [203] = {.lex_state = 0, .external_lex_state = 7}, + [204] = {.lex_state = 7, .external_lex_state = 2}, + [205] = {.lex_state = 0, .external_lex_state = 8}, + [206] = {.lex_state = 0, .external_lex_state = 8}, + [207] = {.lex_state = 0, .external_lex_state = 2}, + [208] = {.lex_state = 0, .external_lex_state = 9}, + [209] = {.lex_state = 7, .external_lex_state = 2}, + [210] = {.lex_state = 0, .external_lex_state = 8}, + [211] = {.lex_state = 7, .external_lex_state = 2}, + [212] = {.lex_state = 0, .external_lex_state = 10}, + [213] = {.lex_state = 0, .external_lex_state = 10}, + [214] = {.lex_state = 7, .external_lex_state = 2}, + [215] = {.lex_state = 0, .external_lex_state = 7}, + [216] = {.lex_state = 0, .external_lex_state = 8}, + [217] = {.lex_state = 7, .external_lex_state = 2}, + [218] = {.lex_state = 0, .external_lex_state = 2}, + [219] = {.lex_state = 0, .external_lex_state = 8}, + [220] = {.lex_state = 3, .external_lex_state = 11}, + [221] = {.lex_state = 0, .external_lex_state = 12}, + [222] = {.lex_state = 0, .external_lex_state = 8}, + [223] = {.lex_state = 2, .external_lex_state = 2}, + [224] = {.lex_state = 6, .external_lex_state = 2}, + [225] = {.lex_state = 0, .external_lex_state = 13}, + [226] = {.lex_state = 0, .external_lex_state = 13}, + [227] = {.lex_state = 2, .external_lex_state = 2}, + [228] = {.lex_state = 0, .external_lex_state = 2}, + [229] = {.lex_state = 6, .external_lex_state = 2}, + [230] = {.lex_state = 0, .external_lex_state = 2}, + [231] = {.lex_state = 0, .external_lex_state = 2}, + [232] = {.lex_state = 0, .external_lex_state = 8}, + [233] = {.lex_state = 32, .external_lex_state = 2}, + [234] = {.lex_state = 0, .external_lex_state = 2}, + [235] = {.lex_state = 0, .external_lex_state = 2}, + [236] = {.lex_state = 0, .external_lex_state = 2}, + [237] = {.lex_state = 0, .external_lex_state = 2}, + [238] = {.lex_state = 0, .external_lex_state = 2}, + [239] = {.lex_state = 3, .external_lex_state = 11}, + [240] = {.lex_state = 0, .external_lex_state = 8}, + [241] = {.lex_state = 0, .external_lex_state = 2}, + [242] = {.lex_state = 0, .external_lex_state = 12}, + [243] = {.lex_state = 0, .external_lex_state = 2}, + [244] = {.lex_state = 0, .external_lex_state = 2}, + [245] = {.lex_state = 0, .external_lex_state = 2}, + [246] = {.lex_state = 0, .external_lex_state = 2}, + [247] = {.lex_state = 0, .external_lex_state = 2}, + [248] = {.lex_state = 0, .external_lex_state = 2}, + [249] = {.lex_state = 0, .external_lex_state = 2}, + [250] = {.lex_state = 0, .external_lex_state = 2}, + [251] = {.lex_state = 0, .external_lex_state = 2}, + [252] = {.lex_state = 0, .external_lex_state = 2}, + [253] = {.lex_state = 0, .external_lex_state = 2}, + [254] = {.lex_state = 0, .external_lex_state = 2}, + [255] = {.lex_state = 0, .external_lex_state = 2}, + [256] = {.lex_state = 0, .external_lex_state = 2}, + [257] = {.lex_state = 0, .external_lex_state = 2}, + [258] = {.lex_state = 0, .external_lex_state = 2}, + [259] = {.lex_state = 0, .external_lex_state = 2}, + [260] = {.lex_state = 0, .external_lex_state = 2}, + [261] = {.lex_state = 0, .external_lex_state = 2}, + [262] = {.lex_state = 0, .external_lex_state = 2}, + [263] = {.lex_state = 0, .external_lex_state = 2}, + [264] = {.lex_state = 0, .external_lex_state = 14}, + [265] = {.lex_state = 3, .external_lex_state = 15}, + [266] = {.lex_state = 0, .external_lex_state = 2}, + [267] = {.lex_state = 0, .external_lex_state = 2}, + [268] = {.lex_state = 3, .external_lex_state = 2}, + [269] = {.lex_state = 0, .external_lex_state = 2}, + [270] = {.lex_state = 0, .external_lex_state = 2}, + [271] = {.lex_state = 0, .external_lex_state = 2}, + [272] = {.lex_state = 0, .external_lex_state = 2}, + [273] = {.lex_state = 0, .external_lex_state = 16}, + [274] = {.lex_state = 0, .external_lex_state = 13}, + [275] = {.lex_state = 0, .external_lex_state = 13}, + [276] = {.lex_state = 63, .external_lex_state = 2}, + [277] = {.lex_state = 0, .external_lex_state = 13}, + [278] = {.lex_state = 0, .external_lex_state = 13}, + [279] = {.lex_state = 0, .external_lex_state = 2}, + [280] = {.lex_state = 0, .external_lex_state = 2}, + [281] = {.lex_state = 0, .external_lex_state = 2}, + [282] = {.lex_state = 0, .external_lex_state = 2}, + [283] = {.lex_state = 0, .external_lex_state = 2}, + [284] = {.lex_state = 0, .external_lex_state = 2}, + [285] = {.lex_state = 0, .external_lex_state = 2}, + [286] = {.lex_state = 0, .external_lex_state = 2}, + [287] = {.lex_state = 0, .external_lex_state = 2}, + [288] = {.lex_state = 0, .external_lex_state = 2}, + [289] = {.lex_state = 0, .external_lex_state = 2}, + [290] = {.lex_state = 0, .external_lex_state = 13}, + [291] = {.lex_state = 0, .external_lex_state = 2}, + [292] = {.lex_state = 0, .external_lex_state = 2}, + [293] = {.lex_state = 0, .external_lex_state = 2}, + [294] = {.lex_state = 0, .external_lex_state = 2}, + [295] = {.lex_state = 0, .external_lex_state = 13}, + [296] = {.lex_state = 0, .external_lex_state = 17}, + [297] = {.lex_state = 0, .external_lex_state = 2}, + [298] = {.lex_state = 0, .external_lex_state = 2}, + [299] = {.lex_state = 0, .external_lex_state = 13}, + [300] = {.lex_state = 0, .external_lex_state = 2}, + [301] = {.lex_state = 0, .external_lex_state = 2}, + [302] = {.lex_state = 0, .external_lex_state = 2}, + [303] = {.lex_state = 0, .external_lex_state = 17}, + [304] = {.lex_state = 0, .external_lex_state = 2}, + [305] = {.lex_state = 63, .external_lex_state = 2}, + [306] = {.lex_state = 0, .external_lex_state = 13}, + [307] = {.lex_state = 0, .external_lex_state = 14}, + [308] = {.lex_state = 0, .external_lex_state = 13}, + [309] = {.lex_state = 0, .external_lex_state = 13}, + [310] = {.lex_state = 0, .external_lex_state = 13}, + [311] = {.lex_state = 0, .external_lex_state = 13}, + [312] = {.lex_state = 0, .external_lex_state = 13}, + [313] = {.lex_state = 3, .external_lex_state = 2}, + [314] = {.lex_state = 3, .external_lex_state = 15}, + [315] = {.lex_state = 0, .external_lex_state = 2}, + [316] = {.lex_state = 0, .external_lex_state = 2}, + [317] = {.lex_state = 0, .external_lex_state = 2}, + [318] = {.lex_state = 0, .external_lex_state = 2}, + [319] = {.lex_state = 0, .external_lex_state = 13}, + [320] = {.lex_state = 0, .external_lex_state = 2}, + [321] = {.lex_state = 0, .external_lex_state = 2}, + [322] = {.lex_state = 0, .external_lex_state = 2}, + [323] = {.lex_state = 0, .external_lex_state = 2}, + [324] = {.lex_state = 32, .external_lex_state = 2}, + [325] = {.lex_state = 0, .external_lex_state = 13}, + [326] = {.lex_state = 0, .external_lex_state = 2}, + [327] = {.lex_state = 0, .external_lex_state = 13}, + [328] = {.lex_state = 0, .external_lex_state = 2}, + [329] = {.lex_state = 0, .external_lex_state = 2}, +}; + +static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { + [0] = { + [ts_builtin_sym_end] = ACTIONS(1), + [anon_sym_LT_BANG] = ACTIONS(1), + [anon_sym_GT] = ACTIONS(1), + [sym__doctype] = ACTIONS(1), + [anon_sym_LT] = ACTIONS(1), + [anon_sym_SLASH_GT] = ACTIONS(1), + [anon_sym_LT_SLASH] = ACTIONS(1), + [anon_sym_EQ] = ACTIONS(1), + [sym_entity] = ACTIONS(1), + [anon_sym_SQUOTE] = ACTIONS(1), + [anon_sym_DQUOTE] = ACTIONS(1), + [anon_sym_LBRACE] = ACTIONS(1), + [anon_sym_POUND] = ACTIONS(1), + [anon_sym_if] = ACTIONS(1), + [anon_sym_RBRACE] = ACTIONS(1), + [anon_sym_COLON] = ACTIONS(1), + [anon_sym_else] = ACTIONS(1), + [anon_sym_if2] = ACTIONS(1), + [anon_sym_SLASH] = ACTIONS(1), + [anon_sym_each] = ACTIONS(1), + [anon_sym_as] = ACTIONS(1), + [anon_sym_await] = ACTIONS(1), + [anon_sym_then] = ACTIONS(1), + [anon_sym_catch] = ACTIONS(1), + [anon_sym_key] = ACTIONS(1), + [anon_sym_snippet] = ACTIONS(1), + [anon_sym_AT] = ACTIONS(1), + [anon_sym_html] = ACTIONS(1), + [anon_sym_const] = ACTIONS(1), + [anon_sym_debug] = ACTIONS(1), + [anon_sym_render] = ACTIONS(1), + [sym__start_tag_name] = ACTIONS(1), + [sym__script_start_tag_name] = ACTIONS(1), + [sym__style_start_tag_name] = ACTIONS(1), + [sym__end_tag_name] = ACTIONS(1), + [sym_erroneous_end_tag_name] = ACTIONS(1), + [sym__implicit_end_tag] = ACTIONS(1), + [sym_raw_text] = ACTIONS(1), + [sym_comment] = ACTIONS(3), + [sym_raw_text_svelte] = ACTIONS(1), + [sym_raw_text_svelte_each] = ACTIONS(1), + }, + [1] = { + [sym_document] = STATE(289), + [sym_doctype] = STATE(77), + [sym__node] = STATE(36), + [sym_element] = STATE(77), + [sym_script_element] = STATE(77), + [sym_style_element] = STATE(77), + [sym_start_tag] = STATE(12), + [sym_script_start_tag] = STATE(205), + [sym_style_start_tag] = STATE(206), + [sym_self_closing_tag] = STATE(79), + [sym_erroneous_end_tag] = STATE(77), + [sym_if_statement] = STATE(77), + [sym_if_start] = STATE(2), + [sym_each_statement] = STATE(77), + [sym_each_start] = STATE(16), + [sym_await_statement] = STATE(77), + [sym_await_start] = STATE(7), + [sym_key_statement] = STATE(77), + [sym_key_start] = STATE(38), + [sym_snippet_statement] = STATE(77), + [sym_snippet_start] = STATE(37), + [sym_expression] = STATE(77), + [sym_html_tag] = STATE(77), + [sym_const_tag] = STATE(77), + [sym_debug_tag] = STATE(77), + [sym_render_tag] = STATE(77), + [aux_sym_document_repeat1] = STATE(36), + [ts_builtin_sym_end] = ACTIONS(5), + [anon_sym_LT_BANG] = ACTIONS(7), + [anon_sym_LT] = ACTIONS(9), + [anon_sym_LT_SLASH] = ACTIONS(11), + [sym_entity] = ACTIONS(13), + [sym_text] = ACTIONS(13), + [anon_sym_LBRACE] = ACTIONS(15), + [sym_comment] = ACTIONS(3), + }, +}; + +static const uint16_t ts_small_parse_table[] = { + [0] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(17), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(79), 1, + sym_self_closing_tag, + STATE(97), 1, + sym_if_end, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + STATE(238), 1, + sym_else_block, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(5), 2, + sym__node, + aux_sym_document_repeat1, + STATE(186), 2, + sym_else_if_block, + aux_sym_if_statement_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [78] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(19), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(79), 1, + sym_self_closing_tag, + STATE(142), 1, + sym_if_end, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + STATE(230), 1, + sym_else_block, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(54), 2, + sym__node, + aux_sym_document_repeat1, + STATE(175), 2, + sym_else_if_block, + aux_sym_if_statement_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [156] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(19), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(69), 1, + sym_if_end, + STATE(79), 1, + sym_self_closing_tag, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + STATE(218), 1, + sym_else_block, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(3), 2, + sym__node, + aux_sym_document_repeat1, + STATE(177), 2, + sym_else_if_block, + aux_sym_if_statement_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [234] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(17), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(79), 1, + sym_self_closing_tag, + STATE(90), 1, + sym_if_end, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + STATE(236), 1, + sym_else_block, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(54), 2, + sym__node, + aux_sym_document_repeat1, + STATE(182), 2, + sym_else_if_block, + aux_sym_if_statement_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [312] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(21), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(23), 1, + sym_then_block, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(51), 1, + sym_catch_block, + STATE(79), 1, + sym_self_closing_tag, + STATE(102), 1, + sym_await_end, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(54), 2, + sym__node, + aux_sym_document_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [389] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(21), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(11), 1, + sym_then_block, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(45), 1, + sym_catch_block, + STATE(79), 1, + sym_self_closing_tag, + STATE(151), 1, + sym_await_end, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(6), 2, + sym__node, + aux_sym_document_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [466] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(23), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(10), 1, + sym_then_block, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(31), 1, + sym_catch_block, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(79), 1, + sym_self_closing_tag, + STATE(101), 1, + sym_await_end, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(9), 2, + sym__node, + aux_sym_document_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [543] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(23), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(14), 1, + sym_then_block, + STATE(16), 1, + sym_each_start, + STATE(35), 1, + sym_catch_block, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(79), 1, + sym_self_closing_tag, + STATE(138), 1, + sym_await_end, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(54), 2, + sym__node, + aux_sym_document_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [620] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(25), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(35), 1, + sym_catch_block, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(79), 1, + sym_self_closing_tag, + STATE(138), 1, + sym_await_end, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(20), 2, + sym__node, + aux_sym_document_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [694] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(27), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(51), 1, + sym_catch_block, + STATE(79), 1, + sym_self_closing_tag, + STATE(102), 1, + sym_await_end, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(17), 2, + sym__node, + aux_sym_document_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [768] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(29), 1, + anon_sym_LT_BANG, + ACTIONS(31), 1, + anon_sym_LT, + ACTIONS(33), 1, + anon_sym_LT_SLASH, + ACTIONS(37), 1, + anon_sym_LBRACE, + ACTIONS(39), 1, + sym__implicit_end_tag, + STATE(4), 1, + sym_if_start, + STATE(8), 1, + sym_await_start, + STATE(15), 1, + sym_start_tag, + STATE(19), 1, + sym_each_start, + STATE(26), 1, + sym_snippet_start, + STATE(33), 1, + sym_key_start, + STATE(78), 1, + sym_self_closing_tag, + STATE(89), 1, + sym_end_tag, + STATE(210), 1, + sym_style_start_tag, + STATE(216), 1, + sym_script_start_tag, + ACTIONS(35), 2, + sym_entity, + sym_text, + STATE(22), 2, + sym__node, + aux_sym_document_repeat1, + STATE(81), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [842] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(41), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(46), 1, + sym_else_block, + STATE(79), 1, + sym_self_closing_tag, + STATE(98), 1, + sym_each_end, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(54), 2, + sym__node, + aux_sym_document_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [916] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(25), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(56), 1, + sym_catch_block, + STATE(79), 1, + sym_self_closing_tag, + STATE(127), 1, + sym_await_end, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(18), 2, + sym__node, + aux_sym_document_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [990] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(29), 1, + anon_sym_LT_BANG, + ACTIONS(31), 1, + anon_sym_LT, + ACTIONS(37), 1, + anon_sym_LBRACE, + ACTIONS(43), 1, + anon_sym_LT_SLASH, + ACTIONS(45), 1, + sym__implicit_end_tag, + STATE(4), 1, + sym_if_start, + STATE(8), 1, + sym_await_start, + STATE(15), 1, + sym_start_tag, + STATE(19), 1, + sym_each_start, + STATE(26), 1, + sym_snippet_start, + STATE(33), 1, + sym_key_start, + STATE(75), 1, + sym_end_tag, + STATE(78), 1, + sym_self_closing_tag, + STATE(210), 1, + sym_style_start_tag, + STATE(216), 1, + sym_script_start_tag, + ACTIONS(35), 2, + sym_entity, + sym_text, + STATE(25), 2, + sym__node, + aux_sym_document_repeat1, + STATE(81), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [1064] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(41), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(40), 1, + sym_else_block, + STATE(79), 1, + sym_self_closing_tag, + STATE(106), 1, + sym_each_end, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(13), 2, + sym__node, + aux_sym_document_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [1138] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(27), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(59), 1, + sym_catch_block, + STATE(79), 1, + sym_self_closing_tag, + STATE(139), 1, + sym_await_end, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(54), 2, + sym__node, + aux_sym_document_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [1212] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(25), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(39), 1, + sym_catch_block, + STATE(79), 1, + sym_self_closing_tag, + STATE(115), 1, + sym_await_end, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(54), 2, + sym__node, + aux_sym_document_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [1286] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(47), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(32), 1, + sym_else_block, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(79), 1, + sym_self_closing_tag, + STATE(82), 1, + sym_each_end, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(21), 2, + sym__node, + aux_sym_document_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [1360] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(25), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(56), 1, + sym_catch_block, + STATE(79), 1, + sym_self_closing_tag, + STATE(127), 1, + sym_await_end, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(54), 2, + sym__node, + aux_sym_document_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [1434] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(47), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(47), 1, + sym_else_block, + STATE(79), 1, + sym_self_closing_tag, + STATE(141), 1, + sym_each_end, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(54), 2, + sym__node, + aux_sym_document_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [1508] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(29), 1, + anon_sym_LT_BANG, + ACTIONS(31), 1, + anon_sym_LT, + ACTIONS(33), 1, + anon_sym_LT_SLASH, + ACTIONS(37), 1, + anon_sym_LBRACE, + ACTIONS(49), 1, + sym__implicit_end_tag, + STATE(4), 1, + sym_if_start, + STATE(8), 1, + sym_await_start, + STATE(15), 1, + sym_start_tag, + STATE(19), 1, + sym_each_start, + STATE(26), 1, + sym_snippet_start, + STATE(33), 1, + sym_key_start, + STATE(78), 1, + sym_self_closing_tag, + STATE(84), 1, + sym_end_tag, + STATE(210), 1, + sym_style_start_tag, + STATE(216), 1, + sym_script_start_tag, + ACTIONS(35), 2, + sym_entity, + sym_text, + STATE(43), 2, + sym__node, + aux_sym_document_repeat1, + STATE(81), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [1582] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(27), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(59), 1, + sym_catch_block, + STATE(79), 1, + sym_self_closing_tag, + STATE(139), 1, + sym_await_end, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(24), 2, + sym__node, + aux_sym_document_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [1656] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(27), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(52), 1, + sym_catch_block, + STATE(79), 1, + sym_self_closing_tag, + STATE(99), 1, + sym_await_end, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(54), 2, + sym__node, + aux_sym_document_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [1730] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(29), 1, + anon_sym_LT_BANG, + ACTIONS(31), 1, + anon_sym_LT, + ACTIONS(37), 1, + anon_sym_LBRACE, + ACTIONS(43), 1, + anon_sym_LT_SLASH, + ACTIONS(51), 1, + sym__implicit_end_tag, + STATE(4), 1, + sym_if_start, + STATE(8), 1, + sym_await_start, + STATE(15), 1, + sym_start_tag, + STATE(19), 1, + sym_each_start, + STATE(26), 1, + sym_snippet_start, + STATE(33), 1, + sym_key_start, + STATE(78), 1, + sym_self_closing_tag, + STATE(145), 1, + sym_end_tag, + STATE(210), 1, + sym_style_start_tag, + STATE(216), 1, + sym_script_start_tag, + ACTIONS(35), 2, + sym_entity, + sym_text, + STATE(43), 2, + sym__node, + aux_sym_document_repeat1, + STATE(81), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [1804] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(53), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(79), 1, + sym_self_closing_tag, + STATE(132), 1, + sym_snippet_end, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(29), 2, + sym__node, + aux_sym_document_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [1875] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(55), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(79), 1, + sym_self_closing_tag, + STATE(115), 1, + sym_await_end, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(54), 2, + sym__node, + aux_sym_document_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [1946] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(57), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(79), 1, + sym_self_closing_tag, + STATE(129), 1, + sym_each_end, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(54), 2, + sym__node, + aux_sym_document_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [2017] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(53), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(79), 1, + sym_self_closing_tag, + STATE(136), 1, + sym_snippet_end, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(54), 2, + sym__node, + aux_sym_document_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [2088] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(59), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(79), 1, + sym_self_closing_tag, + STATE(137), 1, + sym_key_end, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(54), 2, + sym__node, + aux_sym_document_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [2159] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(55), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(79), 1, + sym_self_closing_tag, + STATE(138), 1, + sym_await_end, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(42), 2, + sym__node, + aux_sym_document_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [2230] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(57), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(79), 1, + sym_self_closing_tag, + STATE(141), 1, + sym_each_end, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(28), 2, + sym__node, + aux_sym_document_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [2301] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(59), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(79), 1, + sym_self_closing_tag, + STATE(109), 1, + sym_key_end, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(30), 2, + sym__node, + aux_sym_document_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [2372] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(55), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(79), 1, + sym_self_closing_tag, + STATE(103), 1, + sym_await_end, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(54), 2, + sym__node, + aux_sym_document_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [2443] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(55), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(79), 1, + sym_self_closing_tag, + STATE(127), 1, + sym_await_end, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(27), 2, + sym__node, + aux_sym_document_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [2514] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(15), 1, + anon_sym_LBRACE, + ACTIONS(61), 1, + ts_builtin_sym_end, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(79), 1, + sym_self_closing_tag, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(54), 2, + sym__node, + aux_sym_document_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [2585] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(63), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(76), 1, + sym_snippet_end, + STATE(79), 1, + sym_self_closing_tag, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(53), 2, + sym__node, + aux_sym_document_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [2656] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(65), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(79), 1, + sym_self_closing_tag, + STATE(92), 1, + sym_key_end, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(50), 2, + sym__node, + aux_sym_document_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [2727] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(55), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(79), 1, + sym_self_closing_tag, + STATE(104), 1, + sym_await_end, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(34), 2, + sym__node, + aux_sym_document_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [2798] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(67), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(79), 1, + sym_self_closing_tag, + STATE(98), 1, + sym_each_end, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(48), 2, + sym__node, + aux_sym_document_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [2869] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(69), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(79), 1, + sym_self_closing_tag, + STATE(139), 1, + sym_await_end, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(54), 2, + sym__node, + aux_sym_document_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [2940] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(55), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(79), 1, + sym_self_closing_tag, + STATE(127), 1, + sym_await_end, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(54), 2, + sym__node, + aux_sym_document_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [3011] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(71), 1, + anon_sym_LT_BANG, + ACTIONS(74), 1, + anon_sym_LT, + ACTIONS(77), 1, + anon_sym_LT_SLASH, + ACTIONS(83), 1, + anon_sym_LBRACE, + ACTIONS(86), 1, + sym__implicit_end_tag, + STATE(4), 1, + sym_if_start, + STATE(8), 1, + sym_await_start, + STATE(15), 1, + sym_start_tag, + STATE(19), 1, + sym_each_start, + STATE(26), 1, + sym_snippet_start, + STATE(33), 1, + sym_key_start, + STATE(78), 1, + sym_self_closing_tag, + STATE(210), 1, + sym_style_start_tag, + STATE(216), 1, + sym_script_start_tag, + ACTIONS(80), 2, + sym_entity, + sym_text, + STATE(43), 2, + sym__node, + aux_sym_document_repeat1, + STATE(81), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [3082] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(57), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(79), 1, + sym_self_closing_tag, + STATE(117), 1, + sym_each_end, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(54), 2, + sym__node, + aux_sym_document_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [3153] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(69), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(79), 1, + sym_self_closing_tag, + STATE(102), 1, + sym_await_end, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(41), 2, + sym__node, + aux_sym_document_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [3224] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(67), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(79), 1, + sym_self_closing_tag, + STATE(133), 1, + sym_each_end, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(57), 2, + sym__node, + aux_sym_document_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [3295] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(57), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(79), 1, + sym_self_closing_tag, + STATE(129), 1, + sym_each_end, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(44), 2, + sym__node, + aux_sym_document_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [3366] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(67), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(79), 1, + sym_self_closing_tag, + STATE(133), 1, + sym_each_end, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(54), 2, + sym__node, + aux_sym_document_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [3437] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(69), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(79), 1, + sym_self_closing_tag, + STATE(83), 1, + sym_await_end, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(54), 2, + sym__node, + aux_sym_document_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [3508] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(65), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(79), 1, + sym_self_closing_tag, + STATE(105), 1, + sym_key_end, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(54), 2, + sym__node, + aux_sym_document_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [3579] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(69), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(79), 1, + sym_self_closing_tag, + STATE(139), 1, + sym_await_end, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(60), 2, + sym__node, + aux_sym_document_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [3650] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(69), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(71), 1, + sym_await_end, + STATE(79), 1, + sym_self_closing_tag, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(49), 2, + sym__node, + aux_sym_document_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [3721] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(63), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(79), 1, + sym_self_closing_tag, + STATE(107), 1, + sym_snippet_end, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(54), 2, + sym__node, + aux_sym_document_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [3792] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(86), 1, + ts_builtin_sym_end, + ACTIONS(88), 1, + anon_sym_LT_BANG, + ACTIONS(91), 1, + anon_sym_LT, + ACTIONS(94), 1, + anon_sym_LT_SLASH, + ACTIONS(100), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(79), 1, + sym_self_closing_tag, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + ACTIONS(97), 2, + sym_entity, + sym_text, + STATE(54), 2, + sym__node, + aux_sym_document_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [3863] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(69), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(71), 1, + sym_await_end, + STATE(79), 1, + sym_self_closing_tag, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(54), 2, + sym__node, + aux_sym_document_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [3934] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(55), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(79), 1, + sym_self_closing_tag, + STATE(115), 1, + sym_await_end, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(58), 2, + sym__node, + aux_sym_document_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [4005] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(67), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(67), 1, + sym_each_end, + STATE(79), 1, + sym_self_closing_tag, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(54), 2, + sym__node, + aux_sym_document_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [4076] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(55), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(79), 1, + sym_self_closing_tag, + STATE(104), 1, + sym_await_end, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(54), 2, + sym__node, + aux_sym_document_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [4147] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(69), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(79), 1, + sym_self_closing_tag, + STATE(99), 1, + sym_await_end, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(55), 2, + sym__node, + aux_sym_document_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [4218] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(69), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(79), 1, + sym_self_closing_tag, + STATE(99), 1, + sym_await_end, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(54), 2, + sym__node, + aux_sym_document_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [4289] = 17, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(103), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(79), 1, + sym_self_closing_tag, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(62), 2, + sym__node, + aux_sym_document_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [4357] = 17, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(106), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(79), 1, + sym_self_closing_tag, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(54), 2, + sym__node, + aux_sym_document_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [4425] = 17, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(109), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(79), 1, + sym_self_closing_tag, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(64), 2, + sym__node, + aux_sym_document_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [4493] = 17, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_LT_BANG, + ACTIONS(9), 1, + anon_sym_LT, + ACTIONS(11), 1, + anon_sym_LT_SLASH, + ACTIONS(112), 1, + anon_sym_LBRACE, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(79), 1, + sym_self_closing_tag, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + ACTIONS(13), 2, + sym_entity, + sym_text, + STATE(54), 2, + sym__node, + aux_sym_document_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [4561] = 17, + ACTIONS(3), 1, + sym_comment, + ACTIONS(103), 1, + anon_sym_LBRACE, + ACTIONS(115), 1, + anon_sym_LT_BANG, + ACTIONS(118), 1, + anon_sym_LT, + ACTIONS(121), 1, + anon_sym_LT_SLASH, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(79), 1, + sym_self_closing_tag, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + ACTIONS(124), 2, + sym_entity, + sym_text, + STATE(66), 2, + sym__node, + aux_sym_document_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [4629] = 17, + ACTIONS(3), 1, + sym_comment, + ACTIONS(106), 1, + anon_sym_LBRACE, + ACTIONS(127), 1, + anon_sym_LT_BANG, + ACTIONS(130), 1, + anon_sym_LT, + ACTIONS(133), 1, + anon_sym_LT_SLASH, + STATE(2), 1, + sym_if_start, + STATE(7), 1, + sym_await_start, + STATE(12), 1, + sym_start_tag, + STATE(16), 1, + sym_each_start, + STATE(37), 1, + sym_snippet_start, + STATE(38), 1, + sym_key_start, + STATE(79), 1, + sym_self_closing_tag, + STATE(205), 1, + sym_script_start_tag, + STATE(206), 1, + sym_style_start_tag, + ACTIONS(136), 2, + sym_entity, + sym_text, + STATE(54), 2, + sym__node, + aux_sym_document_repeat1, + STATE(77), 15, + sym_doctype, + sym_element, + sym_script_element, + sym_style_element, + sym_erroneous_end_tag, + sym_if_statement, + sym_each_statement, + sym_await_statement, + sym_key_statement, + sym_snippet_statement, + sym_expression, + sym_html_tag, + sym_const_tag, + sym_debug_tag, + sym_render_tag, + [4697] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(141), 1, + anon_sym_LT, + ACTIONS(139), 6, + ts_builtin_sym_end, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [4712] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(145), 1, + anon_sym_LT, + ACTIONS(143), 6, + sym__implicit_end_tag, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [4727] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(149), 1, + anon_sym_LT, + ACTIONS(147), 6, + sym__implicit_end_tag, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [4742] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(153), 1, + anon_sym_LT, + ACTIONS(151), 6, + sym__implicit_end_tag, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [4757] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(157), 1, + anon_sym_LT, + ACTIONS(155), 6, + ts_builtin_sym_end, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [4772] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(161), 1, + anon_sym_LT, + ACTIONS(159), 6, + ts_builtin_sym_end, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [4787] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(165), 1, + anon_sym_LT, + ACTIONS(163), 6, + ts_builtin_sym_end, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [4802] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(169), 1, + anon_sym_LT, + ACTIONS(167), 6, + sym__implicit_end_tag, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [4817] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(173), 1, + anon_sym_LT, + ACTIONS(171), 6, + sym__implicit_end_tag, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [4832] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(177), 1, + anon_sym_LT, + ACTIONS(175), 6, + ts_builtin_sym_end, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [4847] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(181), 1, + anon_sym_LT, + ACTIONS(179), 6, + ts_builtin_sym_end, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [4862] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(185), 1, + anon_sym_LT, + ACTIONS(183), 6, + sym__implicit_end_tag, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [4877] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(185), 1, + anon_sym_LT, + ACTIONS(183), 6, + ts_builtin_sym_end, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [4892] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(187), 1, + anon_sym_GT, + ACTIONS(189), 1, + anon_sym_SLASH_GT, + ACTIONS(191), 1, + sym_attribute_name, + ACTIONS(193), 1, + anon_sym_LBRACE, + STATE(200), 1, + sym_expression, + STATE(140), 2, + sym_attribute, + aux_sym_start_tag_repeat1, + [4915] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(181), 1, + anon_sym_LT, + ACTIONS(179), 6, + sym__implicit_end_tag, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [4930] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(197), 1, + anon_sym_LT, + ACTIONS(195), 6, + sym__implicit_end_tag, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [4945] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(201), 1, + anon_sym_LT, + ACTIONS(199), 6, + ts_builtin_sym_end, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [4960] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(205), 1, + anon_sym_LT, + ACTIONS(203), 6, + ts_builtin_sym_end, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [4975] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(209), 1, + anon_sym_LT, + ACTIONS(207), 6, + ts_builtin_sym_end, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [4990] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(213), 1, + anon_sym_LT, + ACTIONS(211), 6, + ts_builtin_sym_end, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5005] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(191), 1, + sym_attribute_name, + ACTIONS(193), 1, + anon_sym_LBRACE, + ACTIONS(215), 1, + anon_sym_GT, + ACTIONS(217), 1, + anon_sym_SLASH_GT, + STATE(200), 1, + sym_expression, + STATE(112), 2, + sym_attribute, + aux_sym_start_tag_repeat1, + [5028] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(221), 1, + anon_sym_LT, + ACTIONS(219), 6, + ts_builtin_sym_end, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5043] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(173), 1, + anon_sym_LT, + ACTIONS(171), 6, + ts_builtin_sym_end, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5058] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(225), 1, + anon_sym_LT, + ACTIONS(223), 6, + ts_builtin_sym_end, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5073] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(229), 1, + anon_sym_LT, + ACTIONS(227), 6, + ts_builtin_sym_end, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5088] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(233), 1, + anon_sym_LT, + ACTIONS(231), 6, + ts_builtin_sym_end, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5103] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(169), 1, + anon_sym_LT, + ACTIONS(167), 6, + ts_builtin_sym_end, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5118] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(187), 1, + anon_sym_GT, + ACTIONS(191), 1, + sym_attribute_name, + ACTIONS(193), 1, + anon_sym_LBRACE, + ACTIONS(235), 1, + anon_sym_SLASH_GT, + STATE(200), 1, + sym_expression, + STATE(87), 2, + sym_attribute, + aux_sym_start_tag_repeat1, + [5141] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(153), 1, + anon_sym_LT, + ACTIONS(151), 6, + ts_builtin_sym_end, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5156] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(239), 1, + anon_sym_LT, + ACTIONS(237), 6, + sym__implicit_end_tag, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5171] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(149), 1, + anon_sym_LT, + ACTIONS(147), 6, + ts_builtin_sym_end, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5186] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(243), 1, + anon_sym_LT, + ACTIONS(241), 6, + ts_builtin_sym_end, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5201] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(247), 1, + anon_sym_LT, + ACTIONS(245), 6, + ts_builtin_sym_end, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5216] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(251), 1, + anon_sym_LT, + ACTIONS(249), 6, + ts_builtin_sym_end, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5231] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(255), 1, + anon_sym_LT, + ACTIONS(253), 6, + sym__implicit_end_tag, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5246] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(259), 1, + anon_sym_LT, + ACTIONS(257), 6, + ts_builtin_sym_end, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5261] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(201), 1, + anon_sym_LT, + ACTIONS(199), 6, + sym__implicit_end_tag, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5276] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(157), 1, + anon_sym_LT, + ACTIONS(155), 6, + sym__implicit_end_tag, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5291] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(263), 1, + anon_sym_LT, + ACTIONS(261), 6, + ts_builtin_sym_end, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5306] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(197), 1, + anon_sym_LT, + ACTIONS(195), 6, + ts_builtin_sym_end, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5321] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(267), 1, + anon_sym_LT, + ACTIONS(265), 6, + ts_builtin_sym_end, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5336] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(271), 1, + anon_sym_LT, + ACTIONS(269), 6, + ts_builtin_sym_end, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5351] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(233), 1, + anon_sym_LT, + ACTIONS(231), 6, + sym__implicit_end_tag, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5366] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(275), 1, + anon_sym_LT, + ACTIONS(273), 6, + sym__implicit_end_tag, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5381] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(279), 1, + anon_sym_LT, + ACTIONS(277), 6, + ts_builtin_sym_end, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5396] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, + sym_attribute_name, + ACTIONS(286), 1, + anon_sym_LBRACE, + STATE(200), 1, + sym_expression, + ACTIONS(281), 2, + anon_sym_GT, + anon_sym_SLASH_GT, + STATE(112), 2, + sym_attribute, + aux_sym_start_tag_repeat1, + [5417] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(221), 1, + anon_sym_LT, + ACTIONS(219), 6, + sym__implicit_end_tag, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5432] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(229), 1, + anon_sym_LT, + ACTIONS(227), 6, + sym__implicit_end_tag, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5447] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(247), 1, + anon_sym_LT, + ACTIONS(245), 6, + sym__implicit_end_tag, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5462] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(251), 1, + anon_sym_LT, + ACTIONS(249), 6, + sym__implicit_end_tag, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5477] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(141), 1, + anon_sym_LT, + ACTIONS(139), 6, + sym__implicit_end_tag, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5492] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(291), 1, + anon_sym_LT, + ACTIONS(289), 6, + sym__implicit_end_tag, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5507] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LT, + ACTIONS(293), 6, + sym__implicit_end_tag, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5522] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(299), 1, + anon_sym_LT, + ACTIONS(297), 6, + sym__implicit_end_tag, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5537] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(303), 1, + anon_sym_LT, + ACTIONS(301), 6, + ts_builtin_sym_end, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5552] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(307), 1, + anon_sym_LT, + ACTIONS(305), 6, + sym__implicit_end_tag, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5567] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(311), 1, + anon_sym_LT, + ACTIONS(309), 6, + sym__implicit_end_tag, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5582] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(315), 1, + anon_sym_LT, + ACTIONS(313), 6, + sym__implicit_end_tag, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5597] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(319), 1, + anon_sym_LT, + ACTIONS(317), 6, + ts_builtin_sym_end, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5612] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(291), 1, + anon_sym_LT, + ACTIONS(289), 6, + ts_builtin_sym_end, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5627] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(323), 1, + anon_sym_LT, + ACTIONS(321), 6, + sym__implicit_end_tag, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5642] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(327), 1, + anon_sym_LT, + ACTIONS(325), 6, + ts_builtin_sym_end, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5657] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(331), 1, + anon_sym_LT, + ACTIONS(329), 6, + sym__implicit_end_tag, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5672] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(327), 1, + anon_sym_LT, + ACTIONS(325), 6, + sym__implicit_end_tag, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5687] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(319), 1, + anon_sym_LT, + ACTIONS(317), 6, + sym__implicit_end_tag, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5702] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(177), 1, + anon_sym_LT, + ACTIONS(175), 6, + sym__implicit_end_tag, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5717] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(331), 1, + anon_sym_LT, + ACTIONS(329), 6, + ts_builtin_sym_end, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5732] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(279), 1, + anon_sym_LT, + ACTIONS(277), 6, + sym__implicit_end_tag, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5747] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(271), 1, + anon_sym_LT, + ACTIONS(269), 6, + sym__implicit_end_tag, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5762] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(267), 1, + anon_sym_LT, + ACTIONS(265), 6, + sym__implicit_end_tag, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5777] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(263), 1, + anon_sym_LT, + ACTIONS(261), 6, + sym__implicit_end_tag, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5792] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(259), 1, + anon_sym_LT, + ACTIONS(257), 6, + sym__implicit_end_tag, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5807] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(323), 1, + anon_sym_LT, + ACTIONS(321), 6, + ts_builtin_sym_end, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5822] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(191), 1, + sym_attribute_name, + ACTIONS(193), 1, + anon_sym_LBRACE, + ACTIONS(215), 1, + anon_sym_GT, + ACTIONS(333), 1, + anon_sym_SLASH_GT, + STATE(200), 1, + sym_expression, + STATE(112), 2, + sym_attribute, + aux_sym_start_tag_repeat1, + [5845] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(243), 1, + anon_sym_LT, + ACTIONS(241), 6, + sym__implicit_end_tag, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5860] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(225), 1, + anon_sym_LT, + ACTIONS(223), 6, + sym__implicit_end_tag, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5875] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(213), 1, + anon_sym_LT, + ACTIONS(211), 6, + sym__implicit_end_tag, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5890] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(209), 1, + anon_sym_LT, + ACTIONS(207), 6, + sym__implicit_end_tag, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5905] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(205), 1, + anon_sym_LT, + ACTIONS(203), 6, + sym__implicit_end_tag, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5920] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(165), 1, + anon_sym_LT, + ACTIONS(163), 6, + sym__implicit_end_tag, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5935] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(161), 1, + anon_sym_LT, + ACTIONS(159), 6, + sym__implicit_end_tag, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5950] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(295), 1, + anon_sym_LT, + ACTIONS(293), 6, + ts_builtin_sym_end, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5965] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(299), 1, + anon_sym_LT, + ACTIONS(297), 6, + ts_builtin_sym_end, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5980] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(303), 1, + anon_sym_LT, + ACTIONS(301), 6, + sym__implicit_end_tag, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [5995] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(255), 1, + anon_sym_LT, + ACTIONS(253), 6, + ts_builtin_sym_end, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [6010] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(307), 1, + anon_sym_LT, + ACTIONS(305), 6, + ts_builtin_sym_end, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [6025] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(311), 1, + anon_sym_LT, + ACTIONS(309), 6, + ts_builtin_sym_end, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [6040] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(145), 1, + anon_sym_LT, + ACTIONS(143), 6, + ts_builtin_sym_end, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [6055] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(315), 1, + anon_sym_LT, + ACTIONS(313), 6, + ts_builtin_sym_end, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [6070] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(335), 1, + anon_sym_GT, + ACTIONS(337), 1, + sym_attribute_name, + ACTIONS(339), 1, + anon_sym_LBRACE, + STATE(204), 1, + sym_expression, + STATE(158), 2, + sym_attribute, + aux_sym_start_tag_repeat1, + [6090] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(343), 1, + anon_sym_LT, + ACTIONS(341), 5, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [6104] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(337), 1, + sym_attribute_name, + ACTIONS(339), 1, + anon_sym_LBRACE, + ACTIONS(345), 1, + anon_sym_GT, + STATE(204), 1, + sym_expression, + STATE(162), 2, + sym_attribute, + aux_sym_start_tag_repeat1, + [6124] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(349), 1, + anon_sym_LT, + ACTIONS(347), 5, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [6138] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(353), 1, + anon_sym_LT, + ACTIONS(351), 5, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [6152] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(357), 1, + anon_sym_LT, + ACTIONS(355), 5, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [6166] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(281), 1, + anon_sym_GT, + ACTIONS(359), 1, + sym_attribute_name, + ACTIONS(362), 1, + anon_sym_LBRACE, + STATE(204), 1, + sym_expression, + STATE(162), 2, + sym_attribute, + aux_sym_start_tag_repeat1, + [6186] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(367), 1, + anon_sym_LT, + ACTIONS(365), 5, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [6200] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(337), 1, + sym_attribute_name, + ACTIONS(339), 1, + anon_sym_LBRACE, + ACTIONS(369), 1, + anon_sym_GT, + STATE(204), 1, + sym_expression, + STATE(162), 2, + sym_attribute, + aux_sym_start_tag_repeat1, + [6220] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(193), 1, + anon_sym_LBRACE, + ACTIONS(371), 1, + sym_attribute_value, + ACTIONS(373), 1, + anon_sym_SQUOTE, + ACTIONS(375), 1, + anon_sym_DQUOTE, + STATE(202), 2, + sym_quoted_attribute_value, + sym_expression, + [6240] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(379), 1, + anon_sym_LT, + ACTIONS(377), 5, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [6254] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(383), 1, + anon_sym_LT, + ACTIONS(381), 5, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [6268] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(387), 1, + anon_sym_LT, + ACTIONS(385), 5, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [6282] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(391), 1, + anon_sym_LT, + ACTIONS(389), 5, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [6296] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(395), 1, + anon_sym_LT, + ACTIONS(393), 5, + anon_sym_LT_BANG, + anon_sym_LT_SLASH, + sym_entity, + sym_text, + anon_sym_LBRACE, + [6310] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(339), 1, + anon_sym_LBRACE, + ACTIONS(397), 1, + sym_attribute_value, + ACTIONS(399), 1, + anon_sym_SQUOTE, + ACTIONS(401), 1, + anon_sym_DQUOTE, + STATE(211), 2, + sym_quoted_attribute_value, + sym_expression, + [6330] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(337), 1, + sym_attribute_name, + ACTIONS(339), 1, + anon_sym_LBRACE, + ACTIONS(403), 1, + anon_sym_GT, + STATE(204), 1, + sym_expression, + STATE(164), 2, + sym_attribute, + aux_sym_start_tag_repeat1, + [6350] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(405), 1, + anon_sym_POUND, + ACTIONS(407), 1, + anon_sym_COLON, + ACTIONS(409), 1, + anon_sym_SLASH, + ACTIONS(411), 1, + anon_sym_AT, + ACTIONS(413), 1, + sym_raw_text_svelte, + [6369] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(405), 1, + anon_sym_POUND, + ACTIONS(411), 1, + anon_sym_AT, + ACTIONS(413), 1, + sym_raw_text_svelte, + ACTIONS(415), 1, + anon_sym_COLON, + ACTIONS(417), 1, + anon_sym_SLASH, + [6388] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(419), 1, + anon_sym_LBRACE, + STATE(130), 1, + sym_if_end, + STATE(228), 1, + sym_else_block, + STATE(207), 2, + sym_else_if_block, + aux_sym_if_statement_repeat1, + [6405] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(421), 1, + anon_sym_if, + ACTIONS(423), 1, + anon_sym_each, + ACTIONS(425), 1, + anon_sym_await, + ACTIONS(427), 1, + anon_sym_key, + ACTIONS(429), 1, + anon_sym_snippet, + [6424] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(419), 1, + anon_sym_LBRACE, + STATE(142), 1, + sym_if_end, + STATE(230), 1, + sym_else_block, + STATE(207), 2, + sym_else_if_block, + aux_sym_if_statement_repeat1, + [6441] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(433), 1, + anon_sym_EQ, + ACTIONS(431), 4, + anon_sym_GT, + anon_sym_SLASH_GT, + sym_attribute_name, + anon_sym_LBRACE, + [6454] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(405), 1, + anon_sym_POUND, + ACTIONS(411), 1, + anon_sym_AT, + ACTIONS(413), 1, + sym_raw_text_svelte, + ACTIONS(435), 1, + anon_sym_COLON, + ACTIONS(437), 1, + anon_sym_SLASH, + [6473] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(405), 1, + anon_sym_POUND, + ACTIONS(411), 1, + anon_sym_AT, + ACTIONS(413), 1, + sym_raw_text_svelte, + ACTIONS(415), 1, + anon_sym_COLON, + ACTIONS(439), 1, + anon_sym_SLASH, + [6492] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(405), 1, + anon_sym_POUND, + ACTIONS(411), 1, + anon_sym_AT, + ACTIONS(413), 1, + sym_raw_text_svelte, + ACTIONS(441), 1, + anon_sym_COLON, + ACTIONS(443), 1, + anon_sym_SLASH, + [6511] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(445), 1, + anon_sym_LBRACE, + STATE(128), 1, + sym_if_end, + STATE(231), 1, + sym_else_block, + STATE(207), 2, + sym_else_if_block, + aux_sym_if_statement_repeat1, + [6528] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(405), 1, + anon_sym_POUND, + ACTIONS(411), 1, + anon_sym_AT, + ACTIONS(413), 1, + sym_raw_text_svelte, + ACTIONS(441), 1, + anon_sym_COLON, + ACTIONS(447), 1, + anon_sym_SLASH, + [6547] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(405), 1, + anon_sym_POUND, + ACTIONS(409), 1, + anon_sym_SLASH, + ACTIONS(411), 1, + anon_sym_AT, + ACTIONS(413), 1, + sym_raw_text_svelte, + ACTIONS(435), 1, + anon_sym_COLON, + [6566] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(405), 1, + anon_sym_POUND, + ACTIONS(407), 1, + anon_sym_COLON, + ACTIONS(411), 1, + anon_sym_AT, + ACTIONS(413), 1, + sym_raw_text_svelte, + ACTIONS(437), 1, + anon_sym_SLASH, + [6585] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(445), 1, + anon_sym_LBRACE, + STATE(90), 1, + sym_if_end, + STATE(236), 1, + sym_else_block, + STATE(207), 2, + sym_else_if_block, + aux_sym_if_statement_repeat1, + [6602] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(449), 1, + anon_sym_html, + ACTIONS(451), 1, + anon_sym_const, + ACTIONS(453), 1, + anon_sym_debug, + ACTIONS(455), 1, + anon_sym_render, + [6618] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(457), 1, + anon_sym_EQ, + ACTIONS(431), 3, + anon_sym_GT, + sym_attribute_name, + anon_sym_LBRACE, + [6630] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(459), 4, + anon_sym_GT, + anon_sym_SLASH_GT, + sym_attribute_name, + anon_sym_LBRACE, + [6640] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(405), 1, + anon_sym_POUND, + ACTIONS(411), 1, + anon_sym_AT, + ACTIONS(413), 1, + sym_raw_text_svelte, + ACTIONS(461), 1, + anon_sym_SLASH, + [6656] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(405), 1, + anon_sym_POUND, + ACTIONS(411), 1, + anon_sym_AT, + ACTIONS(413), 1, + sym_raw_text_svelte, + ACTIONS(463), 1, + anon_sym_SLASH, + [6672] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(405), 1, + anon_sym_POUND, + ACTIONS(409), 1, + anon_sym_SLASH, + ACTIONS(411), 1, + anon_sym_AT, + ACTIONS(413), 1, + sym_raw_text_svelte, + [6688] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(465), 1, + anon_sym_html, + ACTIONS(467), 1, + anon_sym_const, + ACTIONS(469), 1, + anon_sym_debug, + ACTIONS(471), 1, + anon_sym_render, + [6704] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(405), 1, + anon_sym_POUND, + ACTIONS(411), 1, + anon_sym_AT, + ACTIONS(413), 1, + sym_raw_text_svelte, + ACTIONS(437), 1, + anon_sym_SLASH, + [6720] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(405), 1, + anon_sym_POUND, + ACTIONS(411), 1, + anon_sym_AT, + ACTIONS(413), 1, + sym_raw_text_svelte, + ACTIONS(473), 1, + anon_sym_SLASH, + [6736] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(475), 4, + anon_sym_GT, + anon_sym_SLASH_GT, + sym_attribute_name, + anon_sym_LBRACE, + [6746] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(405), 1, + anon_sym_POUND, + ACTIONS(411), 1, + anon_sym_AT, + ACTIONS(413), 1, + sym_raw_text_svelte, + ACTIONS(477), 1, + anon_sym_SLASH, + [6762] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(405), 1, + anon_sym_POUND, + ACTIONS(411), 1, + anon_sym_AT, + ACTIONS(413), 1, + sym_raw_text_svelte, + ACTIONS(443), 1, + anon_sym_SLASH, + [6778] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(163), 4, + anon_sym_GT, + anon_sym_SLASH_GT, + sym_attribute_name, + anon_sym_LBRACE, + [6788] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(479), 4, + anon_sym_GT, + anon_sym_SLASH_GT, + sym_attribute_name, + anon_sym_LBRACE, + [6798] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(405), 1, + anon_sym_POUND, + ACTIONS(411), 1, + anon_sym_AT, + ACTIONS(413), 1, + sym_raw_text_svelte, + ACTIONS(447), 1, + anon_sym_SLASH, + [6814] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(481), 4, + anon_sym_GT, + anon_sym_SLASH_GT, + sym_attribute_name, + anon_sym_LBRACE, + [6824] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(405), 1, + anon_sym_POUND, + ACTIONS(411), 1, + anon_sym_AT, + ACTIONS(413), 1, + sym_raw_text_svelte, + [6837] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(479), 3, + anon_sym_GT, + sym_attribute_name, + anon_sym_LBRACE, + [6846] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(483), 1, + anon_sym_LT_SLASH, + ACTIONS(485), 1, + sym_raw_text, + STATE(93), 1, + sym_end_tag, + [6859] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(483), 1, + anon_sym_LT_SLASH, + ACTIONS(487), 1, + sym_raw_text, + STATE(95), 1, + sym_end_tag, + [6872] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(489), 1, + anon_sym_LBRACE, + STATE(207), 2, + sym_else_if_block, + aux_sym_if_statement_repeat1, + [6883] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(492), 1, + sym_raw_text_svelte, + ACTIONS(494), 1, + sym_raw_text_svelte_each, + STATE(253), 1, + sym__raw_text_svelte_each, + [6896] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(475), 3, + anon_sym_GT, + sym_attribute_name, + anon_sym_LBRACE, + [6905] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(496), 1, + anon_sym_LT_SLASH, + ACTIONS(498), 1, + sym_raw_text, + STATE(70), 1, + sym_end_tag, + [6918] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(481), 3, + anon_sym_GT, + sym_attribute_name, + anon_sym_LBRACE, + [6927] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(500), 1, + sym__start_tag_name, + ACTIONS(502), 1, + sym__script_start_tag_name, + ACTIONS(504), 1, + sym__style_start_tag_name, + [6940] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(502), 1, + sym__script_start_tag_name, + ACTIONS(504), 1, + sym__style_start_tag_name, + ACTIONS(506), 1, + sym__start_tag_name, + [6953] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(163), 3, + anon_sym_GT, + sym_attribute_name, + anon_sym_LBRACE, + [6962] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(405), 1, + anon_sym_POUND, + ACTIONS(508), 1, + anon_sym_AT, + ACTIONS(510), 1, + sym_raw_text_svelte, + [6975] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(496), 1, + anon_sym_LT_SLASH, + ACTIONS(512), 1, + sym_raw_text, + STATE(74), 1, + sym_end_tag, + [6988] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(459), 3, + anon_sym_GT, + sym_attribute_name, + anon_sym_LBRACE, + [6997] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(514), 1, + anon_sym_LBRACE, + STATE(142), 1, + sym_if_end, + [7007] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(516), 2, + sym_raw_text, + anon_sym_LT_SLASH, + [7015] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(415), 1, + anon_sym_COLON, + ACTIONS(439), 1, + anon_sym_SLASH, + [7025] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(518), 1, + sym__end_tag_name, + ACTIONS(520), 1, + sym_erroneous_end_tag_name, + [7035] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(522), 2, + sym_raw_text, + anon_sym_LT_SLASH, + [7043] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(524), 1, + anon_sym_DQUOTE, + ACTIONS(526), 1, + aux_sym_quoted_attribute_value_token2, + [7053] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(524), 1, + anon_sym_SQUOTE, + ACTIONS(528), 1, + aux_sym_quoted_attribute_value_token1, + [7063] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(530), 1, + anon_sym_RBRACE, + ACTIONS(532), 1, + sym_raw_text_svelte, + [7073] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(534), 1, + anon_sym_RBRACE, + ACTIONS(536), 1, + sym_raw_text_svelte, + [7083] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(538), 1, + anon_sym_DQUOTE, + ACTIONS(540), 1, + aux_sym_quoted_attribute_value_token2, + [7093] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(514), 1, + anon_sym_LBRACE, + STATE(119), 1, + sym_if_end, + [7103] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(538), 1, + anon_sym_SQUOTE, + ACTIONS(542), 1, + aux_sym_quoted_attribute_value_token1, + [7113] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(514), 1, + anon_sym_LBRACE, + STATE(130), 1, + sym_if_end, + [7123] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(544), 1, + anon_sym_LBRACE, + STATE(148), 1, + sym_if_end, + [7133] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(546), 2, + sym_raw_text, + anon_sym_LT_SLASH, + [7141] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(548), 1, + anon_sym_RBRACE, + ACTIONS(550), 1, + anon_sym_if2, + [7151] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(496), 1, + anon_sym_LT_SLASH, + STATE(144), 1, + sym_end_tag, + [7161] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(496), 1, + anon_sym_LT_SLASH, + STATE(143), 1, + sym_end_tag, + [7171] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(544), 1, + anon_sym_LBRACE, + STATE(128), 1, + sym_if_end, + [7181] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(552), 1, + anon_sym_then, + ACTIONS(554), 1, + anon_sym_catch, + [7191] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(544), 1, + anon_sym_LBRACE, + STATE(90), 1, + sym_if_end, + [7201] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(415), 1, + anon_sym_COLON, + ACTIONS(417), 1, + anon_sym_SLASH, + [7211] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(556), 2, + sym_raw_text, + anon_sym_LT_SLASH, + [7219] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(483), 1, + anon_sym_LT_SLASH, + STATE(85), 1, + sym_end_tag, + [7229] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(520), 1, + sym_erroneous_end_tag_name, + ACTIONS(558), 1, + sym__end_tag_name, + [7239] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(483), 1, + anon_sym_LT_SLASH, + STATE(86), 1, + sym_end_tag, + [7249] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(560), 1, + anon_sym_GT, + [7256] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(562), 1, + anon_sym_RBRACE, + [7263] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(564), 1, + anon_sym_RBRACE, + [7270] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(566), 1, + anon_sym_RBRACE, + [7277] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(568), 1, + anon_sym_RBRACE, + [7284] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(570), 1, + anon_sym_RBRACE, + [7291] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(572), 1, + anon_sym_RBRACE, + [7298] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(574), 1, + anon_sym_RBRACE, + [7305] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(576), 1, + anon_sym_RBRACE, + [7312] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(578), 1, + anon_sym_as, + [7319] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(580), 1, + anon_sym_RBRACE, + [7326] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(582), 1, + anon_sym_RBRACE, + [7333] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(584), 1, + anon_sym_snippet, + [7340] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(586), 1, + anon_sym_key, + [7347] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(588), 1, + anon_sym_await, + [7354] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(590), 1, + anon_sym_each, + [7361] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(592), 1, + anon_sym_else, + [7368] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(594), 1, + anon_sym_GT, + [7375] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(596), 1, + anon_sym_RBRACE, + [7382] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(598), 1, + sym__doctype, + [7389] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(558), 1, + sym__end_tag_name, + [7396] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(417), 1, + anon_sym_SLASH, + [7403] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(600), 1, + anon_sym_RBRACE, + [7410] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(602), 1, + anon_sym_GT, + [7417] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(604), 1, + anon_sym_if, + [7424] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(606), 1, + anon_sym_GT, + [7431] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(608), 1, + anon_sym_RBRACE, + [7438] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(610), 1, + anon_sym_else, + [7445] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(612), 1, + anon_sym_GT, + [7452] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(614), 1, + anon_sym_COLON, + [7459] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(616), 1, + sym_raw_text_svelte, + [7466] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(618), 1, + sym_raw_text_svelte, + [7473] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(620), 1, + aux_sym_doctype_token1, + [7480] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(622), 1, + sym_raw_text_svelte, + [7487] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(624), 1, + sym_raw_text_svelte, + [7494] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(626), 1, + anon_sym_RBRACE, + [7501] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(628), 1, + anon_sym_RBRACE, + [7508] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(630), 1, + anon_sym_RBRACE, + [7515] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(632), 1, + anon_sym_RBRACE, + [7522] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(634), 1, + anon_sym_RBRACE, + [7529] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(636), 1, + anon_sym_RBRACE, + [7536] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(638), 1, + anon_sym_RBRACE, + [7543] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(640), 1, + anon_sym_SQUOTE, + [7550] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(642), 1, + anon_sym_RBRACE, + [7557] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(644), 1, + anon_sym_RBRACE, + [7564] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(646), 1, + ts_builtin_sym_end, + [7571] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(648), 1, + sym_raw_text_svelte, + [7578] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(650), 1, + anon_sym_RBRACE, + [7585] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(652), 1, + anon_sym_RBRACE, + [7592] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(654), 1, + anon_sym_GT, + [7599] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(656), 1, + anon_sym_RBRACE, + [7606] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(658), 1, + sym_raw_text_svelte, + [7613] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(660), 1, + sym_erroneous_end_tag_name, + [7620] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(662), 1, + anon_sym_SQUOTE, + [7627] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(662), 1, + anon_sym_DQUOTE, + [7634] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(664), 1, + sym_raw_text_svelte, + [7641] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(666), 1, + anon_sym_RBRACE, + [7648] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(668), 1, + anon_sym_RBRACE, + [7655] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(670), 1, + anon_sym_else, + [7662] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(520), 1, + sym_erroneous_end_tag_name, + [7669] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(554), 1, + anon_sym_catch, + [7676] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(672), 1, + aux_sym_doctype_token1, + [7683] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(674), 1, + sym_raw_text_svelte, + [7690] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(518), 1, + sym__end_tag_name, + [7697] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(676), 1, + sym_raw_text_svelte, + [7704] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(678), 1, + sym_raw_text_svelte, + [7711] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(680), 1, + sym_raw_text_svelte, + [7718] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(682), 1, + sym_raw_text_svelte, + [7725] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(684), 1, + sym_raw_text_svelte, + [7732] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(686), 1, + anon_sym_if, + [7739] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(439), 1, + anon_sym_SLASH, + [7746] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(688), 1, + anon_sym_RBRACE, + [7753] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(690), 1, + anon_sym_each, + [7760] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(692), 1, + anon_sym_RBRACE, + [7767] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(694), 1, + anon_sym_await, + [7774] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(696), 1, + sym_raw_text_svelte, + [7781] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(698), 1, + anon_sym_RBRACE, + [7788] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(700), 1, + anon_sym_key, + [7795] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(702), 1, + anon_sym_snippet, + [7802] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(704), 1, + sym__doctype, + [7809] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(550), 1, + anon_sym_if2, + [7816] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(706), 1, + sym_raw_text_svelte, + [7823] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(708), 1, + anon_sym_RBRACE, + [7830] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(710), 1, + sym_raw_text_svelte, + [7837] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(712), 1, + anon_sym_RBRACE, + [7844] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(640), 1, + anon_sym_DQUOTE, +}; + +static const uint32_t ts_small_parse_table_map[] = { + [SMALL_STATE(2)] = 0, + [SMALL_STATE(3)] = 78, + [SMALL_STATE(4)] = 156, + [SMALL_STATE(5)] = 234, + [SMALL_STATE(6)] = 312, + [SMALL_STATE(7)] = 389, + [SMALL_STATE(8)] = 466, + [SMALL_STATE(9)] = 543, + [SMALL_STATE(10)] = 620, + [SMALL_STATE(11)] = 694, + [SMALL_STATE(12)] = 768, + [SMALL_STATE(13)] = 842, + [SMALL_STATE(14)] = 916, + [SMALL_STATE(15)] = 990, + [SMALL_STATE(16)] = 1064, + [SMALL_STATE(17)] = 1138, + [SMALL_STATE(18)] = 1212, + [SMALL_STATE(19)] = 1286, + [SMALL_STATE(20)] = 1360, + [SMALL_STATE(21)] = 1434, + [SMALL_STATE(22)] = 1508, + [SMALL_STATE(23)] = 1582, + [SMALL_STATE(24)] = 1656, + [SMALL_STATE(25)] = 1730, + [SMALL_STATE(26)] = 1804, + [SMALL_STATE(27)] = 1875, + [SMALL_STATE(28)] = 1946, + [SMALL_STATE(29)] = 2017, + [SMALL_STATE(30)] = 2088, + [SMALL_STATE(31)] = 2159, + [SMALL_STATE(32)] = 2230, + [SMALL_STATE(33)] = 2301, + [SMALL_STATE(34)] = 2372, + [SMALL_STATE(35)] = 2443, + [SMALL_STATE(36)] = 2514, + [SMALL_STATE(37)] = 2585, + [SMALL_STATE(38)] = 2656, + [SMALL_STATE(39)] = 2727, + [SMALL_STATE(40)] = 2798, + [SMALL_STATE(41)] = 2869, + [SMALL_STATE(42)] = 2940, + [SMALL_STATE(43)] = 3011, + [SMALL_STATE(44)] = 3082, + [SMALL_STATE(45)] = 3153, + [SMALL_STATE(46)] = 3224, + [SMALL_STATE(47)] = 3295, + [SMALL_STATE(48)] = 3366, + [SMALL_STATE(49)] = 3437, + [SMALL_STATE(50)] = 3508, + [SMALL_STATE(51)] = 3579, + [SMALL_STATE(52)] = 3650, + [SMALL_STATE(53)] = 3721, + [SMALL_STATE(54)] = 3792, + [SMALL_STATE(55)] = 3863, + [SMALL_STATE(56)] = 3934, + [SMALL_STATE(57)] = 4005, + [SMALL_STATE(58)] = 4076, + [SMALL_STATE(59)] = 4147, + [SMALL_STATE(60)] = 4218, + [SMALL_STATE(61)] = 4289, + [SMALL_STATE(62)] = 4357, + [SMALL_STATE(63)] = 4425, + [SMALL_STATE(64)] = 4493, + [SMALL_STATE(65)] = 4561, + [SMALL_STATE(66)] = 4629, + [SMALL_STATE(67)] = 4697, + [SMALL_STATE(68)] = 4712, + [SMALL_STATE(69)] = 4727, + [SMALL_STATE(70)] = 4742, + [SMALL_STATE(71)] = 4757, + [SMALL_STATE(72)] = 4772, + [SMALL_STATE(73)] = 4787, + [SMALL_STATE(74)] = 4802, + [SMALL_STATE(75)] = 4817, + [SMALL_STATE(76)] = 4832, + [SMALL_STATE(77)] = 4847, + [SMALL_STATE(78)] = 4862, + [SMALL_STATE(79)] = 4877, + [SMALL_STATE(80)] = 4892, + [SMALL_STATE(81)] = 4915, + [SMALL_STATE(82)] = 4930, + [SMALL_STATE(83)] = 4945, + [SMALL_STATE(84)] = 4960, + [SMALL_STATE(85)] = 4975, + [SMALL_STATE(86)] = 4990, + [SMALL_STATE(87)] = 5005, + [SMALL_STATE(88)] = 5028, + [SMALL_STATE(89)] = 5043, + [SMALL_STATE(90)] = 5058, + [SMALL_STATE(91)] = 5073, + [SMALL_STATE(92)] = 5088, + [SMALL_STATE(93)] = 5103, + [SMALL_STATE(94)] = 5118, + [SMALL_STATE(95)] = 5141, + [SMALL_STATE(96)] = 5156, + [SMALL_STATE(97)] = 5171, + [SMALL_STATE(98)] = 5186, + [SMALL_STATE(99)] = 5201, + [SMALL_STATE(100)] = 5216, + [SMALL_STATE(101)] = 5231, + [SMALL_STATE(102)] = 5246, + [SMALL_STATE(103)] = 5261, + [SMALL_STATE(104)] = 5276, + [SMALL_STATE(105)] = 5291, + [SMALL_STATE(106)] = 5306, + [SMALL_STATE(107)] = 5321, + [SMALL_STATE(108)] = 5336, + [SMALL_STATE(109)] = 5351, + [SMALL_STATE(110)] = 5366, + [SMALL_STATE(111)] = 5381, + [SMALL_STATE(112)] = 5396, + [SMALL_STATE(113)] = 5417, + [SMALL_STATE(114)] = 5432, + [SMALL_STATE(115)] = 5447, + [SMALL_STATE(116)] = 5462, + [SMALL_STATE(117)] = 5477, + [SMALL_STATE(118)] = 5492, + [SMALL_STATE(119)] = 5507, + [SMALL_STATE(120)] = 5522, + [SMALL_STATE(121)] = 5537, + [SMALL_STATE(122)] = 5552, + [SMALL_STATE(123)] = 5567, + [SMALL_STATE(124)] = 5582, + [SMALL_STATE(125)] = 5597, + [SMALL_STATE(126)] = 5612, + [SMALL_STATE(127)] = 5627, + [SMALL_STATE(128)] = 5642, + [SMALL_STATE(129)] = 5657, + [SMALL_STATE(130)] = 5672, + [SMALL_STATE(131)] = 5687, + [SMALL_STATE(132)] = 5702, + [SMALL_STATE(133)] = 5717, + [SMALL_STATE(134)] = 5732, + [SMALL_STATE(135)] = 5747, + [SMALL_STATE(136)] = 5762, + [SMALL_STATE(137)] = 5777, + [SMALL_STATE(138)] = 5792, + [SMALL_STATE(139)] = 5807, + [SMALL_STATE(140)] = 5822, + [SMALL_STATE(141)] = 5845, + [SMALL_STATE(142)] = 5860, + [SMALL_STATE(143)] = 5875, + [SMALL_STATE(144)] = 5890, + [SMALL_STATE(145)] = 5905, + [SMALL_STATE(146)] = 5920, + [SMALL_STATE(147)] = 5935, + [SMALL_STATE(148)] = 5950, + [SMALL_STATE(149)] = 5965, + [SMALL_STATE(150)] = 5980, + [SMALL_STATE(151)] = 5995, + [SMALL_STATE(152)] = 6010, + [SMALL_STATE(153)] = 6025, + [SMALL_STATE(154)] = 6040, + [SMALL_STATE(155)] = 6055, + [SMALL_STATE(156)] = 6070, + [SMALL_STATE(157)] = 6090, + [SMALL_STATE(158)] = 6104, + [SMALL_STATE(159)] = 6124, + [SMALL_STATE(160)] = 6138, + [SMALL_STATE(161)] = 6152, + [SMALL_STATE(162)] = 6166, + [SMALL_STATE(163)] = 6186, + [SMALL_STATE(164)] = 6200, + [SMALL_STATE(165)] = 6220, + [SMALL_STATE(166)] = 6240, + [SMALL_STATE(167)] = 6254, + [SMALL_STATE(168)] = 6268, + [SMALL_STATE(169)] = 6282, + [SMALL_STATE(170)] = 6296, + [SMALL_STATE(171)] = 6310, + [SMALL_STATE(172)] = 6330, + [SMALL_STATE(173)] = 6350, + [SMALL_STATE(174)] = 6369, + [SMALL_STATE(175)] = 6388, + [SMALL_STATE(176)] = 6405, + [SMALL_STATE(177)] = 6424, + [SMALL_STATE(178)] = 6441, + [SMALL_STATE(179)] = 6454, + [SMALL_STATE(180)] = 6473, + [SMALL_STATE(181)] = 6492, + [SMALL_STATE(182)] = 6511, + [SMALL_STATE(183)] = 6528, + [SMALL_STATE(184)] = 6547, + [SMALL_STATE(185)] = 6566, + [SMALL_STATE(186)] = 6585, + [SMALL_STATE(187)] = 6602, + [SMALL_STATE(188)] = 6618, + [SMALL_STATE(189)] = 6630, + [SMALL_STATE(190)] = 6640, + [SMALL_STATE(191)] = 6656, + [SMALL_STATE(192)] = 6672, + [SMALL_STATE(193)] = 6688, + [SMALL_STATE(194)] = 6704, + [SMALL_STATE(195)] = 6720, + [SMALL_STATE(196)] = 6736, + [SMALL_STATE(197)] = 6746, + [SMALL_STATE(198)] = 6762, + [SMALL_STATE(199)] = 6778, + [SMALL_STATE(200)] = 6788, + [SMALL_STATE(201)] = 6798, + [SMALL_STATE(202)] = 6814, + [SMALL_STATE(203)] = 6824, + [SMALL_STATE(204)] = 6837, + [SMALL_STATE(205)] = 6846, + [SMALL_STATE(206)] = 6859, + [SMALL_STATE(207)] = 6872, + [SMALL_STATE(208)] = 6883, + [SMALL_STATE(209)] = 6896, + [SMALL_STATE(210)] = 6905, + [SMALL_STATE(211)] = 6918, + [SMALL_STATE(212)] = 6927, + [SMALL_STATE(213)] = 6940, + [SMALL_STATE(214)] = 6953, + [SMALL_STATE(215)] = 6962, + [SMALL_STATE(216)] = 6975, + [SMALL_STATE(217)] = 6988, + [SMALL_STATE(218)] = 6997, + [SMALL_STATE(219)] = 7007, + [SMALL_STATE(220)] = 7015, + [SMALL_STATE(221)] = 7025, + [SMALL_STATE(222)] = 7035, + [SMALL_STATE(223)] = 7043, + [SMALL_STATE(224)] = 7053, + [SMALL_STATE(225)] = 7063, + [SMALL_STATE(226)] = 7073, + [SMALL_STATE(227)] = 7083, + [SMALL_STATE(228)] = 7093, + [SMALL_STATE(229)] = 7103, + [SMALL_STATE(230)] = 7113, + [SMALL_STATE(231)] = 7123, + [SMALL_STATE(232)] = 7133, + [SMALL_STATE(233)] = 7141, + [SMALL_STATE(234)] = 7151, + [SMALL_STATE(235)] = 7161, + [SMALL_STATE(236)] = 7171, + [SMALL_STATE(237)] = 7181, + [SMALL_STATE(238)] = 7191, + [SMALL_STATE(239)] = 7201, + [SMALL_STATE(240)] = 7211, + [SMALL_STATE(241)] = 7219, + [SMALL_STATE(242)] = 7229, + [SMALL_STATE(243)] = 7239, + [SMALL_STATE(244)] = 7249, + [SMALL_STATE(245)] = 7256, + [SMALL_STATE(246)] = 7263, + [SMALL_STATE(247)] = 7270, + [SMALL_STATE(248)] = 7277, + [SMALL_STATE(249)] = 7284, + [SMALL_STATE(250)] = 7291, + [SMALL_STATE(251)] = 7298, + [SMALL_STATE(252)] = 7305, + [SMALL_STATE(253)] = 7312, + [SMALL_STATE(254)] = 7319, + [SMALL_STATE(255)] = 7326, + [SMALL_STATE(256)] = 7333, + [SMALL_STATE(257)] = 7340, + [SMALL_STATE(258)] = 7347, + [SMALL_STATE(259)] = 7354, + [SMALL_STATE(260)] = 7361, + [SMALL_STATE(261)] = 7368, + [SMALL_STATE(262)] = 7375, + [SMALL_STATE(263)] = 7382, + [SMALL_STATE(264)] = 7389, + [SMALL_STATE(265)] = 7396, + [SMALL_STATE(266)] = 7403, + [SMALL_STATE(267)] = 7410, + [SMALL_STATE(268)] = 7417, + [SMALL_STATE(269)] = 7424, + [SMALL_STATE(270)] = 7431, + [SMALL_STATE(271)] = 7438, + [SMALL_STATE(272)] = 7445, + [SMALL_STATE(273)] = 7452, + [SMALL_STATE(274)] = 7459, + [SMALL_STATE(275)] = 7466, + [SMALL_STATE(276)] = 7473, + [SMALL_STATE(277)] = 7480, + [SMALL_STATE(278)] = 7487, + [SMALL_STATE(279)] = 7494, + [SMALL_STATE(280)] = 7501, + [SMALL_STATE(281)] = 7508, + [SMALL_STATE(282)] = 7515, + [SMALL_STATE(283)] = 7522, + [SMALL_STATE(284)] = 7529, + [SMALL_STATE(285)] = 7536, + [SMALL_STATE(286)] = 7543, + [SMALL_STATE(287)] = 7550, + [SMALL_STATE(288)] = 7557, + [SMALL_STATE(289)] = 7564, + [SMALL_STATE(290)] = 7571, + [SMALL_STATE(291)] = 7578, + [SMALL_STATE(292)] = 7585, + [SMALL_STATE(293)] = 7592, + [SMALL_STATE(294)] = 7599, + [SMALL_STATE(295)] = 7606, + [SMALL_STATE(296)] = 7613, + [SMALL_STATE(297)] = 7620, + [SMALL_STATE(298)] = 7627, + [SMALL_STATE(299)] = 7634, + [SMALL_STATE(300)] = 7641, + [SMALL_STATE(301)] = 7648, + [SMALL_STATE(302)] = 7655, + [SMALL_STATE(303)] = 7662, + [SMALL_STATE(304)] = 7669, + [SMALL_STATE(305)] = 7676, + [SMALL_STATE(306)] = 7683, + [SMALL_STATE(307)] = 7690, + [SMALL_STATE(308)] = 7697, + [SMALL_STATE(309)] = 7704, + [SMALL_STATE(310)] = 7711, + [SMALL_STATE(311)] = 7718, + [SMALL_STATE(312)] = 7725, + [SMALL_STATE(313)] = 7732, + [SMALL_STATE(314)] = 7739, + [SMALL_STATE(315)] = 7746, + [SMALL_STATE(316)] = 7753, + [SMALL_STATE(317)] = 7760, + [SMALL_STATE(318)] = 7767, + [SMALL_STATE(319)] = 7774, + [SMALL_STATE(320)] = 7781, + [SMALL_STATE(321)] = 7788, + [SMALL_STATE(322)] = 7795, + [SMALL_STATE(323)] = 7802, + [SMALL_STATE(324)] = 7809, + [SMALL_STATE(325)] = 7816, + [SMALL_STATE(326)] = 7823, + [SMALL_STATE(327)] = 7830, + [SMALL_STATE(328)] = 7837, + [SMALL_STATE(329)] = 7844, +}; + +static const TSParseActionEntry ts_parse_actions[] = { + [0] = {.entry = {.count = 0, .reusable = false}}, + [1] = {.entry = {.count = 1, .reusable = false}}, RECOVER(), + [3] = {.entry = {.count = 1, .reusable = true}}, SHIFT_EXTRA(), + [5] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_document, 0), + [7] = {.entry = {.count = 1, .reusable = true}}, SHIFT(263), + [9] = {.entry = {.count = 1, .reusable = false}}, SHIFT(212), + [11] = {.entry = {.count = 1, .reusable = true}}, SHIFT(296), + [13] = {.entry = {.count = 1, .reusable = true}}, SHIFT(77), + [15] = {.entry = {.count = 1, .reusable = true}}, SHIFT(203), + [17] = {.entry = {.count = 1, .reusable = true}}, SHIFT(174), + [19] = {.entry = {.count = 1, .reusable = true}}, SHIFT(180), + [21] = {.entry = {.count = 1, .reusable = true}}, SHIFT(173), + [23] = {.entry = {.count = 1, .reusable = true}}, SHIFT(185), + [25] = {.entry = {.count = 1, .reusable = true}}, SHIFT(179), + [27] = {.entry = {.count = 1, .reusable = true}}, SHIFT(184), + [29] = {.entry = {.count = 1, .reusable = true}}, SHIFT(323), + [31] = {.entry = {.count = 1, .reusable = false}}, SHIFT(213), + [33] = {.entry = {.count = 1, .reusable = true}}, SHIFT(242), + [35] = {.entry = {.count = 1, .reusable = true}}, SHIFT(81), + [37] = {.entry = {.count = 1, .reusable = true}}, SHIFT(215), + [39] = {.entry = {.count = 1, .reusable = true}}, SHIFT(89), + [41] = {.entry = {.count = 1, .reusable = true}}, SHIFT(183), + [43] = {.entry = {.count = 1, .reusable = true}}, SHIFT(221), + [45] = {.entry = {.count = 1, .reusable = true}}, SHIFT(75), + [47] = {.entry = {.count = 1, .reusable = true}}, SHIFT(181), + [49] = {.entry = {.count = 1, .reusable = true}}, SHIFT(84), + [51] = {.entry = {.count = 1, .reusable = true}}, SHIFT(145), + [53] = {.entry = {.count = 1, .reusable = true}}, SHIFT(190), + [55] = {.entry = {.count = 1, .reusable = true}}, SHIFT(194), + [57] = {.entry = {.count = 1, .reusable = true}}, SHIFT(198), + [59] = {.entry = {.count = 1, .reusable = true}}, SHIFT(191), + [61] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_document, 1), + [63] = {.entry = {.count = 1, .reusable = true}}, SHIFT(195), + [65] = {.entry = {.count = 1, .reusable = true}}, SHIFT(197), + [67] = {.entry = {.count = 1, .reusable = true}}, SHIFT(201), + [69] = {.entry = {.count = 1, .reusable = true}}, SHIFT(192), + [71] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_document_repeat1, 2), SHIFT_REPEAT(323), + [74] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_document_repeat1, 2), SHIFT_REPEAT(213), + [77] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_document_repeat1, 2), SHIFT_REPEAT(303), + [80] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_document_repeat1, 2), SHIFT_REPEAT(81), + [83] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_document_repeat1, 2), SHIFT_REPEAT(215), + [86] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_document_repeat1, 2), + [88] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_document_repeat1, 2), SHIFT_REPEAT(263), + [91] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_document_repeat1, 2), SHIFT_REPEAT(212), + [94] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_document_repeat1, 2), SHIFT_REPEAT(296), + [97] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_document_repeat1, 2), SHIFT_REPEAT(77), + [100] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_document_repeat1, 2), SHIFT_REPEAT(203), + [103] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym_else_block, 4), SHIFT(203), + [106] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym_else_block, 5), SHIFT(203), + [109] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym_else_if_block, 6), SHIFT(203), + [112] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym_else_if_block, 7), SHIFT(203), + [115] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym_else_block, 4), SHIFT(263), + [118] = {.entry = {.count = 2, .reusable = false}}, REDUCE(sym_else_block, 4), SHIFT(212), + [121] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym_else_block, 4), SHIFT(296), + [124] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym_else_block, 4), SHIFT(77), + [127] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym_else_block, 5), SHIFT(263), + [130] = {.entry = {.count = 2, .reusable = false}}, REDUCE(sym_else_block, 5), SHIFT(212), + [133] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym_else_block, 5), SHIFT(296), + [136] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym_else_block, 5), SHIFT(77), + [139] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_each_statement, 5), + [141] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_each_statement, 5), + [143] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_html_tag, 5), + [145] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_html_tag, 5), + [147] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_statement, 2), + [149] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_if_statement, 2), + [151] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_style_element, 2), + [153] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_style_element, 2), + [155] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_await_statement, 6), + [157] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_await_statement, 6), + [159] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_erroneous_end_tag, 3), + [161] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_erroneous_end_tag, 3), + [163] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_expression, 3), + [165] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_expression, 3), + [167] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_script_element, 2), + [169] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_script_element, 2), + [171] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_element, 2), + [173] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_element, 2), + [175] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_snippet_statement, 2), + [177] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_snippet_statement, 2), + [179] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__node, 1), + [181] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__node, 1), + [183] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_element, 1), + [185] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_element, 1), + [187] = {.entry = {.count = 1, .reusable = true}}, SHIFT(96), + [189] = {.entry = {.count = 1, .reusable = true}}, SHIFT(121), + [191] = {.entry = {.count = 1, .reusable = true}}, SHIFT(178), + [193] = {.entry = {.count = 1, .reusable = true}}, SHIFT(306), + [195] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_each_statement, 2), + [197] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_each_statement, 2), + [199] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_await_statement, 7), + [201] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_await_statement, 7), + [203] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_element, 3), + [205] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_element, 3), + [207] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_script_element, 3), + [209] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_script_element, 3), + [211] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_style_element, 3), + [213] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_style_element, 3), + [215] = {.entry = {.count = 1, .reusable = true}}, SHIFT(110), + [217] = {.entry = {.count = 1, .reusable = true}}, SHIFT(134), + [219] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_snippet_end, 4), + [221] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_snippet_end, 4), + [223] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_statement, 3), + [225] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_if_statement, 3), + [227] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_key_end, 4), + [229] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_key_end, 4), + [231] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_key_statement, 2), + [233] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_key_statement, 2), + [235] = {.entry = {.count = 1, .reusable = true}}, SHIFT(150), + [237] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_start_tag, 3), + [239] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_start_tag, 3), + [241] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_each_statement, 3), + [243] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_each_statement, 3), + [245] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_await_statement, 5), + [247] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_await_statement, 5), + [249] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_await_end, 4), + [251] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_await_end, 4), + [253] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_await_statement, 2), + [255] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_await_statement, 2), + [257] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_await_statement, 3), + [259] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_await_statement, 3), + [261] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_key_statement, 3), + [263] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_key_statement, 3), + [265] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_snippet_statement, 3), + [267] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_snippet_statement, 3), + [269] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_doctype, 4), + [271] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_doctype, 4), + [273] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_start_tag, 4), + [275] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_start_tag, 4), + [277] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_self_closing_tag, 4), + [279] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_self_closing_tag, 4), + [281] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_start_tag_repeat1, 2), + [283] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_start_tag_repeat1, 2), SHIFT_REPEAT(178), + [286] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_start_tag_repeat1, 2), SHIFT_REPEAT(306), + [289] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_each_end, 4), + [291] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_each_end, 4), + [293] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_statement, 5), + [295] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_if_statement, 5), + [297] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_end, 4), + [299] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_if_end, 4), + [301] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_self_closing_tag, 3), + [303] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_self_closing_tag, 3), + [305] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_render_tag, 5), + [307] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_render_tag, 5), + [309] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_debug_tag, 5), + [311] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_debug_tag, 5), + [313] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_const_tag, 5), + [315] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_const_tag, 5), + [317] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_end_tag, 3), + [319] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_end_tag, 3), + [321] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_await_statement, 4), + [323] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_await_statement, 4), + [325] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_statement, 4), + [327] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_if_statement, 4), + [329] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_each_statement, 4), + [331] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_each_statement, 4), + [333] = {.entry = {.count = 1, .reusable = true}}, SHIFT(111), + [335] = {.entry = {.count = 1, .reusable = true}}, SHIFT(240), + [337] = {.entry = {.count = 1, .reusable = true}}, SHIFT(188), + [339] = {.entry = {.count = 1, .reusable = true}}, SHIFT(308), + [341] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_snippet_start, 5), + [343] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_snippet_start, 5), + [345] = {.entry = {.count = 1, .reusable = true}}, SHIFT(232), + [347] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_await_start, 5), + [349] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_await_start, 5), + [351] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_each_start, 5), + [353] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_each_start, 5), + [355] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_start, 5), + [357] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_if_start, 5), + [359] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_start_tag_repeat1, 2), SHIFT_REPEAT(188), + [362] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_start_tag_repeat1, 2), SHIFT_REPEAT(308), + [365] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_each_start, 7), + [367] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_each_start, 7), + [369] = {.entry = {.count = 1, .reusable = true}}, SHIFT(219), + [371] = {.entry = {.count = 1, .reusable = true}}, SHIFT(202), + [373] = {.entry = {.count = 1, .reusable = true}}, SHIFT(229), + [375] = {.entry = {.count = 1, .reusable = true}}, SHIFT(227), + [377] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_then_block, 4), + [379] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_then_block, 4), + [381] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_catch_block, 5), + [383] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_catch_block, 5), + [385] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_catch_block, 4), + [387] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_catch_block, 4), + [389] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_then_block, 5), + [391] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_then_block, 5), + [393] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_key_start, 5), + [395] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_key_start, 5), + [397] = {.entry = {.count = 1, .reusable = true}}, SHIFT(211), + [399] = {.entry = {.count = 1, .reusable = true}}, SHIFT(224), + [401] = {.entry = {.count = 1, .reusable = true}}, SHIFT(223), + [403] = {.entry = {.count = 1, .reusable = true}}, SHIFT(222), + [405] = {.entry = {.count = 1, .reusable = true}}, SHIFT(176), + [407] = {.entry = {.count = 1, .reusable = true}}, SHIFT(237), + [409] = {.entry = {.count = 1, .reusable = true}}, SHIFT(258), + [411] = {.entry = {.count = 1, .reusable = true}}, SHIFT(187), + [413] = {.entry = {.count = 1, .reusable = true}}, SHIFT(266), + [415] = {.entry = {.count = 1, .reusable = true}}, SHIFT(271), + [417] = {.entry = {.count = 1, .reusable = true}}, SHIFT(268), + [419] = {.entry = {.count = 1, .reusable = true}}, SHIFT(220), + [421] = {.entry = {.count = 1, .reusable = true}}, SHIFT(327), + [423] = {.entry = {.count = 1, .reusable = true}}, SHIFT(208), + [425] = {.entry = {.count = 1, .reusable = true}}, SHIFT(325), + [427] = {.entry = {.count = 1, .reusable = true}}, SHIFT(319), + [429] = {.entry = {.count = 1, .reusable = true}}, SHIFT(295), + [431] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attribute, 1), + [433] = {.entry = {.count = 1, .reusable = true}}, SHIFT(165), + [435] = {.entry = {.count = 1, .reusable = true}}, SHIFT(304), + [437] = {.entry = {.count = 1, .reusable = true}}, SHIFT(318), + [439] = {.entry = {.count = 1, .reusable = true}}, SHIFT(313), + [441] = {.entry = {.count = 1, .reusable = true}}, SHIFT(260), + [443] = {.entry = {.count = 1, .reusable = true}}, SHIFT(316), + [445] = {.entry = {.count = 1, .reusable = true}}, SHIFT(239), + [447] = {.entry = {.count = 1, .reusable = true}}, SHIFT(259), + [449] = {.entry = {.count = 1, .reusable = true}}, SHIFT(278), + [451] = {.entry = {.count = 1, .reusable = true}}, SHIFT(277), + [453] = {.entry = {.count = 1, .reusable = true}}, SHIFT(275), + [455] = {.entry = {.count = 1, .reusable = true}}, SHIFT(274), + [457] = {.entry = {.count = 1, .reusable = true}}, SHIFT(171), + [459] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_quoted_attribute_value, 2), + [461] = {.entry = {.count = 1, .reusable = true}}, SHIFT(322), + [463] = {.entry = {.count = 1, .reusable = true}}, SHIFT(321), + [465] = {.entry = {.count = 1, .reusable = true}}, SHIFT(309), + [467] = {.entry = {.count = 1, .reusable = true}}, SHIFT(310), + [469] = {.entry = {.count = 1, .reusable = true}}, SHIFT(311), + [471] = {.entry = {.count = 1, .reusable = true}}, SHIFT(312), + [473] = {.entry = {.count = 1, .reusable = true}}, SHIFT(256), + [475] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_quoted_attribute_value, 3), + [477] = {.entry = {.count = 1, .reusable = true}}, SHIFT(257), + [479] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attribute, 1, .production_id = 1), + [481] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attribute, 3), + [483] = {.entry = {.count = 1, .reusable = true}}, SHIFT(264), + [485] = {.entry = {.count = 1, .reusable = true}}, SHIFT(241), + [487] = {.entry = {.count = 1, .reusable = true}}, SHIFT(243), + [489] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_if_statement_repeat1, 2), SHIFT_REPEAT(273), + [492] = {.entry = {.count = 1, .reusable = true}}, SHIFT(254), + [494] = {.entry = {.count = 1, .reusable = true}}, SHIFT(253), + [496] = {.entry = {.count = 1, .reusable = true}}, SHIFT(307), + [498] = {.entry = {.count = 1, .reusable = true}}, SHIFT(235), + [500] = {.entry = {.count = 1, .reusable = true}}, SHIFT(80), + [502] = {.entry = {.count = 1, .reusable = true}}, SHIFT(156), + [504] = {.entry = {.count = 1, .reusable = true}}, SHIFT(172), + [506] = {.entry = {.count = 1, .reusable = true}}, SHIFT(94), + [508] = {.entry = {.count = 1, .reusable = true}}, SHIFT(193), + [510] = {.entry = {.count = 1, .reusable = true}}, SHIFT(262), + [512] = {.entry = {.count = 1, .reusable = true}}, SHIFT(234), + [514] = {.entry = {.count = 1, .reusable = true}}, SHIFT(314), + [516] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_style_start_tag, 4), + [518] = {.entry = {.count = 1, .reusable = true}}, SHIFT(269), + [520] = {.entry = {.count = 1, .reusable = true}}, SHIFT(261), + [522] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_style_start_tag, 3), + [524] = {.entry = {.count = 1, .reusable = false}}, SHIFT(217), + [526] = {.entry = {.count = 1, .reusable = true}}, SHIFT(298), + [528] = {.entry = {.count = 1, .reusable = true}}, SHIFT(297), + [530] = {.entry = {.count = 1, .reusable = true}}, SHIFT(168), + [532] = {.entry = {.count = 1, .reusable = true}}, SHIFT(317), + [534] = {.entry = {.count = 1, .reusable = true}}, SHIFT(166), + [536] = {.entry = {.count = 1, .reusable = true}}, SHIFT(320), + [538] = {.entry = {.count = 1, .reusable = false}}, SHIFT(189), + [540] = {.entry = {.count = 1, .reusable = true}}, SHIFT(329), + [542] = {.entry = {.count = 1, .reusable = true}}, SHIFT(286), + [544] = {.entry = {.count = 1, .reusable = true}}, SHIFT(265), + [546] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_script_start_tag, 4), + [548] = {.entry = {.count = 1, .reusable = true}}, SHIFT(61), + [550] = {.entry = {.count = 1, .reusable = true}}, SHIFT(299), + [552] = {.entry = {.count = 1, .reusable = true}}, SHIFT(226), + [554] = {.entry = {.count = 1, .reusable = true}}, SHIFT(225), + [556] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_script_start_tag, 3), + [558] = {.entry = {.count = 1, .reusable = true}}, SHIFT(244), + [560] = {.entry = {.count = 1, .reusable = true}}, SHIFT(125), + [562] = {.entry = {.count = 1, .reusable = true}}, SHIFT(116), + [564] = {.entry = {.count = 1, .reusable = true}}, SHIFT(152), + [566] = {.entry = {.count = 1, .reusable = true}}, SHIFT(153), + [568] = {.entry = {.count = 1, .reusable = true}}, SHIFT(155), + [570] = {.entry = {.count = 1, .reusable = true}}, SHIFT(154), + [572] = {.entry = {.count = 1, .reusable = true}}, SHIFT(157), + [574] = {.entry = {.count = 1, .reusable = true}}, SHIFT(170), + [576] = {.entry = {.count = 1, .reusable = true}}, SHIFT(159), + [578] = {.entry = {.count = 1, .reusable = true}}, SHIFT(290), + [580] = {.entry = {.count = 1, .reusable = true}}, SHIFT(160), + [582] = {.entry = {.count = 1, .reusable = true}}, SHIFT(161), + [584] = {.entry = {.count = 1, .reusable = true}}, SHIFT(270), + [586] = {.entry = {.count = 1, .reusable = true}}, SHIFT(315), + [588] = {.entry = {.count = 1, .reusable = true}}, SHIFT(294), + [590] = {.entry = {.count = 1, .reusable = true}}, SHIFT(288), + [592] = {.entry = {.count = 1, .reusable = true}}, SHIFT(284), + [594] = {.entry = {.count = 1, .reusable = true}}, SHIFT(147), + [596] = {.entry = {.count = 1, .reusable = true}}, SHIFT(146), + [598] = {.entry = {.count = 1, .reusable = true}}, SHIFT(276), + [600] = {.entry = {.count = 1, .reusable = true}}, SHIFT(73), + [602] = {.entry = {.count = 1, .reusable = true}}, SHIFT(135), + [604] = {.entry = {.count = 1, .reusable = true}}, SHIFT(287), + [606] = {.entry = {.count = 1, .reusable = true}}, SHIFT(131), + [608] = {.entry = {.count = 1, .reusable = true}}, SHIFT(88), + [610] = {.entry = {.count = 1, .reusable = true}}, SHIFT(233), + [612] = {.entry = {.count = 1, .reusable = true}}, SHIFT(72), + [614] = {.entry = {.count = 1, .reusable = true}}, SHIFT(302), + [616] = {.entry = {.count = 1, .reusable = true}}, SHIFT(246), + [618] = {.entry = {.count = 1, .reusable = true}}, SHIFT(247), + [620] = {.entry = {.count = 1, .reusable = true}}, SHIFT(293), + [622] = {.entry = {.count = 1, .reusable = true}}, SHIFT(248), + [624] = {.entry = {.count = 1, .reusable = true}}, SHIFT(249), + [626] = {.entry = {.count = 1, .reusable = true}}, SHIFT(68), + [628] = {.entry = {.count = 1, .reusable = true}}, SHIFT(124), + [630] = {.entry = {.count = 1, .reusable = true}}, SHIFT(123), + [632] = {.entry = {.count = 1, .reusable = true}}, SHIFT(122), + [634] = {.entry = {.count = 1, .reusable = true}}, SHIFT(120), + [636] = {.entry = {.count = 1, .reusable = true}}, SHIFT(65), + [638] = {.entry = {.count = 1, .reusable = true}}, SHIFT(118), + [640] = {.entry = {.count = 1, .reusable = true}}, SHIFT(196), + [642] = {.entry = {.count = 1, .reusable = true}}, SHIFT(149), + [644] = {.entry = {.count = 1, .reusable = true}}, SHIFT(126), + [646] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), + [648] = {.entry = {.count = 1, .reusable = true}}, SHIFT(328), + [650] = {.entry = {.count = 1, .reusable = true}}, SHIFT(114), + [652] = {.entry = {.count = 1, .reusable = true}}, SHIFT(113), + [654] = {.entry = {.count = 1, .reusable = true}}, SHIFT(108), + [656] = {.entry = {.count = 1, .reusable = true}}, SHIFT(100), + [658] = {.entry = {.count = 1, .reusable = true}}, SHIFT(250), + [660] = {.entry = {.count = 1, .reusable = true}}, SHIFT(272), + [662] = {.entry = {.count = 1, .reusable = true}}, SHIFT(209), + [664] = {.entry = {.count = 1, .reusable = true}}, SHIFT(326), + [666] = {.entry = {.count = 1, .reusable = true}}, SHIFT(199), + [668] = {.entry = {.count = 1, .reusable = true}}, SHIFT(214), + [670] = {.entry = {.count = 1, .reusable = true}}, SHIFT(324), + [672] = {.entry = {.count = 1, .reusable = true}}, SHIFT(267), + [674] = {.entry = {.count = 1, .reusable = true}}, SHIFT(300), + [676] = {.entry = {.count = 1, .reusable = true}}, SHIFT(301), + [678] = {.entry = {.count = 1, .reusable = true}}, SHIFT(279), + [680] = {.entry = {.count = 1, .reusable = true}}, SHIFT(280), + [682] = {.entry = {.count = 1, .reusable = true}}, SHIFT(281), + [684] = {.entry = {.count = 1, .reusable = true}}, SHIFT(282), + [686] = {.entry = {.count = 1, .reusable = true}}, SHIFT(283), + [688] = {.entry = {.count = 1, .reusable = true}}, SHIFT(91), + [690] = {.entry = {.count = 1, .reusable = true}}, SHIFT(285), + [692] = {.entry = {.count = 1, .reusable = true}}, SHIFT(167), + [694] = {.entry = {.count = 1, .reusable = true}}, SHIFT(245), + [696] = {.entry = {.count = 1, .reusable = true}}, SHIFT(251), + [698] = {.entry = {.count = 1, .reusable = true}}, SHIFT(169), + [700] = {.entry = {.count = 1, .reusable = true}}, SHIFT(291), + [702] = {.entry = {.count = 1, .reusable = true}}, SHIFT(292), + [704] = {.entry = {.count = 1, .reusable = true}}, SHIFT(305), + [706] = {.entry = {.count = 1, .reusable = true}}, SHIFT(252), + [708] = {.entry = {.count = 1, .reusable = true}}, SHIFT(63), + [710] = {.entry = {.count = 1, .reusable = true}}, SHIFT(255), + [712] = {.entry = {.count = 1, .reusable = true}}, SHIFT(163), +}; + +enum ts_external_scanner_symbol_identifiers { + ts_external_token__start_tag_name = 0, + ts_external_token__script_start_tag_name = 1, + ts_external_token__style_start_tag_name = 2, + ts_external_token__end_tag_name = 3, + ts_external_token_erroneous_end_tag_name = 4, + ts_external_token_SLASH_GT = 5, + ts_external_token__implicit_end_tag = 6, + ts_external_token_raw_text = 7, + ts_external_token_comment = 8, + ts_external_token_raw_text_svelte = 9, + ts_external_token_raw_text_svelte_each = 10, + ts_external_token_AT = 11, + ts_external_token_POUND = 12, + ts_external_token_SLASH = 13, + ts_external_token_COLON = 14, +}; + +static const TSSymbol ts_external_scanner_symbol_map[EXTERNAL_TOKEN_COUNT] = { + [ts_external_token__start_tag_name] = sym__start_tag_name, + [ts_external_token__script_start_tag_name] = sym__script_start_tag_name, + [ts_external_token__style_start_tag_name] = sym__style_start_tag_name, + [ts_external_token__end_tag_name] = sym__end_tag_name, + [ts_external_token_erroneous_end_tag_name] = sym_erroneous_end_tag_name, + [ts_external_token_SLASH_GT] = anon_sym_SLASH_GT, + [ts_external_token__implicit_end_tag] = sym__implicit_end_tag, + [ts_external_token_raw_text] = sym_raw_text, + [ts_external_token_comment] = sym_comment, + [ts_external_token_raw_text_svelte] = sym_raw_text_svelte, + [ts_external_token_raw_text_svelte_each] = sym_raw_text_svelte_each, + [ts_external_token_AT] = anon_sym_AT, + [ts_external_token_POUND] = anon_sym_POUND, + [ts_external_token_SLASH] = anon_sym_SLASH, + [ts_external_token_COLON] = anon_sym_COLON, +}; + +static const bool ts_external_scanner_states[18][EXTERNAL_TOKEN_COUNT] = { + [1] = { + [ts_external_token__start_tag_name] = true, + [ts_external_token__script_start_tag_name] = true, + [ts_external_token__style_start_tag_name] = true, + [ts_external_token__end_tag_name] = true, + [ts_external_token_erroneous_end_tag_name] = true, + [ts_external_token_SLASH_GT] = true, + [ts_external_token__implicit_end_tag] = true, + [ts_external_token_raw_text] = true, + [ts_external_token_comment] = true, + [ts_external_token_raw_text_svelte] = true, + [ts_external_token_raw_text_svelte_each] = true, + [ts_external_token_AT] = true, + [ts_external_token_POUND] = true, + [ts_external_token_SLASH] = true, + [ts_external_token_COLON] = true, + }, + [2] = { + [ts_external_token_comment] = true, + }, + [3] = { + [ts_external_token__implicit_end_tag] = true, + [ts_external_token_comment] = true, + }, + [4] = { + [ts_external_token_SLASH_GT] = true, + [ts_external_token_comment] = true, + }, + [5] = { + [ts_external_token_comment] = true, + [ts_external_token_raw_text_svelte] = true, + [ts_external_token_AT] = true, + [ts_external_token_POUND] = true, + [ts_external_token_SLASH] = true, + [ts_external_token_COLON] = true, + }, + [6] = { + [ts_external_token_comment] = true, + [ts_external_token_raw_text_svelte] = true, + [ts_external_token_AT] = true, + [ts_external_token_POUND] = true, + [ts_external_token_SLASH] = true, + }, + [7] = { + [ts_external_token_comment] = true, + [ts_external_token_raw_text_svelte] = true, + [ts_external_token_AT] = true, + [ts_external_token_POUND] = true, + }, + [8] = { + [ts_external_token_raw_text] = true, + [ts_external_token_comment] = true, + }, + [9] = { + [ts_external_token_comment] = true, + [ts_external_token_raw_text_svelte] = true, + [ts_external_token_raw_text_svelte_each] = true, + }, + [10] = { + [ts_external_token__start_tag_name] = true, + [ts_external_token__script_start_tag_name] = true, + [ts_external_token__style_start_tag_name] = true, + [ts_external_token_comment] = true, + }, + [11] = { + [ts_external_token_comment] = true, + [ts_external_token_SLASH] = true, + [ts_external_token_COLON] = true, + }, + [12] = { + [ts_external_token__end_tag_name] = true, + [ts_external_token_erroneous_end_tag_name] = true, + [ts_external_token_comment] = true, + }, + [13] = { + [ts_external_token_comment] = true, + [ts_external_token_raw_text_svelte] = true, + }, + [14] = { + [ts_external_token__end_tag_name] = true, + [ts_external_token_comment] = true, + }, + [15] = { + [ts_external_token_comment] = true, + [ts_external_token_SLASH] = true, + }, + [16] = { + [ts_external_token_comment] = true, + [ts_external_token_COLON] = true, + }, + [17] = { + [ts_external_token_erroneous_end_tag_name] = true, + [ts_external_token_comment] = true, + }, +}; + +#ifdef __cplusplus +extern "C" { +#endif +void *tree_sitter_svelte_external_scanner_create(void); +void tree_sitter_svelte_external_scanner_destroy(void *); +bool tree_sitter_svelte_external_scanner_scan(void *, TSLexer *, const bool *); +unsigned tree_sitter_svelte_external_scanner_serialize(void *, char *); +void tree_sitter_svelte_external_scanner_deserialize(void *, const char *, unsigned); + +#ifdef _WIN32 +#define extern __declspec(dllexport) +#endif + +extern const TSLanguage *tree_sitter_svelte(void) { + static const TSLanguage language = { + .version = LANGUAGE_VERSION, + .symbol_count = SYMBOL_COUNT, + .alias_count = ALIAS_COUNT, + .token_count = TOKEN_COUNT, + .external_token_count = EXTERNAL_TOKEN_COUNT, + .state_count = STATE_COUNT, + .large_state_count = LARGE_STATE_COUNT, + .production_id_count = PRODUCTION_ID_COUNT, + .field_count = FIELD_COUNT, + .max_alias_sequence_length = MAX_ALIAS_SEQUENCE_LENGTH, + .parse_table = &ts_parse_table[0][0], + .small_parse_table = ts_small_parse_table, + .small_parse_table_map = ts_small_parse_table_map, + .parse_actions = ts_parse_actions, + .symbol_names = ts_symbol_names, + .symbol_metadata = ts_symbol_metadata, + .public_symbol_map = ts_symbol_map, + .alias_map = ts_non_terminal_alias_map, + .alias_sequences = &ts_alias_sequences[0][0], + .lex_modes = ts_lex_modes, + .lex_fn = ts_lex, + .external_scanner = { + &ts_external_scanner_states[0][0], + ts_external_scanner_symbol_map, + tree_sitter_svelte_external_scanner_create, + tree_sitter_svelte_external_scanner_destroy, + tree_sitter_svelte_external_scanner_scan, + tree_sitter_svelte_external_scanner_serialize, + tree_sitter_svelte_external_scanner_deserialize, + }, + .primary_state_ids = ts_primary_state_ids, + }; + return &language; +} +#ifdef __cplusplus +} +#endif diff --git a/src/scanner.c b/src/scanner.c new file mode 100644 index 0000000..a330cdd --- /dev/null +++ b/src/scanner.c @@ -0,0 +1,522 @@ +#include "tag.h" + +#include +#include + +enum TokenType { + START_TAG_NAME, + SCRIPT_START_TAG_NAME, + STYLE_START_TAG_NAME, + END_TAG_NAME, + ERRONEOUS_END_TAG_NAME, + SELF_CLOSING_TAG_DELIMITER, + IMPLICIT_END_TAG, + RAW_TEXT, + COMMENT, + RAW_TEXT_SVELTE, + RAW_TEXT_SVELTE_EACH, + AT, + HASH, + SLASH, + COLON, +}; + +typedef struct { + uint32_t len; + uint32_t cap; + Tag *data; +} tags_vec; + +typedef struct { + tags_vec tags; +} Scanner; + +#define MAX(a, b) ((a) > (b) ? (a) : (b)) + +#define VEC_RESIZE(vec, _cap) \ + if ((_cap) > (vec).cap && (_cap) > 0) { \ + void *tmp = realloc((vec).data, (_cap) * sizeof((vec).data[0])); \ + assert(tmp != NULL); \ + (vec).data = tmp; \ + (vec).cap = (_cap); \ + } + +#define VEC_GROW(vec, _cap) \ + if ((vec).cap < (_cap)) { \ + VEC_RESIZE((vec), (_cap)); \ + } + +#define VEC_PUSH(vec, el) \ + if ((vec).cap == (vec).len) { \ + VEC_RESIZE((vec), MAX(16, (vec).len * 2)); \ + } \ + (vec).data[(vec).len++] = (el); + +#define VEC_POP(vec) \ + { \ + if (VEC_BACK(vec).type == CUSTOM) { \ + tag_free(&VEC_BACK(vec)); \ + } \ + (vec).len--; \ + } + +#define VEC_BACK(vec) ((vec).data[(vec).len - 1]) + +#define VEC_FREE(vec) \ + { \ + if ((vec).data != NULL) \ + free((vec).data); \ + (vec).data = NULL; \ + } + +#define VEC_CLEAR(vec) \ + { \ + for (uint32_t i = 0; i < (vec).len; i++) { \ + tag_free(&(vec).data[i]); \ + } \ + (vec).len = 0; \ + } + +#define STRING_RESIZE(vec, _cap) \ + void *tmp = realloc((vec).data, ((_cap) + 1) * sizeof((vec).data[0])); \ + assert(tmp != NULL); \ + (vec).data = tmp; \ + memset((vec).data + (vec).len, 0, (((_cap) + 1) - (vec).len) * sizeof((vec).data[0])); \ + (vec).cap = (_cap); + +#define STRING_GROW(vec, _cap) \ + if ((vec).cap < (_cap)) { \ + STRING_RESIZE((vec), (_cap)); \ + } + +#define STRING_PUSH(vec, el) \ + if ((vec).cap == (vec).len) { \ + STRING_RESIZE((vec), MAX(16, (vec).len * 2)); \ + } \ + (vec).data[(vec).len++] = (el); + +#define STRING_INIT(vec) \ + { \ + (vec).data = calloc(1, sizeof(char) * 17); \ + (vec).len = 0; \ + (vec).cap = 16; \ + } + +#define STRING_FREE(vec) \ + { \ + if ((vec).data != NULL) \ + free((vec).data); \ + (vec).data = NULL; \ + } + +#define STRING_CLEAR(vec) \ + { \ + (vec).len = 0; \ + memset((vec).data, 0, (vec).cap * sizeof(char)); \ + } + +static inline void advance(TSLexer *lexer) { lexer->advance(lexer, false); } + +static inline void skip(TSLexer *lexer) { lexer->advance(lexer, true); } + +static unsigned serialize(Scanner *scanner, char *buffer) { + uint16_t tag_count = scanner->tags.len > UINT16_MAX ? UINT16_MAX : scanner->tags.len; + uint16_t serialized_tag_count = 0; + + unsigned size = sizeof(tag_count); + memcpy(&buffer[size], &tag_count, sizeof(tag_count)); + size += sizeof(tag_count); + + for (; serialized_tag_count < tag_count; serialized_tag_count++) { + Tag tag = scanner->tags.data[serialized_tag_count]; + if (tag.type == CUSTOM) { + unsigned name_length = tag.custom_tag_name.len; + if (name_length > UINT8_MAX) { + name_length = UINT8_MAX; + } + if (size + 2 + name_length >= TREE_SITTER_SERIALIZATION_BUFFER_SIZE) { + break; + } + buffer[size++] = (char)tag.type; + buffer[size++] = (char)name_length; + strncpy(&buffer[size], tag.custom_tag_name.data, name_length); + size += name_length; + } else { + if (size + 1 >= TREE_SITTER_SERIALIZATION_BUFFER_SIZE) { + break; + } + buffer[size++] = (char)tag.type; + } + } + + memcpy(&buffer[0], &serialized_tag_count, sizeof(serialized_tag_count)); + return size; +} + +static void deserialize(Scanner *scanner, const char *buffer, unsigned length) { + VEC_CLEAR(scanner->tags); + if (length > 0) { + unsigned size = 0; + uint16_t tag_count = 0; + uint16_t serialized_tag_count = 0; + + memcpy(&serialized_tag_count, &buffer[size], sizeof(serialized_tag_count)); + size += sizeof(serialized_tag_count); + + memcpy(&tag_count, &buffer[size], sizeof(tag_count)); + size += sizeof(tag_count); + + VEC_RESIZE(scanner->tags, tag_count); + if (tag_count > 0) { + unsigned iter = 0; + for (iter = 0; iter < serialized_tag_count; iter++) { + Tag tag = scanner->tags.data[iter]; + tag.type = (TagType)buffer[size++]; + if (tag.type == CUSTOM) { + uint16_t name_length = (uint8_t)buffer[size++]; + tag.custom_tag_name.len = name_length; + tag.custom_tag_name.cap = name_length; + tag.custom_tag_name.data = (char *)calloc(1, sizeof(char) * (name_length + 1)); + strncpy(tag.custom_tag_name.data, &buffer[size], name_length); + size += name_length; + } + VEC_PUSH(scanner->tags, tag); + } + // add zero tags if we didn't read enough, this is because the + // buffer had no more room but we held more tags. + for (; iter < tag_count; iter++) { + Tag tag = new_tag(); + VEC_PUSH(scanner->tags, tag); + } + } + } +} + +static String scan_tag_name(TSLexer *lexer) { + String tag_name; + STRING_INIT(tag_name); + while (iswalnum(lexer->lookahead) || lexer->lookahead == '-' || lexer->lookahead == ':') { + STRING_PUSH(tag_name, towupper(lexer->lookahead)); + advance(lexer); + } + return tag_name; +} + +static bool scan_comment(TSLexer *lexer) { + if (lexer->lookahead != '-') { + return false; + } + advance(lexer); + if (lexer->lookahead != '-') { + return false; + } + advance(lexer); + + unsigned dashes = 0; + while (lexer->lookahead) { + switch (lexer->lookahead) { + case '-': + ++dashes; + break; + case '>': + if (dashes >= 2) { + lexer->result_symbol = COMMENT; + advance(lexer); + lexer->mark_end(lexer); + return true; + } + dashes = 0; + break; + default: + dashes = 0; + } + advance(lexer); + } + return false; +} + +static bool scan_raw_text(Scanner *scanner, TSLexer *lexer) { + if (scanner->tags.len == 0) { + return false; + } + + lexer->mark_end(lexer); + + const char *end_delimiter = VEC_BACK(scanner->tags).type == SCRIPT ? "lookahead) { + if ((char)towupper(lexer->lookahead) == end_delimiter[delimiter_index]) { + delimiter_index++; + if (delimiter_index == strlen(end_delimiter)) { + break; + } + advance(lexer); + } else { + delimiter_index = 0; + advance(lexer); + lexer->mark_end(lexer); + } + } + + lexer->result_symbol = RAW_TEXT; + return true; +} + +static bool scan_raw_text_svelte(TSLexer *lexer, const bool *valid_symbols) { + while (iswspace(lexer->lookahead)) { + skip(lexer); + } + + if ((lexer->lookahead == '@' && valid_symbols[AT]) || (lexer->lookahead == '#' && valid_symbols[HASH]) || + (lexer->lookahead == ':' && valid_symbols[COLON])) { + return false; + } + + bool advanced_once = false; + + if (lexer->lookahead == '/' && valid_symbols[SLASH]) { + advance(lexer); + if (lexer->lookahead != '/') { // JavaScript comment + return false; + } + + advanced_once = true; + } + + lexer->result_symbol = valid_symbols[RAW_TEXT_SVELTE_EACH] ? RAW_TEXT_SVELTE_EACH : RAW_TEXT_SVELTE; + + uint8_t brace_level = 0; + + while (!lexer->eof(lexer)) { + switch (lexer->lookahead) { + case '}': + if (brace_level == 0) { + lexer->mark_end(lexer); + return advanced_once; + } + advance(lexer); + brace_level--; + advanced_once = true; + break; + + case '{': + advance(lexer); + brace_level++; + advanced_once = true; + break; + + case 'a': + if (lexer->result_symbol == RAW_TEXT_SVELTE_EACH) { + lexer->mark_end(lexer); + advance(lexer); + advanced_once = true; + if (lexer->lookahead == 's') { + advance(lexer); + if (iswspace(lexer->lookahead)) { + return advanced_once; + } + } + } else { + advance(lexer); + advanced_once = true; + } + break; + + default: + advance(lexer); + advanced_once = true; + break; + } + } + + return false; +} + +static bool scan_implicit_end_tag(Scanner *scanner, TSLexer *lexer) { + Tag *parent = scanner->tags.len == 0 ? NULL : &VEC_BACK(scanner->tags); + + bool is_closing_tag = false; + if (lexer->lookahead == '/') { + is_closing_tag = true; + advance(lexer); + } else { + if (parent && is_void(parent)) { + VEC_POP(scanner->tags); + lexer->result_symbol = IMPLICIT_END_TAG; + return true; + } + } + + String tag_name = scan_tag_name(lexer); + if (tag_name.len == 0) { + STRING_FREE(tag_name); + return false; + } + + Tag next_tag = for_name(tag_name.data); + + if (is_closing_tag) { + // The tag correctly closes the topmost element on the stack + if (scanner->tags.len > 0 && tagcmp(&VEC_BACK(scanner->tags), &next_tag)) { + STRING_FREE(tag_name); + tag_free(&next_tag); + return false; + } + + // Otherwise, dig deeper and queue implicit end tags (to be nice in + // the case of malformed svelte) + for (unsigned i = scanner->tags.len; i > 0; i--) { + if (scanner->tags.data[i - 1].type == next_tag.type) { + VEC_POP(scanner->tags); + lexer->result_symbol = IMPLICIT_END_TAG; + STRING_FREE(tag_name); + tag_free(&next_tag); + return true; + } + } + } else if (parent && !can_contain(parent, &next_tag)) { + VEC_POP(scanner->tags); + lexer->result_symbol = IMPLICIT_END_TAG; + STRING_FREE(tag_name); + tag_free(&next_tag); + return true; + } + + STRING_FREE(tag_name); + tag_free(&next_tag); + return false; +} + +static bool scan_start_tag_name(Scanner *scanner, TSLexer *lexer) { + String tag_name = scan_tag_name(lexer); + if (tag_name.len == 0) { + STRING_FREE(tag_name); + return false; + } + Tag tag = for_name(tag_name.data); + VEC_PUSH(scanner->tags, tag); + switch (tag.type) { + case SCRIPT: + lexer->result_symbol = SCRIPT_START_TAG_NAME; + break; + case STYLE: + lexer->result_symbol = STYLE_START_TAG_NAME; + break; + default: + lexer->result_symbol = START_TAG_NAME; + break; + } + STRING_FREE(tag_name); + return true; +} + +static bool scan_end_tag_name(Scanner *scanner, TSLexer *lexer) { + String tag_name = scan_tag_name(lexer); + if (tag_name.len == 0) { + STRING_FREE(tag_name); + return false; + } + Tag tag = for_name(tag_name.data); + if (scanner->tags.len > 0 && tagcmp(&VEC_BACK(scanner->tags), &tag)) { + VEC_POP(scanner->tags); + lexer->result_symbol = END_TAG_NAME; + } else { + lexer->result_symbol = ERRONEOUS_END_TAG_NAME; + } + tag_free(&tag); + STRING_FREE(tag_name); + return true; +} + +static bool scan_self_closing_tag_delimiter(Scanner *scanner, TSLexer *lexer) { + advance(lexer); + if (lexer->lookahead == '>') { + advance(lexer); + if (scanner->tags.len > 0) { + VEC_POP(scanner->tags); + lexer->result_symbol = SELF_CLOSING_TAG_DELIMITER; + } + return true; + } + return false; +} + +static bool scan(Scanner *scanner, TSLexer *lexer, const bool *valid_symbols) { + if (valid_symbols[RAW_TEXT] && !valid_symbols[START_TAG_NAME] && !valid_symbols[END_TAG_NAME]) { + return scan_raw_text(scanner, lexer); + } + + if (valid_symbols[RAW_TEXT_SVELTE] || valid_symbols[RAW_TEXT_SVELTE_EACH]) { + return scan_raw_text_svelte(lexer, valid_symbols); + } + + while (iswspace(lexer->lookahead)) { + skip(lexer); + } + + switch (lexer->lookahead) { + case '<': + lexer->mark_end(lexer); + advance(lexer); + + if (lexer->lookahead == '!') { + advance(lexer); + return scan_comment(lexer); + } + + if (valid_symbols[IMPLICIT_END_TAG]) { + return scan_implicit_end_tag(scanner, lexer); + } + break; + + case '\0': + if (valid_symbols[IMPLICIT_END_TAG]) { + return scan_implicit_end_tag(scanner, lexer); + } + break; + + case '/': + if (valid_symbols[SELF_CLOSING_TAG_DELIMITER]) { + return scan_self_closing_tag_delimiter(scanner, lexer); + } + break; + + default: + if ((valid_symbols[START_TAG_NAME] || valid_symbols[END_TAG_NAME]) && !valid_symbols[RAW_TEXT]) { + return valid_symbols[START_TAG_NAME] ? scan_start_tag_name(scanner, lexer) + : scan_end_tag_name(scanner, lexer); + } + } + + return false; +} + +void *tree_sitter_svelte_external_scanner_create() { + Scanner *scanner = (Scanner *)calloc(1, sizeof(Scanner)); + return scanner; +} + +bool tree_sitter_svelte_external_scanner_scan(void *payload, TSLexer *lexer, const bool *valid_symbols) { + Scanner *scanner = (Scanner *)payload; + return scan(scanner, lexer, valid_symbols); +} + +unsigned tree_sitter_svelte_external_scanner_serialize(void *payload, char *buffer) { + Scanner *scanner = (Scanner *)payload; + return serialize(scanner, buffer); +} + +void tree_sitter_svelte_external_scanner_deserialize(void *payload, const char *buffer, unsigned length) { + Scanner *scanner = (Scanner *)payload; + deserialize(scanner, buffer, length); +} + +void tree_sitter_svelte_external_scanner_destroy(void *payload) { + Scanner *scanner = (Scanner *)payload; + for (unsigned i = 0; i < scanner->tags.len; i++) { + STRING_FREE(scanner->tags.data[i].custom_tag_name); + } + VEC_FREE(scanner->tags); + free(scanner); +} diff --git a/src/tag.h b/src/tag.h new file mode 100644 index 0000000..637d889 --- /dev/null +++ b/src/tag.h @@ -0,0 +1,375 @@ +#include "tree_sitter/parser.h" + +#include +#include + +typedef enum { + AREA, + BASE, + BASEFONT, + BGSOUND, + BR, + COL, + COMMAND, + EMBED, + FRAME, + HR, + IMAGE, + IMG, + INPUT, + ISINDEX, + KEYGEN, + LINK, + MENUITEM, + META, + NEXTID, + PARAM, + SOURCE, + TRACK, + WBR, + END_OF_VOID_TAGS, + + A, + ABBR, + ADDRESS, + ARTICLE, + ASIDE, + AUDIO, + B, + BDI, + BDO, + BLOCKQUOTE, + BODY, + BUTTON, + CANVAS, + CAPTION, + CITE, + CODE, + COLGROUP, + DATA, + DATALIST, + DD, + DEL, + DETAILS, + DFN, + DIALOG, + DIV, + DL, + DT, + EM, + FIELDSET, + FIGCAPTION, + FIGURE, + FOOTER, + FORM, + H1, + H2, + H3, + H4, + H5, + H6, + HEAD, + HEADER, + HGROUP, + HTML, + I, + IFRAME, + INS, + KBD, + LABEL, + LEGEND, + LI, + MAIN, + MAP, + MARK, + MATH, + MENU, + METER, + NAV, + NOSCRIPT, + OBJECT, + OL, + OPTGROUP, + OPTION, + OUTPUT, + P, + PICTURE, + PRE, + PROGRESS, + Q, + RB, + RP, + RT, + RTC, + RUBY, + S, + SAMP, + SCRIPT, + SECTION, + SELECT, + SLOT, + SMALL, + SPAN, + STRONG, + STYLE, + SUB, + SUMMARY, + SUP, + SVG, + TABLE, + TBODY, + TD, + TEMPLATE, + TEXTAREA, + TFOOT, + TH, + THEAD, + TIME, + TITLE, + TR, + U, + UL, + VAR, + VIDEO, + + CUSTOM, + + END_, +} TagType; + +typedef struct { + uint32_t len; + uint32_t cap; + char *data; +} String; + +typedef struct { + char tag_name[16]; + TagType tag_value; +} TagMap; + +typedef struct { + TagType type; + String custom_tag_name; +} Tag; + +const TagMap TAG_TYPES_BY_TAG_NAME[126] = { + {"AREA", AREA }, + {"BASE", BASE }, + {"BASEFONT", BASEFONT }, + {"BGSOUND", BGSOUND }, + {"BR", BR }, + {"COL", COL }, + {"COMMAND", COMMAND }, + {"EMBED", EMBED }, + {"FRAME", FRAME }, + {"HR", HR }, + {"IMAGE", IMAGE }, + {"IMG", IMG }, + {"INPUT", INPUT }, + {"ISINDEX", ISINDEX }, + {"KEYGEN", KEYGEN }, + {"LINK", LINK }, + {"MENUITEM", MENUITEM }, + {"META", META }, + {"NEXTID", NEXTID }, + {"PARAM", PARAM }, + {"SOURCE", SOURCE }, + {"TRACK", TRACK }, + {"WBR", WBR }, + {"A", A }, + {"ABBR", ABBR }, + {"ADDRESS", ADDRESS }, + {"ARTICLE", ARTICLE }, + {"ASIDE", ASIDE }, + {"AUDIO", AUDIO }, + {"B", B }, + {"BDI", BDI }, + {"BDO", BDO }, + {"BLOCKQUOTE", BLOCKQUOTE}, + {"BODY", BODY }, + {"BUTTON", BUTTON }, + {"CANVAS", CANVAS }, + {"CAPTION", CAPTION }, + {"CITE", CITE }, + {"CODE", CODE }, + {"COLGROUP", COLGROUP }, + {"DATA", DATA }, + {"DATALIST", DATALIST }, + {"DD", DD }, + {"DEL", DEL }, + {"DETAILS", DETAILS }, + {"DFN", DFN }, + {"DIALOG", DIALOG }, + {"DIV", DIV }, + {"DL", DL }, + {"DT", DT }, + {"EM", EM }, + {"FIELDSET", FIELDSET }, + {"FIGCAPTION", FIGCAPTION}, + {"FIGURE", FIGURE }, + {"FOOTER", FOOTER }, + {"FORM", FORM }, + {"H1", H1 }, + {"H2", H2 }, + {"H3", H3 }, + {"H4", H4 }, + {"H5", H5 }, + {"H6", H6 }, + {"HEAD", HEAD }, + {"HEADER", HEADER }, + {"HGROUP", HGROUP }, + {"HTML", HTML }, + {"I", I }, + {"IFRAME", IFRAME }, + {"INS", INS }, + {"KBD", KBD }, + {"LABEL", LABEL }, + {"LEGEND", LEGEND }, + {"LI", LI }, + {"MAIN", MAIN }, + {"MAP", MAP }, + {"MARK", MARK }, + {"MATH", MATH }, + {"MENU", MENU }, + {"METER", METER }, + {"NAV", NAV }, + {"NOSCRIPT", NOSCRIPT }, + {"OBJECT", OBJECT }, + {"OL", OL }, + {"OPTGROUP", OPTGROUP }, + {"OPTION", OPTION }, + {"OUTPUT", OUTPUT }, + {"P", P }, + {"PICTURE", PICTURE }, + {"PRE", PRE }, + {"PROGRESS", PROGRESS }, + {"Q", Q }, + {"RB", RB }, + {"RP", RP }, + {"RT", RT }, + {"RTC", RTC }, + {"RUBY", RUBY }, + {"S", S }, + {"SAMP", SAMP }, + {"SCRIPT", SCRIPT }, + {"SECTION", SECTION }, + {"SELECT", SELECT }, + {"SLOT", SLOT }, + {"SMALL", SMALL }, + {"SPAN", SPAN }, + {"STRONG", STRONG }, + {"STYLE", STYLE }, + {"SUB", SUB }, + {"SUMMARY", SUMMARY }, + {"SUP", SUP }, + {"SVG", SVG }, + {"TABLE", TABLE }, + {"TBODY", TBODY }, + {"TD", TD }, + {"TEMPLATE", TEMPLATE }, + {"TEXTAREA", TEXTAREA }, + {"TFOOT", TFOOT }, + {"TH", TH }, + {"THEAD", THEAD }, + {"TIME", TIME }, + {"TITLE", TITLE }, + {"TR", TR }, + {"U", U }, + {"UL", UL }, + {"VAR", VAR }, + {"VIDEO", VIDEO }, + {"CUSTOM", CUSTOM }, +}; + +static const TagType TAG_TYPES_NOT_ALLOWED_IN_PARAGRAPHS[] = { + ADDRESS, ARTICLE, ASIDE, BLOCKQUOTE, DETAILS, DIV, DL, FIELDSET, FIGCAPTION, FIGURE, FOOTER, FORM, H1, + H2, H3, H4, H5, H6, HEADER, HR, MAIN, NAV, OL, P, PRE, SECTION, +}; + +static TagType get_tag_from_string(const char *tag_name) { + for (int i = 0; i < 126; i++) { + if (strcmp(TAG_TYPES_BY_TAG_NAME[i].tag_name, tag_name) == 0) { + return TAG_TYPES_BY_TAG_NAME[i].tag_value; + } + } + return CUSTOM; +} + +static inline Tag new_tag() { + Tag tag; + tag.type = END_; + tag.custom_tag_name.data = NULL; + tag.custom_tag_name.len = 0; + tag.custom_tag_name.cap = 0; + return tag; +} + +static Tag make_tag(TagType type, const char *name) { + Tag tag = new_tag(); + tag.type = type; + if (type == CUSTOM) { + tag.custom_tag_name.len = (uint32_t)strlen(name); + tag.custom_tag_name.data = (char *)calloc(1, sizeof(char) * (tag.custom_tag_name.len + 1)); + strncpy(tag.custom_tag_name.data, name, tag.custom_tag_name.len); + } + return tag; +} + +static inline void tag_free(Tag *tag) { + if (tag->type == CUSTOM) { + free(tag->custom_tag_name.data); + } + tag->custom_tag_name.data = NULL; +} + +static inline bool is_void(const Tag *tag) { return tag->type < END_OF_VOID_TAGS; } + +static inline Tag for_name(const char *name) { return make_tag(get_tag_from_string(name), name); } + +static inline bool tagcmp(const Tag *_tag1, const Tag *_tag2) { + return _tag1->type == _tag2->type && + (_tag1->type == CUSTOM ? strcmp(_tag1->custom_tag_name.data, _tag2->custom_tag_name.data) == 0 : true); +} + +static bool can_contain(Tag *self, const Tag *other) { + TagType child = other->type; + + switch (self->type) { + case LI: + return child != LI; + + case DT: + case DD: + return child != DT && child != DD; + + case P: + for (int i = 0; i < 26; i++) { + if (child == TAG_TYPES_NOT_ALLOWED_IN_PARAGRAPHS[i]) { + return false; + } + } + return true; + + case COLGROUP: + return child == COL; + + case RB: + case RT: + case RP: + return child != RB && child != RT && child != RP; + + case OPTGROUP: + return child != OPTGROUP; + + case TR: + return child != TR; + + case TD: + case TH: + return child != TD && child != TH && child != TR; + + default: + return true; + } +} diff --git a/src/tree_sitter/parser.h b/src/tree_sitter/parser.h new file mode 100644 index 0000000..17b4fde --- /dev/null +++ b/src/tree_sitter/parser.h @@ -0,0 +1,230 @@ +#ifndef TREE_SITTER_PARSER_H_ +#define TREE_SITTER_PARSER_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#include + +#define ts_builtin_sym_error ((TSSymbol)-1) +#define ts_builtin_sym_end 0 +#define TREE_SITTER_SERIALIZATION_BUFFER_SIZE 1024 + +#ifndef TREE_SITTER_API_H_ +typedef uint16_t TSStateId; +typedef uint16_t TSSymbol; +typedef uint16_t TSFieldId; +typedef struct TSLanguage TSLanguage; +#endif + +typedef struct { + TSFieldId field_id; + uint8_t child_index; + bool inherited; +} TSFieldMapEntry; + +typedef struct { + uint16_t index; + uint16_t length; +} TSFieldMapSlice; + +typedef struct { + bool visible; + bool named; + bool supertype; +} TSSymbolMetadata; + +typedef struct TSLexer TSLexer; + +struct TSLexer { + int32_t lookahead; + TSSymbol result_symbol; + void (*advance)(TSLexer *, bool); + void (*mark_end)(TSLexer *); + uint32_t (*get_column)(TSLexer *); + bool (*is_at_included_range_start)(const TSLexer *); + bool (*eof)(const TSLexer *); +}; + +typedef enum { + TSParseActionTypeShift, + TSParseActionTypeReduce, + TSParseActionTypeAccept, + TSParseActionTypeRecover, +} TSParseActionType; + +typedef union { + struct { + uint8_t type; + TSStateId state; + bool extra; + bool repetition; + } shift; + struct { + uint8_t type; + uint8_t child_count; + TSSymbol symbol; + int16_t dynamic_precedence; + uint16_t production_id; + } reduce; + uint8_t type; +} TSParseAction; + +typedef struct { + uint16_t lex_state; + uint16_t external_lex_state; +} TSLexMode; + +typedef union { + TSParseAction action; + struct { + uint8_t count; + bool reusable; + } entry; +} TSParseActionEntry; + +struct TSLanguage { + uint32_t version; + uint32_t symbol_count; + uint32_t alias_count; + uint32_t token_count; + uint32_t external_token_count; + uint32_t state_count; + uint32_t large_state_count; + uint32_t production_id_count; + uint32_t field_count; + uint16_t max_alias_sequence_length; + const uint16_t *parse_table; + const uint16_t *small_parse_table; + const uint32_t *small_parse_table_map; + const TSParseActionEntry *parse_actions; + const char * const *symbol_names; + const char * const *field_names; + const TSFieldMapSlice *field_map_slices; + const TSFieldMapEntry *field_map_entries; + const TSSymbolMetadata *symbol_metadata; + const TSSymbol *public_symbol_map; + const uint16_t *alias_map; + const TSSymbol *alias_sequences; + const TSLexMode *lex_modes; + bool (*lex_fn)(TSLexer *, TSStateId); + bool (*keyword_lex_fn)(TSLexer *, TSStateId); + TSSymbol keyword_capture_token; + struct { + const bool *states; + const TSSymbol *symbol_map; + void *(*create)(void); + void (*destroy)(void *); + bool (*scan)(void *, TSLexer *, const bool *symbol_whitelist); + unsigned (*serialize)(void *, char *); + void (*deserialize)(void *, const char *, unsigned); + } external_scanner; + const TSStateId *primary_state_ids; +}; + +/* + * Lexer Macros + */ + +#ifdef _MSC_VER +#define UNUSED __pragma(warning(suppress : 4101)) +#else +#define UNUSED __attribute__((unused)) +#endif + +#define START_LEXER() \ + bool result = false; \ + bool skip = false; \ + UNUSED \ + bool eof = false; \ + int32_t lookahead; \ + goto start; \ + next_state: \ + lexer->advance(lexer, skip); \ + start: \ + skip = false; \ + lookahead = lexer->lookahead; + +#define ADVANCE(state_value) \ + { \ + state = state_value; \ + goto next_state; \ + } + +#define SKIP(state_value) \ + { \ + skip = true; \ + state = state_value; \ + goto next_state; \ + } + +#define ACCEPT_TOKEN(symbol_value) \ + result = true; \ + lexer->result_symbol = symbol_value; \ + lexer->mark_end(lexer); + +#define END_STATE() return result; + +/* + * Parse Table Macros + */ + +#define SMALL_STATE(id) ((id) - LARGE_STATE_COUNT) + +#define STATE(id) id + +#define ACTIONS(id) id + +#define SHIFT(state_value) \ + {{ \ + .shift = { \ + .type = TSParseActionTypeShift, \ + .state = (state_value) \ + } \ + }} + +#define SHIFT_REPEAT(state_value) \ + {{ \ + .shift = { \ + .type = TSParseActionTypeShift, \ + .state = (state_value), \ + .repetition = true \ + } \ + }} + +#define SHIFT_EXTRA() \ + {{ \ + .shift = { \ + .type = TSParseActionTypeShift, \ + .extra = true \ + } \ + }} + +#define REDUCE(symbol_val, child_count_val, ...) \ + {{ \ + .reduce = { \ + .type = TSParseActionTypeReduce, \ + .symbol = symbol_val, \ + .child_count = child_count_val, \ + __VA_ARGS__ \ + }, \ + }} + +#define RECOVER() \ + {{ \ + .type = TSParseActionTypeRecover \ + }} + +#define ACCEPT_INPUT() \ + {{ \ + .type = TSParseActionTypeAccept \ + }} + +#ifdef __cplusplus +} +#endif + +#endif // TREE_SITTER_PARSER_H_ diff --git a/test/corpus/html/main.txt b/test/corpus/html/main.txt new file mode 100644 index 0000000..d9e6016 --- /dev/null +++ b/test/corpus/html/main.txt @@ -0,0 +1,488 @@ +=================================== +Tags +=================================== +Hello +--- + +(document + (element + (start_tag + (tag_name)) + (text) + (end_tag + (tag_name)))) + +=================================== +Tags with attributes +=================================== + +--- + +(document + (element + (start_tag + (tag_name) + (attribute + (attribute_name) + (attribute_value)) + (attribute + (attribute_name) + (quoted_attribute_value + (attribute_value))) + (attribute + (attribute_name))) + (end_tag + (tag_name)))) + +=================================== +Nested tags +=================================== +
+ a + b + c + Multi-line + text +
+--- + +(document + (element + (start_tag + (tag_name)) + (element + (start_tag + (tag_name)) + (text) + (end_tag + (tag_name))) + (text) + (element + (start_tag + (tag_name)) + (text) + (end_tag + (tag_name))) + (text) + (end_tag + (tag_name)))) + +================================== +Void tags +================================== +

+--- + +(document + (element + (start_tag + (tag_name)) + (element + (start_tag + (tag_name) + (attribute + (attribute_name) + (quoted_attribute_value + (attribute_value))))) + (element + (start_tag + (tag_name))) + (element + (self_closing_tag + (tag_name) + (attribute + (attribute_name) + (attribute_value)) + (attribute + (attribute_name) + (attribute_value)))) + (end_tag + (tag_name)))) + +================================== +Void tags at EOF +================================== + +--- + +(document + (element + (start_tag + (tag_name) + (attribute + (attribute_name) + (quoted_attribute_value + (attribute_value)))))) + +================================== +Custom tags +================================== + + + Hello + + +--- + +(document + (element + (start_tag + (tag_name)) + (element + (start_tag + (tag_name) + (attribute + (attribute_name))) + (text) + (end_tag + (tag_name))) + (end_tag + (tag_name)))) + +================================== +Comments +================================== + + +
+ +
+--- + +(document + (comment) + (comment) + (element + (start_tag + (tag_name)) + (comment) + (end_tag + (tag_name)))) + +================================== +Raw text elements +================================== + + + + + + +--- + +(document + (script_element + (start_tag + (tag_name)) + (raw_text) + (end_tag + (tag_name))) + (style_element + (start_tag + (tag_name)) + (raw_text) + (end_tag + (tag_name))) + (script_element + (start_tag + (tag_name)) + (raw_text) + (end_tag + (tag_name)))) + +================================== +LI elements without close tags +================================== +
    +
  • One +
  • Two +
+--- + +(document + (element + (start_tag + (tag_name)) + (element + (start_tag + (tag_name)) + (text)) + (element + (start_tag + (tag_name)) + (text)) + (end_tag + (tag_name)))) + +====================================== +DT and DL elements without close tags +====================================== +
+
Coffee +
Café +
Black hot drink +
Milk +
White cold drink +
+--- + +(document + (element + (start_tag + (tag_name)) + (element + (start_tag + (tag_name)) + (text)) + (element + (start_tag + (tag_name)) + (text)) + (element + (start_tag + (tag_name)) + (text)) + (element + (start_tag + (tag_name)) + (text)) + (element + (start_tag + (tag_name)) + (text)) + (end_tag + (tag_name)))) + +====================================== +P elements without close tags +====================================== +

One +

Two
+

Three +

Four +

Five

+--- + +(document + (element + (start_tag + (tag_name)) + (text)) + (element + (start_tag + (tag_name)) + (text) + (end_tag + (tag_name))) + (element + (start_tag + (tag_name)) + (text)) + (element + (start_tag + (tag_name)) + (text)) + (element + (start_tag + (tag_name)) + (text) + (end_tag + (tag_name)))) + +====================================== +Ruby annotation elements without close tags +====================================== +とうきょう +--- + +(document + (element + (start_tag + (tag_name)) + (text) + (element + (start_tag + (tag_name)) + (text)) + (element + (start_tag + (tag_name)) + (text)) + (element + (start_tag + (tag_name)) + (text)) + (end_tag + (tag_name)))) + +======================================= +COLGROUP elements without end tags +======================================= + + + + + + + + + +
LimeLemonOrange
+--- + +(document + (element + (start_tag + (tag_name)) + (element + (start_tag + (tag_name)) + (element + (start_tag + (tag_name) + (attribute + (attribute_name) + (quoted_attribute_value + (attribute_value))))) + (element + (start_tag + (tag_name) + (attribute + (attribute_name) + (quoted_attribute_value + (attribute_value)))))) + (element + (start_tag + (tag_name)) + (element + (start_tag + (tag_name)) + (text) + (end_tag + (tag_name))) + (element + (start_tag + (tag_name)) + (text) + (end_tag + (tag_name))) + (element + (start_tag + (tag_name)) + (text) + (end_tag + (tag_name))) + (end_tag + (tag_name))) + (end_tag + (tag_name)))) + +========================================= +TR, TD, and TH elements without end tags +========================================= + + + +
One + Two +
Three + Four +
+--- + +(document + (element + (start_tag + (tag_name)) + (element + (start_tag + (tag_name)) + (element + (start_tag + (tag_name)) + (text)) + (element + (start_tag + (tag_name)) + (text))) + (element + (start_tag + (tag_name)) + (element + (start_tag + (tag_name)) + (text)) + (element + (start_tag + (tag_name)) + (text))) + (end_tag + (tag_name)))) + +============================== +Named entities in tag contents +============================== + +

Lorem ipsum   dolor sit © amet.

+--- + +(document + (element + (start_tag + (tag_name)) + (text) + (entity) + (text) + (entity) + (text) + (end_tag + (tag_name)))) + +================================ +Numeric entities in tag contents +================================ + +

Lorem ipsum   dolor sit — amet.

+--- + +(document + (element + (start_tag + (tag_name)) + (text) + (entity) + (text) + (entity) + (text) + (end_tag + (tag_name)))) + +================================= +Multiple entities in tag contents +================================= + +

Lorem ipsum   dolor   sit   amet.

+--- + +(document + (element + (start_tag + (tag_name)) + (text) + (entity) + (text) + (entity) + (text) + (entity) + (text) + (end_tag + (tag_name))))