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
role doc { has Str $.doc is rw; } | |
multi trait_mod:<is>(&code, doc, $message) { | |
&code does doc($message); | |
} | |
sub drink($pints) is doc("A very important activity") { | |
say "glug" for 1..$pints; | |
} | |
drink(2); | |
say &drink.doc; |
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
Index: runtime/parrot/library/P6object.pir | |
=================================================================== | |
--- runtime/parrot/library/P6object.pir (revision 40185) | |
+++ runtime/parrot/library/P6object.pir (working copy) | |
@@ -441,16 +441,19 @@ | |
ns = split '::', name | |
have_ns: | |
- ## get the metaclass (how) from :protoobject, or create one | |
+ ## get the metaclass (how) from :how, or :protoobject, or create one |
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
Index: runtime/parrot/library/P6object.pir | |
=================================================================== | |
--- runtime/parrot/library/P6object.pir (revision 40185) | |
+++ runtime/parrot/library/P6object.pir (working copy) | |
@@ -441,16 +441,19 @@ | |
ns = split '::', name | |
have_ns: | |
- ## get the metaclass (how) from :protoobject, or create one | |
+ ## get the metaclass (how) from :how, or :protoobject, or create one |
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
ResizablePMCArray: Can't pop from an empty array! | |
in code PCT::HLLCompiler::parse | |
called from code PCT::HLLCompiler::compile | |
called from code PCT::HLLCompiler::eval | |
called from code Perl6::Compiler::eval (src\gen_setting.pm:3343) | |
called from code PCT::HLLCompiler::interactive | |
called from code _block14 (test.p6:4) | |
called from code !UNIT_START | |
called from code PCT::HLLCompiler::eval | |
called from code Perl6::Compiler::eval (src\gen_setting.pm:3343) |
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
class Grammer::Generative { | |
my %!generate_cache = (); | |
my $.repeatiness is rw = 0.7; | |
method generate(&start_rule) { | |
return generate_rule(&start_rule); | |
} | |
my method generate_rule(&rule) { |
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/build/Makefile.in b/build/Makefile.in | |
index 427263c..be4d915 100644 | |
--- a/build/Makefile.in | |
+++ b/build/Makefile.in | |
@@ -16,7 +16,7 @@ EXE = @exe@ | |
LD = @ld@ | |
LDFLAGS = @ldflags@ @ld_debug@ | |
LD_LOAD_FLAGS = @ld_load_flags@ | |
-LIBPARROT = @inst_libparrot_ldflags@ | |
+LIBPARROT = @libparrot_ldflags@ |
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
multi trait_mod:<is>(AttributeDeclarand $a, $value, :$type-object-valued) { | |
my $accessor_name = $a.name.substr(2); | |
my $meth = method { self.defined ?? $value !! eval($a.name) }; | |
$a.how.add_method($a.how, $accessor_name, $meth); | |
} |
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/builtins/eval.pir b/src/builtins/eval.pir | |
diff --git a/src/parser/methods.pir b/src/parser/methods.pir | |
index f920dd7..a920208 100644 | |
--- a/src/parser/methods.pir | |
+++ b/src/parser/methods.pir | |
@@ -141,6 +141,8 @@ Checks if the name we have been passed represents a type. | |
if null $P0 goto not_enum | |
if $P0 goto type_ok | |
not_enum: | |
+ $I0 = isa check_symbol, 'NameSpace' |
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/parser/actions.pm b/src/parser/actions.pm | |
index 542e2b3..e23d03c 100644 | |
--- a/src/parser/actions.pm | |
+++ b/src/parser/actions.pm | |
@@ -2261,6 +2261,11 @@ method circumfix($/, $key) { | |
} | |
} | |
} | |
+ elsif +@($past[1]) == 1 && $past[1][0].isa(PAST::Var) { | |
+ if substr($past[1][0].name(), 0, 1) eq '%' { |
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
.HLL 'perl6' | |
.loadlib 'perl6_ops' | |
.loadlib 'perl6_group' | |
.sub '' :load :init | |
load_bytecode 'perl6.pbc' | |
.end | |
.sub 'main' :main | |
$P0 = new ['Int'] |