-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document new flags for AST_TYPE (null/false) #147
Conversation
0b70600
to
e8603c4
Compare
README.md
Outdated
@@ -267,6 +267,8 @@ ast\flags\TYPE_DOUBLE | |||
ast\flags\TYPE_STRING | |||
ast\flags\TYPE_ITERABLE | |||
ast\flags\TYPE_OBJECT | |||
ast\flags\TYPE_NULL (php 8.0 union types) | |||
ast\flags\TYPE_FALSE (php 8.0 union types) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// php 8.0 union types
for the sake of consistency?
e8603c4
to
d5277ae
Compare
Maybe add these flags and meta to the PHP core itself? In order to make this information useful for AST extension developers ) |
In README.md
|
My question was not about php-ast extension ;) But about PHP core itself because this information is not available there. |
There's various limitations. Right now, all of this information is implicit, and is figured out by reading Zend/zend_compile.c for the most part.
zend_ast_export is the closest thing (that I can find) to ast introspection in the php-src core itself, and it's limited - it just converts an AST back to similar source code, so that C developers can debug code.
If #5 was done (merge php-ast into core), there might be better APIs for php-ast and other extensions to use.
|
No description provided.