mirror of
https://github.com/ValKmjolnir/Nasal-Interpreter.git
synced 2026-07-22 10:58:47 +08:00
🐛 fix ast print bug & delete some macros
This commit is contained in:
+3
-3
@@ -264,7 +264,7 @@ private:
|
||||
void singleop(const u32);
|
||||
public:
|
||||
codegen(error& e):fileindex(0),err(e),file(nullptr){}
|
||||
void compile(const parse&,const linker&);
|
||||
const error& compile(const parse&,const linker&);
|
||||
void print();
|
||||
const std::vector<string>& strs() const {return str_res;}
|
||||
const std::vector<f64>& nums() const {return num_res;}
|
||||
@@ -1235,7 +1235,7 @@ void codegen::ret_gen(const ast& node)
|
||||
gen(op_ret,0,node.line());
|
||||
}
|
||||
|
||||
void codegen::compile(const parse& parse,const linker& import)
|
||||
const error& codegen::compile(const parse& parse,const linker& import)
|
||||
{
|
||||
fileindex=0;
|
||||
file=import.filelist().data();
|
||||
@@ -1248,7 +1248,7 @@ void codegen::compile(const parse& parse,const linker& import)
|
||||
die("too many global variants: "+std::to_string(global.size()),0,0);
|
||||
if(code.size()>0xffffffff)
|
||||
die("too large generated bytecode file: "+std::to_string(code.size()),0,0);
|
||||
err.chkerr();
|
||||
return err;
|
||||
}
|
||||
|
||||
void codegen::singleop(const u32 index)
|
||||
|
||||
Reference in New Issue
Block a user