Constructors
constructor
- new Token(tokenType, lexeme, literal, lineNumber, charNumber): Token
-
Parameters
-
-
lexeme: string
-
literal: unknown
-
lineNumber: number
-
charNumber: number
Properties
Private
Readonly
charNumber
charNumber: number
Private
Readonly
lexeme
lexeme: string
Private
Readonly
lineNumber
lineNumber: number
Private
Readonly
literal
literal: unknown
Private
Readonly
tokenType
Methods
getCharNumber
- getCharNumber(): number
-
Returns number
getLexeme
- getLexeme(): string
-
Returns string
getLineNumber
- getLineNumber(): number
-
Returns number
getLiteral
- getLiteral(): unknown
-
Returns unknown
toString
- toString(): string
-
Returns string
Static
Boolean
- Boolean(lexeme, literal, lineNumber, charNumber): Token
-
Parameters
-
lexeme: string
-
literal: boolean
-
lineNumber: number
-
charNumber: number
Static
Eof
- Eof(lineNumber, charNumber): Token
-
Parameters
-
lineNumber: number
-
charNumber: number
Static
LeftBracket
- LeftBracket(lineNumber, charNumber): Token
-
Parameters
-
lineNumber: number
-
charNumber: number
Static
Number
- Number(lexeme, lineNumber, charNumber): Token
-
Parameters
-
lexeme: string
-
lineNumber: number
-
charNumber: number
Static
Quote
- Quote(lineNumber, charNumber): Token
-
Parameters
-
lineNumber: number
-
charNumber: number
Static
RightBracket
- RightBracket(lineNumber, charNumber): Token
-
Parameters
-
lineNumber: number
-
charNumber: number
Static
String
- String(lexeme, lineNumber, charNumber): Token
-
Parameters
-
lexeme: string
-
lineNumber: number
-
charNumber: number
Static
Symbol
- Symbol(lexeme, lineNumber, charNumber): Token
-
Parameters
-
lexeme: string
-
lineNumber: number
-
charNumber: number