DevScript Logo by Sanatan Choudhary
- Comment
- Literal types: int, bool, string
- Expression evaluation
- Variable Declaration and initialization
- Higher level function
- If-Else Expression
- Builtin len, print & println functions
- REPL
- Run
.ds
File
Run make build
to build the executable.
If Golang is installed on your system, build using go build
command.
Create a new .ds
file and write the following code.
var a = 10;
var b = 5;
var add = func(x, y) {
return x + y;
}
var sub = func(x, y) {
return x - y;
}
var operation = func(x, y, fn) {
return fn(x,y);
}
var result = operation(a, b, add);
func addition(x, y) {
return x + y;
}
if (result == addition(a, b)) {
print("The Result is:");
println(result);
} else {
print("Wrong Result");
}
Refer CONTRIBUTING.md
file for more information about the contribution and suggestions.