Giter Site home page Giter Site logo

Comments (5)

nzakas avatar nzakas commented on June 22, 2024

Interesting point. The conundrum here is that this behavior matches Esprima's, so even if it's the wrong thing, there's a large compatibly issue to consider.

This definitely seems weird, it's just a matter of figuring out of its a bug to fix or not.

from espree.

btmills avatar btmills commented on June 22, 2024

Agreed; I wouldn't advocate breaking compatibility unnecessarily. However, I might be able to make the case that this would be a bug in Esprima:

Now that I edited the test script above to output arg1, it shows a strange scenario in which one can traverse, starting at the FunctionExpression (range 18-20), down into a child, arg1 (range 12-16), that lies outside the range of its parent. I can't think of any other instance off the top of my head where that would be the case.

from espree.

nzakas avatar nzakas commented on June 22, 2024

I think a good case can be made that this is a bug. Would you mind filing an issue with Esprima to start the discussion?

from espree.

btmills avatar btmills commented on June 22, 2024

Upon further investigation, this applies to non-generator shorthand methods as well.

Esprima issue: https://code.google.com/p/esprima/issues/detail?id=625

from espree.

btmills avatar btmills commented on June 22, 2024

The Esprima issue has been moved to jquery/esprima#1029.

from espree.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.