* add field names to object elements
* dont hide template interpolation start/end and quoted template start/end tokens
This commit is contained in:
@@ -1,5 +1,11 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 0.4.0 - not yet released
|
||||||
|
|
||||||
|
feature:
|
||||||
|
* add named "key" and "val" fields to left and right side of object elements
|
||||||
|
* unhide the `template_interpolation_(start|end)` and `quoted_template_(start|end)` tokens
|
||||||
|
|
||||||
## 0.3.2 - 2021-07-01
|
## 0.3.2 - 2021-07-01
|
||||||
|
|
||||||
fix:
|
fix:
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ resource_1 "strlit1" "strlit2" {
|
|||||||
attr1 = "val1"
|
attr1 = "val1"
|
||||||
tupl1 = [ 1, 2, 3.4, "foo" ]
|
tupl1 = [ 1, 2, 3.4, "foo" ]
|
||||||
tupl2 = []
|
tupl2 = []
|
||||||
obj1 = { foo = "baz" }
|
obj1 = { foo = "bar", baz = quoz }
|
||||||
null1 = null
|
null1 = null
|
||||||
bool1 = true
|
bool1 = true
|
||||||
bool2 = false
|
bool2 = false
|
||||||
@@ -28,14 +28,17 @@ resource_1 "strlit1" "strlit2" {
|
|||||||
tpl1 = "prefix-${var.bar}"
|
tpl1 = "prefix-${var.bar}"
|
||||||
tpl2 = "prefix-${func("bar")}"
|
tpl2 = "prefix-${func("bar")}"
|
||||||
tpl3 = "prefix-${func("nested-${var.bar}")}"
|
tpl3 = "prefix-${func("nested-${var.bar}")}"
|
||||||
|
|
||||||
tpl4 = <<EOF
|
tpl4 = <<EOF
|
||||||
prefix
|
prefix
|
||||||
${func("foo${ var.bar }")}
|
${func("foo${ var.bar }")}
|
||||||
suffix
|
suffix
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
func_of_object = func({
|
func_of_object = func({
|
||||||
"foo" : 2,
|
"foo" : 2,
|
||||||
bar: 1,
|
"bar" : baz
|
||||||
|
key : val,
|
||||||
fizz : buzz,
|
fizz : buzz,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
24
grammar.js
24
grammar.js
@@ -20,11 +20,11 @@ module.exports = grammar({
|
|||||||
],
|
],
|
||||||
|
|
||||||
externals: $ => [
|
externals: $ => [
|
||||||
$._quoted_template_start,
|
$.quoted_template_start,
|
||||||
$._quoted_template_end,
|
$.quoted_template_end,
|
||||||
$._template_literal_chunk,
|
$._template_literal_chunk,
|
||||||
$._template_interpolation_start,
|
$.template_interpolation_start,
|
||||||
$._template_interpolation_end,
|
$.template_interpolation_end,
|
||||||
$.heredoc_identifier,
|
$.heredoc_identifier,
|
||||||
],
|
],
|
||||||
|
|
||||||
@@ -105,9 +105,9 @@ module.exports = grammar({
|
|||||||
null_lit: $ => 'null',
|
null_lit: $ => 'null',
|
||||||
|
|
||||||
string_lit: $ => prec(PREC.string_lit, seq(
|
string_lit: $ => prec(PREC.string_lit, seq(
|
||||||
$._quoted_template_start,
|
$.quoted_template_start,
|
||||||
$.template_literal,
|
$.template_literal,
|
||||||
$._quoted_template_end,
|
$.quoted_template_end,
|
||||||
)),
|
)),
|
||||||
|
|
||||||
|
|
||||||
@@ -155,9 +155,9 @@ module.exports = grammar({
|
|||||||
),
|
),
|
||||||
|
|
||||||
object_elem: $ => seq(
|
object_elem: $ => seq(
|
||||||
$.expression,
|
field("key", $.expression),
|
||||||
choice('=', ':'),
|
choice('=', ':'),
|
||||||
$.expression,
|
field("val", $.expression),
|
||||||
),
|
),
|
||||||
|
|
||||||
index: $ => choice($.new_index, $.legacy_index),
|
index: $ => choice($.new_index, $.legacy_index),
|
||||||
@@ -268,13 +268,13 @@ module.exports = grammar({
|
|||||||
),
|
),
|
||||||
|
|
||||||
quoted_template: $ => prec(PREC.quoted_template, seq(
|
quoted_template: $ => prec(PREC.quoted_template, seq(
|
||||||
$._quoted_template_start,
|
$.quoted_template_start,
|
||||||
optional(repeat(choice(
|
optional(repeat(choice(
|
||||||
$.template_literal,
|
$.template_literal,
|
||||||
$.template_interpolation,
|
$.template_interpolation,
|
||||||
$.template_directive,
|
$.template_directive,
|
||||||
))),
|
))),
|
||||||
$._quoted_template_end,
|
$.quoted_template_end,
|
||||||
)),
|
)),
|
||||||
|
|
||||||
heredoc_template: $ => seq(
|
heredoc_template: $ => seq(
|
||||||
@@ -297,11 +297,11 @@ module.exports = grammar({
|
|||||||
)),
|
)),
|
||||||
|
|
||||||
template_interpolation: $ => seq(
|
template_interpolation: $ => seq(
|
||||||
$._template_interpolation_start,
|
$.template_interpolation_start,
|
||||||
optional($.strip_marker),
|
optional($.strip_marker),
|
||||||
optional($.expression),
|
optional($.expression),
|
||||||
optional($.strip_marker),
|
optional($.strip_marker),
|
||||||
$._template_interpolation_end,
|
$.template_interpolation_end,
|
||||||
),
|
),
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
|
|||||||
@@ -310,7 +310,7 @@
|
|||||||
"members": [
|
"members": [
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "_quoted_template_start"
|
"name": "quoted_template_start"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
@@ -318,7 +318,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "_quoted_template_end"
|
"name": "quoted_template_end"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -492,8 +492,12 @@
|
|||||||
"type": "SEQ",
|
"type": "SEQ",
|
||||||
"members": [
|
"members": [
|
||||||
{
|
{
|
||||||
|
"type": "FIELD",
|
||||||
|
"name": "key",
|
||||||
|
"content": {
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "expression"
|
"name": "expression"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "CHOICE",
|
"type": "CHOICE",
|
||||||
@@ -509,9 +513,13 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"type": "FIELD",
|
||||||
|
"name": "val",
|
||||||
|
"content": {
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "expression"
|
"name": "expression"
|
||||||
}
|
}
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"index": {
|
"index": {
|
||||||
@@ -1179,7 +1187,7 @@
|
|||||||
"members": [
|
"members": [
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "_quoted_template_start"
|
"name": "quoted_template_start"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "CHOICE",
|
"type": "CHOICE",
|
||||||
@@ -1211,7 +1219,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "_quoted_template_end"
|
"name": "quoted_template_end"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -1294,7 +1302,7 @@
|
|||||||
"members": [
|
"members": [
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "_template_interpolation_start"
|
"name": "template_interpolation_start"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "CHOICE",
|
"type": "CHOICE",
|
||||||
@@ -1334,7 +1342,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "_template_interpolation_end"
|
"name": "template_interpolation_end"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -1416,11 +1424,11 @@
|
|||||||
"externals": [
|
"externals": [
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "_quoted_template_start"
|
"name": "quoted_template_start"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "_quoted_template_end"
|
"name": "quoted_template_end"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
@@ -1428,11 +1436,11 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "_template_interpolation_start"
|
"name": "template_interpolation_start"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
"name": "_template_interpolation_end"
|
"name": "template_interpolation_end"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
|
|||||||
@@ -551,9 +551,9 @@
|
|||||||
{
|
{
|
||||||
"type": "object_elem",
|
"type": "object_elem",
|
||||||
"named": true,
|
"named": true,
|
||||||
"fields": {},
|
"fields": {
|
||||||
"children": {
|
"key": {
|
||||||
"multiple": true,
|
"multiple": false,
|
||||||
"required": true,
|
"required": true,
|
||||||
"types": [
|
"types": [
|
||||||
{
|
{
|
||||||
@@ -561,6 +561,17 @@
|
|||||||
"named": true
|
"named": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"val": {
|
||||||
|
"multiple": false,
|
||||||
|
"required": true,
|
||||||
|
"types": [
|
||||||
|
{
|
||||||
|
"type": "expression",
|
||||||
|
"named": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -588,8 +599,16 @@
|
|||||||
"fields": {},
|
"fields": {},
|
||||||
"children": {
|
"children": {
|
||||||
"multiple": true,
|
"multiple": true,
|
||||||
"required": false,
|
"required": true,
|
||||||
"types": [
|
"types": [
|
||||||
|
{
|
||||||
|
"type": "quoted_template_end",
|
||||||
|
"named": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "quoted_template_start",
|
||||||
|
"named": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "template_directive",
|
"type": "template_directive",
|
||||||
"named": true
|
"named": true
|
||||||
@@ -629,9 +648,17 @@
|
|||||||
"named": true,
|
"named": true,
|
||||||
"fields": {},
|
"fields": {},
|
||||||
"children": {
|
"children": {
|
||||||
"multiple": false,
|
"multiple": true,
|
||||||
"required": true,
|
"required": true,
|
||||||
"types": [
|
"types": [
|
||||||
|
{
|
||||||
|
"type": "quoted_template_end",
|
||||||
|
"named": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "quoted_template_start",
|
||||||
|
"named": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "template_literal",
|
"type": "template_literal",
|
||||||
"named": true
|
"named": true
|
||||||
@@ -669,7 +696,7 @@
|
|||||||
"fields": {},
|
"fields": {},
|
||||||
"children": {
|
"children": {
|
||||||
"multiple": true,
|
"multiple": true,
|
||||||
"required": false,
|
"required": true,
|
||||||
"types": [
|
"types": [
|
||||||
{
|
{
|
||||||
"type": "expression",
|
"type": "expression",
|
||||||
@@ -678,6 +705,14 @@
|
|||||||
{
|
{
|
||||||
"type": "strip_marker",
|
"type": "strip_marker",
|
||||||
"named": true
|
"named": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "template_interpolation_end",
|
||||||
|
"named": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "template_interpolation_start",
|
||||||
|
"named": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -916,10 +951,26 @@
|
|||||||
"type": "null_lit",
|
"type": "null_lit",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "quoted_template_end",
|
||||||
|
"named": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "quoted_template_start",
|
||||||
|
"named": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "strip_marker",
|
"type": "strip_marker",
|
||||||
"named": true
|
"named": true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "template_interpolation_end",
|
||||||
|
"named": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "template_interpolation_start",
|
||||||
|
"named": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "true",
|
"type": "true",
|
||||||
"named": false
|
"named": false
|
||||||
|
|||||||
636
src/parser.c
636
src/parser.c
File diff suppressed because it is too large
Load Diff
@@ -13,7 +13,9 @@ foo = "bar"
|
|||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal)))))))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end)))))))
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
attribute with variable
|
attribute with variable
|
||||||
|
|||||||
@@ -40,16 +40,22 @@ block_1 "strlit1" "strlit2" {
|
|||||||
(block
|
(block
|
||||||
(identifier)
|
(identifier)
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end))
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end))
|
||||||
(body
|
(body
|
||||||
(attribute
|
(attribute
|
||||||
(identifier)
|
(identifier)
|
||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal)))))))))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end)))))))))
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
nested block
|
nested block
|
||||||
@@ -135,7 +141,11 @@ locals { timestamp = regex_replace(timestamp(), "[- TZ:]", "") }
|
|||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal))))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end))))
|
||||||
(expression
|
(expression
|
||||||
(template_expr
|
(template_expr
|
||||||
(quoted_template)))))))))))
|
(quoted_template
|
||||||
|
(quoted_template_start)
|
||||||
|
(quoted_template_end))))))))))))
|
||||||
|
|||||||
@@ -22,7 +22,9 @@ foo = [1, 2, "foo"]
|
|||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal))))))))))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end))))))))))
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
multiline tuple
|
multiline tuple
|
||||||
@@ -52,7 +54,9 @@ foo = [
|
|||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal))))))))))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end))))))))))
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
empty tuple
|
empty tuple
|
||||||
@@ -113,11 +117,15 @@ foo = {1: 2, "foo"="bar"}
|
|||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal))))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end))))
|
||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal)))))))))))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end)))))))))))
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
multiline object
|
multiline object
|
||||||
@@ -148,11 +156,15 @@ foo = {
|
|||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal))))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end))))
|
||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal)))))))))))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end)))))))))))
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
empty object
|
empty object
|
||||||
@@ -216,11 +228,15 @@ foo = { 1: 2,
|
|||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal))))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end))))
|
||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal)))))))))))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end)))))))))))
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
complex object
|
complex object
|
||||||
@@ -247,7 +263,9 @@ foo = {
|
|||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal)))))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end)))))
|
||||||
(object_elem
|
(object_elem
|
||||||
(expression
|
(expression
|
||||||
(variable_expr
|
(variable_expr
|
||||||
@@ -255,7 +273,9 @@ foo = {
|
|||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal)))))))))))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end)))))))))))
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
complex from real world
|
complex from real world
|
||||||
@@ -295,7 +315,9 @@ worker_groups = [
|
|||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal)))))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end)))))
|
||||||
(object_elem
|
(object_elem
|
||||||
(expression
|
(expression
|
||||||
(variable_expr
|
(variable_expr
|
||||||
@@ -303,7 +325,9 @@ worker_groups = [
|
|||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal)))))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end)))))
|
||||||
(object_elem
|
(object_elem
|
||||||
(expression
|
(expression
|
||||||
(variable_expr
|
(variable_expr
|
||||||
@@ -335,7 +359,9 @@ worker_groups = [
|
|||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal)))))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end)))))
|
||||||
(object_elem
|
(object_elem
|
||||||
(expression
|
(expression
|
||||||
(variable_expr
|
(variable_expr
|
||||||
@@ -343,7 +369,9 @@ worker_groups = [
|
|||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal)))))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end)))))
|
||||||
(object_elem
|
(object_elem
|
||||||
(expression
|
(expression
|
||||||
(variable_expr
|
(variable_expr
|
||||||
@@ -365,4 +393,3 @@ worker_groups = [
|
|||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(numeric_lit)))))))))))))
|
(numeric_lit)))))))))))))
|
||||||
|
|
||||||
|
|||||||
@@ -51,11 +51,15 @@ foo = ( true ? false : true ) ? "yes" : "no"
|
|||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal))))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end))))
|
||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal)))))))))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end)))))))))
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
nested conditional expression expression without parentheses
|
nested conditional expression expression without parentheses
|
||||||
@@ -85,8 +89,12 @@ foo = true ? false : true ? "yes" : "no"
|
|||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal))))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end))))
|
||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal)))))))))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end)))))))))
|
||||||
|
|||||||
@@ -21,11 +21,15 @@ foo = [for v in ["a", "b"]: v]
|
|||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal))))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end))))
|
||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal))))))))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end))))))))
|
||||||
(expression
|
(expression
|
||||||
(variable_expr
|
(variable_expr
|
||||||
(identifier)))))))))
|
(identifier)))))))))
|
||||||
@@ -54,11 +58,15 @@ foo = [for i, v in ["a", "b"]: i]
|
|||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal))))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end))))
|
||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal))))))))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end))))))))
|
||||||
(expression
|
(expression
|
||||||
(variable_expr
|
(variable_expr
|
||||||
(identifier)))))))))
|
(identifier)))))))))
|
||||||
@@ -87,15 +95,21 @@ foo = [for i, v in ["a", "b", "c"]: v if pred(i)]
|
|||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal))))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end))))
|
||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal))))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end))))
|
||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal))))))))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end))))))))
|
||||||
(expression
|
(expression
|
||||||
(variable_expr
|
(variable_expr
|
||||||
(identifier)))
|
(identifier)))
|
||||||
@@ -132,11 +146,15 @@ foo = {for i, v in ["a", "b"]: v => i}
|
|||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal))))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end))))
|
||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal))))))))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end))))))))
|
||||||
(expression
|
(expression
|
||||||
(variable_expr
|
(variable_expr
|
||||||
(identifier)))
|
(identifier)))
|
||||||
@@ -168,11 +186,15 @@ foo = {for i, v in ["a", "b"]: v => i...}
|
|||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal))))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end))))
|
||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal))))))))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end))))))))
|
||||||
(expression
|
(expression
|
||||||
(variable_expr
|
(variable_expr
|
||||||
(identifier)))
|
(identifier)))
|
||||||
|
|||||||
@@ -33,7 +33,9 @@ foo = bar("foo")
|
|||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal))))))))))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end))))))))))
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
variadic function call
|
variadic function call
|
||||||
@@ -79,12 +81,18 @@ foo = bar(
|
|||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal))))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end))))
|
||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal))))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end))))
|
||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal))))))))))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end))))))))))
|
||||||
|
|||||||
@@ -15,7 +15,9 @@ provider "kubernetes" {
|
|||||||
(block
|
(block
|
||||||
(identifier)
|
(identifier)
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end))
|
||||||
(body
|
(body
|
||||||
(attribute
|
(attribute
|
||||||
(identifier)
|
(identifier)
|
||||||
@@ -122,7 +124,9 @@ resource "azurerm_storage_blob" "proxy_cert" {
|
|||||||
(get_attr
|
(get_attr
|
||||||
(identifier))
|
(identifier))
|
||||||
(template_expr
|
(template_expr
|
||||||
(quoted_template)))))
|
(quoted_template
|
||||||
|
(quoted_template_start)
|
||||||
|
(quoted_template_end))))))
|
||||||
(expression
|
(expression
|
||||||
(variable_expr
|
(variable_expr
|
||||||
(identifier))
|
(identifier))
|
||||||
@@ -152,7 +156,9 @@ resource "azurerm_storage_blob" "proxy_cert" {
|
|||||||
(get_attr
|
(get_attr
|
||||||
(identifier))
|
(identifier))
|
||||||
(template_expr
|
(template_expr
|
||||||
(quoted_template)))))
|
(quoted_template
|
||||||
|
(quoted_template_start)
|
||||||
|
(quoted_template_end))))))
|
||||||
(expression
|
(expression
|
||||||
(variable_expr
|
(variable_expr
|
||||||
(identifier))
|
(identifier))
|
||||||
@@ -173,9 +179,13 @@ resource "azurerm_storage_blob" "proxy_cert" {
|
|||||||
(block
|
(block
|
||||||
(identifier)
|
(identifier)
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end))
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end))
|
||||||
(body
|
(body
|
||||||
(attribute
|
(attribute
|
||||||
(identifier)
|
(identifier)
|
||||||
@@ -189,7 +199,9 @@ resource "azurerm_storage_blob" "proxy_cert" {
|
|||||||
(get_attr
|
(get_attr
|
||||||
(identifier))
|
(identifier))
|
||||||
(template_expr
|
(template_expr
|
||||||
(quoted_template)))))
|
(quoted_template
|
||||||
|
(quoted_template_start)
|
||||||
|
(quoted_template_end))))))
|
||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(numeric_lit)))
|
(numeric_lit)))
|
||||||
@@ -215,13 +227,19 @@ resource "azurerm_storage_blob" "proxy_cert" {
|
|||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal)))))))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end)))))))
|
||||||
(block
|
(block
|
||||||
(identifier)
|
(identifier)
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end))
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end))
|
||||||
(body
|
(body
|
||||||
(attribute
|
(attribute
|
||||||
(identifier)
|
(identifier)
|
||||||
@@ -235,7 +253,9 @@ resource "azurerm_storage_blob" "proxy_cert" {
|
|||||||
(get_attr
|
(get_attr
|
||||||
(identifier))
|
(identifier))
|
||||||
(template_expr
|
(template_expr
|
||||||
(quoted_template)))))
|
(quoted_template
|
||||||
|
(quoted_template_start)
|
||||||
|
(quoted_template_end))))))
|
||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(numeric_lit)))
|
(numeric_lit)))
|
||||||
@@ -261,13 +281,19 @@ resource "azurerm_storage_blob" "proxy_cert" {
|
|||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal)))))))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end)))))))
|
||||||
(block
|
(block
|
||||||
(identifier)
|
(identifier)
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end))
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end))
|
||||||
(body
|
(body
|
||||||
(attribute
|
(attribute
|
||||||
(identifier)
|
(identifier)
|
||||||
@@ -281,7 +307,9 @@ resource "azurerm_storage_blob" "proxy_cert" {
|
|||||||
(get_attr
|
(get_attr
|
||||||
(identifier))
|
(identifier))
|
||||||
(template_expr
|
(template_expr
|
||||||
(quoted_template)))))
|
(quoted_template
|
||||||
|
(quoted_template_start)
|
||||||
|
(quoted_template_end))))))
|
||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(numeric_lit)))
|
(numeric_lit)))
|
||||||
@@ -328,13 +356,19 @@ resource "azurerm_storage_blob" "proxy_cert" {
|
|||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal)))))))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end)))))))
|
||||||
(block
|
(block
|
||||||
(identifier)
|
(identifier)
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end))
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end))
|
||||||
(body
|
(body
|
||||||
(attribute
|
(attribute
|
||||||
(identifier)
|
(identifier)
|
||||||
@@ -352,13 +386,17 @@ resource "azurerm_storage_blob" "proxy_cert" {
|
|||||||
(get_attr
|
(get_attr
|
||||||
(identifier))
|
(identifier))
|
||||||
(template_expr
|
(template_expr
|
||||||
(quoted_template))))
|
(quoted_template
|
||||||
|
(quoted_template_start)
|
||||||
|
(quoted_template_end)))))
|
||||||
(variable_expr
|
(variable_expr
|
||||||
(identifier))))
|
(identifier))))
|
||||||
(get_attr
|
(get_attr
|
||||||
(identifier))
|
(identifier))
|
||||||
(template_expr
|
(template_expr
|
||||||
(quoted_template)))))
|
(quoted_template
|
||||||
|
(quoted_template_start)
|
||||||
|
(quoted_template_end))))))
|
||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(numeric_lit)))
|
(numeric_lit)))
|
||||||
@@ -405,7 +443,9 @@ resource "azurerm_storage_blob" "proxy_cert" {
|
|||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal)))))))))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end)))))))))
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
example 3
|
example 3
|
||||||
@@ -460,7 +500,9 @@ locals {
|
|||||||
(expression
|
(expression
|
||||||
(template_expr
|
(template_expr
|
||||||
(quoted_template
|
(quoted_template
|
||||||
|
(quoted_template_start)
|
||||||
(template_interpolation
|
(template_interpolation
|
||||||
|
(template_interpolation_start)
|
||||||
(expression
|
(expression
|
||||||
(conditional
|
(conditional
|
||||||
(expression
|
(expression
|
||||||
@@ -486,4 +528,6 @@ locals {
|
|||||||
(get_attr
|
(get_attr
|
||||||
(identifier))
|
(identifier))
|
||||||
(get_attr
|
(get_attr
|
||||||
(identifier))))))))))))))
|
(identifier)))))
|
||||||
|
(template_interpolation_end))
|
||||||
|
(quoted_template_end)))))))))
|
||||||
|
|||||||
@@ -13,7 +13,9 @@ foo = "foo bar"
|
|||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal)))))))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end)))))))
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
escaped backslash at end
|
escaped backslash at end
|
||||||
@@ -30,7 +32,9 @@ foo = "foo\\"
|
|||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal)))))))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end)))))))
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
string literal escaped template interpolation
|
string literal escaped template interpolation
|
||||||
@@ -47,7 +51,9 @@ foo = "$${foo.bar}"
|
|||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal)))))))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end)))))))
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
template chars but no template 1
|
template chars but no template 1
|
||||||
@@ -64,7 +70,9 @@ foo = "$$$"
|
|||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal)))))))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end)))))))
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
template chars but no template 2
|
template chars but no template 2
|
||||||
@@ -81,7 +89,9 @@ foo = "100%"
|
|||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal)))))))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end)))))))
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
template chars but no template 3
|
template chars but no template 3
|
||||||
@@ -98,7 +108,9 @@ foo = "%\n\t"
|
|||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal)))))))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end)))))))
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
template chars but no template 4
|
template chars but no template 4
|
||||||
@@ -115,7 +127,9 @@ foo = "%%\n\t"
|
|||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal)))))))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end)))))))
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
template chars but no template 5
|
template chars but no template 5
|
||||||
@@ -132,7 +146,9 @@ foo = "$$"
|
|||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal)))))))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end)))))))
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
template chars but no template 6
|
template chars but no template 6
|
||||||
@@ -149,7 +165,9 @@ foo = "%%{\n\t"
|
|||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal)))))))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end)))))))
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
escaped template
|
escaped template
|
||||||
@@ -166,4 +184,6 @@ foo = "$${ var.bar }"
|
|||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal)))))))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end)))))))
|
||||||
|
|||||||
@@ -13,12 +13,16 @@ foo = "${ var.bar }"
|
|||||||
(expression
|
(expression
|
||||||
(template_expr
|
(template_expr
|
||||||
(quoted_template
|
(quoted_template
|
||||||
|
(quoted_template_start)
|
||||||
(template_interpolation
|
(template_interpolation
|
||||||
|
(template_interpolation_start)
|
||||||
(expression
|
(expression
|
||||||
(variable_expr
|
(variable_expr
|
||||||
(identifier))
|
(identifier))
|
||||||
(get_attr
|
(get_attr
|
||||||
(identifier))))))))))
|
(identifier)))
|
||||||
|
(template_interpolation_end))
|
||||||
|
(quoted_template_end)))))))
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
empty template interpolation
|
empty template interpolation
|
||||||
@@ -35,7 +39,11 @@ foo = "${}"
|
|||||||
(expression
|
(expression
|
||||||
(template_expr
|
(template_expr
|
||||||
(quoted_template
|
(quoted_template
|
||||||
(template_interpolation)))))))
|
(quoted_template_start)
|
||||||
|
(template_interpolation
|
||||||
|
(template_interpolation_start)
|
||||||
|
(template_interpolation_end))
|
||||||
|
(quoted_template_end)))))))
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
empty heredoc template
|
empty heredoc template
|
||||||
@@ -94,11 +102,17 @@ foo = "${ " ~ " }"
|
|||||||
(expression
|
(expression
|
||||||
(template_expr
|
(template_expr
|
||||||
(quoted_template
|
(quoted_template
|
||||||
|
(quoted_template_start)
|
||||||
(template_interpolation
|
(template_interpolation
|
||||||
|
(template_interpolation_start)
|
||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal)))))))))))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end))))
|
||||||
|
(template_interpolation_end))
|
||||||
|
(quoted_template_end)))))))
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
quoted template with nested quoted template
|
quoted template with nested quoted template
|
||||||
@@ -115,8 +129,10 @@ foo = "p-${ foo("v-${a.b}") }"
|
|||||||
(expression
|
(expression
|
||||||
(template_expr
|
(template_expr
|
||||||
(quoted_template
|
(quoted_template
|
||||||
|
(quoted_template_start)
|
||||||
(template_literal)
|
(template_literal)
|
||||||
(template_interpolation
|
(template_interpolation
|
||||||
|
(template_interpolation_start)
|
||||||
(expression
|
(expression
|
||||||
(function_call
|
(function_call
|
||||||
(identifier)
|
(identifier)
|
||||||
@@ -124,13 +140,19 @@ foo = "p-${ foo("v-${a.b}") }"
|
|||||||
(expression
|
(expression
|
||||||
(template_expr
|
(template_expr
|
||||||
(quoted_template
|
(quoted_template
|
||||||
|
(quoted_template_start)
|
||||||
(template_literal)
|
(template_literal)
|
||||||
(template_interpolation
|
(template_interpolation
|
||||||
|
(template_interpolation_start)
|
||||||
(expression
|
(expression
|
||||||
(variable_expr
|
(variable_expr
|
||||||
(identifier))
|
(identifier))
|
||||||
(get_attr
|
(get_attr
|
||||||
(identifier)))))))))))))))))
|
(identifier)))
|
||||||
|
(template_interpolation_end))
|
||||||
|
(quoted_template_end)))))))
|
||||||
|
(template_interpolation_end))
|
||||||
|
(quoted_template_end)))))))
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
quoted template interpolation with strip markers
|
quoted template interpolation with strip markers
|
||||||
@@ -147,15 +169,21 @@ foo = "hello ${~ "world" ~} hello"
|
|||||||
(expression
|
(expression
|
||||||
(template_expr
|
(template_expr
|
||||||
(quoted_template
|
(quoted_template
|
||||||
|
(quoted_template_start)
|
||||||
(template_literal)
|
(template_literal)
|
||||||
(template_interpolation
|
(template_interpolation
|
||||||
|
(template_interpolation_start)
|
||||||
(strip_marker)
|
(strip_marker)
|
||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal))))
|
(quoted_template_start)
|
||||||
(strip_marker))
|
(template_literal)
|
||||||
(template_literal)))))))
|
(quoted_template_end))))
|
||||||
|
(strip_marker)
|
||||||
|
(template_interpolation_end))
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end)))))))
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
quoted template object expression in template
|
quoted template object expression in template
|
||||||
@@ -172,7 +200,9 @@ foo = "${ {a=b}[a] }"
|
|||||||
(expression
|
(expression
|
||||||
(template_expr
|
(template_expr
|
||||||
(quoted_template
|
(quoted_template
|
||||||
|
(quoted_template_start)
|
||||||
(template_interpolation
|
(template_interpolation
|
||||||
|
(template_interpolation_start)
|
||||||
(expression
|
(expression
|
||||||
(collection_value
|
(collection_value
|
||||||
(object
|
(object
|
||||||
@@ -187,7 +217,9 @@ foo = "${ {a=b}[a] }"
|
|||||||
(new_index
|
(new_index
|
||||||
(expression
|
(expression
|
||||||
(variable_expr
|
(variable_expr
|
||||||
(identifier)))))))))))))
|
(identifier))))))
|
||||||
|
(template_interpolation_end))
|
||||||
|
(quoted_template_end)))))))
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
escaped template interpolation start
|
escaped template interpolation start
|
||||||
@@ -204,7 +236,9 @@ foo = "hello $${ world"
|
|||||||
(expression
|
(expression
|
||||||
(literal_value
|
(literal_value
|
||||||
(string_lit
|
(string_lit
|
||||||
(template_literal)))))))
|
(quoted_template_start)
|
||||||
|
(template_literal)
|
||||||
|
(quoted_template_end)))))))
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
tricky heredoc
|
tricky heredoc
|
||||||
|
|||||||
Reference in New Issue
Block a user