an interpreted high level programming language built on typescript with 0 dependencies, made for educational purposes.
your best bet to get the latest version is always to clone source and run using bun through the following commands
git clone https://github.com/hexxt-git/BBEE
cd BBEE
bun install
you can also find releases in the github repository here. these releases have no dependencies and can be ran on any computer
after installation run the cli with the help option to list all possible actions. you should use interpret
option to run a program file which should be noted by the .bbee file extension
bun . interpret ./example.bbee
./bbee-linux interpret ./example.bbee
for light testing and learning purposes it is great to use a REPL environment. which stands for Read Evaluate Print Repeat. there are also options you can check through the help command
bun . interactive # from source
./bbee-linux interactive # from release
the best way to do this is to jump into the source code and try running and altering some of the examples in the examples folder
the language is dynamically typed with support for advanced syntax such as functions, loops, if and else blocks and ternary operators.
note that everything is an expression in this language so you must link multiple expressions together through the comma operator ,
or ;
.
- declaring variables and constants
mut name = "HEXXT"
const PI = 3.1415
- unary operations
!a
- binary operations
x + 5 * 3
a > b && a > c
- ternary operations
condition ? a : b
- if statements (else is optional)
if (x > y) { success_expression } else { failure_expression }
- loops
for (condition) { expression }
- declaration
const myFunction = func (input1, input2) => { function_body }
- function calls
myFunction@(input1, input2)
- there are some preloaded functions such as
print
println
andrandom
you can call them as normal functions but they run natively