1.2.9 • Published 3 years ago
waran v1.2.9
waran
about the project
credits
example waran program
import @io
import @math
class Program {
method static main() {
hello := "hello"
waran := "waran!"
std_out(hello waran)
for(i := 0 | i <= 10 | i++) {
## skip the 5th iteration
if (i == 5) {
continue
}
std_out(i)
}
while(true) {
if (counter > 10) {
break
}
std_out(counter)
counter++
}
my_array := ["string value" 4738 -21.564 true]
std_out(my_array[2])
}
}
Program.main()
table of contents
Installation
npm i -g waran
or
yarn add -g waran
Project structure
wrn init
this command will create a few folders / files:
- .waran folder
- ast
- build
- ast
- wrn_proj.json
- describes the behaviour of the compiler.
- project_info - contains general information about the waran project
- dirs - contains paths to directories used by the compiler
- ast_dir
- location of abstract syntax tree (ast) files
- wrn_proj_dir
- location of the .waran directory (contains asts and build)
- src_dir
- location of the working direcotry (contains your source code)
- build
- location of the directory that contains built waran code
- ast_dir
- describes the behaviour of the compiler.
- src folder * current working directory + location can be modified in wrn_proj.json configuration file
Compiling code
wrn compile < .wr file location >
this will produce a .js counterpart in the .waran/build directory unless the behaviour was modified in wrn_proj.json
Running code
wrn exec < path to .js file >
.js files can be found in the .waran/build directory with the same name as their .wr counterparts
1.2.9
3 years ago
1.2.8
3 years ago
1.2.7
3 years ago
1.2.6
3 years ago
1.2.5
3 years ago
1.2.4
3 years ago
1.2.3
3 years ago
1.2.2
3 years ago
1.2.1
3 years ago
1.2.0
3 years ago
1.1.9
3 years ago
1.1.8
3 years ago
1.1.7
3 years ago
1.1.6
3 years ago
1.1.5
3 years ago
1.1.4
3 years ago
1.1.3
3 years ago
1.1.2
3 years ago
1.1.1
3 years ago
1.1.0
3 years ago
1.0.9
3 years ago
1.0.8
3 years ago
1.0.7
3 years ago
1.0.6
3 years ago
1.0.5
3 years ago
1.0.3
3 years ago
1.0.2
3 years ago
1.0.0
3 years ago