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
|
Rev | Line | |
---|
[d24f17c] | 1 | // https://www.gap-system.org/Manuals/doc/ref/chap4.html
|
---|
| 2 | // https://www.gap-system.org/Manuals/doc/ref/chap27.html
|
---|
| 3 |
|
---|
| 4 | Prism.languages.gap = {
|
---|
| 5 | 'shell': {
|
---|
| 6 | pattern: /^gap>[\s\S]*?(?=^gap>|$(?![\s\S]))/m,
|
---|
| 7 | greedy: true,
|
---|
| 8 | inside: {
|
---|
| 9 | 'gap': {
|
---|
| 10 | pattern: /^(gap>).+(?:(?:\r(?:\n|(?!\n))|\n)>.*)*/,
|
---|
| 11 | lookbehind: true,
|
---|
| 12 | inside: null // see below
|
---|
| 13 | },
|
---|
| 14 | 'punctuation': /^gap>/
|
---|
| 15 | }
|
---|
| 16 | },
|
---|
| 17 |
|
---|
| 18 | 'comment': {
|
---|
| 19 | pattern: /#.*/,
|
---|
| 20 | greedy: true
|
---|
| 21 | },
|
---|
| 22 | 'string': {
|
---|
| 23 | pattern: /(^|[^\\'"])(?:'(?:[^\r\n\\']|\\.){1,10}'|"(?:[^\r\n\\"]|\\.)*"(?!")|"""[\s\S]*?""")/,
|
---|
| 24 | lookbehind: true,
|
---|
| 25 | greedy: true,
|
---|
| 26 | inside: {
|
---|
| 27 | 'continuation': {
|
---|
| 28 | pattern: /([\r\n])>/,
|
---|
| 29 | lookbehind: true,
|
---|
| 30 | alias: 'punctuation'
|
---|
| 31 | }
|
---|
| 32 | }
|
---|
| 33 | },
|
---|
| 34 |
|
---|
| 35 | 'keyword': /\b(?:Assert|Info|IsBound|QUIT|TryNextMethod|Unbind|and|atomic|break|continue|do|elif|else|end|fi|for|function|if|in|local|mod|not|od|or|quit|readonly|readwrite|rec|repeat|return|then|until|while)\b/,
|
---|
| 36 | 'boolean': /\b(?:false|true)\b/,
|
---|
| 37 |
|
---|
| 38 | 'function': /\b[a-z_]\w*(?=\s*\()/i,
|
---|
| 39 |
|
---|
| 40 | 'number': {
|
---|
| 41 | pattern: /(^|[^\w.]|\.\.)(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?(?:_[a-z]?)?(?=$|[^\w.]|\.\.)/,
|
---|
| 42 | lookbehind: true
|
---|
| 43 | },
|
---|
| 44 |
|
---|
| 45 | 'continuation': {
|
---|
| 46 | pattern: /([\r\n])>/,
|
---|
| 47 | lookbehind: true,
|
---|
| 48 | alias: 'punctuation'
|
---|
| 49 | },
|
---|
| 50 | 'operator': /->|[-+*/^~=!]|<>|[<>]=?|:=|\.\./,
|
---|
| 51 | 'punctuation': /[()[\]{},;.:]/
|
---|
| 52 | };
|
---|
| 53 |
|
---|
| 54 | Prism.languages.gap.shell.inside.gap.inside = Prism.languages.gap;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.