Commit d04b0c12 authored by Tom Levy's avatar Tom Levy Committed by Benno Schulenberg
Browse files

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: default avatarTom Levy <tomlevy93@gmail.com>
parent 21cd953e
Showing with 1 addition and 1 deletion
+1 -1
......@@ -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]*\>"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment