qscript ~master

A Simple Scripting Language


To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

QScript

A Simple Scripting Language.

For last stable version, see v0.7.4

QScript is currently under active development, and being redesigned under a new specification, see spec/syntax.md.

Setting it up

To add QScript to your dub package or project, run this in your dub package's directory:

dub add qscript

Look at the source/demo.d to see how to use QScript

Getting Started

To get started on using QScript, see the following documents:

  • spec/syntax.md - language specification
  • examples/ - Contains some scripts showing how to write scripts. // TODO write these

Building

QScript comes with a standalone configuration, so it can be used without being first integrated into some program as a library. You can build it using:

dub build qscript -c=standalone -b=release

You can use this executable to run scripts, inspect the generated AST for script, or the generated NaVM bytecode:

./qscript /path/to/script # execute a script

./qscript --ast /path/to/script # pretty print AST for script

./qscript --bcode /path/to/script # print NaVM bytecode for script

Features

// Most of these are not yet implemented

  1. Static typed
  2. Dynamic arrays
  3. Templates
  4. Conditional Compilation
  5. Compile Time Function Execution
  6. First class Functions
  7. Lambda Functions
  8. Function overloading
  9. Operator overloading
  10. Reference Data Types
  11. Structs
  12. Enums

Hello World

This is how a hello world would look like in QScript. For more examples, see examples/ // TODO write examples

load(stdio);

fn main(){
	writeln("Hello World!");
}
Authors:
  • Nafees Hassan
Dependencies:
utils, navm
Versions:
0.8.0-alpha 2021-Mar-22
0.7.4 2021-Feb-02
0.7.3 2020-Dec-17
0.7.2 2020-Oct-27
0.7.1 2020-Mar-14
Show all 23 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 191 downloads total

Score:
2.2
Short URL:
qscript.dub.pm