diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2011-06-30 00:52:42 +0200 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2011-06-30 00:52:42 +0200 |
commit | 9bb31f57226877f78f23fb766773aa8486297bb7 (patch) | |
tree | bd0c28c27932071adaabf43dff4abcfafe221be3 /deps/highlight.js/languages/smalltalk.js | |
download | node-paste-9bb31f57226877f78f23fb766773aa8486297bb7.tar.gz node-paste-9bb31f57226877f78f23fb766773aa8486297bb7.tar.xz node-paste-9bb31f57226877f78f23fb766773aa8486297bb7.zip |
initial commit
Diffstat (limited to '')
-rw-r--r-- | deps/highlight.js/languages/smalltalk.js | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/deps/highlight.js/languages/smalltalk.js b/deps/highlight.js/languages/smalltalk.js new file mode 100644 index 0000000..884e180 --- /dev/null +++ b/deps/highlight.js/languages/smalltalk.js @@ -0,0 +1,56 @@ +/* +Language: Smalltalk +Author: Vladimir Gubarkov <xonixx@gmail.com> +*/ + +this.lang = function(hljs){ + +hljs.LANGUAGES.smalltalk = function(){ + var VAR_IDENT_RE = '[a-z][a-zA-Z0-9_]*'; + return { + defaultMode: { + lexems: [hljs.UNDERSCORE_IDENT_RE], + contains: ['comment', 'string', 'class', 'method', + 'number', 'symbol', 'char', 'localvars', 'array'], + keywords: {'self': 1, 'super': 1, 'nil': 1, 'true': 1, 'false': 1, 'thisContext': 1} // only 6 + }, + modes: [ + { + className: 'class', + begin: '\\b[A-Z][A-Za-z0-9_]*', end: '^', + relevance: 0 + }, + { + className: 'symbol', + begin: '#' + hljs.UNDERSCORE_IDENT_RE, end: '^' + }, + hljs.C_NUMBER_MODE, + hljs.APOS_STRING_MODE, + { + className: 'comment', + begin: '"', end: '"', + relevance: 0 + }, + { + className: 'method', + begin: VAR_IDENT_RE + ':', end:'^' + }, + { + className: 'char', + begin: '\\$.{1}', end: '^' + }, + { + className: 'localvars', + begin: '\\|\\s*((' + VAR_IDENT_RE + ')\\s*)+\\|', end: '^', + relevance: 10 + }, + { + className: 'array', + begin: '\\#\\(', end: '\\)', + contains: ['string', 'char', 'number', 'symbol'] + } + ] + }; +}(); + +};
\ No newline at end of file |