groostav
03/20/2017, 11:22 PMbreak()
method does nothing but set a flag in the traversal logic, setting it not to continue.
If I instead made this method be a suspend val
and updated our source such that the visit
methods were all suspend funs
then I can get this:
suspend val Visitor.break get() = Helpers.break(this)
override suspend fun visitEnter(node: NodeTypeTwo){
if(node.modelB.isSpecialCase()){
break //treated as a property-get
}
//domain logic b, never called when the above if-clause is taken as per the `break` suspension
}