struct StateEscapedSingleQuotedText {}
Expand description
Represents being in an escaped character sequence inside a single-quoted string. We don’t do anything with the escaped character other than output it. Handling escaped characters allows us to more accurately detect the end of the string.
Transitions to the following states for the seen input:
-
{ANY}
- go to CurrentState::SingleQuotedText (end of escape sequence) -
StateChar::Eof
- go to CurrentState::Done (no more input)
Implementations§
source§impl StateEscapedSingleQuotedText
impl StateEscapedSingleQuotedText
sourcepub fn new() -> Box<dyn IStateBehavior>
pub fn new() -> Box<dyn IStateBehavior>
Constructor
Returns
Returns a new instance of the StateEscapedSingleQuotedText struct as represented by the IStateBehavior trait.
Trait Implementations§
source§impl IStateBehavior for StateEscapedSingleQuotedText
impl IStateBehavior for StateEscapedSingleQuotedText
source§fn go_next(&mut self, context: &mut dyn IStateContext) -> CurrentState
fn go_next(&mut self, context: &mut dyn IStateContext) -> CurrentState
Process the next character from the context, returning the next
state the context should move to. Read more