fixed bugs and added enough runtime to execute first code after the compiler segfaults at shutdown
This commit is contained in:
@@ -7,10 +7,11 @@
|
||||
**
|
||||
*/
|
||||
#include "yab2cpp.h"
|
||||
#include "runtime/runtime.h"
|
||||
|
||||
/* static initializers */
|
||||
unordered_map<string, shared_ptr<label> > label::lookup;
|
||||
unsigned int label::nextID;
|
||||
unsigned int label::nextID=START;
|
||||
|
||||
/* base class of all the code structure types */
|
||||
codeType::codeType(enum CODES t)
|
||||
@@ -53,6 +54,11 @@ void label::dumpLabels()
|
||||
varNames << endl;
|
||||
}
|
||||
|
||||
void label::generateEnd()
|
||||
{
|
||||
output_cpp << "state=EXIT;\nbreak;\n";
|
||||
}
|
||||
|
||||
void label::generateJumpTo()
|
||||
{
|
||||
output_cpp << "state=" << this->getID() << ";\nbreak;\n";
|
||||
|
||||
Reference in New Issue
Block a user