Pardon our dust! Docs for Yarn Spinner for Unity 3.2 and Yarn Spinner for Godot C# are on docs.yarnspinner.dev (the old docs site). Docs for Yarn Spinner for Unity 3.3 (pre-release, out ASAP), Yarn Spinner for Godot GDScript and Yarn Spinner for Unreal Engine (work in progress) are on /docs/ (the new docs site).

IndentAwareLexer

A Lexer subclass that detects newlines and generates indent and dedent tokens accordingly.
public abstract class IndentAwareLexer : Lexer

Inherits from Lexer

#Nested Types

#Constructors

#IndentAwareLexer(ICharStream, TextWriter, TextWriter)

Initializes a new instance of the IndentAwareLexer class.
public IndentAwareLexer(ICharStream input, TextWriter output, TextWriter errorOutput)

Parameters

  • inputICharStream
    The incoming character stream.
  • outputSystem.IO.TextWriter
    The System.IO.TextWriter to send output to.
  • errorOutputSystem.IO.TextWriter
    The System.IO.TextWriter to 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

  • valbool
    The value to set.
This value can be accessed by calling IsInWhenClause().

Generated from Yarn Spinner for Unity 3.3.