Class: Token

Hierarchy

Constructors

constructor

+ new Token(kind: TokenKind, input: string, begin: number, end: number, file?: undefined | string): Token

Defined in tokens/token.ts:3

Parameters:

Name Type
kind TokenKind
input string
begin number
end number
file? undefined | string

Returns: Token

Properties

begin

begin: number

Defined in tokens/token.ts:7


end

end: number

Defined in tokens/token.ts:8


Optional file

file? : undefined | string

Defined in tokens/token.ts:9


input

input: string

Defined in tokens/token.ts:6


kind

kind: TokenKind

Defined in tokens/token.ts:5

Methods

getPosition

getPosition(): number[]

Defined in tokens/token.ts:14

Returns: number[]


getText

getText(): string

Defined in tokens/token.ts:11

Returns: string


size

size(): number

Defined in tokens/token.ts:24

Returns: number