Standard: Production-Grade, Zero External Dependencies, Offline-First Language Architecture.
Thank you for your interest in contributing to BramandScript (bmd)! BramandScript is designed from scratch to be a high-performance, general-purpose programming language powered by a stack-based Bytecode Virtual Machine, implemented strictly using the standard library of Go (stdlib).
Please read this document carefully before proposing architectural changes, filing issues, or submitting pull requests.
- Zero Third-Party Dependencies (0 external packages):
- The entire compiler toolchain, bytecode virtual machine, lexer, Pratt parser, runtime, standard library, and CLI must build using standard Go library tools only.
- Do NOT run
go getor add dependencies togo.mod. Any external dependency is grounds for immediate PR rejection.
- Bytecode-First Execution Pipeline:
- Every language feature must compile to bytecode instructions (
code/) executed on the stack-based VM (vm/). - Tree-walk interpreters or AST-walking evaluation are strictly prohibited.
- Every language feature must compile to bytecode instructions (
- No Emojis Policy (Compulsory Unicode / ASCII Standard):
- Never use emojis anywhere in the codebase, CLI prompts, REPL banners, runtime diagnostics, error handlers, examples, or documentation.
- Use clean Unicode typographic symbols (such as
✦,❯,→,·,●,■,::) or bracketed status tokens (e.g.,[INFO],[OK],[ERROR],[WARN]).
- Direct-to-Release Quality Mandate:
- Every commit and pull request must represent complete, zero-defect code.
- Stubs, placeholder mocks, or half-implemented features are not accepted.
- Every feature must be backed by unit tests with 100% pass status.
- Cross-Platform Compatibility:
- BramandScript targets Termux (Android ARM64), Linux (x86_64 / aarch64), macOS (Apple Silicon / Intel), and Windows. Do not use OS-specific assumptions without standard library abstractions.
- Go 1.20+ installed on your system or Termux environment.
- Git.
- 100% self-hosted: zero external dependencies, zero Node.js/npm requirements.
git clone https://github.com/Codeleafly/bramandScript.git
cd bramandScriptTo compile the unified native CLI binary:
go build -o bramand main.goVerify the build:
./bramand versionExpected output:
BramandScript 0.1.0 (arm64-linux)
Before making any changes, ensure all existing unit tests pass:
go test ./... -vTo run tests for a specific subsystem:
# Test Lexer
go test ./lexer -v
# Test Parser
go test ./parser -v
# Test Compiler & Symbol Table
go test ./compiler -v
# Test Virtual Machine & Bytecode Execution
go test ./vm -v
# Test Diagnostics Engine
go test ./diagnostics -vTo verify test coverage:
go test -cover ./...bramandScript/
├── token/ ✦ Token definitions, types, and keyword tables
├── lexer/ ✦ Unicode lexical scanner, character streaming
├── ast/ ✦ Abstract Syntax Tree node interfaces, expressions, statements
├── parser/ ✦ Top-down operator precedence (Pratt) parser
├── code/ ✦ Bytecode definitions, Opcode constants, BigEndian encoding
├── compiler/ ✦ AST-to-Bytecode compiler, symbol scoping, constant table
├── vm/ ✦ Stack-based virtual machine, execution loop, call frames
├── object/ ✦ Runtime data types (Integer, Float, String, Closure, Hash, Array)
├── diagnostics/ ✦ Rust/Clang-style visual error engine with context window
├── repl/ ✦ Interactive terminal REPL and multi-line :editor mode
├── examples/ ✦ Standard reference programs (.bmd)
├── tools/ ✦ Internal developer CLI utilities (task.bmd)
├── date/ ✦ Roadmap and task tracking logs (MMYY format)
├── docs/ ✦ Official web documentation portal
├── main.go ✦ CLI entrypoint (run, repl, version, help)
└── install.sh ✦ Automated installer script
All active developments are logged in ./date/MMYY/First_week_task.md following project tracking standards.
- Do not manually edit markdown checkboxes in
date/MMYY/*.md. - Always use the provided native tool (
bmd-taskor./bramand run tools/task.bmd):bmd-task list # View current tasks and progress bmd-task check <number> # Mark task as complete [x] after tests pass bmd-task add "..." # Add a new task item (detailed --desc is compulsory)
- Run
gofmt -s -w .before committing code. - Follow idiomatic Go naming conventions: camelCase for private variables, PascalCase for exported identifiers.
- Errors must be informative and returned cleanly; do not panic in library packages (
lexer,parser,compiler,vm). - Provide line and column numbers for syntax, compilation, and runtime errors to integrate with the
diagnosticspackage.
Use the Conventional Commits specification:
feat: add support for bitwise shift operatorsfix: resolve closure variable capture in nested functionstest: add unit test for hash table index assignmentdocs: update standard library builtins referencerefactor: optimize stack frame allocation in VM
-
Fork and Branch: Create a dedicated branch for your feature or bug fix:
git checkout -b feat/your-feature-name
-
Implement Feature with Tests:
- Write unit tests covering both happy paths and edge cases.
- Implement the minimal, robust logic following the Bytecode VM pipeline.
-
Verify All Tests Pass:
go test ./... -v go vet ./... -
Verify Clean Build:
go build -o bramand main.go ./bramand run examples/day3_features.bmd
-
Commit and Push:
git add . git commit -m "feat: implement feature with comprehensive tests" git push origin feat/your-feature-name
-
Submit PR:
- Fill out the PR template with clear description, rationale, and sample
.bmdcode snippet. - Ensure continuous integration checks pass without warnings.
- Fill out the PR template with clear description, rationale, and sample
By contributing to BramandScript, you agree that your contributions will be licensed under the project's MIT License.