generate parser; add todos for template directives
This commit is contained in:
@@ -272,6 +272,7 @@ module.exports = grammar({
|
||||
optional(repeat(choice(
|
||||
$.template_literal,
|
||||
$.template_interpolation,
|
||||
//$.template_directive,
|
||||
))),
|
||||
$.quoted_template_end,
|
||||
)),
|
||||
@@ -282,6 +283,7 @@ module.exports = grammar({
|
||||
optional(repeat(choice(
|
||||
$.template_literal,
|
||||
$.template_interpolation,
|
||||
//$.template_directive,
|
||||
))),
|
||||
$.heredoc_identifier,
|
||||
),
|
||||
@@ -302,7 +304,11 @@ module.exports = grammar({
|
||||
$.template_interpolation_end,
|
||||
),
|
||||
|
||||
|
||||
// TODO
|
||||
//template_directive: $ => choice(
|
||||
//$.template_for,
|
||||
//$.template_if,
|
||||
//),
|
||||
|
||||
// http://stackoverflow.com/questions/13014947/regex-to-match-a-c-style-multiline-comment/36328890#36328890
|
||||
comment: $ => token(choice(
|
||||
|
||||
@@ -1204,10 +1204,6 @@
|
||||
{
|
||||
"type": "SYMBOL",
|
||||
"name": "template_interpolation"
|
||||
},
|
||||
{
|
||||
"type": "SYMBOL",
|
||||
"name": "template_directive"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1250,10 +1246,6 @@
|
||||
{
|
||||
"type": "SYMBOL",
|
||||
"name": "template_interpolation"
|
||||
},
|
||||
{
|
||||
"type": "SYMBOL",
|
||||
"name": "template_directive"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1346,10 +1338,6 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"template_directive": {
|
||||
"type": "CHOICE",
|
||||
"members": []
|
||||
},
|
||||
"comment": {
|
||||
"type": "TOKEN",
|
||||
"content": {
|
||||
|
||||
@@ -481,10 +481,6 @@
|
||||
"type": "heredoc_start",
|
||||
"named": true
|
||||
},
|
||||
{
|
||||
"type": "template_directive",
|
||||
"named": true
|
||||
},
|
||||
{
|
||||
"type": "template_interpolation",
|
||||
"named": true
|
||||
@@ -661,10 +657,6 @@
|
||||
"type": "quoted_template_start",
|
||||
"named": true
|
||||
},
|
||||
{
|
||||
"type": "template_directive",
|
||||
"named": true
|
||||
},
|
||||
{
|
||||
"type": "template_interpolation",
|
||||
"named": true
|
||||
@@ -718,11 +710,6 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "template_directive",
|
||||
"named": true,
|
||||
"fields": {}
|
||||
},
|
||||
{
|
||||
"type": "template_expr",
|
||||
"named": true,
|
||||
|
||||
1255
src/parser.c
1255
src/parser.c
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user