5
5
// THIS FILE HAS BEEN GENERATED BY THE `syntax-to-token-pattern.py` GENERATOR
6
6
// DO NOT EDIT THIS FILE DIRECTLY! INSTEAD RUN THE PYTHON SCRIPT.
7
7
// ANY MANUAL EDITS MADE TO THIS FILE WILL BE OVERWRITTEN. YOU HAVE BEEN WARNED.
8
- // Last generated: 10 /06/2023 21:08:08 (UTC+0)
8
+ // Last generated: 14 /06/2023 16:51:20 (UTC+0)
9
9
10
10
import { MetaTokenType , CharacterTokenType , LiteralTokenType , EntityTokenType , KeywordTokenType , EscapedCharacterTokenType , OperatorTokenType } from "./renpy-tokens" ;
11
11
import { TokenPattern } from "./token-pattern-types" ;
@@ -431,7 +431,6 @@ export const escapedUnicodeChar: TokenPattern = {
431
431
} ;
432
432
433
433
export const hexLiteral : TokenPattern = {
434
- // Note: This pattern has no end check. Only use as include pattern!
435
434
patterns : [
436
435
{
437
436
debugName : "hexLiteral.patterns![0]" ,
@@ -449,10 +448,10 @@ export const hexLiteral: TokenPattern = {
449
448
{
450
449
debugName : "hexLiteral.patterns![2]" ,
451
450
452
- token : LiteralTokenType . Color , /*constant.color.renpy*/
453
- match : / (?: # [ a - f 0 - 9 ] * ) ? ( .+ ) / dgi,
451
+ match : / ( # [ a - f 0 - 9 ] * ) ? ( .+ ?) \b / dgi,
454
452
captures : {
455
- 1 : { token : MetaTokenType . Invalid , /*invalid.illegal.character-not-allowed-here.renpy*/ } ,
453
+ 1 : { token : LiteralTokenType . Color , /*constant.color.renpy*/ } ,
454
+ 2 : { token : MetaTokenType . Invalid , /*invalid.illegal.character-not-allowed-here.renpy*/ } ,
456
455
} ,
457
456
} ,
458
457
]
@@ -573,10 +572,7 @@ export const stringTagsBroken: TokenPattern = {
573
572
1 : { token : CharacterTokenType . OpenBracket , /*punctuation.definition.tag.begin.renpy*/ } ,
574
573
2 : { token : EntityTokenType . TagName , /*entity.name.tag.${2:/downcase}.renpy*/ } ,
575
574
3 : { token : OperatorTokenType . Assignment , /*punctuation.separator.key-value.renpy keyword.operator.assignment.renpy*/ } ,
576
- 4 : {
577
- token : LiteralTokenType . Color , /*constant.color.renpy*/
578
- patterns : [ hexLiteral ]
579
- } ,
575
+ 4 : { patterns : [ hexLiteral ] } ,
580
576
5 : { token : CharacterTokenType . CloseBracket , /*punctuation.definition.tag.end.renpy*/ } ,
581
577
} ,
582
578
end : / ( { \/ ) \s * ( \2) \s * ( } ) / dg,
@@ -758,10 +754,7 @@ export const stringTags: TokenPattern = {
758
754
1 : { token : CharacterTokenType . OpenBracket , /*punctuation.definition.tag.begin.renpy*/ } ,
759
755
2 : { token : EntityTokenType . TagName , /*entity.name.tag.${2:/downcase}.renpy*/ } ,
760
756
3 : { token : OperatorTokenType . Assignment , /*punctuation.separator.key-value.renpy keyword.operator.assignment.renpy*/ } ,
761
- 4 : {
762
- token : LiteralTokenType . Color , /*constant.color.renpy*/
763
- patterns : [ hexLiteral ]
764
- } ,
757
+ 4 : { patterns : [ hexLiteral ] } ,
765
758
5 : { token : CharacterTokenType . CloseBracket , /*punctuation.definition.tag.end.renpy*/ } ,
766
759
} ,
767
760
} ,
0 commit comments