ClassicToken Class
Namespace: Stimulsoft.Data.Expressions.Antlr.Runtime
A Token object like we’d use in ANTLR 2.x; has an actual string created and associated with this object. These objects are needed for imaginary tree nodes that have payload objects. We need to create a Token object that has a string; the tree node will point at this token. CommonToken has indexes into a char stream and hence cannot be used to introduce new strings.
Inheritance
Implements: IToken
Constructors
| Constructor | Description |
|---|---|
| constructor(number type, string text, number channel) |
constructor(type: number, text: string, channel: number)
Parameters
- type (number)
- text (string)
- channel (number)
Properties
| Property | Type | Description |
|---|---|---|
| tokenIndex | number |
Methods
| Method | Returns | Description |
|---|---|---|
| implements | any[] | |
| toString | string |
Method Details
implements
implements(): any[]
Returns any[]
toString
toString(): string
Returns string
Fields
| Field | Type | Description |
|---|---|---|
| channel | number | |
| channelStr | any | |
| charPositionInLine | number | |
| index | number | What token number is this from 0..n-1 tokens |
| inputStream | ICharStream | |
| line | number | |
| startIndex | any | |
| stopIndex | any | |
| text | string | |
| txt | any | |
| txt | any | |
| txt | any | |
| txt | any | |
| type | number |