After building numerous compilers for many platforms, Ive decided to create a Xojo Syntax based compiler. Iβm working on an OS implementation of Xojo and XojoScript. The XojoScript bytecode compiler and VM are the precursor to the full-fledged compiler for Xojo. The AST will be used to emit LLVM IR for cross-platform compilation. Feel free to report issues or make pull requests.
Intersting
But not sure the grammar is quite complete
Modules appear to be unsupported
I use them extensively in my XojoScripts (some of which are truly enormous exceeding 10K lines in total)
I do have a pretty complete Xojo grammar for ANTLR 4 that Iβve not done much with
Hi Norman! Absolutely Modules are next on the agenda this evening. Completed classes and method overloading yesterday (along with all math keywords and operator handlers)β¦ and making sure self works correctly - just need to update classes to auto invoke the constructor upon instantiation instead of manually invoking it. Lots to be done still but pretty good start for 3 days of solid coding I still need to implement the remaining built-in base properties and methods for xojoscript native classes (ie Random - currently only supports random.inrange(x,y)). Would love any suggestions or contributions along the way.
Console apps will be first
Followed by desktop⦠which i have most cross-platform control creation setup - just need to re-build the LLVM IR emitter for native compilations (ripped from my original S++ compiler)
Contemplating WASM for web appsβ¦
If AI/LLMs gets good enough at coding by the end of 2025, I may implement an agentic setup to propel the development as issues arise or new features are desired.
API 1 and 2 are not changes at the COMPILER level in terms of grammar (excepting the addition of VAR)
Arrays are about the only thing that is a little weird
But everything from API 2 like Integer.ToString, etc are done as extension methods (you can see that in the tip at the bottom of the IDE code editor window)
Controls & classes are similar
They arent GRAMMAR changes right in the compiler
I have a Private Git Hub repo for it
That way I can be very selective about who can read it and clone it etc
Since folks in here often dont use their full name Iβm not sure who is who so I didnt make a public repo
Send me an email off list with your github username & we can go from there