larger kludge for escaped characters
This commit is contained in:
parent
2c582fbd52
commit
00da0468e6
@ -255,8 +255,9 @@ class String(State):
|
|||||||
"""
|
"""
|
||||||
if self.escaped:
|
if self.escaped:
|
||||||
self.escaped = False
|
self.escaped = False
|
||||||
if char == "n":
|
simple_escapables = tuple('abfnrtv')
|
||||||
self.nodes.append("\n")
|
if char in simple_escapables:
|
||||||
|
self.nodes.append(eval('"\\'+char+'"'))
|
||||||
return
|
return
|
||||||
if char == "\\":
|
if char == "\\":
|
||||||
self.nodes.append("\\")
|
self.nodes.append("\\")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user