Class: WordToken

Hierarchy

Constructors

constructor

+ new WordToken(input: string, begin: number, end: number, file?: undefined | string): WordToken

Overrides Token.constructor

Defined in tokens/word-token.ts:7

Parameters:

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

Returns: WordToken

Properties

begin

begin: number

Overrides Token.begin

Defined in tokens/word-token.ts:10


content

content: string

Defined in tokens/word-token.ts:7


end

end: number

Overrides Token.end

Defined in tokens/word-token.ts:11


Optional file

file? : undefined | string

Overrides Token.file

Defined in tokens/word-token.ts:12


input

input: string

Overrides Token.input

Defined in tokens/word-token.ts:9


kind

kind: TokenKind

Inherited from Token.kind

Defined in tokens/token.ts:5

Methods

getPosition

getPosition(): number[]

Inherited from Token.getPosition

Defined in tokens/token.ts:14

Returns: number[]


getText

getText(): string

Inherited from Token.getText

Defined in tokens/token.ts:11

Returns: string


isNumber

isNumber(allowSign: boolean): boolean

Defined in tokens/word-token.ts:17

Parameters:

Name Type Default
allowSign boolean false

Returns: boolean


size

size(): number

Inherited from Token.size

Defined in tokens/token.ts:24

Returns: number