1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-13 11:42:21 +00:00

parse.c: rm overlooked SHOPT_BASH stuff (re: 921bbcae)

That bit of code supported bash's redundant 'function foo()'
function declaration syntax (with both the 'function' keyword
and the '()') which is a syntax error on ksh, as it should be.
This commit is contained in:
Martijn Dekker 2021-03-23 19:58:43 +00:00
parent 22e044c339
commit 21d591dbd8

View file

@ -782,18 +782,7 @@ static Shnode_t *funct(Lex_t *lexp)
lexp->current = kiaentity(lexp,t->funct.functnam,-1,'p',-1,-1,lexp->script,'p',0,"");
#endif /* SHOPT_KIA */
if(flag)
{
lexp->token = sh_lex(lexp);
#if SHOPT_BASH
if(lexp->token == LPAREN)
{
if((lexp->token = sh_lex(lexp)) == RPAREN)
t->funct.functtyp |= FPOSIX;
else
sh_syntax(lexp);
}
#endif
}
if(t->funct.functtyp&FPOSIX)
skipnl(lexp,0);
else