qscript 0.7.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, 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 functionsexamples/
- 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
- Simple syntax
- Dynamic arrays
- Fast execution
- Static typed.
- Function overloading
- References
TODO For Upcoming Versions
- Add
cast(Type)
, and add more types likebyte
- Structs
- 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!");
}
- Registered by Nafees Hassan
- 0.7.0 released 4 years ago
- Nafees10/qscript
- MIT
- Copyright © 2016-2020, nafees
- Authors:
- 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 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
191 downloads total
-
- Score:
- 2.2
- Short URL:
- qscript.dub.pm