Wrap each line of assembly text in a `Directive` token. The assembler's pass-0 parser recognises labels (`name:`), section directives (`.text`, `.asciz`, ...) and most instruction mnemonics from lines that begin with a tab or space. Unrecognised mnemonics become no-op comments.
(text: &str)
| 464 | Ok((fs, config)) |
| 465 | } |
| 466 | |
| 467 | fn cli_workspace_for_input(input: &str) -> Result<(NativeFs, VPath), CliError> { |
| 468 | let cwd = std::env::current_dir()?; |
| 469 | let path = Path::new(input); |
| 470 | let (root, relative) = if path.is_absolute() { |
| 471 | let canonical = path.canonicalize()?; |
| 472 | let cwd = cwd.canonicalize()?; |
| 473 | if let Ok(relative) = canonical.strip_prefix(&cwd) { |
no test coverage detected