NXL
NXL is an experimental programming language designed to keep the simplicity of Python while introducing a more familiar C/Java/Rust-style syntax.
The defining syntax difference is that NXL uses {} to define blocks instead of indentation.
if age >= 18 { print("Adult")}The compiler and runtime are being built from scratch in Rust.
Why NXL?
Section titled “Why NXL?”NXL started with a simple idea:
What if Python had a simple syntax but used
{}instead of indentation?
The goal isn’t to simply clone Python. NXL is an experiment in understanding how programming languages work while designing a language with its own syntax, runtime, and eventually its own ecosystem.
Example
Section titled “Example”let name = "Tanmoy"let age = 23
print(name)print(age)
if age >= 18 { print("Adult")} else { print("Minor")}Run it with:
cargo run -- examples/hello.nxlThe current interpreter supports basic values, variables, and print().
Compiler Pipeline
Section titled “Compiler Pipeline”NXL is organized as a simple source-to-execution pipeline:
Source Code │ ▼ CLI │ ▼ Lexer │ ▼ Tokens │ ▼ Parser │ ▼ AST │ ▼Interpreter │ ├── Environment │ └── Runtime Values │ ▼ OutputEach stage has one main responsibility.
Project Status
Section titled “Project Status”NXL is under active development.
Implemented
Section titled “Implemented”- Rust project
- CLI file loading
- Token system
- Lexer
- Keywords
- Numbers
- Strings
- Booleans
null- Operators
- Comments
{}blocks- Parser
- AST
- Operator precedence in parser
- Variables
- Runtime values
- Environment
- Variable lookup
- Interpreter
- Built-in
print()
Currently being developed
Section titled “Currently being developed”- Binary expression evaluation
- Comparison evaluation
- Boolean expressions
if/elseexecution- Assignment execution
- Functions
- Function calls
return- Arrays
- Loops
- Modules
- Standard library
- Tests
- Formatter
- Package manager