Giter Site home page Giter Site logo

Comments (6)

nikic avatar nikic commented on August 19, 2024

We currently don't have end linenos for these -- that would require migrating to decl node types for these upstream.

I think it might also be worth considering going the other way around and drop the special Decl nodes. Apart from the end lineno, the name and docComment can just be normal children. The fact that we have Decl nodes right now is an artifact of the internal implementation, and I'm not sure how much sense it really makes.

from php-ast.

nikic avatar nikic commented on August 19, 2024

Before proceeding on #55 I'd like to have some feedback on the previous comment. What do you think about dropping Decl nodes and just using one structure for everything? The node/decl distinction is an artifact of the implementation, I don't think keeping the distinction makes much sense.

from php-ast.

TysonAndre avatar TysonAndre commented on August 19, 2024

What do you think about dropping Decl nodes and just using one structure for everything?

I think it makes sense. One would want want to keep Decl around for a few releases though, and only unify Nodes in version 45.

from php-ast.

nikic avatar nikic commented on August 19, 2024

I think it makes sense. One would want want to keep Decl around for a few releases though, and only unify Nodes in version 45.

Of course, it will stay around until all current versions of the AST are phased out.

Are there other changes that should go into the next AST version?

from php-ast.

TysonAndre avatar TysonAndre commented on August 19, 2024

#58 is something I'd want in the next AST version, but not strictly necessary.

Other than that, I can't really think of any enhancements/consistency changes I want.

from php-ast.

nikic avatar nikic commented on August 19, 2024

Normalization away from Decl implemented in cca3151.

from php-ast.

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.