# Interface Token

Represents a token produced by the lexer, which will be used by the AST to construct an abstract syntax tree.

interface Token {
constant?: boolean;
identifier?: boolean;
index: number;
operator?: boolean;
text: string;
value?: string | number;
}

- Defined in src/core/parse/lexer/token.ts:4

##### Index

### Properties

constant?
identifier?
index
operator?
text
value?

## Properties

### `Optional` constant

constant?: boolean

Indicates if token is a constant.

- Defined in src/core/parse/lexer/token.ts:15

### `Optional` identifier

identifier?: boolean

Indicates if token is an identifier.

- Defined in src/core/parse/lexer/token.ts:12

### index

index: number

Index of the token.

- Defined in src/core/parse/lexer/token.ts:6

### `Optional` operator

operator?: boolean

Indicates if token is an operator.

- Defined in src/core/parse/lexer/token.ts:21

### text

text: string

Text of the token.

- Defined in src/core/parse/lexer/token.ts:9

### `Optional` value

value?: string | number

Value of the token if it's a constant.

- Defined in src/core/parse/lexer/token.ts:18