Merge pull request #185 from yochem/master

Added syntax highlighting for Prolog
This commit is contained in:
Anthony Scopatz 2018-09-05 08:30:59 -04:00 committed by GitHub
commit 1e589cb729
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

35
prolog.nanorc Normal file
View File

@ -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 " + +"