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

View file

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

View file

@ -1,2 +1,8 @@
hámozd test be szaft"test2.asl"szaft gethelj con = kábel.kapcsolódj(szaft"example.com:80"szaft)
gethelj a = szaft"asd"szaft+1 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)