getRuleContexts<T extends ParserRuleContext> method

List<T> getRuleContexts<T extends ParserRuleContext>()
inherited

Implementation

List<T> getRuleContexts<T extends ParserRuleContext>() {
  if (children == null) {
    return [];
  }

  var contexts = <T>[];
  for (var o in children!) {
    if (o is T) {
      contexts.add(o);
    }
  }

  return contexts;
}