Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Contributing

LumenLang is a solo, exploratory project, but issues, pull requests, and questions are welcome on GitHub.

Before you send a PR

  1. Build it. Follow Installation & Building — make sure cmake .. && make -j$(nproc) succeeds cleanly.
  2. Run the test suite.
    ./test.sh
    
    This exercises the compiler and VM end-to-end. Any change to src/compiler.cpp, src/vm.cpp, src/tokenizer.cpp, or the bytecode format should leave this passing.
  3. Keep the disassembler and debug symbols in sync. If you add or change an opcode, update disassemblyMap in src/disassembler.cpp and getOpCodeOffset() in src/helpers.cpp together — a mismatch between the two silently corrupts disassembly output. See Opcode Reference.

Where things live

AreaFiles
Tokenizersrc/tokenizer.cpp, include/tokenizer.h
Compilersrc/compiler.cpp, src/compiler_math.cpp, include/compiler.h
Virtual machinesrc/vm.cpp, include/vm.h
Native functionssrc/vmfuncmap.cpp
Binary .bin formatsrc/programfile.cpp, include/programfile.h
Disassemblersrc/disassembler.cpp, include/disassembler.h
Interactive debuggersrc/debugvm.cpp
Bundled examplesinclude/examples.h, examples/*.lmn