Hades reserves a set of identifiers as keywords that carry fixed syntactic meaning and cannot be used as variable or function names. They are case-sensitive:Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ToberlerOhn/hades/llms.txt
Use this file to discover all available pages before exploring further.
int is a type hint keyword, but Int would be treated as a plain identifier. The sections below cover every keyword in the language, grouped by the role it plays.
Type Hints
Type hints appear in variable declarations, function parameters, and return types. Every variable must carry a type hint at the point of declaration; Hades enforces these at runtime.Type hints do not perform implicit conversion. Assigning a value of the wrong type raises an
InterpreterError. Use explicit casting if a conversion is needed.int
Declares a variable that holds a whole-number integer value.
float
Declares a variable that holds a floating-point (decimal) value.
bool
Declares a variable that holds a boolean value (TRUE or FALSE).
str
Declares a variable that holds a string. String literals are delimited with single quotes ('). Escape sequences \n, \t, and \\ are supported.
nothing
Declares a variable with no initial value. A nothing variable holds the nothing value (equivalent to null/None in other languages). It is the only type hint that does not require an initializer.
list
Declares a mutable ordered list. Elements are enclosed in square brackets and separated by commas. Individual elements are accessed with the -> index operator.
Literals
TRUE / FALSE
Boolean literal values. Both are uppercase. They evaluate directly to the Hades bool type.
Control Flow
Control-flow keywords govern how execution branches and loops.if / else
Conditional branching. The condition must be wrapped in parentheses. Any number of else if chains may follow, with an optional trailing else.
while
Evaluates a condition before each iteration. The loop body runs zero or more times.
do … while
Executes the body first, then checks the condition. Guarantees at least one execution.
for
A traditional C-style loop with an initializer, condition, and update expression, all separated by semicolons.
for … in
Iterates over every element of a list or every character of a str. The loop variable receives a type hint that Hades enforces on each iteration.
in
Used as a binary comparison operator to test membership. Returns TRUE if the left-hand value is found inside the right-hand list or string. Also used syntactically inside for-in loop headers (see above).
next
When implemented, next will skip the remainder of the current loop body and jump to the next iteration. In a for loop, the update expression (i++) will still run. In a while loop, execution will resume at the condition check.
break
When implemented, break will exit the innermost enclosing loop immediately, skipping any remaining iterations.
_goTo and Labels (LABEL:)
When implemented, _goTo will unconditionally transfer execution to a named label defined elsewhere in the same scope. Labels would be identifiers followed by a colon (:). This is a low-level control mechanism — prefer loops and functions for most use cases.
Functions
func
Declares a named function. The signature specifies parameter names with their type hints, and => is followed by the return type hint. The body is enclosed in braces.
nothing as the return type:
=> (Return)
=> is a token symbol (not a string keyword) recognised by the lexer as RIGHT_DOUBLE_ARROW. It plays two distinct roles depending on where it appears: in a function signature it separates the parameter list from the return type hint; inside a function body it acts as a return statement that evaluates and returns the given expression, then exits the function.
nothing-returning function, write => nothing:
Classes
Class syntax is defined in the grammar and token set. Full runtime support for classes is under active development.
class
Declares a class — a template for objects that can hold data fields and methods.
creator
Defines the constructor of a class, called automatically when an instance is created. The creator always shares the same name as the class. The first parameter, conventionally named me, represents the instance being constructed.
method
Defines an instance method on a class. Like creators, the first parameter is the instance reference (me), and my is used to access instance fields.
operator
Allows a class to overload a built-in operator for its instances. The operator symbol follows the keyword.
my
A special qualifier used inside creator, method, and operator blocks to access instance variables and methods of the current object — analogous to this in C++ or self in Python.