See my blog post for an introduction to the grug modding language.
You can find its test suite here.
grug.c
contains documentation at the top of the file, and the MIT license at the very bottom. grug.h
refers to the MIT license in grug.c
.
grug.c
is composed of sections, which you can jump between by searching for ////
in the file:
- GRUG DOCUMENTATION
- INCLUDES AND DEFINES
- UTILS
- MACOS TIMER IMPLEMENTATION
- RUNTIME ERROR HANDLING
- JSON
- PARSING MOD API JSON
- READING
- TOKENIZATION
- PARSING
- DUMPING AST
- APPLYING AST
- FILLING RESULT TYPES
- COMPILING
- LINKING
- HOT RELOADING
- Box2D and raylib game
- terminal game: C/C++
- terminal game: Python
- terminal game: Java
- grug benchmarks
Search for #define
in grug.c
(with Ctrl+F). All the defines are configurable.
If you want to allow your compiler to optimize grug.c
extra hard, add the compiler flag -DCRASH_ON_UNREACHABLE
.