Package atessera.markup
Interface TextStateParser.State<M>
- Type Parameters:
M- the type of the model object
- Enclosing class:
TextStateParser<M>
public static interface TextStateParser.State<M>
Represents a parsing state that processes lines belonging to a specific
section of the input.
While this state is active, each line that does not trigger a state
transition is passed to onLine. When the parser is about
to switch to a different state or reaches the end of input,
commit is called to finalize any accumulated data.
-
Method Summary
-
Method Details
-
onLine
Processes a single line within the current state. The line is passed in its original form (without trimming).- Parameters:
line- the line of text to processmodel- the model to update
-
commit
Finalizes this state. Called when the parser is about to transition to a different state or when the end of input is reached. After this method is called, the state is discarded and no further calls toonLinewill be made for it.- Parameters:
model- the model to finalize
-