From 71ea2b416d741bcb317abd3aea254d2c920ef882 Mon Sep 17 00:00:00 2001 From: Masatake YAMATO Date: Sat, 10 Dec 2022 16:52:11 +0900 Subject: [PATCH] Perl: skip string literals when collecting heredoc markers Close #3588. Signed-off-by: Masatake YAMATO --- Units/parser-perl.r/no-heredoc.d/args.ctags | 2 + .../parser-perl.r/no-heredoc.d/expected.tags | 14 +++ Units/parser-perl.r/no-heredoc.d/input.pl | 43 ++++++++++ parsers/perl.c | 85 +++++++++++++++++++ 4 files changed, 144 insertions(+) create mode 100644 Units/parser-perl.r/no-heredoc.d/args.ctags create mode 100644 Units/parser-perl.r/no-heredoc.d/expected.tags create mode 100644 Units/parser-perl.r/no-heredoc.d/input.pl diff --git a/Units/parser-perl.r/no-heredoc.d/args.ctags b/Units/parser-perl.r/no-heredoc.d/args.ctags new file mode 100644 index 0000000000..0020815e1d --- /dev/null +++ b/Units/parser-perl.r/no-heredoc.d/args.ctags @@ -0,0 +1,2 @@ +--sort=no +--kinds-Perl=+{heredoc} diff --git a/Units/parser-perl.r/no-heredoc.d/expected.tags b/Units/parser-perl.r/no-heredoc.d/expected.tags new file mode 100644 index 0000000000..a11a30753d --- /dev/null +++ b/Units/parser-perl.r/no-heredoc.d/expected.tags @@ -0,0 +1,14 @@ +f0tag input.pl /^sub f0tag() {}$/;" s +f1tag input.pl /^sub f1tag() {}$/;" s +f2tag input.pl /^sub f2tag() {}$/;" s +f3tag input.pl /^sub f3tag() {}$/;" s +hereodc0tag input.pl /^print 'cat <<