Giter Site home page Giter Site logo

Comments (9)

nikic avatar nikic commented on August 19, 2024

All the "deprecated" kinds/flags should be documented in the README -- they have a "// prior to version XYZ" comment next to them (though I may have missed something).

PARAM_VARIADIC is a ... parameter. AST_ENCAPS_LIST is the content of an "encapsed string" aka interpolated string. Parsing something like "foo$bar" should give it.

from php-ast.

 avatar commented on August 19, 2024

Thanks. Sorry, I did actually miss those comments in the docs. How about AST_GREATER - that should be deprecated also, or is it something else than the binary op.

from php-ast.

 avatar commented on August 19, 2024

Do you know how I would generate a "NAME_RELATIVE" flag on a name?

The following code gets NAME_NOT_FQ:

namespace B;
A\AA::aa();

result:

            "class": {
                "type_name": "AST_NAME",
                "flags_texts": "NAME_NOT_FQ",
                "children": {
                    "name": "A\\AA"
                }
            },

from php-ast.

nikic avatar nikic commented on August 19, 2024

Try namespace\AA

On Aug 24, 2016 6:27 AM, "Elijah J" [email protected] wrote:

Do you know how I would generate a "NAME_RELATIVE" flag on a name?

The following code gets NAME_NOT_FQ:

namespace B;
A\AA::aa();

result:

        "class": {
            "type_name": "AST_NAME",
            "flags_texts": "NAME_NOT_FQ",
            "children": {
                "name": "A\\AA"
            }
        },


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#33 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AANMEHE9ITyR3VyPZ-m-ZsKsjQuFXiG9ks5qi8hGgaJpZM4Jlun4
.

from php-ast.

 avatar commented on August 19, 2024

Works. The two are 100% equivalent right - namespace\A\AA::aa() and A\AA:aa()?

namespace A;

class AA {
static function aa(){
echo 1;
}
}

namespace B;
A\AA::aa();

gives:

PHP Fatal error: Uncaught Error: Class 'B\A\AA' not found in

from php-ast.

nikic avatar nikic commented on August 19, 2024

They are usually the same. They would differ if you had an import on A,
e.g. use B as A. Then the namespace-prefixed variant ignores that alias.

On Aug 24, 2016 8:20 PM, "Elijah J" [email protected] wrote:

Works. The two are 100% equivalent right - namespace\A\AA::aa() and
A\AA:aa()?

namespace A;

class AA {
static function aa(){
echo 1;
}
}

namespace B;
A\AA::aa();

gives:

PHP Fatal error: Uncaught Error: Class 'B\A\AA' not found in


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#33 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AANMEAAXmUeiEQtHs83nKZ2zWdatG-qaks5qjIuGgaJpZM4Jlun4
.

from php-ast.

 avatar commented on August 19, 2024

How about AST_REF? I can't seem to find that one. PARAM_REF, RETURN_REF, and AST_ASSIGN_REF seem to cover all cases.

from php-ast.

nikic avatar nikic commented on August 19, 2024

AST_REF is used in foreach ($foo as &$bar).

from php-ast.

nikic avatar nikic commented on August 19, 2024

Thanks. Sorry, I did actually miss those comments in the docs. How about AST_GREATER - that should be deprecated also, or is it something else than the binary op.

Added version info for GREATER and GREATER_EQUAL in 9e9569c, thanks for pointing it out!

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.