Skip to content

Commit

Permalink
Merge pull request #5 from domoritz/master
Browse files Browse the repository at this point in the history
Some builtin predicated get highlighted & double quote fix
  • Loading branch information
alnkpa committed Jul 20, 2012
2 parents acdde77 + 910d6c3 commit 582dda9
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 6 deletions.
19 changes: 14 additions & 5 deletions Prolog.JSON-tmLanguage
Expand Up @@ -3,14 +3,15 @@
"fileTypes": ["pl","pro"],
"comment": "This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.",
"patterns": [
{ "include": "#comments" },
{ "include": "#comments" },
{ "name": "meta.clause.body.prolog",
"begin": "(?<=\\))\\s*(:-)",
"beginCaptures": {
"1": { "name": "keyword.control.clause.bodybegin.prolog" }
},
"patterns": [
{ "include": "#comments" },
{ "include": "#builtin" },
{ "include": "#controlandkeywords" },
{ "include": "#atom" },
{ "include": "#variable" },
Expand Down Expand Up @@ -81,9 +82,9 @@
],
"repository": {
"comments": {
"patterns": [
{ "name": "comment.line.percent-sign.prolog",
"match": "%.*"
"patterns": [
{ "name": "comment.line.percent-sign.prolog",
"match": "%.*"
}
]
},
Expand All @@ -96,6 +97,7 @@
},
"patterns": [
{ "include": "$self" },
{ "include": "#builtin" },
{ "include": "#comments" },
{ "include": "#atom" },
{ "include": "#variable" },
Expand All @@ -116,12 +118,19 @@
}
]
},
"builtin": {
"patterns": [
{ "name": "keyword.other",
"match": "\\b(op|findall|write|nl|test)\\b"
}
]
},
"constants": {
"patterns": [
{ "name": "constant.numeric.integer.prolog",
"match": "(?<![a-zA-Z]|/)\\d+"
},
{ "name": "string.quoted.prolog",
{ "name": "string.quoted.double.prolog",
"match": "\".*?\""
}
]
Expand Down
22 changes: 21 additions & 1 deletion Prolog.tmLanguage
Expand Up @@ -46,6 +46,10 @@
<key>include</key>
<string>#comments</string>
</dict>
<dict>
<key>include</key>
<string>#builtin</string>
</dict>
<dict>
<key>include</key>
<string>#controlandkeywords</string>
Expand Down Expand Up @@ -236,6 +240,18 @@
</dict>
</array>
</dict>
<key>builtin</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>\b(op|findall|write|nl|test)\b</string>
<key>name</key>
<string>keyword.other</string>
</dict>
</array>
</dict>
<key>comments</key>
<dict>
<key>patterns</key>
Expand All @@ -262,7 +278,7 @@
<key>match</key>
<string>".*?"</string>
<key>name</key>
<string>string.quoted.prolog</string>
<string>string.quoted.double.prolog</string>
</dict>
</array>
</dict>
Expand Down Expand Up @@ -299,6 +315,10 @@
<key>include</key>
<string>$self</string>
</dict>
<dict>
<key>include</key>
<string>#builtin</string>
</dict>
<dict>
<key>include</key>
<string>#comments</string>
Expand Down

0 comments on commit 582dda9

Please sign in to comment.