PiotrDabkowski / pyjsparser

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

ArrowFunction is not supported by ECMA 5.1. #33

Closed RuneStone0 closed 4 years ago

RuneStone0 commented 4 years ago

Unable to parse: https://onfido.com/js/supported-docs.js

Traceback (most recent call last):
  File "scrape_onfido.py", line 12, in <module>
    print(parse(data))
  File "/venv/lib/python3.7/site-packages/pyjsparser/parser.py", line 3018, in parse
    return p.parse(javascript_code)
  File "/venv/lib/python3.7/site-packages/pyjsparser/parser.py", line 3010, in parse
    raise self.createError(self.lineNumber, self.lastIndex, unicode(e))
pyjsparser.pyjsparserdata.JsSyntaxError: Line 1: ArrowFunction is not supported by ECMA 5.1.
PiotrDabkowski commented 4 years ago

ArrowFunction is not supported by ECMA 5.1.