So I'm tearing up the compiler and installing JDI. In between it and ENIGMA will be a new class called language_adapter, which is basically an interface to let any language capable of reflection be exported by ENIGMA. That includes our friend, JavaScript, so TGMG can merge in whatever changes he's made to EGMJS all official-like.
For the time being, I am setting the understood type of all expressions to "int." I have no idea what this is going to do to the compilation sequence, but you straight GML users probably won't notice (Expression evaluation was not a huge part of general EDL).
Also, :: is dead until further notice, since no one used it and keeping it working would be a pain before I start integrating the heavy features that JDI presently lacks.
Moreover, most ironically, due to a hitch in the otherwise very strong similarity between JDI and the old C parser (API-wise), function pointer calls will still not work until then. But varargs should actually be fixed without me recoding any part of ENIGMA, which is neat.
For those who are interested, the following are notable differences:
- The main definition class no longer contains ENIGMA-tailored utility functions. These include the functions to get parameter count bounds and varargs positions. I have already recoded these at the global scope.
- JDI does not have a default context in which items can be looked up. I have created one locally in ENIGMA for the time being.
- The old parser used a central lookup system; one variable controlled which scope operations were performed in, and another variable controlled which scope :: access was done in (the latter having precedence when non-NULL). JDI does not use any such system.
Stunning compatibilities include the following:
- [snip]if (find_extname(name,0xFFFFFFFF))[/snip] ->[snip]else if ((d = main_context.get_global()->look_up(name)))[/snip]
- [snip]if (ext_retriever_var->flags & EXTFLAG_TYPENAME)[/snip] ->[snip]if (d->flags & jdi::DEF_TYPENAME)[/snip]
- [snip]macitr itm = macros.find(name)[/snip] ->[snip]jdi::macro_iter itm = main_context.get_macros().find(name)[/snip]
- [snip]itm->second.argc != -1[/snip] ->[snip]itm->second->argc != -1[/snip]
- All I had to do to integrate the new macro system was replace a block of shit with two function calls.
When this all blows over, it'll either work magically or fail catastrophically. We shall see which! I'm looking forward to it.
Anyway, I have me my sledgehammer. I think it and I will have a nap, and then we'll be back to work.