private ASTTypeNode _Paramater() { ASTTypeNode ret = _Type(); _Eat(TokenType.ID); return(ret); }
private List <ASTArgNode> _Paramaters() { List <ASTArgNode> nodes = new List <ASTArgNode>(); ASTTypeNode type = _Paramater(); nodes.Add(new ASTArgNode(type)); //As long as there is a comma after this paramater while (_CurrentToken.Value == ",") { _Eat(TokenType.COMMA); type = _Paramater(); nodes.Add(new ASTArgNode(type)); } return(nodes); }
public ASTArgNode(ASTTypeNode type) : base(new Token(TokenType.ARG, type.Value.Value)) { LeftChild = type; }