Class AnErrorToken

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type AnErrorToken = class(ATokenFromSource)

Description

This class represents an erroneous or unrecognized token. Instances of it are normally only constructed when ATokenFromSource.readFrom encounters a character in the source stream that has not been classified by the language definition being used to parse the source.

Hierarchy

Overview

Methods

Public function init: boolean; override;
Public function readFrom(const Source: AStream): TStreamIOSize; override;

Description

Methods

Public function init: boolean; override;

Initializer

Public function readFrom(const Source: AStream): TStreamIOSize; override;

Read the token from the given source stream.

This method reads characters from Source until a recognized character is encountered.

This method is written with the assumption that Source represents an instance of ATextInputStream. It is probably an error to attempt to read a token such as this from an intermediate code stream, since intermediate code should contain no erroneous or unrecognized tokens – but if it is necessary, an instance of AToken should be used instead.

Returns

The total number of bytes read from Source.


Generated by PasDoc 0.13.0 on 2015-01-10 17:13:18