Skip to content

Commit 9885765

Browse files
committed
Remove trailing whitespace
1 parent 5f68310 commit 9885765

File tree

1 file changed

+28
-28
lines changed

1 file changed

+28
-28
lines changed

src/QRegex/P5Regex/Actions.nqp

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class QRegex::P5Regex::Actions is HLL::Actions {
3535
}
3636
else {
3737
$qast.push($_.ast);
38-
$lastlit := $ast.rxtype eq 'literal'
38+
$lastlit := $ast.rxtype eq 'literal'
3939
&& !QAST::Node.ACCEPTS($ast[0])
4040
?? $ast !! 0;
4141
}
@@ -73,11 +73,11 @@ class QRegex::P5Regex::Actions is HLL::Actions {
7373
make $qast;
7474
}
7575
}
76-
76+
7777
method p5metachar:sym<bs>($/) {
7878
make $<backslash>.ast;
7979
}
80-
80+
8181
method p5metachar:sym<.>($/) {
8282
make %*RX<s>
8383
?? QAST::Regex.new( :rxtype<cclass>, :name<.>, :node($/) )
@@ -98,7 +98,7 @@ class QRegex::P5Regex::Actions is HLL::Actions {
9898
QAST::Regex.new( :rxtype<anchor>, :subtype(%*RX<m> ?? 'eol' !! 'eos'), :node($/) )
9999
);
100100
}
101-
101+
102102
method p5metachar:sym<(? )>($/) { # like P6's $<name>=[ ... ]
103103
my $qast;
104104
if $<nibbler> {
@@ -110,20 +110,20 @@ class QRegex::P5Regex::Actions is HLL::Actions {
110110
}
111111
make $qast;
112112
}
113-
113+
114114
method p5metachar:sym<(?: )>($/) {
115115
make $<nibbler>.ast;
116116
}
117-
117+
118118
method p5metachar:sym<( )>($/) {
119119
make QAST::Regex.new( :rxtype<subcapture>, :node($/),
120120
$<nibbler>.ast );
121121
}
122-
122+
123123
method p5metachar:sym<[ ]>($/) {
124124
make $<cclass>.ast;
125125
}
126-
126+
127127
method cclass($/) {
128128
my $str := '';
129129
my $qast;
@@ -183,7 +183,7 @@ class QRegex::P5Regex::Actions is HLL::Actions {
183183
$qast := +@alts == 1 ?? @alts[0] !!
184184
$<sign> eq '^' ??
185185
QAST::Regex.new( :rxtype<concat>, :node($/),
186-
QAST::Regex.new( :rxtype<conj>, :subtype<zerowidth>, |@alts ),
186+
QAST::Regex.new( :rxtype<conj>, :subtype<zerowidth>, |@alts ),
187187
QAST::Regex.new( :rxtype<cclass>, :name<.> ) ) !!
188188
QAST::Regex.new( :rxtype<altseq>, |@alts );
189189
make $qast;
@@ -267,7 +267,7 @@ class QRegex::P5Regex::Actions is HLL::Actions {
267267
QAST::SVal.new( :value(~$<number> - 1) ) ) );
268268
}
269269
}
270-
270+
271271
method p5assertion:sym«<»($/) {
272272
if $<nibbler> {
273273
make QAST::Regex.new(
@@ -281,7 +281,7 @@ class QRegex::P5Regex::Actions is HLL::Actions {
281281
make 0;
282282
}
283283
}
284-
284+
285285
method p5assertion:sym<=>($/) {
286286
if $<nibbler> {
287287
make QAST::Regex.new(
@@ -295,7 +295,7 @@ class QRegex::P5Regex::Actions is HLL::Actions {
295295
make 0;
296296
}
297297
}
298-
298+
299299
method p5assertion:sym<!>($/) {
300300
if $<nibbler> {
301301
make QAST::Regex.new(
@@ -320,7 +320,7 @@ class QRegex::P5Regex::Actions is HLL::Actions {
320320
}
321321
}
322322
}
323-
323+
324324
method p5assertion:sym<mod>($/) {
325325
if $<nibbler> {
326326
make $<nibbler>[0].ast;
@@ -332,7 +332,7 @@ class QRegex::P5Regex::Actions is HLL::Actions {
332332
make 0;
333333
}
334334
}
335-
335+
336336
method p5quantifier:sym<*>($/) {
337337
my $qast := QAST::Regex.new( :rxtype<quant>, :min(0), :max(-1), :node($/) );
338338
make quantmod($qast, $<quantmod>);
@@ -347,7 +347,7 @@ class QRegex::P5Regex::Actions is HLL::Actions {
347347
my $qast := QAST::Regex.new( :rxtype<quant>, :min(0), :max(1), :node($/) );
348348
make quantmod($qast, ~$<quantmod>);
349349
}
350-
350+
351351
method p5quantifier:sym<{ }>($/) {
352352
my $qast;
353353
$qast := QAST::Regex.new( :rxtype<quant>, :min(nqp::radix(10, $<start>, 0, 0)[0]), :node($/) );
@@ -356,13 +356,13 @@ class QRegex::P5Regex::Actions is HLL::Actions {
356356
else { $qast.max($qast.min); }
357357
make quantmod($qast, $<quantmod>);
358358
}
359-
359+
360360
sub quantmod($ast, $mod) {
361361
if $mod eq '?' { $ast.backtrack('f') }
362362
elsif $mod eq '+' { $ast.backtrack('g') }
363363
$ast;
364364
}
365-
365+
366366
method qbuildsub($qast, $block = QAST::Block.new(), :$anon, :$addself, *%rest) {
367367
my $*LANG := $qast.node;
368368
my $code_obj := nqp::existskey(%rest, 'code_obj')
@@ -388,7 +388,7 @@ class QRegex::P5Regex::Actions is HLL::Actions {
388388
QAST::Regex.new( :rxtype<pass> ) !!
389389
QAST::Regex.new( :rxtype<pass>, :name(%*RX<name>) )));
390390
$block.push($qast);
391-
391+
392392
$block;
393393
}
394394

@@ -400,7 +400,7 @@ class QRegex::P5Regex::Actions is HLL::Actions {
400400
my %x := capnames($_, $count);
401401
for %x { %capnames{$_.key} := +%capnames{$_.key} + $_.value; }
402402
$count := %x{''};
403-
}
403+
}
404404
}
405405
elsif $rxtype eq 'altseq' || $rxtype eq 'alt' {
406406
my $max := $count;
@@ -441,7 +441,7 @@ class QRegex::P5Regex::Actions is HLL::Actions {
441441
nqp::deletekey(%capnames, '$!to');
442442
%capnames;
443443
}
444-
444+
445445
method flip_ast($qast) {
446446
return $qast unless nqp::istype($qast, QAST::Regex);
447447
if $qast.rxtype eq 'literal' {
@@ -457,18 +457,18 @@ class QRegex::P5Regex::Actions is HLL::Actions {
457457
}
458458
$qast
459459
}
460-
460+
461461
# This is overridden by a compiler that wants to create code objects
462462
# for regexes. We just use the standard NQP one in standalone mode.
463463
method create_regex_code_object($block) {
464464
$*W.create_code($block, $block.name);
465465
}
466-
466+
467467
# Stores the captures info for a regex.
468468
method store_regex_caps($code_obj, $block, %caps) {
469469
$code_obj.SET_CAPS(%caps);
470470
}
471-
471+
472472
# Override this to store the overall NFA for a regex. (Standalone mode doesn't need
473473
# it, as it only supports executing individual regexes).
474474
method store_regex_nfa($code_obj, $block, $nfa) {
@@ -528,11 +528,11 @@ class QRegex::P5Regex::Actions is HLL::Actions {
528528
if $qast.rxtype eq 'quant' && $qast[0].rxtype eq 'subrule' {
529529
self.subrule_alias($qast[0], $name);
530530
}
531-
elsif $qast.rxtype eq 'subrule' {
532-
self.subrule_alias($qast, $name);
531+
elsif $qast.rxtype eq 'subrule' {
532+
self.subrule_alias($qast, $name);
533533
}
534534
else {
535-
$qast := QAST::Regex.new( $qast, :name($name),
535+
$qast := QAST::Regex.new( $qast, :name($name),
536536
:rxtype<subcapture>, :node($/) );
537537
}
538538
}
@@ -619,7 +619,7 @@ class QRegex::P5Regex::Actions is HLL::Actions {
619619
self.subrule_alias($qast, $name);
620620
}
621621
else {
622-
$qast := QAST::Regex.new( $qast, :name($name),
622+
$qast := QAST::Regex.new( $qast, :name($name),
623623
:rxtype<subcapture>, :node($/) );
624624
}
625625
}
@@ -647,7 +647,7 @@ class QRegex::P5Regex::Actions is HLL::Actions {
647647
}
648648
make $qast;
649649
}
650-
650+
651651
method arg($/) {
652652
make $<quote_EXPR> ?? $<quote_EXPR>.ast !! +$<val>;
653653
}

0 commit comments

Comments
 (0)