1
0
mirror of https://github.com/alecthomas/chroma.git synced 2025-03-17 20:58:08 +02:00

Raku: Change the token type of builtin types to KeywordType (#759)

This commit is contained in:
Siavash Askari Nasr 2023-03-04 09:42:50 +03:30 committed by GitHub
parent 96a518bb94
commit 42c314dbe7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 14 deletions

View File

@ -655,7 +655,7 @@ func rakuRules() Rules {
// Substitution
{`(?<=^|\b|\s)(?<!\.)(ss|S|s|TR|tr)\b(\s*)`, ByGroups(Keyword, Text), Push("substitution")},
{keywordsPattern, Keyword, nil},
{builtinTypesPattern, NameBuiltin, nil},
{builtinTypesPattern, KeywordType, nil},
{builtinRoutinesPattern, NameBuiltin, nil},
// Class name
{

View File

@ -519,14 +519,14 @@
{"type":"NameBuiltin","value":"MAIN"},
{"type":"Punctuation","value":"("},
{"type":"Text","value":"\n "},
{"type":"NameBuiltin","value":"Str"},
{"type":"KeywordType","value":"Str"},
{"type":"Text","value":" "},
{"type":"NameVariable","value":"$file"},
{"type":"Text","value":" "},
{"type":"Keyword","value":"where"},
{"type":"Text","value":" "},
{"type":"Operator","value":"*."},
{"type":"NameBuiltin","value":"IO"},
{"type":"KeywordType","value":"IO"},
{"type":"Operator","value":"."},
{"type":"NameBuiltin","value":"f"},
{"type":"Text","value":" "},
@ -540,7 +540,7 @@
{"type":"Keyword","value":"#= "},
{"type":"LiteralStringDoc","value":"an existing file to frobnicate\n"},
{"type":"Text","value":" "},
{"type":"NameBuiltin","value":"Int"},
{"type":"KeywordType","value":"Int"},
{"type":"Text","value":" "},
{"type":"Punctuation","value":":"},
{"type":"LiteralString","value":"size"},
@ -557,7 +557,7 @@
{"type":"Keyword","value":"#= "},
{"type":"LiteralStringDoc","value":"length/size needed for frobnication\n"},
{"type":"Text","value":" "},
{"type":"NameBuiltin","value":"Bool"},
{"type":"KeywordType","value":"Bool"},
{"type":"Text","value":" "},
{"type":"Operator","value":":"},
{"type":"NameVariable","value":"$verbose"},
@ -1696,7 +1696,7 @@
{"type":"Text","value":" "},
{"type":"Operator","value":"="},
{"type":"Text","value":" "},
{"type":"NameBuiltin","value":"Supplier"},
{"type":"KeywordType","value":"Supplier"},
{"type":"Operator","value":"."},
{"type":"NameBuiltin","value":"new"},
{"type":"Punctuation","value":";"},
@ -1707,7 +1707,7 @@
{"type":"Text","value":" "},
{"type":"Operator","value":"="},
{"type":"Text","value":" "},
{"type":"NameBuiltin","value":"Supplier"},
{"type":"KeywordType","value":"Supplier"},
{"type":"Operator","value":"."},
{"type":"NameBuiltin","value":"new"},
{"type":"Punctuation","value":";"},
@ -1726,7 +1726,7 @@
{"type":"Text","value":" "},
{"type":"NameVariable","value":"$bread-supplier"},
{"type":"Operator","value":"."},
{"type":"NameBuiltin","value":"Supply"},
{"type":"KeywordType","value":"Supply"},
{"type":"Text","value":" "},
{"type":"Punctuation","value":"{"},
{"type":"Text","value":"\n "},
@ -1746,7 +1746,7 @@
{"type":"Text","value":" "},
{"type":"NameVariable","value":"$vegetable-supplier"},
{"type":"Operator","value":"."},
{"type":"NameBuiltin","value":"Supply"},
{"type":"KeywordType","value":"Supply"},
{"type":"Text","value":" "},
{"type":"Punctuation","value":"{"},
{"type":"Text","value":"\n "},
@ -2810,7 +2810,7 @@
{"type":"Text","value":" "},
{"type":"NameVariable","value":"$/"},
{"type":"Operator","value":"."},
{"type":"NameBuiltin","value":"Int"},
{"type":"KeywordType","value":"Int"},
{"type":"Text","value":" "},
{"type":"Operator","value":"\u003c="},
{"type":"Text","value":" "},
@ -2820,7 +2820,7 @@
{"type":"Text","value":" "},
{"type":"NameVariable","value":"$/"},
{"type":"Operator","value":"."},
{"type":"NameBuiltin","value":"Int"},
{"type":"KeywordType","value":"Int"},
{"type":"Text","value":" "},
{"type":"Operator","value":"\u003e="},
{"type":"Text","value":" "},
@ -2898,7 +2898,7 @@
{"type":"Operator","value":","},
{"type":"Text","value":"\n "},
{"type":"Punctuation","value":"("},
{"type":"NameBuiltin","value":"Less"},
{"type":"KeywordType","value":"Less"},
{"type":"Punctuation","value":")"},
{"type":"Text","value":" "},
{"type":"Operator","value":"=\u003e"},
@ -3618,7 +3618,7 @@
{"type":"NameVariable","value":"%a"},
{"type":"Punctuation","value":"{"},
{"type":"Operator","value":"."},
{"type":"NameBuiltin","value":"Int"},
{"type":"KeywordType","value":"Int"},
{"type":"Text","value":" "},
{"type":"OperatorWord","value":"cmp"},
{"type":"Text","value":" "},
@ -4153,7 +4153,7 @@
{"type":"Text","value":"\n\n"},
{"type":"NameBuiltin","value":"put"},
{"type":"Text","value":" "},
{"type":"NameBuiltin","value":"Date"},
{"type":"KeywordType","value":"Date"},
{"type":"Operator","value":"."},
{"type":"NameBuiltin","value":"today"},
{"type":"Operator","value":"."},