Language Syntax¶
Placeholders¶
Placeholders are defined with curly braces {}
and replaced by corresponding parameter values:
Hello, {name}!
Variables¶
Assignment¶
@variable = value
Reference¶
@variable
List/Dictionary Access¶
@list[0]
@dict["key"]
@dict[key]
Functions¶
Functions are called using the :
prefix followed by the function name and arguments in parentheses:
:function(arg1, arg2)
Comments¶
Comments start with \\
or #
:
\\ This is a comment
# This is also a comment
Escaping¶
To escape special characters, use \\
:
@name = John
\\@name will not be interpreted
@name will be interpreted as John
To escape commas in function arguments, use \\,
:
:list(item1, item2\, with comma)
Operators¶
Mathematical¶
- Addition:
+
- Subtraction:
-
- Multiplication:
*
- Division:
/
- Integer division:
//
- Modulo:
%
- Exponentiation:
**
Comparison¶
- Equal:
==
- Not equal:
!=
- Greater than:
>
- Less than:
<
- Greater than or equal:
>=
- Less than or equal:
<=
Logical¶
- And:
and
- Or:
or
- Not:
not