Archived
add demo text; made executable for the demo
This commit is contained in:
+11
-1
@@ -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)]
|
||||
|
||||
Reference in New Issue
Block a user