主要功能: - 修改RequirementModal支持12个订单班选择 - 添加OrderClassIconMap图标映射组件 - Store中添加selectedOrderClass状态管理 - WorkflowPage支持传递orderClass参数 - web_result添加URL参数切换功能 - 创建order-class-handler.js动态处理页面主题 技术改进: - 创建软链接关联订单班数据目录 - 生成wenlu.json和food.json数据结构 - 删除重复的web_result目录 - 添加测试页面test-order-class.html 影响范围: - 展会策划系统现支持12个订单班 - 结果展示页面自动适配不同订单班主题 - 用户可选择不同行业生成对应方案 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
174 lines
3.5 KiB
JavaScript
174 lines
3.5 KiB
JavaScript
/*
|
|
Language: Haskell
|
|
Author: Jeremy Hull <sourdrums@gmail.com>
|
|
Contributors: Zena Treep <zena.treep@gmail.com>
|
|
Website: https://www.haskell.org
|
|
Category: functional
|
|
*/
|
|
|
|
function haskell(hljs) {
|
|
const COMMENT = {
|
|
variants: [
|
|
hljs.COMMENT('--', '$'),
|
|
hljs.COMMENT(
|
|
/\{-/,
|
|
/-\}/,
|
|
{
|
|
contains: ['self']
|
|
}
|
|
)
|
|
]
|
|
};
|
|
|
|
const PRAGMA = {
|
|
className: 'meta',
|
|
begin: /\{-#/,
|
|
end: /#-\}/
|
|
};
|
|
|
|
const PREPROCESSOR = {
|
|
className: 'meta',
|
|
begin: '^#',
|
|
end: '$'
|
|
};
|
|
|
|
const CONSTRUCTOR = {
|
|
className: 'type',
|
|
begin: '\\b[A-Z][\\w\']*', // TODO: other constructors (build-in, infix).
|
|
relevance: 0
|
|
};
|
|
|
|
const LIST = {
|
|
begin: '\\(',
|
|
end: '\\)',
|
|
illegal: '"',
|
|
contains: [
|
|
PRAGMA,
|
|
PREPROCESSOR,
|
|
{
|
|
className: 'type',
|
|
begin: '\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?'
|
|
},
|
|
hljs.inherit(hljs.TITLE_MODE, {
|
|
begin: '[_a-z][\\w\']*'
|
|
}),
|
|
COMMENT
|
|
]
|
|
};
|
|
|
|
const RECORD = {
|
|
begin: /\{/,
|
|
end: /\}/,
|
|
contains: LIST.contains
|
|
};
|
|
|
|
return {
|
|
name: 'Haskell',
|
|
aliases: ['hs'],
|
|
keywords:
|
|
'let in if then else case of where do module import hiding ' +
|
|
'qualified type data newtype deriving class instance as default ' +
|
|
'infix infixl infixr foreign export ccall stdcall cplusplus ' +
|
|
'jvm dotnet safe unsafe family forall mdo proc rec',
|
|
contains: [
|
|
// Top-level constructions.
|
|
{
|
|
beginKeywords: 'module',
|
|
end: 'where',
|
|
keywords: 'module where',
|
|
contains: [
|
|
LIST,
|
|
COMMENT
|
|
],
|
|
illegal: '\\W\\.|;'
|
|
},
|
|
{
|
|
begin: '\\bimport\\b',
|
|
end: '$',
|
|
keywords: 'import qualified as hiding',
|
|
contains: [
|
|
LIST,
|
|
COMMENT
|
|
],
|
|
illegal: '\\W\\.|;'
|
|
},
|
|
{
|
|
className: 'class',
|
|
begin: '^(\\s*)?(class|instance)\\b',
|
|
end: 'where',
|
|
keywords: 'class family instance where',
|
|
contains: [
|
|
CONSTRUCTOR,
|
|
LIST,
|
|
COMMENT
|
|
]
|
|
},
|
|
{
|
|
className: 'class',
|
|
begin: '\\b(data|(new)?type)\\b',
|
|
end: '$',
|
|
keywords: 'data family type newtype deriving',
|
|
contains: [
|
|
PRAGMA,
|
|
CONSTRUCTOR,
|
|
LIST,
|
|
RECORD,
|
|
COMMENT
|
|
]
|
|
},
|
|
{
|
|
beginKeywords: 'default',
|
|
end: '$',
|
|
contains: [
|
|
CONSTRUCTOR,
|
|
LIST,
|
|
COMMENT
|
|
]
|
|
},
|
|
{
|
|
beginKeywords: 'infix infixl infixr',
|
|
end: '$',
|
|
contains: [
|
|
hljs.C_NUMBER_MODE,
|
|
COMMENT
|
|
]
|
|
},
|
|
{
|
|
begin: '\\bforeign\\b',
|
|
end: '$',
|
|
keywords: 'foreign import export ccall stdcall cplusplus jvm ' +
|
|
'dotnet safe unsafe',
|
|
contains: [
|
|
CONSTRUCTOR,
|
|
hljs.QUOTE_STRING_MODE,
|
|
COMMENT
|
|
]
|
|
},
|
|
{
|
|
className: 'meta',
|
|
begin: '#!\\/usr\\/bin\\/env\ runhaskell',
|
|
end: '$'
|
|
},
|
|
// "Whitespaces".
|
|
PRAGMA,
|
|
PREPROCESSOR,
|
|
|
|
// Literals and names.
|
|
|
|
// TODO: characters.
|
|
hljs.QUOTE_STRING_MODE,
|
|
hljs.C_NUMBER_MODE,
|
|
CONSTRUCTOR,
|
|
hljs.inherit(hljs.TITLE_MODE, {
|
|
begin: '^[_a-z][\\w\']*'
|
|
}),
|
|
COMMENT,
|
|
{ // No markup, relevance booster
|
|
begin: '->|<-'
|
|
}
|
|
]
|
|
};
|
|
}
|
|
|
|
module.exports = haskell;
|