A control directive, terminated by a semicolon.

There are four kinds of control directives:

  • the return (Return) directive, to return a value or terminate execution,
  • the throw (Throw) directive, to raise an exception,
  • the break (Break) directive, to terminate a loop, and
  • the continue (Continue) directive, to jump to the next iteration of a loop.


return ret;
throw AssertionError("Not implemented yet!"); // TODO implement
childrenSource Codeshared formal []|[Expression] children

The child nodes of this node.

resultSource Codeshared formal Expression? result

The expression that the surrounding function results in, if this directive ends execution of a surrounding function.

  • For a return (Return) directive, this is the returned value’s expression, if any.
  • For a throw (Return) directive, this is the raised exception’s expression, if any.
  • For a break (Break) or continue (Continue) directive, this is always null.
textSource Codeshared formal String text

The text of the directive itself.

(Does not include the result or the terminating semicolon.)

Inherited Attributes
Attributes inherited from: Node
Attributes inherited from: Object
hash, string
Inherited Methods
Methods inherited from: Node
Methods inherited from: Object