Scanner<TBuffer> Class

Converts a sequence of characters into a sequence of YAML tokens.

public class Scanner<TBuffer> where TBuffer : ILookAheadBuffer

Type parameters

TBuffer

Constructors

NameDescription
Scanner(TBuffer)Initializes a new instance of the Scanner<TBuffer> class.

Scanner(TBuffer)

Scanner.cs

Initializes a new instance of the Scanner<TBuffer> class.

public Scanner(TBuffer buffer)

Parameters

buffer TBuffer
The buffer.

Properties

NameDescription
CurrentGets the current token.
CurrentPositionGets the current position inside the input stream.

Current

Scanner.cs

Gets the current token.

public Token Current { get; }

Property value

Token

CurrentPosition

Scanner.cs

Gets the current position inside the input stream.

public Mark CurrentPosition { get; }

Property value

Mark The current position.

Methods

NameDescription
MoveNext()Moves to the next token.

MoveNext()

Scanner.cs

Moves to the next token.

public bool MoveNext()

Returns

bool

Constants

NameDescription
MaxBufferLengthDefines the max buffer length constant.

MaxBufferLength

Defines the max buffer length constant.

public const int MaxBufferLength = 12