Add extensibility to Vala
Currently there is a solution based on classes that interoperate to:
- Parse Vala Code
- Generate AST
- Generate C code
- Compile to Binary
See at Genie
Vala has a set of classes specialized to do above tasks, but there are not room for custom classes you can use to extend the functionality.
First Case: Parser
Inmediate example is Genie. It is a custom parser producing compatible AST like the one for Vala source. Both could share some code by using a Top level interface, implemented by both.
Let's say we want to add an SQL syntax recognition embedded in Vala/Genie code, by implementing a Top level Parser interface is possible to recognize this sentences and leave the rest of the work to current parsers. Compiler will use a Parser interface object to generate Syntax Tree.
Second Case: Code Generation
For code generation a Top Level Interface, ie. called CodeTranslator, implemented by current C code generator and used to produce output code, so in the future any one can produce code for their favorite language like Rust (?), Python or any other compatible with Vala structure. Just leave developers the option.
Third Case: Vala Language Server
Vala needs to expose features to implement a Vala Language Server see #687 (closed)
Questions
- Are you interested to add interfaces so it is possible to allow custom user implementations?
- Are you open to rename internal objects in order to make room for new generic names for interfaces?
- Are you open to add a libpeas dependency to allow extensions from different languages?