Skip to content

Commit

Permalink
Fixes for string quoting
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeffrey Goff committed Apr 1, 2017
1 parent 374094b commit ad97d2a
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 58 deletions.
8 changes: 6 additions & 2 deletions lib/Perl6/Parser/Factory.pm6
Expand Up @@ -603,6 +603,9 @@ class Perl6::Balanced::Exit is Perl6::Balanced { }
class Perl6::Block::Enter is Perl6::Balanced::Enter { }
class Perl6::Block::Exit is Perl6::Balanced::Exit { }

class Perl6::String::Enter is Perl6::Balanced::Enter { }
class Perl6::String::Exit is Perl6::Balanced::Exit { }

role MatchingBalanced {

method Enter-from-int( Int $from, Str $content ) {
Expand Down Expand Up @@ -4688,7 +4691,7 @@ class Perl6::Parser::Factory {
$child.append( self._sym( $_.hash.<sym> ) );
# XXX The first place negative indices are used
$_child.append(
Perl6::Balanced::Enter.from-int(
Perl6::String::Enter.from-int(
$_.hash.<quibble>.hash.<nibble>.from - 1,
$_.hash.<quibble>.Str.substr(
*-($_.hash.<quibble>.hash.<nibble>.chars + 2),
Expand All @@ -4702,7 +4705,7 @@ class Perl6::Parser::Factory {
)
);
$_child.append(
Perl6::Balanced::Exit.from-int(
Perl6::String::Exit.from-int(
$_.hash.<quibble>.hash.<nibble>.to,
$_.hash.<quibble>.Str.substr(
$_.hash.<quibble>.chars - 1,
Expand Down Expand Up @@ -4816,6 +4819,7 @@ class Perl6::Parser::Factory {
),
:from( $_.from ),
:to( $_.to ),
:quote( $q-map-name ),
:content( $_.Str ),
:adverb( @q-adverb ),
:here-doc( $here-doc-body ),
Expand Down

0 comments on commit ad97d2a

Please sign in to comment.