qscript 0.7.1

a tiny, small, & fast scripting lang.


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

QScript

A fast, static typed, scripting language, with a syntax similar to D Language.

Setting it up

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

dub add qscript

After adding that, look at the source/demo.d to see how to use the QScript class to execute scripts.

Getting Started

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

  • spec/syntax.md - Contains the specification for QScript's syntax.
  • spec/functions.md- Contains a list of predefined QScript functions.
  • source/demo.d- A demo usage of QScript in D langauage. Shows how to add new functions
  • examples/ - Contains some scripts showing how to write scripts.

The code is thoroughly documented. Separate documentation can be found here.

Building Demo

To be able to run basic scripts, you can build the demo using:

dub build -c=demo -b=release

This will create an executable named demo in the directory. To run a script through it, do:

./demo path/to/script

You can also use the demo build to see the generated NaVM byte code for your scripts using:

./demo "path/to/script" "output/bytecode/file/path"

Features

  1. Simple syntax
  2. Dynamic arrays
  3. Fast execution
  4. Static typed.
  5. Function overloading
  6. References

TODO For Upcoming Versions

  1. add cast(Type)
  2. unsigned integers
  3. bitshift operators
  4. Structs
  5. Be able to load multiple scripts, to make it easier to separete scripts across files. Something similar to D's import

Hello World

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

function void main(){
	writeln ("Hello World!");
}
Authors:
  • nafees
Dependencies:
utils, navm
Versions:
0.7.1 2020-Mar-14
0.7.0 2020-Jan-31
0.6.12 2020-Jan-13
0.6.11 2019-Dec-31
0.6.10 2019-Dec-30
Show all 19 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 1 downloads this month

  • 111 downloads total

Score:
1.9
Short URL:
qscript.dub.pm