Skip to content

Dobefu/DLiteScript

Logo

DLiteScript

A delightfully simple scripting language.

Go Version License Quality Gate Status Coverage Go Report Card Discord

Warning

This repository is still a work-in-progress. It is nowhere near production-ready.

Table of Contents

Features

Quick Start

Hello World

printf("Hello, World!\n")

Run it:

dlitescript hello.dl

Variables and Types

var name string = "DLiteScript"
var version number = 0.1
var isSupported bool = true

printf("Welcome to %s v%g\n", name, version)
printf("Supported: %t\n", isActive)

Control Flow

var test number = 85

if test > 80 {
  printf("The number is over 80\n")
} else {
  printf("The number is 80 or lower\n")
}

Loops

for var i from 0 to 5 {
  printf("Count: %g\n", i)
}

for var i to 3 {
  if i == 2 {
    continue
  }
  printf("Iteration %g\n", i)
}

Functions

func greet(name string) string {
  printf("Hello, %s!\n", name)
}

greet("Developer")

Examples

Check out the examples/ directory for examples covering:

  • Basic syntax and operations
  • Variables and type declarations
  • Control flow and loops
  • Functions with multiple return values
  • And much more!

Installation

git clone https://github.com/Dobefu/DLiteScript.git
cd DLiteScript
go mod download
go build -buildvcs

Development

# Run tests
go test ./...

# Build binary
go build -buildvcs

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for details.

License

MIT License - see LICENSE for details.

Sponsor this project

 

Contributors 3

  •  
  •  
  •