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:
1.3 KB
|
Line | |
---|
1 | Prism.languages.eiffel = {
|
---|
2 | 'comment': /--.*/,
|
---|
3 | 'string': [
|
---|
4 | // Aligned-verbatim-strings
|
---|
5 | {
|
---|
6 | pattern: /"([^[]*)\[[\s\S]*?\]\1"/,
|
---|
7 | greedy: true
|
---|
8 | },
|
---|
9 | // Non-aligned-verbatim-strings
|
---|
10 | {
|
---|
11 | pattern: /"([^{]*)\{[\s\S]*?\}\1"/,
|
---|
12 | greedy: true
|
---|
13 | },
|
---|
14 | // Single-line string
|
---|
15 | {
|
---|
16 | pattern: /"(?:%(?:(?!\n)\s)*\n\s*%|%\S|[^%"\r\n])*"/,
|
---|
17 | greedy: true
|
---|
18 | }
|
---|
19 | ],
|
---|
20 | // normal char | special char | char code
|
---|
21 | 'char': /'(?:%.|[^%'\r\n])+'/,
|
---|
22 | 'keyword': /\b(?:across|agent|alias|all|and|as|assign|attached|attribute|check|class|convert|create|Current|debug|deferred|detachable|do|else|elseif|end|ensure|expanded|export|external|feature|from|frozen|if|implies|inherit|inspect|invariant|like|local|loop|not|note|obsolete|old|once|or|Precursor|redefine|rename|require|rescue|Result|retry|select|separate|some|then|undefine|until|variant|Void|when|xor)\b/i,
|
---|
23 | 'boolean': /\b(?:False|True)\b/i,
|
---|
24 | // Convention: class-names are always all upper-case characters
|
---|
25 | 'class-name': /\b[A-Z][\dA-Z_]*\b/,
|
---|
26 | 'number': [
|
---|
27 | // hexa | octal | bin
|
---|
28 | /\b0[xcb][\da-f](?:_*[\da-f])*\b/i,
|
---|
29 | // Decimal
|
---|
30 | /(?:\b\d(?:_*\d)*)?\.(?:(?:\d(?:_*\d)*)?e[+-]?)?\d(?:_*\d)*\b|\b\d(?:_*\d)*\b\.?/i
|
---|
31 | ],
|
---|
32 | 'punctuation': /:=|<<|>>|\(\||\|\)|->|\.(?=\w)|[{}[\];(),:?]/,
|
---|
33 | 'operator': /\\\\|\|\.\.\||\.\.|\/[~\/=]?|[><]=?|[-+*^=~]/
|
---|
34 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.