Add some structure
This commit is contained in:
parent
51c2d8e75a
commit
4846c19380
21
wgsl.xml
21
wgsl.xml
|
|
@ -114,11 +114,19 @@
|
||||||
|
|
||||||
<contexts>
|
<contexts>
|
||||||
<context attribute="Normal Text" lineEndContext="#pop" name="Normal">
|
<context attribute="Normal Text" lineEndContext="#pop" name="Normal">
|
||||||
|
<IncludeRules context="_Keywords" />
|
||||||
|
<IncludeRules context="_Attributes" />
|
||||||
|
<IncludeRules context="_Numbers" />
|
||||||
|
<IncludeRules context="_Comments" />
|
||||||
|
</context>
|
||||||
|
|
||||||
|
<context name="_Keywords">
|
||||||
<keyword attribute="Keyword" context="#stay" String="keyword" />
|
<keyword attribute="Keyword" context="#stay" String="keyword" />
|
||||||
<keyword attribute="Control Flow" context="#stay" String="control" />
|
<keyword attribute="Control Flow" context="#stay" String="control" />
|
||||||
<keyword attribute="BuiltIn" context="#stay" String="type" />
|
<keyword attribute="BuiltIn" context="#stay" String="type" />
|
||||||
<keyword attribute="Known Attribute" context="AttributeArgsMaybe" String="attribute" />
|
</context>
|
||||||
<DetectChar attribute="Unknown Attribute" context="Attribute" char="@" />
|
|
||||||
|
<context name="_Numbers">
|
||||||
<RegExpr attribute="Hexadecimal Float" context="#stay" String="\b0[xX][0-9a-fA-F]*\.[0-9a-fA-F]+([pP][+-]?[0-9]+[fh]?)?" />
|
<RegExpr attribute="Hexadecimal Float" context="#stay" String="\b0[xX][0-9a-fA-F]*\.[0-9a-fA-F]+([pP][+-]?[0-9]+[fh]?)?" />
|
||||||
<RegExpr attribute="Hexadecimal Float" context="#stay" String="\b0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*([pP][+-]?[0-9]+[fh]?)?" />
|
<RegExpr attribute="Hexadecimal Float" context="#stay" String="\b0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*([pP][+-]?[0-9]+[fh]?)?" />
|
||||||
<RegExpr attribute="Hexadecimal Float" context="#stay" String="\b0[xX][0-9a-fA-F]+[pP][+-]?[0-9]+[fh]?" />
|
<RegExpr attribute="Hexadecimal Float" context="#stay" String="\b0[xX][0-9a-fA-F]+[pP][+-]?[0-9]+[fh]?" />
|
||||||
|
|
@ -131,6 +139,9 @@
|
||||||
<RegExpr attribute="Decimal Float" context="#stay" String="\b[0-9]+[eE][+-]?[0-9]+[fh]?" />
|
<RegExpr attribute="Decimal Float" context="#stay" String="\b[0-9]+[eE][+-]?[0-9]+[fh]?" />
|
||||||
<RegExpr attribute="Decimal Integer" context="#stay" String="\b0[iu]?" />
|
<RegExpr attribute="Decimal Integer" context="#stay" String="\b0[iu]?" />
|
||||||
<RegExpr attribute="Decimal Integer" context="#stay" String="\b[1-9][0-9]*[iu]?" />
|
<RegExpr attribute="Decimal Integer" context="#stay" String="\b[1-9][0-9]*[iu]?" />
|
||||||
|
</context>
|
||||||
|
|
||||||
|
<context name="_Comments">
|
||||||
<Detect2Chars attribute="Comment" context="LineComment" char="/" char1="/" />
|
<Detect2Chars attribute="Comment" context="LineComment" char="/" char1="/" />
|
||||||
<Detect2Chars attribute="Comment" context="MultilineComment" char="/" char1="*" beginRegion="CommentFolding" />
|
<Detect2Chars attribute="Comment" context="MultilineComment" char="/" char1="*" beginRegion="CommentFolding" />
|
||||||
</context>
|
</context>
|
||||||
|
|
@ -142,6 +153,12 @@
|
||||||
<Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" endRegion="CommentFolding" />
|
<Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" endRegion="CommentFolding" />
|
||||||
<IncludeRules context="##Alerts" />
|
<IncludeRules context="##Alerts" />
|
||||||
</context>
|
</context>
|
||||||
|
|
||||||
|
<context name="_Attributes">
|
||||||
|
<keyword attribute="Known Attribute" context="AttributeArgsMaybe" String="attribute" />
|
||||||
|
<DetectChar attribute="Unknown Attribute" context="Attribute" char="@" />
|
||||||
|
</context>
|
||||||
|
|
||||||
<context attribute="Attribute Content" lineEndContext="#stay" name="Attribute">
|
<context attribute="Attribute Content" lineEndContext="#stay" name="Attribute">
|
||||||
<DetectIdentifier attribute="Unknown Attribute" context="#pop!AttributeArgsMaybe" />
|
<DetectIdentifier attribute="Unknown Attribute" context="#pop!AttributeArgsMaybe" />
|
||||||
</context>
|
</context>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user