@kg-ui/kg-ui-plus 0.0.0 → 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. package/README.md +2 -38
  2. package/package.json +1 -2
  3. package/dist/es/KgCopilot/CopiContent/AnswerHead.vue.mjs +0 -16
  4. package/dist/es/KgCopilot/CopiContent/AnswerHead.vue2.mjs +0 -4
  5. package/dist/es/KgCopilot/CopiContent/UserHead.vue.mjs +0 -26
  6. package/dist/es/KgCopilot/CopiContent/UserHead.vue2.mjs +0 -4
  7. package/dist/es/KgCopilot/CopiFooter/components/NewTheme.vue.mjs +0 -7
  8. package/dist/es/KgCopilot/CopiFooter/components/NewTheme.vue2.mjs +0 -49
  9. package/dist/es/KgCopilot/CopiFooter/components/NewTheme.vue3.mjs +0 -4
  10. package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SelectPlugin.vue.mjs +0 -7
  11. package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SelectPlugin.vue2.mjs +0 -94
  12. package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SelectPlugin.vue3.mjs +0 -4
  13. package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SpeechControl.vue.mjs +0 -7
  14. package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SpeechControl.vue2.mjs +0 -33
  15. package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SpeechControl.vue3.mjs +0 -4
  16. package/dist/es/KgCopilot/CopiFooter/components/SearchInput/Upload.vue.mjs +0 -7
  17. package/dist/es/KgCopilot/CopiFooter/components/SearchInput/Upload.vue2.mjs +0 -140
  18. package/dist/es/KgCopilot/CopiFooter/components/SearchInput/Upload.vue3.mjs +0 -4
  19. package/dist/es/KgCopilot/CopiFooter/components/SearchInput/index.vue.mjs +0 -7
  20. package/dist/es/KgCopilot/CopiFooter/components/SearchInput/index.vue2.mjs +0 -131
  21. package/dist/es/KgCopilot/CopiFooter/components/SearchInput/index.vue3.mjs +0 -4
  22. package/dist/es/KgCopilot/CopiFooter/index.vue.mjs +0 -7
  23. package/dist/es/KgCopilot/CopiFooter/index.vue2.mjs +0 -21
  24. package/dist/es/KgCopilot/CopiFooter/index.vue3.mjs +0 -4
  25. package/dist/es/KgCopilot/dialogue.vue.mjs +0 -7
  26. package/dist/es/KgCopilot/dialogue.vue2.mjs +0 -131
  27. package/dist/es/KgCopilot/dialogue.vue3.mjs +0 -4
  28. package/dist/es/KgCopilot/index.vue.mjs +0 -7
  29. package/dist/es/KgCopilot/index.vue2.mjs +0 -49
  30. package/dist/es/KgCopilot/index.vue3.mjs +0 -4
  31. package/dist/es/KgCopilot/mdInCode.mjs +0 -56
  32. package/dist/es/KgCopilot/readMd.vue.mjs +0 -7
  33. package/dist/es/KgCopilot/readMd.vue2.mjs +0 -87
  34. package/dist/es/KgCopilot/readMd.vue3.mjs +0 -4
  35. package/dist/es/ReIcon/index.mjs +0 -11
  36. package/dist/es/ReIcon/src/iconfont.mjs +0 -46
  37. package/dist/es/ReIcon/src/iconifyIconOffline.mjs +0 -30
  38. package/dist/es/ReIcon/src/iconifyIconOnline.mjs +0 -29
  39. package/dist/es/_virtual/___vite-browser-external.mjs +0 -6
  40. package/dist/es/_virtual/__vite-browser-external.mjs +0 -4
  41. package/dist/es/_virtual/_commonjsHelpers.mjs +0 -34
  42. package/dist/es/_virtual/_plugin-vue_export-helper.mjs +0 -10
  43. package/dist/es/_virtual/index.mjs +0 -13
  44. package/dist/es/api/project.mjs +0 -51
  45. package/dist/es/directives/heighlight/index.mjs +0 -69
  46. package/dist/es/directives/index.mjs +0 -4
  47. package/dist/es/home/LFilter/FilterArea.vue.mjs +0 -7
  48. package/dist/es/home/LFilter/FilterArea.vue2.mjs +0 -507
  49. package/dist/es/home/LFilter/FilterArea.vue3.mjs +0 -4
  50. package/dist/es/home/LFilter/FilterHead.vue.mjs +0 -129
  51. package/dist/es/home/LFilter/FilterHead.vue2.mjs +0 -4
  52. package/dist/es/home/LFilter/FilterItem.vue.mjs +0 -7
  53. package/dist/es/home/LFilter/FilterItem.vue2.mjs +0 -114
  54. package/dist/es/home/LFilter/FilterItem.vue3.mjs +0 -4
  55. package/dist/es/home/LFilter/FilterItemIcon.vue.mjs +0 -7
  56. package/dist/es/home/LFilter/FilterItemIcon.vue2.mjs +0 -171
  57. package/dist/es/home/LFilter/FilterItemIcon.vue3.mjs +0 -4
  58. package/dist/es/home/LFilter/index.vue.mjs +0 -17
  59. package/dist/es/home/LFilter/index.vue2.mjs +0 -4
  60. package/dist/es/home/LProject/index.vue.mjs +0 -7
  61. package/dist/es/home/LProject/index.vue2.mjs +0 -70
  62. package/dist/es/home/LProject/index.vue3.mjs +0 -4
  63. package/dist/es/home/index.vue.mjs +0 -7
  64. package/dist/es/home/index.vue2.mjs +0 -80
  65. package/dist/es/home/index.vue3.mjs +0 -4
  66. package/dist/es/index.mjs +0 -36
  67. package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/check.mjs +0 -8
  68. package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/circle-plus.mjs +0 -8
  69. package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/close.mjs +0 -8
  70. package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/microphone.mjs +0 -8
  71. package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/paperclip.mjs +0 -8
  72. package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/promotion.mjs +0 -8
  73. package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/upload.mjs +0 -8
  74. package/dist/es/node_modules/.pnpm/@iconify-icons_ph@1.2.5/node_modules/@iconify-icons/ph/copy-simple.mjs +0 -8
  75. package/dist/es/node_modules/.pnpm/@iconify-icons_ph@1.2.5/node_modules/@iconify-icons/ph/speaker-high-light.mjs +0 -8
  76. package/dist/es/node_modules/.pnpm/@iconify-icons_ph@1.2.5/node_modules/@iconify-icons/ph/thumbs-down-thin.mjs +0 -8
  77. package/dist/es/node_modules/.pnpm/@iconify-icons_ph@1.2.5/node_modules/@iconify-icons/ph/thumbs-up-thin.mjs +0 -8
  78. package/dist/es/node_modules/.pnpm/@iconify-icons_ph@1.2.5/node_modules/@iconify-icons/ph/warning-bold.mjs +0 -8
  79. package/dist/es/node_modules/.pnpm/@iconify-icons_ri@1.2.3/node_modules/@iconify-icons/ri/add-line.mjs +0 -8
  80. package/dist/es/node_modules/.pnpm/@iconify-icons_ri@1.2.3/node_modules/@iconify-icons/ri/arrow-down-s-line.mjs +0 -8
  81. package/dist/es/node_modules/.pnpm/@iconify-icons_ri@1.2.3/node_modules/@iconify-icons/ri/arrow-up-s-line.mjs +0 -8
  82. package/dist/es/node_modules/.pnpm/@iconify-icons_ri@1.2.3/node_modules/@iconify-icons/ri/check-fill.mjs +0 -8
  83. package/dist/es/node_modules/.pnpm/@iconify-icons_ri@1.2.3/node_modules/@iconify-icons/ri/download-line.mjs +0 -8
  84. package/dist/es/node_modules/.pnpm/@iconify-icons_ri@1.2.3/node_modules/@iconify-icons/ri/more-2-fill.mjs +0 -8
  85. package/dist/es/node_modules/.pnpm/@iconify_vue@4.0.0_vue@3.2.45/node_modules/@iconify/vue/dist/iconify.mjs +0 -1702
  86. package/dist/es/node_modules/.pnpm/@iconify_vue@4.0.0_vue@3.2.45/node_modules/@iconify/vue/dist/offline.mjs +0 -436
  87. package/dist/es/node_modules/.pnpm/@pureadmin_utils@1.8.5_vue@3.2.45/node_modules/@pureadmin/utils/dist/index.mjs +0 -70
  88. package/dist/es/node_modules/.pnpm/call-bind@1.0.7/node_modules/call-bind/callBound.mjs +0 -16
  89. package/dist/es/node_modules/.pnpm/call-bind@1.0.7/node_modules/call-bind/index.mjs +0 -36
  90. package/dist/es/node_modules/.pnpm/define-data-property@1.1.4/node_modules/define-data-property/index.mjs +0 -48
  91. package/dist/es/node_modules/.pnpm/dompurify@3.0.10/node_modules/dompurify/dist/purify.es.mjs +0 -949
  92. package/dist/es/node_modules/.pnpm/es-define-property@1.0.0/node_modules/es-define-property/index.mjs +0 -22
  93. package/dist/es/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/eval.mjs +0 -4
  94. package/dist/es/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/index.mjs +0 -4
  95. package/dist/es/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/range.mjs +0 -4
  96. package/dist/es/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/ref.mjs +0 -4
  97. package/dist/es/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/syntax.mjs +0 -4
  98. package/dist/es/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/type.mjs +0 -4
  99. package/dist/es/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/uri.mjs +0 -4
  100. package/dist/es/node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.mjs +0 -72
  101. package/dist/es/node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.mjs +0 -6
  102. package/dist/es/node_modules/.pnpm/get-intrinsic@1.2.4/node_modules/get-intrinsic/index.mjs +0 -320
  103. package/dist/es/node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.mjs +0 -14
  104. package/dist/es/node_modules/.pnpm/has-property-descriptors@1.0.2/node_modules/has-property-descriptors/index.mjs +0 -19
  105. package/dist/es/node_modules/.pnpm/has-proto@1.0.3/node_modules/has-proto/index.mjs +0 -11
  106. package/dist/es/node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.mjs +0 -21
  107. package/dist/es/node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.mjs +0 -48
  108. package/dist/es/node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.mjs +0 -8
  109. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/core.mjs +0 -5
  110. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/apache.mjs +0 -91
  111. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/bash.mjs +0 -377
  112. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/basic.mjs +0 -221
  113. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/c.mjs +0 -280
  114. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/css.mjs +0 -732
  115. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/dart.mjs +0 -247
  116. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/django.mjs +0 -47
  117. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/dns.mjs +0 -71
  118. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/dos.mjs +0 -160
  119. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/dust.mjs +0 -38
  120. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/erlang.mjs +0 -176
  121. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/go.mjs +0 -135
  122. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/http.mjs +0 -89
  123. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/java.mjs +0 -254
  124. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/javascript.mjs +0 -698
  125. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/json.mjs +0 -40
  126. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/markdown.mjs +0 -227
  127. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/nginx.mjs +0 -144
  128. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/php.mjs +0 -589
  129. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/python.mjs +0 -414
  130. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/ruby.mjs +0 -414
  131. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/stylus.mjs +0 -766
  132. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/swift.mjs +0 -832
  133. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/typescript.mjs +0 -788
  134. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/xml.mjs +0 -227
  135. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/lib/core.mjs +0 -1580
  136. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/styles/paraiso-light.css.mjs +0 -4
  137. package/dist/es/node_modules/.pnpm/marked@12.0.1/node_modules/marked/lib/marked.esm.mjs +0 -2045
  138. package/dist/es/node_modules/.pnpm/object-inspect@1.13.1/node_modules/object-inspect/index.mjs +0 -514
  139. package/dist/es/node_modules/.pnpm/pinyin-match@1.2.4/node_modules/pinyin-match/es/main.mjs +0 -124
  140. package/dist/es/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/formats.mjs +0 -22
  141. package/dist/es/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/index.mjs +0 -14
  142. package/dist/es/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/parse.mjs +0 -199
  143. package/dist/es/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/stringify.mjs +0 -262
  144. package/dist/es/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/utils.mjs +0 -196
  145. package/dist/es/node_modules/.pnpm/set-function-length@1.2.2/node_modules/set-function-length/index.mjs +0 -54
  146. package/dist/es/node_modules/.pnpm/side-channel@1.0.6/node_modules/side-channel/index.mjs +0 -115
  147. package/dist/es/store/index.mjs +0 -8
  148. package/dist/es/store/modules/copilot.mjs +0 -108
  149. package/dist/es/store/modules/filters.mjs +0 -346
  150. package/dist/es/store/modules/types.mjs +0 -19
  151. package/dist/es/style/index.scss.mjs +0 -4
  152. package/dist/es/style/tailwind.css.mjs +0 -4
  153. package/dist/es/style.css +0 -1
  154. package/dist/es/utils/home.mjs +0 -129
  155. package/dist/es/utils/http/index.mjs +0 -90
  156. package/dist/es/utils/message.mjs +0 -42
@@ -1,280 +0,0 @@
1
- function c(hljs) {
2
- const regex = hljs.regex;
3
- const C_LINE_COMMENT_MODE = hljs.COMMENT("//", "$", { contains: [{ begin: /\\\n/ }] });
4
- const DECLTYPE_AUTO_RE = "decltype\\(auto\\)";
5
- const NAMESPACE_RE = "[a-zA-Z_]\\w*::";
6
- const TEMPLATE_ARGUMENT_RE = "<[^<>]+>";
7
- const FUNCTION_TYPE_RE = "(" + DECLTYPE_AUTO_RE + "|" + regex.optional(NAMESPACE_RE) + "[a-zA-Z_]\\w*" + regex.optional(TEMPLATE_ARGUMENT_RE) + ")";
8
- const TYPES = {
9
- className: "type",
10
- variants: [
11
- { begin: "\\b[a-z\\d_]*_t\\b" },
12
- { match: /\batomic_[a-z]{3,6}\b/ }
13
- ]
14
- };
15
- const CHARACTER_ESCAPES = "\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)";
16
- const STRINGS = {
17
- className: "string",
18
- variants: [
19
- {
20
- begin: '(u8?|U|L)?"',
21
- end: '"',
22
- illegal: "\\n",
23
- contains: [hljs.BACKSLASH_ESCAPE]
24
- },
25
- {
26
- begin: "(u8?|U|L)?'(" + CHARACTER_ESCAPES + "|.)",
27
- end: "'",
28
- illegal: "."
29
- },
30
- hljs.END_SAME_AS_BEGIN({
31
- begin: /(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,
32
- end: /\)([^()\\ ]{0,16})"/
33
- })
34
- ]
35
- };
36
- const NUMBERS = {
37
- className: "number",
38
- variants: [
39
- { begin: "\\b(0b[01']+)" },
40
- { begin: "(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)" },
41
- { begin: "(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)" }
42
- ],
43
- relevance: 0
44
- };
45
- const PREPROCESSOR = {
46
- className: "meta",
47
- begin: /#\s*[a-z]+\b/,
48
- end: /$/,
49
- keywords: { keyword: "if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include" },
50
- contains: [
51
- {
52
- begin: /\\\n/,
53
- relevance: 0
54
- },
55
- hljs.inherit(STRINGS, { className: "string" }),
56
- {
57
- className: "string",
58
- begin: /<.*?>/
59
- },
60
- C_LINE_COMMENT_MODE,
61
- hljs.C_BLOCK_COMMENT_MODE
62
- ]
63
- };
64
- const TITLE_MODE = {
65
- className: "title",
66
- begin: regex.optional(NAMESPACE_RE) + hljs.IDENT_RE,
67
- relevance: 0
68
- };
69
- const FUNCTION_TITLE = regex.optional(NAMESPACE_RE) + hljs.IDENT_RE + "\\s*\\(";
70
- const C_KEYWORDS = [
71
- "asm",
72
- "auto",
73
- "break",
74
- "case",
75
- "continue",
76
- "default",
77
- "do",
78
- "else",
79
- "enum",
80
- "extern",
81
- "for",
82
- "fortran",
83
- "goto",
84
- "if",
85
- "inline",
86
- "register",
87
- "restrict",
88
- "return",
89
- "sizeof",
90
- "struct",
91
- "switch",
92
- "typedef",
93
- "union",
94
- "volatile",
95
- "while",
96
- "_Alignas",
97
- "_Alignof",
98
- "_Atomic",
99
- "_Generic",
100
- "_Noreturn",
101
- "_Static_assert",
102
- "_Thread_local",
103
- // aliases
104
- "alignas",
105
- "alignof",
106
- "noreturn",
107
- "static_assert",
108
- "thread_local",
109
- // not a C keyword but is, for all intents and purposes, treated exactly like one.
110
- "_Pragma"
111
- ];
112
- const C_TYPES = [
113
- "float",
114
- "double",
115
- "signed",
116
- "unsigned",
117
- "int",
118
- "short",
119
- "long",
120
- "char",
121
- "void",
122
- "_Bool",
123
- "_Complex",
124
- "_Imaginary",
125
- "_Decimal32",
126
- "_Decimal64",
127
- "_Decimal128",
128
- // modifiers
129
- "const",
130
- "static",
131
- // aliases
132
- "complex",
133
- "bool",
134
- "imaginary"
135
- ];
136
- const KEYWORDS = {
137
- keyword: C_KEYWORDS,
138
- type: C_TYPES,
139
- literal: "true false NULL",
140
- // TODO: apply hinting work similar to what was done in cpp.js
141
- built_in: "std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"
142
- };
143
- const EXPRESSION_CONTAINS = [
144
- PREPROCESSOR,
145
- TYPES,
146
- C_LINE_COMMENT_MODE,
147
- hljs.C_BLOCK_COMMENT_MODE,
148
- NUMBERS,
149
- STRINGS
150
- ];
151
- const EXPRESSION_CONTEXT = {
152
- // This mode covers expression context where we can't expect a function
153
- // definition and shouldn't highlight anything that looks like one:
154
- // `return some()`, `else if()`, `(x*sum(1, 2))`
155
- variants: [
156
- {
157
- begin: /=/,
158
- end: /;/
159
- },
160
- {
161
- begin: /\(/,
162
- end: /\)/
163
- },
164
- {
165
- beginKeywords: "new throw return else",
166
- end: /;/
167
- }
168
- ],
169
- keywords: KEYWORDS,
170
- contains: EXPRESSION_CONTAINS.concat([
171
- {
172
- begin: /\(/,
173
- end: /\)/,
174
- keywords: KEYWORDS,
175
- contains: EXPRESSION_CONTAINS.concat(["self"]),
176
- relevance: 0
177
- }
178
- ]),
179
- relevance: 0
180
- };
181
- const FUNCTION_DECLARATION = {
182
- begin: "(" + FUNCTION_TYPE_RE + "[\\*&\\s]+)+" + FUNCTION_TITLE,
183
- returnBegin: true,
184
- end: /[{;=]/,
185
- excludeEnd: true,
186
- keywords: KEYWORDS,
187
- illegal: /[^\w\s\*&:<>.]/,
188
- contains: [
189
- {
190
- // to prevent it from being confused as the function title
191
- begin: DECLTYPE_AUTO_RE,
192
- keywords: KEYWORDS,
193
- relevance: 0
194
- },
195
- {
196
- begin: FUNCTION_TITLE,
197
- returnBegin: true,
198
- contains: [hljs.inherit(TITLE_MODE, { className: "title.function" })],
199
- relevance: 0
200
- },
201
- // allow for multiple declarations, e.g.:
202
- // extern void f(int), g(char);
203
- {
204
- relevance: 0,
205
- match: /,/
206
- },
207
- {
208
- className: "params",
209
- begin: /\(/,
210
- end: /\)/,
211
- keywords: KEYWORDS,
212
- relevance: 0,
213
- contains: [
214
- C_LINE_COMMENT_MODE,
215
- hljs.C_BLOCK_COMMENT_MODE,
216
- STRINGS,
217
- NUMBERS,
218
- TYPES,
219
- // Count matching parentheses.
220
- {
221
- begin: /\(/,
222
- end: /\)/,
223
- keywords: KEYWORDS,
224
- relevance: 0,
225
- contains: [
226
- "self",
227
- C_LINE_COMMENT_MODE,
228
- hljs.C_BLOCK_COMMENT_MODE,
229
- STRINGS,
230
- NUMBERS,
231
- TYPES
232
- ]
233
- }
234
- ]
235
- },
236
- TYPES,
237
- C_LINE_COMMENT_MODE,
238
- hljs.C_BLOCK_COMMENT_MODE,
239
- PREPROCESSOR
240
- ]
241
- };
242
- return {
243
- name: "C",
244
- aliases: ["h"],
245
- keywords: KEYWORDS,
246
- // Until differentiations are added between `c` and `cpp`, `c` will
247
- // not be auto-detected to avoid auto-detect conflicts between C and C++
248
- disableAutodetect: true,
249
- illegal: "</",
250
- contains: [].concat(
251
- EXPRESSION_CONTEXT,
252
- FUNCTION_DECLARATION,
253
- EXPRESSION_CONTAINS,
254
- [
255
- PREPROCESSOR,
256
- {
257
- begin: hljs.IDENT_RE + "::",
258
- keywords: KEYWORDS
259
- },
260
- {
261
- className: "class",
262
- beginKeywords: "enum class struct union",
263
- end: /[{;:<>=]/,
264
- contains: [
265
- { beginKeywords: "final class struct" },
266
- hljs.TITLE_MODE
267
- ]
268
- }
269
- ]
270
- ),
271
- exports: {
272
- preprocessor: PREPROCESSOR,
273
- strings: STRINGS,
274
- keywords: KEYWORDS
275
- }
276
- };
277
- }
278
- export {
279
- c as default
280
- };