Class TCasScriptLexer

Unit

Declaration

type TCasScriptLexer = class(TObject)

Description

Hierarchy

  • TObject
  • TCasScriptLexer

Overview

Methods

Public function NextToken: TToken;
Public constructor Create(const AText: string);
Public function TokenDescription: string;
Public procedure CheckTokenIs(Tok: TToken);

Properties

Public property Token: TToken read FToken;
Public property TokenInteger: Int64 read FTokenInteger;
Public property TokenFloat: Float read FTokenFloat;
Public property TokenString: string read FTokenString;
Public property TokenBoolean: boolean read FTokenBoolean;
Public property TokenFunctionClass: TCasScriptFunctionClass read FTokenFunctionClass;
Public property TextPos: Integer read FTextPos;
Public property Text: string read FText;

Description

Methods

Public function NextToken: TToken;

NextToken moves to next token (updating fields Token, and eventually TokenFloat, TokenString and TokenFunctionClass) and returns the value of field Token.

When Token is tokEnd, then NextToken doesn't do anything, i.e. Token will remain tokEnd forever.

Exceptions raised
ECasScriptLexerError
Public constructor Create(const AText: string);
 
Public function TokenDescription: string;

Current token textual description. Useful mainly for debugging lexer.

Public procedure CheckTokenIs(Tok: TToken);

Check is current token Tok, eventually rise parser error. This is an utility for parser.

Exceptions raised
ECasScriptParserError
if current Token doesn't match required Tok.

Properties

Public property Token: TToken read FToken;
 
Public property TokenInteger: Int64 read FTokenInteger;
 
Public property TokenFloat: Float read FTokenFloat;
 
Public property TokenString: string read FTokenString;
 
Public property TokenBoolean: boolean read FTokenBoolean;
 
Public property TokenFunctionClass: TCasScriptFunctionClass read FTokenFunctionClass;
 
Public property TextPos: Integer read FTextPos;

Position of lexer in the Text string.

Public property Text: string read FText;

Text that this lexer reads.


Generated by PasDoc 0.16.0.