diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-02-09 10:31:14 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-02-09 10:31:14 +0800 |
| commit | 12d08d599a41b15e0a20113d1a521c8c3a232e79 (patch) | |
| tree | 2052020ecaa9a07043e1a76410ad5649226d728d /built_res/src/res_sentences.rs | |
Initialize MarkDialog project with parser and workspace structure
Diffstat (limited to 'built_res/src/res_sentences.rs')
| -rw-r--r-- | built_res/src/res_sentences.rs | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/built_res/src/res_sentences.rs b/built_res/src/res_sentences.rs new file mode 100644 index 0000000..8354ded --- /dev/null +++ b/built_res/src/res_sentences.rs @@ -0,0 +1,51 @@ +use crate::structs::sentence::{Sentence, Token}; + +#[derive(Hash, PartialEq, Eq)] +pub enum SentenceId { + // 在此处确认所有跳转点 + Main0, + Main1, + Main2, + Ok1, +} + +pub fn get_sentence(id: SentenceId) -> Option<Sentence<'static>> { + match id { + SentenceId::Main0 => Some(Sentence { + content_tokens: &[ + &Token::Text("你好我是"), + &Token::Command("red"), + &Token::Text("猫尾草"), + &Token::Command("/"), + ], + next_sentence: Some(SentenceId::Main1), + }), + SentenceId::Main1 => Some(Sentence { + content_tokens: &[ + &Token::Text("你好我是"), + &Token::Command("red"), + &Token::Text("猫尾草"), + &Token::Command("/"), + ], + next_sentence: Some(SentenceId::Main2), + }), + SentenceId::Main2 => Some(Sentence { + content_tokens: &[ + &Token::Text("你好我是"), + &Token::Command("red"), + &Token::Text("猫尾草"), + &Token::Command("/"), + ], + next_sentence: Some(SentenceId::Ok1), + }), + SentenceId::Ok1 => Some(Sentence { + content_tokens: &[ + &Token::Text("你好我是"), + &Token::Command("red"), + &Token::Text("猫尾草"), + &Token::Command("/"), + ], + next_sentence: None, + }), + } +} |
