Files
liquidjs/src/tokens/quoted-token.ts
Jun YangandGitHub 660d9be55f feat: more flexible squared property read expression, fixes #643 (#646)
* fix: more flexible squared property read expression, fixes #643

* fix: unecessary error wrapping in browser bundles

* style: update code style and types

* perf: use token.value when evalToken
2023-08-23 00:45:49 +08:00

17 lines
436 B
TypeScript

import { Token } from './token'
import { TokenKind } from '../parser'
import { parseStringLiteral } from '../render/string'
export class QuotedToken extends Token {
public readonly content: string
constructor (
public input: string,
public begin: number,
public end: number,
public file?: string
) {
super(TokenKind.Quoted, input, begin, end, file)
this.content = parseStringLiteral(this.getText())
}
}