Ruby: Cache ErbDirective::getAChildStmt

This commit is contained in:
Tom Hvitved
2021-11-09 14:07:25 +01:00
parent 4c5f32ba4a
commit 4037d1ff96

View File

@@ -157,6 +157,7 @@ class ErbDirective extends TDirectiveNode, ErbAstNode {
* Gets a statement that starts in directive that is not a child of any other
* statement starting in this directive.
*/
cached
Stmt getAChildStmt() {
this.containsAstNodeStart(result) and
not this.containsAstNodeStart(result.getParent())