so this week I spent many more days (and nights) on code generation.
Concerning types I implemented the type mixed (which is kind of a
supertype which may contain any other type of data) and the array type.
With arrays not only standard indexing is supported, but all of PHP's
rich (or strange;) array functionality. Like that you can use an array
as list or hashmap as well, more than one dimension not being a
problem. Apart of that I implemented constants and variables with
global and static scope. All in all I redesigned the whole variable
engine, almost everything is done at runtime now as with PHP's
semantics you just can't determine which variables are defined at which
place of the script. The other statements and control structures are
almost done, mainly the switch construct is still missing.
Furthermore I had to implement another AST transformation. It is about
inheritance and makes sure there is are no cycles in inheritance of
classes. For this purpose and due to a CLR restriction all class
declarations are reordered. Classes without any parent class are put
first of all, then all classes inheriting from those, then all classes
inheriting from the latter and so on. I might extend that
transformation as well to class variables to make sure there are no
cycles either.
What still has to be done apart of that is implementing the object type
which will have impact on almost every area of code. Furthermore I have
to work on inheritance and overloading and if there's enough time left
I'd like to implement variable variables and variable functions as
well. So all in all this is giving me kind of a v0.5 feeling for the
moment...
So once more good luck all!
Raffa