Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
(STD tracking) <...> and <<...>> are now circumfix: instead of quote:
  • Loading branch information
pmichaud committed Aug 9, 2009
1 parent 61f269d commit 7dd4463
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
3 changes: 3 additions & 0 deletions src/parser/actions.pm
Expand Up @@ -2228,6 +2228,9 @@ method circumfix($/, $key) {
$call_on
);
}
elsif $key eq 'quote' {
$past := $<quote_expression>.ast;
}
make $past;
}

Expand Down
17 changes: 7 additions & 10 deletions src/parser/grammar.pg
Expand Up @@ -723,10 +723,7 @@ rule enum_declarator {
}}
]?

[
| <?before '(' > <circumfix> {*} #= circumfix
| <?before '<' | '«' > <quote> {*} #= quote
]
<?before '(' | '<' | '<<' | '«' > <circumfix> {*} #= circumfix
}

rule scope_declarator {
Expand Down Expand Up @@ -826,10 +823,12 @@ token special_variable {
}

token circumfix {
| '(' <statementlist> ')' {*} #= ( )
| '[' <statementlist> ']' {*} #= [ ]
| <?before '{' | <lambda> > <pblock> {*} #= { }
| <sigil> '(' <semilist> ')' {*} #= $( )
| '(' <statementlist> ')' {*} #= ( )
| '[' <statementlist> ']' {*} #= [ ]
| <?before '{' | <lambda> > <pblock> {*} #= { }
| <sigil> '(' <semilist> ')' {*} #= $( )
| <?before '<<' | '«'> <quote_expression: :ww :qq> {*} #= quote
| <?before '<' > <quote_expression: :w :q> {*} #= quote
}

token def_module_name {
Expand Down Expand Up @@ -919,8 +918,6 @@ token quote {
[
| <.before \'> <quote_expression: :q>
| <.before '"' > <quote_expression: :qq>
| <.before '<<' | '«'> <quote_expression: :ww :qq>
| <.before '<' > <quote_expression: :w :q>
| <.before '/'> <quote_expression: :regex>
| [m|rx] <.nofun> <.ws>
[ [':P5'|':Perl5'] <.nofun> <.ws> <quote_expression: :regex :P5>
Expand Down

0 comments on commit 7dd4463

Please sign in to comment.