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:
679 bytes
|
Line | |
---|
1 | Prism.languages.prolog = {
|
---|
2 | // Syntax depends on the implementation
|
---|
3 | 'comment': {
|
---|
4 | pattern: /\/\*[\s\S]*?\*\/|%.*/,
|
---|
5 | greedy: true
|
---|
6 | },
|
---|
7 | // Depending on the implementation, strings may allow escaped newlines and quote-escape
|
---|
8 | 'string': {
|
---|
9 | pattern: /(["'])(?:\1\1|\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1(?!\1)/,
|
---|
10 | greedy: true
|
---|
11 | },
|
---|
12 | 'builtin': /\b(?:fx|fy|xf[xy]?|yfx?)\b/,
|
---|
13 | // FIXME: Should we list all null-ary predicates (not followed by a parenthesis) like halt, trace, etc.?
|
---|
14 | 'function': /\b[a-z]\w*(?:(?=\()|\/\d+)/,
|
---|
15 | 'number': /\b\d+(?:\.\d*)?/,
|
---|
16 | // Custom operators are allowed
|
---|
17 | 'operator': /[:\\=><\-?*@\/;+^|!$.]+|\b(?:is|mod|not|xor)\b/,
|
---|
18 | 'punctuation': /[(){}\[\],]/
|
---|
19 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.