ObjoScript is a full-featured standalone and embeddable object-oriented dynamic programming language written entirely in Xojo.
I needed an embeddable scripting language for an app I'm working on that's written in Xojo. Xojo provides its own scripting engine (XojoScript) and there are several other scripting languages available via plugins (e.g. Wren and Python) however none of them provide any way to debug code written in the scripting language. For my app, it's crucial that the end user is able to step through code written in the scripting language and inspect variables to help them debug. This is simply impossible in the currently available engines so I decided to implement my own.
- Integrated debugger - step through code line-by-line and inspect local and global variable names and values.
- Familiar syntax. It's C-like but semicolon free.
- Implemented via a stack-based virtual machine. This makes it much faster than tree-walk interpreter languages.
- Object-oriented. All code executes either within a function or the method of a class. Class fields are private by default and are accessed through method calls.
- Lovingly crafted. Almost every line of code is commented and there is rich documentation within the source code.
- Comprehensive test suite. Several hundred tests have been implemented testing every facet of the language and the core library.
- Cross platform. The desktop dev harness compiles and runs on macOS, Windows and Linux. The ObjoScript VM compiles without issue on iOS.
- 100% native API 2.0 Xojo code. The only plugins required are for the demo app / bundled code editor. The actual VM is entirely Xojo code.
For detailed instructions on how to use and for further documentation about the language, see the Wiki.
- ObjoScript compiler and virtual machine.
- Basic IDE including a syntax-highlighting code editor, interactive debugger, bytecode disassembler and AST viewer.
- Comprehensive automated test suite.
-
- A command line tool project to run scripts from the Terminal.
ObjoScript would not be possible without the fantastic previous work of Bob Nystrom. ObjoScript is a close approximation to his Wren programming language and I have lifted verbatim a lot of his explanations in the documentation. Additional thanks to Bob for his fantastic Crafting Interpreters book which I used extensively to get my head around a lot of the fundamentals of language implementation. I can highly recommend purchasing the book even though it is free to read online.