Skip to main content

Class ScannerLexer

Namespace: OceanApocalypse.RSML.Language.Lexing
Assembly: RSML.Language.Lexing.dll

An implementation of a RSML lexer backed by a scanner.

public class ScannerLexer : Lexer, ILexer, IToolchainComponent, IDisposable

Inheritance

ObjectLexerScannerLexer

Implements

ILexer, IToolchainComponent, IDisposable

Inherited Members

Lexer.Configuration, Lexer.Inject(ToolchainConfigurations), Lexer.Lex(), Lexer.Dispose(), Lexer.Dispose(Boolean), Lexer.GetNextToken(), Object.Equals(Object?), Object.Equals(Object?, Object?), Object.GetHashCode(), Object.GetType(), Object.MemberwiseClone(), Object.ReferenceEquals(Object?, Object?), Object.ToString()

Constructors

ScannerLexer(IScanner, DiagnosticCollector)

An implementation of a RSML lexer backed by a scanner.

public ScannerLexer(IScanner scanner, DiagnosticCollector diagnostics)

Parameters

scanner IScanner

A scanner.

diagnostics DiagnosticCollector

A collector for all emitted diagnostics.

Methods

GetNextToken()

Returns the next token.

public override Result<Token> GetNextToken()

Returns

Result<Token>

The next token.

Lex()

Tokenizes a source passed to the lexer.

public override IEnumerable<Token> Lex()

Returns

IEnumerable<Token>

The tokens.