OLD | NEW |
(Empty) | |
| 1 Prism.languages.prolog = { |
| 2 // Syntax depends on the implementation |
| 3 'comment': [ |
| 4 /%.+/, |
| 5 /\/\*[\s\S]*?\*\// |
| 6 ], |
| 7 // Depending on the implementation, strings may allow escaped newlines a
nd quote-escape |
| 8 'string': /(["'])(?:\1\1|\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, |
| 9 'builtin': /\b(?:fx|fy|xf[xy]?|yfx?)\b/, |
| 10 'variable': /\b[A-Z_]\w*/, |
| 11 // FIXME: Should we list all null-ary predicates (not followed by a pare
nthesis) like halt, trace, etc.? |
| 12 'function': /\b[a-z]\w*(?:(?=\()|\/\d+)/, |
| 13 'number': /\b\d+\.?\d*/, |
| 14 // Custom operators are allowed |
| 15 'operator': /[:\\=><\-?*@\/;+^|!$.]+|\b(?:is|mod|not|xor)\b/, |
| 16 'punctuation': /[(){}\[\],]/ |
| 17 }; |
OLD | NEW |