File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change 2
2
class HLL::Backend::Parrot {
3
3
our % parrot_config := pir::getinterp__P()[pir::const::IGLOBALS_CONFIG_HASH];
4
4
5
+ method apply_transcodings ($ s , $ transcode ) {
6
+ for nqp :: split (' ' , $ transcode ) {
7
+ try {
8
+ $ s := pir::trans_encoding__Ssi($ s ,
9
+ pir::find_encoding__Is($ _ ));
10
+ }
11
+ }
12
+ return $ s ;
13
+ }
14
+
5
15
method config () {
6
16
% parrot_config
7
17
}
@@ -443,12 +453,7 @@ class HLL::Compiler does HLL::Backend::Default {
443
453
method parse ($ source , * % adverbs ) {
444
454
my $ s := $ source ;
445
455
if % adverbs <transcode > {
446
- for nqp :: split (' ' , % adverbs <transcode >) {
447
- try {
448
- $ s := pir::trans_encoding__Ssi($ s ,
449
- pir::find_encoding__Is($ _ ));
450
- }
451
- }
456
+ $ s := $ ! backend . apply_transcodings($ s , % adverbs <transcode >);
452
457
}
453
458
my $ grammar := self . parsegrammar;
454
459
my $ actions ;
You can’t perform that action at this time.
0 commit comments