getTokens method
Implementation
List<TerminalNode> getTokens(int ttype) {
if (children == null) {
return [];
}
var tokens = <TerminalNode>[];
for (var o in children!) {
if (o is TerminalNode) {
final tnode = o;
final symbol = tnode.symbol;
if (symbol.type == ttype) {
tokens.add(tnode);
}
}
}
return tokens;
}