Add a shim to move a comment extra into a body node
This commit is contained in:
committed by
Michael Hoffmann
parent
b8fcca985c
commit
9903dc0b57
@@ -25,6 +25,7 @@ module.exports = function make_grammar(dialect) {
|
||||
$.template_directive_start,
|
||||
$.template_directive_end,
|
||||
$.heredoc_identifier,
|
||||
$._shim,
|
||||
],
|
||||
|
||||
extras: $ => [
|
||||
@@ -36,10 +37,13 @@ module.exports = function make_grammar(dialect) {
|
||||
// also allow objects to handle .tfvars in json format
|
||||
config_file: $ => optional(choice($.body, $.object)),
|
||||
|
||||
body: $ => repeat1(
|
||||
choice(
|
||||
$.attribute,
|
||||
$.block,
|
||||
body: $ => seq(
|
||||
optional($._shim),
|
||||
repeat1(
|
||||
choice(
|
||||
$.attribute,
|
||||
$.block,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user