Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Keywords

Reserved words and reserved route names in public Cambrian programs. A reserved word can’t be used as an identifier (parameter, route, member, let name, …): rename from → sender, record → log, deploy → setup, and so on.

Keyword / nameUse
entityDeclare an entity
externextern entity foreign surface
routes / routeRoute block / extern route stub
view / init / private / acceptRoute modifiers
pureRoute modifier or start of pure fn
fnSecond word of pure fn
receive / fallbackReserved route names on EVM (Receive and Fallback); not keywords
where / from / throwPreconditions / sender check / failure
returnReturn from a route
callInvoke a private route from an action list; also a test step
deployDeploy another entity
emitEmit an event
event / errorDeclarations
indexedEvent parameter indexing (EVM)
library / using / forLibraries, using Lib for T, expression/action for
const / type / record / enumDeclarations
macroEntity macros (@name())
match / if / elseControl flow
let / varBindings (var for capturing ~> returns)
inMember transforms; for x in …; fuzz ranges p in lo..hi
asCasts (x as u64)
true / falseBoolean literals
some / noneOption constructors
arrayArray literal array(a, b, c)
identityIdentity member marker
withSend / deploy options; test and property initial state
import / useFile import (import "./…" or bare import "token/core.cam") / namespace (use …)
address_ofaddress_of Entity(args) — predicted CREATE2 address
solidity_import@solidity_import("…") on an extern entity
test / property / fuzz / invariantTesting (fuzz { … } is a property instance)
expect / assume / bound / ctx / skipTest / property vocabulary (skip from, skip if)
track / derived / exclude / selectors / advanceTimeInvariant vocabulary
cam_encode / effectsReserved by the test grammar

check, action and senders are invariant keywords but are contextual: they can still be used as ordinary identifiers.

accept has no runtime effect on EVM or Lean (payability is inferred), so it produces warning E05 on a regular route. accept receive() is exempt: there accept is required (V40).

The namespace prefixes msg::, sys:: and trace:: are single tokens; std:: and evm:: are ordinary namespace paths.

Operators such as ~>, ^, =>, &&, ||, +% are listed under Operator Precedence.