Skip to content

Keywords

q64 reserves the following 54 keywords. This list is generated directly from the compiler’s lexer, so it never drifts from what the parser actually recognizes.

KeywordDescriptionToken kind
actorDeclare an actor — an isolated unit of concurrent state with message handlers.KW_ACTOR
asBind an import under a different name (import foo as bar).KW_AS
breakExit the innermost loop, optionally yielding a value.KW_BREAK
catchHandle an error or a failed task.KW_CATCH
constA compile-time constant binding.KW_CONST
continueSkip to the next iteration of the innermost loop.KW_CONTINUE
drawA screen’s declarative view block; its statements are widget calls.KW_DRAW
dynDynamic dispatch over a face used as a type (dyn Face).KW_DYN
effectDeclare an effect or an effect relationship (spec/effects.md).KW_EFFECT
elseThe alternative branch of an if.KW_ELSE
enumDeclare an enum (sum type) with named variants.KW_ENUM
faceDeclare a face — q64’s interface/trait for polymorphism (spec/faces.md).KW_FACE
falseThe boolean literal false.KW_FALSE
fitImplement a face for a type (fit T : Face).KW_FIT
fnDeclare a function.KW_FN
forIterate over a sequence (for x in xs).KW_FOR
forallUniversal quantifier used in laws and generic reasoning.KW_FORALL
fromSource clause of a re-export.KW_FROM
graphA stream graph — connected dataflow stages (spec/streams.md).KW_GRAPH
handleDeclare an actor’s handler for a message.KW_HANDLE
ifA conditional.KW_IF
importBring a module or selected names into scope.KW_IMPORT
inThe by-value in parameter mode; also the for x in xs separator.KW_IN
lawState an algebraic law a fit must satisfy (property-checked).KW_LAW
letAn immutable local binding.KW_LET
loopAn unconditional loop (exit with break).KW_LOOP
matchPattern-match a value against arms.KW_MATCH
moveThe move parameter mode — transfer ownership.KW_MOVE
onAn event handler in a screen (on press(…) { … }).KW_ON
outThe out parameter mode — a write-only output parameter.KW_OUT
panicAbort the current computation with an error.KW_PANIC
pubMark an item public — part of the qube’s exported surface.KW_PUB
refA reference type (ref T) or the ref parameter mode.KW_REF
regionA memory region — the unit of allocation lifetime (spec/memory.md).KW_REGION
returnReturn a value from a function.KW_RETURN
scopeA structured-concurrency scope that bounds spawned tasks.KW_SCOPE
screenThe QView frontend DSL: state, a draw block, and on handlers.KW_SCREEN
selectWait on multiple channel operations, taking the first ready.KW_SELECT
selfThe receiver value of a method.KW_SELF
SelfThe enclosing / implementing type.KW_SELF_TYPE
spawnStart a concurrent task within a scope.KW_SPAWN
stateA reactive state binding (in a screen or actor).KW_STATE
structDeclare a struct (record type).KW_STRUCT
tellSend a fire-and-forget message to an actor.KW_TELL
trapRaise an unrecoverable trap.KW_TRAP
trueThe boolean literal true.KW_TRUE
tryPropagate an error from a Result (early-return on failure).KW_TRY
typeDeclare a type alias (type Name = …).KW_TYPE
useRe-export names from a module (pub use …).KW_USE
varA mutable local binding.KW_VAR
whereAttach bounds to generic parameters.KW_WHERE
whileA loop that runs while a condition holds.KW_WHILE
with_capabilitiesRun a block with a narrowed capability set (grant / deny).KW_WITH_CAPABILITIES
NoneThe Option None value / pattern.KW_NONE