handle quoted template expressions and template interpolations

This commit is contained in:
mhoffm
2021-06-14 00:55:24 +02:00
parent 3c984653bb
commit 7b91d51683
20 changed files with 5381 additions and 4751 deletions

View File

@@ -125,158 +125,4 @@ foo = null
(identifier)
(expression (expr_term (literal_value (null_lit)))))))
==================
string literal one line
==================
foo = "bar"
---
(config_file
(body
(attribute
(identifier)
(expression (expr_term (literal_value (string_lit)))))))
==================
string literal escaped newline
==================
foo = "bar\nbaz"
---
(config_file
(body
(attribute
(identifier)
(expression (expr_term (literal_value (string_lit (escape_sequence))))))))
==================
string literal escaped tab
==================
foo = "bar\tbaz"
---
(config_file
(body
(attribute
(identifier)
(expression (expr_term (literal_value (string_lit (escape_sequence))))))))
==================
string literal escaped "
==================
foo = "bar\"baz"
---
(config_file
(body
(attribute
(identifier)
(expression (expr_term (literal_value (string_lit (escape_sequence))))))))
==================
string literal escaped \
==================
foo = "bar\\baz"
---
(config_file
(body
(attribute
(identifier)
(expression (expr_term (literal_value (string_lit (escape_sequence))))))))
==================
string literal escaped \uFFFF
==================
foo = "bar\uFFFFbaz"
---
(config_file
(body
(attribute
(identifier)
(expression (expr_term (literal_value (string_lit (escape_sequence))))))))
==================
string bad escape sequence
==================
foo = "bar\pbaz"
---
(config_file
(body
(attribute
(identifier)
(expression (expr_term (literal_value (string_lit (ERROR (UNEXPECTED 'p')))))))))
==================
string bad escape sequence 2
==================
foo = "bar\uZZ"
---
(config_file
(body
(attribute
(identifier)
(expression (expr_term (literal_value (string_lit (ERROR (UNEXPECTED 'Z')))))))))
==================
string literal multi line error
==================
foo = "
bar"
---
(config_file
(body
(attribute
(identifier)
(expression (expr_term (literal_value (string_lit (ERROR (UNEXPECTED 'b')))))))))
==================
string literal unescaped tab
==================
foo = "foo bar"
---
(config_file
(body
(attribute
(identifier)
(expression (expr_term (literal_value (string_lit (ERROR (UNEXPECTED 'b')))))))))
==================
string literal unescaped backslash
==================
foo = "foo\bar"
---
(config_file
(body
(attribute
(identifier)
(expression (expr_term (literal_value (string_lit (ERROR (UNEXPECTED 'b')))))))))