Adding support for windows and fixing some errors

This commit is contained in:
Ilusha 2024-01-15 16:35:16 -08:00 committed by IlyaShurupov
parent 2722a25036
commit 34a8d4eafd
84 changed files with 168 additions and 255 deletions

View file

@ -1,5 +1,4 @@
#include "compiler/statement.h"
#include "NewPlacement.hpp"
using namespace obj;
using namespace BCgen;
@ -76,7 +75,7 @@ StatementClassDef::StatementClassDef(tp::String class_id, StatementScope* scope)
StatementFuncDef* obj::BCgen::StmDefFunc(tp::String id, tp::InitialierList<tp::String> args, tp::InitialierList<Statement*> stms) { return new StatementFuncDef(id, args, stms); }
StatementLocalDef* obj::BCgen::StmDefLocal(tp::String id, Expression* value) {
if (value->mType == Expression::Type::CONST) {
if (value->mType == Expression::Type::CONST_EXPR) {
return new StatementLocalDef(id, (ExpressionConst*) value);
}
@ -99,4 +98,4 @@ StatementWhile* obj::BCgen::StmWhile(Expression* condition, StatementScope* scop
StatementIgnore* obj::BCgen::StmIgnore(Expression* expr) { return new StatementIgnore(expr); }
StatementClassDef* obj::BCgen::StmClassDef(tp::String id, StatementScope* scope) { return new StatementClassDef(id, scope); }
StatementClassDef* obj::BCgen::StmClassDef(tp::String id, StatementScope* scope) { return new StatementClassDef(id, scope); }