Script: Par(n) needs exactly one parameter, this() exactly zero

Mostly so that Parse_Params doesn't get used for things that are not
functions.
floating-point
Günther Brammer 2012-08-13 19:07:56 +02:00
parent 791484eb5a
commit dc4f3766fe
1 changed files with 5 additions and 2 deletions

View File

@ -2307,7 +2307,9 @@ void C4AulParse::Parse_Expression(int iParentPrio)
Fn->ParCount = C4AUL_MAX_Par;
// and for Par
Shift();
Parse_Params(1, C4AUL_Par);//FIXME: don't use Parse_Params
Match(ATT_BOPEN);
Parse_Expression();
Match(ATT_BCLOSE);
AddBCC(AB_PAR);
}
else if (SEqual(Idtf, C4AUL_this))
@ -2315,7 +2317,8 @@ void C4AulParse::Parse_Expression(int iParentPrio)
Shift();
if (TokenType == ATT_BOPEN)
{
Parse_Params(0, Idtf, 0);
Shift();
Match(ATT_BCLOSE);
}
AddBCC(AB_THIS);
}