详细说明: - 基于文旅订单班框架复制创建food-order-demo项目 - 修改端口配置为4174避免冲突 - 更新LandingPage为青莳轻食主题(绿色健康风格) - 重新定义7个食品行业专业Agent: * 市场研究专家:轻食市场分析、客群画像 * 营养配方师:营养成分配比、低卡高蛋白设计 * 供应链管理专家:有机食材供应、溯源体系 * 品牌策划师:品牌定位、店铺空间布局 * 财务分析师:投资预算、ROI分析 * 运营管理专家:运营流程、品控标准 * 食品创业导师:中央协调、方案整合 - 创建专用启动脚本start.sh - 验证系统可正常运行在端口4174 - 实现代码复用率90%,符合预期目标 影响文件: web_frontend/food-order-demo/ 技术栈: React 18 + TypeScript + Tailwind CSS + Zustand
@eslint-community/regexpp
A regular expression parser for ECMAScript.
💿 Installation
$ npm install @eslint-community/regexpp
- require Node@^12.0.0 || ^14.0.0 || >=16.0.0.
📖 Usage
import {
AST,
RegExpParser,
RegExpValidator,
RegExpVisitor,
parseRegExpLiteral,
validateRegExpLiteral,
visitRegExpAST
} from "@eslint-community/regexpp"
parseRegExpLiteral(source, options?)
Parse a given regular expression literal then make AST object.
This is equivalent to new RegExpParser(options).parseLiteral(source).
- Parameters:
source(string | RegExp) The source code to parse.options?(RegExpParser.Options) The options to parse.
- Return:
- The AST of the regular expression.
validateRegExpLiteral(source, options?)
Validate a given regular expression literal.
This is equivalent to new RegExpValidator(options).validateLiteral(source).
- Parameters:
source(string) The source code to validate.options?(RegExpValidator.Options) The options to validate.
visitRegExpAST(ast, handlers)
Visit each node of a given AST.
This is equivalent to new RegExpVisitor(handlers).visit(ast).
- Parameters:
ast(AST.Node) The AST to visit.handlers(RegExpVisitor.Handlers) The callbacks.
RegExpParser
new RegExpParser(options?)
- Parameters:
options?(RegExpParser.Options) The options to parse.
parser.parseLiteral(source, start?, end?)
Parse a regular expression literal.
- Parameters:
source(string) The source code to parse. E.g."/abc/g".start?(number) The start index in the source code. Default is0.end?(number) The end index in the source code. Default issource.length.
- Return:
- The AST of the regular expression.
parser.parsePattern(source, start?, end?, flags?)
Parse a regular expression pattern.
- Parameters:
source(string) The source code to parse. E.g."abc".start?(number) The start index in the source code. Default is0.end?(number) The end index in the source code. Default issource.length.flags?({ unicode?: boolean, unicodeSets?: boolean }) The flags to enable Unicode mode, and Unicode Set mode.
- Return:
- The AST of the regular expression pattern.
parser.parseFlags(source, start?, end?)
Parse a regular expression flags.
- Parameters:
source(string) The source code to parse. E.g."gim".start?(number) The start index in the source code. Default is0.end?(number) The end index in the source code. Default issource.length.
- Return:
- The AST of the regular expression flags.
RegExpValidator
new RegExpValidator(options)
- Parameters:
options(RegExpValidator.Options) The options to validate.
validator.validateLiteral(source, start, end)
Validate a regular expression literal.
- Parameters:
source(string) The source code to validate.start?(number) The start index in the source code. Default is0.end?(number) The end index in the source code. Default issource.length.
validator.validatePattern(source, start, end, flags)
Validate a regular expression pattern.
- Parameters:
source(string) The source code to validate.start?(number) The start index in the source code. Default is0.end?(number) The end index in the source code. Default issource.length.flags?({ unicode?: boolean, unicodeSets?: boolean }) The flags to enable Unicode mode, and Unicode Set mode.
validator.validateFlags(source, start, end)
Validate a regular expression flags.
- Parameters:
source(string) The source code to validate.start?(number) The start index in the source code. Default is0.end?(number) The end index in the source code. Default issource.length.
RegExpVisitor
new RegExpVisitor(handlers)
- Parameters:
handlers(RegExpVisitor.Handlers) The callbacks.
visitor.visit(ast)
Validate a regular expression literal.
- Parameters:
ast(AST.Node) The AST to visit.
📰 Changelog
🍻 Contributing
Welcome contributing!
Please use GitHub's Issues/PRs.
Development Tools
npm testruns tests and measures coverage.npm run buildcompiles TypeScript source code toindex.js,index.js.map, andindex.d.ts.npm run cleanremoves the temporary files which are created bynpm testandnpm run build.npm run lintruns ESLint.npm run update:testupdates test fixtures.npm run update:idsupdatessrc/unicode/ids.ts.npm run watchruns tests with--watchoption.