[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nano-devel] nanorc.nanorc end-of-line comments

From: Mike Frysinger
Subject: Re: [Nano-devel] nanorc.nanorc end-of-line comments
Date: Tue, 16 Jan 2018 16:02:08 -0500

On 16 Jan 2018 21:25, Benno Schulenberg wrote:
> Op 16-01-18 om 06:28 schreef Brand Huntsman:
> > color brightblue "(^|[[:space:]]+)#.*$"
> > 
> > The above color from nanorc.nanorc matches the #RRGGBB color format and
> > colors the rest of the line as a comment. Is it important to color comments 
> > at
> > the end of lines?
> No, it's not important.  And I even think only some of the commands
> allow trailing comments.  See commit ffae582a:
> > Or could whitespace be required after the # to be a valid end-of-line
> > comment?
> Hmm.  I don't like that much.  Better just scrap trailing comments
> altogether.

the syntax logic should reflect the language itself.  if we allow trailing
comments, then we should support it.  if we also allow ambiguous grammar
(like raw/unquoted color names), we should also fix that.  either by not
supporting trailing comments at all, or by requiring color names be inside
of quotes.

personally i lean towards the latter:
- for color values which aren't alpha-only, require quotes (or maybe always
  require quotes).
- support inline comments everywhere properly.

Attachment: signature.asc
Description: Digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]