public static class LaTeXTokeniser.ModeState extends Object
| Modifier and Type | Field and Description |
|---|---|
boolean |
foundTerminator
If terminator is not null, then this indicates whether the terminator was found when
parsing in this mode ended.
|
LaTeXMode |
latexMode
Current LaTeX mode we are parsing in
|
int |
startPosition
Position within
WorkingDocument where this mode started |
LaTeXTokeniser.Terminator |
terminator
Terminator we are searching for
|
LaTeXTokeniser.TokenisationMode |
tokenisationMode
Mode we're tokenising in
|
List<FlowToken> |
tokens
Tokens accumulated in this mode
|
| Constructor and Description |
|---|
ModeState(LaTeXTokeniser.TokenisationMode tokenisationMode,
LaTeXMode latexMode,
int startPosition,
LaTeXTokeniser.Terminator terminator) |
| Modifier and Type | Method and Description |
|---|---|
int |
computeLastTokenEndIndex()
Gets the end index of the
FrozenSlice corresponding to the last Token
recorded, returning the start position if nothing has been recorded. |
public final LaTeXTokeniser.TokenisationMode tokenisationMode
public LaTeXMode latexMode
public final int startPosition
WorkingDocument where this mode startedpublic final LaTeXTokeniser.Terminator terminator
public boolean foundTerminator
public ModeState(LaTeXTokeniser.TokenisationMode tokenisationMode, LaTeXMode latexMode, int startPosition, LaTeXTokeniser.Terminator terminator)
public int computeLastTokenEndIndex()
FrozenSlice corresponding to the last Token
recorded, returning the start position if nothing has been recorded.
This is useful for getting at the
"useful" content of a parse as it won't include the terminator.Copyright © 2008–2026 The University of Edinburgh. All rights reserved.