summaryrefslogtreecommitdiffstats
path: root/public/prism/prism-hlsl.min.js
blob: 29c6e0b1d97e1acc6b6a27fbdc175b421825f715 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
Prism.languages.hlsl = Prism.languages.extend('c', {
  'class-name': [
    Prism.languages.c['class-name'],
    /\b(?:AppendStructuredBuffer|BlendState|Buffer|ByteAddressBuffer|CompileShader|ComputeShader|ConsumeStructuredBuffer|DepthStencilState|DepthStencilView|DomainShader|GeometryShader|Hullshader|InputPatch|LineStream|OutputPatch|PixelShader|PointStream|RWBuffer|RWByteAddressBuffer|RWStructuredBuffer|RWTexture(?:1D|1DArray|2D|2DArray|3D)|RasterizerState|RenderTargetView|SamplerComparisonState|SamplerState|StructuredBuffer|Texture(?:1D|1DArray|2D|2DArray|2DMS|2DMSArray|3D|Cube|CubeArray)|TriangleStream|VertexShader)\b/,
  ],
  keyword: [
    /\b(?:asm|asm_fragment|auto|break|case|catch|cbuffer|centroid|char|class|column_major|compile|compile_fragment|const|const_cast|continue|default|delete|discard|do|dynamic_cast|else|enum|explicit|export|extern|for|friend|fxgroup|goto|groupshared|if|in|inline|inout|interface|line|lineadj|linear|long|matrix|mutable|namespace|new|nointerpolation|noperspective|operator|out|packoffset|pass|pixelfragment|point|precise|private|protected|public|register|reinterpret_cast|return|row_major|sample|sampler|shared|short|signed|sizeof|snorm|stateblock|stateblock_state|static|static_cast|string|struct|switch|tbuffer|technique|technique10|technique11|template|texture|this|throw|triangle|triangleadj|try|typedef|typename|uniform|union|unorm|unsigned|using|vector|vertexfragment|virtual|void|volatile|while)\b/,
    /\b(?:bool|double|dword|float|half|int|min(?:10float|12int|16(?:float|int|uint))|uint)(?:[1-4](?:x[1-4])?)?\b/,
  ],
  number:
    /(?:(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[eE][+-]?\d+)?|\b0x[\da-fA-F]+)[fFhHlLuU]?\b/,
  boolean: /\b(?:false|true)\b/,
});
, lookbehind: !0, alias: ['language-markup', 'language-html', 'language-xml'], inside: e.languages.markup, }, }; function r(e, a) { return RegExp( e.replace(/<ID>/g, function () { return n; }), a ); } (e.languages.dot = { comment: { pattern: /\/\/.*|\/\*[\s\S]*?\*\/|^#.*/m, greedy: !0 }, 'graph-name': { pattern: r('(\\b(?:digraph|graph|subgraph)[ \t\r\n]+)<ID>', 'i'), lookbehind: !0, greedy: !0, alias: 'class-name', inside: a, }, 'attr-value': { pattern: r('(=[ \t\r\n]*)<ID>'), lookbehind: !0, greedy: !0, inside: a, }, 'attr-name': { pattern: r('([\\[;, \t\r\n])<ID>(?=[ \t\r\n]*=)'), lookbehind: !0, greedy: !0, inside: a, }, keyword: /\b(?:digraph|edge|graph|node|strict|subgraph)\b/i, 'compass-point': { pattern: /(:[ \t\r\n]*)(?:[ewc_]|[ns][ew]?)(?![\w\x80-\uFFFF])/, lookbehind: !0, alias: 'builtin', }, node: { pattern: r('(^|[^-.\\w\\x80-\\uFFFF\\\\])<ID>'), lookbehind: !0, greedy: !0, inside: a, }, operator: /[=:]|-[->]/, punctuation: /[\[\]{};,]/, }), (e.languages.gv = e.languages.dot); })(Prism);