├── queries ├── injections.scm └── highlights.scm ├── .gitignore ├── binding.gyp ├── .github └── workflows │ └── ci.yml ├── bindings ├── node │ ├── index.js │ └── binding.cc └── rust │ ├── build.rs │ └── lib.rs ├── Cargo.toml ├── package.json ├── LICENSE ├── README.md ├── corpus ├── tags.txt ├── variables.txt ├── attributes-complex.txt ├── attributes.txt └── attributes-variables.txt ├── grammar.js └── src ├── tree_sitter └── parser.h ├── node-types.json ├── grammar.json └── parser.c /queries/injections.scm: -------------------------------------------------------------------------------- 1 | (markdown) @markdown 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | Cargo.lock 2 | node_modules 3 | build 4 | *.log 5 | /target/ 6 | -------------------------------------------------------------------------------- /binding.gyp: -------------------------------------------------------------------------------- 1 | { 2 | "targets": [ 3 | { 4 | "target_name": "tree_sitter_markdoc_binding", 5 | "include_dirs": [ 6 | " (https://mohitsingh.in/)", 12 | "license": "MIT", 13 | "dependencies": { 14 | "nan": "^2.17.0" 15 | }, 16 | "devDependencies": { 17 | "tree-sitter-cli": "^0.20.7" 18 | }, 19 | "tree-sitter": [ 20 | { 21 | "scope": "text.markdoc", 22 | "file-types": [ 23 | "markdoc" 24 | ], 25 | "injection-regex": "markdoc" 26 | } 27 | ] 28 | } 29 | -------------------------------------------------------------------------------- /bindings/node/binding.cc: -------------------------------------------------------------------------------- 1 | #include "tree_sitter/parser.h" 2 | #include 3 | #include "nan.h" 4 | 5 | using namespace v8; 6 | 7 | extern "C" TSLanguage * tree_sitter_markdoc(); 8 | 9 | namespace { 10 | 11 | NAN_METHOD(New) {} 12 | 13 | void Init(Local exports, Local module) { 14 | Local tpl = Nan::New(New); 15 | tpl->SetClassName(Nan::New("Language").ToLocalChecked()); 16 | tpl->InstanceTemplate()->SetInternalFieldCount(1); 17 | 18 | Local constructor = Nan::GetFunction(tpl).ToLocalChecked(); 19 | Local instance = constructor->NewInstance(Nan::GetCurrentContext()).ToLocalChecked(); 20 | Nan::SetInternalFieldPointer(instance, 0, tree_sitter_markdoc()); 21 | 22 | Nan::Set(instance, Nan::New("name").ToLocalChecked(), Nan::New("markdoc").ToLocalChecked()); 23 | Nan::Set(module, Nan::New("exports").ToLocalChecked(), instance); 24 | } 25 | 26 | NODE_MODULE(tree_sitter_markdoc_binding, Init) 27 | 28 | } // namespace 29 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2023 Mohit Singh 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /bindings/rust/build.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | let src_dir = std::path::Path::new("src"); 3 | 4 | let mut c_config = cc::Build::new(); 5 | c_config.include(&src_dir); 6 | c_config 7 | .flag_if_supported("-Wno-unused-parameter") 8 | .flag_if_supported("-Wno-unused-but-set-variable") 9 | .flag_if_supported("-Wno-trigraphs"); 10 | let parser_path = src_dir.join("parser.c"); 11 | c_config.file(&parser_path); 12 | 13 | // If your language uses an external scanner written in C, 14 | // then include this block of code: 15 | 16 | /* 17 | let scanner_path = src_dir.join("scanner.c"); 18 | c_config.file(&scanner_path); 19 | println!("cargo:rerun-if-changed={}", scanner_path.to_str().unwrap()); 20 | */ 21 | 22 | c_config.compile("parser"); 23 | println!("cargo:rerun-if-changed={}", parser_path.to_str().unwrap()); 24 | 25 | // If your language uses an external scanner written in C++, 26 | // then include this block of code: 27 | 28 | /* 29 | let mut cpp_config = cc::Build::new(); 30 | cpp_config.cpp(true); 31 | cpp_config.include(&src_dir); 32 | cpp_config 33 | .flag_if_supported("-Wno-unused-parameter") 34 | .flag_if_supported("-Wno-unused-but-set-variable"); 35 | let scanner_path = src_dir.join("scanner.cc"); 36 | cpp_config.file(&scanner_path); 37 | cpp_config.compile("scanner"); 38 | println!("cargo:rerun-if-changed={}", scanner_path.to_str().unwrap()); 39 | */ 40 | } 41 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

tree-sitter-markdoc

2 |

3 | 4 | CI 5 | 6 | 7 | LICENSE 8 | 9 |

10 |

11 | Markdoc grammar for tree-sitter
12 |

13 | 14 |
15 | 16 | ## Using with Neovim 17 | 18 | 1. Define a new filetype for markdoc. 19 | 20 | ```lua 21 | vim.filetype.add({ 22 | extension = { 23 | mdoc = "markdoc", 24 | }, 25 | }) 26 | ``` 27 | 28 | 2. Add markdoc parser config in nvim-treesitter. 29 | 30 | ```lua 31 | local parser_config = require("nvim-treesitter.parsers").get_parser_configs() 32 | parser_config.markdoc = { 33 | install_info = { 34 | url = "https://github.com/mohitsinghs/tree-sitter-markdoc", 35 | files = { "src/parser.c" }, 36 | branch = "main", 37 | }, 38 | filetype = "markdoc", 39 | } 40 | ``` 41 | 42 | 3. Copy queries to `~/.config/nvim/queries/markdoc`. 43 | 44 | 4. Run `:TSInstall markdoc` 45 | 46 | #### References 47 | 48 | - [Markdoc](https://github.com/markdoc/markdoc) 49 | - [Markdoc Spec](https://markdoc.dev/spec) 50 | -------------------------------------------------------------------------------- /bindings/rust/lib.rs: -------------------------------------------------------------------------------- 1 | //! This crate provides markdoc language support for the [tree-sitter][] parsing library. 2 | //! 3 | //! Typically, you will use the [language][language func] function to add this language to a 4 | //! tree-sitter [Parser][], and then use the parser to parse some code: 5 | //! 6 | //! ``` 7 | //! let code = ""; 8 | //! let mut parser = tree_sitter::Parser::new(); 9 | //! parser.set_language(tree_sitter_markdoc::language()).expect("Error loading markdoc grammar"); 10 | //! let tree = parser.parse(code, None).unwrap(); 11 | //! ``` 12 | //! 13 | //! [Language]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Language.html 14 | //! [language func]: fn.language.html 15 | //! [Parser]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Parser.html 16 | //! [tree-sitter]: https://tree-sitter.github.io/ 17 | 18 | use tree_sitter::Language; 19 | 20 | extern "C" { 21 | fn tree_sitter_markdoc() -> Language; 22 | } 23 | 24 | /// Get the tree-sitter [Language][] for this grammar. 25 | /// 26 | /// [Language]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Language.html 27 | pub fn language() -> Language { 28 | unsafe { tree_sitter_markdoc() } 29 | } 30 | 31 | /// The content of the [`node-types.json`][] file for this grammar. 32 | /// 33 | /// [`node-types.json`]: https://tree-sitter.github.io/tree-sitter/using-parsers#static-node-types 34 | pub const NODE_TYPES: &'static str = include_str!("../../src/node-types.json"); 35 | 36 | // Uncomment these to include any queries that this grammar contains 37 | 38 | // pub const HIGHLIGHTS_QUERY: &'static str = include_str!("../../queries/highlights.scm"); 39 | // pub const INJECTIONS_QUERY: &'static str = include_str!("../../queries/injections.scm"); 40 | // pub const LOCALS_QUERY: &'static str = include_str!("../../queries/locals.scm"); 41 | // pub const TAGS_QUERY: &'static str = include_str!("../../queries/tags.scm"); 42 | 43 | #[cfg(test)] 44 | mod tests { 45 | #[test] 46 | fn test_can_load_grammar() { 47 | let mut parser = tree_sitter::Parser::new(); 48 | parser 49 | .set_language(super::language()) 50 | .expect("Error loading markdoc language"); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /corpus/tags.txt: -------------------------------------------------------------------------------- 1 | ================== 2 | Simple opening tag 3 | ================== 4 | {% foo %} 5 | --- 6 | 7 | (content 8 | (tag 9 | (tag_start) 10 | (tag_interior 11 | (tag_open 12 | (identifier))) 13 | (tag_end))) 14 | 15 | =========================== 16 | Opening tag with attributes 17 | =========================== 18 | {% foo foo=1 bar=true %} 19 | --- 20 | 21 | (content 22 | (tag 23 | (tag_start) 24 | (tag_interior 25 | (tag_open 26 | (identifier) 27 | (attribute 28 | (identifier) 29 | (value 30 | (primitive 31 | (number)))) 32 | (attribute 33 | (identifier) 34 | (value 35 | (primitive 36 | (boolean)))))) 37 | (tag_end))) 38 | 39 | ================ 40 | Self closing tag 41 | ================ 42 | {% foo /%} 43 | --- 44 | 45 | (content 46 | (tag 47 | (tag_start) 48 | (tag_interior 49 | (tag_self_closing 50 | (tag_open 51 | (identifier)))) 52 | (tag_end))) 53 | 54 | ================================ 55 | Self closing tag with attributes 56 | ================================ 57 | {% foo foo=1 bar=true /%} 58 | --- 59 | 60 | (content 61 | (tag 62 | (tag_start) 63 | (tag_interior 64 | (tag_self_closing 65 | (tag_open 66 | (identifier) 67 | (attribute 68 | (identifier) 69 | (value 70 | (primitive 71 | (number)))) 72 | (attribute 73 | (identifier) 74 | (value 75 | (primitive 76 | (boolean))))))) 77 | (tag_end))) 78 | 79 | 80 | =========== 81 | Closing tag 82 | =========== 83 | {% /foo %} 84 | --- 85 | 86 | (content 87 | (tag 88 | (tag_start) 89 | (tag_interior 90 | (tag_close 91 | (identifier))) 92 | (tag_end))) 93 | 94 | 95 | =================== 96 | Invalid closing tag 97 | =================== 98 | {% /foo/ %} 99 | --- 100 | 101 | (content 102 | (tag 103 | (tag_start) 104 | (tag_interior 105 | (tag_close 106 | (identifier))) 107 | (ERROR) 108 | (tag_end))) 109 | 110 | =================================== 111 | Invalid closing tag with attributes 112 | =================================== 113 | {% /foo test=1 %} 114 | --- 115 | 116 | (content 117 | (annotation 118 | (tag_start) 119 | (ERROR 120 | (tag_interior 121 | (tag_close 122 | (identifier)))) 123 | (attribute 124 | (identifier) 125 | (value 126 | (primitive 127 | (number)))) 128 | (tag_end))) 129 | -------------------------------------------------------------------------------- /corpus/variables.txt: -------------------------------------------------------------------------------- 1 | =============== 2 | Simple variable 3 | =============== 4 | {% $foo %} 5 | --- 6 | 7 | (content 8 | (interpolation 9 | (tag_start) 10 | (variable 11 | (variable_sigil) 12 | (identifier)) 13 | (tag_end))) 14 | 15 | ======================== 16 | Multiple levels of depth 17 | ======================== 18 | {% $foo.bar.baz %} 19 | --- 20 | 21 | (content 22 | (interpolation 23 | (tag_start) 24 | (variable 25 | (variable_sigil) 26 | (identifier) 27 | (variable_tail 28 | (identifier)) 29 | (variable_tail 30 | (identifier))) 31 | (tag_end))) 32 | 33 | =========== 34 | Array index 35 | =========== 36 | {% $foo[1] %} 37 | --- 38 | 39 | (content 40 | (interpolation 41 | (tag_start) 42 | (variable 43 | (variable_sigil) 44 | (identifier) 45 | (variable_tail 46 | (variable_segment_value 47 | (number)))) 48 | (tag_end))) 49 | 50 | ====================== 51 | Multiple array indexes 52 | ====================== 53 | {% $foo[1][2] %} 54 | --- 55 | 56 | (content 57 | (interpolation 58 | (tag_start) 59 | (variable 60 | (variable_sigil) 61 | (identifier) 62 | (variable_tail 63 | (variable_segment_value 64 | (number))) 65 | (variable_tail 66 | (variable_segment_value 67 | (number)))) 68 | (tag_end))) 69 | 70 | ============================ 71 | Array indexes and properties 72 | ============================ 73 | {% $foo[1].bar.baz[2].test %} 74 | --- 75 | 76 | (content 77 | (interpolation 78 | (tag_start) 79 | (variable 80 | (variable_sigil) 81 | (identifier) 82 | (variable_tail 83 | (variable_segment_value 84 | (number))) 85 | (variable_tail 86 | (identifier)) 87 | (variable_tail 88 | (identifier)) 89 | (variable_tail 90 | (variable_segment_value 91 | (number))) 92 | (variable_tail 93 | (identifier))) 94 | (tag_end))) 95 | 96 | =================== 97 | Invalid array index 98 | =================== 99 | {% $foo[asdf] %} 100 | --- 101 | 102 | (content 103 | (interpolation 104 | (tag_start) 105 | (variable 106 | (variable_sigil) 107 | (identifier) 108 | (variable_tail 109 | (variable_segment_value 110 | (variable 111 | (variable_sigil 112 | (MISSING "$")) 113 | (identifier))))) 114 | (tag_end))) 115 | 116 | ================= 117 | Invalid namespace 118 | ================= 119 | {% $.foo:bar.baz %} 120 | --- 121 | 122 | (content 123 | (annotation 124 | (tag_start) 125 | (ERROR 126 | (variable_sigil)) 127 | (attribute 128 | (identifier)) 129 | (ERROR 130 | (identifier)) 131 | (attribute 132 | (identifier)) 133 | (tag_end))) 134 | 135 | -------------------------------------------------------------------------------- /corpus/attributes-complex.txt: -------------------------------------------------------------------------------- 1 | =============== 2 | Simple variable 3 | =============== 4 | {% test=$foo %} 5 | --- 6 | 7 | (content 8 | (annotation 9 | (tag_start) 10 | (attribute 11 | (identifier) 12 | (value 13 | (variable 14 | (variable_sigil) 15 | (identifier)))) 16 | (tag_end))) 17 | 18 | ======================== 19 | Multiple levels of depth 20 | ======================== 21 | {% test=$foo.bar.baz %} 22 | --- 23 | 24 | (content 25 | (annotation 26 | (tag_start) 27 | (attribute 28 | (identifier) 29 | (value 30 | (variable 31 | (variable_sigil) 32 | (identifier) 33 | (variable_tail 34 | (identifier)) 35 | (variable_tail 36 | (identifier))))) 37 | (tag_end))) 38 | 39 | =========== 40 | Array index 41 | =========== 42 | {% test=$foo[1] %} 43 | --- 44 | 45 | (content 46 | (annotation 47 | (tag_start) 48 | (attribute 49 | (identifier) 50 | (value 51 | (variable 52 | (variable_sigil) 53 | (identifier) 54 | (variable_tail 55 | (variable_segment_value 56 | (number)))))) 57 | (tag_end))) 58 | 59 | ====================== 60 | Multiple array indexes 61 | ====================== 62 | {% test=$foo[1][2] %} 63 | --- 64 | 65 | (content 66 | (annotation 67 | (tag_start) 68 | (attribute 69 | (identifier) 70 | (value 71 | (variable 72 | (variable_sigil) 73 | (identifier) 74 | (variable_tail 75 | (variable_segment_value 76 | (number))) 77 | (variable_tail 78 | (variable_segment_value 79 | (number)))))) 80 | (tag_end))) 81 | 82 | ============================ 83 | Array indexes and properties 84 | ============================ 85 | {% test=$foo[1].bar.baz[2].test %} 86 | --- 87 | 88 | (content 89 | (annotation 90 | (tag_start) 91 | (attribute 92 | (identifier) 93 | (value 94 | (variable 95 | (variable_sigil) 96 | (identifier) 97 | (variable_tail 98 | (variable_segment_value 99 | (number))) 100 | (variable_tail 101 | (identifier)) 102 | (variable_tail 103 | (identifier)) 104 | (variable_tail 105 | (variable_segment_value 106 | (number))) 107 | (variable_tail 108 | (identifier))))) 109 | (tag_end))) 110 | 111 | =================== 112 | Invalid array index 113 | =================== 114 | {% test=$foo[asdf] %} 115 | --- 116 | 117 | (content 118 | (annotation 119 | (tag_start) 120 | (attribute 121 | (identifier) 122 | (value 123 | (variable 124 | (variable_sigil) 125 | (identifier) 126 | (variable_tail 127 | (variable_segment_value 128 | (variable 129 | (variable_sigil 130 | (MISSING "$")) 131 | (identifier))))))) 132 | (tag_end))) -------------------------------------------------------------------------------- /corpus/attributes.txt: -------------------------------------------------------------------------------- 1 | ================ 2 | Single attribute 3 | ================ 4 | {% test=1 %} 5 | --- 6 | 7 | (content 8 | (annotation 9 | (tag_start) 10 | (attribute 11 | (identifier) 12 | (value 13 | (primitive 14 | (number)))) 15 | (tag_end))) 16 | 17 | ========= 18 | Single Id 19 | ========= 20 | {% #test %} 21 | --- 22 | 23 | (content 24 | (annotation 25 | (tag_start) 26 | (attribute 27 | (identifier)) 28 | (tag_end))) 29 | 30 | ======= 31 | Hyphens 32 | ======= 33 | {% #test-1 .foo-bar %} 34 | --- 35 | 36 | (content 37 | (annotation 38 | (tag_start) 39 | (attribute 40 | (identifier)) 41 | (attribute 42 | (identifier)) 43 | (tag_end))) 44 | 45 | =============== 46 | Chained classes 47 | =============== 48 | {% .foo .bar %} 49 | --- 50 | 51 | (content 52 | (annotation 53 | (tag_start) 54 | (attribute 55 | (identifier)) 56 | (attribute 57 | (identifier)) 58 | (tag_end))) 59 | 60 | ====================== 61 | Chained id and classes 62 | ====================== 63 | {% #test-1 .foo .bar %} 64 | --- 65 | 66 | (content 67 | (annotation 68 | (tag_start) 69 | (attribute 70 | (identifier)) 71 | (attribute 72 | (identifier)) 73 | (attribute 74 | (identifier)) 75 | (tag_end))) 76 | 77 | ========== 78 | Invalid id 79 | ========== 80 | {% #foo@bar.baz@test %} 81 | --- 82 | 83 | (content 84 | (annotation 85 | (tag_start) 86 | (attribute 87 | (identifier)) 88 | (ERROR 89 | (identifier)) 90 | (attribute 91 | (identifier)) 92 | (ERROR 93 | (identifier)) 94 | (tag_end))) 95 | 96 | =============== 97 | Key/value pairs 98 | =============== 99 | {% foo="bar" baz=3 test=true %} 100 | --- 101 | 102 | (content 103 | (annotation 104 | (tag_start) 105 | (attribute 106 | (identifier) 107 | (value 108 | (primitive 109 | (string)))) 110 | (attribute 111 | (identifier) 112 | (value 113 | (primitive 114 | (number)))) 115 | (attribute 116 | (identifier) 117 | (value 118 | (primitive 119 | (boolean)))) 120 | (tag_end))) 121 | 122 | ============================= 123 | Shortcuts and key/value pairs 124 | ============================= 125 | {% #foo .bar test="asdf" %} 126 | --- 127 | 128 | (content 129 | (annotation 130 | (tag_start) 131 | (attribute 132 | (identifier)) 133 | (attribute 134 | (identifier)) 135 | (attribute 136 | (identifier) 137 | (value 138 | (primitive 139 | (string)))) 140 | (tag_end))) 141 | 142 | ======================= 143 | Boolean key/value pairs 144 | ======================= 145 | {% test=true foo=false bar=true %} 146 | --- 147 | 148 | (content 149 | (annotation 150 | (tag_start) 151 | (attribute 152 | (identifier) 153 | (value 154 | (primitive 155 | (boolean)))) 156 | (attribute 157 | (identifier) 158 | (value 159 | (primitive 160 | (boolean)))) 161 | (attribute 162 | (identifier) 163 | (value 164 | (primitive 165 | (boolean)))) 166 | (tag_end))) 167 | 168 | =================== 169 | Null key/value pair 170 | =================== 171 | {% foo=null %} 172 | --- 173 | 174 | (content 175 | (annotation 176 | (tag_start) 177 | (attribute 178 | (identifier) 179 | (value 180 | (primitive 181 | (null)))) 182 | (tag_end))) -------------------------------------------------------------------------------- /grammar.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-undef */ 2 | module.exports = grammar({ 3 | name: 'markdoc', 4 | word: ($) => $.identifier, 5 | conflicts: ($) => [[$.tag_start, $.interpolation, $.annotation]], 6 | rules: { 7 | content: ($) => 8 | repeat(choice($.tag, $.interpolation, $.annotation, $.markdown)), 9 | markdown: ($) => prec.right(token(repeat1(/[^\s{][^{]*/))), 10 | 11 | // tags 12 | tag: ($) => seq($.tag_start, optional($._space), $.tag_interior, $.tag_end), 13 | tag_start: ($) => '{%', 14 | tag_end: ($) => '%}', 15 | tag_interior: ($) => choice($.tag_open, $.tag_self_closing, $.tag_close), 16 | tag_open: ($) => 17 | seq( 18 | field('tag_name', $.identifier), 19 | optional(seq($._space, $.value)), 20 | repeat(seq($._space, $.attribute)), 21 | optional($._space) 22 | ), 23 | tag_self_closing: ($) => seq($.tag_open, '/'), 24 | tag_close: ($) => seq('/', field('tag_name', $.identifier)), 25 | 26 | // attributes 27 | attribute: ($) => choice($._attribute_full, $._attribute_shorthand), 28 | _attribute_full: ($) => seq(field('key', $.identifier), '=', $.value), 29 | _attribute_shorthand: ($) => 30 | field('shorthand', seq($._shorthand_sigil, $.identifier)), 31 | _shorthand_sigil: ($) => choice('.', '#'), 32 | 33 | // annotations 34 | annotation: ($) => 35 | seq( 36 | $.tag_start, 37 | repeat1(seq(optional($._space), $.attribute)), 38 | optional($._space), 39 | $.tag_end 40 | ), 41 | 42 | // interpolation 43 | interpolation: ($) => 44 | seq( 45 | $.tag_start, 46 | repeat1(seq($._space, choice($.function, $.variable))), 47 | optional($._space), 48 | $.tag_end 49 | ), 50 | interpolation_value: ($) => choice($.function, $.variable), 51 | 52 | // values 53 | value: ($) => choice($.primitive, $.compound, $.variable, $.function), 54 | 55 | // primitives 56 | primitive: ($) => choice($.null, $.boolean, $.number, $.string), 57 | null: ($) => 'null', 58 | boolean: ($) => choice('true', 'false'), 59 | number: ($) => { 60 | const digit = /\d+/ 61 | return token(seq(optional('-'), digit, optional(seq('.', digit)))) 62 | }, 63 | 64 | // string 65 | string: ($) => seq('"', repeat($._string_element), '"'), 66 | _string_element: ($) => 67 | choice($._string_character, $._string_escape_sequence), 68 | _string_character: ($) => token.immediate(prec(1, /[^"\\]/)), 69 | _string_escape_sequence: ($) => 70 | token.immediate(seq('\\', choice('n', 'r', 't', '\\', '"'))), 71 | 72 | // compound 73 | compound: ($) => choice($.array, $.hash), 74 | 75 | // array 76 | array: ($) => 77 | seq( 78 | '[', 79 | repeat($._array_item), 80 | optional($._array_item_with_optional_comma), 81 | ']' 82 | ), 83 | _array_item: ($) => prec(1, seq($.value, ',')), 84 | _array_item_with_optional_comma: ($) => seq($.value, optional(',')), 85 | 86 | // hash 87 | hash: ($) => 88 | seq( 89 | '{', 90 | repeat($._hash_item), 91 | optional($._hash_item_with_optional_comma), 92 | '}' 93 | ), 94 | _hash_item: ($) => prec(1, seq($._hash_key_value, ',')), 95 | _hash_key_value: ($) => seq($.hash_key, ':', $.value), 96 | _hash_item_with_optional_comma: ($) => 97 | seq($._hash_key_value, optional(',')), 98 | hash_key: ($) => choice(field('key', $.identifier), $.string), 99 | 100 | // variable 101 | variable: ($) => 102 | prec.right( 103 | seq( 104 | $.variable_sigil, 105 | field('variable', $.identifier), 106 | repeat($.variable_tail) 107 | ) 108 | ), 109 | variable_tail: ($) => 110 | choice( 111 | seq('.', field('property', $.identifier)), 112 | seq('[', $.variable_segment_value, ']') 113 | ), 114 | variable_segment_value: ($) => choice($.number, $.string, $.variable), 115 | variable_sigil: ($) => choice('$', '@'), 116 | 117 | // function 118 | function: ($) => 119 | prec.right( 120 | 1, 121 | seq( 122 | field('function_name', $.identifier), 123 | '(', 124 | repeat($.function_parameters), 125 | ')' 126 | ) 127 | ), 128 | function_parameters: ($) => seq($.value, repeat($.function_parameter_tail)), 129 | function_parameter_tail: ($) => seq(',', $.function_parameter), 130 | function_parameter: ($) => choice($.function_parameter_named, $.value), 131 | function_parameter_named: ($) => 132 | seq(field('parameter', $.identifier), '=', $.value), 133 | 134 | // identifier 135 | identifier: ($) => { 136 | const identifierTail = /[-\w]/ 137 | return token(seq(/[a-zA-Z]/, repeat(identifierTail))) 138 | }, 139 | _space: ($) => repeat1(choice('\t', ' ', '\n')), 140 | }, 141 | }) 142 | -------------------------------------------------------------------------------- /src/tree_sitter/parser.h: -------------------------------------------------------------------------------- 1 | #ifndef TREE_SITTER_PARSER_H_ 2 | #define TREE_SITTER_PARSER_H_ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | #define ts_builtin_sym_error ((TSSymbol)-1) 13 | #define ts_builtin_sym_end 0 14 | #define TREE_SITTER_SERIALIZATION_BUFFER_SIZE 1024 15 | 16 | typedef uint16_t TSStateId; 17 | 18 | #ifndef TREE_SITTER_API_H_ 19 | typedef uint16_t TSSymbol; 20 | typedef uint16_t TSFieldId; 21 | typedef struct TSLanguage TSLanguage; 22 | #endif 23 | 24 | typedef struct { 25 | TSFieldId field_id; 26 | uint8_t child_index; 27 | bool inherited; 28 | } TSFieldMapEntry; 29 | 30 | typedef struct { 31 | uint16_t index; 32 | uint16_t length; 33 | } TSFieldMapSlice; 34 | 35 | typedef struct { 36 | bool visible; 37 | bool named; 38 | bool supertype; 39 | } TSSymbolMetadata; 40 | 41 | typedef struct TSLexer TSLexer; 42 | 43 | struct TSLexer { 44 | int32_t lookahead; 45 | TSSymbol result_symbol; 46 | void (*advance)(TSLexer *, bool); 47 | void (*mark_end)(TSLexer *); 48 | uint32_t (*get_column)(TSLexer *); 49 | bool (*is_at_included_range_start)(const TSLexer *); 50 | bool (*eof)(const TSLexer *); 51 | }; 52 | 53 | typedef enum { 54 | TSParseActionTypeShift, 55 | TSParseActionTypeReduce, 56 | TSParseActionTypeAccept, 57 | TSParseActionTypeRecover, 58 | } TSParseActionType; 59 | 60 | typedef union { 61 | struct { 62 | uint8_t type; 63 | TSStateId state; 64 | bool extra; 65 | bool repetition; 66 | } shift; 67 | struct { 68 | uint8_t type; 69 | uint8_t child_count; 70 | TSSymbol symbol; 71 | int16_t dynamic_precedence; 72 | uint16_t production_id; 73 | } reduce; 74 | uint8_t type; 75 | } TSParseAction; 76 | 77 | typedef struct { 78 | uint16_t lex_state; 79 | uint16_t external_lex_state; 80 | } TSLexMode; 81 | 82 | typedef union { 83 | TSParseAction action; 84 | struct { 85 | uint8_t count; 86 | bool reusable; 87 | } entry; 88 | } TSParseActionEntry; 89 | 90 | struct TSLanguage { 91 | uint32_t version; 92 | uint32_t symbol_count; 93 | uint32_t alias_count; 94 | uint32_t token_count; 95 | uint32_t external_token_count; 96 | uint32_t state_count; 97 | uint32_t large_state_count; 98 | uint32_t production_id_count; 99 | uint32_t field_count; 100 | uint16_t max_alias_sequence_length; 101 | const uint16_t *parse_table; 102 | const uint16_t *small_parse_table; 103 | const uint32_t *small_parse_table_map; 104 | const TSParseActionEntry *parse_actions; 105 | const char * const *symbol_names; 106 | const char * const *field_names; 107 | const TSFieldMapSlice *field_map_slices; 108 | const TSFieldMapEntry *field_map_entries; 109 | const TSSymbolMetadata *symbol_metadata; 110 | const TSSymbol *public_symbol_map; 111 | const uint16_t *alias_map; 112 | const TSSymbol *alias_sequences; 113 | const TSLexMode *lex_modes; 114 | bool (*lex_fn)(TSLexer *, TSStateId); 115 | bool (*keyword_lex_fn)(TSLexer *, TSStateId); 116 | TSSymbol keyword_capture_token; 117 | struct { 118 | const bool *states; 119 | const TSSymbol *symbol_map; 120 | void *(*create)(void); 121 | void (*destroy)(void *); 122 | bool (*scan)(void *, TSLexer *, const bool *symbol_whitelist); 123 | unsigned (*serialize)(void *, char *); 124 | void (*deserialize)(void *, const char *, unsigned); 125 | } external_scanner; 126 | const TSStateId *primary_state_ids; 127 | }; 128 | 129 | /* 130 | * Lexer Macros 131 | */ 132 | 133 | #define START_LEXER() \ 134 | bool result = false; \ 135 | bool skip = false; \ 136 | bool eof = false; \ 137 | int32_t lookahead; \ 138 | goto start; \ 139 | next_state: \ 140 | lexer->advance(lexer, skip); \ 141 | start: \ 142 | skip = false; \ 143 | lookahead = lexer->lookahead; 144 | 145 | #define ADVANCE(state_value) \ 146 | { \ 147 | state = state_value; \ 148 | goto next_state; \ 149 | } 150 | 151 | #define SKIP(state_value) \ 152 | { \ 153 | skip = true; \ 154 | state = state_value; \ 155 | goto next_state; \ 156 | } 157 | 158 | #define ACCEPT_TOKEN(symbol_value) \ 159 | result = true; \ 160 | lexer->result_symbol = symbol_value; \ 161 | lexer->mark_end(lexer); 162 | 163 | #define END_STATE() return result; 164 | 165 | /* 166 | * Parse Table Macros 167 | */ 168 | 169 | #define SMALL_STATE(id) id - LARGE_STATE_COUNT 170 | 171 | #define STATE(id) id 172 | 173 | #define ACTIONS(id) id 174 | 175 | #define SHIFT(state_value) \ 176 | {{ \ 177 | .shift = { \ 178 | .type = TSParseActionTypeShift, \ 179 | .state = state_value \ 180 | } \ 181 | }} 182 | 183 | #define SHIFT_REPEAT(state_value) \ 184 | {{ \ 185 | .shift = { \ 186 | .type = TSParseActionTypeShift, \ 187 | .state = state_value, \ 188 | .repetition = true \ 189 | } \ 190 | }} 191 | 192 | #define SHIFT_EXTRA() \ 193 | {{ \ 194 | .shift = { \ 195 | .type = TSParseActionTypeShift, \ 196 | .extra = true \ 197 | } \ 198 | }} 199 | 200 | #define REDUCE(symbol_val, child_count_val, ...) \ 201 | {{ \ 202 | .reduce = { \ 203 | .type = TSParseActionTypeReduce, \ 204 | .symbol = symbol_val, \ 205 | .child_count = child_count_val, \ 206 | __VA_ARGS__ \ 207 | }, \ 208 | }} 209 | 210 | #define RECOVER() \ 211 | {{ \ 212 | .type = TSParseActionTypeRecover \ 213 | }} 214 | 215 | #define ACCEPT_INPUT() \ 216 | {{ \ 217 | .type = TSParseActionTypeAccept \ 218 | }} 219 | 220 | #ifdef __cplusplus 221 | } 222 | #endif 223 | 224 | #endif // TREE_SITTER_PARSER_H_ 225 | -------------------------------------------------------------------------------- /corpus/attributes-variables.txt: -------------------------------------------------------------------------------- 1 | ========================= 2 | Simple hash literal value 3 | ========================= 4 | {% foo={bar: true} %} 5 | --- 6 | 7 | (content 8 | (annotation 9 | (tag_start) 10 | (attribute 11 | (identifier) 12 | (value 13 | (compound 14 | (hash 15 | (hash_key 16 | (identifier)) 17 | (value 18 | (primitive 19 | (boolean))))))) 20 | (tag_end))) 21 | 22 | ========================= 23 | Nested hash literal value 24 | ========================= 25 | {% foo={bar: true, baz: {test: "this is a test"}} %} 26 | {% foo={bar:true,baz:{test:"this is a test"}} %} 27 | --- 28 | 29 | (content 30 | (annotation 31 | (tag_start) 32 | (attribute 33 | (identifier) 34 | (value 35 | (compound 36 | (hash 37 | (hash_key 38 | (identifier)) 39 | (value 40 | (primitive 41 | (boolean))) 42 | (hash_key 43 | (identifier)) 44 | (value 45 | (compound 46 | (hash 47 | (hash_key 48 | (identifier)) 49 | (value 50 | (primitive 51 | (string)))))))))) 52 | (tag_end)) 53 | (annotation 54 | (tag_start) 55 | (attribute 56 | (identifier) 57 | (value 58 | (compound 59 | (hash 60 | (hash_key 61 | (identifier)) 62 | (value 63 | (primitive 64 | (boolean))) 65 | (hash_key 66 | (identifier)) 67 | (value 68 | (compound 69 | (hash 70 | (hash_key 71 | (identifier)) 72 | (value 73 | (primitive 74 | (string)))))))))) 75 | (tag_end))) 76 | 77 | ================================ 78 | Hash literal that has string key 79 | ================================ 80 | {% foo={bar: true, "baz": 1} %} 81 | --- 82 | 83 | (content 84 | (annotation 85 | (tag_start) 86 | (attribute 87 | (identifier) 88 | (value 89 | (compound 90 | (hash 91 | (hash_key 92 | (identifier)) 93 | (value 94 | (primitive 95 | (boolean))) 96 | (hash_key 97 | (string)) 98 | (value 99 | (primitive 100 | (number))))))) 101 | (tag_end))) 102 | 103 | =========================== 104 | Multiple hash literal value 105 | =========================== 106 | {% foo={bar: true} baz={test: "testing"} %} 107 | --- 108 | 109 | (content 110 | (annotation 111 | (tag_start) 112 | (attribute 113 | (identifier) 114 | (value 115 | (compound 116 | (hash 117 | (hash_key 118 | (identifier)) 119 | (value 120 | (primitive 121 | (boolean))))))) 122 | (attribute 123 | (identifier) 124 | (value 125 | (compound 126 | (hash 127 | (hash_key 128 | (identifier)) 129 | (value 130 | (primitive 131 | (string))))))) 132 | (tag_end))) 133 | 134 | =================== 135 | Array literal value 136 | =================== 137 | {% foo=[1, 2, 3] %} 138 | {% foo=[1,2,3] %} 139 | --- 140 | 141 | (content 142 | (annotation 143 | (tag_start) 144 | (attribute 145 | (identifier) 146 | (value 147 | (compound 148 | (array 149 | (value 150 | (primitive 151 | (number))) 152 | (value 153 | (primitive 154 | (number))) 155 | (value 156 | (primitive 157 | (number))))))) 158 | (tag_end)) 159 | (annotation 160 | (tag_start) 161 | (attribute 162 | (identifier) 163 | (value 164 | (compound 165 | (array 166 | (value 167 | (primitive 168 | (number))) 169 | (value 170 | (primitive 171 | (number))) 172 | (value 173 | (primitive 174 | (number))))))) 175 | (tag_end))) 176 | 177 | =========================== 178 | Nested array literal values 179 | =========================== 180 | {% foo=[1, 2, ["test", true, null]] %} 181 | {% foo=[1,2,["test",true,null]] %} 182 | --- 183 | 184 | (content 185 | (annotation 186 | (tag_start) 187 | (attribute 188 | (identifier) 189 | (value 190 | (compound 191 | (array 192 | (value 193 | (primitive 194 | (number))) 195 | (value 196 | (primitive 197 | (number))) 198 | (value 199 | (compound 200 | (array 201 | (value 202 | (primitive 203 | (string))) 204 | (value 205 | (primitive 206 | (boolean))) 207 | (value 208 | (primitive 209 | (null)))))))))) 210 | (tag_end)) 211 | (annotation 212 | (tag_start) 213 | (attribute 214 | (identifier) 215 | (value 216 | (compound 217 | (array 218 | (value 219 | (primitive 220 | (number))) 221 | (value 222 | (primitive 223 | (number))) 224 | (value 225 | (compound 226 | (array 227 | (value 228 | (primitive 229 | (string))) 230 | (value 231 | (primitive 232 | (boolean))) 233 | (value 234 | (primitive 235 | (null)))))))))) 236 | (tag_end))) 237 | 238 | ==================================== 239 | Multiple nested array literal values 240 | ==================================== 241 | {% foo=[1, 2, ["test", true, null]] bar=["baz"] %} 242 | --- 243 | 244 | (content 245 | (annotation 246 | (tag_start) 247 | (attribute 248 | (identifier) 249 | (value 250 | (compound 251 | (array 252 | (value 253 | (primitive 254 | (number))) 255 | (value 256 | (primitive 257 | (number))) 258 | (value 259 | (compound 260 | (array 261 | (value 262 | (primitive 263 | (string))) 264 | (value 265 | (primitive 266 | (boolean))) 267 | (value 268 | (primitive 269 | (null)))))))))) 270 | (attribute 271 | (identifier) 272 | (value 273 | (compound 274 | (array 275 | (value 276 | (primitive 277 | (string))))))) 278 | (tag_end))) 279 | 280 | ========================= 281 | Array and object literals 282 | ========================= 283 | {% foo=[1, 2, {bar: "baz", test: [1, 2, 3]}] %} 284 | --- 285 | 286 | (content 287 | (annotation 288 | (tag_start) 289 | (attribute 290 | (identifier) 291 | (value 292 | (compound 293 | (array 294 | (value 295 | (primitive 296 | (number))) 297 | (value 298 | (primitive 299 | (number))) 300 | (value 301 | (compound 302 | (hash 303 | (hash_key 304 | (identifier)) 305 | (value 306 | (primitive 307 | (string))) 308 | (hash_key 309 | (identifier)) 310 | (value 311 | (compound 312 | (array 313 | (value 314 | (primitive 315 | (number))) 316 | (value 317 | (primitive 318 | (number))) 319 | (value 320 | (primitive 321 | (number))))))))))))) 322 | (tag_end))) 323 | 324 | ============= 325 | Invalid value 326 | ============= 327 | {% 'foo=bar' %} 328 | {% 'foo=a1' %} 329 | {% 'foo=1a' %} 330 | --- 331 | (content 332 | (tag 333 | (tag_start) 334 | (ERROR 335 | (UNEXPECTED ''')) 336 | (tag_interior 337 | (tag_open 338 | (identifier) 339 | (ERROR 340 | (identifier) 341 | (UNEXPECTED ''')))) 342 | (tag_end)) 343 | (tag 344 | (tag_start) 345 | (ERROR 346 | (UNEXPECTED ''')) 347 | (tag_interior 348 | (tag_open 349 | (identifier) 350 | (ERROR 351 | (identifier) 352 | (UNEXPECTED ''')))) 353 | (tag_end)) 354 | (annotation 355 | (tag_start) 356 | (ERROR 357 | (UNEXPECTED ''')) 358 | (attribute 359 | (identifier) 360 | (value 361 | (primitive 362 | (number)))) 363 | (ERROR 364 | (identifier) 365 | (UNEXPECTED ''')) 366 | (tag_end))) -------------------------------------------------------------------------------- /src/node-types.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "annotation", 4 | "named": true, 5 | "fields": {}, 6 | "children": { 7 | "multiple": true, 8 | "required": true, 9 | "types": [ 10 | { 11 | "type": "attribute", 12 | "named": true 13 | }, 14 | { 15 | "type": "tag_end", 16 | "named": true 17 | }, 18 | { 19 | "type": "tag_start", 20 | "named": true 21 | } 22 | ] 23 | } 24 | }, 25 | { 26 | "type": "array", 27 | "named": true, 28 | "fields": {}, 29 | "children": { 30 | "multiple": true, 31 | "required": false, 32 | "types": [ 33 | { 34 | "type": "value", 35 | "named": true 36 | } 37 | ] 38 | } 39 | }, 40 | { 41 | "type": "attribute", 42 | "named": true, 43 | "fields": { 44 | "key": { 45 | "multiple": false, 46 | "required": false, 47 | "types": [ 48 | { 49 | "type": "identifier", 50 | "named": true 51 | } 52 | ] 53 | }, 54 | "shorthand": { 55 | "multiple": true, 56 | "required": false, 57 | "types": [ 58 | { 59 | "type": "#", 60 | "named": false 61 | }, 62 | { 63 | "type": ".", 64 | "named": false 65 | }, 66 | { 67 | "type": "identifier", 68 | "named": true 69 | } 70 | ] 71 | } 72 | }, 73 | "children": { 74 | "multiple": false, 75 | "required": false, 76 | "types": [ 77 | { 78 | "type": "value", 79 | "named": true 80 | } 81 | ] 82 | } 83 | }, 84 | { 85 | "type": "boolean", 86 | "named": true, 87 | "fields": {} 88 | }, 89 | { 90 | "type": "compound", 91 | "named": true, 92 | "fields": {}, 93 | "children": { 94 | "multiple": false, 95 | "required": true, 96 | "types": [ 97 | { 98 | "type": "array", 99 | "named": true 100 | }, 101 | { 102 | "type": "hash", 103 | "named": true 104 | } 105 | ] 106 | } 107 | }, 108 | { 109 | "type": "content", 110 | "named": true, 111 | "fields": {}, 112 | "children": { 113 | "multiple": true, 114 | "required": false, 115 | "types": [ 116 | { 117 | "type": "annotation", 118 | "named": true 119 | }, 120 | { 121 | "type": "interpolation", 122 | "named": true 123 | }, 124 | { 125 | "type": "markdown", 126 | "named": true 127 | }, 128 | { 129 | "type": "tag", 130 | "named": true 131 | } 132 | ] 133 | } 134 | }, 135 | { 136 | "type": "function", 137 | "named": true, 138 | "fields": { 139 | "function_name": { 140 | "multiple": false, 141 | "required": true, 142 | "types": [ 143 | { 144 | "type": "identifier", 145 | "named": true 146 | } 147 | ] 148 | } 149 | }, 150 | "children": { 151 | "multiple": true, 152 | "required": false, 153 | "types": [ 154 | { 155 | "type": "function_parameters", 156 | "named": true 157 | } 158 | ] 159 | } 160 | }, 161 | { 162 | "type": "function_parameter", 163 | "named": true, 164 | "fields": {}, 165 | "children": { 166 | "multiple": false, 167 | "required": true, 168 | "types": [ 169 | { 170 | "type": "function_parameter_named", 171 | "named": true 172 | }, 173 | { 174 | "type": "value", 175 | "named": true 176 | } 177 | ] 178 | } 179 | }, 180 | { 181 | "type": "function_parameter_named", 182 | "named": true, 183 | "fields": { 184 | "parameter": { 185 | "multiple": false, 186 | "required": true, 187 | "types": [ 188 | { 189 | "type": "identifier", 190 | "named": true 191 | } 192 | ] 193 | } 194 | }, 195 | "children": { 196 | "multiple": false, 197 | "required": true, 198 | "types": [ 199 | { 200 | "type": "value", 201 | "named": true 202 | } 203 | ] 204 | } 205 | }, 206 | { 207 | "type": "function_parameter_tail", 208 | "named": true, 209 | "fields": {}, 210 | "children": { 211 | "multiple": false, 212 | "required": true, 213 | "types": [ 214 | { 215 | "type": "function_parameter", 216 | "named": true 217 | } 218 | ] 219 | } 220 | }, 221 | { 222 | "type": "function_parameters", 223 | "named": true, 224 | "fields": {}, 225 | "children": { 226 | "multiple": true, 227 | "required": true, 228 | "types": [ 229 | { 230 | "type": "function_parameter_tail", 231 | "named": true 232 | }, 233 | { 234 | "type": "value", 235 | "named": true 236 | } 237 | ] 238 | } 239 | }, 240 | { 241 | "type": "hash", 242 | "named": true, 243 | "fields": {}, 244 | "children": { 245 | "multiple": true, 246 | "required": false, 247 | "types": [ 248 | { 249 | "type": "hash_key", 250 | "named": true 251 | }, 252 | { 253 | "type": "value", 254 | "named": true 255 | } 256 | ] 257 | } 258 | }, 259 | { 260 | "type": "hash_key", 261 | "named": true, 262 | "fields": { 263 | "key": { 264 | "multiple": false, 265 | "required": false, 266 | "types": [ 267 | { 268 | "type": "identifier", 269 | "named": true 270 | } 271 | ] 272 | } 273 | }, 274 | "children": { 275 | "multiple": false, 276 | "required": false, 277 | "types": [ 278 | { 279 | "type": "string", 280 | "named": true 281 | } 282 | ] 283 | } 284 | }, 285 | { 286 | "type": "interpolation", 287 | "named": true, 288 | "fields": {}, 289 | "children": { 290 | "multiple": true, 291 | "required": true, 292 | "types": [ 293 | { 294 | "type": "function", 295 | "named": true 296 | }, 297 | { 298 | "type": "tag_end", 299 | "named": true 300 | }, 301 | { 302 | "type": "tag_start", 303 | "named": true 304 | }, 305 | { 306 | "type": "variable", 307 | "named": true 308 | } 309 | ] 310 | } 311 | }, 312 | { 313 | "type": "markdown", 314 | "named": true, 315 | "fields": {} 316 | }, 317 | { 318 | "type": "primitive", 319 | "named": true, 320 | "fields": {}, 321 | "children": { 322 | "multiple": false, 323 | "required": true, 324 | "types": [ 325 | { 326 | "type": "boolean", 327 | "named": true 328 | }, 329 | { 330 | "type": "null", 331 | "named": true 332 | }, 333 | { 334 | "type": "number", 335 | "named": true 336 | }, 337 | { 338 | "type": "string", 339 | "named": true 340 | } 341 | ] 342 | } 343 | }, 344 | { 345 | "type": "string", 346 | "named": true, 347 | "fields": {} 348 | }, 349 | { 350 | "type": "tag", 351 | "named": true, 352 | "fields": {}, 353 | "children": { 354 | "multiple": true, 355 | "required": true, 356 | "types": [ 357 | { 358 | "type": "tag_end", 359 | "named": true 360 | }, 361 | { 362 | "type": "tag_interior", 363 | "named": true 364 | }, 365 | { 366 | "type": "tag_start", 367 | "named": true 368 | } 369 | ] 370 | } 371 | }, 372 | { 373 | "type": "tag_close", 374 | "named": true, 375 | "fields": { 376 | "tag_name": { 377 | "multiple": false, 378 | "required": true, 379 | "types": [ 380 | { 381 | "type": "identifier", 382 | "named": true 383 | } 384 | ] 385 | } 386 | } 387 | }, 388 | { 389 | "type": "tag_interior", 390 | "named": true, 391 | "fields": {}, 392 | "children": { 393 | "multiple": false, 394 | "required": true, 395 | "types": [ 396 | { 397 | "type": "tag_close", 398 | "named": true 399 | }, 400 | { 401 | "type": "tag_open", 402 | "named": true 403 | }, 404 | { 405 | "type": "tag_self_closing", 406 | "named": true 407 | } 408 | ] 409 | } 410 | }, 411 | { 412 | "type": "tag_open", 413 | "named": true, 414 | "fields": { 415 | "tag_name": { 416 | "multiple": false, 417 | "required": true, 418 | "types": [ 419 | { 420 | "type": "identifier", 421 | "named": true 422 | } 423 | ] 424 | } 425 | }, 426 | "children": { 427 | "multiple": true, 428 | "required": false, 429 | "types": [ 430 | { 431 | "type": "attribute", 432 | "named": true 433 | }, 434 | { 435 | "type": "value", 436 | "named": true 437 | } 438 | ] 439 | } 440 | }, 441 | { 442 | "type": "tag_self_closing", 443 | "named": true, 444 | "fields": {}, 445 | "children": { 446 | "multiple": false, 447 | "required": true, 448 | "types": [ 449 | { 450 | "type": "tag_open", 451 | "named": true 452 | } 453 | ] 454 | } 455 | }, 456 | { 457 | "type": "value", 458 | "named": true, 459 | "fields": {}, 460 | "children": { 461 | "multiple": false, 462 | "required": true, 463 | "types": [ 464 | { 465 | "type": "compound", 466 | "named": true 467 | }, 468 | { 469 | "type": "function", 470 | "named": true 471 | }, 472 | { 473 | "type": "primitive", 474 | "named": true 475 | }, 476 | { 477 | "type": "variable", 478 | "named": true 479 | } 480 | ] 481 | } 482 | }, 483 | { 484 | "type": "variable", 485 | "named": true, 486 | "fields": { 487 | "variable": { 488 | "multiple": false, 489 | "required": true, 490 | "types": [ 491 | { 492 | "type": "identifier", 493 | "named": true 494 | } 495 | ] 496 | } 497 | }, 498 | "children": { 499 | "multiple": true, 500 | "required": true, 501 | "types": [ 502 | { 503 | "type": "variable_sigil", 504 | "named": true 505 | }, 506 | { 507 | "type": "variable_tail", 508 | "named": true 509 | } 510 | ] 511 | } 512 | }, 513 | { 514 | "type": "variable_segment_value", 515 | "named": true, 516 | "fields": {}, 517 | "children": { 518 | "multiple": false, 519 | "required": true, 520 | "types": [ 521 | { 522 | "type": "number", 523 | "named": true 524 | }, 525 | { 526 | "type": "string", 527 | "named": true 528 | }, 529 | { 530 | "type": "variable", 531 | "named": true 532 | } 533 | ] 534 | } 535 | }, 536 | { 537 | "type": "variable_sigil", 538 | "named": true, 539 | "fields": {} 540 | }, 541 | { 542 | "type": "variable_tail", 543 | "named": true, 544 | "fields": { 545 | "property": { 546 | "multiple": false, 547 | "required": false, 548 | "types": [ 549 | { 550 | "type": "identifier", 551 | "named": true 552 | } 553 | ] 554 | } 555 | }, 556 | "children": { 557 | "multiple": false, 558 | "required": false, 559 | "types": [ 560 | { 561 | "type": "variable_segment_value", 562 | "named": true 563 | } 564 | ] 565 | } 566 | }, 567 | { 568 | "type": "\t", 569 | "named": false 570 | }, 571 | { 572 | "type": "\n", 573 | "named": false 574 | }, 575 | { 576 | "type": " ", 577 | "named": false 578 | }, 579 | { 580 | "type": "\"", 581 | "named": false 582 | }, 583 | { 584 | "type": "#", 585 | "named": false 586 | }, 587 | { 588 | "type": "$", 589 | "named": false 590 | }, 591 | { 592 | "type": "(", 593 | "named": false 594 | }, 595 | { 596 | "type": ")", 597 | "named": false 598 | }, 599 | { 600 | "type": ",", 601 | "named": false 602 | }, 603 | { 604 | "type": ".", 605 | "named": false 606 | }, 607 | { 608 | "type": "/", 609 | "named": false 610 | }, 611 | { 612 | "type": ":", 613 | "named": false 614 | }, 615 | { 616 | "type": "=", 617 | "named": false 618 | }, 619 | { 620 | "type": "@", 621 | "named": false 622 | }, 623 | { 624 | "type": "[", 625 | "named": false 626 | }, 627 | { 628 | "type": "]", 629 | "named": false 630 | }, 631 | { 632 | "type": "false", 633 | "named": false 634 | }, 635 | { 636 | "type": "identifier", 637 | "named": true 638 | }, 639 | { 640 | "type": "null", 641 | "named": true 642 | }, 643 | { 644 | "type": "number", 645 | "named": true 646 | }, 647 | { 648 | "type": "tag_end", 649 | "named": true 650 | }, 651 | { 652 | "type": "tag_start", 653 | "named": true 654 | }, 655 | { 656 | "type": "true", 657 | "named": false 658 | }, 659 | { 660 | "type": "{", 661 | "named": false 662 | }, 663 | { 664 | "type": "}", 665 | "named": false 666 | } 667 | ] -------------------------------------------------------------------------------- /src/grammar.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "markdoc", 3 | "word": "identifier", 4 | "rules": { 5 | "content": { 6 | "type": "REPEAT", 7 | "content": { 8 | "type": "CHOICE", 9 | "members": [ 10 | { 11 | "type": "SYMBOL", 12 | "name": "tag" 13 | }, 14 | { 15 | "type": "SYMBOL", 16 | "name": "interpolation" 17 | }, 18 | { 19 | "type": "SYMBOL", 20 | "name": "annotation" 21 | }, 22 | { 23 | "type": "SYMBOL", 24 | "name": "markdown" 25 | } 26 | ] 27 | } 28 | }, 29 | "markdown": { 30 | "type": "PREC_RIGHT", 31 | "value": 0, 32 | "content": { 33 | "type": "TOKEN", 34 | "content": { 35 | "type": "REPEAT1", 36 | "content": { 37 | "type": "PATTERN", 38 | "value": "[^\\s{][^{]*" 39 | } 40 | } 41 | } 42 | }, 43 | "tag": { 44 | "type": "SEQ", 45 | "members": [ 46 | { 47 | "type": "SYMBOL", 48 | "name": "tag_start" 49 | }, 50 | { 51 | "type": "CHOICE", 52 | "members": [ 53 | { 54 | "type": "SYMBOL", 55 | "name": "_space" 56 | }, 57 | { 58 | "type": "BLANK" 59 | } 60 | ] 61 | }, 62 | { 63 | "type": "SYMBOL", 64 | "name": "tag_interior" 65 | }, 66 | { 67 | "type": "SYMBOL", 68 | "name": "tag_end" 69 | } 70 | ] 71 | }, 72 | "tag_start": { 73 | "type": "STRING", 74 | "value": "{%" 75 | }, 76 | "tag_end": { 77 | "type": "STRING", 78 | "value": "%}" 79 | }, 80 | "tag_interior": { 81 | "type": "CHOICE", 82 | "members": [ 83 | { 84 | "type": "SYMBOL", 85 | "name": "tag_open" 86 | }, 87 | { 88 | "type": "SYMBOL", 89 | "name": "tag_self_closing" 90 | }, 91 | { 92 | "type": "SYMBOL", 93 | "name": "tag_close" 94 | } 95 | ] 96 | }, 97 | "tag_open": { 98 | "type": "SEQ", 99 | "members": [ 100 | { 101 | "type": "FIELD", 102 | "name": "tag_name", 103 | "content": { 104 | "type": "SYMBOL", 105 | "name": "identifier" 106 | } 107 | }, 108 | { 109 | "type": "CHOICE", 110 | "members": [ 111 | { 112 | "type": "SEQ", 113 | "members": [ 114 | { 115 | "type": "SYMBOL", 116 | "name": "_space" 117 | }, 118 | { 119 | "type": "SYMBOL", 120 | "name": "value" 121 | } 122 | ] 123 | }, 124 | { 125 | "type": "BLANK" 126 | } 127 | ] 128 | }, 129 | { 130 | "type": "REPEAT", 131 | "content": { 132 | "type": "SEQ", 133 | "members": [ 134 | { 135 | "type": "SYMBOL", 136 | "name": "_space" 137 | }, 138 | { 139 | "type": "SYMBOL", 140 | "name": "attribute" 141 | } 142 | ] 143 | } 144 | }, 145 | { 146 | "type": "CHOICE", 147 | "members": [ 148 | { 149 | "type": "SYMBOL", 150 | "name": "_space" 151 | }, 152 | { 153 | "type": "BLANK" 154 | } 155 | ] 156 | } 157 | ] 158 | }, 159 | "tag_self_closing": { 160 | "type": "SEQ", 161 | "members": [ 162 | { 163 | "type": "SYMBOL", 164 | "name": "tag_open" 165 | }, 166 | { 167 | "type": "STRING", 168 | "value": "/" 169 | } 170 | ] 171 | }, 172 | "tag_close": { 173 | "type": "SEQ", 174 | "members": [ 175 | { 176 | "type": "STRING", 177 | "value": "/" 178 | }, 179 | { 180 | "type": "FIELD", 181 | "name": "tag_name", 182 | "content": { 183 | "type": "SYMBOL", 184 | "name": "identifier" 185 | } 186 | } 187 | ] 188 | }, 189 | "attribute": { 190 | "type": "CHOICE", 191 | "members": [ 192 | { 193 | "type": "SYMBOL", 194 | "name": "_attribute_full" 195 | }, 196 | { 197 | "type": "SYMBOL", 198 | "name": "_attribute_shorthand" 199 | } 200 | ] 201 | }, 202 | "_attribute_full": { 203 | "type": "SEQ", 204 | "members": [ 205 | { 206 | "type": "FIELD", 207 | "name": "key", 208 | "content": { 209 | "type": "SYMBOL", 210 | "name": "identifier" 211 | } 212 | }, 213 | { 214 | "type": "STRING", 215 | "value": "=" 216 | }, 217 | { 218 | "type": "SYMBOL", 219 | "name": "value" 220 | } 221 | ] 222 | }, 223 | "_attribute_shorthand": { 224 | "type": "FIELD", 225 | "name": "shorthand", 226 | "content": { 227 | "type": "SEQ", 228 | "members": [ 229 | { 230 | "type": "SYMBOL", 231 | "name": "_shorthand_sigil" 232 | }, 233 | { 234 | "type": "SYMBOL", 235 | "name": "identifier" 236 | } 237 | ] 238 | } 239 | }, 240 | "_shorthand_sigil": { 241 | "type": "CHOICE", 242 | "members": [ 243 | { 244 | "type": "STRING", 245 | "value": "." 246 | }, 247 | { 248 | "type": "STRING", 249 | "value": "#" 250 | } 251 | ] 252 | }, 253 | "annotation": { 254 | "type": "SEQ", 255 | "members": [ 256 | { 257 | "type": "SYMBOL", 258 | "name": "tag_start" 259 | }, 260 | { 261 | "type": "REPEAT1", 262 | "content": { 263 | "type": "SEQ", 264 | "members": [ 265 | { 266 | "type": "CHOICE", 267 | "members": [ 268 | { 269 | "type": "SYMBOL", 270 | "name": "_space" 271 | }, 272 | { 273 | "type": "BLANK" 274 | } 275 | ] 276 | }, 277 | { 278 | "type": "SYMBOL", 279 | "name": "attribute" 280 | } 281 | ] 282 | } 283 | }, 284 | { 285 | "type": "CHOICE", 286 | "members": [ 287 | { 288 | "type": "SYMBOL", 289 | "name": "_space" 290 | }, 291 | { 292 | "type": "BLANK" 293 | } 294 | ] 295 | }, 296 | { 297 | "type": "SYMBOL", 298 | "name": "tag_end" 299 | } 300 | ] 301 | }, 302 | "interpolation": { 303 | "type": "SEQ", 304 | "members": [ 305 | { 306 | "type": "SYMBOL", 307 | "name": "tag_start" 308 | }, 309 | { 310 | "type": "REPEAT1", 311 | "content": { 312 | "type": "SEQ", 313 | "members": [ 314 | { 315 | "type": "SYMBOL", 316 | "name": "_space" 317 | }, 318 | { 319 | "type": "CHOICE", 320 | "members": [ 321 | { 322 | "type": "SYMBOL", 323 | "name": "function" 324 | }, 325 | { 326 | "type": "SYMBOL", 327 | "name": "variable" 328 | } 329 | ] 330 | } 331 | ] 332 | } 333 | }, 334 | { 335 | "type": "CHOICE", 336 | "members": [ 337 | { 338 | "type": "SYMBOL", 339 | "name": "_space" 340 | }, 341 | { 342 | "type": "BLANK" 343 | } 344 | ] 345 | }, 346 | { 347 | "type": "SYMBOL", 348 | "name": "tag_end" 349 | } 350 | ] 351 | }, 352 | "interpolation_value": { 353 | "type": "CHOICE", 354 | "members": [ 355 | { 356 | "type": "SYMBOL", 357 | "name": "function" 358 | }, 359 | { 360 | "type": "SYMBOL", 361 | "name": "variable" 362 | } 363 | ] 364 | }, 365 | "value": { 366 | "type": "CHOICE", 367 | "members": [ 368 | { 369 | "type": "SYMBOL", 370 | "name": "primitive" 371 | }, 372 | { 373 | "type": "SYMBOL", 374 | "name": "compound" 375 | }, 376 | { 377 | "type": "SYMBOL", 378 | "name": "variable" 379 | }, 380 | { 381 | "type": "SYMBOL", 382 | "name": "function" 383 | } 384 | ] 385 | }, 386 | "primitive": { 387 | "type": "CHOICE", 388 | "members": [ 389 | { 390 | "type": "SYMBOL", 391 | "name": "null" 392 | }, 393 | { 394 | "type": "SYMBOL", 395 | "name": "boolean" 396 | }, 397 | { 398 | "type": "SYMBOL", 399 | "name": "number" 400 | }, 401 | { 402 | "type": "SYMBOL", 403 | "name": "string" 404 | } 405 | ] 406 | }, 407 | "null": { 408 | "type": "STRING", 409 | "value": "null" 410 | }, 411 | "boolean": { 412 | "type": "CHOICE", 413 | "members": [ 414 | { 415 | "type": "STRING", 416 | "value": "true" 417 | }, 418 | { 419 | "type": "STRING", 420 | "value": "false" 421 | } 422 | ] 423 | }, 424 | "number": { 425 | "type": "TOKEN", 426 | "content": { 427 | "type": "SEQ", 428 | "members": [ 429 | { 430 | "type": "CHOICE", 431 | "members": [ 432 | { 433 | "type": "STRING", 434 | "value": "-" 435 | }, 436 | { 437 | "type": "BLANK" 438 | } 439 | ] 440 | }, 441 | { 442 | "type": "PATTERN", 443 | "value": "\\d+" 444 | }, 445 | { 446 | "type": "CHOICE", 447 | "members": [ 448 | { 449 | "type": "SEQ", 450 | "members": [ 451 | { 452 | "type": "STRING", 453 | "value": "." 454 | }, 455 | { 456 | "type": "PATTERN", 457 | "value": "\\d+" 458 | } 459 | ] 460 | }, 461 | { 462 | "type": "BLANK" 463 | } 464 | ] 465 | } 466 | ] 467 | } 468 | }, 469 | "string": { 470 | "type": "SEQ", 471 | "members": [ 472 | { 473 | "type": "STRING", 474 | "value": "\"" 475 | }, 476 | { 477 | "type": "REPEAT", 478 | "content": { 479 | "type": "SYMBOL", 480 | "name": "_string_element" 481 | } 482 | }, 483 | { 484 | "type": "STRING", 485 | "value": "\"" 486 | } 487 | ] 488 | }, 489 | "_string_element": { 490 | "type": "CHOICE", 491 | "members": [ 492 | { 493 | "type": "SYMBOL", 494 | "name": "_string_character" 495 | }, 496 | { 497 | "type": "SYMBOL", 498 | "name": "_string_escape_sequence" 499 | } 500 | ] 501 | }, 502 | "_string_character": { 503 | "type": "IMMEDIATE_TOKEN", 504 | "content": { 505 | "type": "PREC", 506 | "value": 1, 507 | "content": { 508 | "type": "PATTERN", 509 | "value": "[^\"\\\\]" 510 | } 511 | } 512 | }, 513 | "_string_escape_sequence": { 514 | "type": "IMMEDIATE_TOKEN", 515 | "content": { 516 | "type": "SEQ", 517 | "members": [ 518 | { 519 | "type": "STRING", 520 | "value": "\\" 521 | }, 522 | { 523 | "type": "CHOICE", 524 | "members": [ 525 | { 526 | "type": "STRING", 527 | "value": "n" 528 | }, 529 | { 530 | "type": "STRING", 531 | "value": "r" 532 | }, 533 | { 534 | "type": "STRING", 535 | "value": "t" 536 | }, 537 | { 538 | "type": "STRING", 539 | "value": "\\" 540 | }, 541 | { 542 | "type": "STRING", 543 | "value": "\"" 544 | } 545 | ] 546 | } 547 | ] 548 | } 549 | }, 550 | "compound": { 551 | "type": "CHOICE", 552 | "members": [ 553 | { 554 | "type": "SYMBOL", 555 | "name": "array" 556 | }, 557 | { 558 | "type": "SYMBOL", 559 | "name": "hash" 560 | } 561 | ] 562 | }, 563 | "array": { 564 | "type": "SEQ", 565 | "members": [ 566 | { 567 | "type": "STRING", 568 | "value": "[" 569 | }, 570 | { 571 | "type": "REPEAT", 572 | "content": { 573 | "type": "SYMBOL", 574 | "name": "_array_item" 575 | } 576 | }, 577 | { 578 | "type": "CHOICE", 579 | "members": [ 580 | { 581 | "type": "SYMBOL", 582 | "name": "_array_item_with_optional_comma" 583 | }, 584 | { 585 | "type": "BLANK" 586 | } 587 | ] 588 | }, 589 | { 590 | "type": "STRING", 591 | "value": "]" 592 | } 593 | ] 594 | }, 595 | "_array_item": { 596 | "type": "PREC", 597 | "value": 1, 598 | "content": { 599 | "type": "SEQ", 600 | "members": [ 601 | { 602 | "type": "SYMBOL", 603 | "name": "value" 604 | }, 605 | { 606 | "type": "STRING", 607 | "value": "," 608 | } 609 | ] 610 | } 611 | }, 612 | "_array_item_with_optional_comma": { 613 | "type": "SEQ", 614 | "members": [ 615 | { 616 | "type": "SYMBOL", 617 | "name": "value" 618 | }, 619 | { 620 | "type": "CHOICE", 621 | "members": [ 622 | { 623 | "type": "STRING", 624 | "value": "," 625 | }, 626 | { 627 | "type": "BLANK" 628 | } 629 | ] 630 | } 631 | ] 632 | }, 633 | "hash": { 634 | "type": "SEQ", 635 | "members": [ 636 | { 637 | "type": "STRING", 638 | "value": "{" 639 | }, 640 | { 641 | "type": "REPEAT", 642 | "content": { 643 | "type": "SYMBOL", 644 | "name": "_hash_item" 645 | } 646 | }, 647 | { 648 | "type": "CHOICE", 649 | "members": [ 650 | { 651 | "type": "SYMBOL", 652 | "name": "_hash_item_with_optional_comma" 653 | }, 654 | { 655 | "type": "BLANK" 656 | } 657 | ] 658 | }, 659 | { 660 | "type": "STRING", 661 | "value": "}" 662 | } 663 | ] 664 | }, 665 | "_hash_item": { 666 | "type": "PREC", 667 | "value": 1, 668 | "content": { 669 | "type": "SEQ", 670 | "members": [ 671 | { 672 | "type": "SYMBOL", 673 | "name": "_hash_key_value" 674 | }, 675 | { 676 | "type": "STRING", 677 | "value": "," 678 | } 679 | ] 680 | } 681 | }, 682 | "_hash_key_value": { 683 | "type": "SEQ", 684 | "members": [ 685 | { 686 | "type": "SYMBOL", 687 | "name": "hash_key" 688 | }, 689 | { 690 | "type": "STRING", 691 | "value": ":" 692 | }, 693 | { 694 | "type": "SYMBOL", 695 | "name": "value" 696 | } 697 | ] 698 | }, 699 | "_hash_item_with_optional_comma": { 700 | "type": "SEQ", 701 | "members": [ 702 | { 703 | "type": "SYMBOL", 704 | "name": "_hash_key_value" 705 | }, 706 | { 707 | "type": "CHOICE", 708 | "members": [ 709 | { 710 | "type": "STRING", 711 | "value": "," 712 | }, 713 | { 714 | "type": "BLANK" 715 | } 716 | ] 717 | } 718 | ] 719 | }, 720 | "hash_key": { 721 | "type": "CHOICE", 722 | "members": [ 723 | { 724 | "type": "FIELD", 725 | "name": "key", 726 | "content": { 727 | "type": "SYMBOL", 728 | "name": "identifier" 729 | } 730 | }, 731 | { 732 | "type": "SYMBOL", 733 | "name": "string" 734 | } 735 | ] 736 | }, 737 | "variable": { 738 | "type": "PREC_RIGHT", 739 | "value": 0, 740 | "content": { 741 | "type": "SEQ", 742 | "members": [ 743 | { 744 | "type": "SYMBOL", 745 | "name": "variable_sigil" 746 | }, 747 | { 748 | "type": "FIELD", 749 | "name": "variable", 750 | "content": { 751 | "type": "SYMBOL", 752 | "name": "identifier" 753 | } 754 | }, 755 | { 756 | "type": "REPEAT", 757 | "content": { 758 | "type": "SYMBOL", 759 | "name": "variable_tail" 760 | } 761 | } 762 | ] 763 | } 764 | }, 765 | "variable_tail": { 766 | "type": "CHOICE", 767 | "members": [ 768 | { 769 | "type": "SEQ", 770 | "members": [ 771 | { 772 | "type": "STRING", 773 | "value": "." 774 | }, 775 | { 776 | "type": "FIELD", 777 | "name": "property", 778 | "content": { 779 | "type": "SYMBOL", 780 | "name": "identifier" 781 | } 782 | } 783 | ] 784 | }, 785 | { 786 | "type": "SEQ", 787 | "members": [ 788 | { 789 | "type": "STRING", 790 | "value": "[" 791 | }, 792 | { 793 | "type": "SYMBOL", 794 | "name": "variable_segment_value" 795 | }, 796 | { 797 | "type": "STRING", 798 | "value": "]" 799 | } 800 | ] 801 | } 802 | ] 803 | }, 804 | "variable_segment_value": { 805 | "type": "CHOICE", 806 | "members": [ 807 | { 808 | "type": "SYMBOL", 809 | "name": "number" 810 | }, 811 | { 812 | "type": "SYMBOL", 813 | "name": "string" 814 | }, 815 | { 816 | "type": "SYMBOL", 817 | "name": "variable" 818 | } 819 | ] 820 | }, 821 | "variable_sigil": { 822 | "type": "CHOICE", 823 | "members": [ 824 | { 825 | "type": "STRING", 826 | "value": "$" 827 | }, 828 | { 829 | "type": "STRING", 830 | "value": "@" 831 | } 832 | ] 833 | }, 834 | "function": { 835 | "type": "PREC_RIGHT", 836 | "value": 1, 837 | "content": { 838 | "type": "SEQ", 839 | "members": [ 840 | { 841 | "type": "FIELD", 842 | "name": "function_name", 843 | "content": { 844 | "type": "SYMBOL", 845 | "name": "identifier" 846 | } 847 | }, 848 | { 849 | "type": "STRING", 850 | "value": "(" 851 | }, 852 | { 853 | "type": "REPEAT", 854 | "content": { 855 | "type": "SYMBOL", 856 | "name": "function_parameters" 857 | } 858 | }, 859 | { 860 | "type": "STRING", 861 | "value": ")" 862 | } 863 | ] 864 | } 865 | }, 866 | "function_parameters": { 867 | "type": "SEQ", 868 | "members": [ 869 | { 870 | "type": "SYMBOL", 871 | "name": "value" 872 | }, 873 | { 874 | "type": "REPEAT", 875 | "content": { 876 | "type": "SYMBOL", 877 | "name": "function_parameter_tail" 878 | } 879 | } 880 | ] 881 | }, 882 | "function_parameter_tail": { 883 | "type": "SEQ", 884 | "members": [ 885 | { 886 | "type": "STRING", 887 | "value": "," 888 | }, 889 | { 890 | "type": "SYMBOL", 891 | "name": "function_parameter" 892 | } 893 | ] 894 | }, 895 | "function_parameter": { 896 | "type": "CHOICE", 897 | "members": [ 898 | { 899 | "type": "SYMBOL", 900 | "name": "function_parameter_named" 901 | }, 902 | { 903 | "type": "SYMBOL", 904 | "name": "value" 905 | } 906 | ] 907 | }, 908 | "function_parameter_named": { 909 | "type": "SEQ", 910 | "members": [ 911 | { 912 | "type": "FIELD", 913 | "name": "parameter", 914 | "content": { 915 | "type": "SYMBOL", 916 | "name": "identifier" 917 | } 918 | }, 919 | { 920 | "type": "STRING", 921 | "value": "=" 922 | }, 923 | { 924 | "type": "SYMBOL", 925 | "name": "value" 926 | } 927 | ] 928 | }, 929 | "identifier": { 930 | "type": "TOKEN", 931 | "content": { 932 | "type": "SEQ", 933 | "members": [ 934 | { 935 | "type": "PATTERN", 936 | "value": "[a-zA-Z]" 937 | }, 938 | { 939 | "type": "REPEAT", 940 | "content": { 941 | "type": "PATTERN", 942 | "value": "[-_a-zA-Z0-9]" 943 | } 944 | } 945 | ] 946 | } 947 | }, 948 | "_space": { 949 | "type": "REPEAT1", 950 | "content": { 951 | "type": "CHOICE", 952 | "members": [ 953 | { 954 | "type": "STRING", 955 | "value": "\t" 956 | }, 957 | { 958 | "type": "STRING", 959 | "value": " " 960 | }, 961 | { 962 | "type": "STRING", 963 | "value": "\n" 964 | } 965 | ] 966 | } 967 | } 968 | }, 969 | "extras": [ 970 | { 971 | "type": "PATTERN", 972 | "value": "\\s" 973 | } 974 | ], 975 | "conflicts": [ 976 | [ 977 | "tag_start", 978 | "interpolation", 979 | "annotation" 980 | ] 981 | ], 982 | "precedences": [], 983 | "externals": [], 984 | "inline": [], 985 | "supertypes": [] 986 | } 987 | 988 | -------------------------------------------------------------------------------- /src/parser.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #if defined(__GNUC__) || defined(__clang__) 4 | #pragma GCC diagnostic push 5 | #pragma GCC diagnostic ignored "-Wmissing-field-initializers" 6 | #endif 7 | 8 | #define LANGUAGE_VERSION 14 9 | #define STATE_COUNT 152 10 | #define LARGE_STATE_COUNT 2 11 | #define SYMBOL_COUNT 76 12 | #define ALIAS_COUNT 0 13 | #define TOKEN_COUNT 29 14 | #define EXTERNAL_TOKEN_COUNT 0 15 | #define FIELD_COUNT 7 16 | #define MAX_ALIAS_SEQUENCE_LENGTH 5 17 | #define PRODUCTION_ID_COUNT 11 18 | 19 | enum { 20 | sym_identifier = 1, 21 | aux_sym_markdown_token1 = 2, 22 | sym_tag_start = 3, 23 | sym_tag_end = 4, 24 | anon_sym_SLASH = 5, 25 | anon_sym_EQ = 6, 26 | anon_sym_DOT = 7, 27 | anon_sym_POUND = 8, 28 | sym_null = 9, 29 | anon_sym_true = 10, 30 | anon_sym_false = 11, 31 | sym_number = 12, 32 | anon_sym_DQUOTE = 13, 33 | sym__string_character = 14, 34 | sym__string_escape_sequence = 15, 35 | anon_sym_LBRACK = 16, 36 | anon_sym_RBRACK = 17, 37 | anon_sym_COMMA = 18, 38 | anon_sym_LBRACE = 19, 39 | anon_sym_RBRACE = 20, 40 | anon_sym_COLON = 21, 41 | anon_sym_DOLLAR = 22, 42 | anon_sym_AT = 23, 43 | anon_sym_LPAREN = 24, 44 | anon_sym_RPAREN = 25, 45 | anon_sym_TAB = 26, 46 | anon_sym_ = 27, 47 | anon_sym_LF = 28, 48 | sym_content = 29, 49 | sym_markdown = 30, 50 | sym_tag = 31, 51 | sym_tag_interior = 32, 52 | sym_tag_open = 33, 53 | sym_tag_self_closing = 34, 54 | sym_tag_close = 35, 55 | sym_attribute = 36, 56 | sym__attribute_full = 37, 57 | sym__attribute_shorthand = 38, 58 | sym__shorthand_sigil = 39, 59 | sym_annotation = 40, 60 | sym_interpolation = 41, 61 | sym_value = 42, 62 | sym_primitive = 43, 63 | sym_boolean = 44, 64 | sym_string = 45, 65 | sym__string_element = 46, 66 | sym_compound = 47, 67 | sym_array = 48, 68 | sym__array_item = 49, 69 | sym__array_item_with_optional_comma = 50, 70 | sym_hash = 51, 71 | sym__hash_item = 52, 72 | sym__hash_key_value = 53, 73 | sym__hash_item_with_optional_comma = 54, 74 | sym_hash_key = 55, 75 | sym_variable = 56, 76 | sym_variable_tail = 57, 77 | sym_variable_segment_value = 58, 78 | sym_variable_sigil = 59, 79 | sym_function = 60, 80 | sym_function_parameters = 61, 81 | sym_function_parameter_tail = 62, 82 | sym_function_parameter = 63, 83 | sym_function_parameter_named = 64, 84 | aux_sym__space = 65, 85 | aux_sym_content_repeat1 = 66, 86 | aux_sym_tag_open_repeat1 = 67, 87 | aux_sym_annotation_repeat1 = 68, 88 | aux_sym_interpolation_repeat1 = 69, 89 | aux_sym_string_repeat1 = 70, 90 | aux_sym_array_repeat1 = 71, 91 | aux_sym_hash_repeat1 = 72, 92 | aux_sym_variable_repeat1 = 73, 93 | aux_sym_function_repeat1 = 74, 94 | aux_sym_function_parameters_repeat1 = 75, 95 | }; 96 | 97 | static const char * const ts_symbol_names[] = { 98 | [ts_builtin_sym_end] = "end", 99 | [sym_identifier] = "identifier", 100 | [aux_sym_markdown_token1] = "markdown_token1", 101 | [sym_tag_start] = "tag_start", 102 | [sym_tag_end] = "tag_end", 103 | [anon_sym_SLASH] = "/", 104 | [anon_sym_EQ] = "=", 105 | [anon_sym_DOT] = ".", 106 | [anon_sym_POUND] = "#", 107 | [sym_null] = "null", 108 | [anon_sym_true] = "true", 109 | [anon_sym_false] = "false", 110 | [sym_number] = "number", 111 | [anon_sym_DQUOTE] = "\"", 112 | [sym__string_character] = "_string_character", 113 | [sym__string_escape_sequence] = "_string_escape_sequence", 114 | [anon_sym_LBRACK] = "[", 115 | [anon_sym_RBRACK] = "]", 116 | [anon_sym_COMMA] = ",", 117 | [anon_sym_LBRACE] = "{", 118 | [anon_sym_RBRACE] = "}", 119 | [anon_sym_COLON] = ":", 120 | [anon_sym_DOLLAR] = "$", 121 | [anon_sym_AT] = "@", 122 | [anon_sym_LPAREN] = "(", 123 | [anon_sym_RPAREN] = ")", 124 | [anon_sym_TAB] = "\t", 125 | [anon_sym_] = " ", 126 | [anon_sym_LF] = "\n", 127 | [sym_content] = "content", 128 | [sym_markdown] = "markdown", 129 | [sym_tag] = "tag", 130 | [sym_tag_interior] = "tag_interior", 131 | [sym_tag_open] = "tag_open", 132 | [sym_tag_self_closing] = "tag_self_closing", 133 | [sym_tag_close] = "tag_close", 134 | [sym_attribute] = "attribute", 135 | [sym__attribute_full] = "_attribute_full", 136 | [sym__attribute_shorthand] = "_attribute_shorthand", 137 | [sym__shorthand_sigil] = "_shorthand_sigil", 138 | [sym_annotation] = "annotation", 139 | [sym_interpolation] = "interpolation", 140 | [sym_value] = "value", 141 | [sym_primitive] = "primitive", 142 | [sym_boolean] = "boolean", 143 | [sym_string] = "string", 144 | [sym__string_element] = "_string_element", 145 | [sym_compound] = "compound", 146 | [sym_array] = "array", 147 | [sym__array_item] = "_array_item", 148 | [sym__array_item_with_optional_comma] = "_array_item_with_optional_comma", 149 | [sym_hash] = "hash", 150 | [sym__hash_item] = "_hash_item", 151 | [sym__hash_key_value] = "_hash_key_value", 152 | [sym__hash_item_with_optional_comma] = "_hash_item_with_optional_comma", 153 | [sym_hash_key] = "hash_key", 154 | [sym_variable] = "variable", 155 | [sym_variable_tail] = "variable_tail", 156 | [sym_variable_segment_value] = "variable_segment_value", 157 | [sym_variable_sigil] = "variable_sigil", 158 | [sym_function] = "function", 159 | [sym_function_parameters] = "function_parameters", 160 | [sym_function_parameter_tail] = "function_parameter_tail", 161 | [sym_function_parameter] = "function_parameter", 162 | [sym_function_parameter_named] = "function_parameter_named", 163 | [aux_sym__space] = "_space", 164 | [aux_sym_content_repeat1] = "content_repeat1", 165 | [aux_sym_tag_open_repeat1] = "tag_open_repeat1", 166 | [aux_sym_annotation_repeat1] = "annotation_repeat1", 167 | [aux_sym_interpolation_repeat1] = "interpolation_repeat1", 168 | [aux_sym_string_repeat1] = "string_repeat1", 169 | [aux_sym_array_repeat1] = "array_repeat1", 170 | [aux_sym_hash_repeat1] = "hash_repeat1", 171 | [aux_sym_variable_repeat1] = "variable_repeat1", 172 | [aux_sym_function_repeat1] = "function_repeat1", 173 | [aux_sym_function_parameters_repeat1] = "function_parameters_repeat1", 174 | }; 175 | 176 | static const TSSymbol ts_symbol_map[] = { 177 | [ts_builtin_sym_end] = ts_builtin_sym_end, 178 | [sym_identifier] = sym_identifier, 179 | [aux_sym_markdown_token1] = aux_sym_markdown_token1, 180 | [sym_tag_start] = sym_tag_start, 181 | [sym_tag_end] = sym_tag_end, 182 | [anon_sym_SLASH] = anon_sym_SLASH, 183 | [anon_sym_EQ] = anon_sym_EQ, 184 | [anon_sym_DOT] = anon_sym_DOT, 185 | [anon_sym_POUND] = anon_sym_POUND, 186 | [sym_null] = sym_null, 187 | [anon_sym_true] = anon_sym_true, 188 | [anon_sym_false] = anon_sym_false, 189 | [sym_number] = sym_number, 190 | [anon_sym_DQUOTE] = anon_sym_DQUOTE, 191 | [sym__string_character] = sym__string_character, 192 | [sym__string_escape_sequence] = sym__string_escape_sequence, 193 | [anon_sym_LBRACK] = anon_sym_LBRACK, 194 | [anon_sym_RBRACK] = anon_sym_RBRACK, 195 | [anon_sym_COMMA] = anon_sym_COMMA, 196 | [anon_sym_LBRACE] = anon_sym_LBRACE, 197 | [anon_sym_RBRACE] = anon_sym_RBRACE, 198 | [anon_sym_COLON] = anon_sym_COLON, 199 | [anon_sym_DOLLAR] = anon_sym_DOLLAR, 200 | [anon_sym_AT] = anon_sym_AT, 201 | [anon_sym_LPAREN] = anon_sym_LPAREN, 202 | [anon_sym_RPAREN] = anon_sym_RPAREN, 203 | [anon_sym_TAB] = anon_sym_TAB, 204 | [anon_sym_] = anon_sym_, 205 | [anon_sym_LF] = anon_sym_LF, 206 | [sym_content] = sym_content, 207 | [sym_markdown] = sym_markdown, 208 | [sym_tag] = sym_tag, 209 | [sym_tag_interior] = sym_tag_interior, 210 | [sym_tag_open] = sym_tag_open, 211 | [sym_tag_self_closing] = sym_tag_self_closing, 212 | [sym_tag_close] = sym_tag_close, 213 | [sym_attribute] = sym_attribute, 214 | [sym__attribute_full] = sym__attribute_full, 215 | [sym__attribute_shorthand] = sym__attribute_shorthand, 216 | [sym__shorthand_sigil] = sym__shorthand_sigil, 217 | [sym_annotation] = sym_annotation, 218 | [sym_interpolation] = sym_interpolation, 219 | [sym_value] = sym_value, 220 | [sym_primitive] = sym_primitive, 221 | [sym_boolean] = sym_boolean, 222 | [sym_string] = sym_string, 223 | [sym__string_element] = sym__string_element, 224 | [sym_compound] = sym_compound, 225 | [sym_array] = sym_array, 226 | [sym__array_item] = sym__array_item, 227 | [sym__array_item_with_optional_comma] = sym__array_item_with_optional_comma, 228 | [sym_hash] = sym_hash, 229 | [sym__hash_item] = sym__hash_item, 230 | [sym__hash_key_value] = sym__hash_key_value, 231 | [sym__hash_item_with_optional_comma] = sym__hash_item_with_optional_comma, 232 | [sym_hash_key] = sym_hash_key, 233 | [sym_variable] = sym_variable, 234 | [sym_variable_tail] = sym_variable_tail, 235 | [sym_variable_segment_value] = sym_variable_segment_value, 236 | [sym_variable_sigil] = sym_variable_sigil, 237 | [sym_function] = sym_function, 238 | [sym_function_parameters] = sym_function_parameters, 239 | [sym_function_parameter_tail] = sym_function_parameter_tail, 240 | [sym_function_parameter] = sym_function_parameter, 241 | [sym_function_parameter_named] = sym_function_parameter_named, 242 | [aux_sym__space] = aux_sym__space, 243 | [aux_sym_content_repeat1] = aux_sym_content_repeat1, 244 | [aux_sym_tag_open_repeat1] = aux_sym_tag_open_repeat1, 245 | [aux_sym_annotation_repeat1] = aux_sym_annotation_repeat1, 246 | [aux_sym_interpolation_repeat1] = aux_sym_interpolation_repeat1, 247 | [aux_sym_string_repeat1] = aux_sym_string_repeat1, 248 | [aux_sym_array_repeat1] = aux_sym_array_repeat1, 249 | [aux_sym_hash_repeat1] = aux_sym_hash_repeat1, 250 | [aux_sym_variable_repeat1] = aux_sym_variable_repeat1, 251 | [aux_sym_function_repeat1] = aux_sym_function_repeat1, 252 | [aux_sym_function_parameters_repeat1] = aux_sym_function_parameters_repeat1, 253 | }; 254 | 255 | static const TSSymbolMetadata ts_symbol_metadata[] = { 256 | [ts_builtin_sym_end] = { 257 | .visible = false, 258 | .named = true, 259 | }, 260 | [sym_identifier] = { 261 | .visible = true, 262 | .named = true, 263 | }, 264 | [aux_sym_markdown_token1] = { 265 | .visible = false, 266 | .named = false, 267 | }, 268 | [sym_tag_start] = { 269 | .visible = true, 270 | .named = true, 271 | }, 272 | [sym_tag_end] = { 273 | .visible = true, 274 | .named = true, 275 | }, 276 | [anon_sym_SLASH] = { 277 | .visible = true, 278 | .named = false, 279 | }, 280 | [anon_sym_EQ] = { 281 | .visible = true, 282 | .named = false, 283 | }, 284 | [anon_sym_DOT] = { 285 | .visible = true, 286 | .named = false, 287 | }, 288 | [anon_sym_POUND] = { 289 | .visible = true, 290 | .named = false, 291 | }, 292 | [sym_null] = { 293 | .visible = true, 294 | .named = true, 295 | }, 296 | [anon_sym_true] = { 297 | .visible = true, 298 | .named = false, 299 | }, 300 | [anon_sym_false] = { 301 | .visible = true, 302 | .named = false, 303 | }, 304 | [sym_number] = { 305 | .visible = true, 306 | .named = true, 307 | }, 308 | [anon_sym_DQUOTE] = { 309 | .visible = true, 310 | .named = false, 311 | }, 312 | [sym__string_character] = { 313 | .visible = false, 314 | .named = true, 315 | }, 316 | [sym__string_escape_sequence] = { 317 | .visible = false, 318 | .named = true, 319 | }, 320 | [anon_sym_LBRACK] = { 321 | .visible = true, 322 | .named = false, 323 | }, 324 | [anon_sym_RBRACK] = { 325 | .visible = true, 326 | .named = false, 327 | }, 328 | [anon_sym_COMMA] = { 329 | .visible = true, 330 | .named = false, 331 | }, 332 | [anon_sym_LBRACE] = { 333 | .visible = true, 334 | .named = false, 335 | }, 336 | [anon_sym_RBRACE] = { 337 | .visible = true, 338 | .named = false, 339 | }, 340 | [anon_sym_COLON] = { 341 | .visible = true, 342 | .named = false, 343 | }, 344 | [anon_sym_DOLLAR] = { 345 | .visible = true, 346 | .named = false, 347 | }, 348 | [anon_sym_AT] = { 349 | .visible = true, 350 | .named = false, 351 | }, 352 | [anon_sym_LPAREN] = { 353 | .visible = true, 354 | .named = false, 355 | }, 356 | [anon_sym_RPAREN] = { 357 | .visible = true, 358 | .named = false, 359 | }, 360 | [anon_sym_TAB] = { 361 | .visible = true, 362 | .named = false, 363 | }, 364 | [anon_sym_] = { 365 | .visible = true, 366 | .named = false, 367 | }, 368 | [anon_sym_LF] = { 369 | .visible = true, 370 | .named = false, 371 | }, 372 | [sym_content] = { 373 | .visible = true, 374 | .named = true, 375 | }, 376 | [sym_markdown] = { 377 | .visible = true, 378 | .named = true, 379 | }, 380 | [sym_tag] = { 381 | .visible = true, 382 | .named = true, 383 | }, 384 | [sym_tag_interior] = { 385 | .visible = true, 386 | .named = true, 387 | }, 388 | [sym_tag_open] = { 389 | .visible = true, 390 | .named = true, 391 | }, 392 | [sym_tag_self_closing] = { 393 | .visible = true, 394 | .named = true, 395 | }, 396 | [sym_tag_close] = { 397 | .visible = true, 398 | .named = true, 399 | }, 400 | [sym_attribute] = { 401 | .visible = true, 402 | .named = true, 403 | }, 404 | [sym__attribute_full] = { 405 | .visible = false, 406 | .named = true, 407 | }, 408 | [sym__attribute_shorthand] = { 409 | .visible = false, 410 | .named = true, 411 | }, 412 | [sym__shorthand_sigil] = { 413 | .visible = false, 414 | .named = true, 415 | }, 416 | [sym_annotation] = { 417 | .visible = true, 418 | .named = true, 419 | }, 420 | [sym_interpolation] = { 421 | .visible = true, 422 | .named = true, 423 | }, 424 | [sym_value] = { 425 | .visible = true, 426 | .named = true, 427 | }, 428 | [sym_primitive] = { 429 | .visible = true, 430 | .named = true, 431 | }, 432 | [sym_boolean] = { 433 | .visible = true, 434 | .named = true, 435 | }, 436 | [sym_string] = { 437 | .visible = true, 438 | .named = true, 439 | }, 440 | [sym__string_element] = { 441 | .visible = false, 442 | .named = true, 443 | }, 444 | [sym_compound] = { 445 | .visible = true, 446 | .named = true, 447 | }, 448 | [sym_array] = { 449 | .visible = true, 450 | .named = true, 451 | }, 452 | [sym__array_item] = { 453 | .visible = false, 454 | .named = true, 455 | }, 456 | [sym__array_item_with_optional_comma] = { 457 | .visible = false, 458 | .named = true, 459 | }, 460 | [sym_hash] = { 461 | .visible = true, 462 | .named = true, 463 | }, 464 | [sym__hash_item] = { 465 | .visible = false, 466 | .named = true, 467 | }, 468 | [sym__hash_key_value] = { 469 | .visible = false, 470 | .named = true, 471 | }, 472 | [sym__hash_item_with_optional_comma] = { 473 | .visible = false, 474 | .named = true, 475 | }, 476 | [sym_hash_key] = { 477 | .visible = true, 478 | .named = true, 479 | }, 480 | [sym_variable] = { 481 | .visible = true, 482 | .named = true, 483 | }, 484 | [sym_variable_tail] = { 485 | .visible = true, 486 | .named = true, 487 | }, 488 | [sym_variable_segment_value] = { 489 | .visible = true, 490 | .named = true, 491 | }, 492 | [sym_variable_sigil] = { 493 | .visible = true, 494 | .named = true, 495 | }, 496 | [sym_function] = { 497 | .visible = true, 498 | .named = true, 499 | }, 500 | [sym_function_parameters] = { 501 | .visible = true, 502 | .named = true, 503 | }, 504 | [sym_function_parameter_tail] = { 505 | .visible = true, 506 | .named = true, 507 | }, 508 | [sym_function_parameter] = { 509 | .visible = true, 510 | .named = true, 511 | }, 512 | [sym_function_parameter_named] = { 513 | .visible = true, 514 | .named = true, 515 | }, 516 | [aux_sym__space] = { 517 | .visible = false, 518 | .named = false, 519 | }, 520 | [aux_sym_content_repeat1] = { 521 | .visible = false, 522 | .named = false, 523 | }, 524 | [aux_sym_tag_open_repeat1] = { 525 | .visible = false, 526 | .named = false, 527 | }, 528 | [aux_sym_annotation_repeat1] = { 529 | .visible = false, 530 | .named = false, 531 | }, 532 | [aux_sym_interpolation_repeat1] = { 533 | .visible = false, 534 | .named = false, 535 | }, 536 | [aux_sym_string_repeat1] = { 537 | .visible = false, 538 | .named = false, 539 | }, 540 | [aux_sym_array_repeat1] = { 541 | .visible = false, 542 | .named = false, 543 | }, 544 | [aux_sym_hash_repeat1] = { 545 | .visible = false, 546 | .named = false, 547 | }, 548 | [aux_sym_variable_repeat1] = { 549 | .visible = false, 550 | .named = false, 551 | }, 552 | [aux_sym_function_repeat1] = { 553 | .visible = false, 554 | .named = false, 555 | }, 556 | [aux_sym_function_parameters_repeat1] = { 557 | .visible = false, 558 | .named = false, 559 | }, 560 | }; 561 | 562 | enum { 563 | field_function_name = 1, 564 | field_key = 2, 565 | field_parameter = 3, 566 | field_property = 4, 567 | field_shorthand = 5, 568 | field_tag_name = 6, 569 | field_variable = 7, 570 | }; 571 | 572 | static const char * const ts_field_names[] = { 573 | [0] = NULL, 574 | [field_function_name] = "function_name", 575 | [field_key] = "key", 576 | [field_parameter] = "parameter", 577 | [field_property] = "property", 578 | [field_shorthand] = "shorthand", 579 | [field_tag_name] = "tag_name", 580 | [field_variable] = "variable", 581 | }; 582 | 583 | static const TSFieldMapSlice ts_field_map_slices[PRODUCTION_ID_COUNT] = { 584 | [1] = {.index = 0, .length = 1}, 585 | [2] = {.index = 1, .length = 1}, 586 | [3] = {.index = 2, .length = 1}, 587 | [4] = {.index = 3, .length = 1}, 588 | [5] = {.index = 4, .length = 2}, 589 | [6] = {.index = 6, .length = 1}, 590 | [7] = {.index = 7, .length = 1}, 591 | [8] = {.index = 8, .length = 1}, 592 | [9] = {.index = 9, .length = 1}, 593 | [10] = {.index = 10, .length = 1}, 594 | }; 595 | 596 | static const TSFieldMapEntry ts_field_map_entries[] = { 597 | [0] = 598 | {field_tag_name, 0}, 599 | [1] = 600 | {field_key, 0, .inherited = true}, 601 | [2] = 602 | {field_shorthand, 0, .inherited = true}, 603 | [3] = 604 | {field_tag_name, 1}, 605 | [4] = 606 | {field_shorthand, 0}, 607 | {field_shorthand, 1}, 608 | [6] = 609 | {field_key, 0}, 610 | [7] = 611 | {field_variable, 1}, 612 | [8] = 613 | {field_function_name, 0}, 614 | [9] = 615 | {field_property, 1}, 616 | [10] = 617 | {field_parameter, 0}, 618 | }; 619 | 620 | static const TSSymbol ts_alias_sequences[PRODUCTION_ID_COUNT][MAX_ALIAS_SEQUENCE_LENGTH] = { 621 | [0] = {0}, 622 | }; 623 | 624 | static const uint16_t ts_non_terminal_alias_map[] = { 625 | 0, 626 | }; 627 | 628 | static const TSStateId ts_primary_state_ids[STATE_COUNT] = { 629 | [0] = 0, 630 | [1] = 1, 631 | [2] = 2, 632 | [3] = 3, 633 | [4] = 4, 634 | [5] = 4, 635 | [6] = 3, 636 | [7] = 7, 637 | [8] = 8, 638 | [9] = 7, 639 | [10] = 10, 640 | [11] = 11, 641 | [12] = 11, 642 | [13] = 13, 643 | [14] = 14, 644 | [15] = 15, 645 | [16] = 16, 646 | [17] = 17, 647 | [18] = 18, 648 | [19] = 19, 649 | [20] = 20, 650 | [21] = 21, 651 | [22] = 22, 652 | [23] = 23, 653 | [24] = 24, 654 | [25] = 25, 655 | [26] = 26, 656 | [27] = 27, 657 | [28] = 28, 658 | [29] = 29, 659 | [30] = 30, 660 | [31] = 31, 661 | [32] = 32, 662 | [33] = 33, 663 | [34] = 34, 664 | [35] = 35, 665 | [36] = 36, 666 | [37] = 37, 667 | [38] = 38, 668 | [39] = 39, 669 | [40] = 40, 670 | [41] = 41, 671 | [42] = 42, 672 | [43] = 43, 673 | [44] = 44, 674 | [45] = 45, 675 | [46] = 46, 676 | [47] = 47, 677 | [48] = 48, 678 | [49] = 49, 679 | [50] = 50, 680 | [51] = 51, 681 | [52] = 20, 682 | [53] = 53, 683 | [54] = 22, 684 | [55] = 55, 685 | [56] = 56, 686 | [57] = 21, 687 | [58] = 58, 688 | [59] = 59, 689 | [60] = 60, 690 | [61] = 61, 691 | [62] = 62, 692 | [63] = 25, 693 | [64] = 60, 694 | [65] = 61, 695 | [66] = 24, 696 | [67] = 30, 697 | [68] = 68, 698 | [69] = 40, 699 | [70] = 70, 700 | [71] = 71, 701 | [72] = 41, 702 | [73] = 73, 703 | [74] = 26, 704 | [75] = 29, 705 | [76] = 76, 706 | [77] = 27, 707 | [78] = 38, 708 | [79] = 79, 709 | [80] = 37, 710 | [81] = 28, 711 | [82] = 32, 712 | [83] = 83, 713 | [84] = 70, 714 | [85] = 23, 715 | [86] = 31, 716 | [87] = 36, 717 | [88] = 88, 718 | [89] = 89, 719 | [90] = 34, 720 | [91] = 91, 721 | [92] = 92, 722 | [93] = 93, 723 | [94] = 94, 724 | [95] = 95, 725 | [96] = 96, 726 | [97] = 97, 727 | [98] = 98, 728 | [99] = 99, 729 | [100] = 100, 730 | [101] = 101, 731 | [102] = 100, 732 | [103] = 99, 733 | [104] = 104, 734 | [105] = 105, 735 | [106] = 106, 736 | [107] = 107, 737 | [108] = 108, 738 | [109] = 109, 739 | [110] = 110, 740 | [111] = 111, 741 | [112] = 112, 742 | [113] = 113, 743 | [114] = 114, 744 | [115] = 115, 745 | [116] = 116, 746 | [117] = 117, 747 | [118] = 118, 748 | [119] = 119, 749 | [120] = 120, 750 | [121] = 121, 751 | [122] = 122, 752 | [123] = 123, 753 | [124] = 124, 754 | [125] = 125, 755 | [126] = 126, 756 | [127] = 127, 757 | [128] = 128, 758 | [129] = 129, 759 | [130] = 130, 760 | [131] = 131, 761 | [132] = 132, 762 | [133] = 133, 763 | [134] = 134, 764 | [135] = 135, 765 | [136] = 121, 766 | [137] = 137, 767 | [138] = 138, 768 | [139] = 139, 769 | [140] = 140, 770 | [141] = 141, 771 | [142] = 142, 772 | [143] = 138, 773 | [144] = 144, 774 | [145] = 145, 775 | [146] = 131, 776 | [147] = 130, 777 | [148] = 127, 778 | [149] = 122, 779 | [150] = 120, 780 | [151] = 141, 781 | }; 782 | 783 | static bool ts_lex(TSLexer *lexer, TSStateId state) { 784 | START_LEXER(); 785 | eof = lexer->eof(lexer); 786 | switch (state) { 787 | case 0: 788 | if (eof) ADVANCE(11); 789 | if (lookahead == '"') ADVANCE(21); 790 | if (lookahead == '#') ADVANCE(18); 791 | if (lookahead == '$') ADVANCE(31); 792 | if (lookahead == '%') ADVANCE(5); 793 | if (lookahead == '(') ADVANCE(33); 794 | if (lookahead == ')') ADVANCE(34); 795 | if (lookahead == ',') ADVANCE(26); 796 | if (lookahead == '-') ADVANCE(7); 797 | if (lookahead == '.') ADVANCE(17); 798 | if (lookahead == '/') ADVANCE(15); 799 | if (lookahead == ':') ADVANCE(30); 800 | if (lookahead == '=') ADVANCE(16); 801 | if (lookahead == '@') ADVANCE(32); 802 | if (lookahead == '[') ADVANCE(24); 803 | if (lookahead == '\\') ADVANCE(6); 804 | if (lookahead == ']') ADVANCE(25); 805 | if (lookahead == '{') ADVANCE(28); 806 | if (lookahead == '}') ADVANCE(29); 807 | if (lookahead == '\t' || 808 | lookahead == '\n' || 809 | lookahead == '\r' || 810 | lookahead == ' ') SKIP(9) 811 | if (('0' <= lookahead && lookahead <= '9')) ADVANCE(19); 812 | if (('A' <= lookahead && lookahead <= 'Z') || 813 | ('a' <= lookahead && lookahead <= 'z')) ADVANCE(35); 814 | END_STATE(); 815 | case 1: 816 | if (lookahead == '\t') ADVANCE(36); 817 | if (lookahead == '\n') ADVANCE(38); 818 | if (lookahead == '\r') SKIP(1) 819 | if (lookahead == ' ') ADVANCE(37); 820 | if (lookahead == '"') ADVANCE(21); 821 | if (lookahead == '#') ADVANCE(18); 822 | if (lookahead == '$') ADVANCE(31); 823 | if (lookahead == '%') ADVANCE(5); 824 | if (lookahead == '(') ADVANCE(33); 825 | if (lookahead == '-') ADVANCE(7); 826 | if (lookahead == '.') ADVANCE(17); 827 | if (lookahead == '/') ADVANCE(15); 828 | if (lookahead == '=') ADVANCE(16); 829 | if (lookahead == '@') ADVANCE(32); 830 | if (lookahead == '[') ADVANCE(24); 831 | if (lookahead == '{') ADVANCE(27); 832 | if (('0' <= lookahead && lookahead <= '9')) ADVANCE(19); 833 | if (('A' <= lookahead && lookahead <= 'Z') || 834 | ('a' <= lookahead && lookahead <= 'z')) ADVANCE(35); 835 | END_STATE(); 836 | case 2: 837 | if (lookahead == '"') ADVANCE(21); 838 | if (lookahead == '$') ADVANCE(31); 839 | if (lookahead == ')') ADVANCE(34); 840 | if (lookahead == ',') ADVANCE(26); 841 | if (lookahead == '-') ADVANCE(7); 842 | if (lookahead == '.') ADVANCE(17); 843 | if (lookahead == ':') ADVANCE(30); 844 | if (lookahead == '@') ADVANCE(32); 845 | if (lookahead == '[') ADVANCE(24); 846 | if (lookahead == ']') ADVANCE(25); 847 | if (lookahead == '{') ADVANCE(27); 848 | if (lookahead == '}') ADVANCE(29); 849 | if (lookahead == '\t' || 850 | lookahead == '\n' || 851 | lookahead == '\r' || 852 | lookahead == ' ') SKIP(2) 853 | if (('0' <= lookahead && lookahead <= '9')) ADVANCE(19); 854 | if (('A' <= lookahead && lookahead <= 'Z') || 855 | ('a' <= lookahead && lookahead <= 'z')) ADVANCE(35); 856 | END_STATE(); 857 | case 3: 858 | if (lookahead == '"') ADVANCE(21); 859 | if (lookahead == '\\') ADVANCE(6); 860 | if (lookahead == '\t' || 861 | lookahead == '\n' || 862 | lookahead == '\r' || 863 | lookahead == ' ') ADVANCE(22); 864 | if (lookahead != 0) ADVANCE(22); 865 | END_STATE(); 866 | case 4: 867 | if (lookahead == '%') ADVANCE(13); 868 | END_STATE(); 869 | case 5: 870 | if (lookahead == '}') ADVANCE(14); 871 | END_STATE(); 872 | case 6: 873 | if (lookahead == '"' || 874 | lookahead == '\\' || 875 | lookahead == 'n' || 876 | lookahead == 'r' || 877 | lookahead == 't') ADVANCE(23); 878 | END_STATE(); 879 | case 7: 880 | if (('0' <= lookahead && lookahead <= '9')) ADVANCE(19); 881 | END_STATE(); 882 | case 8: 883 | if (('0' <= lookahead && lookahead <= '9')) ADVANCE(20); 884 | END_STATE(); 885 | case 9: 886 | if (eof) ADVANCE(11); 887 | if (lookahead == '"') ADVANCE(21); 888 | if (lookahead == '#') ADVANCE(18); 889 | if (lookahead == '$') ADVANCE(31); 890 | if (lookahead == '%') ADVANCE(5); 891 | if (lookahead == '(') ADVANCE(33); 892 | if (lookahead == ')') ADVANCE(34); 893 | if (lookahead == ',') ADVANCE(26); 894 | if (lookahead == '-') ADVANCE(7); 895 | if (lookahead == '.') ADVANCE(17); 896 | if (lookahead == '/') ADVANCE(15); 897 | if (lookahead == ':') ADVANCE(30); 898 | if (lookahead == '=') ADVANCE(16); 899 | if (lookahead == '@') ADVANCE(32); 900 | if (lookahead == '[') ADVANCE(24); 901 | if (lookahead == ']') ADVANCE(25); 902 | if (lookahead == '{') ADVANCE(28); 903 | if (lookahead == '}') ADVANCE(29); 904 | if (lookahead == '\t' || 905 | lookahead == '\n' || 906 | lookahead == '\r' || 907 | lookahead == ' ') SKIP(9) 908 | if (('0' <= lookahead && lookahead <= '9')) ADVANCE(19); 909 | if (('A' <= lookahead && lookahead <= 'Z') || 910 | ('a' <= lookahead && lookahead <= 'z')) ADVANCE(35); 911 | END_STATE(); 912 | case 10: 913 | if (eof) ADVANCE(11); 914 | if (lookahead == '{') ADVANCE(4); 915 | if (lookahead == '\t' || 916 | lookahead == '\n' || 917 | lookahead == '\r' || 918 | lookahead == ' ') SKIP(10) 919 | if (lookahead != 0) ADVANCE(12); 920 | END_STATE(); 921 | case 11: 922 | ACCEPT_TOKEN(ts_builtin_sym_end); 923 | END_STATE(); 924 | case 12: 925 | ACCEPT_TOKEN(aux_sym_markdown_token1); 926 | if (lookahead == '\t' || 927 | lookahead == '\n' || 928 | lookahead == '\r' || 929 | lookahead == ' ') ADVANCE(12); 930 | if (lookahead != 0 && 931 | lookahead != '{') ADVANCE(12); 932 | END_STATE(); 933 | case 13: 934 | ACCEPT_TOKEN(sym_tag_start); 935 | END_STATE(); 936 | case 14: 937 | ACCEPT_TOKEN(sym_tag_end); 938 | END_STATE(); 939 | case 15: 940 | ACCEPT_TOKEN(anon_sym_SLASH); 941 | END_STATE(); 942 | case 16: 943 | ACCEPT_TOKEN(anon_sym_EQ); 944 | END_STATE(); 945 | case 17: 946 | ACCEPT_TOKEN(anon_sym_DOT); 947 | END_STATE(); 948 | case 18: 949 | ACCEPT_TOKEN(anon_sym_POUND); 950 | END_STATE(); 951 | case 19: 952 | ACCEPT_TOKEN(sym_number); 953 | if (lookahead == '.') ADVANCE(8); 954 | if (('0' <= lookahead && lookahead <= '9')) ADVANCE(19); 955 | END_STATE(); 956 | case 20: 957 | ACCEPT_TOKEN(sym_number); 958 | if (('0' <= lookahead && lookahead <= '9')) ADVANCE(20); 959 | END_STATE(); 960 | case 21: 961 | ACCEPT_TOKEN(anon_sym_DQUOTE); 962 | END_STATE(); 963 | case 22: 964 | ACCEPT_TOKEN(sym__string_character); 965 | END_STATE(); 966 | case 23: 967 | ACCEPT_TOKEN(sym__string_escape_sequence); 968 | END_STATE(); 969 | case 24: 970 | ACCEPT_TOKEN(anon_sym_LBRACK); 971 | END_STATE(); 972 | case 25: 973 | ACCEPT_TOKEN(anon_sym_RBRACK); 974 | END_STATE(); 975 | case 26: 976 | ACCEPT_TOKEN(anon_sym_COMMA); 977 | END_STATE(); 978 | case 27: 979 | ACCEPT_TOKEN(anon_sym_LBRACE); 980 | END_STATE(); 981 | case 28: 982 | ACCEPT_TOKEN(anon_sym_LBRACE); 983 | if (lookahead == '%') ADVANCE(13); 984 | END_STATE(); 985 | case 29: 986 | ACCEPT_TOKEN(anon_sym_RBRACE); 987 | END_STATE(); 988 | case 30: 989 | ACCEPT_TOKEN(anon_sym_COLON); 990 | END_STATE(); 991 | case 31: 992 | ACCEPT_TOKEN(anon_sym_DOLLAR); 993 | END_STATE(); 994 | case 32: 995 | ACCEPT_TOKEN(anon_sym_AT); 996 | END_STATE(); 997 | case 33: 998 | ACCEPT_TOKEN(anon_sym_LPAREN); 999 | END_STATE(); 1000 | case 34: 1001 | ACCEPT_TOKEN(anon_sym_RPAREN); 1002 | END_STATE(); 1003 | case 35: 1004 | ACCEPT_TOKEN(sym_identifier); 1005 | if (lookahead == '-' || 1006 | ('0' <= lookahead && lookahead <= '9') || 1007 | ('A' <= lookahead && lookahead <= 'Z') || 1008 | lookahead == '_' || 1009 | ('a' <= lookahead && lookahead <= 'z')) ADVANCE(35); 1010 | END_STATE(); 1011 | case 36: 1012 | ACCEPT_TOKEN(anon_sym_TAB); 1013 | if (lookahead == '\t') ADVANCE(36); 1014 | if (lookahead == '\n') ADVANCE(38); 1015 | if (lookahead == ' ') ADVANCE(37); 1016 | END_STATE(); 1017 | case 37: 1018 | ACCEPT_TOKEN(anon_sym_); 1019 | if (lookahead == '\t') ADVANCE(36); 1020 | if (lookahead == '\n') ADVANCE(38); 1021 | if (lookahead == ' ') ADVANCE(37); 1022 | END_STATE(); 1023 | case 38: 1024 | ACCEPT_TOKEN(anon_sym_LF); 1025 | if (lookahead == '\t') ADVANCE(36); 1026 | if (lookahead == '\n') ADVANCE(38); 1027 | if (lookahead == ' ') ADVANCE(37); 1028 | END_STATE(); 1029 | default: 1030 | return false; 1031 | } 1032 | } 1033 | 1034 | static bool ts_lex_keywords(TSLexer *lexer, TSStateId state) { 1035 | START_LEXER(); 1036 | eof = lexer->eof(lexer); 1037 | switch (state) { 1038 | case 0: 1039 | if (lookahead == 'f') ADVANCE(1); 1040 | if (lookahead == 'n') ADVANCE(2); 1041 | if (lookahead == 't') ADVANCE(3); 1042 | if (lookahead == '\t' || 1043 | lookahead == '\n' || 1044 | lookahead == '\r' || 1045 | lookahead == ' ') SKIP(0) 1046 | END_STATE(); 1047 | case 1: 1048 | if (lookahead == 'a') ADVANCE(4); 1049 | END_STATE(); 1050 | case 2: 1051 | if (lookahead == 'u') ADVANCE(5); 1052 | END_STATE(); 1053 | case 3: 1054 | if (lookahead == 'r') ADVANCE(6); 1055 | END_STATE(); 1056 | case 4: 1057 | if (lookahead == 'l') ADVANCE(7); 1058 | END_STATE(); 1059 | case 5: 1060 | if (lookahead == 'l') ADVANCE(8); 1061 | END_STATE(); 1062 | case 6: 1063 | if (lookahead == 'u') ADVANCE(9); 1064 | END_STATE(); 1065 | case 7: 1066 | if (lookahead == 's') ADVANCE(10); 1067 | END_STATE(); 1068 | case 8: 1069 | if (lookahead == 'l') ADVANCE(11); 1070 | END_STATE(); 1071 | case 9: 1072 | if (lookahead == 'e') ADVANCE(12); 1073 | END_STATE(); 1074 | case 10: 1075 | if (lookahead == 'e') ADVANCE(13); 1076 | END_STATE(); 1077 | case 11: 1078 | ACCEPT_TOKEN(sym_null); 1079 | END_STATE(); 1080 | case 12: 1081 | ACCEPT_TOKEN(anon_sym_true); 1082 | END_STATE(); 1083 | case 13: 1084 | ACCEPT_TOKEN(anon_sym_false); 1085 | END_STATE(); 1086 | default: 1087 | return false; 1088 | } 1089 | } 1090 | 1091 | static const TSLexMode ts_lex_modes[STATE_COUNT] = { 1092 | [0] = {.lex_state = 0}, 1093 | [1] = {.lex_state = 10}, 1094 | [2] = {.lex_state = 1}, 1095 | [3] = {.lex_state = 2}, 1096 | [4] = {.lex_state = 2}, 1097 | [5] = {.lex_state = 2}, 1098 | [6] = {.lex_state = 2}, 1099 | [7] = {.lex_state = 2}, 1100 | [8] = {.lex_state = 2}, 1101 | [9] = {.lex_state = 2}, 1102 | [10] = {.lex_state = 2}, 1103 | [11] = {.lex_state = 2}, 1104 | [12] = {.lex_state = 2}, 1105 | [13] = {.lex_state = 2}, 1106 | [14] = {.lex_state = 1}, 1107 | [15] = {.lex_state = 2}, 1108 | [16] = {.lex_state = 2}, 1109 | [17] = {.lex_state = 2}, 1110 | [18] = {.lex_state = 1}, 1111 | [19] = {.lex_state = 1}, 1112 | [20] = {.lex_state = 2}, 1113 | [21] = {.lex_state = 2}, 1114 | [22] = {.lex_state = 2}, 1115 | [23] = {.lex_state = 2}, 1116 | [24] = {.lex_state = 2}, 1117 | [25] = {.lex_state = 2}, 1118 | [26] = {.lex_state = 2}, 1119 | [27] = {.lex_state = 2}, 1120 | [28] = {.lex_state = 2}, 1121 | [29] = {.lex_state = 2}, 1122 | [30] = {.lex_state = 2}, 1123 | [31] = {.lex_state = 2}, 1124 | [32] = {.lex_state = 2}, 1125 | [33] = {.lex_state = 2}, 1126 | [34] = {.lex_state = 2}, 1127 | [35] = {.lex_state = 2}, 1128 | [36] = {.lex_state = 2}, 1129 | [37] = {.lex_state = 2}, 1130 | [38] = {.lex_state = 2}, 1131 | [39] = {.lex_state = 2}, 1132 | [40] = {.lex_state = 2}, 1133 | [41] = {.lex_state = 2}, 1134 | [42] = {.lex_state = 1}, 1135 | [43] = {.lex_state = 1}, 1136 | [44] = {.lex_state = 1}, 1137 | [45] = {.lex_state = 1}, 1138 | [46] = {.lex_state = 1}, 1139 | [47] = {.lex_state = 2}, 1140 | [48] = {.lex_state = 2}, 1141 | [49] = {.lex_state = 1}, 1142 | [50] = {.lex_state = 2}, 1143 | [51] = {.lex_state = 1}, 1144 | [52] = {.lex_state = 1}, 1145 | [53] = {.lex_state = 2}, 1146 | [54] = {.lex_state = 1}, 1147 | [55] = {.lex_state = 1}, 1148 | [56] = {.lex_state = 1}, 1149 | [57] = {.lex_state = 1}, 1150 | [58] = {.lex_state = 2}, 1151 | [59] = {.lex_state = 1}, 1152 | [60] = {.lex_state = 0}, 1153 | [61] = {.lex_state = 0}, 1154 | [62] = {.lex_state = 1}, 1155 | [63] = {.lex_state = 1}, 1156 | [64] = {.lex_state = 0}, 1157 | [65] = {.lex_state = 0}, 1158 | [66] = {.lex_state = 1}, 1159 | [67] = {.lex_state = 1}, 1160 | [68] = {.lex_state = 1}, 1161 | [69] = {.lex_state = 1}, 1162 | [70] = {.lex_state = 0}, 1163 | [71] = {.lex_state = 1}, 1164 | [72] = {.lex_state = 1}, 1165 | [73] = {.lex_state = 10}, 1166 | [74] = {.lex_state = 1}, 1167 | [75] = {.lex_state = 1}, 1168 | [76] = {.lex_state = 1}, 1169 | [77] = {.lex_state = 1}, 1170 | [78] = {.lex_state = 1}, 1171 | [79] = {.lex_state = 1}, 1172 | [80] = {.lex_state = 1}, 1173 | [81] = {.lex_state = 1}, 1174 | [82] = {.lex_state = 1}, 1175 | [83] = {.lex_state = 1}, 1176 | [84] = {.lex_state = 0}, 1177 | [85] = {.lex_state = 1}, 1178 | [86] = {.lex_state = 1}, 1179 | [87] = {.lex_state = 1}, 1180 | [88] = {.lex_state = 0}, 1181 | [89] = {.lex_state = 10}, 1182 | [90] = {.lex_state = 1}, 1183 | [91] = {.lex_state = 1}, 1184 | [92] = {.lex_state = 1}, 1185 | [93] = {.lex_state = 1}, 1186 | [94] = {.lex_state = 1}, 1187 | [95] = {.lex_state = 1}, 1188 | [96] = {.lex_state = 1}, 1189 | [97] = {.lex_state = 1}, 1190 | [98] = {.lex_state = 3}, 1191 | [99] = {.lex_state = 3}, 1192 | [100] = {.lex_state = 3}, 1193 | [101] = {.lex_state = 1}, 1194 | [102] = {.lex_state = 3}, 1195 | [103] = {.lex_state = 3}, 1196 | [104] = {.lex_state = 1}, 1197 | [105] = {.lex_state = 0}, 1198 | [106] = {.lex_state = 10}, 1199 | [107] = {.lex_state = 10}, 1200 | [108] = {.lex_state = 10}, 1201 | [109] = {.lex_state = 10}, 1202 | [110] = {.lex_state = 0}, 1203 | [111] = {.lex_state = 10}, 1204 | [112] = {.lex_state = 10}, 1205 | [113] = {.lex_state = 10}, 1206 | [114] = {.lex_state = 0}, 1207 | [115] = {.lex_state = 0}, 1208 | [116] = {.lex_state = 0}, 1209 | [117] = {.lex_state = 0}, 1210 | [118] = {.lex_state = 0}, 1211 | [119] = {.lex_state = 0}, 1212 | [120] = {.lex_state = 0}, 1213 | [121] = {.lex_state = 0}, 1214 | [122] = {.lex_state = 0}, 1215 | [123] = {.lex_state = 0}, 1216 | [124] = {.lex_state = 0}, 1217 | [125] = {.lex_state = 0}, 1218 | [126] = {.lex_state = 0}, 1219 | [127] = {.lex_state = 0}, 1220 | [128] = {.lex_state = 0}, 1221 | [129] = {.lex_state = 0}, 1222 | [130] = {.lex_state = 0}, 1223 | [131] = {.lex_state = 0}, 1224 | [132] = {.lex_state = 0}, 1225 | [133] = {.lex_state = 0}, 1226 | [134] = {.lex_state = 0}, 1227 | [135] = {.lex_state = 0}, 1228 | [136] = {.lex_state = 0}, 1229 | [137] = {.lex_state = 0}, 1230 | [138] = {.lex_state = 0}, 1231 | [139] = {.lex_state = 0}, 1232 | [140] = {.lex_state = 0}, 1233 | [141] = {.lex_state = 0}, 1234 | [142] = {.lex_state = 0}, 1235 | [143] = {.lex_state = 0}, 1236 | [144] = {.lex_state = 0}, 1237 | [145] = {.lex_state = 0}, 1238 | [146] = {.lex_state = 0}, 1239 | [147] = {.lex_state = 0}, 1240 | [148] = {.lex_state = 0}, 1241 | [149] = {.lex_state = 0}, 1242 | [150] = {.lex_state = 0}, 1243 | [151] = {.lex_state = 0}, 1244 | }; 1245 | 1246 | static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { 1247 | [0] = { 1248 | [ts_builtin_sym_end] = ACTIONS(1), 1249 | [sym_identifier] = ACTIONS(1), 1250 | [sym_tag_start] = ACTIONS(1), 1251 | [sym_tag_end] = ACTIONS(1), 1252 | [anon_sym_SLASH] = ACTIONS(1), 1253 | [anon_sym_EQ] = ACTIONS(1), 1254 | [anon_sym_DOT] = ACTIONS(1), 1255 | [anon_sym_POUND] = ACTIONS(1), 1256 | [sym_null] = ACTIONS(1), 1257 | [anon_sym_true] = ACTIONS(1), 1258 | [anon_sym_false] = ACTIONS(1), 1259 | [sym_number] = ACTIONS(1), 1260 | [anon_sym_DQUOTE] = ACTIONS(1), 1261 | [sym__string_escape_sequence] = ACTIONS(1), 1262 | [anon_sym_LBRACK] = ACTIONS(1), 1263 | [anon_sym_RBRACK] = ACTIONS(1), 1264 | [anon_sym_COMMA] = ACTIONS(1), 1265 | [anon_sym_LBRACE] = ACTIONS(1), 1266 | [anon_sym_RBRACE] = ACTIONS(1), 1267 | [anon_sym_COLON] = ACTIONS(1), 1268 | [anon_sym_DOLLAR] = ACTIONS(1), 1269 | [anon_sym_AT] = ACTIONS(1), 1270 | [anon_sym_LPAREN] = ACTIONS(1), 1271 | [anon_sym_RPAREN] = ACTIONS(1), 1272 | }, 1273 | [1] = { 1274 | [sym_content] = STATE(145), 1275 | [sym_markdown] = STATE(73), 1276 | [sym_tag] = STATE(73), 1277 | [sym_annotation] = STATE(73), 1278 | [sym_interpolation] = STATE(73), 1279 | [aux_sym_content_repeat1] = STATE(73), 1280 | [ts_builtin_sym_end] = ACTIONS(3), 1281 | [aux_sym_markdown_token1] = ACTIONS(5), 1282 | [sym_tag_start] = ACTIONS(7), 1283 | }, 1284 | }; 1285 | 1286 | static const uint16_t ts_small_parse_table[] = { 1287 | [0] = 20, 1288 | ACTIONS(9), 1, 1289 | sym_identifier, 1290 | ACTIONS(19), 1, 1291 | anon_sym_DQUOTE, 1292 | ACTIONS(21), 1, 1293 | anon_sym_LBRACK, 1294 | ACTIONS(23), 1, 1295 | anon_sym_LBRACE, 1296 | STATE(18), 1, 1297 | aux_sym__space, 1298 | STATE(79), 1, 1299 | sym__attribute_full, 1300 | STATE(83), 1, 1301 | sym__attribute_shorthand, 1302 | STATE(95), 1, 1303 | sym_value, 1304 | STATE(101), 1, 1305 | sym_attribute, 1306 | STATE(129), 1, 1307 | sym__shorthand_sigil, 1308 | STATE(136), 1, 1309 | sym_variable_sigil, 1310 | ACTIONS(11), 2, 1311 | sym_tag_end, 1312 | anon_sym_SLASH, 1313 | ACTIONS(13), 2, 1314 | anon_sym_DOT, 1315 | anon_sym_POUND, 1316 | ACTIONS(15), 2, 1317 | sym_null, 1318 | sym_number, 1319 | ACTIONS(17), 2, 1320 | anon_sym_true, 1321 | anon_sym_false, 1322 | ACTIONS(25), 2, 1323 | anon_sym_DOLLAR, 1324 | anon_sym_AT, 1325 | STATE(75), 2, 1326 | sym_boolean, 1327 | sym_string, 1328 | STATE(81), 2, 1329 | sym_array, 1330 | sym_hash, 1331 | ACTIONS(27), 3, 1332 | anon_sym_TAB, 1333 | anon_sym_, 1334 | anon_sym_LF, 1335 | STATE(82), 4, 1336 | sym_primitive, 1337 | sym_compound, 1338 | sym_variable, 1339 | sym_function, 1340 | [73] = 16, 1341 | ACTIONS(29), 1, 1342 | sym_identifier, 1343 | ACTIONS(31), 1, 1344 | sym_null, 1345 | ACTIONS(35), 1, 1346 | sym_number, 1347 | ACTIONS(37), 1, 1348 | anon_sym_DQUOTE, 1349 | ACTIONS(39), 1, 1350 | anon_sym_LBRACK, 1351 | ACTIONS(41), 1, 1352 | anon_sym_RBRACK, 1353 | ACTIONS(43), 1, 1354 | anon_sym_LBRACE, 1355 | STATE(118), 1, 1356 | sym_value, 1357 | STATE(121), 1, 1358 | sym_variable_sigil, 1359 | STATE(141), 1, 1360 | sym__array_item_with_optional_comma, 1361 | ACTIONS(33), 2, 1362 | anon_sym_true, 1363 | anon_sym_false, 1364 | ACTIONS(45), 2, 1365 | anon_sym_DOLLAR, 1366 | anon_sym_AT, 1367 | STATE(4), 2, 1368 | sym__array_item, 1369 | aux_sym_array_repeat1, 1370 | STATE(28), 2, 1371 | sym_array, 1372 | sym_hash, 1373 | STATE(29), 2, 1374 | sym_boolean, 1375 | sym_string, 1376 | STATE(32), 4, 1377 | sym_primitive, 1378 | sym_compound, 1379 | sym_variable, 1380 | sym_function, 1381 | [130] = 16, 1382 | ACTIONS(29), 1, 1383 | sym_identifier, 1384 | ACTIONS(31), 1, 1385 | sym_null, 1386 | ACTIONS(35), 1, 1387 | sym_number, 1388 | ACTIONS(37), 1, 1389 | anon_sym_DQUOTE, 1390 | ACTIONS(39), 1, 1391 | anon_sym_LBRACK, 1392 | ACTIONS(43), 1, 1393 | anon_sym_LBRACE, 1394 | ACTIONS(47), 1, 1395 | anon_sym_RBRACK, 1396 | STATE(118), 1, 1397 | sym_value, 1398 | STATE(121), 1, 1399 | sym_variable_sigil, 1400 | STATE(147), 1, 1401 | sym__array_item_with_optional_comma, 1402 | ACTIONS(33), 2, 1403 | anon_sym_true, 1404 | anon_sym_false, 1405 | ACTIONS(45), 2, 1406 | anon_sym_DOLLAR, 1407 | anon_sym_AT, 1408 | STATE(10), 2, 1409 | sym__array_item, 1410 | aux_sym_array_repeat1, 1411 | STATE(28), 2, 1412 | sym_array, 1413 | sym_hash, 1414 | STATE(29), 2, 1415 | sym_boolean, 1416 | sym_string, 1417 | STATE(32), 4, 1418 | sym_primitive, 1419 | sym_compound, 1420 | sym_variable, 1421 | sym_function, 1422 | [187] = 16, 1423 | ACTIONS(29), 1, 1424 | sym_identifier, 1425 | ACTIONS(31), 1, 1426 | sym_null, 1427 | ACTIONS(35), 1, 1428 | sym_number, 1429 | ACTIONS(37), 1, 1430 | anon_sym_DQUOTE, 1431 | ACTIONS(39), 1, 1432 | anon_sym_LBRACK, 1433 | ACTIONS(43), 1, 1434 | anon_sym_LBRACE, 1435 | ACTIONS(49), 1, 1436 | anon_sym_RBRACK, 1437 | STATE(118), 1, 1438 | sym_value, 1439 | STATE(121), 1, 1440 | sym_variable_sigil, 1441 | STATE(130), 1, 1442 | sym__array_item_with_optional_comma, 1443 | ACTIONS(33), 2, 1444 | anon_sym_true, 1445 | anon_sym_false, 1446 | ACTIONS(45), 2, 1447 | anon_sym_DOLLAR, 1448 | anon_sym_AT, 1449 | STATE(10), 2, 1450 | sym__array_item, 1451 | aux_sym_array_repeat1, 1452 | STATE(28), 2, 1453 | sym_array, 1454 | sym_hash, 1455 | STATE(29), 2, 1456 | sym_boolean, 1457 | sym_string, 1458 | STATE(32), 4, 1459 | sym_primitive, 1460 | sym_compound, 1461 | sym_variable, 1462 | sym_function, 1463 | [244] = 16, 1464 | ACTIONS(29), 1, 1465 | sym_identifier, 1466 | ACTIONS(31), 1, 1467 | sym_null, 1468 | ACTIONS(35), 1, 1469 | sym_number, 1470 | ACTIONS(37), 1, 1471 | anon_sym_DQUOTE, 1472 | ACTIONS(39), 1, 1473 | anon_sym_LBRACK, 1474 | ACTIONS(43), 1, 1475 | anon_sym_LBRACE, 1476 | ACTIONS(51), 1, 1477 | anon_sym_RBRACK, 1478 | STATE(118), 1, 1479 | sym_value, 1480 | STATE(121), 1, 1481 | sym_variable_sigil, 1482 | STATE(151), 1, 1483 | sym__array_item_with_optional_comma, 1484 | ACTIONS(33), 2, 1485 | anon_sym_true, 1486 | anon_sym_false, 1487 | ACTIONS(45), 2, 1488 | anon_sym_DOLLAR, 1489 | anon_sym_AT, 1490 | STATE(5), 2, 1491 | sym__array_item, 1492 | aux_sym_array_repeat1, 1493 | STATE(28), 2, 1494 | sym_array, 1495 | sym_hash, 1496 | STATE(29), 2, 1497 | sym_boolean, 1498 | sym_string, 1499 | STATE(32), 4, 1500 | sym_primitive, 1501 | sym_compound, 1502 | sym_variable, 1503 | sym_function, 1504 | [301] = 15, 1505 | ACTIONS(29), 1, 1506 | sym_identifier, 1507 | ACTIONS(31), 1, 1508 | sym_null, 1509 | ACTIONS(35), 1, 1510 | sym_number, 1511 | ACTIONS(37), 1, 1512 | anon_sym_DQUOTE, 1513 | ACTIONS(39), 1, 1514 | anon_sym_LBRACK, 1515 | ACTIONS(43), 1, 1516 | anon_sym_LBRACE, 1517 | ACTIONS(53), 1, 1518 | anon_sym_RPAREN, 1519 | STATE(35), 1, 1520 | sym_value, 1521 | STATE(121), 1, 1522 | sym_variable_sigil, 1523 | ACTIONS(33), 2, 1524 | anon_sym_true, 1525 | anon_sym_false, 1526 | ACTIONS(45), 2, 1527 | anon_sym_DOLLAR, 1528 | anon_sym_AT, 1529 | STATE(11), 2, 1530 | sym_function_parameters, 1531 | aux_sym_function_repeat1, 1532 | STATE(28), 2, 1533 | sym_array, 1534 | sym_hash, 1535 | STATE(29), 2, 1536 | sym_boolean, 1537 | sym_string, 1538 | STATE(32), 4, 1539 | sym_primitive, 1540 | sym_compound, 1541 | sym_variable, 1542 | sym_function, 1543 | [355] = 15, 1544 | ACTIONS(55), 1, 1545 | sym_identifier, 1546 | ACTIONS(58), 1, 1547 | sym_null, 1548 | ACTIONS(64), 1, 1549 | sym_number, 1550 | ACTIONS(67), 1, 1551 | anon_sym_DQUOTE, 1552 | ACTIONS(70), 1, 1553 | anon_sym_LBRACK, 1554 | ACTIONS(73), 1, 1555 | anon_sym_LBRACE, 1556 | ACTIONS(79), 1, 1557 | anon_sym_RPAREN, 1558 | STATE(35), 1, 1559 | sym_value, 1560 | STATE(121), 1, 1561 | sym_variable_sigil, 1562 | ACTIONS(61), 2, 1563 | anon_sym_true, 1564 | anon_sym_false, 1565 | ACTIONS(76), 2, 1566 | anon_sym_DOLLAR, 1567 | anon_sym_AT, 1568 | STATE(8), 2, 1569 | sym_function_parameters, 1570 | aux_sym_function_repeat1, 1571 | STATE(28), 2, 1572 | sym_array, 1573 | sym_hash, 1574 | STATE(29), 2, 1575 | sym_boolean, 1576 | sym_string, 1577 | STATE(32), 4, 1578 | sym_primitive, 1579 | sym_compound, 1580 | sym_variable, 1581 | sym_function, 1582 | [409] = 15, 1583 | ACTIONS(29), 1, 1584 | sym_identifier, 1585 | ACTIONS(31), 1, 1586 | sym_null, 1587 | ACTIONS(35), 1, 1588 | sym_number, 1589 | ACTIONS(37), 1, 1590 | anon_sym_DQUOTE, 1591 | ACTIONS(39), 1, 1592 | anon_sym_LBRACK, 1593 | ACTIONS(43), 1, 1594 | anon_sym_LBRACE, 1595 | ACTIONS(81), 1, 1596 | anon_sym_RPAREN, 1597 | STATE(35), 1, 1598 | sym_value, 1599 | STATE(121), 1, 1600 | sym_variable_sigil, 1601 | ACTIONS(33), 2, 1602 | anon_sym_true, 1603 | anon_sym_false, 1604 | ACTIONS(45), 2, 1605 | anon_sym_DOLLAR, 1606 | anon_sym_AT, 1607 | STATE(12), 2, 1608 | sym_function_parameters, 1609 | aux_sym_function_repeat1, 1610 | STATE(28), 2, 1611 | sym_array, 1612 | sym_hash, 1613 | STATE(29), 2, 1614 | sym_boolean, 1615 | sym_string, 1616 | STATE(32), 4, 1617 | sym_primitive, 1618 | sym_compound, 1619 | sym_variable, 1620 | sym_function, 1621 | [463] = 15, 1622 | ACTIONS(83), 1, 1623 | sym_identifier, 1624 | ACTIONS(86), 1, 1625 | sym_null, 1626 | ACTIONS(92), 1, 1627 | sym_number, 1628 | ACTIONS(95), 1, 1629 | anon_sym_DQUOTE, 1630 | ACTIONS(98), 1, 1631 | anon_sym_LBRACK, 1632 | ACTIONS(101), 1, 1633 | anon_sym_RBRACK, 1634 | ACTIONS(103), 1, 1635 | anon_sym_LBRACE, 1636 | STATE(121), 1, 1637 | sym_variable_sigil, 1638 | STATE(128), 1, 1639 | sym_value, 1640 | ACTIONS(89), 2, 1641 | anon_sym_true, 1642 | anon_sym_false, 1643 | ACTIONS(106), 2, 1644 | anon_sym_DOLLAR, 1645 | anon_sym_AT, 1646 | STATE(10), 2, 1647 | sym__array_item, 1648 | aux_sym_array_repeat1, 1649 | STATE(28), 2, 1650 | sym_array, 1651 | sym_hash, 1652 | STATE(29), 2, 1653 | sym_boolean, 1654 | sym_string, 1655 | STATE(32), 4, 1656 | sym_primitive, 1657 | sym_compound, 1658 | sym_variable, 1659 | sym_function, 1660 | [517] = 15, 1661 | ACTIONS(29), 1, 1662 | sym_identifier, 1663 | ACTIONS(31), 1, 1664 | sym_null, 1665 | ACTIONS(35), 1, 1666 | sym_number, 1667 | ACTIONS(37), 1, 1668 | anon_sym_DQUOTE, 1669 | ACTIONS(39), 1, 1670 | anon_sym_LBRACK, 1671 | ACTIONS(43), 1, 1672 | anon_sym_LBRACE, 1673 | ACTIONS(109), 1, 1674 | anon_sym_RPAREN, 1675 | STATE(35), 1, 1676 | sym_value, 1677 | STATE(121), 1, 1678 | sym_variable_sigil, 1679 | ACTIONS(33), 2, 1680 | anon_sym_true, 1681 | anon_sym_false, 1682 | ACTIONS(45), 2, 1683 | anon_sym_DOLLAR, 1684 | anon_sym_AT, 1685 | STATE(8), 2, 1686 | sym_function_parameters, 1687 | aux_sym_function_repeat1, 1688 | STATE(28), 2, 1689 | sym_array, 1690 | sym_hash, 1691 | STATE(29), 2, 1692 | sym_boolean, 1693 | sym_string, 1694 | STATE(32), 4, 1695 | sym_primitive, 1696 | sym_compound, 1697 | sym_variable, 1698 | sym_function, 1699 | [571] = 15, 1700 | ACTIONS(29), 1, 1701 | sym_identifier, 1702 | ACTIONS(31), 1, 1703 | sym_null, 1704 | ACTIONS(35), 1, 1705 | sym_number, 1706 | ACTIONS(37), 1, 1707 | anon_sym_DQUOTE, 1708 | ACTIONS(39), 1, 1709 | anon_sym_LBRACK, 1710 | ACTIONS(43), 1, 1711 | anon_sym_LBRACE, 1712 | ACTIONS(111), 1, 1713 | anon_sym_RPAREN, 1714 | STATE(35), 1, 1715 | sym_value, 1716 | STATE(121), 1, 1717 | sym_variable_sigil, 1718 | ACTIONS(33), 2, 1719 | anon_sym_true, 1720 | anon_sym_false, 1721 | ACTIONS(45), 2, 1722 | anon_sym_DOLLAR, 1723 | anon_sym_AT, 1724 | STATE(8), 2, 1725 | sym_function_parameters, 1726 | aux_sym_function_repeat1, 1727 | STATE(28), 2, 1728 | sym_array, 1729 | sym_hash, 1730 | STATE(29), 2, 1731 | sym_boolean, 1732 | sym_string, 1733 | STATE(32), 4, 1734 | sym_primitive, 1735 | sym_compound, 1736 | sym_variable, 1737 | sym_function, 1738 | [625] = 14, 1739 | ACTIONS(31), 1, 1740 | sym_null, 1741 | ACTIONS(35), 1, 1742 | sym_number, 1743 | ACTIONS(37), 1, 1744 | anon_sym_DQUOTE, 1745 | ACTIONS(39), 1, 1746 | anon_sym_LBRACK, 1747 | ACTIONS(43), 1, 1748 | anon_sym_LBRACE, 1749 | ACTIONS(113), 1, 1750 | sym_identifier, 1751 | STATE(48), 1, 1752 | sym_function_parameter, 1753 | STATE(121), 1, 1754 | sym_variable_sigil, 1755 | ACTIONS(33), 2, 1756 | anon_sym_true, 1757 | anon_sym_false, 1758 | ACTIONS(45), 2, 1759 | anon_sym_DOLLAR, 1760 | anon_sym_AT, 1761 | STATE(28), 2, 1762 | sym_array, 1763 | sym_hash, 1764 | STATE(29), 2, 1765 | sym_boolean, 1766 | sym_string, 1767 | STATE(47), 2, 1768 | sym_value, 1769 | sym_function_parameter_named, 1770 | STATE(32), 4, 1771 | sym_primitive, 1772 | sym_compound, 1773 | sym_variable, 1774 | sym_function, 1775 | [676] = 15, 1776 | ACTIONS(115), 1, 1777 | sym_identifier, 1778 | ACTIONS(117), 1, 1779 | anon_sym_SLASH, 1780 | STATE(18), 1, 1781 | aux_sym__space, 1782 | STATE(79), 1, 1783 | sym__attribute_full, 1784 | STATE(83), 1, 1785 | sym__attribute_shorthand, 1786 | STATE(91), 1, 1787 | sym_attribute, 1788 | STATE(117), 1, 1789 | sym_tag_open, 1790 | STATE(129), 1, 1791 | sym__shorthand_sigil, 1792 | STATE(133), 1, 1793 | sym_tag_interior, 1794 | STATE(136), 1, 1795 | sym_variable_sigil, 1796 | ACTIONS(13), 2, 1797 | anon_sym_DOT, 1798 | anon_sym_POUND, 1799 | ACTIONS(25), 2, 1800 | anon_sym_DOLLAR, 1801 | anon_sym_AT, 1802 | STATE(104), 2, 1803 | sym_variable, 1804 | sym_function, 1805 | STATE(132), 2, 1806 | sym_tag_self_closing, 1807 | sym_tag_close, 1808 | ACTIONS(27), 3, 1809 | anon_sym_TAB, 1810 | anon_sym_, 1811 | anon_sym_LF, 1812 | [728] = 13, 1813 | ACTIONS(29), 1, 1814 | sym_identifier, 1815 | ACTIONS(31), 1, 1816 | sym_null, 1817 | ACTIONS(35), 1, 1818 | sym_number, 1819 | ACTIONS(37), 1, 1820 | anon_sym_DQUOTE, 1821 | ACTIONS(39), 1, 1822 | anon_sym_LBRACK, 1823 | ACTIONS(43), 1, 1824 | anon_sym_LBRACE, 1825 | STATE(114), 1, 1826 | sym_value, 1827 | STATE(121), 1, 1828 | sym_variable_sigil, 1829 | ACTIONS(33), 2, 1830 | anon_sym_true, 1831 | anon_sym_false, 1832 | ACTIONS(45), 2, 1833 | anon_sym_DOLLAR, 1834 | anon_sym_AT, 1835 | STATE(28), 2, 1836 | sym_array, 1837 | sym_hash, 1838 | STATE(29), 2, 1839 | sym_boolean, 1840 | sym_string, 1841 | STATE(32), 4, 1842 | sym_primitive, 1843 | sym_compound, 1844 | sym_variable, 1845 | sym_function, 1846 | [775] = 13, 1847 | ACTIONS(15), 1, 1848 | sym_null, 1849 | ACTIONS(119), 1, 1850 | sym_identifier, 1851 | ACTIONS(121), 1, 1852 | sym_number, 1853 | ACTIONS(123), 1, 1854 | anon_sym_DQUOTE, 1855 | ACTIONS(125), 1, 1856 | anon_sym_LBRACK, 1857 | ACTIONS(127), 1, 1858 | anon_sym_LBRACE, 1859 | STATE(68), 1, 1860 | sym_value, 1861 | STATE(136), 1, 1862 | sym_variable_sigil, 1863 | ACTIONS(17), 2, 1864 | anon_sym_true, 1865 | anon_sym_false, 1866 | ACTIONS(45), 2, 1867 | anon_sym_DOLLAR, 1868 | anon_sym_AT, 1869 | STATE(75), 2, 1870 | sym_boolean, 1871 | sym_string, 1872 | STATE(81), 2, 1873 | sym_array, 1874 | sym_hash, 1875 | STATE(82), 4, 1876 | sym_primitive, 1877 | sym_compound, 1878 | sym_variable, 1879 | sym_function, 1880 | [822] = 13, 1881 | ACTIONS(29), 1, 1882 | sym_identifier, 1883 | ACTIONS(31), 1, 1884 | sym_null, 1885 | ACTIONS(35), 1, 1886 | sym_number, 1887 | ACTIONS(37), 1, 1888 | anon_sym_DQUOTE, 1889 | ACTIONS(39), 1, 1890 | anon_sym_LBRACK, 1891 | ACTIONS(43), 1, 1892 | anon_sym_LBRACE, 1893 | STATE(50), 1, 1894 | sym_value, 1895 | STATE(121), 1, 1896 | sym_variable_sigil, 1897 | ACTIONS(33), 2, 1898 | anon_sym_true, 1899 | anon_sym_false, 1900 | ACTIONS(45), 2, 1901 | anon_sym_DOLLAR, 1902 | anon_sym_AT, 1903 | STATE(28), 2, 1904 | sym_array, 1905 | sym_hash, 1906 | STATE(29), 2, 1907 | sym_boolean, 1908 | sym_string, 1909 | STATE(32), 4, 1910 | sym_primitive, 1911 | sym_compound, 1912 | sym_variable, 1913 | sym_function, 1914 | [869] = 3, 1915 | STATE(18), 1, 1916 | aux_sym__space, 1917 | ACTIONS(131), 3, 1918 | anon_sym_TAB, 1919 | anon_sym_, 1920 | anon_sym_LF, 1921 | ACTIONS(129), 14, 1922 | sym_tag_end, 1923 | anon_sym_SLASH, 1924 | anon_sym_DOT, 1925 | anon_sym_POUND, 1926 | sym_null, 1927 | anon_sym_true, 1928 | anon_sym_false, 1929 | sym_number, 1930 | anon_sym_DQUOTE, 1931 | anon_sym_LBRACK, 1932 | anon_sym_LBRACE, 1933 | anon_sym_DOLLAR, 1934 | anon_sym_AT, 1935 | sym_identifier, 1936 | [894] = 13, 1937 | ACTIONS(117), 1, 1938 | anon_sym_SLASH, 1939 | ACTIONS(134), 1, 1940 | sym_identifier, 1941 | STATE(14), 1, 1942 | aux_sym__space, 1943 | STATE(79), 1, 1944 | sym__attribute_full, 1945 | STATE(83), 1, 1946 | sym__attribute_shorthand, 1947 | STATE(96), 1, 1948 | aux_sym_interpolation_repeat1, 1949 | STATE(117), 1, 1950 | sym_tag_open, 1951 | STATE(129), 1, 1952 | sym__shorthand_sigil, 1953 | STATE(134), 1, 1954 | sym_tag_interior, 1955 | ACTIONS(13), 2, 1956 | anon_sym_DOT, 1957 | anon_sym_POUND, 1958 | STATE(43), 2, 1959 | sym_attribute, 1960 | aux_sym_annotation_repeat1, 1961 | STATE(132), 2, 1962 | sym_tag_self_closing, 1963 | sym_tag_close, 1964 | ACTIONS(136), 3, 1965 | anon_sym_TAB, 1966 | anon_sym_, 1967 | anon_sym_LF, 1968 | [939] = 5, 1969 | ACTIONS(140), 1, 1970 | anon_sym_DOT, 1971 | ACTIONS(144), 1, 1972 | anon_sym_LBRACK, 1973 | STATE(21), 2, 1974 | sym_variable_tail, 1975 | aux_sym_variable_repeat1, 1976 | ACTIONS(138), 4, 1977 | sym_null, 1978 | anon_sym_true, 1979 | anon_sym_false, 1980 | sym_identifier, 1981 | ACTIONS(142), 9, 1982 | sym_number, 1983 | anon_sym_DQUOTE, 1984 | anon_sym_RBRACK, 1985 | anon_sym_COMMA, 1986 | anon_sym_LBRACE, 1987 | anon_sym_RBRACE, 1988 | anon_sym_DOLLAR, 1989 | anon_sym_AT, 1990 | anon_sym_RPAREN, 1991 | [967] = 5, 1992 | ACTIONS(148), 1, 1993 | anon_sym_DOT, 1994 | ACTIONS(153), 1, 1995 | anon_sym_LBRACK, 1996 | STATE(21), 2, 1997 | sym_variable_tail, 1998 | aux_sym_variable_repeat1, 1999 | ACTIONS(146), 4, 2000 | sym_null, 2001 | anon_sym_true, 2002 | anon_sym_false, 2003 | sym_identifier, 2004 | ACTIONS(151), 9, 2005 | sym_number, 2006 | anon_sym_DQUOTE, 2007 | anon_sym_RBRACK, 2008 | anon_sym_COMMA, 2009 | anon_sym_LBRACE, 2010 | anon_sym_RBRACE, 2011 | anon_sym_DOLLAR, 2012 | anon_sym_AT, 2013 | anon_sym_RPAREN, 2014 | [995] = 5, 2015 | ACTIONS(140), 1, 2016 | anon_sym_DOT, 2017 | ACTIONS(144), 1, 2018 | anon_sym_LBRACK, 2019 | STATE(20), 2, 2020 | sym_variable_tail, 2021 | aux_sym_variable_repeat1, 2022 | ACTIONS(156), 4, 2023 | sym_null, 2024 | anon_sym_true, 2025 | anon_sym_false, 2026 | sym_identifier, 2027 | ACTIONS(158), 9, 2028 | sym_number, 2029 | anon_sym_DQUOTE, 2030 | anon_sym_RBRACK, 2031 | anon_sym_COMMA, 2032 | anon_sym_LBRACE, 2033 | anon_sym_RBRACE, 2034 | anon_sym_DOLLAR, 2035 | anon_sym_AT, 2036 | anon_sym_RPAREN, 2037 | [1023] = 2, 2038 | ACTIONS(160), 4, 2039 | sym_null, 2040 | anon_sym_true, 2041 | anon_sym_false, 2042 | sym_identifier, 2043 | ACTIONS(162), 11, 2044 | sym_number, 2045 | anon_sym_DQUOTE, 2046 | anon_sym_LBRACK, 2047 | anon_sym_RBRACK, 2048 | anon_sym_COMMA, 2049 | anon_sym_LBRACE, 2050 | anon_sym_RBRACE, 2051 | anon_sym_COLON, 2052 | anon_sym_DOLLAR, 2053 | anon_sym_AT, 2054 | anon_sym_RPAREN, 2055 | [1043] = 2, 2056 | ACTIONS(164), 4, 2057 | sym_null, 2058 | anon_sym_true, 2059 | anon_sym_false, 2060 | sym_identifier, 2061 | ACTIONS(166), 11, 2062 | anon_sym_DOT, 2063 | sym_number, 2064 | anon_sym_DQUOTE, 2065 | anon_sym_LBRACK, 2066 | anon_sym_RBRACK, 2067 | anon_sym_COMMA, 2068 | anon_sym_LBRACE, 2069 | anon_sym_RBRACE, 2070 | anon_sym_DOLLAR, 2071 | anon_sym_AT, 2072 | anon_sym_RPAREN, 2073 | [1063] = 2, 2074 | ACTIONS(168), 4, 2075 | sym_null, 2076 | anon_sym_true, 2077 | anon_sym_false, 2078 | sym_identifier, 2079 | ACTIONS(170), 11, 2080 | anon_sym_DOT, 2081 | sym_number, 2082 | anon_sym_DQUOTE, 2083 | anon_sym_LBRACK, 2084 | anon_sym_RBRACK, 2085 | anon_sym_COMMA, 2086 | anon_sym_LBRACE, 2087 | anon_sym_RBRACE, 2088 | anon_sym_DOLLAR, 2089 | anon_sym_AT, 2090 | anon_sym_RPAREN, 2091 | [1083] = 2, 2092 | ACTIONS(172), 4, 2093 | sym_null, 2094 | anon_sym_true, 2095 | anon_sym_false, 2096 | sym_identifier, 2097 | ACTIONS(174), 11, 2098 | sym_number, 2099 | anon_sym_DQUOTE, 2100 | anon_sym_LBRACK, 2101 | anon_sym_RBRACK, 2102 | anon_sym_COMMA, 2103 | anon_sym_LBRACE, 2104 | anon_sym_RBRACE, 2105 | anon_sym_COLON, 2106 | anon_sym_DOLLAR, 2107 | anon_sym_AT, 2108 | anon_sym_RPAREN, 2109 | [1103] = 2, 2110 | ACTIONS(176), 4, 2111 | sym_null, 2112 | anon_sym_true, 2113 | anon_sym_false, 2114 | sym_identifier, 2115 | ACTIONS(178), 10, 2116 | sym_number, 2117 | anon_sym_DQUOTE, 2118 | anon_sym_LBRACK, 2119 | anon_sym_RBRACK, 2120 | anon_sym_COMMA, 2121 | anon_sym_LBRACE, 2122 | anon_sym_RBRACE, 2123 | anon_sym_DOLLAR, 2124 | anon_sym_AT, 2125 | anon_sym_RPAREN, 2126 | [1122] = 2, 2127 | ACTIONS(180), 4, 2128 | sym_null, 2129 | anon_sym_true, 2130 | anon_sym_false, 2131 | sym_identifier, 2132 | ACTIONS(182), 10, 2133 | sym_number, 2134 | anon_sym_DQUOTE, 2135 | anon_sym_LBRACK, 2136 | anon_sym_RBRACK, 2137 | anon_sym_COMMA, 2138 | anon_sym_LBRACE, 2139 | anon_sym_RBRACE, 2140 | anon_sym_DOLLAR, 2141 | anon_sym_AT, 2142 | anon_sym_RPAREN, 2143 | [1141] = 2, 2144 | ACTIONS(184), 4, 2145 | sym_null, 2146 | anon_sym_true, 2147 | anon_sym_false, 2148 | sym_identifier, 2149 | ACTIONS(186), 10, 2150 | sym_number, 2151 | anon_sym_DQUOTE, 2152 | anon_sym_LBRACK, 2153 | anon_sym_RBRACK, 2154 | anon_sym_COMMA, 2155 | anon_sym_LBRACE, 2156 | anon_sym_RBRACE, 2157 | anon_sym_DOLLAR, 2158 | anon_sym_AT, 2159 | anon_sym_RPAREN, 2160 | [1160] = 2, 2161 | ACTIONS(188), 4, 2162 | sym_null, 2163 | anon_sym_true, 2164 | anon_sym_false, 2165 | sym_identifier, 2166 | ACTIONS(190), 10, 2167 | sym_number, 2168 | anon_sym_DQUOTE, 2169 | anon_sym_LBRACK, 2170 | anon_sym_RBRACK, 2171 | anon_sym_COMMA, 2172 | anon_sym_LBRACE, 2173 | anon_sym_RBRACE, 2174 | anon_sym_DOLLAR, 2175 | anon_sym_AT, 2176 | anon_sym_RPAREN, 2177 | [1179] = 2, 2178 | ACTIONS(192), 4, 2179 | sym_null, 2180 | anon_sym_true, 2181 | anon_sym_false, 2182 | sym_identifier, 2183 | ACTIONS(194), 10, 2184 | sym_number, 2185 | anon_sym_DQUOTE, 2186 | anon_sym_LBRACK, 2187 | anon_sym_RBRACK, 2188 | anon_sym_COMMA, 2189 | anon_sym_LBRACE, 2190 | anon_sym_RBRACE, 2191 | anon_sym_DOLLAR, 2192 | anon_sym_AT, 2193 | anon_sym_RPAREN, 2194 | [1198] = 2, 2195 | ACTIONS(196), 4, 2196 | sym_null, 2197 | anon_sym_true, 2198 | anon_sym_false, 2199 | sym_identifier, 2200 | ACTIONS(198), 10, 2201 | sym_number, 2202 | anon_sym_DQUOTE, 2203 | anon_sym_LBRACK, 2204 | anon_sym_RBRACK, 2205 | anon_sym_COMMA, 2206 | anon_sym_LBRACE, 2207 | anon_sym_RBRACE, 2208 | anon_sym_DOLLAR, 2209 | anon_sym_AT, 2210 | anon_sym_RPAREN, 2211 | [1217] = 4, 2212 | ACTIONS(204), 1, 2213 | anon_sym_COMMA, 2214 | STATE(33), 2, 2215 | sym_function_parameter_tail, 2216 | aux_sym_function_parameters_repeat1, 2217 | ACTIONS(200), 4, 2218 | sym_null, 2219 | anon_sym_true, 2220 | anon_sym_false, 2221 | sym_identifier, 2222 | ACTIONS(202), 7, 2223 | sym_number, 2224 | anon_sym_DQUOTE, 2225 | anon_sym_LBRACK, 2226 | anon_sym_LBRACE, 2227 | anon_sym_DOLLAR, 2228 | anon_sym_AT, 2229 | anon_sym_RPAREN, 2230 | [1240] = 2, 2231 | ACTIONS(207), 4, 2232 | sym_null, 2233 | anon_sym_true, 2234 | anon_sym_false, 2235 | sym_identifier, 2236 | ACTIONS(209), 10, 2237 | sym_number, 2238 | anon_sym_DQUOTE, 2239 | anon_sym_LBRACK, 2240 | anon_sym_RBRACK, 2241 | anon_sym_COMMA, 2242 | anon_sym_LBRACE, 2243 | anon_sym_RBRACE, 2244 | anon_sym_DOLLAR, 2245 | anon_sym_AT, 2246 | anon_sym_RPAREN, 2247 | [1259] = 4, 2248 | ACTIONS(215), 1, 2249 | anon_sym_COMMA, 2250 | STATE(39), 2, 2251 | sym_function_parameter_tail, 2252 | aux_sym_function_parameters_repeat1, 2253 | ACTIONS(211), 4, 2254 | sym_null, 2255 | anon_sym_true, 2256 | anon_sym_false, 2257 | sym_identifier, 2258 | ACTIONS(213), 7, 2259 | sym_number, 2260 | anon_sym_DQUOTE, 2261 | anon_sym_LBRACK, 2262 | anon_sym_LBRACE, 2263 | anon_sym_DOLLAR, 2264 | anon_sym_AT, 2265 | anon_sym_RPAREN, 2266 | [1282] = 2, 2267 | ACTIONS(217), 4, 2268 | sym_null, 2269 | anon_sym_true, 2270 | anon_sym_false, 2271 | sym_identifier, 2272 | ACTIONS(219), 10, 2273 | sym_number, 2274 | anon_sym_DQUOTE, 2275 | anon_sym_LBRACK, 2276 | anon_sym_RBRACK, 2277 | anon_sym_COMMA, 2278 | anon_sym_LBRACE, 2279 | anon_sym_RBRACE, 2280 | anon_sym_DOLLAR, 2281 | anon_sym_AT, 2282 | anon_sym_RPAREN, 2283 | [1301] = 2, 2284 | ACTIONS(221), 4, 2285 | sym_null, 2286 | anon_sym_true, 2287 | anon_sym_false, 2288 | sym_identifier, 2289 | ACTIONS(223), 10, 2290 | sym_number, 2291 | anon_sym_DQUOTE, 2292 | anon_sym_LBRACK, 2293 | anon_sym_RBRACK, 2294 | anon_sym_COMMA, 2295 | anon_sym_LBRACE, 2296 | anon_sym_RBRACE, 2297 | anon_sym_DOLLAR, 2298 | anon_sym_AT, 2299 | anon_sym_RPAREN, 2300 | [1320] = 2, 2301 | ACTIONS(225), 4, 2302 | sym_null, 2303 | anon_sym_true, 2304 | anon_sym_false, 2305 | sym_identifier, 2306 | ACTIONS(227), 10, 2307 | sym_number, 2308 | anon_sym_DQUOTE, 2309 | anon_sym_LBRACK, 2310 | anon_sym_RBRACK, 2311 | anon_sym_COMMA, 2312 | anon_sym_LBRACE, 2313 | anon_sym_RBRACE, 2314 | anon_sym_DOLLAR, 2315 | anon_sym_AT, 2316 | anon_sym_RPAREN, 2317 | [1339] = 4, 2318 | ACTIONS(215), 1, 2319 | anon_sym_COMMA, 2320 | STATE(33), 2, 2321 | sym_function_parameter_tail, 2322 | aux_sym_function_parameters_repeat1, 2323 | ACTIONS(229), 4, 2324 | sym_null, 2325 | anon_sym_true, 2326 | anon_sym_false, 2327 | sym_identifier, 2328 | ACTIONS(231), 7, 2329 | sym_number, 2330 | anon_sym_DQUOTE, 2331 | anon_sym_LBRACK, 2332 | anon_sym_LBRACE, 2333 | anon_sym_DOLLAR, 2334 | anon_sym_AT, 2335 | anon_sym_RPAREN, 2336 | [1362] = 2, 2337 | ACTIONS(233), 4, 2338 | sym_null, 2339 | anon_sym_true, 2340 | anon_sym_false, 2341 | sym_identifier, 2342 | ACTIONS(235), 10, 2343 | sym_number, 2344 | anon_sym_DQUOTE, 2345 | anon_sym_LBRACK, 2346 | anon_sym_RBRACK, 2347 | anon_sym_COMMA, 2348 | anon_sym_LBRACE, 2349 | anon_sym_RBRACE, 2350 | anon_sym_DOLLAR, 2351 | anon_sym_AT, 2352 | anon_sym_RPAREN, 2353 | [1381] = 2, 2354 | ACTIONS(237), 4, 2355 | sym_null, 2356 | anon_sym_true, 2357 | anon_sym_false, 2358 | sym_identifier, 2359 | ACTIONS(239), 10, 2360 | sym_number, 2361 | anon_sym_DQUOTE, 2362 | anon_sym_LBRACK, 2363 | anon_sym_RBRACK, 2364 | anon_sym_COMMA, 2365 | anon_sym_LBRACE, 2366 | anon_sym_RBRACE, 2367 | anon_sym_DOLLAR, 2368 | anon_sym_AT, 2369 | anon_sym_RPAREN, 2370 | [1400] = 9, 2371 | ACTIONS(241), 1, 2372 | sym_identifier, 2373 | STATE(18), 1, 2374 | aux_sym__space, 2375 | STATE(79), 1, 2376 | sym__attribute_full, 2377 | STATE(83), 1, 2378 | sym__attribute_shorthand, 2379 | STATE(101), 1, 2380 | sym_attribute, 2381 | STATE(129), 1, 2382 | sym__shorthand_sigil, 2383 | ACTIONS(13), 2, 2384 | anon_sym_DOT, 2385 | anon_sym_POUND, 2386 | ACTIONS(243), 2, 2387 | sym_tag_end, 2388 | anon_sym_SLASH, 2389 | ACTIONS(27), 3, 2390 | anon_sym_TAB, 2391 | anon_sym_, 2392 | anon_sym_LF, 2393 | [1432] = 9, 2394 | ACTIONS(241), 1, 2395 | sym_identifier, 2396 | ACTIONS(245), 1, 2397 | sym_tag_end, 2398 | STATE(49), 1, 2399 | aux_sym__space, 2400 | STATE(79), 1, 2401 | sym__attribute_full, 2402 | STATE(83), 1, 2403 | sym__attribute_shorthand, 2404 | STATE(129), 1, 2405 | sym__shorthand_sigil, 2406 | ACTIONS(13), 2, 2407 | anon_sym_DOT, 2408 | anon_sym_POUND, 2409 | STATE(44), 2, 2410 | sym_attribute, 2411 | aux_sym_annotation_repeat1, 2412 | ACTIONS(247), 3, 2413 | anon_sym_TAB, 2414 | anon_sym_, 2415 | anon_sym_LF, 2416 | [1464] = 9, 2417 | ACTIONS(249), 1, 2418 | sym_identifier, 2419 | ACTIONS(252), 1, 2420 | sym_tag_end, 2421 | STATE(55), 1, 2422 | aux_sym__space, 2423 | STATE(79), 1, 2424 | sym__attribute_full, 2425 | STATE(83), 1, 2426 | sym__attribute_shorthand, 2427 | STATE(129), 1, 2428 | sym__shorthand_sigil, 2429 | ACTIONS(254), 2, 2430 | anon_sym_DOT, 2431 | anon_sym_POUND, 2432 | STATE(44), 2, 2433 | sym_attribute, 2434 | aux_sym_annotation_repeat1, 2435 | ACTIONS(257), 3, 2436 | anon_sym_TAB, 2437 | anon_sym_, 2438 | anon_sym_LF, 2439 | [1496] = 9, 2440 | ACTIONS(241), 1, 2441 | sym_identifier, 2442 | STATE(18), 1, 2443 | aux_sym__space, 2444 | STATE(79), 1, 2445 | sym__attribute_full, 2446 | STATE(83), 1, 2447 | sym__attribute_shorthand, 2448 | STATE(101), 1, 2449 | sym_attribute, 2450 | STATE(129), 1, 2451 | sym__shorthand_sigil, 2452 | ACTIONS(13), 2, 2453 | anon_sym_DOT, 2454 | anon_sym_POUND, 2455 | ACTIONS(260), 2, 2456 | sym_tag_end, 2457 | anon_sym_SLASH, 2458 | ACTIONS(27), 3, 2459 | anon_sym_TAB, 2460 | anon_sym_, 2461 | anon_sym_LF, 2462 | [1528] = 9, 2463 | ACTIONS(241), 1, 2464 | sym_identifier, 2465 | STATE(18), 1, 2466 | aux_sym__space, 2467 | STATE(79), 1, 2468 | sym__attribute_full, 2469 | STATE(83), 1, 2470 | sym__attribute_shorthand, 2471 | STATE(101), 1, 2472 | sym_attribute, 2473 | STATE(129), 1, 2474 | sym__shorthand_sigil, 2475 | ACTIONS(13), 2, 2476 | anon_sym_DOT, 2477 | anon_sym_POUND, 2478 | ACTIONS(262), 2, 2479 | sym_tag_end, 2480 | anon_sym_SLASH, 2481 | ACTIONS(27), 3, 2482 | anon_sym_TAB, 2483 | anon_sym_, 2484 | anon_sym_LF, 2485 | [1560] = 2, 2486 | ACTIONS(264), 4, 2487 | sym_null, 2488 | anon_sym_true, 2489 | anon_sym_false, 2490 | sym_identifier, 2491 | ACTIONS(266), 8, 2492 | sym_number, 2493 | anon_sym_DQUOTE, 2494 | anon_sym_LBRACK, 2495 | anon_sym_COMMA, 2496 | anon_sym_LBRACE, 2497 | anon_sym_DOLLAR, 2498 | anon_sym_AT, 2499 | anon_sym_RPAREN, 2500 | [1577] = 2, 2501 | ACTIONS(268), 4, 2502 | sym_null, 2503 | anon_sym_true, 2504 | anon_sym_false, 2505 | sym_identifier, 2506 | ACTIONS(270), 8, 2507 | sym_number, 2508 | anon_sym_DQUOTE, 2509 | anon_sym_LBRACK, 2510 | anon_sym_COMMA, 2511 | anon_sym_LBRACE, 2512 | anon_sym_DOLLAR, 2513 | anon_sym_AT, 2514 | anon_sym_RPAREN, 2515 | [1594] = 9, 2516 | ACTIONS(241), 1, 2517 | sym_identifier, 2518 | ACTIONS(272), 1, 2519 | sym_tag_end, 2520 | STATE(18), 1, 2521 | aux_sym__space, 2522 | STATE(79), 1, 2523 | sym__attribute_full, 2524 | STATE(83), 1, 2525 | sym__attribute_shorthand, 2526 | STATE(91), 1, 2527 | sym_attribute, 2528 | STATE(129), 1, 2529 | sym__shorthand_sigil, 2530 | ACTIONS(13), 2, 2531 | anon_sym_DOT, 2532 | anon_sym_POUND, 2533 | ACTIONS(27), 3, 2534 | anon_sym_TAB, 2535 | anon_sym_, 2536 | anon_sym_LF, 2537 | [1625] = 2, 2538 | ACTIONS(274), 4, 2539 | sym_null, 2540 | anon_sym_true, 2541 | anon_sym_false, 2542 | sym_identifier, 2543 | ACTIONS(276), 8, 2544 | sym_number, 2545 | anon_sym_DQUOTE, 2546 | anon_sym_LBRACK, 2547 | anon_sym_COMMA, 2548 | anon_sym_LBRACE, 2549 | anon_sym_DOLLAR, 2550 | anon_sym_AT, 2551 | anon_sym_RPAREN, 2552 | [1642] = 8, 2553 | ACTIONS(241), 1, 2554 | sym_identifier, 2555 | STATE(18), 1, 2556 | aux_sym__space, 2557 | STATE(79), 1, 2558 | sym__attribute_full, 2559 | STATE(83), 1, 2560 | sym__attribute_shorthand, 2561 | STATE(101), 1, 2562 | sym_attribute, 2563 | STATE(129), 1, 2564 | sym__shorthand_sigil, 2565 | ACTIONS(13), 2, 2566 | anon_sym_DOT, 2567 | anon_sym_POUND, 2568 | ACTIONS(27), 3, 2569 | anon_sym_TAB, 2570 | anon_sym_, 2571 | anon_sym_LF, 2572 | [1670] = 4, 2573 | ACTIONS(278), 1, 2574 | anon_sym_DOT, 2575 | ACTIONS(280), 1, 2576 | anon_sym_LBRACK, 2577 | STATE(57), 2, 2578 | sym_variable_tail, 2579 | aux_sym_variable_repeat1, 2580 | ACTIONS(138), 7, 2581 | sym_tag_end, 2582 | anon_sym_SLASH, 2583 | anon_sym_POUND, 2584 | sym_identifier, 2585 | anon_sym_TAB, 2586 | anon_sym_, 2587 | anon_sym_LF, 2588 | [1690] = 2, 2589 | ACTIONS(282), 4, 2590 | sym_null, 2591 | anon_sym_true, 2592 | anon_sym_false, 2593 | sym_identifier, 2594 | ACTIONS(284), 7, 2595 | sym_number, 2596 | anon_sym_DQUOTE, 2597 | anon_sym_LBRACK, 2598 | anon_sym_RBRACK, 2599 | anon_sym_LBRACE, 2600 | anon_sym_DOLLAR, 2601 | anon_sym_AT, 2602 | [1706] = 4, 2603 | ACTIONS(278), 1, 2604 | anon_sym_DOT, 2605 | ACTIONS(280), 1, 2606 | anon_sym_LBRACK, 2607 | STATE(52), 2, 2608 | sym_variable_tail, 2609 | aux_sym_variable_repeat1, 2610 | ACTIONS(156), 7, 2611 | sym_tag_end, 2612 | anon_sym_SLASH, 2613 | anon_sym_POUND, 2614 | sym_identifier, 2615 | anon_sym_TAB, 2616 | anon_sym_, 2617 | anon_sym_LF, 2618 | [1726] = 8, 2619 | ACTIONS(241), 1, 2620 | sym_identifier, 2621 | STATE(18), 1, 2622 | aux_sym__space, 2623 | STATE(79), 1, 2624 | sym__attribute_full, 2625 | STATE(83), 1, 2626 | sym__attribute_shorthand, 2627 | STATE(91), 1, 2628 | sym_attribute, 2629 | STATE(129), 1, 2630 | sym__shorthand_sigil, 2631 | ACTIONS(13), 2, 2632 | anon_sym_DOT, 2633 | anon_sym_POUND, 2634 | ACTIONS(27), 3, 2635 | anon_sym_TAB, 2636 | anon_sym_, 2637 | anon_sym_LF, 2638 | [1754] = 7, 2639 | ACTIONS(119), 1, 2640 | sym_identifier, 2641 | ACTIONS(286), 1, 2642 | sym_tag_end, 2643 | STATE(18), 1, 2644 | aux_sym__space, 2645 | STATE(136), 1, 2646 | sym_variable_sigil, 2647 | ACTIONS(25), 2, 2648 | anon_sym_DOLLAR, 2649 | anon_sym_AT, 2650 | STATE(104), 2, 2651 | sym_variable, 2652 | sym_function, 2653 | ACTIONS(27), 3, 2654 | anon_sym_TAB, 2655 | anon_sym_, 2656 | anon_sym_LF, 2657 | [1780] = 4, 2658 | ACTIONS(288), 1, 2659 | anon_sym_DOT, 2660 | ACTIONS(291), 1, 2661 | anon_sym_LBRACK, 2662 | STATE(57), 2, 2663 | sym_variable_tail, 2664 | aux_sym_variable_repeat1, 2665 | ACTIONS(146), 7, 2666 | sym_tag_end, 2667 | anon_sym_SLASH, 2668 | anon_sym_POUND, 2669 | sym_identifier, 2670 | anon_sym_TAB, 2671 | anon_sym_, 2672 | anon_sym_LF, 2673 | [1800] = 2, 2674 | ACTIONS(282), 4, 2675 | sym_null, 2676 | anon_sym_true, 2677 | anon_sym_false, 2678 | sym_identifier, 2679 | ACTIONS(284), 7, 2680 | sym_number, 2681 | anon_sym_DQUOTE, 2682 | anon_sym_LBRACK, 2683 | anon_sym_RBRACK, 2684 | anon_sym_LBRACE, 2685 | anon_sym_DOLLAR, 2686 | anon_sym_AT, 2687 | [1816] = 6, 2688 | ACTIONS(119), 1, 2689 | sym_identifier, 2690 | STATE(18), 1, 2691 | aux_sym__space, 2692 | STATE(136), 1, 2693 | sym_variable_sigil, 2694 | ACTIONS(25), 2, 2695 | anon_sym_DOLLAR, 2696 | anon_sym_AT, 2697 | STATE(104), 2, 2698 | sym_variable, 2699 | sym_function, 2700 | ACTIONS(27), 3, 2701 | anon_sym_TAB, 2702 | anon_sym_, 2703 | anon_sym_LF, 2704 | [1839] = 8, 2705 | ACTIONS(37), 1, 2706 | anon_sym_DQUOTE, 2707 | ACTIONS(294), 1, 2708 | sym_identifier, 2709 | ACTIONS(296), 1, 2710 | anon_sym_RBRACE, 2711 | STATE(115), 1, 2712 | sym__hash_key_value, 2713 | STATE(137), 1, 2714 | sym_hash_key, 2715 | STATE(142), 1, 2716 | sym_string, 2717 | STATE(148), 1, 2718 | sym__hash_item_with_optional_comma, 2719 | STATE(88), 2, 2720 | sym__hash_item, 2721 | aux_sym_hash_repeat1, 2722 | [1865] = 8, 2723 | ACTIONS(37), 1, 2724 | anon_sym_DQUOTE, 2725 | ACTIONS(294), 1, 2726 | sym_identifier, 2727 | ACTIONS(298), 1, 2728 | anon_sym_RBRACE, 2729 | STATE(115), 1, 2730 | sym__hash_key_value, 2731 | STATE(137), 1, 2732 | sym_hash_key, 2733 | STATE(142), 1, 2734 | sym_string, 2735 | STATE(143), 1, 2736 | sym__hash_item_with_optional_comma, 2737 | STATE(60), 2, 2738 | sym__hash_item, 2739 | aux_sym_hash_repeat1, 2740 | [1891] = 6, 2741 | ACTIONS(302), 1, 2742 | anon_sym_EQ, 2743 | ACTIONS(304), 1, 2744 | anon_sym_LPAREN, 2745 | STATE(2), 1, 2746 | aux_sym__space, 2747 | STATE(92), 1, 2748 | aux_sym_tag_open_repeat1, 2749 | ACTIONS(300), 2, 2750 | sym_tag_end, 2751 | anon_sym_SLASH, 2752 | ACTIONS(306), 3, 2753 | anon_sym_TAB, 2754 | anon_sym_, 2755 | anon_sym_LF, 2756 | [1913] = 1, 2757 | ACTIONS(168), 9, 2758 | sym_tag_end, 2759 | anon_sym_SLASH, 2760 | anon_sym_DOT, 2761 | anon_sym_POUND, 2762 | anon_sym_LBRACK, 2763 | sym_identifier, 2764 | anon_sym_TAB, 2765 | anon_sym_, 2766 | anon_sym_LF, 2767 | [1925] = 8, 2768 | ACTIONS(37), 1, 2769 | anon_sym_DQUOTE, 2770 | ACTIONS(294), 1, 2771 | sym_identifier, 2772 | ACTIONS(308), 1, 2773 | anon_sym_RBRACE, 2774 | STATE(115), 1, 2775 | sym__hash_key_value, 2776 | STATE(127), 1, 2777 | sym__hash_item_with_optional_comma, 2778 | STATE(137), 1, 2779 | sym_hash_key, 2780 | STATE(142), 1, 2781 | sym_string, 2782 | STATE(88), 2, 2783 | sym__hash_item, 2784 | aux_sym_hash_repeat1, 2785 | [1951] = 8, 2786 | ACTIONS(37), 1, 2787 | anon_sym_DQUOTE, 2788 | ACTIONS(294), 1, 2789 | sym_identifier, 2790 | ACTIONS(310), 1, 2791 | anon_sym_RBRACE, 2792 | STATE(115), 1, 2793 | sym__hash_key_value, 2794 | STATE(137), 1, 2795 | sym_hash_key, 2796 | STATE(138), 1, 2797 | sym__hash_item_with_optional_comma, 2798 | STATE(142), 1, 2799 | sym_string, 2800 | STATE(64), 2, 2801 | sym__hash_item, 2802 | aux_sym_hash_repeat1, 2803 | [1977] = 1, 2804 | ACTIONS(164), 9, 2805 | sym_tag_end, 2806 | anon_sym_SLASH, 2807 | anon_sym_DOT, 2808 | anon_sym_POUND, 2809 | anon_sym_LBRACK, 2810 | sym_identifier, 2811 | anon_sym_TAB, 2812 | anon_sym_, 2813 | anon_sym_LF, 2814 | [1989] = 1, 2815 | ACTIONS(188), 8, 2816 | sym_tag_end, 2817 | anon_sym_SLASH, 2818 | anon_sym_DOT, 2819 | anon_sym_POUND, 2820 | sym_identifier, 2821 | anon_sym_TAB, 2822 | anon_sym_, 2823 | anon_sym_LF, 2824 | [2000] = 1, 2825 | ACTIONS(312), 8, 2826 | sym_tag_end, 2827 | anon_sym_SLASH, 2828 | anon_sym_DOT, 2829 | anon_sym_POUND, 2830 | sym_identifier, 2831 | anon_sym_TAB, 2832 | anon_sym_, 2833 | anon_sym_LF, 2834 | [2011] = 1, 2835 | ACTIONS(233), 8, 2836 | sym_tag_end, 2837 | anon_sym_SLASH, 2838 | anon_sym_DOT, 2839 | anon_sym_POUND, 2840 | sym_identifier, 2841 | anon_sym_TAB, 2842 | anon_sym_, 2843 | anon_sym_LF, 2844 | [2022] = 6, 2845 | ACTIONS(37), 1, 2846 | anon_sym_DQUOTE, 2847 | ACTIONS(314), 1, 2848 | sym_number, 2849 | STATE(121), 1, 2850 | sym_variable_sigil, 2851 | STATE(149), 1, 2852 | sym_variable_segment_value, 2853 | ACTIONS(45), 2, 2854 | anon_sym_DOLLAR, 2855 | anon_sym_AT, 2856 | STATE(125), 2, 2857 | sym_string, 2858 | sym_variable, 2859 | [2043] = 1, 2860 | ACTIONS(316), 8, 2861 | sym_tag_end, 2862 | anon_sym_SLASH, 2863 | anon_sym_DOT, 2864 | anon_sym_POUND, 2865 | sym_identifier, 2866 | anon_sym_TAB, 2867 | anon_sym_, 2868 | anon_sym_LF, 2869 | [2054] = 1, 2870 | ACTIONS(237), 8, 2871 | sym_tag_end, 2872 | anon_sym_SLASH, 2873 | anon_sym_DOT, 2874 | anon_sym_POUND, 2875 | sym_identifier, 2876 | anon_sym_TAB, 2877 | anon_sym_, 2878 | anon_sym_LF, 2879 | [2065] = 4, 2880 | ACTIONS(5), 1, 2881 | aux_sym_markdown_token1, 2882 | ACTIONS(7), 1, 2883 | sym_tag_start, 2884 | ACTIONS(318), 1, 2885 | ts_builtin_sym_end, 2886 | STATE(89), 5, 2887 | sym_markdown, 2888 | sym_tag, 2889 | sym_annotation, 2890 | sym_interpolation, 2891 | aux_sym_content_repeat1, 2892 | [2082] = 1, 2893 | ACTIONS(172), 8, 2894 | sym_tag_end, 2895 | anon_sym_SLASH, 2896 | anon_sym_DOT, 2897 | anon_sym_POUND, 2898 | sym_identifier, 2899 | anon_sym_TAB, 2900 | anon_sym_, 2901 | anon_sym_LF, 2902 | [2093] = 1, 2903 | ACTIONS(184), 8, 2904 | sym_tag_end, 2905 | anon_sym_SLASH, 2906 | anon_sym_DOT, 2907 | anon_sym_POUND, 2908 | sym_identifier, 2909 | anon_sym_TAB, 2910 | anon_sym_, 2911 | anon_sym_LF, 2912 | [2104] = 5, 2913 | ACTIONS(302), 1, 2914 | anon_sym_EQ, 2915 | STATE(2), 1, 2916 | aux_sym__space, 2917 | STATE(92), 1, 2918 | aux_sym_tag_open_repeat1, 2919 | ACTIONS(300), 2, 2920 | sym_tag_end, 2921 | anon_sym_SLASH, 2922 | ACTIONS(306), 3, 2923 | anon_sym_TAB, 2924 | anon_sym_, 2925 | anon_sym_LF, 2926 | [2123] = 1, 2927 | ACTIONS(176), 8, 2928 | sym_tag_end, 2929 | anon_sym_SLASH, 2930 | anon_sym_DOT, 2931 | anon_sym_POUND, 2932 | sym_identifier, 2933 | anon_sym_TAB, 2934 | anon_sym_, 2935 | anon_sym_LF, 2936 | [2134] = 1, 2937 | ACTIONS(225), 8, 2938 | sym_tag_end, 2939 | anon_sym_SLASH, 2940 | anon_sym_DOT, 2941 | anon_sym_POUND, 2942 | sym_identifier, 2943 | anon_sym_TAB, 2944 | anon_sym_, 2945 | anon_sym_LF, 2946 | [2145] = 1, 2947 | ACTIONS(320), 8, 2948 | sym_tag_end, 2949 | anon_sym_SLASH, 2950 | anon_sym_DOT, 2951 | anon_sym_POUND, 2952 | sym_identifier, 2953 | anon_sym_TAB, 2954 | anon_sym_, 2955 | anon_sym_LF, 2956 | [2156] = 1, 2957 | ACTIONS(221), 8, 2958 | sym_tag_end, 2959 | anon_sym_SLASH, 2960 | anon_sym_DOT, 2961 | anon_sym_POUND, 2962 | sym_identifier, 2963 | anon_sym_TAB, 2964 | anon_sym_, 2965 | anon_sym_LF, 2966 | [2167] = 1, 2967 | ACTIONS(180), 8, 2968 | sym_tag_end, 2969 | anon_sym_SLASH, 2970 | anon_sym_DOT, 2971 | anon_sym_POUND, 2972 | sym_identifier, 2973 | anon_sym_TAB, 2974 | anon_sym_, 2975 | anon_sym_LF, 2976 | [2178] = 1, 2977 | ACTIONS(196), 8, 2978 | sym_tag_end, 2979 | anon_sym_SLASH, 2980 | anon_sym_DOT, 2981 | anon_sym_POUND, 2982 | sym_identifier, 2983 | anon_sym_TAB, 2984 | anon_sym_, 2985 | anon_sym_LF, 2986 | [2189] = 1, 2987 | ACTIONS(322), 8, 2988 | sym_tag_end, 2989 | anon_sym_SLASH, 2990 | anon_sym_DOT, 2991 | anon_sym_POUND, 2992 | sym_identifier, 2993 | anon_sym_TAB, 2994 | anon_sym_, 2995 | anon_sym_LF, 2996 | [2200] = 6, 2997 | ACTIONS(37), 1, 2998 | anon_sym_DQUOTE, 2999 | ACTIONS(314), 1, 3000 | sym_number, 3001 | STATE(121), 1, 3002 | sym_variable_sigil, 3003 | STATE(122), 1, 3004 | sym_variable_segment_value, 3005 | ACTIONS(45), 2, 3006 | anon_sym_DOLLAR, 3007 | anon_sym_AT, 3008 | STATE(125), 2, 3009 | sym_string, 3010 | sym_variable, 3011 | [2221] = 1, 3012 | ACTIONS(160), 8, 3013 | sym_tag_end, 3014 | anon_sym_SLASH, 3015 | anon_sym_DOT, 3016 | anon_sym_POUND, 3017 | sym_identifier, 3018 | anon_sym_TAB, 3019 | anon_sym_, 3020 | anon_sym_LF, 3021 | [2232] = 1, 3022 | ACTIONS(192), 8, 3023 | sym_tag_end, 3024 | anon_sym_SLASH, 3025 | anon_sym_DOT, 3026 | anon_sym_POUND, 3027 | sym_identifier, 3028 | anon_sym_TAB, 3029 | anon_sym_, 3030 | anon_sym_LF, 3031 | [2243] = 1, 3032 | ACTIONS(217), 8, 3033 | sym_tag_end, 3034 | anon_sym_SLASH, 3035 | anon_sym_DOT, 3036 | anon_sym_POUND, 3037 | sym_identifier, 3038 | anon_sym_TAB, 3039 | anon_sym_, 3040 | anon_sym_LF, 3041 | [2254] = 7, 3042 | ACTIONS(324), 1, 3043 | sym_identifier, 3044 | ACTIONS(327), 1, 3045 | anon_sym_DQUOTE, 3046 | ACTIONS(330), 1, 3047 | anon_sym_RBRACE, 3048 | STATE(124), 1, 3049 | sym__hash_key_value, 3050 | STATE(137), 1, 3051 | sym_hash_key, 3052 | STATE(142), 1, 3053 | sym_string, 3054 | STATE(88), 2, 3055 | sym__hash_item, 3056 | aux_sym_hash_repeat1, 3057 | [2277] = 4, 3058 | ACTIONS(332), 1, 3059 | ts_builtin_sym_end, 3060 | ACTIONS(334), 1, 3061 | aux_sym_markdown_token1, 3062 | ACTIONS(337), 1, 3063 | sym_tag_start, 3064 | STATE(89), 5, 3065 | sym_markdown, 3066 | sym_tag, 3067 | sym_annotation, 3068 | sym_interpolation, 3069 | aux_sym_content_repeat1, 3070 | [2294] = 1, 3071 | ACTIONS(207), 8, 3072 | sym_tag_end, 3073 | anon_sym_SLASH, 3074 | anon_sym_DOT, 3075 | anon_sym_POUND, 3076 | sym_identifier, 3077 | anon_sym_TAB, 3078 | anon_sym_, 3079 | anon_sym_LF, 3080 | [2305] = 1, 3081 | ACTIONS(252), 7, 3082 | sym_tag_end, 3083 | anon_sym_DOT, 3084 | anon_sym_POUND, 3085 | sym_identifier, 3086 | anon_sym_TAB, 3087 | anon_sym_, 3088 | anon_sym_LF, 3089 | [2315] = 4, 3090 | STATE(45), 1, 3091 | aux_sym__space, 3092 | STATE(94), 1, 3093 | aux_sym_tag_open_repeat1, 3094 | ACTIONS(11), 2, 3095 | sym_tag_end, 3096 | anon_sym_SLASH, 3097 | ACTIONS(340), 3, 3098 | anon_sym_TAB, 3099 | anon_sym_, 3100 | anon_sym_LF, 3101 | [2331] = 4, 3102 | STATE(42), 1, 3103 | aux_sym__space, 3104 | STATE(94), 1, 3105 | aux_sym_tag_open_repeat1, 3106 | ACTIONS(262), 2, 3107 | sym_tag_end, 3108 | anon_sym_SLASH, 3109 | ACTIONS(342), 3, 3110 | anon_sym_TAB, 3111 | anon_sym_, 3112 | anon_sym_LF, 3113 | [2347] = 4, 3114 | STATE(51), 1, 3115 | aux_sym__space, 3116 | STATE(94), 1, 3117 | aux_sym_tag_open_repeat1, 3118 | ACTIONS(344), 2, 3119 | sym_tag_end, 3120 | anon_sym_SLASH, 3121 | ACTIONS(346), 3, 3122 | anon_sym_TAB, 3123 | anon_sym_, 3124 | anon_sym_LF, 3125 | [2363] = 4, 3126 | STATE(46), 1, 3127 | aux_sym__space, 3128 | STATE(93), 1, 3129 | aux_sym_tag_open_repeat1, 3130 | ACTIONS(260), 2, 3131 | sym_tag_end, 3132 | anon_sym_SLASH, 3133 | ACTIONS(349), 3, 3134 | anon_sym_TAB, 3135 | anon_sym_, 3136 | anon_sym_LF, 3137 | [2379] = 4, 3138 | ACTIONS(351), 1, 3139 | sym_tag_end, 3140 | STATE(56), 1, 3141 | aux_sym__space, 3142 | STATE(97), 1, 3143 | aux_sym_interpolation_repeat1, 3144 | ACTIONS(353), 3, 3145 | anon_sym_TAB, 3146 | anon_sym_, 3147 | anon_sym_LF, 3148 | [2394] = 4, 3149 | ACTIONS(355), 1, 3150 | sym_tag_end, 3151 | STATE(59), 1, 3152 | aux_sym__space, 3153 | STATE(97), 1, 3154 | aux_sym_interpolation_repeat1, 3155 | ACTIONS(357), 3, 3156 | anon_sym_TAB, 3157 | anon_sym_, 3158 | anon_sym_LF, 3159 | [2409] = 3, 3160 | ACTIONS(360), 1, 3161 | anon_sym_DQUOTE, 3162 | ACTIONS(362), 2, 3163 | sym__string_character, 3164 | sym__string_escape_sequence, 3165 | STATE(98), 2, 3166 | sym__string_element, 3167 | aux_sym_string_repeat1, 3168 | [2421] = 3, 3169 | ACTIONS(365), 1, 3170 | anon_sym_DQUOTE, 3171 | ACTIONS(367), 2, 3172 | sym__string_character, 3173 | sym__string_escape_sequence, 3174 | STATE(100), 2, 3175 | sym__string_element, 3176 | aux_sym_string_repeat1, 3177 | [2433] = 3, 3178 | ACTIONS(369), 1, 3179 | anon_sym_DQUOTE, 3180 | ACTIONS(371), 2, 3181 | sym__string_character, 3182 | sym__string_escape_sequence, 3183 | STATE(98), 2, 3184 | sym__string_element, 3185 | aux_sym_string_repeat1, 3186 | [2445] = 1, 3187 | ACTIONS(344), 5, 3188 | sym_tag_end, 3189 | anon_sym_SLASH, 3190 | anon_sym_TAB, 3191 | anon_sym_, 3192 | anon_sym_LF, 3193 | [2453] = 3, 3194 | ACTIONS(373), 1, 3195 | anon_sym_DQUOTE, 3196 | ACTIONS(371), 2, 3197 | sym__string_character, 3198 | sym__string_escape_sequence, 3199 | STATE(98), 2, 3200 | sym__string_element, 3201 | aux_sym_string_repeat1, 3202 | [2465] = 3, 3203 | ACTIONS(375), 1, 3204 | anon_sym_DQUOTE, 3205 | ACTIONS(377), 2, 3206 | sym__string_character, 3207 | sym__string_escape_sequence, 3208 | STATE(102), 2, 3209 | sym__string_element, 3210 | aux_sym_string_repeat1, 3211 | [2477] = 1, 3212 | ACTIONS(355), 4, 3213 | sym_tag_end, 3214 | anon_sym_TAB, 3215 | anon_sym_, 3216 | anon_sym_LF, 3217 | [2484] = 1, 3218 | ACTIONS(379), 3, 3219 | anon_sym_DQUOTE, 3220 | anon_sym_RBRACE, 3221 | sym_identifier, 3222 | [2490] = 1, 3223 | ACTIONS(381), 3, 3224 | ts_builtin_sym_end, 3225 | aux_sym_markdown_token1, 3226 | sym_tag_start, 3227 | [2496] = 1, 3228 | ACTIONS(383), 3, 3229 | ts_builtin_sym_end, 3230 | aux_sym_markdown_token1, 3231 | sym_tag_start, 3232 | [2502] = 1, 3233 | ACTIONS(385), 3, 3234 | ts_builtin_sym_end, 3235 | aux_sym_markdown_token1, 3236 | sym_tag_start, 3237 | [2508] = 1, 3238 | ACTIONS(387), 3, 3239 | ts_builtin_sym_end, 3240 | aux_sym_markdown_token1, 3241 | sym_tag_start, 3242 | [2514] = 1, 3243 | ACTIONS(379), 3, 3244 | anon_sym_DQUOTE, 3245 | anon_sym_RBRACE, 3246 | sym_identifier, 3247 | [2520] = 1, 3248 | ACTIONS(389), 3, 3249 | ts_builtin_sym_end, 3250 | aux_sym_markdown_token1, 3251 | sym_tag_start, 3252 | [2526] = 1, 3253 | ACTIONS(391), 3, 3254 | ts_builtin_sym_end, 3255 | aux_sym_markdown_token1, 3256 | sym_tag_start, 3257 | [2532] = 1, 3258 | ACTIONS(393), 3, 3259 | ts_builtin_sym_end, 3260 | aux_sym_markdown_token1, 3261 | sym_tag_start, 3262 | [2538] = 1, 3263 | ACTIONS(395), 2, 3264 | anon_sym_COMMA, 3265 | anon_sym_RBRACE, 3266 | [2543] = 2, 3267 | ACTIONS(397), 1, 3268 | anon_sym_COMMA, 3269 | ACTIONS(399), 1, 3270 | anon_sym_RBRACE, 3271 | [2550] = 2, 3272 | ACTIONS(401), 1, 3273 | anon_sym_EQ, 3274 | ACTIONS(403), 1, 3275 | anon_sym_LPAREN, 3276 | [2557] = 2, 3277 | ACTIONS(405), 1, 3278 | sym_tag_end, 3279 | ACTIONS(407), 1, 3280 | anon_sym_SLASH, 3281 | [2564] = 2, 3282 | ACTIONS(409), 1, 3283 | anon_sym_RBRACK, 3284 | ACTIONS(411), 1, 3285 | anon_sym_COMMA, 3286 | [2571] = 2, 3287 | ACTIONS(413), 1, 3288 | anon_sym_EQ, 3289 | ACTIONS(415), 1, 3290 | anon_sym_LPAREN, 3291 | [2578] = 1, 3292 | ACTIONS(415), 1, 3293 | anon_sym_LPAREN, 3294 | [2582] = 1, 3295 | ACTIONS(417), 1, 3296 | sym_identifier, 3297 | [2586] = 1, 3298 | ACTIONS(419), 1, 3299 | anon_sym_RBRACK, 3300 | [2590] = 1, 3301 | ACTIONS(421), 1, 3302 | sym_tag_end, 3303 | [2594] = 1, 3304 | ACTIONS(423), 1, 3305 | anon_sym_COMMA, 3306 | [2598] = 1, 3307 | ACTIONS(425), 1, 3308 | anon_sym_RBRACK, 3309 | [2602] = 1, 3310 | ACTIONS(427), 1, 3311 | sym_tag_end, 3312 | [2606] = 1, 3313 | ACTIONS(429), 1, 3314 | anon_sym_RBRACE, 3315 | [2610] = 1, 3316 | ACTIONS(431), 1, 3317 | anon_sym_COMMA, 3318 | [2614] = 1, 3319 | ACTIONS(433), 1, 3320 | sym_identifier, 3321 | [2618] = 1, 3322 | ACTIONS(435), 1, 3323 | anon_sym_RBRACK, 3324 | [2622] = 1, 3325 | ACTIONS(437), 1, 3326 | sym_identifier, 3327 | [2626] = 1, 3328 | ACTIONS(405), 1, 3329 | sym_tag_end, 3330 | [2630] = 1, 3331 | ACTIONS(439), 1, 3332 | sym_tag_end, 3333 | [2634] = 1, 3334 | ACTIONS(441), 1, 3335 | sym_tag_end, 3336 | [2638] = 1, 3337 | ACTIONS(443), 1, 3338 | sym_identifier, 3339 | [2642] = 1, 3340 | ACTIONS(445), 1, 3341 | sym_identifier, 3342 | [2646] = 1, 3343 | ACTIONS(447), 1, 3344 | anon_sym_COLON, 3345 | [2650] = 1, 3346 | ACTIONS(308), 1, 3347 | anon_sym_RBRACE, 3348 | [2654] = 1, 3349 | ACTIONS(449), 1, 3350 | sym_identifier, 3351 | [2658] = 1, 3352 | ACTIONS(413), 1, 3353 | anon_sym_EQ, 3354 | [2662] = 1, 3355 | ACTIONS(47), 1, 3356 | anon_sym_RBRACK, 3357 | [2666] = 1, 3358 | ACTIONS(451), 1, 3359 | anon_sym_COLON, 3360 | [2670] = 1, 3361 | ACTIONS(296), 1, 3362 | anon_sym_RBRACE, 3363 | [2674] = 1, 3364 | ACTIONS(453), 1, 3365 | anon_sym_COLON, 3366 | [2678] = 1, 3367 | ACTIONS(455), 1, 3368 | ts_builtin_sym_end, 3369 | [2682] = 1, 3370 | ACTIONS(457), 1, 3371 | sym_identifier, 3372 | [2686] = 1, 3373 | ACTIONS(459), 1, 3374 | anon_sym_RBRACK, 3375 | [2690] = 1, 3376 | ACTIONS(461), 1, 3377 | anon_sym_RBRACE, 3378 | [2694] = 1, 3379 | ACTIONS(463), 1, 3380 | anon_sym_RBRACK, 3381 | [2698] = 1, 3382 | ACTIONS(403), 1, 3383 | anon_sym_LPAREN, 3384 | [2702] = 1, 3385 | ACTIONS(49), 1, 3386 | anon_sym_RBRACK, 3387 | }; 3388 | 3389 | static const uint32_t ts_small_parse_table_map[] = { 3390 | [SMALL_STATE(2)] = 0, 3391 | [SMALL_STATE(3)] = 73, 3392 | [SMALL_STATE(4)] = 130, 3393 | [SMALL_STATE(5)] = 187, 3394 | [SMALL_STATE(6)] = 244, 3395 | [SMALL_STATE(7)] = 301, 3396 | [SMALL_STATE(8)] = 355, 3397 | [SMALL_STATE(9)] = 409, 3398 | [SMALL_STATE(10)] = 463, 3399 | [SMALL_STATE(11)] = 517, 3400 | [SMALL_STATE(12)] = 571, 3401 | [SMALL_STATE(13)] = 625, 3402 | [SMALL_STATE(14)] = 676, 3403 | [SMALL_STATE(15)] = 728, 3404 | [SMALL_STATE(16)] = 775, 3405 | [SMALL_STATE(17)] = 822, 3406 | [SMALL_STATE(18)] = 869, 3407 | [SMALL_STATE(19)] = 894, 3408 | [SMALL_STATE(20)] = 939, 3409 | [SMALL_STATE(21)] = 967, 3410 | [SMALL_STATE(22)] = 995, 3411 | [SMALL_STATE(23)] = 1023, 3412 | [SMALL_STATE(24)] = 1043, 3413 | [SMALL_STATE(25)] = 1063, 3414 | [SMALL_STATE(26)] = 1083, 3415 | [SMALL_STATE(27)] = 1103, 3416 | [SMALL_STATE(28)] = 1122, 3417 | [SMALL_STATE(29)] = 1141, 3418 | [SMALL_STATE(30)] = 1160, 3419 | [SMALL_STATE(31)] = 1179, 3420 | [SMALL_STATE(32)] = 1198, 3421 | [SMALL_STATE(33)] = 1217, 3422 | [SMALL_STATE(34)] = 1240, 3423 | [SMALL_STATE(35)] = 1259, 3424 | [SMALL_STATE(36)] = 1282, 3425 | [SMALL_STATE(37)] = 1301, 3426 | [SMALL_STATE(38)] = 1320, 3427 | [SMALL_STATE(39)] = 1339, 3428 | [SMALL_STATE(40)] = 1362, 3429 | [SMALL_STATE(41)] = 1381, 3430 | [SMALL_STATE(42)] = 1400, 3431 | [SMALL_STATE(43)] = 1432, 3432 | [SMALL_STATE(44)] = 1464, 3433 | [SMALL_STATE(45)] = 1496, 3434 | [SMALL_STATE(46)] = 1528, 3435 | [SMALL_STATE(47)] = 1560, 3436 | [SMALL_STATE(48)] = 1577, 3437 | [SMALL_STATE(49)] = 1594, 3438 | [SMALL_STATE(50)] = 1625, 3439 | [SMALL_STATE(51)] = 1642, 3440 | [SMALL_STATE(52)] = 1670, 3441 | [SMALL_STATE(53)] = 1690, 3442 | [SMALL_STATE(54)] = 1706, 3443 | [SMALL_STATE(55)] = 1726, 3444 | [SMALL_STATE(56)] = 1754, 3445 | [SMALL_STATE(57)] = 1780, 3446 | [SMALL_STATE(58)] = 1800, 3447 | [SMALL_STATE(59)] = 1816, 3448 | [SMALL_STATE(60)] = 1839, 3449 | [SMALL_STATE(61)] = 1865, 3450 | [SMALL_STATE(62)] = 1891, 3451 | [SMALL_STATE(63)] = 1913, 3452 | [SMALL_STATE(64)] = 1925, 3453 | [SMALL_STATE(65)] = 1951, 3454 | [SMALL_STATE(66)] = 1977, 3455 | [SMALL_STATE(67)] = 1989, 3456 | [SMALL_STATE(68)] = 2000, 3457 | [SMALL_STATE(69)] = 2011, 3458 | [SMALL_STATE(70)] = 2022, 3459 | [SMALL_STATE(71)] = 2043, 3460 | [SMALL_STATE(72)] = 2054, 3461 | [SMALL_STATE(73)] = 2065, 3462 | [SMALL_STATE(74)] = 2082, 3463 | [SMALL_STATE(75)] = 2093, 3464 | [SMALL_STATE(76)] = 2104, 3465 | [SMALL_STATE(77)] = 2123, 3466 | [SMALL_STATE(78)] = 2134, 3467 | [SMALL_STATE(79)] = 2145, 3468 | [SMALL_STATE(80)] = 2156, 3469 | [SMALL_STATE(81)] = 2167, 3470 | [SMALL_STATE(82)] = 2178, 3471 | [SMALL_STATE(83)] = 2189, 3472 | [SMALL_STATE(84)] = 2200, 3473 | [SMALL_STATE(85)] = 2221, 3474 | [SMALL_STATE(86)] = 2232, 3475 | [SMALL_STATE(87)] = 2243, 3476 | [SMALL_STATE(88)] = 2254, 3477 | [SMALL_STATE(89)] = 2277, 3478 | [SMALL_STATE(90)] = 2294, 3479 | [SMALL_STATE(91)] = 2305, 3480 | [SMALL_STATE(92)] = 2315, 3481 | [SMALL_STATE(93)] = 2331, 3482 | [SMALL_STATE(94)] = 2347, 3483 | [SMALL_STATE(95)] = 2363, 3484 | [SMALL_STATE(96)] = 2379, 3485 | [SMALL_STATE(97)] = 2394, 3486 | [SMALL_STATE(98)] = 2409, 3487 | [SMALL_STATE(99)] = 2421, 3488 | [SMALL_STATE(100)] = 2433, 3489 | [SMALL_STATE(101)] = 2445, 3490 | [SMALL_STATE(102)] = 2453, 3491 | [SMALL_STATE(103)] = 2465, 3492 | [SMALL_STATE(104)] = 2477, 3493 | [SMALL_STATE(105)] = 2484, 3494 | [SMALL_STATE(106)] = 2490, 3495 | [SMALL_STATE(107)] = 2496, 3496 | [SMALL_STATE(108)] = 2502, 3497 | [SMALL_STATE(109)] = 2508, 3498 | [SMALL_STATE(110)] = 2514, 3499 | [SMALL_STATE(111)] = 2520, 3500 | [SMALL_STATE(112)] = 2526, 3501 | [SMALL_STATE(113)] = 2532, 3502 | [SMALL_STATE(114)] = 2538, 3503 | [SMALL_STATE(115)] = 2543, 3504 | [SMALL_STATE(116)] = 2550, 3505 | [SMALL_STATE(117)] = 2557, 3506 | [SMALL_STATE(118)] = 2564, 3507 | [SMALL_STATE(119)] = 2571, 3508 | [SMALL_STATE(120)] = 2578, 3509 | [SMALL_STATE(121)] = 2582, 3510 | [SMALL_STATE(122)] = 2586, 3511 | [SMALL_STATE(123)] = 2590, 3512 | [SMALL_STATE(124)] = 2594, 3513 | [SMALL_STATE(125)] = 2598, 3514 | [SMALL_STATE(126)] = 2602, 3515 | [SMALL_STATE(127)] = 2606, 3516 | [SMALL_STATE(128)] = 2610, 3517 | [SMALL_STATE(129)] = 2614, 3518 | [SMALL_STATE(130)] = 2618, 3519 | [SMALL_STATE(131)] = 2622, 3520 | [SMALL_STATE(132)] = 2626, 3521 | [SMALL_STATE(133)] = 2630, 3522 | [SMALL_STATE(134)] = 2634, 3523 | [SMALL_STATE(135)] = 2638, 3524 | [SMALL_STATE(136)] = 2642, 3525 | [SMALL_STATE(137)] = 2646, 3526 | [SMALL_STATE(138)] = 2650, 3527 | [SMALL_STATE(139)] = 2654, 3528 | [SMALL_STATE(140)] = 2658, 3529 | [SMALL_STATE(141)] = 2662, 3530 | [SMALL_STATE(142)] = 2666, 3531 | [SMALL_STATE(143)] = 2670, 3532 | [SMALL_STATE(144)] = 2674, 3533 | [SMALL_STATE(145)] = 2678, 3534 | [SMALL_STATE(146)] = 2682, 3535 | [SMALL_STATE(147)] = 2686, 3536 | [SMALL_STATE(148)] = 2690, 3537 | [SMALL_STATE(149)] = 2694, 3538 | [SMALL_STATE(150)] = 2698, 3539 | [SMALL_STATE(151)] = 2702, 3540 | }; 3541 | 3542 | static const TSParseActionEntry ts_parse_actions[] = { 3543 | [0] = {.entry = {.count = 0, .reusable = false}}, 3544 | [1] = {.entry = {.count = 1, .reusable = false}}, RECOVER(), 3545 | [3] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_content, 0), 3546 | [5] = {.entry = {.count = 1, .reusable = true}}, SHIFT(111), 3547 | [7] = {.entry = {.count = 1, .reusable = true}}, SHIFT(19), 3548 | [9] = {.entry = {.count = 1, .reusable = false}}, SHIFT(119), 3549 | [11] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_tag_open, 2, .production_id = 1), 3550 | [13] = {.entry = {.count = 1, .reusable = false}}, SHIFT(129), 3551 | [15] = {.entry = {.count = 1, .reusable = false}}, SHIFT(75), 3552 | [17] = {.entry = {.count = 1, .reusable = false}}, SHIFT(78), 3553 | [19] = {.entry = {.count = 1, .reusable = false}}, SHIFT(99), 3554 | [21] = {.entry = {.count = 1, .reusable = false}}, SHIFT(6), 3555 | [23] = {.entry = {.count = 1, .reusable = false}}, SHIFT(65), 3556 | [25] = {.entry = {.count = 1, .reusable = false}}, SHIFT(135), 3557 | [27] = {.entry = {.count = 1, .reusable = false}}, SHIFT(18), 3558 | [29] = {.entry = {.count = 1, .reusable = false}}, SHIFT(150), 3559 | [31] = {.entry = {.count = 1, .reusable = false}}, SHIFT(29), 3560 | [33] = {.entry = {.count = 1, .reusable = false}}, SHIFT(38), 3561 | [35] = {.entry = {.count = 1, .reusable = true}}, SHIFT(29), 3562 | [37] = {.entry = {.count = 1, .reusable = true}}, SHIFT(103), 3563 | [39] = {.entry = {.count = 1, .reusable = true}}, SHIFT(3), 3564 | [41] = {.entry = {.count = 1, .reusable = true}}, SHIFT(40), 3565 | [43] = {.entry = {.count = 1, .reusable = true}}, SHIFT(61), 3566 | [45] = {.entry = {.count = 1, .reusable = true}}, SHIFT(135), 3567 | [47] = {.entry = {.count = 1, .reusable = true}}, SHIFT(36), 3568 | [49] = {.entry = {.count = 1, .reusable = true}}, SHIFT(87), 3569 | [51] = {.entry = {.count = 1, .reusable = true}}, SHIFT(69), 3570 | [53] = {.entry = {.count = 1, .reusable = true}}, SHIFT(37), 3571 | [55] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_function_repeat1, 2), SHIFT_REPEAT(150), 3572 | [58] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_function_repeat1, 2), SHIFT_REPEAT(29), 3573 | [61] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_function_repeat1, 2), SHIFT_REPEAT(38), 3574 | [64] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_function_repeat1, 2), SHIFT_REPEAT(29), 3575 | [67] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_function_repeat1, 2), SHIFT_REPEAT(103), 3576 | [70] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_function_repeat1, 2), SHIFT_REPEAT(3), 3577 | [73] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_function_repeat1, 2), SHIFT_REPEAT(61), 3578 | [76] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_function_repeat1, 2), SHIFT_REPEAT(135), 3579 | [79] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_function_repeat1, 2), 3580 | [81] = {.entry = {.count = 1, .reusable = true}}, SHIFT(80), 3581 | [83] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_array_repeat1, 2), SHIFT_REPEAT(150), 3582 | [86] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_array_repeat1, 2), SHIFT_REPEAT(29), 3583 | [89] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_array_repeat1, 2), SHIFT_REPEAT(38), 3584 | [92] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_array_repeat1, 2), SHIFT_REPEAT(29), 3585 | [95] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_array_repeat1, 2), SHIFT_REPEAT(103), 3586 | [98] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_array_repeat1, 2), SHIFT_REPEAT(3), 3587 | [101] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_array_repeat1, 2), 3588 | [103] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_array_repeat1, 2), SHIFT_REPEAT(61), 3589 | [106] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_array_repeat1, 2), SHIFT_REPEAT(135), 3590 | [109] = {.entry = {.count = 1, .reusable = true}}, SHIFT(27), 3591 | [111] = {.entry = {.count = 1, .reusable = true}}, SHIFT(77), 3592 | [113] = {.entry = {.count = 1, .reusable = false}}, SHIFT(116), 3593 | [115] = {.entry = {.count = 1, .reusable = false}}, SHIFT(62), 3594 | [117] = {.entry = {.count = 1, .reusable = false}}, SHIFT(139), 3595 | [119] = {.entry = {.count = 1, .reusable = false}}, SHIFT(120), 3596 | [121] = {.entry = {.count = 1, .reusable = true}}, SHIFT(75), 3597 | [123] = {.entry = {.count = 1, .reusable = true}}, SHIFT(99), 3598 | [125] = {.entry = {.count = 1, .reusable = true}}, SHIFT(6), 3599 | [127] = {.entry = {.count = 1, .reusable = true}}, SHIFT(65), 3600 | [129] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym__space, 2), 3601 | [131] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__space, 2), SHIFT_REPEAT(18), 3602 | [134] = {.entry = {.count = 1, .reusable = false}}, SHIFT(76), 3603 | [136] = {.entry = {.count = 1, .reusable = false}}, SHIFT(14), 3604 | [138] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_variable, 3, .production_id = 7), 3605 | [140] = {.entry = {.count = 1, .reusable = true}}, SHIFT(146), 3606 | [142] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_variable, 3, .production_id = 7), 3607 | [144] = {.entry = {.count = 1, .reusable = true}}, SHIFT(70), 3608 | [146] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_variable_repeat1, 2), 3609 | [148] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_variable_repeat1, 2), SHIFT_REPEAT(146), 3610 | [151] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_variable_repeat1, 2), 3611 | [153] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_variable_repeat1, 2), SHIFT_REPEAT(70), 3612 | [156] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_variable, 2, .production_id = 7), 3613 | [158] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_variable, 2, .production_id = 7), 3614 | [160] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_string, 3), 3615 | [162] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_string, 3), 3616 | [164] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_variable_tail, 2, .production_id = 9), 3617 | [166] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_variable_tail, 2, .production_id = 9), 3618 | [168] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_variable_tail, 3), 3619 | [170] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_variable_tail, 3), 3620 | [172] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_string, 2), 3621 | [174] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_string, 2), 3622 | [176] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function, 4, .production_id = 8), 3623 | [178] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function, 4, .production_id = 8), 3624 | [180] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_compound, 1), 3625 | [182] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_compound, 1), 3626 | [184] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_primitive, 1), 3627 | [186] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_primitive, 1), 3628 | [188] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_array, 4), 3629 | [190] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array, 4), 3630 | [192] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_hash, 4), 3631 | [194] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_hash, 4), 3632 | [196] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_value, 1), 3633 | [198] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_value, 1), 3634 | [200] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_function_parameters_repeat1, 2), 3635 | [202] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_function_parameters_repeat1, 2), 3636 | [204] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_function_parameters_repeat1, 2), SHIFT_REPEAT(13), 3637 | [207] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_hash, 3), 3638 | [209] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_hash, 3), 3639 | [211] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_parameters, 1), 3640 | [213] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_parameters, 1), 3641 | [215] = {.entry = {.count = 1, .reusable = true}}, SHIFT(13), 3642 | [217] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_array, 3), 3643 | [219] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array, 3), 3644 | [221] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function, 3, .production_id = 8), 3645 | [223] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function, 3, .production_id = 8), 3646 | [225] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_boolean, 1), 3647 | [227] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_boolean, 1), 3648 | [229] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_parameters, 2), 3649 | [231] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_parameters, 2), 3650 | [233] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_array, 2), 3651 | [235] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_array, 2), 3652 | [237] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_hash, 2), 3653 | [239] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_hash, 2), 3654 | [241] = {.entry = {.count = 1, .reusable = false}}, SHIFT(140), 3655 | [243] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_tag_open, 5, .production_id = 1), 3656 | [245] = {.entry = {.count = 1, .reusable = false}}, SHIFT(112), 3657 | [247] = {.entry = {.count = 1, .reusable = false}}, SHIFT(49), 3658 | [249] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_annotation_repeat1, 2), SHIFT_REPEAT(140), 3659 | [252] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_annotation_repeat1, 2), 3660 | [254] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_annotation_repeat1, 2), SHIFT_REPEAT(129), 3661 | [257] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_annotation_repeat1, 2), SHIFT_REPEAT(55), 3662 | [260] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_tag_open, 3, .production_id = 1), 3663 | [262] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_tag_open, 4, .production_id = 1), 3664 | [264] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_parameter, 1), 3665 | [266] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_parameter, 1), 3666 | [268] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_parameter_tail, 2), 3667 | [270] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_parameter_tail, 2), 3668 | [272] = {.entry = {.count = 1, .reusable = false}}, SHIFT(109), 3669 | [274] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_parameter_named, 3, .production_id = 10), 3670 | [276] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_parameter_named, 3, .production_id = 10), 3671 | [278] = {.entry = {.count = 1, .reusable = false}}, SHIFT(131), 3672 | [280] = {.entry = {.count = 1, .reusable = false}}, SHIFT(84), 3673 | [282] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__array_item, 2), 3674 | [284] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__array_item, 2), 3675 | [286] = {.entry = {.count = 1, .reusable = false}}, SHIFT(108), 3676 | [288] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_variable_repeat1, 2), SHIFT_REPEAT(131), 3677 | [291] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_variable_repeat1, 2), SHIFT_REPEAT(84), 3678 | [294] = {.entry = {.count = 1, .reusable = true}}, SHIFT(144), 3679 | [296] = {.entry = {.count = 1, .reusable = true}}, SHIFT(34), 3680 | [298] = {.entry = {.count = 1, .reusable = true}}, SHIFT(41), 3681 | [300] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_tag_open, 1, .production_id = 1), 3682 | [302] = {.entry = {.count = 1, .reusable = false}}, SHIFT(16), 3683 | [304] = {.entry = {.count = 1, .reusable = false}}, SHIFT(9), 3684 | [306] = {.entry = {.count = 1, .reusable = false}}, SHIFT(2), 3685 | [308] = {.entry = {.count = 1, .reusable = true}}, SHIFT(90), 3686 | [310] = {.entry = {.count = 1, .reusable = true}}, SHIFT(72), 3687 | [312] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__attribute_full, 3, .production_id = 6), 3688 | [314] = {.entry = {.count = 1, .reusable = true}}, SHIFT(125), 3689 | [316] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__attribute_shorthand, 2, .production_id = 5), 3690 | [318] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_content, 1), 3691 | [320] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attribute, 1, .production_id = 2), 3692 | [322] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_attribute, 1, .production_id = 3), 3693 | [324] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_hash_repeat1, 2), SHIFT_REPEAT(144), 3694 | [327] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_hash_repeat1, 2), SHIFT_REPEAT(103), 3695 | [330] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_hash_repeat1, 2), 3696 | [332] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_content_repeat1, 2), 3697 | [334] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_content_repeat1, 2), SHIFT_REPEAT(111), 3698 | [337] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_content_repeat1, 2), SHIFT_REPEAT(19), 3699 | [340] = {.entry = {.count = 1, .reusable = false}}, SHIFT(45), 3700 | [342] = {.entry = {.count = 1, .reusable = false}}, SHIFT(42), 3701 | [344] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_tag_open_repeat1, 2), 3702 | [346] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_tag_open_repeat1, 2), SHIFT_REPEAT(51), 3703 | [349] = {.entry = {.count = 1, .reusable = false}}, SHIFT(46), 3704 | [351] = {.entry = {.count = 1, .reusable = false}}, SHIFT(107), 3705 | [353] = {.entry = {.count = 1, .reusable = false}}, SHIFT(56), 3706 | [355] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_interpolation_repeat1, 2), 3707 | [357] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_interpolation_repeat1, 2), SHIFT_REPEAT(59), 3708 | [360] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_string_repeat1, 2), 3709 | [362] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_string_repeat1, 2), SHIFT_REPEAT(98), 3710 | [365] = {.entry = {.count = 1, .reusable = false}}, SHIFT(74), 3711 | [367] = {.entry = {.count = 1, .reusable = true}}, SHIFT(100), 3712 | [369] = {.entry = {.count = 1, .reusable = false}}, SHIFT(85), 3713 | [371] = {.entry = {.count = 1, .reusable = true}}, SHIFT(98), 3714 | [373] = {.entry = {.count = 1, .reusable = false}}, SHIFT(23), 3715 | [375] = {.entry = {.count = 1, .reusable = false}}, SHIFT(26), 3716 | [377] = {.entry = {.count = 1, .reusable = true}}, SHIFT(102), 3717 | [379] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__hash_item, 2), 3718 | [381] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_tag, 4), 3719 | [383] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_interpolation, 3), 3720 | [385] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_interpolation, 4), 3721 | [387] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_annotation, 4), 3722 | [389] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_markdown, 1), 3723 | [391] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_annotation, 3), 3724 | [393] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_tag, 3), 3725 | [395] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__hash_key_value, 3), 3726 | [397] = {.entry = {.count = 1, .reusable = true}}, SHIFT(105), 3727 | [399] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__hash_item_with_optional_comma, 1), 3728 | [401] = {.entry = {.count = 1, .reusable = true}}, SHIFT(17), 3729 | [403] = {.entry = {.count = 1, .reusable = true}}, SHIFT(7), 3730 | [405] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_tag_interior, 1), 3731 | [407] = {.entry = {.count = 1, .reusable = true}}, SHIFT(123), 3732 | [409] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__array_item_with_optional_comma, 1), 3733 | [411] = {.entry = {.count = 1, .reusable = true}}, SHIFT(58), 3734 | [413] = {.entry = {.count = 1, .reusable = true}}, SHIFT(16), 3735 | [415] = {.entry = {.count = 1, .reusable = true}}, SHIFT(9), 3736 | [417] = {.entry = {.count = 1, .reusable = true}}, SHIFT(22), 3737 | [419] = {.entry = {.count = 1, .reusable = true}}, SHIFT(63), 3738 | [421] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_tag_self_closing, 2), 3739 | [423] = {.entry = {.count = 1, .reusable = true}}, SHIFT(110), 3740 | [425] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_variable_segment_value, 1), 3741 | [427] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_tag_close, 2, .production_id = 4), 3742 | [429] = {.entry = {.count = 1, .reusable = true}}, SHIFT(86), 3743 | [431] = {.entry = {.count = 1, .reusable = true}}, SHIFT(53), 3744 | [433] = {.entry = {.count = 1, .reusable = true}}, SHIFT(71), 3745 | [435] = {.entry = {.count = 1, .reusable = true}}, SHIFT(67), 3746 | [437] = {.entry = {.count = 1, .reusable = true}}, SHIFT(66), 3747 | [439] = {.entry = {.count = 1, .reusable = true}}, SHIFT(106), 3748 | [441] = {.entry = {.count = 1, .reusable = true}}, SHIFT(113), 3749 | [443] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_variable_sigil, 1), 3750 | [445] = {.entry = {.count = 1, .reusable = true}}, SHIFT(54), 3751 | [447] = {.entry = {.count = 1, .reusable = true}}, SHIFT(15), 3752 | [449] = {.entry = {.count = 1, .reusable = true}}, SHIFT(126), 3753 | [451] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_hash_key, 1), 3754 | [453] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_hash_key, 1, .production_id = 6), 3755 | [455] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), 3756 | [457] = {.entry = {.count = 1, .reusable = true}}, SHIFT(24), 3757 | [459] = {.entry = {.count = 1, .reusable = true}}, SHIFT(30), 3758 | [461] = {.entry = {.count = 1, .reusable = true}}, SHIFT(31), 3759 | [463] = {.entry = {.count = 1, .reusable = true}}, SHIFT(25), 3760 | }; 3761 | 3762 | #ifdef __cplusplus 3763 | extern "C" { 3764 | #endif 3765 | #ifdef _WIN32 3766 | #define extern __declspec(dllexport) 3767 | #endif 3768 | 3769 | extern const TSLanguage *tree_sitter_markdoc(void) { 3770 | static const TSLanguage language = { 3771 | .version = LANGUAGE_VERSION, 3772 | .symbol_count = SYMBOL_COUNT, 3773 | .alias_count = ALIAS_COUNT, 3774 | .token_count = TOKEN_COUNT, 3775 | .external_token_count = EXTERNAL_TOKEN_COUNT, 3776 | .state_count = STATE_COUNT, 3777 | .large_state_count = LARGE_STATE_COUNT, 3778 | .production_id_count = PRODUCTION_ID_COUNT, 3779 | .field_count = FIELD_COUNT, 3780 | .max_alias_sequence_length = MAX_ALIAS_SEQUENCE_LENGTH, 3781 | .parse_table = &ts_parse_table[0][0], 3782 | .small_parse_table = ts_small_parse_table, 3783 | .small_parse_table_map = ts_small_parse_table_map, 3784 | .parse_actions = ts_parse_actions, 3785 | .symbol_names = ts_symbol_names, 3786 | .field_names = ts_field_names, 3787 | .field_map_slices = ts_field_map_slices, 3788 | .field_map_entries = ts_field_map_entries, 3789 | .symbol_metadata = ts_symbol_metadata, 3790 | .public_symbol_map = ts_symbol_map, 3791 | .alias_map = ts_non_terminal_alias_map, 3792 | .alias_sequences = &ts_alias_sequences[0][0], 3793 | .lex_modes = ts_lex_modes, 3794 | .lex_fn = ts_lex, 3795 | .keyword_lex_fn = ts_lex_keywords, 3796 | .keyword_capture_token = sym_identifier, 3797 | .primary_state_ids = ts_primary_state_ids, 3798 | }; 3799 | return &language; 3800 | } 3801 | #ifdef __cplusplus 3802 | } 3803 | #endif 3804 | --------------------------------------------------------------------------------