fixing
This commit is contained in:
parent
79d4c36440
commit
37b6e8ecdb
4 changed files with 11 additions and 7 deletions
|
@ -807,7 +807,7 @@ fn compile_body(compiled: Compiled, fpos: &mut usize, ctx: &Context) -> (Vec<u8>
|
|||
pub fn compile(ast: Vec<ASTPart>, ctx: &Context) -> (Vec<u8>, Vec<Context>) {
|
||||
let mut next_var_id: u32 = 1;
|
||||
let mut registers: Vec<RegisterState> = vec![];
|
||||
for i in 0..17 {
|
||||
for i in 0..16 {
|
||||
registers.push(RegisterState {
|
||||
id: i as u8,
|
||||
used: false,
|
||||
|
|
|
@ -213,7 +213,8 @@ pub fn print_error(error: &ASLError, ctx: &Context) {
|
|||
out.push_str(¤t);
|
||||
|
||||
out.push_str("\n");
|
||||
out.push_str(" ");
|
||||
out.push_str(" ");
|
||||
out.push_str(&" ".repeat(line.to_string().len()));
|
||||
out.push_str(&" ".repeat(column - 1));
|
||||
out.push_str("^ ");
|
||||
if error.message.len() < 1 {
|
||||
|
|
|
@ -501,7 +501,7 @@ fn load_func(data: Vec<u8>, offset: &mut usize) -> DecompiledFunction {
|
|||
impl Machine {
|
||||
pub fn new(ctx: Vec<Context>) -> Self {
|
||||
let mut registers = Vec::new();
|
||||
for i in 0..17 {
|
||||
for i in 0..16 {
|
||||
registers.push(Register {
|
||||
id: i,
|
||||
pointer: 0,
|
||||
|
|
11
test.asl
11
test.asl
|
@ -1,8 +1,11 @@
|
|||
gethelj listener = kábel.halgass(szaft"0.0.0.0"szaft, 1010)
|
||||
gethelj stream = listener.kérés(listener)
|
||||
|
||||
ugass(stream.olvass(stream, 1024))
|
||||
stream.írj(stream, szaft"HTTP/1.1 200 OK
|
||||
amíg geny (piszv) {
|
||||
gethelj stream = listener.kérés(listener)
|
||||
ugass(stream.olvass(stream, 1024))
|
||||
stream.írj(stream, szaft"HTTP/1.1 200 OK
|
||||
Content-type: text/html; charset=utf-8
|
||||
|
||||
szafal a pofád!"szaft)
|
||||
szafal a pofád!"szaft)
|
||||
stream.zár(stream)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue