V0.8: allow NULL ports in task calls.

This is a direct back port from development that allows tasks to
be called with no ports. This fixes one failure in the test suite.
This commit is contained in:
Cary R 2007-12-28 21:38:18 -08:00 committed by Stephen Williams
parent f33d477166
commit 83ee7e7988
1 changed files with 13 additions and 0 deletions

13
parse.y
View File

@ -2867,6 +2867,19 @@ statement
delete $3;
$$ = tmp;
}
/* NOTE: The standard doesn't really support an empty argument list
between parentheses, but it seems natural, and people commonly
want it. So accept it explicitly. */
| identifier '(' ')' ';'
{ svector<PExpr*>pt (0);
PCallTask*tmp = new PCallTask(*$1, pt);
tmp->set_file(@1.text);
tmp->set_lineno(@1.first_line);
delete $1;
$$ = tmp;
}
| identifier ';'
{ svector<PExpr*>pt (0);
PCallTask*tmp = new PCallTask(*$1, pt);