unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#47598: cperl-mode: Highlighting confused with ternary and -x
@ 2021-04-05  0:04 E. Choroba
  2021-04-06 18:33 ` bug#47598: cperl-mode: Highlighting confused with ternary and -x [PATCH] Harald Jörg
  0 siblings, 1 reply; 3+ messages in thread
From: E. Choroba @ 2021-04-05  0:04 UTC (permalink / raw)
  To: 47598

When combining the ternary operator with file tests using the default 
argument, cperl-mode gets confused.

For example:

my $f = -f ? 'file'
       : -l ? [readlink]
       : -d ? 'dir'
            : 'unknown';

It seems to think the ?'s are not part of a ternary operator, but rather a 
match-once operator. Note that m?? without m results in a syntax error since 
Perl 5.22.

Ch.





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-05-06 10:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-05  0:04 bug#47598: cperl-mode: Highlighting confused with ternary and -x E. Choroba
2021-04-06 18:33 ` bug#47598: cperl-mode: Highlighting confused with ternary and -x [PATCH] Harald Jörg
2021-05-06 10:34   ` bug#47598: cperl-mode: Highlighting confused with ternary and -x Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).