]>
luflow.net public git repositories - flow-web.git/blob - static/highlight/languages/pony.js
1 /*! `pony` grammar compiled for Highlight.js 11.11.1 */
3 var hljsGrammar
= (function () {
8 Author: Joe Eli McIlvain <joe.eli.mac@gmail.com>
9 Description: Pony is an open-source, object-oriented, actor-model,
10 capabilities-secure, high performance programming language.
11 Website: https://www.ponylang.io
18 'actor addressof and as be break class compile_error compile_intrinsic '
19 + 'consume continue delegate digestof do else elseif embed end error '
20 + 'for fun if ifdef in interface is isnt lambda let match new not object '
21 + 'or primitive recover repeat return struct then trait try type until '
22 + 'use var where while with xor',
24 'iso val tag trn box ref',
29 const TRIPLE_QUOTE_STRING_MODE
= {
36 const QUOTE_STRING_MODE
= {
40 contains: [ hljs
.BACKSLASH_ESCAPE
]
43 const SINGLE_QUOTE_CHAR_MODE
= {
47 contains: [ hljs
.BACKSLASH_ESCAPE
],
53 begin: '\\b_?[A-Z][\\w]*',
58 begin: hljs
.IDENT_RE
+ '\'',
64 begin: '(-?)(\\b0[xX][a-fA-F0-9]+|\\b0[bB][01]+|(\\b\\d+(_\\d+)?(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)',
69 * The `FUNCTION` and `CLASS` modes were intentionally removed to simplify
70 * highlighting and fix cases like
72 * interface Iterator[A: A]
73 * fun has_next(): Bool
76 * where it is valid to have a function head without a body
84 TRIPLE_QUOTE_STRING_MODE
,
86 SINGLE_QUOTE_CHAR_MODE
,
89 hljs
.C_LINE_COMMENT_MODE
,
90 hljs
.C_BLOCK_COMMENT_MODE
99 hljs
.registerLanguage('pony', hljsGrammar
);