Compare commits

..

No commits in common. "main" and "V1.0.1" have entirely different histories.
main ... V1.0.1

3 changed files with 12 additions and 8 deletions

View file

@ -32,8 +32,7 @@ struct Compiled {
variables: Vec<Variable>,
strings: HashMap<u32, String>,
functions: HashMap<u32, Compiled>,
try_catch: Option<u32>,
ctx: Context
try_catch: Option<u32>
}
#[derive(Debug, Clone)]
@ -754,8 +753,7 @@ fn compile_function(ast: Vec<ASTPart>, args: Option<Vec<String>>, registers: &mu
variables,
strings,
functions,
try_catch,
ctx: ctx.clone(),
try_catch
};
}
@ -827,7 +825,7 @@ fn compile_body(compiled: Compiled, fpos: &mut usize, ctx: &Context) -> (Vec<u8>
*fpos += 1;
append_be_num(&mut output, 3, *funcs as usize);
append_be_num(&mut output, 4, *fpos);
let (compiled, mut context) = compile_body(compiled.functions[funcs].clone(), fpos, &compiled.functions[funcs].ctx);
let (compiled, mut context) = compile_body(compiled.functions[funcs].clone(), fpos, ctx);
for c in &mut context {
c.c_funcid = *fpos
}

View file

@ -10,7 +10,7 @@ mod virtualmachine;
mod errors;
mod decompiler;
const CLIVER: [u8; 3] = [1,0,2];
const CLIVER: [u8; 3] = [1,0,1];
#[derive(Debug, Clone)]
struct Context {

View file

@ -1,2 +1,8 @@
hámozd test be szaft"test2.asl"szaft
gethelj a = szaft"asd"szaft+1
gethelj con = kábel.kapcsolódj(szaft"example.com:80"szaft)
con.írj(con, szaft"GET / HTTP/1.1
User-Agent: Astro Lang
Host: example.com
"szaft)
ugass(con.olvass(con, 5120))
con.zár(con)