grammar: remove shim again

Signed-off-by: Michael Hoffmann <mhoffm@posteo.de>
This commit is contained in:
Michael Hoffmann
2023-07-25 19:04:47 +02:00
parent becebebd35
commit 636dbe7030
12 changed files with 31068 additions and 31223 deletions

View File

@@ -5,17 +5,8 @@
"type": "CHOICE",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "body"
},
{
"type": "SYMBOL",
"name": "object"
}
]
"type": "SYMBOL",
"name": "body"
},
{
"type": "BLANK"
@@ -26,41 +17,20 @@
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_shim"
},
{
"type": "SEQ",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_shim"
},
{
"type": "BLANK"
}
]
},
{
"type": "REPEAT1",
"content": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "attribute"
},
{
"type": "SYMBOL",
"name": "block"
}
]
"type": "REPEAT1",
"content": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "attribute"
},
{
"type": "SYMBOL",
"name": "block"
}
}
]
]
}
}
]
},
@@ -1805,10 +1775,6 @@
{
"type": "SYMBOL",
"name": "heredoc_identifier"
},
{
"type": "SYMBOL",
"name": "_shim"
}
],
"inline": [],

View File

@@ -139,7 +139,7 @@
"fields": {},
"children": {
"multiple": true,
"required": false,
"required": true,
"types": [
{
"type": "attribute",
@@ -202,10 +202,6 @@
{
"type": "body",
"named": true
},
{
"type": "object",
"named": true
}
]
}

File diff suppressed because it is too large Load Diff

View File

@@ -20,7 +20,6 @@ enum TokenType {
TEMPLATE_DIRECTIVE_START,
TEMPLATE_DIRECTIVE_END,
HEREDOC_IDENTIFIER,
SHIM,
};
enum ContextType {
@@ -97,13 +96,6 @@ public:
if (lexer->lookahead == '\0') {
return false;
}
if (valid_symbols[SHIM]) {
lexer->mark_end(lexer);
while(skip_comment(lexer));
if (lexer->lookahead != '}') {
return accept_inplace(lexer, SHIM);
}
}
// manage quoted context
if (valid_symbols[QUOTED_TEMPLATE_START] && !in_quoted_context() &&
lexer->lookahead == '"') {