Arobase is a simple programming language, current implementation is a compiler written in C
The language is meant to be easy to use and easy to learn!
$ git clone https://github.com/njord0/Arobase
$ cd Arobase/arobase
$ make
$ make install
Here a sample code which prints fibonacci(10), copy/paste it to a file named source.aro
fn fibonacci(a: integer) : integer
{
if (a == 0)
{
return 0;
}
@ this is a comment
if (a <= 2) @ 1 or 2
{
return 1;
}
return fibonacci(a-2) + fibonacci(a-1);
}
@@ This is a comment on multiple lines
'main' function is needed in any program.
@@
fn main() : void
{
print fibonacci(10);
}
Compilation :
$ arobase -s source.aro -o out
For more details see the --help
option:
$ arobase --help
Usage: ./arobase -s source_file [options]
Options:
-o Output file name, default is 'out'
--no-start Tell the compiler to not add a '_start' function
--assembly Output assembly instead of executable
You can find documentation and tutorial here