
...

h1. Contents
{toc:style=disc|indent=20px}
h1. Notation
This section informally explains the grammar notation used below.
h2. Symbols and naming
_Terminal symbol_ names start with an uppercase letter, e.g. *SimpleName*
_Nonterminal symbol_ names start with lowercase letter, e.g. *kotlinFile*
Each _production_ starts with a colon (*:*)
_Symbol definitions_ may have many productions and are terminated by a semicolon (*;*)
Symbol definitions may be prepended with _attributes_, e.g. {{start}} attribute denotes a start symbol
h2. EBNF expressions
Operator {color:blue}*|*{color} denotes _alternative_
Operator {color:blue}*\**{color} denotes _iteration_ (zero or more)
Operator {color:blue}*+*{color} denotes _iteration_ (one or more)
Operator {color:blue}*?*{color} denotes _option_ (zero or one)
alpha{color:blue}*{*{color}beta{color:blue}*}*{color} denotes a nonempty _beta_-separated list of _alpha_'s
h1. Semicolons
[Kotlin] provides "semicolon inference": syntactically, subsentences (e.g., statements, declarations etc) are separated by
the pseudo-token [SEMI|#SEMI], which stands for "semicolon or newline". In most cases, there's no need for semicolons in
[Kotlin] code.
h1. Syntax

...

*Relevant pages:* [Namespaces]
{{start}}
{anchor:kotlinFile}*kotlinFile*
{color:blue}*:*{color} [#preamble] [#toplevelObject]{color:blue}*\**{color}
;
{{start}}
{anchor:script}*script*
{color:blue}*:*{color} [#preamble] [#expression]{color:blue}*\**{color}
;
{anchor:preamble}\[{color:grey}Used by [#script], [#kotlinFile]{color}\]
*preamble*
{color:blue}*:*{color} [#packageHeader]{color:blue}*?*{color} [#import]{color:blue}*\**{color}
;
{anchor:packageHeader}\[{color:grey}Used by [#preamble]{color}\]
*packageHeader*
{color:blue}*:*{color} [#modifiers] {color:green}*{{"package"}}*{color} [#SimpleName]{color:blue}*\{*{color}{color:green}*{{"."}}*{color}{color:blue}*\}*{color} [#SEMI]{color:blue}*?*{color}
;
{anchor:import}\[{color:grey}Used by [#preamble], [#package]{color}\]
*import*
{color:blue}*:*{color} {color:green}*{{"import"}}*{color} {color:blue}*\(*{color}{color:green}*{{"package"}}*{color} {color:green}*{{"."}}*{color}{color:blue}*\)*{color}{color:blue}*?*{color} [#SimpleName]{color:blue}*\{*{color}{color:green}*{{"."}}*{color}{color:blue}*\}*{color} {color:blue}*\(*{color}{color:green}*{{"."}}*{color} {color:green}*{{"\*"}}*{color} {color:blue}*|*{color} {color:green}*{{"as"}}*{color} [#SimpleName]{color:blue}*\)*{color}{color:blue}*?*{color} [#SEMI]{color:blue}*?*{color}
;
bq. See [Imports|Namespaces#Imports]
{anchor:toplevelObject}\[{color:grey}Used by [#package], [#kotlinFile]{color}\]
*toplevelObject*
{color:blue}*:*{color} [#package]
{color:blue}*:*{color} [#class]
{color:blue}*:*{color} [#object]
{color:blue}*:*{color} [#function]
{color:blue}*:*{color} [#property]
{color:blue}*:*{color} [#typedef]
;
{anchor:package}\[{color:grey}Used by [#toplevelObject]{color}\]
*package*
{color:blue}*:*{color} {color:green}*{{"package"}}*{color} [#SimpleName]{color:blue}*\{*{color}{color:green}*{{"."}}*{color}{color:blue}*\}*{color} {color:green}*{{"\{"}}*{color}
[#import]{color:blue}*\**{color}
[#toplevelObject]{color:blue}*\**{color}
{color:green}*{{"}"}}*{color}
;
bq. See [Namespaces]
{{undocumented}}
{anchor:typedef}\[{color:grey}Used by [#memberDeclaration], [#declaration], [#toplevelObject]{color}\]
*typedef*
{color:blue}*:*{color} [#modifiers] {color:green}*{{"type"}}*{color} [#SimpleName] {color:blue}*\(*{color}[#typeParameters] [#typeConstraints]{color:blue}*\)*{color}{color:blue}*?*{color} {color:green}*{{"="}}*{color} [#type]
;
h2. Classes

...

bq. See [Classes and Inheritance]
{anchor:class}\[{color:grey}Used by [#memberDeclaration], [#declaration], [#toplevelObject]{color}\]
*class*
{color:blue}*:*{color} [#modifiers] {color:blue}*\(*{color}{color:green}*{{"class"}}*{color} {color:blue}*|*{color} {color:green}*{{"trait"}}*{color}{color:blue}*\)*{color} [#SimpleName]
[#typeParameters]{color:blue}*?*{color}
[#modifiers] {color:blue}*\(*{color}{color:green}*{{"("}}*{color} [#functionParameter]{color:blue}*\{*{color}{color:green}*{{","}}*{color}{color:blue}*\}*{color} {color:green}*{{")"}}*{color}{color:blue}*\)*{color}{color:blue}*?*{color}
{color:blue}*\(*{color}{color:green}*{{":"}}*{color} [#annotations] [#delegationSpecifier]{color:blue}*\{*{color}{color:green}*{{","}}*{color}{color:blue}*\}*{color}{color:blue}*\)*{color}{color:blue}*?*{color}
[#typeConstraints]
{color:blue}*\(*{color}[#classBody]{color:blue}*?*{color} {color:blue}*|*{color} [#enumClassBody]{color:blue}*\)*{color}
;
{anchor:classBody}\[{color:grey}Used by [#objectLiteral], [#enumEntry], [#class], [#object]{color}\]
*classBody*
{color:blue}*:*{color} {color:blue}*\(*{color}{color:green}*{{"\{"}}*{color} [#memberDeclaration] {color:green}*{{"}"}}*{color}{color:blue}*\)*{color}{color:blue}*?*{color}
;
{anchor:delegationSpecifier}\[{color:grey}Used by [#objectLiteral], [#class], [#object]{color}\]
*delegationSpecifier*
{color:blue}*:*{color} [#constructorInvocation]
{color:blue}*:*{color} [#userType]
{color:blue}*:*{color} [#explicitDelegation]
;

...
{anchor:explicitDelegation}\[{color:grey}Used by [#delegationSpecifier]{color}\]
*explicitDelegation*
{color:blue}*:*{color} [#userType] {color:green}*{{"by"}}*{color} [#expression]
;
{anchor:typeParameters}\[{color:grey}Used by [#enumEntry], [#class], [#property], [#typedef], [#function]{color}\]
*typeParameters*
{color:blue}*:*{color} {color:green}*{{"<"}}*{color} [#typeParameter]{color:blue}*\{*{color}{color:green}*{{","}}*{color}{color:blue}*\}*{color} {color:green}*{{">"}}*{color}

...

;
{anchor:typeParameter}\[{color:grey}Used by [#typeParameters]{color}\]
*typeParameter*
{color:blue}*:*{color} [#modifiers] [#SimpleName] {color:blue}*\(*{color}{color:green}*{{":"}}*{color} [#userType]{color:blue}*\)*{color}{color:blue}*?*{color}
;
bq. See [Generic classes|Generics#Generic classes]
{anchor:typeConstraints}\[{color:grey}Used by [#enumEntry], [#class], [#property], [#typedef], [#function]{color}\]
*typeConstraints*
{color:blue}*:*{color} {color:blue}*\(*{color}{color:green}*{{"where"}}*{color} [#typeConstraint]{color:blue}*\{*{color}{color:green}*{{","}}*{color}{color:blue}*\}*{color}{color:blue}*\)*{color}{color:blue}*?*{color}

...

;
{anchor:typeConstraint}\[{color:grey}Used by [#typeConstraints]{color}\]
*typeConstraint*
{color:blue}*:*{color} [#annotations] [#SimpleName] {color:green}*{{":"}}*{color} [#type]
{color:blue}*:*{color} [#annotations] {color:green}*{{"class"}}*{color} {color:green}*{{"object"}}*{color} [#SimpleName] {color:green}*{{":"}}*{color} [#type]
;
bq. See [Generic constraints|Generics#Generic constraints]
h3. Class members

...
{anchor:memberDeclaration}\[{color:grey}Used by [#classBody]{color}\]
*memberDeclaration*
{color:blue}*:*{color} [#classObject]
{color:blue}*:*{color} [#object]
{color:blue}*:*{color} [#constructor]
{color:blue}*:*{color} [#function]
{color:blue}*:*{color} [#property]

...

{color:blue}*:*{color} [#class]
{color:blue}*:*{color} [#typedef]
{color:blue}*:*{color} [#anonymousInitializer]
;
{anchor:anonymousInitializer}\[{color:grey}Used by [#memberDeclaration]{color}\]
*anonymousInitializer*
{color:blue}*:*{color} [#block]
;
{anchor:classObject}\[{color:grey}Used by [#memberDeclaration]{color}\]
*classObject*
{color:blue}*:*{color} [#modifiers] {color:green}*{{"class"}}*{color} [#object]
;
bq. See [Class objects|Classes and Inheritance#Class objects]
{{undocumented}}
{anchor:constructor}\[{color:grey}Used by [#memberDeclaration]{color}\]
*constructor*
{color:blue}*:*{color} [#modifiers] {color:green}*{{"this"}}*{color} [#valueParameters] {color:blue}*\(*{color}{color:green}*{{":"}}*{color} [#initializer]{color:blue}*\{*{color}{color:green}*{{","}}*{color}{color:blue}*\}*{color}{color:blue}*\)*{color} [#block]{color:blue}*?*{color}
;
{anchor:valueParameters}\[{color:grey}Used by [#enumEntry], [#function], [#constructor]{color}\]
{anchor:valueParameters}\[{color:grey}Used by [#function]{color}\]
*valueParameters*
{color:blue}*:*{color} {color:green}*{{"("}}*{color} [#functionParameter]{color:blue}*\{*{color}{color:green}*{{","}}*{color}{color:blue}*\}*{color}{color:blue}*?*{color} {color:green}*{{")"}}*{color}

...

;
{anchor:functionParameter}\[{color:grey}Used by [#valueParameters], [#class]{color}\]
*functionParameter*
{color:blue}*:*{color} [#modifiers] {color:blue}*\(*{color}{color:green}*{{"val"}}*{color} {color:blue}*|*{color} {color:green}*{{"var"}}*{color}{color:blue}*\)*{color}{color:blue}*?*{color} [#parameter] {color:blue}*\(*{color}{color:green}*{{"="}}*{color} [#expression]{color:blue}*\)*{color}{color:blue}*?*{color}
;
{anchor:initializer}\[{color:grey}Used by [#enumEntry], [#constructor]{color}\]
*initializer*
{color:blue}*:*{color} [#annotations] {color:green}*{{"this"}}*{color} [#valueArguments]

...

{color:blue}*:*{color} [#annotations] [#constructorInvocation]
;
{anchor:block}\[{color:grey}Used by [#catchBlock], [#anonymousInitializer], [#functionBody], [#try], [#finallyBlock], [#constructor]{color}\]
*block*
{color:blue}*:*{color} {color:green}*{{"\{"}}*{color} [#statements] {color:green}*{{"}"}}*{color}

...

;
{anchor:function}\[{color:grey}Used by [#memberDeclaration], [#declaration], [#toplevelObject]{color}\]
*function*
{color:blue}*:*{color} [#modifiers] {color:green}*{{"fun"}}*{color} [#typeParameters]{color:blue}*?*{color}
{color:blue}*\(*{color}[#type] {color:green}*{{"."}}*{color} {color:blue}*|*{color} [#annotations]{color:blue}*\)*{color}{color:blue}*?*{color}
[#SimpleName]
[#typeParameters]{color:blue}*?*{color} [#valueParameters] {color:blue}*\(*{color}{color:green}*{{":"}}*{color} [#type]{color:blue}*\)*{color}{color:blue}*?*{color}
[#typeConstraints]
[#functionBody]{color:blue}*?*{color}
;
{anchor:functionBody}\[{color:grey}Used by [#getter], [#setter], [#function]{color}\]
*functionBody*
{color:blue}*:*{color} [#block]
{color:blue}*:*{color} {color:green}*{{"="}}*{color} [#expression]
;
{anchor:variableDeclarationEntry}\[{color:grey}Used by [#for], [#property], [#multipleVariableDeclarations]{color}\]
*variableDeclarationEntry*
{color:blue}*:*{color} [#SimpleName] {color:blue}*\(*{color}{color:green}*{{":"}}*{color} [#type]{color:blue}*\)*{color}{color:blue}*?*{color}
;
{anchor:multipleVariableDeclarations}\[{color:grey}Used by [#for], [#property]{color}\]
*multipleVariableDeclarations*
{color:blue}*:*{color} {color:green}*{{"("}}*{color} [#variableDeclarationEntry]{color:blue}*\{*{color}{color:green}*{{","}}*{color}{color:blue}*\}*{color} {color:green}*{{")"}}*{color}
;
{anchor:property}\[{color:grey}Used by [#memberDeclaration], [#declaration], [#toplevelObject]{color}\]
*property*
{color:blue}*:*{color} [#modifiers] {color:blue}*\(*{color}{color:green}*{{"val"}}*{color} {color:blue}*|*{color} {color:green}*{{"var"}}*{color}{color:blue}*\)*{color}
[#typeParameters]{color:blue}*?*{color} {color:blue}*\(*{color}[#type] {color:green}*{{"."}}*{color} {color:blue}*|*{color} [#annotations]{color:blue}*\)*{color}{color:blue}*?*{color}
[#SimpleName] {color:blue}*\(*{color}{color:green}*{{":"}}*{color} [#type]{color:blue}*\)*{color}{color:blue}*?*{color}
{color:blue}*\(*{color}[#multipleVariableDeclarations] {color:blue}*|*{color} [#variableDeclarationEntry]{color:blue}*\)*{color}
[#typeConstraints]
{color:blue}*\(*{color}{color:green}*{{"="}}*{color} [#expression] [#SEMI]{color:blue}*?*{color}{color:blue}*\)*{color}{color:blue}*?*{color}

...

{color:blue}*\(*{color}[#getter]{color:blue}*?*{color} [#setter]{color:blue}*?*{color} {color:blue}*|*{color} [#setter]{color:blue}*?*{color} [#getter]{color:blue}*?*{color}{color:blue}*\)*{color} [#SEMI]{color:blue}*?*{color}
;
bq. See [Properties and Fields]

...
{anchor:getter}\[{color:grey}Used by [#property]{color}\]
*getter*
{color:blue}*:*{color} [#modifiers] {color:green}*{{"get"}}*{color}
{color:blue}*:*{color} [#modifiers] {color:green}*{{"get"}}*{color} {color:green}*{{"("}}*{color} {color:green}*{{")"}}*{color} {color:blue}*\(*{color}{color:green}*{{":"}}*{color} [#type]{color:blue}*\)*{color}{color:blue}*?*{color} [#functionBody]
;
{anchor:setter}\[{color:grey}Used by [#property]{color}\]
*setter*
{color:blue}*:*{color} [#modifiers] {color:green}*{{"set"}}*{color}
{color:blue}*:*{color} [#modifiers] {color:green}*{{"set"}}*{color} {color:green}*{{"("}}*{color} [#modifiers] {color:blue}*\(*{color}[#SimpleName] {color:blue}*|*{color} [#parameter]{color:blue}*\)*{color} {color:green}*{{")"}}*{color} [#functionBody]
;
{anchor:parameter}\[{color:grey}Used by [#functionType], [#tupleType], [#setter], [#functionParameter]{color}\]
*parameter*
{color:blue}*:*{color} [#SimpleName] {color:green}*{{":"}}*{color} [#type]
;
{anchor:object}\[{color:grey}Used by [#memberDeclaration], [#declaration], [#toplevelObject], [#classObject]{color}\]
*object*
{color:blue}*:*{color} {color:green}*{{"object"}}*{color} [#SimpleName] {color:blue}*\(*{color}{color:green}*{{":"}}*{color} [#delegationSpecifier]{color:blue}*\{*{color}{color:green}*{{","}}*{color}{color:blue}*\}*{color}{color:blue}*\)*{color}{color:blue}*?*{color} [#classBody]{color:blue}*?*{color}
bq. See [Object expressions and Declarations]
h3. Enum classes

...

bq. See [Enum classes]
{anchor:enumClassBody}\[{color:grey}Used by [#class]{color}\]
*enumClassBody*
{color:blue}*:*{color} {color:green}*{{"\{"}}*{color} [#enumEntry]{color:blue}*\**{color} {color:green}*{{"}"}}*{color}
;
{anchor:enumEntry}\[{color:grey}Used by [#enumClassBody]{color}\]
*enumEntry*
{color:blue}*:*{color} [#modifiers] [#SimpleName] [#typeParameters]{color:blue}*?*{color} [#valueParameters]{color:blue}*?*{color} {color:blue}*\(*{color}{color:green}*{{":"}}*{color} [#initializer]{color:blue}*\{*{color}{color:green}*{{","}}*{color}{color:blue}*\}*{color}{color:blue}*\)*{color}{color:blue}*?*{color} [#typeConstraints] [#classBody]{color:blue}*?*{color}
{color:blue}*:*{color} [#modifiers] [#SimpleName] {color:blue}*\(*{color}{color:green}*{{":"}}*{color} [#initializer]{color:blue}*\{*{color}{color:green}*{{","}}*{color}{color:blue}*\}*{color}{color:blue}*\)*{color}{color:blue}*?*{color} [#classBody]{color:blue}*?*{color}
;
h2. Types

...

bq. See [Types]
{anchor:type}\[{color:grey}Used by [#simpleUserType], [#decomposerPattern], [#getter], [#tupleType], [#for], [#atomicExpression], [#property], [#typeArguments], [#typedef], [#function], [#functionLiteral], [#parameter], [#pattern], [#functionType], [#binding], [#typeConstraint]{color}\]
{anchor:type}\[{color:grey}Used by [#isRHS], [#simpleUserType], [#getter], [#tupleType], [#atomicExpression], [#property], [#typeArguments], [#typedef], [#functionLiteral], [#function], [#parameter], [#functionType], [#variableDeclarationEntry], [#typeConstraint]{color}\]
*type*
{color:blue}*:*{color} [#annotations] [#typeDescriptor]

...
{anchor:typeDescriptor}\[{color:grey}Used by [#nullableType], [#typeDescriptor], [#type]{color}\]
*typeDescriptor*
{color:blue}*:*{color} {color:green}*{{"("}}*{color} [#typeDescriptor] {color:green}*{{")"}}*{color}
{color:blue}*:*{color} [#selfType]
{color:blue}*:*{color} [#functionType]
{color:blue}*:*{color} [#userType]
{color:blue}*:*{color} [#tupleType]
{color:blue}*:*{color} [#nullableType]
;
{anchor:nullableType}\[{color:grey}Used by [#typeDescriptor]{color}\]
*nullableType*
{color:blue}*:*{color} [#typeDescriptor] {color:green}*{{"?"}}*{color}
{anchor:selfType}\[{color:grey}Used by [#typeDescriptor]{color}\]
*selfType*
{color:blue}*:*{color} {color:green}*{{"This"}}*{color}
;
{anchor:userType}\[{color:grey}Used by [#typeParameter], [#catchBlock], [#typeDescriptor], [#delegationSpecifier], [#constructorInvocation], [#explicitDelegation]{color}\]
*userType*
{color:blue}*:*{color} {color:blue}*\(*{color}{color:green}*{{"namespace"}}*{color} {color:green}*{{"."}}*{color}{color:blue}*\)*{color}{color:blue}*?*{color} [#simpleUserType]{color:blue}*\{*{color}{color:green}*{{"."}}*{color}{color:blue}*\}*{color}

...

;
{anchor:simpleUserType}\[{color:grey}Used by [#userType]{color}\]
*simpleUserType*
{color:blue}*:*{color} [#SimpleName] {color:blue}*\(*{color}{color:green}*{{"<"}}*{color} {color:blue}*\(*{color}[#optionalProjection] [#type] {color:blue}*|*{color} {color:green}*{{"\*"}}*{color}{color:blue}*\)*{color}{color:blue}*\{*{color}{color:green}*{{","}}*{color}{color:blue}*\}*{color} {color:green}*{{">"}}*{color}{color:blue}*\)*{color}{color:blue}*?*{color}
;
{anchor:optionalProjection}\[{color:grey}Used by [#simpleUserType]{color}\]
*optionalProjection*
{color:blue}*:*{color} [#varianceAnnotation]
;
{anchor:functionType}\[{color:grey}Used by [#typeDescriptor]{color}\]
*functionType*
{color:blue}*:*{color} {color:blue}*\(*{color}[#type] {color:green}*{{"."}}*{color}{color:blue}*\)*{color}{color:blue}*?*{color} {color:green}*{{"("}}*{color} {color:blue}*\(*{color}[#parameter] {color:blue}*|*{color} [#modifiers] [#type]{color:blue}*\)*{color}{color:blue}*\{*{color}{color:green}*{{","}}*{color}{color:blue}*\}*{color} {color:green}*{{")"}}*{color} {color:green}*{{"->"}}*{color} [#type]{color:blue}*?*{color}
;
{anchor:tupleType}\[{color:grey}Used by [#typeDescriptor]{color}\]
*tupleType*
{color:blue}*:*{color} {color:green}*{{"#"}}*{color} {color:green}*{{"("}}*{color} [#type]{color:blue}*\{*{color}{color:green}*{{","}}*{color}{color:blue}*\}*{color}{color:blue}*?*{color} {color:green}*{{")"}}*{color}
{color:blue}*:*{color} {color:green}*{{"#"}}*{color} {color:green}*{{"("}}*{color} [#parameter]{color:blue}*\{*{color}{color:green}*{{","}}*{color}{color:blue}*\}*{color} {color:green}*{{")"}}*{color}
;
h2. Control structures

...

bq. See [Control structures]
{anchor:if}\[{color:grey}Used by [#atomicExpression]{color}\]
*if*
{color:blue}*:*{color} {color:green}*{{"if"}}*{color} {color:green}*{{"("}}*{color} [#expression] {color:green}*{{")"}}*{color} [#expression] [#SEMI]{color:blue}*?*{color} {color:blue}*\(*{color}{color:green}*{{"else"}}*{color} [#expression]{color:blue}*\)*{color}{color:blue}*?*{color}
;
{anchor:try}\[{color:grey}Used by [#atomicExpression]{color}\]
*try*
{color:blue}*:*{color} {color:green}*{{"try"}}*{color} [#block] [#catchBlock]{color:blue}*\**{color} [#finallyBlock]{color:blue}*?*{color}
;
{anchor:catchBlock}\[{color:grey}Used by [#try]{color}\]
*catchBlock*
{color:blue}*:*{color} {color:green}*{{"catch"}}*{color} {color:green}*{{"("}}*{color} [#annotations] [#SimpleName] {color:green}*{{":"}}*{color} [#userType] {color:green}*{{")"}}*{color} [#block]
;
{anchor:finallyBlock}\[{color:grey}Used by [#try]{color}\]
*finallyBlock*
{color:blue}*:*{color} {color:green}*{{"finally"}}*{color} [#block]
;
{anchor:loop}\[{color:grey}Used by [#atomicExpression]{color}\]
*loop*
{color:blue}*:*{color} [#for]
{color:blue}*:*{color} [#while]
{color:blue}*:*{color} [#doWhile]
;
{anchor:for}\[{color:grey}Used by [#loop]{color}\]
*for*
{color:blue}*:*{color} {color:green}*{{"for"}}*{color} {color:green}*{{"("}}*{color} [#annotations] {color:blue}*\(*{color}{color:green}*{{"val"}}*{color} {color:blue}*|*{color} {color:green}*{{"var"}}*{color}{color:blue}*\)*{color}{color:blue}*?*{color} [#SimpleName] {color:blue}*\(*{color}{color:green}*{{":"}}*{color} [#type]{color:blue}*\)*{color}{color:blue}*?*{color} {color:green}*{{"in"}}*{color} [#expression] {color:green}*{{")"}}*{color} [#expression] {color:blue}*:*{color} {color:green}*{{"for"}}*{color} {color:green}*{{"("}}*{color} [#annotations] {color:blue}*\(*{color}{color:green}*{{"val"}}*{color} {color:blue}*|*{color} {color:green}*{{"var"}}*{color}{color:blue}*\)*{color}{color:blue}*?*{color} {color:blue}*\(*{color}[#multipleVariableDeclarations] {color:blue}*|*{color} [#variableDeclarationEntry]{color:blue}*\)*{color} {color:green}*{{"in"}}*{color} [#expression] {color:green}*{{")"}}*{color} [#expression]
;

...

{anchor:while}\[{color:grey}Used by [#loop]{color}\]
*while*
{color:blue}*:*{color} {color:green}*{{"while"}}*{color} {color:green}*{{"("}}*{color} [#expression] {color:green}*{{")"}}*{color} [#expression]
;
{anchor:doWhile}\[{color:grey}Used by [#loop]{color}\]
*doWhile*
{color:blue}*:*{color} {color:green}*{{"do"}}*{color} [#expression] {color:green}*{{"while"}}*{color} {color:green}*{{"("}}*{color} [#expression] {color:green}*{{")"}}*{color}
;
h2. Expressions

...

bq. See [Expressions]
h3. Precedence
||*Precedence*||Title||Symbols||
|Highest|Postfix|{{\+\+}}, {{\-\-}}, {{.}}, {{?.}}, {{?}}|
| |Prefix|{{-}}, {{\+}}, {{\+\+}}, {{\-\-}}, {{!}}, [{{@label}}|#LabelName], {{@}}, {{@@}} |
| |Type RHS|{{:}}, {{as}}, {{as?}} |
| |Multiplicative|{{*}}, {{/}}, {{%}} |
| |Additive|{{\+}}, {{-}} |
| |Range|{{..}} |
| |Infix function|[{{SimpleName}}|#SimpleName] |
| |Elvis|{{?:}} |
| |Named checks|{{in}}, {{\!in}}, {{is}}, {{\!is}} |
| |Comparison|{{<}}, {{>}}, {{<=}}, {{>=}} |
| |Equality|{{==}}, {{\!==}}|
| |Conjunction|{{&&}}|
| |Disjunction|{{\|\|}}|
|Lowest|Assignment|{{=}}, {{+=}}, {{-=}}, {{*=}}, {{/=}}, {{%=}}|
h3. Rules
{anchor:expression}\[{color:grey}Used by [#tupleLiteral], [#for], [#atomicExpression], [#longTemplate], [#whenCondition], [#functionBody], [#doWhile], [#property], [#script], [#explicitDelegation], [#jump], [#while], [#whenEntry], [#arrayAccess], [#statement], [#if], [#when], [#binding], [#valueArguments], [#functionParameter]{color}\]
*expression*
{color:blue}*:*{color} [#disjunction] {color:blue}*\(*{color}[#assignmentOperator] [#disjunction]{color:blue}*\)*{color}{color:blue}*\**{color}

...

;
{anchor:disjunction}\[{color:grey}Used by [#expression]{color}\]
*disjunction*
{color:blue}*:*{color} [#conjunction] {color:blue}*\(*{color}{color:green}*{{"||"}}*{color} [#conjunction]{color:blue}*\)*{color}{color:blue}*\**{color}
;
{anchor:conjunction}\[{color:grey}Used by [#disjunction]{color}\]
*conjunction*
{color:blue}*:*{color} [#equalityComparison] {color:blue}*\(*{color}{color:green}*{{"&&"}}*{color} [#equalityComparison]{color:blue}*\)*{color}{color:blue}*\**{color}
;
{anchor:equalityComparison}\[{color:grey}Used by [#conjunction]{color}\]
*equalityComparison*
{color:blue}*:*{color} [#comparison] {color:blue}*\(*{color}[#equalityOperation] [#comparison]{color:blue}*\)*{color}{color:blue}*\**{color}
;
{anchor:comparison}\[{color:grey}Used by [#equalityComparison]{color}\]
*comparison*
{color:blue}*:*{color} [#namedInfix] {color:blue}*\(*{color}[#comparisonOperation] [#namedInfix]{color:blue}*\)*{color}{color:blue}*\**{color}
;
{anchor:namedInfix}\[{color:grey}Used by [#comparison]{color}\]
*namedInfix*
{color:blue}*:*{color} [#elvisExpression] {color:blue}*\(*{color}[#inOperation] [#elvisExpression]{color:blue}*\)*{color}{color:blue}*\**{color}
{color:blue}*:*{color} [#elvisExpression] {color:blue}*\(*{color}[#isOperation] [#isRHS]{color:blue}*\)*{color}{color:blue}*?*{color}
;
{anchor:elvisExpression}\[{color:grey}Used by [#namedInfix], [#decomposerPattern]{color}\]
*elvisExpression*
{color:blue}*:*{color} [#infixFunctionCall] {color:blue}*\(*{color}{color:green}*{{"?:"}}*{color} [#infixFunctionCall]{color:blue}*\)*{color}{color:blue}*\**{color}

...

;
{anchor:infixFunctionCall}\[{color:grey}Used by [#elvisExpression]{color}\]
*infixFunctionCall*
{color:blue}*:*{color} [#rangeExpression] {color:blue}*\(*{color}[#SimpleName] [#rangeExpression]{color:blue}*\)*{color}{color:blue}*\**{color}
;
{anchor:rangeExpression}\[{color:grey}Used by [#infixFunctionCall]{color}\]
*rangeExpression*
{color:blue}*:*{color} [#additiveExpression] {color:blue}*\(*{color}{color:green}*{{".."}}*{color} [#additiveExpression]{color:blue}*\)*{color}{color:blue}*\**{color}
;
{anchor:additiveExpression}\[{color:grey}Used by [#rangeExpression]{color}\]
*additiveExpression*
{color:blue}*:*{color} [#multiplicativeExpression] {color:blue}*\(*{color}[#additiveOperation] [#multiplicativeExpression]{color:blue}*\)*{color}{color:blue}*\**{color}
;
{anchor:multiplicativeExpression}\[{color:grey}Used by [#additiveExpression]{color}\]
*multiplicativeExpression*
{color:blue}*:*{color} [#typeRHS] {color:blue}*\(*{color}[#multiplicativeOperation] [#typeRHS]{color:blue}*\)*{color}{color:blue}*\**{color}
;
{anchor:typeRHS}\[{color:grey}Used by [#multiplicativeExpression]{color}\]
*typeRHS*
{color:blue}*:*{color} [#prefixUnaryExpression] {color:blue}*\(*{color}[#typeOperation] [#prefixUnaryExpression]{color:blue}*\)*{color}{color:blue}*\**{color}
;
{anchor:prefixUnaryExpression}\[{color:grey}Used by [#typeRHS]{color}\]
*prefixUnaryExpression*
{color:blue}*:*{color} [#prefixUnaryOperation]{color:blue}*\**{color} [#postfixUnaryExpression]
;
{anchor:postfixUnaryExpression}\[{color:grey}Used by [#prefixUnaryExpression], [#postfixUnaryOperation]{color}\]
*postfixUnaryExpression*
{color:blue}*:*{color} [#atomicExpression] [#postfixUnaryOperation]{color:blue}*\**{color}
;
{anchor:atomicExpression}\[{color:grey}Used by [#postfixUnaryExpression]{color}\]
*atomicExpression*
{color:blue}*:*{color} {color:green}*{{"("}}*{color} [#expression] {color:green}*{{")"}}*{color}
{color:blue}*:*{color} [#literalConstant]
{color:blue}*:*{color} [#functionLiteral]
{color:blue}*:*{color} [#tupleLiteral]
{color:blue}*:*{color} {color:green}*{{"this"}}*{color} [#label]{color:blue}*?*{color}
{color:blue}*:*{color} {color:green}*{{"super"}}*{color} {color:blue}*\(*{color}{color:green}*{{"<"}}*{color} [#type] {color:green}*{{">"}}*{color}{color:blue}*\)*{color}{color:blue}*?*{color} [#label]{color:blue}*?*{color}
{color:blue}*:*{color} [#if]
{color:blue}*:*{color} [#when]
{color:blue}*:*{color} [#try]
{color:blue}*:*{color} [#objectLiteral]
{color:blue}*:*{color} [#jump]
{color:blue}*:*{color} [#loop]
{color:blue}*:*{color} [#SimpleName]
{color:blue}*:*{color} [#FieldName]
{color:blue}*:*{color} {color:green}*{{"namespace"}}*{color}
;
{anchor:label}\[{color:grey}Used by [#callSuffix], [#prefixUnaryOperation], [#atomicExpression], [#jump]{color}\]
*label*
{color:blue}*:*{color} {color:green}*{{"@"}}*{color}
{color:blue}*:*{color} {color:green}*{{"@@"}}*{color}
{color:blue}*:*{color} [#LabelName]
;
{anchor:literalConstant}\[{color:grey}Used by [#atomicExpression], [#constantPattern]{color}\]
*literalConstant*
{color:blue}*:*{color} {color:green}*{{"true"}}*{color} {color:blue}*|*{color} {color:green}*{{"false"}}*{color}

...

{color:blue}*:*{color} [#stringTemplate]
{color:blue}*:*{color} [#NoEscapeString]
{color:blue}*:*{color} [#IntegerLiteral]
{color:blue}*:*{color} [#HexadecimalLiteral]
{color:blue}*:*{color} [#CharacterLiteral]
{color:blue}*:*{color} [#FloatLiteral]
{color:blue}*:*{color} {color:green}*{{"null"}}*{color}
;
{anchor:stringTemplate}\[{color:grey}Used by [#literalConstant]{color}\]
*stringTemplate*
{color:blue}*:*{color} {color:green}*{{"\""}}*{color} [#stringTemplateElement]{color:blue}*\**{color} {color:green}*{{"\""}}*{color}
;
{anchor:stringTemplateElement}\[{color:grey}Used by [#stringTemplate]{color}\]
*stringTemplateElement*
{color:blue}*:*{color} (!) *Undeclared!* [#RegularStringPart]
{color:blue}*:*{color} (!) *Undeclared!* [#ShortTemplateEntrySTART] {color:blue}*\(*{color}[#SimpleName] {color:blue}*|*{color} {color:green}*{{"this"}}*{color}{color:blue}*\)*{color}
{color:blue}*:*{color} (!) *Undeclared!* [#EscapeSequence]
{color:blue}*:*{color} [#longTemplate]
;
{anchor:longTemplate}\[{color:grey}Used by [#stringTemplateElement]{color}\]
*longTemplate*
{color:blue}*:*{color} {color:green}*{{"$\{"}}*{color} [#expression] {color:green}*{{"}"}}*{color}
;
{anchor:isRHS}\[{color:grey}Used by [#namedInfix], [#whenCondition]{color}\]
*isRHS*
{color:blue}*:*{color} [#pattern] {color:blue}*:*{color} [#type]
;

...

{anchor:declaration}\[{color:grey}Used by [#statement]{color}\]
*declaration*
{color:blue}*:*{color} [#function]
{color:blue}*:*{color} [#property]
{color:blue}*:*{color} [#class]
{color:blue}*:*{color} [#typedef]
{color:blue}*:*{color} [#object]
;
{anchor:statement}\[{color:grey}Used by [#statements]{color}\]
*statement*
{color:blue}*:*{color} [#declaration]
{color:blue}*:*{color} [#expression]
;
{anchor:multiplicativeOperation}\[{color:grey}Used by [#multiplicativeExpression]{color}\]
*multiplicativeOperation*
{color:blue}*:*{color} {color:green}*{{"\*"}}*{color} {color:blue}*:*{color} {color:green}*{{"/"}}*{color} {color:blue}*:*{color} {color:green}*{{"%"}}*{color}
;
{anchor:additiveOperation}\[{color:grey}Used by [#additiveExpression]{color}\]
*additiveOperation*
{color:blue}*:*{color} {color:green}*{{"+"}}*{color} {color:blue}*:*{color} {color:green}*{{"-"}}*{color}
;
{anchor:inOperation}\[{color:grey}Used by [#namedInfix]{color}\]
*inOperation*
{color:blue}*:*{color} {color:green}*{{"in"}}*{color} {color:blue}*:*{color} {color:green}*{{"\!in"}}*{color}
;
{anchor:typeOperation}\[{color:grey}Used by [#typeRHS]{color}\]
*typeOperation*
{color:blue}*:*{color} {color:green}*{{"as"}}*{color} {color:blue}*:*{color} {color:green}*{{"as?"}}*{color} {color:blue}*:*{color} {color:green}*{{":"}}*{color}
;
{anchor:isOperation}\[{color:grey}Used by [#namedInfix]{color}\]
*isOperation*
{color:blue}*:*{color} {color:green}*{{"is"}}*{color} {color:blue}*:*{color} {color:green}*{{"\!is"}}*{color}
;
{anchor:comparisonOperation}\[{color:grey}Used by [#comparison]{color}\]
*comparisonOperation*
{color:blue}*:*{color} {color:green}*{{"<"}}*{color} {color:blue}*:*{color} {color:green}*{{">"}}*{color} {color:blue}*:*{color} {color:green}*{{">="}}*{color} {color:blue}*:*{color} {color:green}*{{"<="}}*{color}
;
{anchor:equalityOperation}\[{color:grey}Used by [#equalityComparison]{color}\]
*equalityOperation*
{color:blue}*:*{color} {color:green}*{{"\!="}}*{color} {color:blue}*:*{color} {color:green}*{{"=="}}*{color}
;
{anchor:assignmentOperator}\[{color:grey}Used by [#expression]{color}\]
*assignmentOperator*
{color:blue}*:*{color} {color:green}*{{"="}}*{color}
{color:blue}*:*{color} {color:green}*{{"+="}}*{color} {color:blue}*:*{color} {color:green}*{{"-="}}*{color} {color:blue}*:*{color} {color:green}*{{"\*="}}*{color} {color:blue}*:*{color} {color:green}*{{"/="}}*{color} {color:blue}*:*{color} {color:green}*{{"%="}}*{color}
;
{anchor:prefixUnaryOperation}\[{color:grey}Used by [#prefixUnaryExpression]{color}\]
*prefixUnaryOperation*
{color:blue}*:*{color} {color:green}*{{"-"}}*{color} {color:blue}*:*{color} {color:green}*{{"+"}}*{color}
{color:blue}*:*{color} {color:green}*{{"++"}}*{color} {color:blue}*:*{color} {color:green}*{{"--"}}*{color}
{color:blue}*:*{color} {color:green}*{{"\!"}}*{color}
{color:blue}*:*{color} [#annotations]
{color:blue}*:*{color} [#label]
;
{anchor:postfixUnaryOperation}\[{color:grey}Used by [#postfixUnaryExpression]{color}\]
*postfixUnaryOperation*
{color:blue}*:*{color} {color:green}*{{"++"}}*{color} {color:blue}*:*{color} {color:green}*{{"--"}}*{color} {color:blue}*:*{color} {color:green}*{{"\!\!"}}*{color}
{color:blue}*:*{color} [#callSuffix]
{color:blue}*:*{color} [#arrayAccess]

...

{color:blue}*:*{color} [#memberAccessOperation] [#postfixUnaryExpression]
;
{anchor:callSuffix}\[{color:grey}Used by [#constructorInvocation], [#postfixUnaryOperation]{color}\]
*callSuffix*
{color:blue}*:*{color} [#typeArguments]{color:blue}*?*{color} [#valueArguments] {color:blue}*\(*{color}[#label]{color:blue}*?*{color} [#functionLiteral]{color:blue}*\)*{color}
{color:blue}*:*{color} [#typeArguments] {color:blue}*\(*{color}[#label]{color:blue}*?*{color} [#functionLiteral]{color:blue}*\)*{color}
;
{anchor:memberAccessOperation}\[{color:grey}Used by [#postfixUnaryOperation]{color}\]
*memberAccessOperation*
{color:blue}*:*{color} {color:green}*{{"."}}*{color} {color:blue}*:*{color} {color:green}*{{"?."}}*{color} {color:blue}*:*{color} {color:green}*{{"?"}}*{color}
;
{anchor:typeArguments}\[{color:grey}Used by [#callSuffix], [#decomposerPattern], [#annotationEntry]{color}\]
*typeArguments*
{color:blue}*:*{color} {color:green}*{{"<"}}*{color} [#type]{color:blue}*\{*{color}{color:green}*{{","}}*{color}{color:blue}*\}*{color} {color:green}*{{">"}}*{color}

...

;
{anchor:valueArguments}\[{color:grey}Used by [#callSuffix], [#annotationEntry], [#initializer]{color}\]
*valueArguments*
{color:blue}*:*{color} {color:green}*{{"("}}*{color} {color:blue}*\(*{color}[#SimpleName] {color:green}*{{"="}}*{color}{color:blue}*\)*{color}{color:blue}*?*{color} {color:green}*{{"\*"}}*{color}{color:blue}*?*{color} [#expression]{color:blue}*\{*{color}{color:green}*{{","}}*{color}{color:blue}*\}*{color} {color:green}*{{")"}}*{color}
;

...

{anchor:jump}\[{color:grey}Used by [#atomicExpression]{color}\]
*jump*
{color:blue}*:*{color} {color:green}*{{"throw"}}*{color} [#expression]
{color:blue}*:*{color} {color:green}*{{"return"}}*{color} [#label]{color:blue}*?*{color} [#expression]{color:blue}*?*{color}
{color:blue}*:*{color} {color:green}*{{"continue"}}*{color} [#label]{color:blue}*?*{color}
{color:blue}*:*{color} {color:green}*{{"break"}}*{color} [#label]{color:blue}*?*{color}
;
{anchor:tupleLiteral}\[{color:grey}Used by [#atomicExpression]{color}\]
*tupleLiteral*
{color:blue}*:*{color} {color:green}*{{"#"}}*{color} {color:green}*{{"("}}*{color} {color:blue}*\(*{color}{color:blue}*\(*{color}{color:blue}*\(*{color}[#SimpleName] {color:green}*{{"="}}*{color}{color:blue}*\)*{color}{color:blue}*?*{color} [#expression]{color:blue}*\)*{color}{color:blue}*\{*{color}{color:green}*{{","}}*{color}{color:blue}*\}*{color}{color:blue}*\)*{color}{color:blue}*?*{color} {color:green}*{{")"}}*{color}
;
{anchor:functionLiteral}\[{color:grey}Used by [#callSuffix], [#atomicExpression]{color}\]
*functionLiteral*
{color:blue}*:*{color} {color:green}*{{"\{"}}*{color} [#statements] {color:green}*{{"}"}}*{color}
{color:blue}*:*{color} {color:green}*{{"\{"}}*{color} {color:blue}*\(*{color}[#modifiers] [#SimpleName]{color:blue}*\)*{color}{color:blue}*\{*{color}{color:green}*{{","}}*{color}{color:blue}*\}*{color} {color:green}*{{"->"}}*{color} [#statements] {color:green}*{{"}"}}*{color}
{color:blue}*:*{color} {color:green}*{{"\{"}}*{color} {color:blue}*\(*{color}[#type] {color:green}*{{"."}}*{color}{color:blue}*\)*{color}{color:blue}*?*{color} {color:green}*{{"("}}*{color} {color:blue}*\(*{color}[#modifiers] [#SimpleName] {color:blue}*\(*{color}{color:green}*{{":"}}*{color} [#type]{color:blue}*\)*{color}{color:blue}*?*{color}{color:blue}*\)*{color}{color:blue}*\{*{color}{color:green}*{{","}}*{color}{color:blue}*\}*{color} {color:green}*{{")"}}*{color} {color:blue}*\(*{color}{color:green}*{{":"}}*{color} [#type]{color:blue}*\)*{color}{color:blue}*?*{color} {color:green}*{{"->"}}*{color} [#statements] {color:green}*{{"}"}}*{color}
;
{anchor:statements}\[{color:grey}Used by [#block], [#functionLiteral]{color}\]
*statements*
{color:blue}*:*{color} [#SEMI]{color:blue}*\**{color} [#statement]{color:blue}*\{*{color}[#SEMI]{color:blue}*+*{color}{color:blue}*\}*{color} [#SEMI]{color:blue}*\**{color}
;
{anchor:constructorInvocation}\[{color:grey}Used by [#delegationSpecifier], [#initializer]{color}\]
*constructorInvocation*
{color:blue}*:*{color} [#userType] [#callSuffix]
;
{anchor:arrayAccess}\[{color:grey}Used by [#postfixUnaryOperation]{color}\]
*arrayAccess*
{color:blue}*:*{color} {color:green}*{{"\["}}*{color} [#expression]{color:blue}*\{*{color}{color:green}*{{","}}*{color}{color:blue}*\}*{color} {color:green}*{{"]"}}*{color}
;
{anchor:objectLiteral}\[{color:grey}Used by [#atomicExpression]{color}\]
*objectLiteral*
{color:blue}*:*{color} {color:green}*{{"object"}}*{color} {color:green}*{{":"}}*{color} [#delegationSpecifier]{color:blue}*\{*{color}{color:green}*{{","}}*{color}{color:blue}*\}*{color}{color:blue}*?*{color} [#classBody]
{color:blue}*:*{color} {color:green}*{{"object"}}*{color} {color:blue}*\(*{color}{color:green}*{{":"}}*{color} [#delegationSpecifier]{color:blue}*\{*{color}{color:green}*{{","}}*{color}{color:blue}*\}*{color}{color:blue}*\)*{color}{color:blue}*?*{color} [#classBody]
;
h4. Pattern matching

...

bq. See [Pattern matching]
{anchor:when}\[{color:grey}Used by [#atomicExpression]{color}\]
*when*
{color:blue}*:*{color} {color:green}*{{"when"}}*{color} {color:blue}*\(*{color}{color:green}*{{"("}}*{color} {color:blue}*\(*{color}[#modifiers] {color:green}*{{"val"}}*{color} [#SimpleName] {color:green}*{{"="}}*{color}{color:blue}*\)*{color}{color:blue}*?*{color} [#expression] {color:green}*{{")"}}*{color}{color:blue}*\)*{color}{color:blue}*?*{color} {color:green}*{{"\{"}}*{color}
[#whenEntry]{color:blue}*\**{color}
{color:green}*{{"}"}}*{color}
;
{anchor:whenEntry}\[{color:grey}Used by [#when]{color}\]
*whenEntry*
{color:blue}*:*{color} [#whenCondition]{color:blue}*\{*{color}{color:green}*{{","}}*{color}{color:blue}*\}*{color} {color:green}*{{"-=>"}}*{color} [#expression] [#SEMI]
{color:blue}*:*{color} {color:green}*{{"else"}}*{color} {color:green}*{{"-=>"}}*{color} [#expression] [#SEMI]
;

...

{anchor:whenCondition}\[{color:grey}Used by [#whenEntry]{color}\]
*whenCondition*
{color:blue}*:*{color} [#expression]
{color:blue}*:*{color} {color:blue}*\(*{color}{color:green}*{{"in"}}*{color} {color:blue}*|*{color} {color:green}*{{"\!in"}}*{color}{color:blue}*\)*{color} [#expression]
{color:blue}*:*{color} {color:blue}*\(*{color}{color:green}*{{"is"}}*{color} {color:blue}*|*{color} {color:green}*{{"\!is"}}*{color}{color:blue}*\)*{color} [#isRHS]
;
{anchor:pattern}\[{color:grey}Used by [#isRHS], [#pattern], [#binding], [#tuplePattern]{color}\]
*pattern*
{color:blue}*:*{color} [#annotations] [#pattern]
{color:blue}*:*{color} [#type]
{color:blue}*:*{color} [#tuplePattern]
{color:blue}*:*{color} [#decomposerPattern]
{color:blue}*:*{color} [#constantPattern]
{color:blue}*:*{color} [#bindingPattern]
{color:blue}*:*{color} {color:green}*{{"\*"}}*{color}
;
{anchor:decomposerPattern}\[{color:grey}Used by [#pattern]{color}\]
*decomposerPattern*
{color:blue}*:*{color} [#type]
{color:blue}*:*{color} [#elvisExpression] [#typeArguments]{color:blue}*?*{color} [#tuplePattern]
;
{anchor:constantPattern}\[{color:grey}Used by [#pattern]{color}\]
*constantPattern*
{color:blue}*:*{color} [#literalConstant]
;
{anchor:tuplePattern}\[{color:grey}Used by [#pattern], [#decomposerPattern]{color}\]
*tuplePattern*
{color:blue}*:*{color} {color:green}*{{"("}}*{color} {color:blue}*\(*{color}{color:blue}*\(*{color}{color:blue}*\(*{color}[#SimpleName] {color:green}*{{"="}}*{color}{color:blue}*\)*{color}{color:blue}*?*{color} [#pattern]{color:blue}*\)*{color}{color:blue}*\{*{color}{color:green}*{{","}}*{color}{color:blue}*\}*{color}{color:blue}*\)*{color}{color:blue}*?*{color} {color:green}*{{")"}}*{color}
;
{anchor:bindingPattern}\[{color:grey}Used by [#pattern]{color}\]
*bindingPattern*
{color:blue}*:*{color} {color:green}*{{"val"}}*{color} [#SimpleName] [#binding]{color:blue}*?*{color}
;
{anchor:binding}\[{color:grey}Used by [#bindingPattern]{color}\]
*binding*
{color:blue}*:*{color} {color:green}*{{"is"}}*{color} [#pattern]
{color:blue}*:*{color} {color:green}*{{"\!is"}}*{color} [#pattern]
{color:blue}*:*{color} {color:green}*{{"in"}}*{color} [#expression]
{color:blue}*:*{color} {color:green}*{{"\!in"}}*{color} [#expression]
{color:blue}*:*{color} {color:green}*{{":"}}*{color} [#type]
;
h2. Modifiers
{anchor:modifiers}\[{color:grey}Used by [#typeParameter], [#getter], [#packageHeader], [#class], [#property], [#typedef], [#functionLiteral], [#function], [#functionLiteral], [#functionType], [#when], [#setter], [#enumEntry], [#classObject], [#functionParameter], [#constructor]{color}\]
*modifiers*
{color:blue}*:*{color} [#modifier]{color:blue}*\**{color}

...

;
{anchor:modifier}\[{color:grey}Used by [#modifiers]{color}\]
*modifier*
{color:blue}*:*{color} [#classModifier]
{color:blue}*:*{color} [#accessModifier]
{color:blue}*:*{color} [#varianceAnnotation]
{color:blue}*:*{color} [#memberModifier]
{color:blue}*:*{color} [#parameterKind]
{color:blue}*:*{color} [#annotations]
;
{anchor:classModifier}\[{color:grey}Used by [#modifier]{color}\]
*classModifier*
{color:blue}*:*{color} {color:green}*{{"abstract"}}*{color}
{color:blue}*:*{color} {color:green}*{{"final"}}*{color}
{color:blue}*:*{color} {color:green}*{{"enum"}}*{color}
{color:blue}*:*{color} {color:green}*{{"open"}}*{color}
{color:blue}*:*{color} {color:green}*{{"attribute"}}*{color}
;
{anchor:memberModifier}\[{color:grey}Used by [#modifier]{color}\]
*memberModifier*
{color:blue}*:*{color} {color:green}*{{"override"}}*{color}
{color:blue}*:*{color} {color:green}*{{"open"}}*{color}
{color:blue}*:*{color} {color:green}*{{"final"}}*{color}
{color:blue}*:*{color} {color:green}*{{"abstract"}}*{color}
;
{anchor:accessModifier}\[{color:grey}Used by [#modifier]{color}\]
*accessModifier*
{color:blue}*:*{color} {color:green}*{{"private"}}*{color}
{color:blue}*:*{color} {color:green}*{{"protected"}}*{color}
{color:blue}*:*{color} {color:green}*{{"public"}}*{color}
{color:blue}*:*{color} {color:green}*{{"internal"}}*{color}
;
{anchor:varianceAnnotation}\[{color:grey}Used by [#modifier], [#optionalProjection]{color}\]
*varianceAnnotation*
{color:blue}*:*{color} {color:green}*{{"in"}}*{color}
{color:blue}*:*{color} {color:green}*{{"out"}}*{color}
;
{anchor:parameterKind}\[{color:grey}Used by [#modifier]{color}\]
*parameterKind*
{color:blue}*:*{color} {color:green}*{{"lazy"}}*{color}
{color:blue}*:*{color} {color:green}*{{"out"}}*{color}
{color:blue}*:*{color} {color:green}*{{"ref"}}*{color}
;
h2. Annotations
{anchor:annotations}\[{color:grey}Used by [#modifier], [#catchBlock], [#pattern], [#prefixUnaryOperation], [#for], [#class], [#property], [#type], [#typeConstraint], [#function], [#initializer]{color}\]
*annotations*
{color:blue}*:*{color} [#annotation]{color:blue}*\**{color}

...

;
{anchor:annotation}\[{color:grey}Used by [#annotations]{color}\]
*annotation*
{color:blue}*:*{color} {color:green}*{{"\["}}*{color} [#annotationEntry]{color:blue}*+*{color} {color:green}*{{"]"}}*{color}
{color:blue}*:*{color} [#annotationEntry]
;
{anchor:annotationEntry}\[{color:grey}Used by [#annotation]{color}\]
*annotationEntry*
{color:blue}*:*{color} [#SimpleName]{color:blue}*\{*{color}{color:green}*{{"."}}*{color}{color:blue}*\}*{color} [#typeArguments]{color:blue}*?*{color} [#valueArguments]{color:blue}*?*{color}
;
h1. Lexical structure

...
{{helper}}
{anchor:Digit}\[{color:grey}Used by [#IntegerLiteral], [#HexDigit]{color}\]
*Digit*
{color:blue}*:*{color} {color:blue}*\[*{color}{color:green}*{{"0"}}*{color}{color:blue}*.*{color}{color:blue}*.*{color}{color:green}*{{"9"}}*{color}{color:blue}*\]*{color};
{anchor:IntegerLiteral}\[{color:grey}Used by [#literalConstant]{color}\]
*IntegerLiteral*
{color:blue}*:*{color} [#Digit]{color:blue}*+*{color}{color:blue}*?*{color}
{anchor:FloatLiteral}\[{color:grey}Used by [#literalConstant]{color}\]
*FloatLiteral*
{color:blue}*:*{color} {color:green}*{{<java double literal>}}*{color};
{{helper}}
{anchor:HexDigit}\[{color:grey}Used by [#HexadecimalLiteral]{color}\]
*HexDigit*
{color:blue}*:*{color} [#Digit] {color:blue}*|*{color} {color:blue}*\[*{color}{color:green}*{{"A"}}*{color}{color:blue}*.*{color}{color:blue}*.*{color}{color:green}*{{"F"}}*{color}, {color:green}*{{"a"}}*{color}{color:blue}*.*{color}{color:blue}*.*{color}{color:green}*{{"f"}}*{color}{color:blue}*\]*{color};
{anchor:HexadecimalLiteral}\[{color:grey}Used by [#literalConstant]{color}\]
*HexadecimalLiteral*
{color:blue}*:*{color} {color:green}*{{"0x"}}*{color} [#HexDigit]{color:blue}*+*{color};
{anchor:CharacterLiteral}\[{color:grey}Used by [#literalConstant]{color}\]
*CharacterLiteral*
{color:blue}*:*{color} {color:green}*{{<character as in Java>}}*{color};
bq. See [Basic types]
{anchor:StringWithTemplates}*StringWithTemplates*
{color:blue}*:*{color} {color:green}*{{<single-quoted string, $ can be escaped>}}*{color};
{anchor:NoEscapeString}\[{color:grey}Used by [#literalConstant]{color}\]
*NoEscapeString*
{color:blue}*:*{color} {color:green}*{{<"""-quoted string>}}*{color};
bq. See [String templates|Strings#Templates]
{anchor:SEMI}\[{color:grey}Used by [#whenEntry], [#if], [#statements], [#packageHeader], [#property], [#import]{color}\]
*SEMI*
{color:blue}*:*{color} {color:green}*{{<semicolon or newline>}}*{color};
{anchor:SimpleName}\[{color:grey}Used by [#typeParameter], [#for], [#LabelName], [#package], [#packageHeader], [#object], [#function], [#parameter], [#FieldName], [#bindingPattern], [#when], [#setter], [#import], [#valueArguments], [#tupleLiteral], [#catchBlock], [#simpleUserType], [#atomicExpression], [#class], [#property], [#tuplePattern], [#typedef], [#annotationEntry], [#infixFunctionCall], [#functionLiteral], [#enumEntry], [#stringTemplateElement], [#typeConstraint]{color}\]
{anchor:SimpleName}\[{color:grey}Used by [#typeParameter], [#package], [#LabelName], [#packageHeader], [#object], [#function], [#parameter], [#FieldName], [#when], [#variableDeclarationEntry], [#setter], [#import], [#valueArguments], [#tupleLiteral], [#catchBlock], [#simpleUserType], [#atomicExpression], [#class], [#typedef], [#infixFunctionCall], [#functionLiteral], [#annotationEntry], [#enumEntry], [#stringTemplateElement], [#typeConstraint]{color}\]
*SimpleName*
{color:blue}*:*{color} {color:green}*{{<java identifier>}}*{color}

...

{color:blue}*:*{color} {color:green}*{{"`"}}*{color} {color:green}*{{<java identifier>}}*{color} {color:green}*{{"`"}}*{color}
;
bq. See [Java interoperability]
{anchor:FieldName}\[{color:grey}Used by [#atomicExpression]{color}\]
*FieldName*
{color:blue}*:*{color} {color:green}*{{"$"}}*{color} [#SimpleName];
bq. See [Properties And Fields]
{anchor:LabelName}\[{color:grey}Used by [#label]{color}\]
*LabelName*
{color:blue}*:*{color} {color:green}*{{"@"}}*{color} [#SimpleName];
bq. See [Nonlocal returns and jumps]