struct StateStartComment {}
Expand description
Represents the possible start of a line or block comment.
Transitions to the following states for the seen input:
-
/
- go to CurrentState::LineComment (start of a line comment) -
*
- go to CurrentState::BlockComment (start of a block comment) -
{ANY}
- go to CurrentState::NormalText (not start of a comment) -
StateChar::Eof
- go to CurrentState::Done (no more input)
Implementations§
source§impl StateStartComment
impl StateStartComment
sourcepub fn new() -> Box<dyn IStateBehavior>
pub fn new() -> Box<dyn IStateBehavior>
Constructor
Returns
Returns a new instance of the StateStartComment struct as represented by the IStateBehavior trait.
Trait Implementations§
source§impl IStateBehavior for StateStartComment
impl IStateBehavior for StateStartComment
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