syntax: go: fix word boundary before dot in number literal

The fragment "\<\." can never match anything because \< matches the
beginning of a word but "." is not a word character.

Replace \< with \B (the empty string not at the edge of a word).

Signed-off-by: Tom Levy <tomlevy93@gmail.com>
This commit is contained in:
Tom Levy 2017-12-31 06:12:15 +00:00 committed by Benno Schulenberg
parent 21cd953e85
commit d04b0c123e
1 changed files with 1 additions and 1 deletions

View File

@ -26,7 +26,7 @@ color brightcyan "//[[:space:]]*\+build[[:space:]]+(([a-zA-Z_0-9]+[[:space:]]*)+
# Literals.
color red "\<[0-9]+\.[0-9]*([Ee][+-][0-9]+)?i?\>"
color red "\<[0-9]+[Ee][+-][0-9]+i?\>"
color red "\<\.[0-9]+([Ee][+-][0-9]+)?i?\>"
color red "\B\.[0-9]+([Ee][+-][0-9]+)?i?\>"
color red "\<[0-9]+i\>"
color red "\<[1-9][0-9]*\>"
color red "\<0[0-7]*\>"