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/,
});
class="w"> + /(?=[\s;]|$)/.source, 'i' ); } Prism.languages.csp = { directive: { pattern: /(^|[\s;])(?:base-uri|block-all-mixed-content|(?:child|connect|default|font|frame|img|manifest|media|object|prefetch|script|style|worker)-src|disown-opener|form-action|frame-(?:ancestors|options)|input-protection(?:-(?:clip|selectors))?|navigate-to|plugin-types|policy-uri|referrer|reflected-xss|report-(?:to|uri)|require-sri-for|sandbox|(?:script|style)-src-(?:attr|elem)|upgrade-insecure-requests)(?=[\s;]|$)/i, lookbehind: true, alias: 'property', }, scheme: { pattern: value(/[a-z][a-z0-9.+-]*:/.source), lookbehind: true, }, none: { pattern: value(/'none'/.source), lookbehind: true, alias: 'keyword', }, nonce: { pattern: value(/'nonce-[-+/\w=]+'/.source), lookbehind: true, alias: 'number', }, hash: { pattern: value(/'sha(?:256|384|512)-[-+/\w=]+'/.source), lookbehind: true, alias: 'number', }, host: { pattern: value( /[a-z][a-z0-9.+-]*:\/\/[^\s;,']*/.source + '|' + /\*[^\s;,']*/.source + '|' + /[a-z0-9-]+(?:\.[a-z0-9-]+)+(?::[\d*]+)?(?:\/[^\s;,']*)?/.source ), lookbehind: true, alias: 'url', inside: { important: /\*/, }, }, keyword: [ { pattern: value(/'unsafe-[a-z-]+'/.source), lookbehind: true, alias: 'unsafe', }, { pattern: value(/'[a-z-]+'/.source), lookbehind: true, alias: 'safe', }, ], punctuation: /;/, }; })(Prism);