Use isDebug
This commit is contained in:
parent
b378756c5d
commit
04c2137fe2
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user