IndentAwareLexer

Class in Yarn.Compiler

Inherits from Antlr4.Runtime.Lexer

Summary

A Lexer subclass that detects newlines and generates indent and dedent tokens accordingly.

public abstract class IndentAwareLexer : Lexer

Constructors

NameDescription
IndentAwareLexer(ICharStream,TextWriter,TextWriter)Initializes a new instance of the IndentAwareLexer class.

Methods

NameDescription
IsInWhenClause()Returns a value indicating whether the lexer is currently lexing an expression that’s part of a ‘when’ clause.
NextToken()
SetInWhenClause(bool)Sets a value indicating whether the lexer is currently lexing an expression that’s part of a ‘when’ clause.

Properties

NameDescription
WarningsGets the collection of warnings determined during lexing.

Structs

NameDescription
LexerWarningA warning emitted during lexing.