esprima
esprima copied to clipboard
ECMAScript parsing infrastructure for multipurpose analysis
# Invalid UpdateExpression's arguments Esprima' `UpdateExpression`'s argument is one of: `ObjectExpression`, `ArrayExpression`, `MemberExpression`, `Identifier`. Consider behaviour of V8:  Should be: Argument of `UpdateExpression` is one of: `Identifier`, `MemberExpression` ###...
hello sorry if my misleading, my code is not parsed by esprima ### Steps to reproduce copy and paste below to [demo](https://esprima.org/demo/parse.html) ```js var ops={ a:1, b:2 } function fn(ops){...
### Steps to reproduce ```js esprima.parse('foo?.bar') ``` ### Expected output Some indication that this is optional chaining (if foo exists, it's the same as foo.bar, else it's undefined) ### Actual...
JavaScript test function: ``` input=3; getData(val) setData({onLoad: function(options) { this.setDatas({ humidity: options+50, daylight: daylight }) }}) ``` Nodes of AST tree ``` 0 | Filesystem | File | | | ...
### Steps to reproduce Parse following code: ```js class ClassWithStaticMethod { static staticProperty = 'someValue'; } ``` The code fails to parse, this can be reproduced using https://esprima.org/demo/parse.html ### Actual...
I think the readme should not claim Esprima is written in ECMAScript when in fact it is in TypeScript.
### Steps to reproduce I'm using the ES2018 syntax in my code, and Esprima is failing to parse the _"spread"_ syntax (`...`), for creating iterables and concatenating objects. ```js //...
When trying to parse the example code from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes#public_field_declarations Esprima fails with `Error: Line 3: Unexpected token =` ``` var esprima = require('nightly-esprima'); // installed version 2021.8.30 var program =...
React class component arrow function cannot be recognized. Example Content: import React from 'react' class test extends React.Component{ constructor(props) { super(props); this.state = { } } initData = (item) =>{...
esprima cannot parse bigint, such as let a = 10n Will it provide support?