Debian Codegraph @

runtime/syntax/glsl.yaml

raw
1 filetype: glsl
2
3 detect:
4 filename: "\\.(frag|vert|fp|vp|glsl)$"
5
6 rules:
7 - identifier: "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[()]"
8 - type: "\\b(void|bool|bvec2|bvec3|bvec4|int|ivec2|ivec3|ivec4|float|vec2|vec3|vec4|mat2|mat3|mat4|struct|sampler1D|sampler2D|sampler3D|samplerCUBE|sampler1DShadow|sampler2DShadow)\\b"
9 - identifier: "\\bgl_(DepthRangeParameters|PointParameters|MaterialParameters|LightSourceParameters|LightModelParameters|LightModelProducts|LightProducts|FogParameters)\\b"
10 - statement: "\\b(const|attribute|varying|uniform|in|out|inout|if|else|return|discard|while|for|do)\\b"
11 - statement: "\\b(break|continue)\\b"
12 - constant.bool: "\\b(true|false)\\b"
13 - symbol.operator: "[-+/*=<>?:!~%&|^]"
14 - constant.number: "\\b([0-9]+|0x[0-9a-fA-F]*)\\b"
15
16 - comment:
17 start: "//"
18 end: "$"
19 rules:
20 - todo: "TODO:?"
21
22 - comment:
23 start: "/\\*"
24 end: "\\*/"
25 rules:
26 - todo: "TODO:?"