Skip to content

Commit

Permalink
disallow parsing of adverb form in quotes that we can't handle yet
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz committed Jul 23, 2010
1 parent 34046de commit 4195e9a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/Perl6/Actions.pm
Expand Up @@ -2657,6 +2657,9 @@ method quote:sym<s>($/) {
$regex, $closure
);
for $<quotepair> {
if $_.ast<key> ne 'g' {
$/.CURSOR.panic("Substitution adverbs other than ':g' are not yet implemented");
}
$past.push(PAST::Val.new(:named(~$_.ast<key>), :value($_.ast<value>)));
}
make $past;
Expand Down
2 changes: 1 addition & 1 deletion src/Perl6/Grammar.pm
Expand Up @@ -1393,7 +1393,7 @@ token quotepair {
| <identifier>
{ $*key := ~$<identifier> }
[
|| <?before '('> <circumfix> { $*value := $<circumfix>.ast; }
|| <?before '('> <circumfix> <.panic('Arguments to adverbs on quotes are not yet implemented')>
|| { $*value := 1; }
]
]
Expand Down

0 comments on commit 4195e9a

Please sign in to comment.