Skip to content
Permalink
Browse files
Prolog: Removed variable token + minor improvements (#3247)
  • Loading branch information
RunDevelopment committed Dec 10, 2021
1 parent 7d740c4 commit bacf9ae31157fb6e336fe26dac705565cab5181f
Showing with 6 additions and 22 deletions.
  1. +5 −6 components/prism-prolog.js
  2. +1 −1 components/prism-prolog.min.js
  3. +0 −15 tests/languages/prolog/variable_feature.test
@@ -1,16 +1,15 @@
Prism.languages.prolog = {
// Syntax depends on the implementation
'comment': [
/%.+/,
/\/\*[\s\S]*?\*\//
],
'comment': {
pattern: /\/\*[\s\S]*?\*\/|%.*/,
greedy: true
},
// Depending on the implementation, strings may allow escaped newlines and quote-escape
'string': {
pattern: /(["'])(?:\1\1|\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
pattern: /(["'])(?:\1\1|\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1(?!\1)/,
greedy: true
},
'builtin': /\b(?:fx|fy|xf[xy]?|yfx?)\b/,
'variable': /\b[A-Z_]\w*/,
// FIXME: Should we list all null-ary predicates (not followed by a parenthesis) like halt, trace, etc.?
'function': /\b[a-z]\w*(?:(?=\()|\/\d+)/,
'number': /\b\d+(?:\.\d*)?/,

Some generated files are not rendered by default. Learn more.

This file was deleted.

0 comments on commit bacf9ae

Please sign in to comment.