From 7a3df06eb573d36142bd1a8e03c5ce8752d300b3 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Wed, 24 May 2017 15:10:37 +0200 Subject: fix build issues and add typedoc --- .../highlight.js/lib/languages/smalltalk.js | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 node_modules/highlight.js/lib/languages/smalltalk.js (limited to 'node_modules/highlight.js/lib/languages/smalltalk.js') diff --git a/node_modules/highlight.js/lib/languages/smalltalk.js b/node_modules/highlight.js/lib/languages/smalltalk.js new file mode 100644 index 000000000..6734bc11f --- /dev/null +++ b/node_modules/highlight.js/lib/languages/smalltalk.js @@ -0,0 +1,49 @@ +module.exports = function(hljs) { + var VAR_IDENT_RE = '[a-z][a-zA-Z0-9_]*'; + var CHAR = { + className: 'string', + begin: '\\$.{1}' + }; + var SYMBOL = { + className: 'symbol', + begin: '#' + hljs.UNDERSCORE_IDENT_RE + }; + return { + aliases: ['st'], + keywords: 'self super nil true false thisContext', // only 6 + contains: [ + hljs.COMMENT('"', '"'), + hljs.APOS_STRING_MODE, + { + className: 'type', + begin: '\\b[A-Z][A-Za-z0-9_]*', + relevance: 0 + }, + { + begin: VAR_IDENT_RE + ':', + relevance: 0 + }, + hljs.C_NUMBER_MODE, + SYMBOL, + CHAR, + { + // This looks more complicated than needed to avoid combinatorial + // explosion under V8. It effectively means `| var1 var2 ... |` with + // whitespace adjacent to `|` being optional. + begin: '\\|[ ]*' + VAR_IDENT_RE + '([ ]+' + VAR_IDENT_RE + ')*[ ]*\\|', + returnBegin: true, end: /\|/, + illegal: /\S/, + contains: [{begin: '(\\|[ ]*)?' + VAR_IDENT_RE}] + }, + { + begin: '\\#\\(', end: '\\)', + contains: [ + hljs.APOS_STRING_MODE, + CHAR, + hljs.C_NUMBER_MODE, + SYMBOL + ] + } + ] + }; +}; \ No newline at end of file -- cgit v1.2.3