Modern • Simple • English-like

RubiTon Programming Language

A clean, beginner-friendly language built with a real compiler structure: Lexer → Tokens → Parser → AST → Semantic Analyzer → JS Compiler → Runtime.

let name = "Hamza"
let age = 19
let names = ["Hamza", "Younas", "Ali"]

print name
print names[0]

if age >= 18
    print "Adult"
else
    print "Minor"
end
v0.4Real Core
RustCompiler Base
ASTTree System
JSBackend Output

What is RubiTon?

RubiTon is a simple and readable programming language designed to make coding easier for beginners while keeping the compiler architecture strong for future frontend and backend development.

Simple Syntax

English-like code with clean blocks, direct variables, readable loops, and easy printing.

Real Structure

Built around lexer, tokens, parser, AST, semantic checking, compiler, and runtime layers.

Future Ready

Designed to grow into frontend UI, backend scripting, package modules, and developer tooling.

RubiTon Syntax Guide

Variables

let name = "Hamza"
let age = 19
print name
print age

Arrays

let names = ["Hamza", "Younas", "Ali"]
print names
print names[0]

If / Else

if age >= 18
    print "Adult"
else
    print "Minor"
end

While Loop

let i = 0
while i < 3
    print i
    i++
end

Repeat Loop

repeat for 3
    print "Loop"
end

Repeat Counter

repeat i = 1 for 3
    print i
end

Do While

do
    print i
    i--
while i > 0
end

Operators

i++
i--
i += 1
i -= 1
i *= 2
i /= 2

String Interpolation

let name = "Hamza"
print "Hello {name}"

Full Example

main.rbt

let name = "Hamza"
let age = 19
let names = ["Hamza", "Younas", "Ali"]

print name
print age
print names
print names[0]

if age >= 18
    print "Adult"
else
    print "Minor"
end

let i = 0
while i < 3
    print i
    i++
end

repeat for 3
    print "Loop"
end

repeat i = 1 for 3
    print i
end

do
    print i
    i--
while i > 0
end

Output

Hamza
19
[Hamza, Younas, Ali]
Hamza
Adult
0
1
2
Loop
Loop
Loop
1
2
3
3
2
1

Compiler Architecture

RubiTon v0.4 follows a real compiler-style pipeline for the current language features.

.rbt FileLexerTokensParserASTSemanticJSRuntime

Source Files

  • lexer.rs breaks code into tokens.
  • tokens.rs defines token types.
  • parser.rs creates the AST tree.
  • ast/mod.rs stores statements and expressions.

Backend Files

  • semantic.rs checks scope and meaning.
  • compiler.rs generates JavaScript.
  • runtime.rs runs typed values and output.
  • main.rs connects the full pipeline.

Run RubiTon

cd "C:\RubiTon Language & Framework\rubiton"
cargo run main.rbt

The compiler creates main.js and also prints the RubiTon output in the terminal.

Roadmap

01

Functions

Function parameters, return values, and call stack support.

02

Modules

Import/export system for larger projects.

03

Backend

File system, HTTP server, database helpers, and APIs.

04

RubiTon Flux

Frontend UI syntax, DOM targets, components, and reactive updates.

Created by Its Hamza Dev

RubiTon is created and developed by Its Hamza Dev. Built with passion for simple syntax, strong architecture, and future-ready development.

Back to Top