perf: introduce AST to avoid reparse

This commit is contained in:
harttle
2020-03-15 02:51:25 +08:00
committed by Jun Yang
parent 3b58f1c3f6
commit d2d6a38235
96 changed files with 1553 additions and 1168 deletions
+16
View File
@@ -0,0 +1,16 @@
import { Token } from './token'
import { ValueToken } from './value-token'
import { TokenKind } from '../parser/token-kind'
export class RangeToken extends Token {
constructor (
public input: string,
public begin: number,
public end: number,
public lhs: ValueToken,
public rhs: ValueToken,
public file?: string
) {
super(TokenKind.Range, input, begin, end, file)
}
}