Everything in a method body is an expression. In fact, the whole method
body is an expression (a compound_expression,
see section Compound expressions).
expression:
simple_expression
| compound_expression
| assign_expression
| if_expression
| loop_expression
| return_expression
| jump_expression
| condition_expression
;
The condition_expression is explained later (see section Conditions).
simple_expression:
atom
| array_reference
| unary_operator expression
| expression binary_operator expression
| expression `?' expression `:' expression
;
For the definition of the semantics, precedence, and associativity of
the unary operators, binary operators, and of ? : (the only
ternary operator), see section Operators.
atom:
number
| string_constant
| identifier
| tuple
| method_invocation
| type_conversion
| `void'
| `nil'
;
void is the only value of type void. nil is the
invalid object reference; its type is tom.All.
Go to the first, previous, next, last section, table of contents.