Closed am-cid closed 3 months ago
\
"
n
t
r
b
f
|
"\\\"\n\t\r\b\f" --> "\\\"\n\t\r\b\f" (python will handle escaping this during execution) "\|" --> | (we escape this in lexer)
sample text file ----------------------------------------------------------------------------------- 1 | 2 | fwunc mainuwu-san() [[ 3 | a-chan = 1~ 4 | pwint("abs {\\\"one\\\"}:<newline>\n<tab>\t \|| a|\|")~ 5 | pwint("\n")~ 6 | pwint("abs \\\"one\\\":<newline>\n<tab>\t<back>\b<return>\r<feed>\f\|\|")~ 7 | ]] 8 | 9 | 10 | ----------------------------------------------------------------------------------- end of file
escaped char transpilation is simpler now
\
,"
,n
,t
,r
,b
, andf
are not escaped in lexer. python will handle the escaping in execution|
however is escaped in lexertest log
source
transpiled
output