diff options
Diffstat (limited to 'lexer.py')
| -rw-r--r-- | lexer.py | 4 | 
1 files changed, 3 insertions, 1 deletions
| @@ -10,6 +10,7 @@ types = {      ":int": TokenType.INT_TYPE,      ":float": TokenType.FLOAT_TYPE,      ":string": TokenType.STRING_TYPE, +    ":list": TokenType.LIST_TYPE,      ":any": TokenType.ANY_TYPE }  keywords = { @@ -129,7 +130,8 @@ def get_string(data, line):          counter += 1          if counter >= len(data):              raise Exception("couldn't parse string") -    return Token(TokenType.STRING, string, string, line), counter + 1, offset +    string = string.encode().decode("unicode_escape") +    return Token(TokenType.STRING, str(string), str(string), line), counter + 1, offset  def get_bool(data, line):      if len(data) >= 4 and data[:4] == "true": | 
