summaryrefslogtreecommitdiff
path: root/proto.h
diff options
context:
space:
mode:
authorZefram <zefram@fysh.org>2010-09-08 09:51:29 +0200
committerRafael Garcia-Suarez <rgs@consttype.org>2010-09-08 10:15:44 +0200
commitea25a9b2cf73948b1e8c5675de027e0ad13277bd (patch)
tree2b8bc87185e0e9e01b643752f911cdf4eeac0f85 /proto.h
parentc99cfaa7c4ced6145d9642cd15da5bb2ea4ad19e (diff)
downloadperl-ea25a9b2cf73948b1e8c5675de027e0ad13277bd.tar.gz
make qw(...) first-class syntax
This makes a qw(...) list literal a distinct token type for the parser, where previously it was munged into a "(",THING,")" sequence. The change means that qw(...) can't accidentally supply parens to parts of the grammar that want real parens. Due to many bits of code taking advantage of that by "foreach my $x qw(...) {}", this patch also includes a hack to coerce qw(...) to the old-style parenthesised THING, emitting a deprecation warning along the way.
Diffstat (limited to 'proto.h')
-rw-r--r--proto.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/proto.h b/proto.h
index f93614fae3..b915db25f8 100644
--- a/proto.h
+++ b/proto.h
@@ -6998,6 +6998,11 @@ PERL_CALLCONV int Perl_keyword_plugin_standard(pTHX_ char* keyword_ptr, STRLEN k
#define PERL_ARGS_ASSERT_KEYWORD_PLUGIN_STANDARD \
assert(keyword_ptr); assert(op_ptr)
+PERL_CALLCONV void Perl_coerce_qwlist_to_paren_list(pTHX_ OP* qwlist)
+ __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_COERCE_QWLIST_TO_PAREN_LIST \
+ assert(qwlist)
+
#if defined(USE_ITHREADS)
# if defined(PERL_IN_SV_C)