import CodeLocation from "./CodeLocation"; import CodeSpan from "./CodeSpan"; import { ExtraToken } from "./extraTokens"; import TokenType from "./TokenType"; export default class Token { type: TokenType; span: CodeSpan; lexeme: string; /** * All the newlines and comments that appear before this token and should be preserved when printing the AST. */ extraTokens: ExtraToken[]; /** * Start of this token, including all the whitespace before it. * * Set externally in the lexer. */ startWithWhitespace: CodeLocation; constructor(type: TokenType, span: CodeSpan, lexeme: string); toString(): string; hasNewlineInExtraTokens(): boolean; }