Objects Compiled
This commit is contained in:
parent
ba95747ef9
commit
64e1f78739
52 changed files with 384 additions and 370 deletions
|
|
@ -33,7 +33,7 @@ namespace obj {
|
|||
Expression(Type type);
|
||||
|
||||
ExpressionChild* ExprChild(tp::String id);
|
||||
ExpressionCall* ExprCall(tp::init_list<Expression*> args);
|
||||
ExpressionCall* ExprCall(tp::InitialierList<Expression*> args);
|
||||
};
|
||||
|
||||
struct ExpressionNew : public Expression {
|
||||
|
|
@ -61,7 +61,7 @@ namespace obj {
|
|||
struct ExpressionCall : public Expression {
|
||||
Expression* mParent = NULL;
|
||||
tp::Buffer<Expression*> mArgs;
|
||||
ExpressionCall(Expression* mParent, tp::init_list<Expression*> args);
|
||||
ExpressionCall(Expression* mParent, tp::InitialierList<Expression*> args);
|
||||
};
|
||||
|
||||
struct ExpressionAriphm : public Expression {
|
||||
|
|
|
|||
|
|
@ -16,13 +16,13 @@ namespace obj {
|
|||
|
||||
OpCode mOp = OpCode::NONE;
|
||||
|
||||
enum class ArgType {
|
||||
enum class ArgType : tp::ualni {
|
||||
NO_ARG,
|
||||
PARAM,
|
||||
CONST,
|
||||
} mArgType = ArgType::NO_ARG;
|
||||
|
||||
enum class InstType {
|
||||
enum class InstType : tp::ualni {
|
||||
NONE,
|
||||
JUMP,
|
||||
JUMP_IF,
|
||||
|
|
@ -38,7 +38,7 @@ namespace obj {
|
|||
ConstObject* mConstData2 = NULL;
|
||||
|
||||
tp::alni mInstIdx = 0;
|
||||
tp::List<Instruction>::Node* mInstTarget = NULL;
|
||||
Instruction* mInstTarget = NULL;
|
||||
|
||||
Instruction();
|
||||
Instruction(ConstObject* constData);
|
||||
|
|
@ -46,7 +46,7 @@ namespace obj {
|
|||
Instruction(OpCode op, ConstObject* constData);
|
||||
Instruction(OpCode op, ConstObject* constData, ConstObject* constData2);
|
||||
Instruction(OpCode op, tp::alni param, tp::alni nBytes);
|
||||
Instruction(tp::List<Instruction>::Node* inst, InstType jump_type);
|
||||
Instruction(Instruction* inst, InstType jump_type);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
@ -31,7 +31,7 @@ namespace obj {
|
|||
tp::Buffer<Statement*> mStatements;
|
||||
bool mPushToScopeStack = false;
|
||||
|
||||
StatementScope(tp::init_list<Statement*> statements, bool aPushToScopeStack);
|
||||
StatementScope(tp::InitialierList<Statement*> statements, bool aPushToScopeStack);
|
||||
};
|
||||
|
||||
struct StatementFuncDef : public Statement {
|
||||
|
|
@ -39,7 +39,7 @@ namespace obj {
|
|||
tp::String mFunctionId;
|
||||
tp::Buffer<Statement*> mStatements;
|
||||
|
||||
StatementFuncDef(tp::String function_id, tp::init_list<tp::String> args, tp::init_list<Statement*> statements);
|
||||
StatementFuncDef(tp::String function_id, tp::InitialierList<tp::String> args, tp::InitialierList<Statement*> statements);
|
||||
};
|
||||
|
||||
struct StatementLocalDef : public Statement {
|
||||
|
|
@ -101,14 +101,14 @@ namespace obj {
|
|||
};
|
||||
|
||||
// Helpers
|
||||
StatementFuncDef* StmDefFunc(tp::String id, tp::init_list<tp::String> args, tp::init_list<Statement*> stms);
|
||||
StatementFuncDef* StmDefFunc(tp::String id, tp::InitialierList<tp::String> args, tp::InitialierList<Statement*> stms);
|
||||
StatementLocalDef* StmDefLocal(tp::String id, Expression* value);
|
||||
StatementCopy* StmCopy(Expression* left, Expression* right);
|
||||
StatementPrint* StmPrint(Expression* target);
|
||||
StatementReturn* StmReturn(Expression* obj);
|
||||
StatementReturn* StmReturn();
|
||||
StatementIf* StmIf(Expression* condition, StatementScope* on_true, StatementScope* on_false);
|
||||
StatementScope* StmScope(tp::init_list<Statement*> statements, bool aPushToScopeStack);
|
||||
StatementScope* StmScope(tp::InitialierList<Statement*> statements, bool aPushToScopeStack);
|
||||
StatementWhile* StmWhile(Expression* condition, StatementScope* scope);
|
||||
StatementIgnore* StmIgnore(Expression* expr);
|
||||
StatementClassDef* StmClassDef(tp::String id, StatementScope* scope);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue