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

27 lines (21 loc) 469 B
'use strict'; const name = 'Value'; const structure = { children: [[]] }; function parse() { const start = this.tokenStart; const children = this.readSequence(this.scope.Value); return { type: 'Value', loc: this.getLocation(start, this.tokenStart), children }; } function generate(node) { this.children(node); } exports.generate = generate; exports.name = name; exports.parse = parse; exports.structure = structure;