diff --git a/src/parser/tokenizer2.ts b/src/parser/tokenizer2.ts index a5d4a89..7b9886b 100644 --- a/src/parser/tokenizer2.ts +++ b/src/parser/tokenizer2.ts @@ -1,4 +1,4 @@ -const DEBUG = process.env.DEBUG || false +import { isDebug } from '#utils/utils' export type Token = { type: TokenType @@ -169,11 +169,11 @@ export class Scanner { from, to, }, - valueTokens.has(type) ? { value: this.input.slice(from, to) } : {}, - ), + valueTokens.has(type) ? { value: this.input.slice(from, to) } : {} + ) ) - if (DEBUG) { + if (isDebug()) { const tok = this.tokens.at(-1) console.log(`≫ PUSH(${from},${to})`, TokenType[tok?.type || 0], '—', tok?.value) }