]>
luflow.net public git repositories - flow-web.git/blob - static/highlight/languages/angelscript.js
1 /*! `angelscript` grammar compiled for Highlight.js 11.11.1 */
3 var hljsGrammar
= (function () {
8 Author: Melissa Geels <melissa@nimble.tools>
10 Website: https://www.angelcode.com/angelscript/
13 /** @type LanguageFn */
14 function angelscript(hljs
) {
15 const builtInTypeMode
= {
16 className: 'built_in',
17 begin: '\\b(void|bool|int8|int16|int32|int64|int|uint8|uint16|uint32|uint64|uint|string|ref|array|double|float|auto|dictionary)'
20 const objectHandleMode
= {
22 begin: '[a-zA-Z0-9_]+@'
35 builtInTypeMode
.contains
= [ genericMode
];
36 objectHandleMode
.contains
= [ genericMode
];
93 // avoid close detection with C# and JS
94 illegal: '(^using\\s+[A-Za-z0-9_\\.]+;$|\\bfunction\\s*[^\\(])',
102 contains: [ hljs
.BACKSLASH_ESCAPE
],
106 // """heredoc strings"""
118 contains: [ hljs
.BACKSLASH_ESCAPE
],
122 hljs
.C_LINE_COMMENT_MODE
, // single-line comments
123 hljs
.C_BLOCK_COMMENT_MODE
, // comment blocks
131 { // interface or namespace declaration
132 beginKeywords: 'interface namespace',
136 { // interface or namespace name
138 begin: '[a-zA-Z0-9_]+'
143 { // class declaration
144 beginKeywords: 'class',
150 begin: '[a-zA-Z0-9_]+',
157 begin: '[a-zA-Z0-9_]+'
166 builtInTypeMode
, // built-in types
167 objectHandleMode
, // object handles
170 className: 'literal',
171 begin: '\\b(null|true|false)'
177 begin: '(-?)(\\b0[xXbBoOdD][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?f?|\\.\\d+f?)([eE][-+]?\\d+f?)?)'
187 hljs
.registerLanguage('angelscript', hljsGrammar
);