CUBA
CUBA LANGUAGE IS JUST FOR ALIVE
View Demo
.
Report Bug
.
Request Feature
Usage
> cuba "<path-to-cbo-file>"
> cuba.exe "<path-to-cbo-file>"
> cuba "somefile.cbo"
ps:
'.cb' file is not supported
'.cbo' file is supported only for doctype: 'cuba_object'
Syntax
For example functions defined like:
tom add // add 2 numbers
type iew // return type
argc 2 // argument count
cast [ 0, 0 ] // cast arg to type (not implemented)
arg [ iew, iew ] // argument types
name [ i1, i2 ] // argument name
begin // start of function inner
push i1 // push arg 'i1' to stack
push i2 // push arg 'i2' to stack
int add // use integer operation 'add' for 2 last number int stack
ret lst // return last element of stack
pop 3 // free pushed elements
end // end of function inner
In begin-end statement
push <arg> // push element into stack
pop <count> // remove elements of stack by last
int <type> // type is 'add | mult | div | sub'
call <name> // call some function use stack as args
ret <value> // return value (push after complete to stack)
var <name> // declare template variable
mov <from> <to> // put 'from' to 'to'
svan9 in 2024©️ v1.0.0.01