forked from highlightjs/highlight.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
99 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -82,3 +82,5 @@ Contributors: | |
- Poren Chiang <[email protected]> | ||
- Kelley van Evert <[email protected]> | ||
- Kurt Emch <[email protected]> | ||
- Sylvestre Ledru <[email protected]> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
/* | ||
Language: Scilab | ||
Author: Denis Bardadym <[email protected]> | ||
Author: Sylvestre Ledru <[email protected]> | ||
(Scilab port) | ||
*/ | ||
|
||
function(hljs) { | ||
|
||
var COMMON_CONTAINS = [ | ||
hljs.C_NUMBER_MODE, | ||
{ | ||
className: 'string', | ||
begin: '\'|\"', end: '\'|\"', | ||
contains: [hljs.BACKSLASH_ESCAPE, {begin: '\'\''}], | ||
relevance: 0 | ||
} | ||
]; | ||
|
||
return { | ||
keywords: { | ||
keyword: 'abort break case clear catch continue do elseif else endfunction end for function'+ | ||
'global if pause return resume select try then while'+ | ||
'%f %F %t %T %pi %eps %inf %nan %e %i %z %s', | ||
built_in: // Scilab has more than 2000 functions. Just list the most commons | ||
'abs and acos asin atan ceil cd chdir clearglobal cosh cos cumprod deff disp error'+ | ||
'exec execstr exists exp eye gettext floor fprintf fread fsolve imag isdef isempty'+ | ||
'isinfisnan isvector lasterror length load linspace list listfiles log10 log2 log'+ | ||
'max min msprintf mclose mopen ones or pathconvert poly printf prod pwd rand real'+ | ||
'round sinh sin size gsort sprintf sqrt strcat strcmps tring sum system tanh tan'+ | ||
'type typename warning zeros matrix' | ||
}, | ||
illegal: '("|#|/\\*|\\s+/\\w+)', | ||
contains: [ | ||
{ | ||
className: 'function', | ||
beginWithKeyword: true, end: '$', | ||
keywords: 'function endfunction|10', | ||
contains: [ | ||
{ | ||
className: 'title', | ||
begin: hljs.UNDERSCORE_IDENT_RE | ||
}, | ||
{ | ||
className: 'params', | ||
begin: '\\(', end: '\\)' | ||
}, | ||
], | ||
}, | ||
{ | ||
className: 'transposed_variable', | ||
begin: '[a-zA-Z_][a-zA-Z_0-9]*(\'+[\\.\']*|[\\.\']+)', end: '' | ||
}, | ||
{ | ||
className: 'matrix', | ||
begin: '\\[', end: '\\]\'*[\\.\']*', | ||
contains: COMMON_CONTAINS | ||
}, | ||
{ | ||
className: 'comment', | ||
begin: '//', end: '$' | ||
} | ||
].concat(COMMON_CONTAINS) | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters