DLiteScript

command module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2025 License: MIT Imports: 1 Imported by: 0

README

DLiteScript

Quality Gate Status Go Report Card

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

Usage

  • Run the application with a file, e.g.:

    go run main.go examples/00_simple/main.dl
    

Supported constants

  • PI - π
  • TAU - τ (2π)
  • E - Euler's number
  • PHI - φ Golden ratio
  • LN2 - Natural logarithm of 2
  • LN10 - Natural logarithm of 10

Supported functions

  • printf(format, args...) - Print formatted output
  • abs(x) - Absolute value of x
  • sin(x) - Sine value of x
  • cos(x) - Cosine value of x
  • tan(x) - Tangent value of x
  • sqrt(x) - Square root
  • round(x) - Round x to the nearest integer value
  • floor(x) - Round x down to the nearest integer value
  • ceil(x) - Round x up to the nearest integer value
  • min(x, y) - Get the smallest of the values provided
  • max(x, y) - Get the largest of the values provided

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.
jsonrpc2
Package jsonrpc2 provides a JSON-RPC 2.0-compatible stream implementation.
Package jsonrpc2 provides a JSON-RPC 2.0-compatible stream implementation.
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.
scriptrunner
Package scriptrunner provides a script runner for DLiteScript.
Package scriptrunner provides a script runner for DLiteScript.
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.

Jump to

Keyboard shortcuts

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