File tree Expand file tree Collapse file tree 1 file changed +8
-46
lines changed Expand file tree Collapse file tree 1 file changed +8
-46
lines changed Original file line number Diff line number Diff line change @@ -418,55 +418,17 @@ position C<pos>.
418
418
}
419
419
420
420
method starter () {
421
- Q : PIR {
422
- .local pmc self, cur
423
- .local string target, start
424
- .local int pos
425
- self = find_lex 'self'
426
-
427
- $P0 = self.'!cursor_start_all'()
428
- cur = $P0[0]
429
- target = $P0[1]
430
- pos = $P0[2]
431
-
432
- $P0 = find_dynamic_lex '$*QUOTE_START'
433
- if null $P0 goto fail
434
- start = $P0
435
-
436
- $I0 = length start
437
- $S0 = substr target, pos, $I0
438
- unless $S0 == start goto fail
439
- pos += $I0
440
- cur.'!cursor_pass'(pos, 'starter')
441
- fail :
442
- . return (cur )
443
- };
421
+ my $ start := $ * QUOTE_START ;
422
+ nqp ::isnull($ start )
423
+ ?? self . ' !cursor_start_cur' ()
424
+ !! self . ' !LITERAL' ($ start )
444
425
}
445
426
446
427
method stopper () {
447
- Q : PIR {
448
- .local pmc self, cur
449
- .local string target, stop
450
- .local int pos
451
- self = find_lex 'self'
452
-
453
- $P0 = self.'!cursor_start_all'()
454
- cur = $P0[0]
455
- target = $P0[1]
456
- pos = $P0[2]
457
-
458
- $P0 = find_dynamic_lex '$*QUOTE_STOP'
459
- if null $P0 goto fail
460
- stop = $P0
461
-
462
- $I0 = length stop
463
- $S0 = substr target, pos, $I0
464
- unless $S0 == stop goto fail
465
- pos += $I0
466
- cur.'!cursor_pass'(pos, 'stopper')
467
- fail :
468
- . return (cur )
469
- };
428
+ my $ stop := $ * QUOTE_STOP ;
429
+ nqp ::isnull($ stop )
430
+ ?? self . ' !cursor_start_cur' ()
431
+ !! self . ' !LITERAL' ($ stop )
470
432
}
471
433
472
434
our method split_words (str $ words ) {
You can’t perform that action at this time.
0 commit comments