Language reference

every statement ends with bro. block-opening statements end with bro too. blocks close with end bro.

Statements

WhatBrolang
Variable declarationsigma x = 10 bro
Assignmentx = x + 1 bro
Function declarationrizz add(a, b) bro ... end bro
Returngyatt a + b bro
While loopskibidi x > 0 bro ... end bro
If / elseif x > 0 bro ... else bro ... end bro
Logical NOTbruh x
Commentbrainrot this is ignored, also // and #

Values

sigma n = 6_7 bro            # number, equals 67
sigma s = "locked in" bro    # string
sigma b = true bro            # bool
sigma arr = [1, 2, 3] bro     # array
sigma nothing = null bro      # the void

Truthiness: false, 0, "", null, and empty arrays are falsy. Everything else is truthy.

Operators

CategoryOperators
Arithmetic+ - * / %, unary -
Comparison> >= < <= == !=
Logicaland, or (short-circuit), bruh (not)

+ adds numbers, or concatenates when either side is a string. Division or modulo by zero raises a runtime error (bro is cooked).

Keywords

KeywordMeaning
sigmadeclare a variable
rizzdeclare a function; as an expression, rizz(...) calls the string-conversion builtin
gyattreturn
skibidiwhile loop
if / else / endconditionals and block closing
brostatement terminator
bruhlogical NOT
and / orlogical operators
brainrotline comment
nullthe void
true, falsethe truth
based, no_cap, bet, Walso true
cringe, cap, Lalso false

Functions

rizz fib(n) bro
    if n <= 1 bro
        gyatt n bro
    end bro
    gyatt fib(n - 1) + fib(n - 2) bro
end bro

print(fib(10)) bro   # 55

Functions are not first-class values yet; they live in a function table and are called by name. Recursion works. Each call gets its own scope, and assigning an outer variable mutates it in place.

The REPL persists variables and functions between lines and keeps prompting until you close open blocks:
bro> sigma x = 10 bro
bro> print(x) bro
10
bro> exit bro
later bro