aboutsummaryrefslogtreecommitdiff
path: root/node_modules/prismjs/components/prism-clike.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/prismjs/components/prism-clike.js')
-rw-r--r--node_modules/prismjs/components/prism-clike.js30
1 files changed, 30 insertions, 0 deletions
diff --git a/node_modules/prismjs/components/prism-clike.js b/node_modules/prismjs/components/prism-clike.js
new file mode 100644
index 00000000..f72eba60
--- /dev/null
+++ b/node_modules/prismjs/components/prism-clike.js
@@ -0,0 +1,30 @@
+Prism.languages.clike = {
+ 'comment': [
+ {
+ pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,
+ lookbehind: true
+ },
+ {
+ pattern: /(^|[^\\:])\/\/.*/,
+ lookbehind: true,
+ greedy: true
+ }
+ ],
+ 'string': {
+ pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
+ greedy: true
+ },
+ 'class-name': {
+ pattern: /((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i,
+ lookbehind: true,
+ inside: {
+ punctuation: /[.\\]/
+ }
+ },
+ 'keyword': /\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,
+ 'boolean': /\b(?:true|false)\b/,
+ 'function': /[a-z0-9_]+(?=\()/i,
+ 'number': /\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,
+ 'operator': /--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,
+ 'punctuation': /[{}[\];(),.:]/
+};