findFirstByRuleName method
- String ruleName
Find the first node matching a given rule name
Implementation
ParseTreeNode? findFirstByRuleName(String ruleName) {
ParseTreeNode? match;
visitPreOrder((node) {
if (node.ruleName == ruleName) {
match = node;
return false;
}
return true;
});
return match;
}