[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: |
Benno Schulenberg |
Subject: |
Re: [Nano-devel] [PATCH] syntax: perl: don't color the character after a variable name |
Date: |
Fri, 9 Aug 2019 14:05:40 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 |
Op 08-08-19 om 21:00 schreef Brand Huntsman:
> On Thu, 8 Aug 2019 20:11:43 +0200 Benno Schulenberg <address@hidden>
> wrote:
>
>> The $/ gets highlighted as if it were a variable. :| The $\ gets colored as
>> if were a variable.
>
> Those are probably mostly only set, and dropping them would improve
> readability. The following would highlight them when set.
>
> color cyan "(^|[[:space:]])\$[\\/]"
Added in the upcoming third version (but with a single backslash: there
is no need to escape a backslash within []).
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>?
Also, for the leading-caret part (\^[]A-Z^_?\[]), why are ] and ^ and ?
and \ and [ allowed after a leading caret? I don't see them anywhere
in the perlvar document. I only see things like $^A, $^X, and $^_, but
not $^] et cetera.
The assumptions of the above two paragraphs I've worked into the upcoming
third version of the patch.
> Substitution and match are already handled,
Ah, indeed. But... I think the 'white' was meant to undo the overcoloring
by the regex for variable names. So probably it should be changed to 'normal'.
But that is a different issue.
Benno
signature.asc
Description: OpenPGP digital signature
- [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 <=
- Re: [Nano-devel] [PATCH] syntax: perl: don't color the character after a variable name, Brand Huntsman, 2019/08/09
- 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