Ameba::AST::FlowExpression
Inherits Ameba::AST::Util < Reference < Object
Represents a flow expression in Crystal code. For example:
def foobar
a = 3
return 42 # => flow expression
a + 1
end
Flow expression contains an actual node of a control expression and a parent node, which allows easily search through the related statement (i.e. find unreachable code)
Constructors
Instance methods
end_location(*args, **options)
Sourceend_location(*args, **options, &)
Sourcelocation(*args, **options)
Sourcelocation(*args, **options, &)
Sourceto_s(*args, **options)
Sourceto_s(*args, **options, &)
Sourceunreachable_nodes
Returns nodes which can't be reached because of a flow command inside. For example:
def foobar
a = 3
return 42
a + 1 # => unreachable node
end