]>
luflow.net public git repositories - flow-web.git/blob - static/highlight/languages/scilab.js
1 /*! `scilab` grammar compiled for Highlight.js 11.11.1 */
3 var hljsGrammar
= (function () {
8 Author: Sylvestre Ledru <sylvestre.ledru@scilab-enterprises.com>
10 Description: Scilab is a port from Matlab
11 Website: https://www.scilab.org
15 function scilab(hljs
) {
16 const COMMON_CONTAINS
= [
23 hljs
.BACKSLASH_ESCAPE
,
34 keyword: 'abort break case clear catch continue do elseif else endfunction end for function '
35 + 'global if pause return resume select try then while',
37 '%f %F %t %T %pi %eps %inf %nan %e %i %z %s',
38 built_in: // Scilab has more than 2000 functions. Just list the most commons
39 'abs and acos asin atan ceil cd chdir clearglobal cosh cos cumprod deff disp error '
40 + 'exec execstr exists exp eye gettext floor fprintf fread fsolve imag isdef isempty '
41 + 'isinfisnan isvector lasterror length load linspace list listfiles log10 log2 log '
42 + 'max min msprintf mclose mopen ones or pathconvert poly printf prod pwd rand real '
43 + 'round sinh sin size gsort sprintf sqrt strcat strcmps tring sum system tanh tan '
44 + 'type typename warning zeros matrix'
46 illegal: '("|#|/\\*|\\s+/\\w+)',
49 className: 'function',
50 beginKeywords: 'function',
53 hljs
.UNDERSCORE_TITLE_MODE
,
61 // seems to be a guard against [ident]' or [ident].
62 // perhaps to prevent attributes from flagging as keywords?
64 begin: '[a-zA-Z_][a-zA-Z_0-9]*[\\.\']+',
71 contains: COMMON_CONTAINS
73 hljs
.COMMENT('//', '$')
74 ].concat(COMMON_CONTAINS
)
82 hljs
.registerLanguage('scilab', hljsGrammar
);