VarList paramList()
{
VarList v;
tok.scan();
if (tok.getFirstChar() != '(')
{
io.Abort("Expected '('");
}
v = new VarList(); /* init the param list */
tok.scan(); /* get the next token */
while (tok.getFirstChar() != ')')
{
Var e = new Var();
e.setClassId(Tok.T_PARAM); /* mark this as a parameter */
dataType(e); /* get the specified datatype */
e.setName(tok.getValue()); /* copy the variable name */
v.add(e); /* add parameter to param list */
tok.scan();
if (tok.getFirstChar() == ',') /* if more params */
{
tok.scan(); /* get the next token */
}
}
tok.scan(); /* move to the next token */
return(v);
}