Website Summary Files Commits Branches @commit @diff @stats
path: root / assembler / src / parser / code_gen.rs
blob: 375a8cb0fe16fcd0e0948e37f7a5ebd9b9a7c488 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
use super::{ Program, Address };

impl Program {
    pub(crate) fn remove_definition_addresses(&mut self) {
        for instr in &mut self.instructions {
            for arg in &mut instr.args {
                if let Address::Definitions(name) = arg {
                    *arg = self.definitions[name].clone();
                }
            }
        }
    }
}