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.5 KB
|
Rev | Line | |
---|
[d24f17c] | 1 | 'use strict'
|
---|
| 2 |
|
---|
| 3 | module.exports = eiffel
|
---|
| 4 | eiffel.displayName = 'eiffel'
|
---|
| 5 | eiffel.aliases = []
|
---|
| 6 | function eiffel(Prism) {
|
---|
| 7 | Prism.languages.eiffel = {
|
---|
| 8 | comment: /--.*/,
|
---|
| 9 | string: [
|
---|
| 10 | // Aligned-verbatim-strings
|
---|
| 11 | {
|
---|
| 12 | pattern: /"([^[]*)\[[\s\S]*?\]\1"/,
|
---|
| 13 | greedy: true
|
---|
| 14 | }, // Non-aligned-verbatim-strings
|
---|
| 15 | {
|
---|
| 16 | pattern: /"([^{]*)\{[\s\S]*?\}\1"/,
|
---|
| 17 | greedy: true
|
---|
| 18 | }, // Single-line string
|
---|
| 19 | {
|
---|
| 20 | pattern: /"(?:%(?:(?!\n)\s)*\n\s*%|%\S|[^%"\r\n])*"/,
|
---|
| 21 | greedy: true
|
---|
| 22 | }
|
---|
| 23 | ],
|
---|
| 24 | // normal char | special char | char code
|
---|
| 25 | char: /'(?:%.|[^%'\r\n])+'/,
|
---|
| 26 | keyword:
|
---|
| 27 | /\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,
|
---|
| 28 | boolean: /\b(?:False|True)\b/i,
|
---|
| 29 | // Convention: class-names are always all upper-case characters
|
---|
| 30 | 'class-name': /\b[A-Z][\dA-Z_]*\b/,
|
---|
| 31 | number: [
|
---|
| 32 | // hexa | octal | bin
|
---|
| 33 | /\b0[xcb][\da-f](?:_*[\da-f])*\b/i, // Decimal
|
---|
| 34 | /(?:\b\d(?:_*\d)*)?\.(?:(?:\d(?:_*\d)*)?e[+-]?)?\d(?:_*\d)*\b|\b\d(?:_*\d)*\b\.?/i
|
---|
| 35 | ],
|
---|
| 36 | punctuation: /:=|<<|>>|\(\||\|\)|->|\.(?=\w)|[{}[\];(),:?]/,
|
---|
| 37 | operator: /\\\\|\|\.\.\||\.\.|\/[~\/=]?|[><]=?|[-+*^=~]/
|
---|
| 38 | }
|
---|
| 39 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.