forked from xxq250/Nasal-Interpreter
📝 fix some warnings.
This commit is contained in:
+1
-1
@@ -126,7 +126,7 @@ void nasal_parse::die(uint32_t line,std::string info,bool report_prev=false)
|
|||||||
int col=(int)tokens[ptr].col-(int)tokens[ptr].str.length();
|
int col=(int)tokens[ptr].col-(int)tokens[ptr].str.length();
|
||||||
if(tokens[ptr].type==tok_str)
|
if(tokens[ptr].type==tok_str)
|
||||||
col-=2; // tok_str's str has no \"
|
col-=2; // tok_str's str has no \"
|
||||||
if(report_prev && ptr-1>=0) // used to report lack of ',' ';'
|
if(report_prev && ptr) // used to report lack of ',' ';'
|
||||||
{
|
{
|
||||||
line=tokens[ptr-1].line;
|
line=tokens[ptr-1].line;
|
||||||
col=tokens[ptr-1].col+1;
|
col=tokens[ptr-1].col+1;
|
||||||
|
|||||||
+4
-1
@@ -122,7 +122,10 @@ protected:
|
|||||||
void opr_mcallh();
|
void opr_mcallh();
|
||||||
void opr_ret();
|
void opr_ret();
|
||||||
public:
|
public:
|
||||||
nasal_vm():gc(pc,localr,memr,funcr,upvalr,canary,top,stack){}
|
nasal_vm():pc(0),localr(nullptr),memr(nullptr),funcr(nil),
|
||||||
|
upvalr(nil),canary(nullptr),top(stack),
|
||||||
|
num_table(nullptr),str_table(nullptr),
|
||||||
|
gc(pc,localr,memr,funcr,upvalr,canary,top,stack){}
|
||||||
void run(
|
void run(
|
||||||
const nasal_codegen&,
|
const nasal_codegen&,
|
||||||
const nasal_import&,
|
const nasal_import&,
|
||||||
|
|||||||
Reference in New Issue
Block a user