boolangery / py-lua-parser

A Lua parser and AST builder written in Python.
MIT License
124 stars 39 forks source link

Strings are not being parsed #43

Closed fabi321 closed 1 month ago

fabi321 commented 1 year ago

when I parse the string `'\0\n\ta', the escape sequences are not being parsed.

tree = ast.parse("a='\\0\\n\\ta'")

leads to the string node:

String: {} 3 keys
  s: '\\0\\n\\ta'
  delimiter: SINGLE_QUOTE

however, it should look like:

String: {} 3 keys
  s: '\x00\n\ta'
  delimiter: SINGLE_QUOTE