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

Basic Syntax

Whitespace

Whitespace is not significant in Aranya Policy Language. Whitespace is any sequence of spaces, tabs, and newlines (which includes \n, \r\n, and \r).

Comments

Comments are C99-style, supporting both block comments(/* */) and line comments (//). Block comments do not nest.

/* This is a block comment
   It can span multiple lines
 */
function foo() {
    // This is a line comment
    let x = query Foo[]=>{x: 3}
}

Identifiers

Identifiers are the names of items in the language - commands, actions, variables, etc. An identifier must start with an ASCII alphabetic character, followed by zero or more ASCII alphanumeric characters or underscore.

Reserved words

Identifiers cannot use names defined by the language, including types (int, string, etc.), top-level declarations (command, emit, etc.), statements (check, let, etc.), and expressions (query, if, etc.).