mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-19 22:40:48 -07:00
@@ -1,5 +1,4 @@
|
||||
import { Token } from './token'
|
||||
import { NUMBER, TYPES, SIGN } from '../util'
|
||||
import { TokenKind } from '../parser'
|
||||
|
||||
export class IdentifierToken extends Token {
|
||||
@@ -13,13 +12,4 @@ export class IdentifierToken extends Token {
|
||||
super(TokenKind.Word, input, begin, end, file)
|
||||
this.content = this.getText()
|
||||
}
|
||||
isNumber (allowSign = false) {
|
||||
const begin = allowSign && TYPES[this.input.charCodeAt(this.begin)] & SIGN
|
||||
? this.begin + 1
|
||||
: this.begin
|
||||
for (let i = begin; i < this.end; i++) {
|
||||
if (!(TYPES[this.input.charCodeAt(i)] & NUMBER)) return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user