remove output from lexer, fixes
This commit is contained in:
@@ -32,28 +32,28 @@ gen_bytecode (FILE *src_file)
|
||||
assert (st);
|
||||
while (st->type != STMT_EOF)
|
||||
{
|
||||
pp_statement (st);
|
||||
//pp_statement (st);
|
||||
st = parser_parse_statement ();
|
||||
assert (st);
|
||||
}
|
||||
pp_finish ();
|
||||
//pp_finish ();
|
||||
|
||||
FILE *file = fopen (FILE_NAME, "w+b");
|
||||
|
||||
OPCODE op0;
|
||||
|
||||
save_op_loop_inf (file, op0, 1);
|
||||
save_op_call_1 (file, op0, 0, LED_GREEN);
|
||||
save_op_call_1 (file, op0, 0, LED_BLUE);
|
||||
save_op_call_1 (file, op0, 0, LED_ORANGE);
|
||||
save_op_call_1 (file, op0, 0, LED_RED);
|
||||
save_op_call_1 (file, op0, 0, LED_GREEN);
|
||||
save_op_call_1 (file, op0, 0, LED_BLUE);
|
||||
save_op_call_1 (file, op0, 0, LED_ORANGE);
|
||||
save_op_call_1 (file, op0, 0, LED_RED);
|
||||
save_op_jmp (file, op0, 0);
|
||||
|
||||
fclose (file);
|
||||
// FILE *file = fopen (FILE_NAME, "w+b");
|
||||
//
|
||||
// OPCODE op0;
|
||||
//
|
||||
// save_op_loop_inf (file, op0, 1);
|
||||
// save_op_call_1 (file, op0, 0, LED_GREEN);
|
||||
// save_op_call_1 (file, op0, 0, LED_BLUE);
|
||||
// save_op_call_1 (file, op0, 0, LED_ORANGE);
|
||||
// save_op_call_1 (file, op0, 0, LED_RED);
|
||||
// save_op_call_1 (file, op0, 0, LED_GREEN);
|
||||
// save_op_call_1 (file, op0, 0, LED_BLUE);
|
||||
// save_op_call_1 (file, op0, 0, LED_ORANGE);
|
||||
// save_op_call_1 (file, op0, 0, LED_RED);
|
||||
// save_op_jmp (file, op0, 0);
|
||||
//
|
||||
// fclose (file);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -39,9 +39,12 @@ OP_DEF (jmp)
|
||||
|
||||
OP_DEF (decl) { };
|
||||
|
||||
OP_DEF (named_func_decl) { };
|
||||
OP_DEF (decl_func_named)
|
||||
{
|
||||
OP_TYPE_IDX name_literal_idx;
|
||||
};
|
||||
|
||||
OP_DEF (anon_func_decl) { };
|
||||
OP_DEF (decl_func_anon) { };
|
||||
|
||||
OP_DEF (decl_var_global) { };
|
||||
|
||||
@@ -108,10 +111,11 @@ union __opdata
|
||||
OP (nop);
|
||||
} data;
|
||||
|
||||
OPCODE {
|
||||
OPCODE{
|
||||
opfunc opfunc_ptr;
|
||||
union __opdata data;
|
||||
} __packed;
|
||||
}
|
||||
__packed;
|
||||
|
||||
void save_op_jmp (FILE *, OPCODE, int);
|
||||
void save_op_call_1 (FILE *, OPCODE, int, int);
|
||||
|
||||
Reference in New Issue
Block a user