kabel/examples/everything.kab

23 lines
536 B
Plaintext

# File showing examples of Kabel syntax
# Function/procedure definition
# 'using', 'and', and the commas should be lexed out because they don't mean
# anything However, they should be required nonetheless for the sake of
# clarity and consistency.
# ^^ perhaps? leave in if it's useful at parser
to myFunction using r, x, and p:
# Hoisting and declaration is implicit
n = 5;
_7 = 6;
_kt_hr = "string literal!";
# OOP-ish-ly:
# g = 7 + t.x.find(n, k, g+5, p) + 6;
g = (t's x: find using n, k, g + 5, p) + 6;
for module in p: