mirror of
https://github.com/alecthomas/chroma.git
synced 2025-02-09 13:23:51 +02:00
Raku: Fix Match hash access, $<variable><key>
This commit is contained in:
parent
2535d1a99e
commit
22fac1fc0f
@ -1043,7 +1043,7 @@ func rakuRules() Rules {
|
||||
"variable": {
|
||||
{variablePattern, NameVariable, Push("name-adverb")},
|
||||
{globalVariablePattern, NameVariableGlobal, Push("name-adverb")},
|
||||
{`[$@](?:<.*?>)+`, NameVariable, nil},
|
||||
{`[$@]<[^>]+>`, NameVariable, nil},
|
||||
{`\$/`, NameVariable, nil},
|
||||
{`\$!`, NameVariable, nil},
|
||||
{`[$@%]`, NameVariable, nil},
|
||||
|
2
lexers/testdata/raku.actual
vendored
2
lexers/testdata/raku.actual
vendored
@ -261,6 +261,8 @@ rx/:i
|
||||
\d ** 1..3 <?{ $/.Int <= 255 && $/.Int >= 0 }>
|
||||
$/;
|
||||
|
||||
$<variable><key>;
|
||||
|
||||
constant \something:some<adverb> = 'something';
|
||||
|
||||
my %hash = %(
|
||||
|
5
lexers/testdata/raku.expected
vendored
5
lexers/testdata/raku.expected
vendored
@ -2004,6 +2004,11 @@
|
||||
{"type":"NameEntity","value":"$"},
|
||||
{"type":"Punctuation","value":"/;"},
|
||||
{"type":"Text","value":"\n\n"},
|
||||
{"type":"NameVariable","value":"$\u003cvariable\u003e"},
|
||||
{"type":"Punctuation","value":"\u003c"},
|
||||
{"type":"LiteralString","value":"key"},
|
||||
{"type":"Punctuation","value":"\u003e;"},
|
||||
{"type":"Text","value":"\n\n"},
|
||||
{"type":"Keyword","value":"constant"},
|
||||
{"type":"Text","value":" "},
|
||||
{"type":"NameVariable","value":"\\something"},
|
||||
|
Loading…
x
Reference in New Issue
Block a user