Skip to content

MyNameIsTrez/grug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 

Repository files navigation

grug

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.

Sections

grug.c is composed of sections, which you can jump between by searching for //// in the file:

  1. GRUG DOCUMENTATION
  2. INCLUDES AND DEFINES
  3. UTILS
  4. MACOS TIMER IMPLEMENTATION
  5. RUNTIME ERROR HANDLING
  6. JSON
  7. PARSING MOD API JSON
  8. READING
  9. TOKENIZATION
  10. PARSING
  11. DUMPING AST
  12. APPLYING AST
  13. FILLING RESULT TYPES
  14. COMPILING
  15. LINKING
  16. HOT RELOADING

Small example programs

Options

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.

Releases

No releases published

Packages

No packages published

Languages