all messages for Emacs-related lists mirrored at yhetil.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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.