animate/webGl/my-threejs-test/node_modules/css-tree/lib/syntax/node/String.js

20 lines
471 B
JavaScript
Raw Normal View History

2024-06-24 09:24:00 +00:00
import { String as StringToken } from '../../tokenizer/index.js';
import { decode, encode } from '../../utils/string.js';
export const name = 'String';
export const structure = {
value: String
};
export function parse() {
return {
type: 'String',
loc: this.getLocation(this.tokenStart, this.tokenEnd),
value: decode(this.consume(StringToken))
};
}
export function generate(node) {
this.token(StringToken, encode(node.value));
}