struct StateLineComment {}
Expand description
Represents being in a line comment.
Transitions to the following states for the seen input:
-
\n
- go to CurrentState::NormalText (a newline is the end of a line comment) -
StateChar::Eof
- go to CurrentState::Done (no more input)
Implementations§
source§impl StateLineComment
impl StateLineComment
sourcepub fn new() -> Box<dyn IStateBehavior>
pub fn new() -> Box<dyn IStateBehavior>
Constructor
Returns
Returns a new instance of the StateLineComment struct as represented by the IStateBehavior trait.
Trait Implementations§
source§impl IStateBehavior for StateLineComment
impl IStateBehavior for StateLineComment
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