qscript 0.6.0

a tiny, small, & fast scripting lang.


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 fast, static typed, scripting language, with a syntax similar to D Language.

Setting it up

To add QScript to your dub package or project, add the following into dub.json dependencies:

"qscript": "~>0.6.0"

or if you have dub.sdl:

dependency "qscript" version="~>0.6.0"

After adding that, look at the demos/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.
  • demos/demo.d - A demo usage of QScript in D langauage. Shows how to add new functions,

And for the documentation on the code, including QScript's compiler, it is stored in docs/. The spec for QScript's byte code is also available, in spec/bytecode.md, but knowing it is not necessary for using QScript.

Features:

  1. Syntax very similar to D
  2. Dynamic arrays
  3. Very fast execution speed. QScript has a virtual machine for this purpose, no interpretation is done at run time.
  4. Static typed. This eliminates a lot of errors.

Example scripts:

The following scripts are written assuming that the program, which is running QScript, provides the writeln(string) function, and starts execution from main. Hello World:

		function void main(){
			writeln ("Hello World!");
		}

Arrays:

		function void main{
			int[] (array);
			array = array(1, 2, 3, 4);
			int (i, length);
			i = 0;
			length = getLength(array);
			while (i < length){
				writeln (intToStr(array[i]));
				i = i + 1;
			}
		}
Authors:
  • nafees
Dependencies:
utils
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