Skip to content

Commit

Permalink
Finish the parsing of the declare byte statement, next will be some p…
Browse files Browse the repository at this point in the history
…arsing tests for it.
  • Loading branch information
sciguyryan committed Jul 16, 2024
1 parent dd9b177 commit 58a2954
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions redox-core/src/parsing/asm_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -466,8 +466,7 @@ impl<'a> AsmParser<'a> {
}

println!("label = {label}, declaration_type = {declaration_type:?}, storage = {storage:?}");

println!("{:?}", String::from_utf8(storage));
//println!("{:?}", String::from_utf8(storage));
}

/// Parse a section line of an ASM file.
Expand Down Expand Up @@ -821,7 +820,13 @@ impl<'a> AsmParser<'a> {
return;
}

println!("argument: {}", arg);
// Are we handling a byte literal?
if let Ok(val) = AsmParser::try_parse_u8_immediate(arg) {
bytes.push(val);
return;
}

panic!("invalid syntax - unrecognized byte declaration - {arg}");
}

/// Try to parse an expression.
Expand Down
2 changes: 1 addition & 1 deletion redox-terminal/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ fn main() {
}

let code = "section .data
banana db \"apples\"
banana db \"apples\",0xff
section .text
push 0
call :LABEL_1
Expand Down

0 comments on commit 58a2954

Please sign in to comment.