diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-05-24 15:10:37 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-05-24 15:11:17 +0200 |
commit | 7a3df06eb573d36142bd1a8e03c5ce8752d300b3 (patch) | |
tree | 70bfaea8884c374876f607774850a3a51c0cb381 /node_modules/highlight.js/lib/languages/smalltalk.js | |
parent | aca1143cb9eed16cf37f04e475e4257418dd18ac (diff) |
fix build issues and add typedoc
Diffstat (limited to 'node_modules/highlight.js/lib/languages/smalltalk.js')
-rw-r--r-- | node_modules/highlight.js/lib/languages/smalltalk.js | 49 |
1 files changed, 49 insertions, 0 deletions
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 |