Skip to content

Commit c471e13

Browse files
committed
Require word edges for numeric constants
1 parent 519d167 commit c471e13

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

scripts/tenyr.vim

+4-4
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ syn match tenyrEscape contained '\\[\\'0bfnrtv]'
3131
syn region tenyrString start='"' end='"' contained contains=tenyrEscape
3232
syn region tenyrStrRegion start="\.chars\>" end="$" keepend contains=tenyrString,tenyrStrDir
3333

34-
syn match tenyrNumber '-\?\(0\|[1-9]\([0-9_]*[0-9]\)\?\)\>' " decimal
35-
syn match tenyrNumber '-\?0[0-7_]*[0-7]' " octal
36-
syn match tenyrNumber '-\?0x[[:xdigit:]_]*[[:xdigit:]]' " hexadecimal
37-
syn match tenyrNumber '-\?0b[01_]*[01]' " binary
34+
syn match tenyrNumber '-\?\<\(0\|[1-9]\([0-9_]*[0-9]\)\?\)\>' " decimal
35+
syn match tenyrNumber '-\?\<0[0-7_]*[0-7]' " octal
36+
syn match tenyrNumber '-\?\<0x[[:xdigit:]_]*[[:xdigit:]]' " hexadecimal
37+
syn match tenyrNumber '-\?\<0b[01_]*[01]' " binary
3838

3939
let b:current_syntax = "tenyr"
4040

0 commit comments

Comments
 (0)