aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-09-23 00:15:39 +0200
committerThomas Voss <mail@thomasvoss.com> 2024-09-23 00:15:39 +0200
commit425bb2ef451f887a1377ab72293a06e57c9475db (patch)
tree3007d17f700dbfb55aea0a05f56e8477da1a3ee2 /src
parent7e2765bca7f2d499c30c471b8746e7062ab12b90 (diff)
Test some things
Diffstat (limited to 'src')
-rw-r--r--src/grammar.json36
-rw-r--r--src/node-types.json29
-rw-r--r--src/parser.c516
3 files changed, 312 insertions, 269 deletions
diff --git a/src/grammar.json b/src/grammar.json
index 9dabb74..2ee7e30 100644
--- a/src/grammar.json
+++ b/src/grammar.json
@@ -283,26 +283,34 @@
"type": "CHOICE",
"members": [
{
- "type": "PATTERN",
- "value": "(\\\\[@}\\\\]|[^@}\\\\\\p{Pattern_White_Space}])((\\\\[@}\\\\]|[^@}\\\\])*(\\\\[@}\\\\]|[^@}\\\\\\p{Pattern_White_Space}]))?",
- "flags": "u"
+ "type": "SYMBOL",
+ "name": "raw_text"
},
{
- "type": "SEQ",
- "members": [
- {
- "type": "STRING",
- "value": "@"
- },
- {
- "type": "SYMBOL",
- "name": "_toplevel"
- }
- ]
+ "type": "SYMBOL",
+ "name": "inline_node"
}
]
}
},
+ "raw_text": {
+ "type": "PATTERN",
+ "value": "(\\\\[@}\\\\]|[^@}\\\\\\p{Pattern_White_Space}])((\\\\[@}\\\\]|[^@}\\\\])*(\\\\[@}\\\\]|[^@}\\\\\\p{Pattern_White_Space}]))?",
+ "flags": "u"
+ },
+ "inline_node": {
+ "type": "SEQ",
+ "members": [
+ {
+ "type": "STRING",
+ "value": "@"
+ },
+ {
+ "type": "SYMBOL",
+ "name": "_toplevel"
+ }
+ ]
+ },
"ident": {
"type": "PATTERN",
"value": "\\p{XID_Start}[-\\p{XID_Continue}]*",
diff --git a/src/node-types.json b/src/node-types.json
index 9ee8b4b..68c7ce1 100644
--- a/src/node-types.json
+++ b/src/node-types.json
@@ -136,6 +136,25 @@
}
},
{
+ "type": "inline_node",
+ "named": true,
+ "fields": {},
+ "children": {
+ "multiple": false,
+ "required": true,
+ "types": [
+ {
+ "type": "comment",
+ "named": true
+ },
+ {
+ "type": "node",
+ "named": true
+ }
+ ]
+ }
+ },
+ {
"type": "node",
"named": true,
"fields": {
@@ -200,14 +219,14 @@
"fields": {},
"children": {
"multiple": true,
- "required": false,
+ "required": true,
"types": [
{
- "type": "comment",
+ "type": "inline_node",
"named": true
},
{
- "type": "node",
+ "type": "raw_text",
"named": true
}
]
@@ -242,6 +261,10 @@
"named": true
},
{
+ "type": "raw_text",
+ "named": true
+ },
+ {
"type": "string",
"named": true
},
diff --git a/src/parser.c b/src/parser.c
index e97e75f..d0f2558 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -7,7 +7,7 @@
#define LANGUAGE_VERSION 14
#define STATE_COUNT 52
#define LARGE_STATE_COUNT 2
-#define SYMBOL_COUNT 26
+#define SYMBOL_COUNT 27
#define ALIAS_COUNT 0
#define TOKEN_COUNT 13
#define EXTERNAL_TOKEN_COUNT 0
@@ -24,7 +24,7 @@ enum ts_symbol_identifiers {
anon_sym_POUND = 6,
aux_sym_id_attr_token1 = 7,
anon_sym_DOT = 8,
- aux_sym_text_token1 = 9,
+ sym_raw_text = 9,
anon_sym_AT = 10,
sym_ident = 11,
sym_string = 12,
@@ -38,9 +38,10 @@ enum ts_symbol_identifiers {
sym_id_attr = 20,
sym_class_attr = 21,
sym_text = 22,
- aux_sym_document_repeat1 = 23,
- aux_sym_attr_list_repeat1 = 24,
- aux_sym_text_repeat1 = 25,
+ sym_inline_node = 23,
+ aux_sym_document_repeat1 = 24,
+ aux_sym_attr_list_repeat1 = 25,
+ aux_sym_text_repeat1 = 26,
};
static const char * const ts_symbol_names[] = {
@@ -53,7 +54,7 @@ static const char * const ts_symbol_names[] = {
[anon_sym_POUND] = "#",
[aux_sym_id_attr_token1] = "ident",
[anon_sym_DOT] = ".",
- [aux_sym_text_token1] = "text_token1",
+ [sym_raw_text] = "raw_text",
[anon_sym_AT] = "@",
[sym_ident] = "ident",
[sym_string] = "string",
@@ -67,6 +68,7 @@ static const char * const ts_symbol_names[] = {
[sym_id_attr] = "id_attr",
[sym_class_attr] = "class_attr",
[sym_text] = "text",
+ [sym_inline_node] = "inline_node",
[aux_sym_document_repeat1] = "document_repeat1",
[aux_sym_attr_list_repeat1] = "attr_list_repeat1",
[aux_sym_text_repeat1] = "text_repeat1",
@@ -82,7 +84,7 @@ static const TSSymbol ts_symbol_map[] = {
[anon_sym_POUND] = anon_sym_POUND,
[aux_sym_id_attr_token1] = sym_ident,
[anon_sym_DOT] = anon_sym_DOT,
- [aux_sym_text_token1] = aux_sym_text_token1,
+ [sym_raw_text] = sym_raw_text,
[anon_sym_AT] = anon_sym_AT,
[sym_ident] = sym_ident,
[sym_string] = sym_string,
@@ -96,6 +98,7 @@ static const TSSymbol ts_symbol_map[] = {
[sym_id_attr] = sym_id_attr,
[sym_class_attr] = sym_class_attr,
[sym_text] = sym_text,
+ [sym_inline_node] = sym_inline_node,
[aux_sym_document_repeat1] = aux_sym_document_repeat1,
[aux_sym_attr_list_repeat1] = aux_sym_attr_list_repeat1,
[aux_sym_text_repeat1] = aux_sym_text_repeat1,
@@ -138,9 +141,9 @@ static const TSSymbolMetadata ts_symbol_metadata[] = {
.visible = true,
.named = false,
},
- [aux_sym_text_token1] = {
- .visible = false,
- .named = false,
+ [sym_raw_text] = {
+ .visible = true,
+ .named = true,
},
[anon_sym_AT] = {
.visible = true,
@@ -194,6 +197,10 @@ static const TSSymbolMetadata ts_symbol_metadata[] = {
.visible = true,
.named = true,
},
+ [sym_inline_node] = {
+ .visible = true,
+ .named = true,
+ },
[aux_sym_document_repeat1] = {
.visible = false,
.named = false,
@@ -281,12 +288,12 @@ static const TSStateId ts_primary_state_ids[STATE_COUNT] = {
[9] = 9,
[10] = 10,
[11] = 11,
- [12] = 11,
- [13] = 13,
+ [12] = 12,
+ [13] = 11,
[14] = 14,
- [15] = 15,
+ [15] = 14,
[16] = 16,
- [17] = 14,
+ [17] = 17,
[18] = 18,
[19] = 19,
[20] = 20,
@@ -300,16 +307,16 @@ static const TSStateId ts_primary_state_ids[STATE_COUNT] = {
[28] = 28,
[29] = 29,
[30] = 30,
- [31] = 21,
+ [31] = 28,
[32] = 32,
[33] = 33,
- [34] = 18,
- [35] = 24,
- [36] = 20,
- [37] = 25,
- [38] = 26,
- [39] = 30,
- [40] = 28,
+ [34] = 24,
+ [35] = 20,
+ [36] = 27,
+ [37] = 29,
+ [38] = 25,
+ [39] = 26,
+ [40] = 30,
[41] = 32,
[42] = 42,
[43] = 43,
@@ -654,7 +661,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) {
ACCEPT_TOKEN(anon_sym_DOT);
END_STATE();
case 19:
- ACCEPT_TOKEN(aux_sym_text_token1);
+ ACCEPT_TOKEN(sym_raw_text);
if (lookahead == '\\') ADVANCE(6);
if (('\t' <= lookahead && lookahead <= '\r') ||
lookahead == ' ' ||
@@ -698,10 +705,10 @@ static const TSLexMode ts_lex_modes[STATE_COUNT] = {
[12] = {.lex_state = 9},
[13] = {.lex_state = 9},
[14] = {.lex_state = 2},
- [15] = {.lex_state = 9},
+ [15] = {.lex_state = 2},
[16] = {.lex_state = 9},
[17] = {.lex_state = 2},
- [18] = {.lex_state = 9},
+ [18] = {.lex_state = 2},
[19] = {.lex_state = 9},
[20] = {.lex_state = 9},
[21] = {.lex_state = 9},
@@ -710,9 +717,9 @@ static const TSLexMode ts_lex_modes[STATE_COUNT] = {
[24] = {.lex_state = 9},
[25] = {.lex_state = 9},
[26] = {.lex_state = 9},
- [27] = {.lex_state = 2},
+ [27] = {.lex_state = 9},
[28] = {.lex_state = 9},
- [29] = {.lex_state = 2},
+ [29] = {.lex_state = 9},
[30] = {.lex_state = 9},
[31] = {.lex_state = 2},
[32] = {.lex_state = 9},
@@ -754,10 +761,10 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = {
},
[1] = {
[sym_document] = STATE(50),
- [sym__toplevel] = STATE(13),
- [sym_comment] = STATE(13),
- [sym_node] = STATE(13),
- [aux_sym_document_repeat1] = STATE(13),
+ [sym__toplevel] = STATE(12),
+ [sym_comment] = STATE(12),
+ [sym_node] = STATE(12),
+ [aux_sym_document_repeat1] = STATE(12),
[ts_builtin_sym_end] = ACTIONS(3),
[anon_sym_SLASH] = ACTIONS(5),
[sym_ident] = ACTIONS(7),
@@ -774,11 +781,11 @@ static const uint16_t ts_small_parse_table[] = {
anon_sym_DOT,
ACTIONS(15), 1,
sym_ident,
- STATE(18), 1,
+ STATE(20), 1,
sym_node_body,
STATE(43), 1,
sym_attr_list,
- STATE(8), 4,
+ STATE(9), 4,
sym_attr,
sym_id_attr,
sym_class_attr,
@@ -792,11 +799,11 @@ static const uint16_t ts_small_parse_table[] = {
anon_sym_DOT,
ACTIONS(15), 1,
sym_ident,
- STATE(20), 1,
+ STATE(29), 1,
sym_node_body,
STATE(42), 1,
sym_attr_list,
- STATE(8), 4,
+ STATE(9), 4,
sym_attr,
sym_id_attr,
sym_class_attr,
@@ -810,11 +817,11 @@ static const uint16_t ts_small_parse_table[] = {
sym_ident,
ACTIONS(17), 1,
anon_sym_LBRACE,
- STATE(36), 1,
+ STATE(37), 1,
sym_node_body,
STATE(45), 1,
sym_attr_list,
- STATE(8), 4,
+ STATE(9), 4,
sym_attr,
sym_id_attr,
sym_class_attr,
@@ -828,11 +835,11 @@ static const uint16_t ts_small_parse_table[] = {
sym_ident,
ACTIONS(17), 1,
anon_sym_LBRACE,
- STATE(34), 1,
+ STATE(35), 1,
sym_node_body,
STATE(44), 1,
sym_attr_list,
- STATE(8), 4,
+ STATE(9), 4,
sym_attr,
sym_id_attr,
sym_class_attr,
@@ -847,7 +854,7 @@ static const uint16_t ts_small_parse_table[] = {
ACTIONS(19), 2,
anon_sym_DASH,
anon_sym_EQ,
- STATE(11), 4,
+ STATE(13), 4,
sym__toplevel,
sym_comment,
sym_node,
@@ -862,52 +869,52 @@ static const uint16_t ts_small_parse_table[] = {
ACTIONS(23), 2,
anon_sym_DASH,
anon_sym_EQ,
- STATE(12), 4,
+ STATE(11), 4,
sym__toplevel,
sym_comment,
sym_node,
aux_sym_document_repeat1,
[140] = 5,
+ ACTIONS(27), 1,
+ anon_sym_LBRACE,
+ ACTIONS(29), 1,
+ anon_sym_POUND,
+ ACTIONS(32), 1,
+ anon_sym_DOT,
+ ACTIONS(35), 1,
+ sym_ident,
+ STATE(8), 4,
+ sym_attr,
+ sym_id_attr,
+ sym_class_attr,
+ aux_sym_attr_list_repeat1,
+ [159] = 5,
ACTIONS(11), 1,
anon_sym_POUND,
ACTIONS(13), 1,
anon_sym_DOT,
ACTIONS(15), 1,
sym_ident,
- ACTIONS(27), 1,
+ ACTIONS(38), 1,
anon_sym_LBRACE,
- STATE(10), 4,
+ STATE(8), 4,
sym_attr,
sym_id_attr,
sym_class_attr,
aux_sym_attr_list_repeat1,
- [159] = 4,
- ACTIONS(31), 1,
+ [178] = 4,
+ ACTIONS(42), 1,
anon_sym_SLASH,
- ACTIONS(34), 1,
+ ACTIONS(45), 1,
sym_ident,
- ACTIONS(29), 2,
+ ACTIONS(40), 2,
ts_builtin_sym_end,
anon_sym_RBRACE,
- STATE(9), 4,
+ STATE(10), 4,
sym__toplevel,
sym_comment,
sym_node,
aux_sym_document_repeat1,
- [176] = 5,
- ACTIONS(37), 1,
- anon_sym_LBRACE,
- ACTIONS(39), 1,
- anon_sym_POUND,
- ACTIONS(42), 1,
- anon_sym_DOT,
- ACTIONS(45), 1,
- sym_ident,
- STATE(10), 4,
- sym_attr,
- sym_id_attr,
- sym_class_attr,
- aux_sym_attr_list_repeat1,
[195] = 4,
ACTIONS(5), 1,
anon_sym_SLASH,
@@ -915,7 +922,7 @@ static const uint16_t ts_small_parse_table[] = {
sym_ident,
ACTIONS(48), 1,
anon_sym_RBRACE,
- STATE(9), 4,
+ STATE(10), 4,
sym__toplevel,
sym_comment,
sym_node,
@@ -926,8 +933,8 @@ static const uint16_t ts_small_parse_table[] = {
ACTIONS(7), 1,
sym_ident,
ACTIONS(50), 1,
- anon_sym_RBRACE,
- STATE(9), 4,
+ ts_builtin_sym_end,
+ STATE(10), 4,
sym__toplevel,
sym_comment,
sym_node,
@@ -938,24 +945,37 @@ static const uint16_t ts_small_parse_table[] = {
ACTIONS(7), 1,
sym_ident,
ACTIONS(52), 1,
- ts_builtin_sym_end,
- STATE(9), 4,
+ anon_sym_RBRACE,
+ STATE(10), 4,
sym__toplevel,
sym_comment,
sym_node,
aux_sym_document_repeat1,
[243] = 5,
- ACTIONS(50), 1,
+ ACTIONS(48), 1,
anon_sym_RBRACE,
ACTIONS(54), 1,
- aux_sym_text_token1,
+ sym_raw_text,
ACTIONS(56), 1,
anon_sym_AT,
- STATE(29), 1,
- aux_sym_text_repeat1,
STATE(51), 1,
sym_text,
- [259] = 2,
+ STATE(18), 2,
+ sym_inline_node,
+ aux_sym_text_repeat1,
+ [260] = 5,
+ ACTIONS(52), 1,
+ anon_sym_RBRACE,
+ ACTIONS(54), 1,
+ sym_raw_text,
+ ACTIONS(56), 1,
+ anon_sym_AT,
+ STATE(46), 1,
+ sym_text,
+ STATE(18), 2,
+ sym_inline_node,
+ aux_sym_text_repeat1,
+ [277] = 2,
ACTIONS(60), 1,
anon_sym_EQ,
ACTIONS(58), 4,
@@ -963,206 +983,197 @@ static const uint16_t ts_small_parse_table[] = {
anon_sym_POUND,
anon_sym_DOT,
sym_ident,
- [269] = 3,
+ [287] = 4,
ACTIONS(62), 1,
- anon_sym_SLASH,
+ anon_sym_RBRACE,
ACTIONS(64), 1,
+ sym_raw_text,
+ ACTIONS(67), 1,
+ anon_sym_AT,
+ STATE(17), 2,
+ sym_inline_node,
+ aux_sym_text_repeat1,
+ [301] = 4,
+ ACTIONS(56), 1,
+ anon_sym_AT,
+ ACTIONS(70), 1,
+ anon_sym_RBRACE,
+ ACTIONS(72), 1,
+ sym_raw_text,
+ STATE(17), 2,
+ sym_inline_node,
+ aux_sym_text_repeat1,
+ [315] = 3,
+ ACTIONS(74), 1,
+ anon_sym_SLASH,
+ ACTIONS(76), 1,
sym_ident,
STATE(33), 3,
sym__toplevel,
sym_comment,
sym_node,
- [281] = 5,
- ACTIONS(48), 1,
- anon_sym_RBRACE,
- ACTIONS(54), 1,
- aux_sym_text_token1,
- ACTIONS(56), 1,
- anon_sym_AT,
- STATE(29), 1,
- aux_sym_text_repeat1,
- STATE(46), 1,
- sym_text,
- [297] = 1,
- ACTIONS(66), 4,
+ [327] = 1,
+ ACTIONS(78), 4,
ts_builtin_sym_end,
anon_sym_SLASH,
anon_sym_RBRACE,
sym_ident,
- [304] = 1,
- ACTIONS(68), 4,
+ [334] = 1,
+ ACTIONS(80), 4,
anon_sym_LBRACE,
anon_sym_POUND,
anon_sym_DOT,
sym_ident,
- [311] = 1,
- ACTIONS(70), 4,
- ts_builtin_sym_end,
- anon_sym_SLASH,
- anon_sym_RBRACE,
- sym_ident,
- [318] = 1,
- ACTIONS(72), 4,
- ts_builtin_sym_end,
- anon_sym_SLASH,
- anon_sym_RBRACE,
- sym_ident,
- [325] = 1,
- ACTIONS(74), 4,
+ [341] = 1,
+ ACTIONS(82), 4,
anon_sym_LBRACE,
anon_sym_POUND,
anon_sym_DOT,
sym_ident,
- [332] = 1,
- ACTIONS(76), 4,
+ [348] = 1,
+ ACTIONS(84), 4,
anon_sym_LBRACE,
anon_sym_POUND,
anon_sym_DOT,
sym_ident,
- [339] = 1,
- ACTIONS(78), 4,
+ [355] = 1,
+ ACTIONS(86), 4,
ts_builtin_sym_end,
anon_sym_SLASH,
anon_sym_RBRACE,
sym_ident,
- [346] = 1,
- ACTIONS(80), 4,
+ [362] = 1,
+ ACTIONS(88), 4,
ts_builtin_sym_end,
anon_sym_SLASH,
anon_sym_RBRACE,
sym_ident,
- [353] = 1,
- ACTIONS(82), 4,
+ [369] = 1,
+ ACTIONS(90), 4,
ts_builtin_sym_end,
anon_sym_SLASH,
anon_sym_RBRACE,
sym_ident,
- [360] = 4,
- ACTIONS(84), 1,
- anon_sym_RBRACE,
- ACTIONS(86), 1,
- aux_sym_text_token1,
- ACTIONS(89), 1,
- anon_sym_AT,
- STATE(27), 1,
- aux_sym_text_repeat1,
- [373] = 1,
+ [376] = 1,
ACTIONS(92), 4,
ts_builtin_sym_end,
anon_sym_SLASH,
anon_sym_RBRACE,
sym_ident,
- [380] = 4,
- ACTIONS(56), 1,
- anon_sym_AT,
- ACTIONS(94), 1,
+ [383] = 1,
+ ACTIONS(94), 4,
+ ts_builtin_sym_end,
+ anon_sym_SLASH,
anon_sym_RBRACE,
- ACTIONS(96), 1,
- aux_sym_text_token1,
- STATE(27), 1,
- aux_sym_text_repeat1,
- [393] = 1,
+ sym_ident,
+ [390] = 1,
+ ACTIONS(96), 4,
+ ts_builtin_sym_end,
+ anon_sym_SLASH,
+ anon_sym_RBRACE,
+ sym_ident,
+ [397] = 1,
ACTIONS(98), 4,
ts_builtin_sym_end,
anon_sym_SLASH,
anon_sym_RBRACE,
sym_ident,
- [400] = 1,
- ACTIONS(72), 3,
+ [404] = 1,
+ ACTIONS(94), 3,
anon_sym_RBRACE,
- aux_sym_text_token1,
+ sym_raw_text,
anon_sym_AT,
- [406] = 3,
+ [410] = 3,
ACTIONS(9), 1,
anon_sym_LBRACE,
ACTIONS(100), 1,
sym_ident,
- STATE(21), 1,
+ STATE(24), 1,
sym_node_body,
- [416] = 1,
- ACTIONS(84), 3,
+ [420] = 1,
+ ACTIONS(102), 3,
anon_sym_RBRACE,
- aux_sym_text_token1,
+ sym_raw_text,
anon_sym_AT,
- [422] = 1,
- ACTIONS(66), 3,
+ [426] = 1,
+ ACTIONS(86), 3,
anon_sym_RBRACE,
- aux_sym_text_token1,
+ sym_raw_text,
anon_sym_AT,
- [428] = 1,
+ [432] = 1,
ACTIONS(78), 3,
anon_sym_RBRACE,
- aux_sym_text_token1,
+ sym_raw_text,
anon_sym_AT,
- [434] = 1,
- ACTIONS(70), 3,
+ [438] = 1,
+ ACTIONS(92), 3,
anon_sym_RBRACE,
- aux_sym_text_token1,
+ sym_raw_text,
anon_sym_AT,
- [440] = 1,
- ACTIONS(80), 3,
+ [444] = 1,
+ ACTIONS(96), 3,
anon_sym_RBRACE,
- aux_sym_text_token1,
+ sym_raw_text,
anon_sym_AT,
- [446] = 1,
- ACTIONS(82), 3,
+ [450] = 1,
+ ACTIONS(88), 3,
anon_sym_RBRACE,
- aux_sym_text_token1,
+ sym_raw_text,
anon_sym_AT,
- [452] = 1,
- ACTIONS(98), 3,
+ [456] = 1,
+ ACTIONS(90), 3,
anon_sym_RBRACE,
- aux_sym_text_token1,
+ sym_raw_text,
anon_sym_AT,
- [458] = 1,
- ACTIONS(92), 3,
+ [462] = 1,
+ ACTIONS(98), 3,
anon_sym_RBRACE,
- aux_sym_text_token1,
+ sym_raw_text,
anon_sym_AT,
- [464] = 3,
+ [468] = 3,
ACTIONS(17), 1,
anon_sym_LBRACE,
- ACTIONS(102), 1,
+ ACTIONS(104), 1,
sym_ident,
- STATE(31), 1,
+ STATE(34), 1,
sym_node_body,
- [474] = 2,
+ [478] = 2,
ACTIONS(9), 1,
anon_sym_LBRACE,
STATE(30), 1,
sym_node_body,
- [481] = 2,
+ [485] = 2,
ACTIONS(9), 1,
anon_sym_LBRACE,
STATE(25), 1,
sym_node_body,
- [488] = 2,
+ [492] = 2,
ACTIONS(17), 1,
anon_sym_LBRACE,
- STATE(37), 1,
+ STATE(38), 1,
sym_node_body,
- [495] = 2,
+ [499] = 2,
ACTIONS(17), 1,
anon_sym_LBRACE,
- STATE(39), 1,
+ STATE(40), 1,
sym_node_body,
- [502] = 1,
- ACTIONS(104), 1,
- anon_sym_RBRACE,
[506] = 1,
ACTIONS(106), 1,
- aux_sym_id_attr_token1,
+ anon_sym_RBRACE,
[510] = 1,
ACTIONS(108), 1,
aux_sym_id_attr_token1,
[514] = 1,
ACTIONS(110), 1,
- sym_string,
+ aux_sym_id_attr_token1,
[518] = 1,
ACTIONS(112), 1,
- ts_builtin_sym_end,
+ sym_string,
[522] = 1,
ACTIONS(114), 1,
+ ts_builtin_sym_end,
+ [526] = 1,
+ ACTIONS(116), 1,
anon_sym_RBRACE,
};
@@ -1175,48 +1186,48 @@ static const uint32_t ts_small_parse_table_map[] = {
[SMALL_STATE(7)] = 120,
[SMALL_STATE(8)] = 140,
[SMALL_STATE(9)] = 159,
- [SMALL_STATE(10)] = 176,
+ [SMALL_STATE(10)] = 178,
[SMALL_STATE(11)] = 195,
[SMALL_STATE(12)] = 211,
[SMALL_STATE(13)] = 227,
[SMALL_STATE(14)] = 243,
- [SMALL_STATE(15)] = 259,
- [SMALL_STATE(16)] = 269,
- [SMALL_STATE(17)] = 281,
- [SMALL_STATE(18)] = 297,
- [SMALL_STATE(19)] = 304,
- [SMALL_STATE(20)] = 311,
- [SMALL_STATE(21)] = 318,
- [SMALL_STATE(22)] = 325,
- [SMALL_STATE(23)] = 332,
- [SMALL_STATE(24)] = 339,
- [SMALL_STATE(25)] = 346,
- [SMALL_STATE(26)] = 353,
- [SMALL_STATE(27)] = 360,
- [SMALL_STATE(28)] = 373,
- [SMALL_STATE(29)] = 380,
- [SMALL_STATE(30)] = 393,
- [SMALL_STATE(31)] = 400,
- [SMALL_STATE(32)] = 406,
- [SMALL_STATE(33)] = 416,
- [SMALL_STATE(34)] = 422,
- [SMALL_STATE(35)] = 428,
- [SMALL_STATE(36)] = 434,
- [SMALL_STATE(37)] = 440,
- [SMALL_STATE(38)] = 446,
- [SMALL_STATE(39)] = 452,
- [SMALL_STATE(40)] = 458,
- [SMALL_STATE(41)] = 464,
- [SMALL_STATE(42)] = 474,
- [SMALL_STATE(43)] = 481,
- [SMALL_STATE(44)] = 488,
- [SMALL_STATE(45)] = 495,
- [SMALL_STATE(46)] = 502,
- [SMALL_STATE(47)] = 506,
- [SMALL_STATE(48)] = 510,
- [SMALL_STATE(49)] = 514,
- [SMALL_STATE(50)] = 518,
- [SMALL_STATE(51)] = 522,
+ [SMALL_STATE(15)] = 260,
+ [SMALL_STATE(16)] = 277,
+ [SMALL_STATE(17)] = 287,
+ [SMALL_STATE(18)] = 301,
+ [SMALL_STATE(19)] = 315,
+ [SMALL_STATE(20)] = 327,
+ [SMALL_STATE(21)] = 334,
+ [SMALL_STATE(22)] = 341,
+ [SMALL_STATE(23)] = 348,
+ [SMALL_STATE(24)] = 355,
+ [SMALL_STATE(25)] = 362,
+ [SMALL_STATE(26)] = 369,
+ [SMALL_STATE(27)] = 376,
+ [SMALL_STATE(28)] = 383,
+ [SMALL_STATE(29)] = 390,
+ [SMALL_STATE(30)] = 397,
+ [SMALL_STATE(31)] = 404,
+ [SMALL_STATE(32)] = 410,
+ [SMALL_STATE(33)] = 420,
+ [SMALL_STATE(34)] = 426,
+ [SMALL_STATE(35)] = 432,
+ [SMALL_STATE(36)] = 438,
+ [SMALL_STATE(37)] = 444,
+ [SMALL_STATE(38)] = 450,
+ [SMALL_STATE(39)] = 456,
+ [SMALL_STATE(40)] = 462,
+ [SMALL_STATE(41)] = 468,
+ [SMALL_STATE(42)] = 478,
+ [SMALL_STATE(43)] = 485,
+ [SMALL_STATE(44)] = 492,
+ [SMALL_STATE(45)] = 499,
+ [SMALL_STATE(46)] = 506,
+ [SMALL_STATE(47)] = 510,
+ [SMALL_STATE(48)] = 514,
+ [SMALL_STATE(49)] = 518,
+ [SMALL_STATE(50)] = 522,
+ [SMALL_STATE(51)] = 526,
};
static const TSParseActionEntry ts_parse_actions[] = {
@@ -1228,53 +1239,54 @@ static const TSParseActionEntry ts_parse_actions[] = {
[9] = {.entry = {.count = 1, .reusable = true}}, SHIFT(6),
[11] = {.entry = {.count = 1, .reusable = true}}, SHIFT(48),
[13] = {.entry = {.count = 1, .reusable = true}}, SHIFT(47),
- [15] = {.entry = {.count = 1, .reusable = true}}, SHIFT(15),
+ [15] = {.entry = {.count = 1, .reusable = true}}, SHIFT(16),
[17] = {.entry = {.count = 1, .reusable = true}}, SHIFT(7),
- [19] = {.entry = {.count = 1, .reusable = true}}, SHIFT(17),
- [21] = {.entry = {.count = 1, .reusable = true}}, SHIFT(24),
+ [19] = {.entry = {.count = 1, .reusable = true}}, SHIFT(15),
+ [21] = {.entry = {.count = 1, .reusable = true}}, SHIFT(27),
[23] = {.entry = {.count = 1, .reusable = true}}, SHIFT(14),
- [25] = {.entry = {.count = 1, .reusable = true}}, SHIFT(35),
- [27] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attr_list, 1, 0, 0),
- [29] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_document_repeat1, 2, 0, 0),
- [31] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_document_repeat1, 2, 0, 0), SHIFT_REPEAT(32),
- [34] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_document_repeat1, 2, 0, 0), SHIFT_REPEAT(2),
- [37] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_attr_list_repeat1, 2, 0, 0),
- [39] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attr_list_repeat1, 2, 0, 0), SHIFT_REPEAT(48),
- [42] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attr_list_repeat1, 2, 0, 0), SHIFT_REPEAT(47),
- [45] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attr_list_repeat1, 2, 0, 0), SHIFT_REPEAT(15),
- [48] = {.entry = {.count = 1, .reusable = true}}, SHIFT(26),
- [50] = {.entry = {.count = 1, .reusable = true}}, SHIFT(38),
- [52] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_document, 1, 0, 0),
- [54] = {.entry = {.count = 1, .reusable = true}}, SHIFT(29),
- [56] = {.entry = {.count = 1, .reusable = true}}, SHIFT(16),
+ [25] = {.entry = {.count = 1, .reusable = true}}, SHIFT(36),
+ [27] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_attr_list_repeat1, 2, 0, 0),
+ [29] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attr_list_repeat1, 2, 0, 0), SHIFT_REPEAT(48),
+ [32] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attr_list_repeat1, 2, 0, 0), SHIFT_REPEAT(47),
+ [35] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attr_list_repeat1, 2, 0, 0), SHIFT_REPEAT(16),
+ [38] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attr_list, 1, 0, 0),
+ [40] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_document_repeat1, 2, 0, 0),
+ [42] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_document_repeat1, 2, 0, 0), SHIFT_REPEAT(32),
+ [45] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_document_repeat1, 2, 0, 0), SHIFT_REPEAT(2),
+ [48] = {.entry = {.count = 1, .reusable = true}}, SHIFT(39),
+ [50] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_document, 1, 0, 0),
+ [52] = {.entry = {.count = 1, .reusable = true}}, SHIFT(26),
+ [54] = {.entry = {.count = 1, .reusable = true}}, SHIFT(18),
+ [56] = {.entry = {.count = 1, .reusable = true}}, SHIFT(19),
[58] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attr, 1, 0, 2),
[60] = {.entry = {.count = 1, .reusable = true}}, SHIFT(49),
- [62] = {.entry = {.count = 1, .reusable = true}}, SHIFT(41),
- [64] = {.entry = {.count = 1, .reusable = true}}, SHIFT(5),
- [66] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_node, 2, 0, 3),
- [68] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attr, 3, 0, 8),
- [70] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_comment, 3, 0, 4),
- [72] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_comment, 2, 0, 1),
- [74] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_id_attr, 2, 0, 5),
- [76] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_class_attr, 2, 0, 5),
- [78] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_node_body, 2, 0, 0),
- [80] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_node, 3, 0, 6),
- [82] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_node_body, 3, 0, 0),
- [84] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_text_repeat1, 2, 0, 0),
- [86] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_text_repeat1, 2, 0, 0), SHIFT_REPEAT(27),
- [89] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_text_repeat1, 2, 0, 0), SHIFT_REPEAT(16),
- [92] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_node_body, 4, 0, 0),
- [94] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_text, 1, 0, 0),
- [96] = {.entry = {.count = 1, .reusable = true}}, SHIFT(27),
+ [62] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_text_repeat1, 2, 0, 0),
+ [64] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_text_repeat1, 2, 0, 0), SHIFT_REPEAT(17),
+ [67] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_text_repeat1, 2, 0, 0), SHIFT_REPEAT(19),
+ [70] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_text, 1, 0, 0),
+ [72] = {.entry = {.count = 1, .reusable = true}}, SHIFT(17),
+ [74] = {.entry = {.count = 1, .reusable = true}}, SHIFT(41),
+ [76] = {.entry = {.count = 1, .reusable = true}}, SHIFT(5),
+ [78] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_node, 2, 0, 3),
+ [80] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attr, 3, 0, 8),
+ [82] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_id_attr, 2, 0, 5),
+ [84] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_class_attr, 2, 0, 5),
+ [86] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_comment, 2, 0, 1),
+ [88] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_node, 3, 0, 6),
+ [90] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_node_body, 3, 0, 0),
+ [92] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_node_body, 2, 0, 0),
+ [94] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_node_body, 4, 0, 0),
+ [96] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_comment, 3, 0, 4),
[98] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_comment, 4, 0, 7),
[100] = {.entry = {.count = 1, .reusable = true}}, SHIFT(3),
- [102] = {.entry = {.count = 1, .reusable = true}}, SHIFT(4),
- [104] = {.entry = {.count = 1, .reusable = true}}, SHIFT(28),
- [106] = {.entry = {.count = 1, .reusable = true}}, SHIFT(23),
- [108] = {.entry = {.count = 1, .reusable = true}}, SHIFT(22),
- [110] = {.entry = {.count = 1, .reusable = true}}, SHIFT(19),
- [112] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(),
- [114] = {.entry = {.count = 1, .reusable = true}}, SHIFT(40),
+ [102] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_inline_node, 2, 0, 0),
+ [104] = {.entry = {.count = 1, .reusable = true}}, SHIFT(4),
+ [106] = {.entry = {.count = 1, .reusable = true}}, SHIFT(28),
+ [108] = {.entry = {.count = 1, .reusable = true}}, SHIFT(23),
+ [110] = {.entry = {.count = 1, .reusable = true}}, SHIFT(22),
+ [112] = {.entry = {.count = 1, .reusable = true}}, SHIFT(21),
+ [114] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(),
+ [116] = {.entry = {.count = 1, .reusable = true}}, SHIFT(31),
};
#ifdef __cplusplus