diff options
| author | Miquel Sabaté Solà <mikisabate@gmail.com> | 2025-01-16 16:33:10 +0100 |
|---|---|---|
| committer | Miquel Sabaté Solà <mikisabate@gmail.com> | 2025-01-16 16:33:10 +0100 |
| commit | 2455e2bbcfb4372b13a351471a49a585ceb1597c (patch) | |
| tree | b751542e846f4eb075163c5580d8b4d85295a630 /lib/xixanta/src/opcodes.rs | |
| parent | a3a630dfee207c111213d2cad85ceb983df7625a (diff) | |
| download | tools.nes-2455e2bbcfb4372b13a351471a49a585ceb1597c.tar.gz tools.nes-2455e2bbcfb4372b13a351471a49a585ceb1597c.zip | |
Implement .ifdef/.ifndef statements
They are just synonyms for ".if .defined" and ".if !.defined"
respectively.
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
Diffstat (limited to 'lib/xixanta/src/opcodes.rs')
| -rw-r--r-- | lib/xixanta/src/opcodes.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/xixanta/src/opcodes.rs b/lib/xixanta/src/opcodes.rs index 80878ec..865b5cd 100644 --- a/lib/xixanta/src/opcodes.rs +++ b/lib/xixanta/src/opcodes.rs @@ -758,6 +758,8 @@ lazy_static! { functions.insert(String::from(".res"), Control { control_type: ControlType::ReserveMemory, has_identifier: None, required_args: Some((1, 2)), touches_context: false, only_string: false }); functions.insert(String::from(".asciiz"), Control { control_type: ControlType::Asciiz, has_identifier: None, required_args: Some((1, 1)), touches_context: false, only_string: true }); functions.insert(String::from(".if"), Control { control_type: ControlType::If, has_identifier: None, required_args: Some((1, 1)), touches_context: false, only_string: false }); + functions.insert(String::from(".ifdef"), Control { control_type: ControlType::IfDef, has_identifier: None, required_args: Some((1, 1)), touches_context: false, only_string: false }); + functions.insert(String::from(".ifndef"), Control { control_type: ControlType::IfNDef, has_identifier: None, required_args: Some((1, 1)), touches_context: false, only_string: false }); functions.insert(String::from(".elsif"), Control { control_type: ControlType::Elsif, has_identifier: None, required_args: Some((1, 1)), touches_context: false, only_string: false }); functions.insert(String::from(".else"), Control { control_type: ControlType::Else, has_identifier: None, required_args: Some((0, 0)), touches_context: false, only_string: false }); functions.insert(String::from(".endif"), Control { control_type: ControlType::EndIf, has_identifier: None, required_args: Some((0, 0)), touches_context: false, only_string: false }); |
