add demo text; made executable for the demo

This commit is contained in:
2024-12-09 04:58:26 +09:00
parent ba3b003792
commit e49a1794e6
2 changed files with 29 additions and 1 deletions
+11 -1
View File
@@ -164,7 +164,9 @@ impl Iterator for Tokenizer {
return self.latest.take();
}
x => {
if !x.is_ascii_alphanumeric() && x != '=' && x != ':' {
if !x.is_ascii_alphanumeric()
&& !vec!['=', ':', '"', '\'', '.', '/', '(', ')', '!'].contains(&x)
{
panic!("Unexpected character: {}", x);
}
self.buffer.push(x);
@@ -210,6 +212,11 @@ impl Iterator for Tokenizer {
}
}
},
State::InQuote => match c {
'"' => todo!(),
_ => todo!(),
},
State::InDoubleQuote => todo!(),
}
}
}
@@ -224,6 +231,9 @@ enum State {
AfterDefine,
Behavior,
BehaviorSeparator,
InQuote,
InDoubleQuote,
}
#[derive(Debug, Clone, PartialEq, Eq)]