DLiteScript

command module
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 15, 2025 License: MIT Imports: 2 Imported by: 0

README

DLiteScript

Go Version License Quality Gate Status Coverage Go Report Card

[!WARNING] This repository is still a work-in-progress. It is nowhere near production-ready.

A delightfully simple scripting language.

Table of Contents

Features

  • Static typing: Explicit types with types like string, number, and bool
  • No magic: All functionality is visible and explicit
  • LSP support: Language Server Protocol for IDE integration

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.

Documentation

Overview

The main entrypoint of the application.

Directories

Path Synopsis
Package cmd contains the commands for the DLiteScript CLI.
Package cmd contains the commands for the DLiteScript CLI.
internal
ast
Package ast defines structs and methods to handle AST creation.
Package ast defines structs and methods to handle AST creation.
controlflow
Package controlflow provides functionality for controlling the flow of execution.
Package controlflow provides functionality for controlling the flow of execution.
datatype
Package datatype provides the DataType type and related methods.
Package datatype provides the DataType type and related methods.
datavalue
Package datavalue provides the Value type and related methods.
Package datavalue provides the Value type and related methods.
errorutil
Package errorutil provides utility functions for handling errors.
Package errorutil provides utility functions for handling errors.
evaluator
Package evaluator defines logic to evaluate an AST.
Package evaluator defines logic to evaluate an AST.
formatter
Package formatter provides a formatter for DLiteScript code.
Package formatter provides a formatter for DLiteScript code.
function
Package function provides the Function type and related methods.
Package function provides the Function type and related methods.
jsonrpc2
Package jsonrpc2 provides a JSON-RPC 2.0-compatible stream implementation.
Package jsonrpc2 provides a JSON-RPC 2.0-compatible stream implementation.
linter
Package linter provides a linter.
Package linter provides a linter.
linter/reporter
Package reporter provides a reporter for linting issues.
Package reporter provides a reporter for linting issues.
linter/rules
Package rules provides the rules for the linter.
Package rules provides the rules for the linter.
lsp
Package lsp provides an LSP server for DLiteScript.
Package lsp provides an LSP server for DLiteScript.
lsp/lsptypes
Package lsptypes contains the types for the LSP.
Package lsptypes contains the types for the LSP.
parser
Package parser defines the actual parser for DLiteScript.
Package parser defines the actual parser for DLiteScript.
repl
Package repl provides a REPL for DLiteScript.
Package repl provides a REPL for DLiteScript.
stdlib
Package stdlib provides the standard library for DLiteScript.
Package stdlib provides the standard library for DLiteScript.
stdlib/arrays
Package arrays provides the array functions for the standard library.
Package arrays provides the array functions for the standard library.
stdlib/errors
Package errors provides the errors functions for the standard library.
Package errors provides the errors functions for the standard library.
stdlib/global
Package global provides the global functions for the standard library.
Package global provides the global functions for the standard library.
stdlib/math
Package math provides maths functions for the standard library.
Package math provides maths functions for the standard library.
stdlib/os
Package os provides os functions for the standard library.
Package os provides os functions for the standard library.
stdlib/strings
Package strings provides the string functions for the standard library.
Package strings provides the string functions for the standard library.
stdlib/time
Package time provides time functions for the standard library.
Package time provides time functions for the standard library.
token
Package token defines a Token struct.
Package token defines a Token struct.
tokenizer
Package tokenizer provides a struct that handles tokenisation of a string.
Package tokenizer provides a struct that handles tokenisation of a string.
version
Package version provides the version information for the application.
Package version provides the version information for the application.
Package scriptrunner provides a script runner for DLiteScript.
Package scriptrunner provides a script runner for DLiteScript.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL