Skip to content

dominexmacedon-dev/starlight-cli-script

Repository files navigation

Starlight Language (starlight-programming-lang)

Starlight Language Logo

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.


Logo Variants


Screenshots


Overview

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

Installation

Install globally using npm:

npm install -g starlight-cli

Quick Start

Run a Starlight script:

starlight file.sl

Or using Node.js:

node starlight.js file.sl

Example

sldeploy("Hello, Starlight");

Execution Pipeline

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

Project Structure

starlight-language/
├── lexer.js
├── parser.js
├── evaluator.js
├── starlight.js
├── examples/
├── screenshots/
└── README.md

Core Components

Lexer (lexer.js)

Responsibility Details
Tokenization Converts source into tokens
Recognition Keywords, operators, identifiers, literals
Output Token stream

Parser (parser.js)

Responsibility Details
Syntax Analysis Validates structure
Transformation Tokens → AST
Output Abstract Syntax Tree

Evaluator (evaluator.js)

Responsibility Details
Execution Interprets AST
Runtime Behavior Handles logic and flow
Output Program result

CLI Runtime (starlight.js)

Responsibility Details
Entry Point CLI execution
File Handling Reads .sl scripts
Integration Connects all components

Use Cases

Use Case Description
Learning Understand interpreters
Backend Scripting CLI automation
Experimentation Language design testing

Project Goals

  • Build a simple and understandable programming language
  • Demonstrate interpreter architecture
  • Provide a base for future extensions

Future Improvements

Feature Status
Variables Planned
Functions Planned
Control Flow In Progress
Error Handling Planned
Standard Library Planned
Package System Planned

Concepts Covered

  • Programming language design
  • Lexical analysis
  • Parsing and AST
  • Interpretation
  • CLI tool development

Keywords

starlight language, scripting language, interpreter, compiler design, AST, lexer, parser, CLI runtime, programming language development


Contributing

Contributions are welcome:

  • Fork the repository
  • Submit improvements
  • Propose new features

License

This project is open-source and intended for educational and experimental use.

About

Starlight Programming Language Command Line Interface developed by Dominex Macedon

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages