summaryrefslogtreecommitdiff
path: root/dist
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2022-11-14 11:16:40 +0100
committerYves Orton <demerphq@gmail.com>2022-11-16 10:09:02 +0100
commite40be2b6bb0ae1729a840962a1bddbe075eec01c (patch)
tree9acb7484cdd58adbc20e14ad68206829342fdee7 /dist
parentadc598353407e7a922eeb5b498fc508877e3ca9f (diff)
downloadperl-e40be2b6bb0ae1729a840962a1bddbe075eec01c.tar.gz
ParseXS - add support for elifdef and elifndef
The upcoming C++23 and C23 standards add #elifdef, #elifndef.
Diffstat (limited to 'dist')
-rw-r--r--dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm b/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm
index c1f108fcf1..ab70cc7f21 100644
--- a/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm
+++ b/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm
@@ -1881,7 +1881,7 @@ sub fetch_para {
# others: ident (gcc notes that some cpps have this one)
|| $self->{lastline} =~ /^\#[ \t]*
(?:
- (?:if|ifn?def|elif|else|endif|
+ (?:if|ifn?def|elif|else|endif|elifn?def|
define|undef|pragma|error|
warning|line\s+\d+|ident)
\b
@@ -1892,7 +1892,7 @@ sub fetch_para {
)
{
last if $self->{lastline} =~ /^\S/ && @{ $self->{line} } && $self->{line}->[-1] eq "";
- if ($self->{lastline}=~/^#[ \t]*(if|ifn?def|elif|else|endif)\b/) {
+ if ($self->{lastline}=~/^#[ \t]*(if|ifn?def|elif|else|endif|elifn?def)\b/) {
my $type = $1; # highest defined capture buffer, "if" for any if like condition
if ($type =~ /^if/) {
if (@{$self->{line}}) {