Starlight Language is a lightweight server-side scripting programming language built with JavaScript. It provides a custom interpreter and command-line interface (CLI) runtime for executing .sl scripts.
This project is designed for learning, experimentation, and understanding how programming languages and interpreters work internally.
Starlight Language is focused on simplicity and clarity. It demonstrates the full pipeline of a programming language, from lexical analysis to execution.
| Feature | Description |
|---|---|
| Type | Server-side scripting language |
| Runtime | CLI-based |
| Implementation | JavaScript (Node.js) |
| Execution Model | Interpreted (Lexer → Parser → Evaluator) |
| Primary Use Cases | Learning, backend scripting, experimentation |
Install globally using npm:
npm install -g starlight-cliRun a Starlight script:
starlight file.slOr using Node.js:
node starlight.js file.slsldeploy("Hello, Starlight");| Stage | File | Description |
|---|---|---|
| Input | .sl file |
Source code |
| Lexing | lexer.js |
Converts source code into tokens |
| Parsing | parser.js |
Builds Abstract Syntax Tree (AST) |
| Evaluation | evaluator.js |
Executes AST |
| Output | — | Final result |
starlight-language/
├── lexer.js
├── parser.js
├── evaluator.js
├── starlight.js
├── examples/
├── screenshots/
└── README.md
| Responsibility | Details |
|---|---|
| Tokenization | Converts source into tokens |
| Recognition | Keywords, operators, identifiers, literals |
| Output | Token stream |
| Responsibility | Details |
|---|---|
| Syntax Analysis | Validates structure |
| Transformation | Tokens → AST |
| Output | Abstract Syntax Tree |
| Responsibility | Details |
|---|---|
| Execution | Interprets AST |
| Runtime Behavior | Handles logic and flow |
| Output | Program result |
| Responsibility | Details |
|---|---|
| Entry Point | CLI execution |
| File Handling | Reads .sl scripts |
| Integration | Connects all components |
| Use Case | Description |
|---|---|
| Learning | Understand interpreters |
| Backend Scripting | CLI automation |
| Experimentation | Language design testing |
- Build a simple and understandable programming language
- Demonstrate interpreter architecture
- Provide a base for future extensions
| Feature | Status |
|---|---|
| Variables | Planned |
| Functions | Planned |
| Control Flow | In Progress |
| Error Handling | Planned |
| Standard Library | Planned |
| Package System | Planned |
- Programming language design
- Lexical analysis
- Parsing and AST
- Interpretation
- CLI tool development
starlight language, scripting language, interpreter, compiler design, AST, lexer, parser, CLI runtime, programming language development
Contributions are welcome:
- Fork the repository
- Submit improvements
- Propose new features
This project is open-source and intended for educational and experimental use.

.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)