PiotrDabkowski / pyjsparser

Fast JavaScript parser for Python.
MIT License
246 stars 37 forks source link

Regex ?literals? #19

Open ghost opened 6 years ago

ghost commented 6 years ago

It seems regexes get parsed to a Syntax.Literal type, but the node.value ends up being some kind of list(). Is this correct?

At the moment it seems it gets coerced into a list of the literal and its flags?

ghost commented 6 years ago

https://github.com/PiotrDabkowski/pyjsparser/blob/master/pyjsparser/parser.py#L855 seems to be the culprit?