bug fixed

This commit is contained in:
Valk Richard Li 2020-01-18 20:33:24 +08:00 committed by GitHub
parent 4c966af52e
commit 1c78d339a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -306,6 +306,11 @@ class nasal_lexer
while(*ptr!=str_begin && *ptr!='\n') while(*ptr!=str_begin && *ptr!='\n')
{ {
token_str+=*ptr; token_str+=*ptr;
if(*ptr=='\\')
{
++ptr;
token_str+=*ptr;
}
++ptr; ++ptr;
if(ptr==res.end()) if(ptr==res.end())
break; break;

View File

@ -14,7 +14,7 @@ nil;
[0,1,2,3,4,5][2]; # 2 [0,1,2,3,4,5][2]; # 2
{str:"hello"}.str; # "hello" {str:"hello"}.str; # "hello"
{str:"hello"}["str"]; # "hello" {str:"hello"}["str"]; # "hello"
{"str":"hello"}["str"]; # "hello" {"str":"hello\"\"\n"}["str"]; # "hello"
# normal scalar # normal scalar
var number_1=1; var number_1=1;