436 lines
9.9 KiB
XML
436 lines
9.9 KiB
XML
<?xml version="1.0"?>
|
|
<SyntaxDefinition name="C#" extensions=".cs" xmlns="http://icsharpcode.net/sharpdevelop/syntaxdefinition/2008">
|
|
<Color name="Comment" foreground="#FF57A64A" exampleText="// comment" />
|
|
<Color name="Preprocessor" foreground="#FF9B9B9B" exampleText="#region Title"/>
|
|
<Color name="Metadata" foreground="#FF4A57A6" exampleText="[numthreads(16, 16, 1)]"/>
|
|
<Color name="Punctuation" foreground="#FFFFFFFF" exampleText="a(b.c);"/>
|
|
<Color name="MethodCall" foreground="#FFdcdcaa" exampleText="o.ToString();"/>
|
|
<Color name="FunctionCall" foreground="#FF88cdcd" exampleText="float a = clamp(b);"/>
|
|
<Color name="Attributes" foreground="#FFdcdcaa" fontWeight="bold" exampleText="float a = clamp(b);"/>
|
|
<Color name="NumberLiteral" foreground="#FFb5cea8" exampleText="3.1415f"/>
|
|
<Color name="Keywords" foreground="#FFd8a0df" exampleText="if (a) {} else {}"/>
|
|
<Color name="Modifiers" foreground="#FF559CD6" fontWeight="bold" exampleText="static readonly int a;"/>
|
|
<Color name="TrueFalse" foreground="#FF00A0FF" exampleText="b = false; a = true;"/>
|
|
<Color name="TypeKeywords" foreground="#FF559CD6" exampleText="if (x is int) { a = x as int; type = typeof(int); size = sizeof(int); c = new object(); }"/>
|
|
<Color name="SemanticKeywords" foreground="#FF88cdcd" fontWeight="bold" exampleText="if (args == null) throw new ArgumentNullException(nameof(args));" />
|
|
<Color name="CommentMarkerSetTodo" foreground="#FF008B8B" fontWeight="bold" />
|
|
|
|
<RuleSet name="CommentMarkerSet">
|
|
<Keywords color="CommentMarkerSetTodo">
|
|
<Word>TODO</Word>
|
|
<Word>FIXME</Word>
|
|
</Keywords>
|
|
</RuleSet>
|
|
|
|
<!-- This is the main ruleset. -->
|
|
<RuleSet>
|
|
<Span color="Preprocessor">
|
|
<Begin>\#</Begin>
|
|
<RuleSet name="PreprocessorSet">
|
|
<Span> <!-- preprocessor directives that allows comments -->
|
|
<Begin fontWeight="bold">
|
|
(define|undef|if|elif|else|endif|line)\b
|
|
</Begin>
|
|
<RuleSet>
|
|
<Span color="Comment" ruleSet="CommentMarkerSet">
|
|
<Begin>//</Begin>
|
|
</Span>
|
|
</RuleSet>
|
|
</Span>
|
|
<Span> <!-- preprocessor directives that don't allow comments -->
|
|
<Begin fontWeight="bold">
|
|
(region|endregion|error|warning|pragma)\b
|
|
</Begin>
|
|
</Span>
|
|
</RuleSet>
|
|
</Span>
|
|
|
|
<Span color="Comment" ruleSet="CommentMarkerSet">
|
|
<Begin>//</Begin>
|
|
</Span>
|
|
|
|
<Span color="Comment" ruleSet="CommentMarkerSet" multiline="true">
|
|
<Begin>/\*</Begin>
|
|
<End>\*/</End>
|
|
</Span>
|
|
|
|
<Rule color="TypeKeywords">\b(Buffer|bool|int|uint|half|byte|short|ushort|float|double|long|ulong)([1-4]?)\b</Rule>
|
|
<Rule color="TypeKeywords">\b(RW)?(Buffer|ByteAddressBuffer|StructuredBuffer)\b</Rule>
|
|
<Rule color="TypeKeywords">\b(AppendStructuredBuffer|ConsumeStructuredBuffer|AppendBuffer|ConsumeBuffer)\b</Rule>
|
|
<Rule color="TypeKeywords">\b(Texture1D|Texture1DArray|Texture2D|Texture2DArray|Texture3D|TextureCube)\b</Rule>
|
|
<Rule color="TypeKeywords">\b(sampler|sampler1D|sampler2D|sampler3D|samplerCUBE|sampler_state|SamplerState)\b</Rule>
|
|
|
|
<Keywords color="TrueFalse">
|
|
<Word>true</Word>
|
|
<Word>false</Word>
|
|
</Keywords>
|
|
|
|
<Keywords color="Keywords">
|
|
<Word>if</Word>
|
|
<Word>else</Word>
|
|
<Word>break</Word>
|
|
<Word>continue</Word>
|
|
<Word>do</Word>
|
|
<Word>for</Word>
|
|
<Word>switch</Word>
|
|
<Word>while</Word>
|
|
<Word>return</Word>
|
|
<Word>technique</Word>
|
|
<Word>pass</Word>
|
|
<Word>compile</Word>
|
|
<Word>sampler</Word>
|
|
<Word>register</Word>
|
|
<Word>typedef</Word>
|
|
<Word>struct</Word>
|
|
<Word>cbuffer</Word>
|
|
<Word>class</Word>
|
|
<Word>goto</Word>
|
|
<Word>union</Word>
|
|
</Keywords>
|
|
|
|
<Span>
|
|
<Begin>\[</Begin>
|
|
<End>\]</End>
|
|
<RuleSet>
|
|
<Keywords color="Attributes">
|
|
<Word>unroll</Word>
|
|
<Word>loop</Word>
|
|
<Word>domain</Word>
|
|
<Word>earlydepthstencil</Word>
|
|
<Word>instance</Word>
|
|
<Word>maxtessfactor</Word>
|
|
<Word>numthreads</Word>
|
|
<Word>outputcontrolpoints</Word>
|
|
<Word>outputtopology</Word>
|
|
<Word>partitioning</Word>
|
|
<Word>patchconstantfunc</Word>
|
|
</Keywords>
|
|
</RuleSet>
|
|
</Span>
|
|
|
|
<Keywords color="Modifiers">
|
|
<Word>in</Word>
|
|
<Word>out</Word>
|
|
<Word>inout</Word>
|
|
<Word>precise</Word>
|
|
</Keywords>
|
|
|
|
<Rule color="SemanticKeywords">
|
|
:\s*\b
|
|
(SV_ClipDistance\d
|
|
|SV_CullDistance\d
|
|
|SV_Coverage
|
|
|SV_Depth
|
|
|SV_DepthGreaterEqual
|
|
|SV_DepthLessEqual
|
|
|SV_DispatchThreadID
|
|
|SV_DomainLocation
|
|
|SV_GroupID
|
|
|SV_GroupIndex
|
|
|SV_GroupThreadID
|
|
|SV_GSInstanceID
|
|
|SV_InnerCoverage
|
|
|SV_InsideTessFactor
|
|
|SV_InstanceID
|
|
|SV_IsFrontFace
|
|
|SV_OutputControlPointID
|
|
|SV_Position
|
|
|SV_PrimitiveID
|
|
|SV_RenderTargetArrayIndex
|
|
|SV_SampleIndex
|
|
|SV_StencilRef
|
|
|SV_Target\d
|
|
|SV_TessFactor
|
|
|SV_VertexID
|
|
|SV_ViewportArrayIndex
|
|
|SV_ShadingRate
|
|
|([A-Z][A-Z\d_]+))\b
|
|
</Rule>
|
|
|
|
<Rule color="FunctionCall">
|
|
\b
|
|
(abs
|
|
|acos
|
|
|all
|
|
|AllMemoryBarrier
|
|
|AllMemoryBarrierWithGroupSync
|
|
|any
|
|
|asdouble
|
|
|asfloat
|
|
|asin
|
|
|asint
|
|
|asuint
|
|
|atan
|
|
|atan2
|
|
|ceil
|
|
|clamp
|
|
|clip
|
|
|cos
|
|
|cosh
|
|
|countbits
|
|
|cross
|
|
|D3DCOLORtoUBYTE4
|
|
|ddx
|
|
|ddx_coarse
|
|
|ddx_fine
|
|
|ddy
|
|
|ddy_coarse
|
|
|ddy_fine
|
|
|degrees
|
|
|determinant
|
|
|DeviceMemoryBarrier
|
|
|DeviceMemoryBarrierWithGroupSync
|
|
|distance
|
|
|dot
|
|
|dst
|
|
|EvaluateAttributeAtCentroid
|
|
|EvaluateAttributeAtSample
|
|
|EvaluateAttributeSnapped
|
|
|exp
|
|
|exp2
|
|
|f16tof32
|
|
|f32tof16
|
|
|facetoforward
|
|
|firstbithigh
|
|
|firstbitlow
|
|
|floor
|
|
|fmod
|
|
|frac
|
|
|frexp
|
|
|fwidth
|
|
|GetRenderTargetSampleCount
|
|
|GetRenderTargetSamplePosition
|
|
|GroupMamoryBarrier
|
|
|GroupMamoryBarrierWithGroupSync
|
|
|InterlockedAdd
|
|
|InterlockedCompareExchange
|
|
|InterlockedCompareStore
|
|
|InterlockedExchange
|
|
|InterlockedMax
|
|
|InterlockedMin
|
|
|InterlockedOr
|
|
|InterlockedXor
|
|
|isfinite
|
|
|isinf
|
|
|isnan
|
|
|ldexp
|
|
|lerp
|
|
|lit
|
|
|log
|
|
|log10
|
|
|log2
|
|
|mad
|
|
|max
|
|
|min
|
|
|modf
|
|
|mul
|
|
|noise
|
|
|normalize
|
|
|pow
|
|
|Process2DQuadTessFactorsAvg
|
|
|Process2DQuadTessFactorsMax
|
|
|Process2DQuadTessFactorsMin
|
|
|ProcessIsolineTessFactors
|
|
|ProcessQuadTessFactorsAvg
|
|
|ProcessQuadTessFactorsMax
|
|
|ProcessQuadTessFactorsMin
|
|
|ProcessTriTessFactorsAvg
|
|
|ProcessTriTessFactorsMax
|
|
|ProcessTriTessFactorsMin
|
|
|radians
|
|
|rcp
|
|
|reflect
|
|
|refract
|
|
|reversebits
|
|
|round
|
|
|rsqrt
|
|
|saturate
|
|
|sign
|
|
|sin
|
|
|sincos
|
|
|sinh
|
|
|smoothstep
|
|
|sqrt
|
|
|step
|
|
|tan
|
|
|tanh
|
|
|tex1D
|
|
|tex1Dbias
|
|
|tex1Dgrad
|
|
|tex1Dlod
|
|
|tex1Dproj
|
|
|tex2D
|
|
|tex2Dbias
|
|
|tex2Dgrad
|
|
|tex2Dlod
|
|
|tex3D
|
|
|tex3Dbias
|
|
|tex3Dgrad
|
|
|tex3Dlod
|
|
|tex3Dproj
|
|
|texCUBE
|
|
|texCUBEbias
|
|
|texCUBEgrad
|
|
|texCUBElod
|
|
|texCUBEproj
|
|
|transpose
|
|
|trunc)
|
|
(?=\s*\() # followed by (
|
|
</Rule>
|
|
|
|
<Rule color="MethodCall">
|
|
\b
|
|
[\d\w_]+ # an identifier
|
|
(?=\s*\() # followed by (
|
|
</Rule>
|
|
|
|
<!-- Digits -->
|
|
<Rule color="NumberLiteral">
|
|
\b0[xX][0-9a-fA-F]+ # hex number
|
|
|
|
|
( \b\d+(\.[0-9]+)? #number with optional floating point
|
|
| \.[0-9]+ #or just starting with floating point
|
|
)
|
|
([eE][+-]?[0-9]+)? # optional exponent
|
|
</Rule>
|
|
|
|
<Rule color="Punctuation">
|
|
[?,.;()\[\]{}+\-/%*<>^+~!|&]+
|
|
</Rule>
|
|
</RuleSet>
|
|
</SyntaxDefinition>
|
|
|
|
<!--
|
|
<SyntaxDefinition name="HLSL" xmlns="http://icsharpcode.net/sharpdevelop/syntaxdefinition/2008">
|
|
<RuleSet>
|
|
<Rule color="Functions">
|
|
(abs
|
|
|acos
|
|
|all
|
|
|AllMemoryBarrier
|
|
|AllMemoryBarrierWithGroupSync
|
|
|any
|
|
|asdouble
|
|
|asfloat
|
|
|asin
|
|
|asint
|
|
|asuint
|
|
|atan
|
|
|atan2
|
|
|ceil
|
|
|clamp
|
|
|clip
|
|
|cos
|
|
|cosh
|
|
|countbits
|
|
|cross
|
|
|D3DCOLORtoUBYTE4
|
|
|ddx
|
|
|ddx_coarse
|
|
|ddx_fine
|
|
|ddy
|
|
|ddy_coarse
|
|
|ddy_fine
|
|
|degrees
|
|
|determinant
|
|
|DeviceMemoryBarrier
|
|
|DeviceMemoryBarrierWithGroupSync
|
|
|distance
|
|
|dot
|
|
|dst
|
|
|EvaluateAttributeAtCentroid
|
|
|EvaluateAttributeAtSample
|
|
|EvaluateAttributeSnapped
|
|
|exp
|
|
|exp2
|
|
|f16tof32
|
|
|f32tof16
|
|
|facetoforward
|
|
|firstbithigh
|
|
|firstbitlow
|
|
|floor
|
|
|fmod
|
|
|frac
|
|
|frexp
|
|
|fwidth
|
|
|GetRenderTargetSampleCount
|
|
|GetRenderTargetSamplePosition
|
|
|GroupMamoryBarrier
|
|
|GroupMamoryBarrierWithGroupSync
|
|
|InterlockedAdd
|
|
|InterlockedCompareExchange
|
|
|InterlockedCompareStore
|
|
|InterlockedExchange
|
|
|InterlockedMax
|
|
|InterlockedMin
|
|
|InterlockedOr
|
|
|InterlockedXor
|
|
|isfinite
|
|
|isinf
|
|
|isnan
|
|
|ldexp
|
|
|lerp
|
|
|lit
|
|
|log
|
|
|log10
|
|
|log2
|
|
|mad
|
|
|max
|
|
|min
|
|
|modf
|
|
|mul
|
|
|noise
|
|
|normalize
|
|
|pow
|
|
|Process2DQuadTessFactorsAvg
|
|
|Process2DQuadTessFactorsMax
|
|
|Process2DQuadTessFactorsMin
|
|
|ProcessIsolineTessFactors
|
|
|ProcessQuadTessFactorsAvg
|
|
|ProcessQuadTessFactorsMax
|
|
|ProcessQuadTessFactorsMin
|
|
|ProcessTriTessFactorsAvg
|
|
|ProcessTriTessFactorsMax
|
|
|ProcessTriTessFactorsMin
|
|
|radians
|
|
|rcp
|
|
|reflect
|
|
|refract
|
|
|reversebits
|
|
|round
|
|
|rsqrt
|
|
|saturate
|
|
|sign
|
|
|sin
|
|
|sincos
|
|
|sinh
|
|
|smoothstep
|
|
|sqrt
|
|
|step
|
|
|tan
|
|
|tanh
|
|
|tex1D
|
|
|tex1Dbias
|
|
|tex1Dgrad
|
|
|tex1Dlod
|
|
|tex1Dproj
|
|
|tex2D
|
|
|tex2Dbias
|
|
|tex2Dgrad
|
|
|tex2Dlod
|
|
|tex3D
|
|
|tex3Dbias
|
|
|tex3Dgrad
|
|
|tex3Dlod
|
|
|tex3Dproj
|
|
|texCUBE
|
|
|texCUBEbias
|
|
|texCUBEgrad
|
|
|texCUBElod
|
|
|texCUBEproj
|
|
|transpose
|
|
|trunc)(\s*[(])
|
|
</Rule>
|
|
</RuleSet>
|
|
</SyntaxDefinition>
|
|
--> |