Go to the first, previous, next, last section, table of contents.


Compound expressions

compound_expression:
          `{' top_expression_list `}'
        ;

A compound_expression is a sequence of top expressions. The type and value of the compound_expression is the type and value of the last expression it contains. The value to be returned from a method is not the value of its method_body compound. A separate return_expression exists to assign the method return value (see section Jumps and returns).

top_expression_list:
          top_expression [`;' top_expression_list]
        ;

Note that the semicolon is a separator, not a terminator.

top_expression:
          local_var_decl
        | expression
        ;

A local_var_decl (see section Local variables) is not an expression because that is unnecessary:


Go to the first, previous, next, last section, table of contents.