mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 21:07:59 +03:00
extended scripting extensions to code segment 3 (instructions and functions with optional arguments)
This commit is contained in:
parent
b3cc3073a3
commit
c18e83d7c0
4 changed files with 160 additions and 80 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue