qscript 0.7.2
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 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
Coming in next version:
- Structs
- Enums
- Global Variables
- Scripts as libraries for other scripts
Planned for sometime later:
- bitshift operators
- More data types
Hello World
This is how a hello world would look like in QScript. For more examples, see examples/
.
function void main(){
writeln ("Hello World!");
}
writeln is not included in QScript, programs that use QScript are to provide their own functions, QScript only provides the very basic functions. However, writeln is provided in the demo program so any example scripts can be run using that
- Registered by Nafees Hassan
- 0.7.2 released 4 years ago
- Nafees10/qscript
- MIT
- Copyright © 2016-2020, Nafees Hassan
- 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
-
1 downloads this week
-
1 downloads this month
-
192 downloads total
-
- Score:
- 2.2
- Short URL:
- qscript.dub.pm