mirror of git://git.sv.gnu.org/nano.git
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>
This commit is contained in:
parent
b48dfde3b2
commit
3480518a5c
|
@ -7,7 +7,8 @@ formatter gofmt -w
|
|||
|
||||
# Types.
|
||||
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.
|
||||
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.
|
||||
color brightcyan "\<(package|import)\>"
|
||||
color brightcyan "//[[:space:]]*\+build[[:space:]]+(([a-zA-Z_0-9]+[[:space:]]*)+,[[:space:]]*)*[a-zA-Z_0-9]+"
|
||||
|
||||
# Literals.
|
||||
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 start="/\*" end="\*/"
|
||||
|
||||
# Special comments.
|
||||
color brightcyan "//[[:space:]]*\+build[[:space:]]+(([a-zA-Z_0-9]+[[:space:]]*)+,[[:space:]]*)*[a-zA-Z_0-9]+"
|
||||
|
||||
# Trailing whitespace.
|
||||
color ,green "[[:space:]]+$"
|
||||
|
|
Loading…
Reference in New Issue