TODO FIXME \# (define|undef|if|elif|else|endif|line)\b // (region|endregion|error|warning|pragma)\b // /\* \*/ \b(Buffer|bool|int|uint|half|byte|short|ushort|float|double|long|ulong)([1-4]?)\b \b(RW)?(Buffer|ByteAddressBuffer|StructuredBuffer)\b \b(AppendStructuredBuffer|ConsumeStructuredBuffer|AppendBuffer|ConsumeBuffer)\b \b(Texture1D|Texture1DArray|Texture2D|Texture2DArray|Texture3D|TextureCube)\b \b(sampler|sampler1D|sampler2D|sampler3D|samplerCUBE|sampler_state|SamplerState)\b true false if else break continue do for switch while return technique pass compile sampler register typedef struct cbuffer class goto union \[ \] unroll loop domain earlydepthstencil instance maxtessfactor numthreads outputcontrolpoints outputtopology partitioning patchconstantfunc in out inout precise :\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 \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 ( \b [\d\w_]+ # an identifier (?=\s*\() # followed by ( \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 [?,.;()\[\]{}+\-/%*<>^+~!|&]+