Skip to content

Commit

Permalink
Prolog: Removed variable token + minor improvements (#3247)
Browse files Browse the repository at this point in the history
  • Loading branch information
RunDevelopment committed Dec 10, 2021
1 parent 7d740c4 commit bacf9ae
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 22 deletions.
11 changes: 5 additions & 6 deletions components/prism-prolog.js
@@ -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*)?/,
Expand Down
2 changes: 1 addition & 1 deletion components/prism-prolog.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 0 additions & 15 deletions tests/languages/prolog/variable_feature.test

This file was deleted.

0 comments on commit bacf9ae

Please sign in to comment.