-
Notifications
You must be signed in to change notification settings - Fork 554
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #185 from yochem/master
Added syntax highlighting for Prolog
- Loading branch information
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
## Here is a prolog example. | ||
|
||
syntax prolog "\.pl" | ||
comment "%" | ||
|
||
# Reset everything | ||
color normal ".*" | ||
|
||
# Integers and floats | ||
color yellow "(^| |=)[0-9]+\.?[0-9]*" | ||
|
||
# Variables | ||
color red "(^|[[:blank:]]|\(|,)[A-Z]+" | ||
color red "(^|[[:blank:]]|\(|,)_[0-9a-zA-Z_]+($|[[:blank:]]|,|\))" | ||
|
||
# Anonymous variable '_' | ||
color yellow "(^|[[:blank:]]|\(|,)_($|[[:blank:]]|,|\))" | ||
|
||
# Functions | ||
color cyan "(^|[[:blank:]])\w+\(" | ||
color normal "\(|\)|\[|\]|,|=|\\=" | ||
|
||
# Atoms | ||
color green start="\"" end="\"" | ||
color green start="'" end="'" | ||
|
||
# Comments | ||
color white "(^|[[:blank:]])%.*$" | ||
color white start="/\*" end="\*/" | ||
|
||
# Reminders | ||
color black,yellow "(BUG|DEBUG|FIXME|IDEA|NOTE|REVIEW|TEMP|TODO|WARNING|XXX)" | ||
|
||
# Spaces in front of tabs | ||
color ,red " + +" |