Keywords List
A list of LuneScript keywords and links to their related documentation.
A-G
- abstract: Definition of abstract classes and abstract methods
- alge: Definition of Algebraic Data Types (ADTs)
- advertise: Delegation (exposing methods of a member)
- apply: Loop using an iterator
- async: Definition of asynchronous processing (experimental)
- break: Exit from switch/while/for loops
- case: Branch in switch/match statements
- class: Definition of a class
- __clone: Deep copy of an object
- default: Default handling for switch/match/unwrap statements
- else: Handling when conditions are not met in if-related constructs
- elseif: Additional condition in if statements
- enum: Definition of an enumeration type
- __Er: Built-in type for holding detailed error information
- extend: Inheritance of classes, implementation of interfaces
- fn: Definition of a function
- for: Numerical range loop
- foreach: Iterative processing of collections
- form: Definition of a function type
H-N
- if: Conditional branching
- if!: Conditional branching with Nil check
- import: Importing a module
- __init: Constructor
- interface: Definition of an interface
- let: Variable declaration
- let!: Declaration of a non-nil variable (block executes or error if nil)
- macro: Definition of a macro
- Mapping: Definition of mutual conversion information between a class and a Map
- match: Pattern matching
- module: Type definition for an external module
- mut: Declaration of a mutable variable (mutable attribute)
- new: Creation of a class instance
O-U
- override: Redefinition of a method in a subclass
- __pipe: Method for pipeline processing
- pri: private (non-public) member
- pro: protected (limited to subclasses) member
- provide: Specification of exposed items in a module
- pub: public (externally public) member
- repeat: Post-condition loop (repeat-until)
- require: Loading an external module
- __Ret: Standard built-in type for returning results (Success/Failure)
- return: Return value from a function
- __run: Entry point method for asynchronous processing
- self: Reference to the current instance
- static: Declaration of a static member/function
- subfile: Splitting of module files
- super: Reference to the parent class
- switch: Conditional branching based on variable values
- tuple: Definition of a tuple type
- unwrap: Forced unwrapping of a Nilable type (runtime error if nil)
- unwrap!: Safe Nil check and assignment
V-Z and Symbols
- when: Guard condition on successful unwrap
- when!: Nil check branching for an existing variable
- while: Conditional loop
- ! (operator): Error delegation / Nilable type specification
- $ (operator): Accessing accessors (getter/setter)
- @@ / @@@: Type casting (Forced / Dynamic)
- _ (wildcard): Matching any value in match statements, etc.
- ,, / ,,, (operator): Code expansion within macros
- ... (operator): Variable length arguments
- # (operator): Get length of strings or lists