Document application modes (development/debug/production) Add global file drop handler, order column normalization, SPA hash fix Serve CDN assets via /_vendor/ URLs instead of merging into bundles Add production minification with license preservation Improve JSON formatting for debugging and production optimization Add CDN asset caching with CSS URL inlining for production builds Add three-mode system (development, debug, production) Update Manifest CLAUDE.md to reflect helper class architecture Refactor Manifest.php into helper classes for better organization Pre-manifest-refactor checkpoint: Add app_mode documentation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
68 lines
1.5 KiB
JavaScript
68 lines
1.5 KiB
JavaScript
'use strict';
|
|
|
|
const types = require('../../tokenizer/types.cjs');
|
|
|
|
const name = 'FeatureFunction';
|
|
const structure = {
|
|
kind: String,
|
|
feature: String,
|
|
value: ['Declaration', 'Selector']
|
|
};
|
|
|
|
function getFeatureParser(kind, name) {
|
|
const featuresOfKind = this.features[kind] || {};
|
|
const parser = featuresOfKind[name];
|
|
|
|
if (typeof parser !== 'function') {
|
|
this.error(`Unknown feature ${name}()`);
|
|
}
|
|
|
|
return parser;
|
|
}
|
|
|
|
function parse(kind = 'unknown') {
|
|
const start = this.tokenStart;
|
|
const functionName = this.consumeFunctionName();
|
|
const valueParser = getFeatureParser.call(this, kind, functionName.toLowerCase());
|
|
|
|
this.skipSC();
|
|
|
|
const value = this.parseWithFallback(
|
|
() => {
|
|
const startValueToken = this.tokenIndex;
|
|
const value = valueParser.call(this);
|
|
|
|
if (this.eof === false &&
|
|
this.isBalanceEdge(startValueToken) === false) {
|
|
this.error();
|
|
}
|
|
|
|
return value;
|
|
},
|
|
() => this.Raw(null, false)
|
|
);
|
|
|
|
if (!this.eof) {
|
|
this.eat(types.RightParenthesis);
|
|
}
|
|
|
|
return {
|
|
type: 'FeatureFunction',
|
|
loc: this.getLocation(start, this.tokenStart),
|
|
kind,
|
|
feature: functionName,
|
|
value
|
|
};
|
|
}
|
|
|
|
function generate(node) {
|
|
this.token(types.Function, node.feature + '(');
|
|
this.node(node.value);
|
|
this.token(types.RightParenthesis, ')');
|
|
}
|
|
|
|
exports.generate = generate;
|
|
exports.name = name;
|
|
exports.parse = parse;
|
|
exports.structure = structure;
|