How eaddrinuse-98/vertex works
Vertex is a statically typed language implementation that compiles source into bytecode and executes it in a virtual machine. Its principal workflow is source tokenization, parsing into compilable program nodes, bytecode generation and optimization, then bytecode loading and execution. The tree also shows object linking, bytecode persistence, compile-time checking, built-in macros, and a separate runtime library. The sampled code confirms lexer, parser, compile-context, and VM behavior; orchestration links among unsampled modules are omitted where their callers cannot be verified.
Main entry points: instructions.rs Instructions · parser_trait.rs Parser · vm.rs Virtual machine · tokens.rs Token definitions
Components 20
Source Frontend
- Lexer
src/backend/lexer/tokenizer.rs - Token definitions
src/backend/lexer/tokens.rs - Parser
src/backend/ast/parser/parser_trait.rs - Program AST
src/backend/ast/nodes/program_node.rs - Diagnostics
src/backend/errors/mod.rs
Compilation
- Bytecode compiler
src/backend/compiler/mod.rs - Compile-time checks
src/backend/compiler/comptime_variable_checker/mod.rs - Optimizer
src/backend/compiler/optimization/optimize.rs - Instructions
src/backend/compiler/instructions.rs - Object linker
src/backend/linker/link.rs - Object files
src/backend/linker/obj_file.rs - Bytecode persistence
src/backend/saving_bytes/mod.rs
Execution
- VM runner
src/runtime/runner/mod.rs - Bytecode loader
src/runtime/virtual_machine/pre_parsing.rs - Virtual machine
src/runtime/virtual_machine/vm.rs - Values and variables
src/runtime/virtual_machine/value.rs
Language Support
- Built-in macros
src/backend/buildin_macros/mod.rs - Runtime library
src/runtime_lib/src/lib.rs
Other components
- Language user
- Compiler CLI
src/bin/vertexC.rs
Connections 11
- Language user → Compiler CLI: invokes
- Lexer → Token definitions: creates
- Parser → Token definitions: consumes
- Parser → Program AST: builds
- Bytecode compiler → Instructions: emits
- Optimizer → Instructions: rewrites
- Object linker → Object files: patches
- Bytecode persistence → Instructions: serializes
- Bytecode loader → Instructions: loads
- VM runner → Virtual machine: runs
- Virtual machine → Values and variables: operates on