Better handling of known attributes
This commit is contained in:
parent
dc643347e7
commit
303c9ccc81
40
wgsl.xml
40
wgsl.xml
|
|
@ -98,11 +98,27 @@
|
|||
<item>num_workgroups</item>
|
||||
</list>
|
||||
|
||||
<list name="interpolation_type">
|
||||
<item>perspective</item>
|
||||
<item>linear</item>
|
||||
<item>flat</item>
|
||||
</list>
|
||||
|
||||
<list name="interpolation_sampling">
|
||||
<item>center</item>
|
||||
<item>centroid</item>
|
||||
<item>sample</item>
|
||||
<item>first</item>
|
||||
<item>either</item>
|
||||
</list>
|
||||
|
||||
<contexts>
|
||||
<context attribute="Normal Text" lineEndContext="#pop" name="Normal">
|
||||
<keyword attribute="Keyword" context="#stay" String="keyword" />
|
||||
<keyword attribute="Control Flow" context="#stay" String="control" />
|
||||
<keyword attribute="BuiltIn" context="#stay" String="type" />
|
||||
<DetectChar attribute="Attribute" context="Attribute" char="@" />
|
||||
<keyword attribute="Known Attribute" context="AttributeArgsMaybe" String="attribute" />
|
||||
<DetectChar attribute="Unknown Attribute" context="Attribute" char="@" />
|
||||
<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]?" />
|
||||
|
|
@ -126,16 +142,19 @@
|
|||
<Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" endRegion="CommentFolding" />
|
||||
<IncludeRules context="##Alerts" />
|
||||
</context>
|
||||
<context attribute="Attribute" lineEndContext="#stay" name="Attribute">
|
||||
<DetectIdentifier attribute="Attribute" context="#pop!AttributeArgsMaybe" />
|
||||
<context attribute="Attribute Content" lineEndContext="#stay" name="Attribute">
|
||||
<DetectIdentifier attribute="Unknown Attribute" context="#pop!AttributeArgsMaybe" />
|
||||
</context>
|
||||
<context attribute="Attribute" lineEndContext="#stay" name="AttributeArgsMaybe">
|
||||
<DetectChar attribute="Attribute" context="#pop!AttributeArgs" char="(" />
|
||||
<context attribute="Attribute Content" lineEndContext="#stay" name="AttributeArgsMaybe">
|
||||
<DetectChar attribute="Attribute Content" context="#pop!AttributeArgs" char="(" />
|
||||
<RegExpr attribute="Normal Text" context="#pop" lookAhead="true" String="[^\s(]" />
|
||||
</context>
|
||||
<context attribute="Attribute" lineEndContext="#stay" name="AttributeArgs">
|
||||
<DetectChar attribute="Attribute" context="AttributeArgs" char="(" />
|
||||
<DetectChar attribute="Attribute" context="#pop" char=")" />
|
||||
<context attribute="Attribute Content" lineEndContext="#stay" name="AttributeArgs">
|
||||
<DetectChar attribute="Attribute Content" context="AttributeArgs" char="(" />
|
||||
<DetectChar attribute="Attribute Content" context="#pop" char=")" />
|
||||
<keyword attribute="Keyword Attribute Value" context="#stay" String="builtin_value_name" />
|
||||
<keyword attribute="Keyword Attribute Value" context="#stay" String="interpolation_type" />
|
||||
<keyword attribute="Keyword Attribute Value" context="#stay" String="interpolation_sampling" />
|
||||
</context>
|
||||
</contexts>
|
||||
|
||||
|
|
@ -144,7 +163,10 @@
|
|||
<itemData name="Keyword" defStyleNum="dsKeyword" />
|
||||
<itemData name="Control Flow" defStyleNum="dsControlFlow" />
|
||||
<itemData name="BuiltIn" defStyleNum="dsDataType" />
|
||||
<itemData name="Attribute" defStyleNum="dsAttribute" />
|
||||
<itemData name="Unknown Attribute" defStyleNum="dsAttribute" italic="true" />
|
||||
<itemData name="Known Attribute" defStyleNum="dsAttribute" />
|
||||
<itemData name="Attribute Content" defStyleNum="dsAttribute" />
|
||||
<itemData name="Keyword Attribute Value" defStyleNum="dsAttribute" />
|
||||
<itemData name="Comment" defStyleNum="dsComment" />
|
||||
<itemData name="Decimal Integer" defStyleNum="dsDecVal" />
|
||||
<itemData name="Hexadecimal Integer" defStyleNum="dsBaseN" />
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user