Skip to content

Instantly share code, notes, and snippets.

@hoelzro
Created July 15, 2014 11:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hoelzro/6f356615290a55802f0e to your computer and use it in GitHub Desktop.
Save hoelzro/6f356615290a55802f0e to your computer and use it in GitHub Desktop.
Token #= being parsed twice? (Moar = be6b475, NQP = d838af4, Rakudo = 7360274)
diff --git a/src/Perl6/Grammar.nqp b/src/Perl6/Grammar.nqp
index 0bd66b4..2bdffa4 100644
--- a/src/Perl6/Grammar.nqp
+++ b/src/Perl6/Grammar.nqp
@@ -496,7 +496,10 @@ grammar Perl6::Grammar is HLL::Grammar does STD {
token comment:sym<#=> {
'#=' \h+ $<attachment>=[\N*]
- { $*DECLARATOR_DOCS := $<attachment> }
+ {
+ $*DECLARATOR_DOCS := $<attachment>;
+ say("here: $<attachment>");
+ }
}
method attach_docs() {
here: comment
here: comment
sub foo() {} #= comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment