[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nano-devel] [PATCH] syntax: perl: don't color the character after a
From: |
Brand Huntsman |
Subject: |
Re: [Nano-devel] [PATCH] syntax: perl: don't color the character after a variable name |
Date: |
Fri, 9 Aug 2019 12:27:47 -0600 |
On Fri, 9 Aug 2019 14:05:40 +0200
Benno Schulenberg <address@hidden> wrote:
> The current rules also color @$, @&, &$, and &&, for example. And
> that last one certainly is not a variable name and should not be
> colored as one. Maybe only $<punct> is a variable name, and not
> @<punct>, %<punct>, and &<punct>?
perl -e '@$ = 1; print @$'
perl -e '%$ = 1; print %$'
perl -e '&$ = 1;'
Undefined subroutine &main::$ called at -e line 1.
So the punctuation set needs [$@%] sigils. And you forgot to remove \ and /
from the punctuation set.
You can also remove the \$? now that punctuation is in a separate regex.
Can't really do much about it, but the $) in /(foo|$)/ is also colored. $) is
the gid and more likely to be used in expressions, so it can't be treated like
$\ and $/.
> Also, for the leading-caret part (\^[]A-Z^_?\[]), why are ] and ^
> and ? and \ and [ allowed after a leading caret?
"Perl variable names may also be ... or the two-character sequence: ^ (caret or
CIRCUMFLEX ACCENT) followed by any one of the characters [][A-Z^_?\] ."
- [Nano-devel] [PATCH] syntax: perl: don't color the character after a variable name, Benno Schulenberg, 2019/08/04
- Re: [Nano-devel] [PATCH] syntax: perl: don't color the character after a variable name, Brand Huntsman, 2019/08/04
- Re: [Nano-devel] [PATCH] syntax: perl: don't color the character after a variable name, Benno Schulenberg, 2019/08/06
- Re: [Nano-devel] [PATCH] syntax: perl: don't color the character after a variable name, Brand Huntsman, 2019/08/06
- Re: [Nano-devel] [PATCH] syntax: perl: don't color the character after a variable name, Benno Schulenberg, 2019/08/07
- Re: [Nano-devel] [PATCH] syntax: perl: don't color the character after a variable name, Brand Huntsman, 2019/08/08
- Re: [Nano-devel] [PATCH] syntax: perl: don't color the character after a variable name, Benno Schulenberg, 2019/08/08
- Re: [Nano-devel] [PATCH] syntax: perl: don't color the character after a variable name, Brand Huntsman, 2019/08/08
- Re: [Nano-devel] [PATCH] syntax: perl: don't color the character after a variable name, Benno Schulenberg, 2019/08/09
- Re: [Nano-devel] [PATCH] syntax: perl: don't color the character after a variable name,
Brand Huntsman <=
- Re: [Nano-devel] [PATCH] syntax: perl: don't color the character after a variable name, Benno Schulenberg, 2019/08/10
- Re: [Nano-devel] [PATCH] syntax: perl: don't color the character after a variable name, Brand Huntsman, 2019/08/11
- Re: [Nano-devel] [PATCH] syntax: perl: don't color the character after a variable name, Benno Schulenberg, 2019/08/11
- Re: [Nano-devel] [PATCH] syntax: perl: don't color the character after a variable name, Brand Huntsman, 2019/08/11
- Re: [Nano-devel] [PATCH] syntax: perl: don't color the character after a variable name, Benno Schulenberg, 2019/08/13
- Re: [Nano-devel] [PATCH] syntax: perl: don't color the character after a variable name, Brand Huntsman, 2019/08/13
- Re: [Nano-devel] [PATCH] syntax: perl: don't color the character after a variable name, Benno Schulenberg, 2019/08/14