main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
684 bytes
|
Rev | Line | |
---|
[d24f17c] | 1 | 'use strict'
|
---|
| 2 |
|
---|
| 3 | module.exports = matlab
|
---|
| 4 | matlab.displayName = 'matlab'
|
---|
| 5 | matlab.aliases = []
|
---|
| 6 | function matlab(Prism) {
|
---|
| 7 | Prism.languages.matlab = {
|
---|
| 8 | comment: [/%\{[\s\S]*?\}%/, /%.+/],
|
---|
| 9 | string: {
|
---|
| 10 | pattern: /\B'(?:''|[^'\r\n])*'/,
|
---|
| 11 | greedy: true
|
---|
| 12 | },
|
---|
| 13 | // FIXME We could handle imaginary numbers as a whole
|
---|
| 14 | number: /(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[eE][+-]?\d+)?(?:[ij])?|\b[ij]\b/,
|
---|
| 15 | keyword:
|
---|
| 16 | /\b(?:NaN|break|case|catch|continue|else|elseif|end|for|function|if|inf|otherwise|parfor|pause|pi|return|switch|try|while)\b/,
|
---|
| 17 | function: /\b(?!\d)\w+(?=\s*\()/,
|
---|
| 18 | operator: /\.?[*^\/\\']|[+\-:@]|[<>=~]=?|&&?|\|\|?/,
|
---|
| 19 | punctuation: /\.{3}|[.,;\[\](){}!]/
|
---|
| 20 | }
|
---|
| 21 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.