Nykakin / chompjs

Parsing JavaScript objects into Python data structures
MIT License
197 stars 11 forks source link

Fails with comments in multiline declaration #21

Closed fbergroth closed 3 years ago

fbergroth commented 3 years ago

This fails to parse:

var obj = {
  // Comment
  x: "X", // Comment
};
Nykakin commented 3 years ago

Fixed by #22, should be included in next release

>>> data = """
... var obj = {
...   // Comment
...   x: "X", // Comment
... };
... """
>>> chompjs.parse_js_object(data)
{'x': 'X'}
fbergroth commented 3 years ago

Great! Can you release wheels?

Nykakin commented 3 years ago

Released as 1.1.2 version. Please let me know if you encounter any problems.