A Simple Scripting Language.
For last stable version, see v0.7.4
QScript is currently under development, and being redesigned under a new specification, see spec/spec.md.
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
To get started on using QScript, see the following documents:
spec/syntax.md
- language specificationexamples/
- Contains some scripts showing how to write scripts. // TODO write these
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=bin -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
// Most of these are not yet implemented
- Static typed
- Dynamic arrays
- Templates
- Conditional Compilation
- Compile Time Function Execution
- First class Functions
- Lambda Functions
- Function overloading
- Operator overloading
- Reference Data Types
- Structs
- Enums
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!");
}