| 1 | /// A parsed assembler directive line (e.g. `.section .text`, `.globl main`). |
| 2 | #[derive(Debug, Clone, PartialEq, Eq)] |
| 3 | pub 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 | |
| 18 | impl Directive { |
| 19 | /// Try to parse a raw directive string. Returns None if it doesn't start with `.`. |
no outgoing calls
no test coverage detected