Commits

Rob Hoelz committed 17d1437

Make sure $/<...> works

Comments (0)

Files changed (2)

pygments/lexers/agile.py

             ( _build_word_match(PERL6_BUILTINS, PERL6_IDENTIFIER_CHARS), Name.Builtin),
             # copied from PerlLexer
             ( r'[$@%&][.^:?=!~]?[' + PERL6_IDENTIFIER_CHARS + u']+(?:<<.*?>>|<.*?>|«.*?»)*', Name.Variable ),
-            ( r'[$][!/]', Name.Variable.Global ),
+            ( r'[$][!/](?:<<.*?>>|<.*?>|«.*?»)*', Name.Variable.Global ),
             ( r'::[?]\w+', Name.Variable.Global ),
             ( r'[$@%&][*][' + PERL6_IDENTIFIER_CHARS + u']+(?:<<.*?>>|<.*?>|«.*?»)*', Name.Variable.Global ),
-            ( r'[$](?:<.*?>)+', Name.Variable ), # XXX what about for special variables (like $/)? should I enter a variable state?
+            ( r'[$](?:<.*?>)+', Name.Variable ),
             ( r'(?:q|qq|Q)[a-zA-Z]?\s*(?P<adverbs>:[\w\s:]+)?\s*(?P<delimiter>(?P<first_char>[^0-9a-zA-Z:\s])(?P=first_char)*)', brackets_callback(String) ),
             # copied from PerlLexer
             ( r'0_?[0-7]+(_[0-7]+)*', Number.Oct ),

tests/examplefiles/test.p6

 
 my $regex = m«< some chars »;
 # after
+
+say $/<foo><bar>;