Garter – design

compiler design

Garter language-family cross compiler toolchain

cli

This processes our commandline arguments and lets the main function know what frontend, backend, linking, or toplevel functions need to be called

shared

This contains helper functions for lexing, parsing, input/output, and error reporting

assets

This contains data that is expected to be baked into the executable itself, such as the help dialog, documentation, and branding.

locale

This contains string tables for various languages. I hope to be able to personally maintain

runtime

This contains framework code that is injected by the preprocessor during compilation, such as the core library and init function

frontends

These take input source and transpile it to another source format

linker

This takes *.gyb bytecode files and attempts to find symbol definitions for any extern definitions, then outputs a static bytecode file.

backends

This takes static bytecode and emits binary executables

see also