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/, src/vm/, 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 (statements, expressions, tables, finalize), include/compiler.h, include/compiler_internal.h
Virtual machinesrc/vm/vm.cpp, src/vm/translator.cpp, src/vm/memoryallocator.cpp, include/vm.h
Native functionssrc/vm/vmfuncmap.cpp (implementation), src/compiler/compiler_tables.cpp (funcList)
Binary .bin formatsrc/programfile.cpp, include/programfile.h
Disassemblersrc/disassembler.cpp, include/disassembler.h
Interactive debuggersrc/debugvm.cpp
Bundled examplesinclude/examples.h, examples/*.lmn