FunctionBlockBodyExt extension

Extension for the FunctionBody class from the analyzer package. Adds helper methods for working with different types of function bodies.

on
  • FunctionBody

Methods

getBlockBody() → BlockFunctionBody?

Available on FunctionBody, provided by the FunctionBlockBodyExt extension

Returns the function body of type BlockFunctionBody if the current node is such.
getEmptyBody() → EmptyFunctionBody?

Available on FunctionBody, provided by the FunctionBlockBodyExt extension

Returns the function body of type EmptyFunctionBody if the current node is such.
getExpressionBody() → ExpressionFunctionBody?

Available on FunctionBody, provided by the FunctionBlockBodyExt extension

Returns the function body of type ExpressionFunctionBody if the current node is such.