aboutsummaryrefslogtreecommitdiff
path: root/node_modules/highlight.js/lib/languages/scilab.js
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-05-24 15:10:37 +0200
committerFlorian Dold <florian.dold@gmail.com>2017-05-24 15:11:17 +0200
commit7a3df06eb573d36142bd1a8e03c5ce8752d300b3 (patch)
tree70bfaea8884c374876f607774850a3a51c0cb381 /node_modules/highlight.js/lib/languages/scilab.js
parentaca1143cb9eed16cf37f04e475e4257418dd18ac (diff)
fix build issues and add typedoc
Diffstat (limited to 'node_modules/highlight.js/lib/languages/scilab.js')
-rw-r--r--node_modules/highlight.js/lib/languages/scilab.js53
1 files changed, 53 insertions, 0 deletions
diff --git a/node_modules/highlight.js/lib/languages/scilab.js b/node_modules/highlight.js/lib/languages/scilab.js
new file mode 100644
index 000000000..9aeaf1820
--- /dev/null
+++ b/node_modules/highlight.js/lib/languages/scilab.js
@@ -0,0 +1,53 @@
+module.exports = function(hljs) {
+
+ var COMMON_CONTAINS = [
+ hljs.C_NUMBER_MODE,
+ {
+ className: 'string',
+ begin: '\'|\"', end: '\'|\"',
+ contains: [hljs.BACKSLASH_ESCAPE, {begin: '\'\''}]
+ }
+ ];
+
+ return {
+ aliases: ['sci'],
+ lexemes: /%?\w+/,
+ keywords: {
+ keyword: 'abort break case clear catch continue do elseif else endfunction end for function '+
+ 'global if pause return resume select try then while',
+ literal:
+ '%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',
+ beginKeywords: 'function', end: '$',
+ contains: [
+ hljs.UNDERSCORE_TITLE_MODE,
+ {
+ className: 'params',
+ begin: '\\(', end: '\\)'
+ }
+ ]
+ },
+ {
+ begin: '[a-zA-Z_][a-zA-Z_0-9]*(\'+[\\.\']*|[\\.\']+)', end: '',
+ relevance: 0
+ },
+ {
+ begin: '\\[', end: '\\]\'*[\\.\']*',
+ relevance: 0,
+ contains: COMMON_CONTAINS
+ },
+ hljs.COMMENT('//', '$')
+ ].concat(COMMON_CONTAINS)
+ };
+}; \ No newline at end of file