How to contribute to Typegen
May 26, 2025 · View on GitHub
WARNING⚠️: Unit tests are not yet implemented. Typegen is still in the early stages of development, it is planned to be implemented in the near future.
The Typegen project consists of
- The TGS language specification.
- The Typegen compiler/parser, called typegen.
- The language generators (TypeScript, C#, etc.)
- Various tools, such as the CLI and VS Code extension
1. How to contribute to the TGS language
The TGS language is the schema definition language specification. You can contribute to the language by:
- Filing enhancement requests for changes to the language syntax.
- Offering feedback on existing features, by filing issues.
- Help working on the language specification in
GRAMMAR.md. - Help improving language documentation and examples.
- Suggest new built-in types or language constructs.
2. How to contribute to the Typegen compiler
The Typegen compiler consists of the lexer, parser, and core logic + test suites for testing the compiler. You can contribute by:
- File bugs (by far the most important thing).
- Suggest improved diagnostics / error messages.
- Refactoring existing code (needs deep understanding of the compiler).
- Add support for new TGS language features.
- Improve parsing error recovery and validation.
- Work on inheritance validation and type checking.
Development Setup
git clone https://github.com/cakeruu/typegen.git
cd typegen
dotnet build
dotnet run build # Test with .tgs files in current directory
If you want to build the project for release:
make # Builds for target current platform
make all # Builds for all supported platforms
make windows # Builds for Windows
make osx-intel # Builds for Intel Macs
make osx-arm # Builds for Apple Silicon Macs
make linux # Builds for most Linux distributions
make linux-arm # Builds for ARM-based Linux
Code Structure
Builder/Lexer/- Tokenization of .tgs filesBuilder/Parser/- AST generation and validationBuilder/Types/- Data structures and modelsProgram.cs- CLI interface
Editor plugins
- Contribute to the separate Typegen editor plugins
- Improve syntax highlighting, IntelliSense, and validation