How blanketsucks/language works
Quart is a small experimental programming language compiler. A user supplies source files and compiler options; the CLI constructs compiler options and invokes compilation, which produces an executable or another requested format. The graph preserves the documented LLVM IR/bitcode, assembly, object, executable and shared-library outputs, plus optimization and the x86-64 backend visible in the tree. Source excerpts establish the CLI handoff and parts of parsing and bytecode generation; several internal stage connections are therefore dashed and unverified.
Main entry points: compiler.cpp Compiler · ast.cpp AST Bytecode Generation · cl.cpp CLI Arguments · filesystem.cpp Source Files
Components 17
Invocation
- CLI Arguments
quart/cl.cpp - Compiler
quart/compiler.cpp
Source Front End
- Source Files
quart/filesystem.cpp - Lexer
quart/lexer/lexer.cpp - Tokens
quart/lexer/tokens.h - Parser
quart/parser/parser.cpp - Syntax AST
quart/parser/ast.h
Language Semantics
- Compilation State
quart/language/state.cpp - Type Checking
quart/language/type_checker.cpp - Constant Evaluation
quart/language/consteval.cpp
Bytecode
- AST Bytecode Generation
quart/bytecode/ast.cpp - Bytecode Instructions
quart/bytecode/instruction.cpp - Optimization Passes
quart/bytecode/passes/eliminate_unreachable_blocks.cpp
Code Generation
- LLVM Backend
quart/codegen/llvm/codegen.cpp - x86-64 Backend
quart/codegen/x86_64/codegen.cpp - Compiler Output
Other components
- Compiler User
Connections 17
- Compiler User → CLI Arguments: provides options
- CLI Arguments → Compiler: configures and invokes
- Compiler → Source Files: loads source
- Source Files → Lexer: supplies source
- Lexer → Tokens: produces
- Tokens → Parser: consumed by
- Parser → Syntax AST: builds
- Syntax AST → AST Bytecode Generation: lowered by
- AST Bytecode Generation → Compilation State: emits through
quart/bytecode/ast.cpp - AST Bytecode Generation → Constant Evaluation: evaluates constants with
quart/bytecode/ast.cpp - Compilation State → Type Checking: uses semantic checks
- AST Bytecode Generation → Bytecode Instructions: emits instructions
- Bytecode Instructions → Optimization Passes: optimized by
- Compiler → LLVM Backend: selects backend
- Compiler → x86-64 Backend: selects backend
- LLVM Backend → Compiler Output: emits requested format
- x86-64 Backend → Compiler Output: emits assembly