Skip to content

NXL

A simple, expressive programming language built from scratch in Rust.

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.

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.

let name = "Tanmoy"
let age = 23
print(name)
print(age)
if age >= 18 {
print("Adult")
} else {
print("Minor")
}

Run it with:

Terminal window
cargo run -- examples/hello.nxl

The current interpreter supports basic values, variables, and print().

NXL is organized as a simple source-to-execution pipeline:

Source Code
CLI
Lexer
Tokens
Parser
AST
Interpreter
├── Environment
└── Runtime Values
Output

Each stage has one main responsibility.

NXL is under active development.

  • 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()
  • Binary expression evaluation
  • Comparison evaluation
  • Boolean expressions
  • if / else execution
  • Assignment execution
  • Functions
  • Function calls
  • return
  • Arrays
  • Loops
  • Modules
  • Standard library
  • Tests
  • Formatter
  • Package manager