mirror of
https://github.com/ValKmjolnir/Nasal-Interpreter.git
synced 2026-07-26 12:59:05 +08:00
bug fixed
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
+1
-1
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user