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