UNPKG

css-tree

Version:

A tool set for CSS: fast detailed parser (CSS → AST), walker (AST traversal), generator (AST → CSS) and lexer (validation and matching) based on specs and browser implementations

20 lines (14 loc) 354 B
import { CDO } from '../../tokenizer/index.js'; export const name = 'CDO'; export const structure = []; export function parse() { const start = this.tokenStart; this.eat(CDO); // <!-- return { type: 'CDO', loc: this.getLocation(start, this.tokenStart) }; } export function generate() { this.token(CDO, '<!--'); }