pub enum CurrentState {
Initial,
NormalText,
DoubleQuotedText,
SingleQuotedText,
EscapedDoubleQuoteText,
EscapedSingleQuoteText,
StartComment,
LineComment,
BlockComment,
EndBlockComment,
Done,
}Expand description
Represents the current state of the state machine.
Variants§
Initial
State before the state machine actually starts. transitions to NormalText
NormalText
" transitions to QuotedText, / transitions to StartComment, EOF_CHAR transitions to Done
DoubleQuotedText
\ transitions to EscapedDoubleQuoteText, “ transitions to NormalText, EOF_CHAR transitions to Done
SingleQuotedText
' transitions to EscapedSingleQuoteText, \ transitions to NormalText, EOF_CHAR transitions to Done
EscapedDoubleQuoteText
\ transitions to QuotedText, EOF_CHAR transitions to Done
EscapedSingleQuoteText
\ transitions to SingleQuotedText, EOF_CHAR transitions to Done
StartComment
/ transitions to LineComment, * transitions to BlockComment, EOF_CHAR transitions to Done, all else transitions to NormalText
LineComment
\\n transitions to NormalText, EOF_CHAR transitions to Done
BlockComment
* transitions to EndBlockComment, EOF_CHAR transitions to Done
EndBlockComment
/ transitions to NormalText, EOF_CHAR transitions to Done, all else transitions to BlockComment
Done
Indicates processing is done
Trait Implementations§
source§impl Clone for CurrentState
impl Clone for CurrentState
source§fn clone(&self) -> CurrentState
fn clone(&self) -> CurrentState
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Hash for CurrentState
impl Hash for CurrentState
source§impl PartialEq<CurrentState> for CurrentState
impl PartialEq<CurrentState> for CurrentState
source§fn eq(&self, other: &CurrentState) -> bool
fn eq(&self, other: &CurrentState) -> bool
self and other values to be equal, and is used
by ==.