esprima icon indicating copy to clipboard operation
esprima copied to clipboard

ECMAScript parsing infrastructure for multipurpose analysis

Results 107 esprima issues
Sort by recently updated
recently updated
newest added

It would be nice to have access to classes from "ndoes.ts" module. https://github.com/jquery/esprima/blob/master/src/nodes.ts This simplifies the process of creating a Node when you want to modify AST

Hello, I notice this project is using TypeScript, which is great - however the `project.json` file does not expose a `types` property, which is the preferred way to consume type...

Currently, Esprima uses large [script-generated](https://github.com/jquery/esprima/blob/24eb7ed0fc816c8b5f51087f07dc932a28766c53/tools/generate-identifier-regex.js) regular expression patterns to match identifier characters correctly: https://github.com/jquery/esprima/blob/24eb7ed0fc816c8b5f51087f07dc932a28766c53/src/character.ts#L1-L8 Now that [Unicode RegExp property escapes](https://github.com/tc39/proposal-regexp-unicode-property-escapes) are now part of the language, we _could_ [use `\p{ID_Start}`...

### Steps to reproduce ```js esprima.tokenize('return 0') esprima.tokenize('return\n 0') ``` ### Expected output the second token list should contains a new line character ### Actual output two result are the...

There is no ">=" in Binary Expression ![Screen Shot 2019-06-14 at 9 24 58 PM](https://user-images.githubusercontent.com/26519038/59512235-e6f7c600-8eea-11e9-967f-6347f5867f63.png)

Esprima 4.0.1 fails to parse the attached JS file. From my understanding it looks like Esprima fails on the following statement which contains a line break inside a string: e.push(''...

I have some code here: https://github.com/ariovistus/esprima-bug test.js uses esprima 4.0.1 to parse tok.js and outputs ``` define "urijs" 2250,2265 ``` which is the position of the last part of tok.js,...

### Steps to reproduce Try to parse [DestructuringAssignment.js](https://github.com/antlr/grammars-v4/blob/master/javascript/examples/DestructuringAssignment.js) file from examples dir of ANTLR JavaScript grammar or a simple code snippet from http://es6-features.org/#ArrayMatching ```javascript var [ a, , b ]...

### Steps to reproduce ```jsx import React, { Component } from 'react'; import { withRouter } from 'react-router'; import { withStyles } from '@material-ui/core/styles'; import withWidth from '@material-ui/core/withWidth'; import styles...

Get wrong range for ArrowFunctionExpression.body when the body is AssignmentExpression and has bracket around ### Steps to reproduce ```js esprima.parse('e => ({ property: 42 })') ``` ### Expected output range...