aboutsummaryrefslogtreecommitdiff
path: root/lib/xixanta/src/opcodes.rs
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mikisabate@gmail.com>2025-01-22 22:22:46 +0100
committerMiquel Sabaté Solà <mikisabate@gmail.com>2025-01-22 22:22:46 +0100
commit5d06ba11c981430aca68f2ea31771fca7f18529b (patch)
tree8ef437976a615ed942ea1a339000fb274419e0b6 /lib/xixanta/src/opcodes.rs
parent4a7e8db884fdaa80f6a026ec4c0c8409ea975d81 (diff)
downloadtools.nes-5d06ba11c981430aca68f2ea31771fca7f18529b.tar.gz
tools.nes-5d06ba11c981430aca68f2ea31771fca7f18529b.zip
Implement echo control statements
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
Diffstat (limited to 'lib/xixanta/src/opcodes.rs')
-rw-r--r--lib/xixanta/src/opcodes.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/xixanta/src/opcodes.rs b/lib/xixanta/src/opcodes.rs
index 865b5cd..752f8ea 100644
--- a/lib/xixanta/src/opcodes.rs
+++ b/lib/xixanta/src/opcodes.rs
@@ -1,4 +1,4 @@
-use crate::node::ControlType;
+use crate::node::{ControlType, EchoKind};
use std::collections::HashMap;
use std::fmt;
@@ -765,6 +765,10 @@ lazy_static! {
functions.insert(String::from(".endif"), Control { control_type: ControlType::EndIf, has_identifier: None, required_args: Some((0, 0)), touches_context: false, only_string: false });
functions.insert(String::from(".def"), Control { control_type: ControlType::Defined, has_identifier: None, required_args: Some((1, 1)), touches_context: false, only_string: false });
functions.insert(String::from(".defined"), Control { control_type: ControlType::Defined, has_identifier: None, required_args: Some((1, 1)), touches_context: false, only_string: false });
+ functions.insert(String::from(".info"), Control { control_type: ControlType::Echo(EchoKind::Info), has_identifier: None, required_args: Some((1, 1)), touches_context: false, only_string: true });
+ functions.insert(String::from(".out"), Control { control_type: ControlType::Echo(EchoKind::Info), has_identifier: None, required_args: Some((1, 1)), touches_context: false, only_string: true });
+ functions.insert(String::from(".warning"), Control { control_type: ControlType::Echo(EchoKind::Warning), has_identifier: None, required_args: Some((1, 1)), touches_context: false, only_string: true });
+ functions.insert(String::from(".error"), Control { control_type: ControlType::Echo(EchoKind::Error), has_identifier: None, required_args: Some((1, 1)), touches_context: false, only_string: true });
functions
};