mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-29 05:17:58 +03:00
added local variable usage in expressions
This commit is contained in:
parent
fac8fb8fcb
commit
ed92ffcf89
6 changed files with 103 additions and 3 deletions
|
@ -7,6 +7,7 @@
|
|||
#include "generator.hpp"
|
||||
#include "scanner.hpp"
|
||||
#include "errorhandler.hpp"
|
||||
#include "locals.hpp"
|
||||
|
||||
namespace Compiler
|
||||
{
|
||||
|
@ -212,6 +213,19 @@ namespace Compiler
|
|||
Scanner& scanner)
|
||||
{
|
||||
mFirst = false;
|
||||
|
||||
if (mNextOperand)
|
||||
{
|
||||
char type = mLocals.getType (name);
|
||||
|
||||
if (type!=' ')
|
||||
{
|
||||
Generator::fetchLocal (mCode, type, mLocals.getIndex (name));
|
||||
mNextOperand = false;
|
||||
mOperands.push_back (type=='f' ? 'f' : 'l');
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return Parser::parseName (name, loc, scanner);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue