IndentAwareLexer
A Lexer subclass that detects newlines and generates indent and
dedent tokens accordingly.
public abstract class IndentAwareLexer : LexerInherits from Lexer
#Nested Types
- LexerWarning structA warning emitted during lexing.
#Constructors
#IndentAwareLexer(ICharStream, TextWriter, TextWriter)
Initializes a new instance of the IndentAwareLexer class.
public IndentAwareLexer(ICharStream input, TextWriter output, TextWriter errorOutput)Parameters
inputICharStreamThe incoming character stream.outputSystem.IO.TextWriterTheSystem.IO.TextWriterto send output to.errorOutputSystem.IO.TextWriterTheSystem.IO.TextWriterto send errors to.
#Properties
#Warnings
Gets the collection of warnings determined during lexing.
public IEnumerable<LexerWarning> Warnings { get; }Type IEnumerable
#Methods
#IsInWhenClause()
Returns a value indicating whether the lexer is currently lexing an
expression that's part of a 'when' clause.
public bool IsInWhenClause();Returns Boolean
This value is set by SetInWhenClause(bool).
#NextToken()
public override IToken? NextToken()Returns Nullable
#PopMode()
public override int PopMode()Returns Int32
#PushMode(int)
public override void PushMode(int m)Parameters
mint
#SetInWhenClause(bool)
Sets a value indicating whether the lexer is currently lexing an
expression that's part of a 'when' clause.
public virtual void SetInWhenClause(bool val);Parameters
valboolThe value to set.
This value can be accessed by calling IsInWhenClause().
Generated from Yarn Spinner for Unity 3.3.