Allow a left parenthesis before patterns in case blocks. POSIX requires

us to accept this, but I've never seen a script that uses it.
This commit is contained in:
Tim J. Robbins 2002-09-30 13:25:00 +00:00
parent a5573db3bf
commit f7a9b7fe3a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=104207

View File

@ -433,6 +433,8 @@ TRACE(("expecting DO got %s %s\n", tokname[got], got == TWORD ? wordtext : ""));
*cpp = cp = (union node *)stalloc(sizeof (struct nclist));
cp->type = NCLIST;
app = &cp->nclist.pattern;
if (lasttoken == TLP)
readtoken();
for (;;) {
*app = ap = (union node *)stalloc(sizeof (struct narg));
ap->type = NARG;