This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sub aplusb( Int $a, Int $b ) is inline('C') {' | |
int aplusb (int a, int b) { | |
return a + b; | |
} | |
'} | |
say aplusb( 7, 1 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use SDL; | |
use SDL::Surface; | |
use SDLx::App; | |
use SDLx::Surface; | |
use PDL; | |
use Data::Dumper; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package behman.app.monk; | |
import android.os.Bundle; | |
import android.widget.FrameLayout; | |
import android.app.Activity; | |
public class MainActivity extends Activity { | |
private MonkView monkview; | |
@Override |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grammar PackageDeclarator { | |
rule TOP { <package_declarator>+ % [ .*? ] } | |
token namespace { <[\w]>+ } | |
token package_def { <namespace>+ % [ '::' ] } | |
token end_keyword { [ ';' | '{' ] } | |
rule package_declarator { | |
[ | |
'package' $<package> = <package_def> <end_keyword> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Bar; | |
multi trait_mod:<is>(Routine $r, :$bar!) is export { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Stage start : 0.000 | |
get_bool() not implemented in class 'PROCESS' | |
current instr.: '' pc 4376 (src/gen/perl6-symboltable.pir:1639) (src/Perl6/World.pm:277) | |
called from Sub 'import' pc 4188 (src/gen/perl6-symboltable.pir:1565) (src/Perl6/World.pm:260) | |
called from Sub '' pc 19787 (src/gen/perl6-grammar.pir:7252) (src/Perl6/Grammar.pm:1221) | |
called from Sub '' pc 19315 (src/gen/perl6-grammar.pir:7057) (src/Perl6/Grammar.pm:1217) | |
called from Sub 'do_import' pc 19184 (src/gen/perl6-grammar.pir:7000) (src/Perl6/Grammar.pm:1194) | |
called from Sub '' pc 75983 (src/gen/perl6-grammar.pir:26121) (src/Perl6/Grammar.pm:1184) | |
called from Sub '' pc 75838 (src/gen/perl6-grammar.pir:26064) (src/Perl6/Grammar.pm:1179) | |
called from Sub 'statement_control:sym<use>' pc 74918 (src/gen/perl6-grammar.pir:25730) (src/Perl6/Grammar.pm:1134) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use v6; | |
sub largest-prime-factor($n is copy) { | |
for 2, 3, *+2 ... * { | |
while $n %% $_ { | |
$n div= $_; | |
return $_ if $_ > $n; | |
} | |
}; | |
1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/NQP/Actions.pm b/src/NQP/Actions.pm | |
index 0d3111e..6fbeccb 100644 | |
--- a/src/NQP/Actions.pm | |
+++ b/src/NQP/Actions.pm | |
@@ -1665,7 +1665,8 @@ class NQP::RegexActions is QRegex::P6Regex::Actions { | |
method metachar:sym<nqpvar>($/) { | |
make QAST::Regex.new( QAST::Node.new( | |
QAST::SVal.new( :value('!INTERPOLATE') ), | |
- $<var>.ast), | |
+ $<var>.ast, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/core/Cursor.pm b/src/core/Cursor.pm | |
index 2654bfe..d6f81c8 100644 | |
--- a/src/core/Cursor.pm | |
+++ b/src/core/Cursor.pm | |
@@ -41,8 +41,11 @@ my class Cursor does NQPCursorRole { | |
method MATCH_SAVE() { | |
my $match := self.MATCH(); | |
- $last_match := $match if $match; | |
- $match; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/QRegex/P6Regex/Actions.nqp b/src/QRegex/P6Regex/Actions.nqp | |
index 5fe283a..dff6757 100755 | |
--- a/src/QRegex/P6Regex/Actions.nqp | |
+++ b/src/QRegex/P6Regex/Actions.nqp | |
@@ -432,7 +432,12 @@ class QRegex::P6Regex::Actions is HLL::Actions { | |
while $i < $n { | |
my $ast := $clist[$i].ast; | |
if $ast.negate { | |
- $ast.subtype('zerowidth'); | |
+ if $ast.rxtype eq 'cclass' { |
OlderNewer