Closed aolko closed 4 years ago
Hello! What do you mean by redefining keywords? :)
It should be possible to redefine opcodes somewhen, but I haven’t plans to implement this ASAP, because it is very dangerous.
let's say i want real module
s, in order to do that i need to implement module
keyword as well as some macros, is it possible with your package?
@aolko see my previous comment. It should be doable via zend_compile_file
and zend_compile_string
hooks, but this question is out of my current scope of investigation, because there are too many things to implement and make this library stable.
It is possible now to control the AST tree of original source code during compilation, so you could check for token with specific meaning and adjust tree if required.
how would i detect a usual construct (in normal languages):
module "AModule"
or import "AModule"
and transform it into the usual php mess of namespace and includes?
Hi there, is it possible to (re)define keywords?