A programming language compiler and virtual machine built with TypeScript.
Ometer is a custom programming language with a complete compiler toolchain including a lexer, parser, compiler, and virtual machine. It's designed to be extensible and easy to understand.
ometer/
├── src/
│ ├── lexer.ts # Tokenization
│ ├── parser.ts # Abstract Syntax Tree (AST) generation
│ ├── compiler.ts # Code compilation
│ ├── vm.ts # Virtual machine execution
│ ├── ast.ts # AST type definitions
│ └── cli.ts # Command-line interface
├── examples/ # Sample .om programs
└── package.json
- Clone the repository:
git clone https://github.com/Wealthometer/Ometer.git
cd ometer- Install dependencies:
npm install- Build the project:
npm run buildRun Ometer programs from the command line:
npm run start -- <file.om>- Lexer: Tokenizes source code into meaningful units
- Parser: Generates an Abstract Syntax Tree (AST)
- Compiler: Compiles AST to bytecode
- Virtual Machine: Executes compiled bytecode
- CLI: Easy-to-use command-line interface
See the examples/ directory for sample Ometer programs:
hello.om- Basic hello world exampletest.om- Test programs
npm run buildnpm testnpm run dev[Add language syntax documentation here]
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
Wealthometer