text: public virtual ITerminalNode GetToken(int ttype, int i){if (children == null || i < 0 || i >= children.Count){return null;}int j = -1;foreach (IParseTree o in children){if (o is ITerminalNode){ITerminalNode tnode = (ITerminalNode)o;IToken symbol = tnode.Symbol;if (symbol.Type == ttype){j++;if (j == i){return tnode;}}}}return null;}