extended scripting extensions to code segment 3 (instructions and functions with optional arguments)

This commit is contained in:
Marc Zinnschlag 2010-08-22 14:00:30 +02:00
parent b3cc3073a3
commit c18e83d7c0
4 changed files with 160 additions and 80 deletions

View file

@ -346,9 +346,10 @@ namespace Compiler
start();
mTokenLoc = loc;
parseArguments (argumentType, scanner);
int optionals = parseArguments (argumentType, scanner);
extensions->generateFunctionCode (keyword, mCode, mLiterals, mExplicit);
extensions->generateFunctionCode (keyword, mCode, mLiterals, mExplicit,
optionals);
mOperands.push_back (returnType);
mExplicit.clear();
mRefOp = false;
@ -465,9 +466,9 @@ namespace Compiler
if (extensions->isFunction (keyword, returnType, argumentType, false))
{
mTokenLoc = loc;
parseArguments (argumentType, scanner);
int optionals = parseArguments (argumentType, scanner);
extensions->generateFunctionCode (keyword, mCode, mLiterals, "");
extensions->generateFunctionCode (keyword, mCode, mLiterals, "", optionals);
mOperands.push_back (returnType);
mNextOperand = false;