syntax: go: highlight the chan keyword, and the special +build comment
This fixes https://savannah.gnu.org/bugs/?58424 Reported-by: Ryan Westlund <rlwestlund@gmail.com> Signed-off-by: Ryan Westlund <rlwestlund@gmail.com>master
parent
b48dfde3b2
commit
3480518a5c
|
@ -7,7 +7,8 @@ formatter gofmt -w
|
||||||
|
|
||||||
# Types.
|
# Types.
|
||||||
color green "\<(bool|u?int(8|16|32|64)?|float(32|64)|complex(64|128)|byte|rune|uintptr|string|error)\>"
|
color green "\<(bool|u?int(8|16|32|64)?|float(32|64)|complex(64|128)|byte|rune|uintptr|string|error)\>"
|
||||||
color green "\<((<-[[:space:]]*)chan|chan[[:space:]]*<-|const|func|interface|map|struct|type|var)\>"
|
color green "\<(chan|const|func|interface|map|struct|type|var)\>"
|
||||||
|
color green "<-[[:space:]]*chan\>|\<chan[[:space:]]*<-"
|
||||||
|
|
||||||
# Predefined functions.
|
# Predefined functions.
|
||||||
color blue "\<(append|cap|close|complex|copy|delete|imag|len|make|new|panic|print|println|real|recover)\>"
|
color blue "\<(append|cap|close|complex|copy|delete|imag|len|make|new|panic|print|println|real|recover)\>"
|
||||||
|
@ -20,7 +21,6 @@ color magenta "\<(break|continue|fallthrough|goto|return)\>"
|
||||||
|
|
||||||
# Declarations.
|
# Declarations.
|
||||||
color brightcyan "\<(package|import)\>"
|
color brightcyan "\<(package|import)\>"
|
||||||
color brightcyan "//[[:space:]]*\+build[[:space:]]+(([a-zA-Z_0-9]+[[:space:]]*)+,[[:space:]]*)*[a-zA-Z_0-9]+"
|
|
||||||
|
|
||||||
# Literals.
|
# Literals.
|
||||||
color red "\<([1-9][0-9]*|0[0-7]*|0[xX][0-9A-Fa-f]+)\>"
|
color red "\<([1-9][0-9]*|0[0-7]*|0[xX][0-9A-Fa-f]+)\>"
|
||||||
|
@ -39,5 +39,8 @@ color red start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*""
|
||||||
color brightblue "//.*"
|
color brightblue "//.*"
|
||||||
color brightblue start="/\*" end="\*/"
|
color brightblue start="/\*" end="\*/"
|
||||||
|
|
||||||
|
# Special comments.
|
||||||
|
color brightcyan "//[[:space:]]*\+build[[:space:]]+(([a-zA-Z_0-9]+[[:space:]]*)+,[[:space:]]*)*[a-zA-Z_0-9]+"
|
||||||
|
|
||||||
# Trailing whitespace.
|
# Trailing whitespace.
|
||||||
color ,green "[[:space:]]+$"
|
color ,green "[[:space:]]+$"
|
||||||
|
|
Loading…
Reference in New Issue