How colondry/cobalt-language works
Cobalt is a compiled programming language and command-line tool: users supply .cb source to build or run, and the compiler translates it through lexing, parsing into an AST, and C++ generation before native compilation/execution. The README also advertises library management and standard-library facilities for base, math, encryption, networking, and system operations. Main orchestration and parser/lexer links are supported by excerpts or the SOURCE INDEX; unsampled subsystem links are omitted where caller-level evidence is unavailable.
Main entry points: main.cpp CLI orchestration · ast.hpp AST model · parser.cpp Parser · lexer.cpp Tokenizer
Components 19
Compiler CLI
- CLI orchestration
bin/main.cpp - Library management
bin/libmanage.cpp
Language Front End
- Tokenizer
bin/lexer.cpp - Parser
bin/parser.cpp - AST model
bin/ast.hpp - AST visitors
bin/visitor.hpp
C++ Backend
- C++ generation
bin/codeGen.cpp - Visitor generation
bin/vgen.hpp - Cobalt runtime
bin/Bin/inf.hpp
Cobalt Libraries
- Base utilities
bin/lib/base/base.cpp - Math library
bin/lib/mathlib/mathlib.cpp - Encryption library
bin/lib/encryption/polybius_sq.cpp - Stream cipher
bin/lib/encryption/stream_cipher.cpp - Network library
bin/lib/network/nbase.cpp - System library
bin/lib/sys/sys.cpp - Kernel utilities
bin/lib/kern/kern.hpp
Other components
- Cobalt developer
- C++ compiler
- Native executable
Connections 15
- Cobalt developer → CLI orchestration: builds or runs
README.md - CLI orchestration → Tokenizer: tokenizes source
bin/main.cpp - CLI orchestration → Parser: parses tokens
bin/main.cpp - Tokenizer → Parser: provides tokens
- Parser → AST model: constructs AST
- CLI orchestration → C++ generation: generates C++
bin/main.cpp - C++ generation → AST model: visits AST
- Visitor generation → AST model: visits AST
bin/vgen.hpp - AST model → AST visitors: dispatches accepts
bin/ast.hpp - CLI orchestration → C++ compiler: compiles generated C++
README.md - C++ compiler → Native executable: produces executable
README.md - CLI orchestration → Native executable: runs executable
bin/main.cpp - CLI orchestration → Library management: manages libraries
bin/main.cpp - Base utilities → Math library: uses math API
bin/lib/base/base.cpp - Encryption library → Stream cipher