UNPKG

@tanstack/highlight

Version:

Tiny class-based syntax highlighting for documentation.

15 lines (14 loc) • 1.69 kB
// Vocabulary adapted from Highlight.js 11.11.1, see NOTICE.md. import { simpleLanguage, cComments, quotedStrings } from '../internal/simple-language.js'; export const glsl = /* @__PURE__ */ simpleLanguage({ name: "glsl", aliases: [], numberSuffix: '[uUfF]?', comments: cComments, strings: quotedStrings, keywords: "break continue discard do else for if return while switch case default attribute binding buffer ccw centroid varying coherent column_major const cw depth_any depth_greater depth_less depth_unchanged early_fragment_tests equal_spacing flat fractional_even_spacing fractional_odd_spacing highp in index inout invariant invocations isolines layout line_strip lines lines_adjacency local_size_x local_size_y local_size_z location lowp max_vertices mediump noperspective offset origin_upper_left out packed patch pixel_center_integer point_mode points precise precision quads r11f_g11f_b10f r16 r16_snorm r16f r16i r16ui r32f r32i r32ui r8 r8_snorm r8i r8ui readonly restrict rg16 rg16_snorm rg16f rg16i rg16ui rg32f rg32i rg32ui rg8 rg8_snorm rg8i rg8ui rgb10_a2 rgb10_a2ui rgba16 rgba16_snorm rgba16f rgba16i rgba16ui rgba32f rgba32i rgba32ui rgba8 rgba8_snorm rgba8i rgba8ui row_major sample shared smooth std140 std430 stream triangle_strip triangles triangles_adjacency uniform vertices volatile writeonly", literals: "true false", types: "void bool int uint float double vec2 vec3 vec4 ivec2 ivec3 ivec4 uvec2 uvec3 uvec4 bvec2 bvec3 bvec4 mat2 mat3 mat4 sampler2D samplerCube", beforeWords: [{ className: 'meta', regex: /^[ \t]*#[ \t]*[A-Za-z_]\w*/gm }], rules: [{ className: 'function', regex: /\b[A-Za-z_]\w*(?=\s*\()/g }], });