文件操作 - Rule.js
返回文件管理
返回主菜单
删除本文件
文件: /var/www/OLD/node_modules/csso/node_modules/css-tree/lib/syntax/node/Rule.js
编辑文件内容
import { LeftCurlyBracket } from '../../tokenizer/index.js'; function consumeRaw(startToken) { return this.Raw(startToken, this.consumeUntilLeftCurlyBracket, true); } function consumePrelude() { const prelude = this.SelectorList(); if (prelude.type !== 'Raw' && this.eof === false && this.tokenType !== LeftCurlyBracket) { this.error(); } return prelude; } export const name = 'Rule'; export const walkContext = 'rule'; export const structure = { prelude: ['SelectorList', 'Raw'], block: ['Block'] }; export function parse() { const startToken = this.tokenIndex; const startOffset = this.tokenStart; let prelude; let block; if (this.parseRulePrelude) { prelude = this.parseWithFallback(consumePrelude, consumeRaw); } else { prelude = consumeRaw.call(this, startToken); } block = this.Block(true); return { type: 'Rule', loc: this.getLocation(startOffset, this.tokenStart), prelude, block }; } export function generate(node) { this.node(node.prelude); this.node(node.block); }
修改文件时间
将文件时间修改为当前时间的前一年
删除文件