[#101] fix constant string "{\""
This commit is contained in:
parent
31052588b1
commit
003ee67a86
File diff suppressed because it is too large
Load Diff
@ -120,9 +120,10 @@ func (lex *Lexer) Lex(lval Lval) int {
|
||||
| "\n" @constant_string_new_line -> double_qoute
|
||||
),
|
||||
double_qoute_nondollar: (
|
||||
(any - [$"\r\n]) -> double_qoute
|
||||
(any - [\\$"\r\n]) -> double_qoute
|
||||
| "\r" @constant_string_new_line -> double_qoute
|
||||
| "\n" @constant_string_new_line -> double_qoute
|
||||
| "\\" -> double_qoute_any
|
||||
| '"' -> final
|
||||
),
|
||||
double_qoute_nonvarname: (
|
||||
|
@ -496,6 +496,7 @@ func TestConstantStrings(t *testing.T) {
|
||||
"{"
|
||||
"{a"
|
||||
"\{$"
|
||||
"{\""
|
||||
`
|
||||
|
||||
expected := []string{
|
||||
|
Loading…
Reference in New Issue
Block a user