Skip to content

Commit

Permalink
Make 'use soft' lexical.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Apr 16, 2015
1 parent b3292f6 commit b220d9a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Perl6/Actions.nqp
Expand Up @@ -2593,7 +2593,7 @@ class Perl6::Actions is HLL::Actions does STDActions {
# Add inlining information if it's inlinable; also mark soft if the
# appropriate pragma is in effect.
if $<deflongname> {
if $*SOFT {
if %*PRAGMAS<soft> {
$*W.find_symbol(['&infix:<does>'])($code, $*W.find_symbol(['SoftRoutine']));
}
elsif !nqp::can($code, 'CALL-ME') && !nqp::can($code, 'postcircumfix:<( )>') {
Expand Down
3 changes: 1 addition & 2 deletions src/Perl6/Grammar.nqp
Expand Up @@ -1036,7 +1036,6 @@ grammar Perl6::Grammar is HLL::Grammar does STD {
:my $*POD_ALLOW_FCODES := 0b11111111111111111111111111; # allow which fcodes?
:my $*POD_ANGLE_COUNT := 0; # pod stuff
:my $*IN_REGEX_ASSERTION := 0;
:my $*SOFT := 0; # is the soft pragma in effect
:my $*IN_PROTO := 0; # are we inside a proto?

# Various interesting scopes we'd like to keep to hand.
Expand Down Expand Up @@ -1664,7 +1663,7 @@ grammar Perl6::Grammar is HLL::Grammar does STD {
elsif $longnameStr eq 'soft' {
# This is an approximation; need to pay attention to argument
# list really.
$*SOFT := 1;
%*PRAGMAS<soft> := 1;
$longname := "";
}
elsif $longnameStr eq 'strict' {
Expand Down

0 comments on commit b220d9a

Please sign in to comment.