mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 21:07:59 +03:00
write code file after successfull parsing
This commit is contained in:
parent
0cfeab622d
commit
a3ad61b4d0
9 changed files with 63 additions and 13 deletions
|
@ -7,10 +7,15 @@ namespace Compiler
|
|||
{
|
||||
ScriptParser::ScriptParser (ErrorHandler& errorHandler, Context& context,
|
||||
Locals& locals, bool end)
|
||||
: Parser (errorHandler, context), mLineParser (errorHandler, context, locals),
|
||||
: Parser (errorHandler, context), mLineParser (errorHandler, context, locals, mCode),
|
||||
mLocals (locals), mEnd (end)
|
||||
{}
|
||||
|
||||
void ScriptParser::getCode (std::vector<Interpreter::Type_Code>& code) const
|
||||
{
|
||||
code = mCode;
|
||||
}
|
||||
|
||||
bool ScriptParser::parseName (const std::string& name, const TokenLoc& loc,
|
||||
Scanner& scanner)
|
||||
{
|
||||
|
@ -56,6 +61,7 @@ namespace Compiler
|
|||
void ScriptParser::reset()
|
||||
{
|
||||
mLineParser.reset();
|
||||
mCode.clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue