We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 773a92b commit ef8fa52Copy full SHA for ef8fa52
src/vm/moar/QAST/QASTCompilerMAST.nqp
@@ -1414,6 +1414,18 @@ my class MASTCompilerInstance {
1414
multi method as_mast_constant(QAST::NVal $nv) {
1415
MAST::NVal.new( :value($nv.value) )
1416
}
1417
+ multi method as_mast_constant(QAST::Want $want) {
1418
+ my int $finger := 1;
1419
+ my @children := $want.list;
1420
+ while $finger < nqp::elems(@children) {
1421
+ my str $got := @children[$finger];
1422
+ if $got eq 'Ss' || $got eq 'Ii' || $got eq 'Nn' {
1423
+ return self.as_mast_constant(@children[$finger + 1]);
1424
+ }
1425
+ $finger := $finger + 2;
1426
1427
+ return self.as_mast_constant(@children[0]);
1428
1429
multi method as_mast_constant(QAST::Node $qast) {
1430
nqp::die("expected QAST constant; didn't get one");
1431
0 commit comments