add native function runtime.argv() to get command line arguments

This commit is contained in:
ValKmjolnir
2022-06-04 20:12:00 +08:00
parent 6f709f30f5
commit ec2866021f
9 changed files with 67 additions and 22 deletions
+5 -3
View File
@@ -23,7 +23,8 @@ public:
bk_fidx(0),bk_line(0){}
void run(
const nasal_codegen&,
const nasal_import&
const nasal_import&,
const std::vector<std::string>&
);
};
@@ -176,10 +177,11 @@ void nasal_dbg::interact()
void nasal_dbg::run(
const nasal_codegen& gen,
const nasal_import& linker)
const nasal_import& linker,
const std::vector<std::string>& argv)
{
detail_info=true;
init(gen.get_strs(),gen.get_nums(),gen.get_code(),linker.get_file());
init(gen.get_strs(),gen.get_nums(),gen.get_code(),linker.get_file(),argv);
const void* opr_table[]=
{
&&vmexit, &&intg, &&intl, &&loadg,