]>
luflow.net public git repositories - flow-web.git/blob - static/highlight/es/languages/smalltalk.js
1 /*! `smalltalk` grammar compiled for Highlight.js 11.11.1 */
2 var hljsGrammar
= (function () {
7 Description: Smalltalk is an object-oriented, dynamically typed reflective programming language.
8 Author: Vladimir Gubarkov <xonixx@gmail.com>
9 Website: https://en.wikipedia.org/wiki/Smalltalk
13 function smalltalk(hljs
) {
14 const VAR_IDENT_RE
= '[a-z][a-zA-Z0-9_]*';
21 begin: '#' + hljs
.UNDERSCORE_IDENT_RE
35 hljs
.COMMENT('"', '"'),
36 hljs
.APOS_STRING_MODE
,
39 begin: '\\b[A-Z][A-Za-z0-9_]*',
43 begin: VAR_IDENT_RE
+ ':',
50 // This looks more complicated than needed to avoid combinatorial
51 // explosion under V8. It effectively means `| var1 var2 ... |` with
52 // whitespace adjacent to `|` being optional.
53 begin: '\\|[ ]*' + VAR_IDENT_RE
+ '([ ]+' + VAR_IDENT_RE
+ ')*[ ]*\\|',
57 contains: [ { begin: '(\\|[ ]*)?' + VAR_IDENT_RE
} ]
63 hljs
.APOS_STRING_MODE
,
77 export default hljsGrammar
;