2017-02-28 15:50:10 +01:00
## Here is an example for Genie.
syntax "genie" "\.gs$"
2017-01-12 10:25:39 +01:00
2017-02-28 15:50:10 +01:00
# Namespace.
2017-02-04 11:22:03 +01:00
color magenta "\<(uses|namespace)\>"
2017-02-28 15:50:10 +01:00
# Data types.
2017-02-04 11:22:03 +01:00
color green "\<(bool|byte|char|date|datetime|decimal|double|float|int|long|object|sbyte|short|single|string|ulong|ushort)\>"
2017-02-28 15:50:10 +01:00
# Definitions.
2017-02-04 11:22:03 +01:00
color brightred "\<(const|class|construct|def|delegate|enum|exception|extern|event|final|get|init|inline|interface|override|prop|return|set|static|struct|var|virtual|weak)\>"
2017-02-28 15:50:10 +01:00
# Keywords.
2017-02-04 11:22:03 +01:00
color red "\<(abstract|as|and|break|case|cast|continue|default|delete|div|do|downto|dynamic|else|ensures|except|extern|finally|for|if|implements|in|isa|is|lock|new|not|of|out|or|otherwise|pass|private|raise|raises|readonly|ref|requires|to|try|unless|when|while)\>"
2017-02-28 15:50:10 +01:00
# Special variables.
2017-02-04 11:22:03 +01:00
color brightcyan "\<(self|super)\>"
2017-02-28 15:50:10 +01:00
# Null value.
2017-02-04 11:22:03 +01:00
color brightyellow "\<(null)\>"
2017-02-28 15:50:10 +01:00
# Boolean.
2017-02-04 11:22:03 +01:00
color yellow "\<(false|true)\>"
2017-02-28 15:50:10 +01:00
# Builtin functions.
2017-02-04 11:22:03 +01:00
color cyan "\<(array|assert|dict|list|max|min|print|prop|sizeof|typeof)\>"
2017-02-28 15:50:10 +01:00
# Numbers.
2017-01-12 10:25:39 +01:00
color brightmagenta "[0-9][0-9\.]*(m|ms|d|h|s|f|F|l|L)?"
2017-02-28 15:50:10 +01:00
# Regular expression.
2017-01-12 10:25:39 +01:00
color brightgreen "/(\\.|[^/])*/"
2017-02-28 15:50:10 +01:00
# Double quoted string.
color brightblue ""(\\.|[^"])*""
# Single quoted string.
color brightblue "'(\\.|[^'])*'"
# Multiline string.
2017-01-12 10:25:39 +01:00
color blue start=""""" end="""""
2017-02-28 15:50:10 +01:00
# Line comment.
2017-01-12 10:25:39 +01:00
color yellow "(^|[[:space:]])//.*"
2017-02-28 15:50:10 +01:00
# Block comment.
color yellow start="/\*" end="\*/"
# Trailing whitespace.
2017-01-12 10:25:39 +01:00
color ,green "[[:space:]]+$"
2017-02-28 15:50:10 +01:00
# Spaces in front or rear of tabs.
2017-01-12 10:25:39 +01:00
color ,red " + +| + +"