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

Enum Directive

crates/asm-to-binary/src/assembler/directive.rs:3–16  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1/// A parsed assembler directive line (e.g. `.section .text`, `.globl main`).
2#[derive(Debug, Clone, PartialEq, Eq)]
3pub enum Directive {
4 Section(String),
5 Globl(String),
6 Align(u64),
7 Balign(u64),
8 Byte(u8),
9 Half(u16),
10 Word(u32),
11 Dword(u64),
12 Asciz(String),
13 Space(u64),
14 Equ(String, i64),
15 Unknown(String),
16}
17
18impl Directive {
19 /// Try to parse a raw directive string. Returns None if it doesn't start with `.`.

Callers 9

asm_text_to_tokensFunction · 0.85
dirFunction · 0.85
switch_sectionMethod · 0.85
emit_rawMethod · 0.85
start_functionMethod · 0.85
parse_asm_textFunction · 0.85
run_kernelFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected