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:
546 bytes
|
Rev | Line | |
---|
[d24f17c] | 1 | Prism.languages.matlab = {
|
---|
| 2 | 'comment': [
|
---|
| 3 | /%\{[\s\S]*?\}%/,
|
---|
| 4 | /%.+/
|
---|
| 5 | ],
|
---|
| 6 | 'string': {
|
---|
| 7 | pattern: /\B'(?:''|[^'\r\n])*'/,
|
---|
| 8 | greedy: true
|
---|
| 9 | },
|
---|
| 10 | // FIXME We could handle imaginary numbers as a whole
|
---|
| 11 | 'number': /(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[eE][+-]?\d+)?(?:[ij])?|\b[ij]\b/,
|
---|
| 12 | 'keyword': /\b(?:NaN|break|case|catch|continue|else|elseif|end|for|function|if|inf|otherwise|parfor|pause|pi|return|switch|try|while)\b/,
|
---|
| 13 | 'function': /\b(?!\d)\w+(?=\s*\()/,
|
---|
| 14 | 'operator': /\.?[*^\/\\']|[+\-:@]|[<>=~]=?|&&?|\|\|?/,
|
---|
| 15 | 'punctuation': /\.{3}|[.,;\[\](){}!]/
|
---|
| 16 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.