mirror of
https://github.com/erg-lang/erg.git
synced 2025-10-03 22:14:37 +00:00
Test: check to see if quotations are tokenized
This commit is contained in:
parent
77e5e0422f
commit
baf7b3eb38
2 changed files with 36 additions and 1 deletions
|
@ -26,4 +26,15 @@ complex_string = """\\\
|
||||||
\t\0\
|
\t\0\
|
||||||
\r\n\
|
\r\n\
|
||||||
\\"""
|
\\"""
|
||||||
print! complex_string
|
print! complex_string
|
||||||
|
|
||||||
|
quotation_mark = """\"\"\""""
|
||||||
|
print! quotation_mark
|
||||||
|
|
||||||
|
quotation_marks = """"
|
||||||
|
""
|
||||||
|
""\"
|
||||||
|
\"\"\"""
|
||||||
|
\"\""
|
||||||
|
\"\"\""""
|
||||||
|
print! quotation_marks
|
|
@ -367,6 +367,30 @@ line break\"\"\"",
|
||||||
(Newline, newline),
|
(Newline, newline),
|
||||||
(Symbol, "print!"),
|
(Symbol, "print!"),
|
||||||
(Symbol, "complex_string"),
|
(Symbol, "complex_string"),
|
||||||
|
(Newline, newline),
|
||||||
|
(Newline, newline),
|
||||||
|
(Symbol, "quotation_mark"),
|
||||||
|
(Equal, "="),
|
||||||
|
(StrLit, "\"\"\"\"\"\"\"\"\""),
|
||||||
|
(Newline, newline),
|
||||||
|
(Symbol, "print!"),
|
||||||
|
(Symbol, "quotation_mark"),
|
||||||
|
(Newline, newline),
|
||||||
|
(Newline, newline),
|
||||||
|
(Symbol, "quotation_marks"),
|
||||||
|
(Equal, "="),
|
||||||
|
(
|
||||||
|
StrLit,
|
||||||
|
"\"\"\"\"
|
||||||
|
\"\"
|
||||||
|
\"\"\"
|
||||||
|
\"\"\"\"\"
|
||||||
|
\"\"\"
|
||||||
|
\"\"\"\"\"\"",
|
||||||
|
),
|
||||||
|
(Newline, newline),
|
||||||
|
(Symbol, "print!"),
|
||||||
|
(Symbol, "quotation_marks"),
|
||||||
(EOF, ""),
|
(EOF, ""),
|
||||||
];
|
];
|
||||||
let mut tok: Token;
|
let mut tok: Token;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue