Skip to content

Instantly share code, notes, and snippets.

@jnthn
Created June 24, 2013 08:37
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 jnthn/5848604 to your computer and use it in GitHub Desktop.
Save jnthn/5848604 to your computer and use it in GitHub Desktop.
diff --git a/src/Perl6/Grammar.nqp b/src/Perl6/Grammar.nqp
index e56f887..d996236 100644
--- a/src/Perl6/Grammar.nqp
+++ b/src/Perl6/Grammar.nqp
@@ -3592,7 +3592,10 @@ grammar Perl6::Grammar is HLL::Grammar does STD {
# This also becomes the current MAIN. Also place it in %?LANG.
%*LANG<MAIN> := self.WHAT;
- $*W.install_lexical_symbol($*W.cur_lexpad(), '%?LANG', $*W.p6ize_recursive(%*LANG));
+ unless $*W.cur_lexpad.symbol('%?LANG') {
+ $*W.install_lexical_symbol($*W.cur_lexpad(), '%?LANG',
+ $*W.p6ize_recursive(%*LANG));
+ }
# Declarand should get precedence traits.
if $is_oper && nqp::isconcrete($declarand) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment