MCPcopy Create free account
hub / github.com/LPC4/Full-Stack / split_mnemonic

Function split_mnemonic

crates/asm-to-binary/src/assembler/parser.rs:487–492  ·  view source on GitHub ↗
(line: &str)

Source from the content-addressed store, hash-verified

485 s.parse::<i64>().ok()
486 }
487}
488
489// Split `"rd, rest"` into `(rd_str, rest_str)`.
490fn parse_two_fields(operands: &str) -> Option<(&str, &str)> {
491 let comma = operands.find(',')?;
492 Some((operands[..comma].trim(), operands[comma + 1..].trim()))
493}
494
495// Parse `"rd, rs"` -> `(rd_reg, rs_reg)`. Used by `mv`.

Callers 1

parse_instruction_lineFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected