added random function; global variable fix

This commit is contained in:
Marc Zinnschlag 2010-07-04 13:59:29 +02:00
parent df8f8a315c
commit 185f8bd56d
9 changed files with 60 additions and 3 deletions

View file

@ -304,6 +304,17 @@ namespace Compiler
mNextOperand = false;
return true;
}
else if (keyword==Scanner::K_random)
{
mTokenLoc = loc;
parseArguments ("l", scanner);
Generator::random (mCode);
mOperands.push_back ('l');
mNextOperand = false;
return true;
}
else
{
// check for custom extensions