mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-29 15:15:23 -07:00
perf: introduce AST to avoid reparse
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import { Token } from './token'
|
||||
import { WordToken } from './word-token'
|
||||
import { TokenKind } from '../parser/token-kind'
|
||||
|
||||
export class NumberToken extends Token {
|
||||
constructor (
|
||||
public whole: WordToken,
|
||||
public decimal?: WordToken
|
||||
) {
|
||||
super(TokenKind.Number, whole.input, whole.begin, decimal ? decimal.end : whole.end, whole.file)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user