]> git.lizzy.rs Git - micro.git/blobdiff - runtime/syntax/glsl.yaml
Merge branch 'python-highlight-zero' of https://github.com/a11ce/micro into a11ce...
[micro.git] / runtime / syntax / glsl.yaml
index f1da0237d13cea2b40ff1980c8ab61973e470f45..73369c8e6626e30e271f02f6a21cde44502302ae 100644 (file)
@@ -1,23 +1,26 @@
 filetype: glsl
 
-detect: 
+detect:
     filename: "\\.(frag|vert|fp|vp|glsl)$"
 
 rules:
-    - identifier.class: "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[()]"
+    - identifier: "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[()]"
     - 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"
     - identifier: "\\bgl_(DepthRangeParameters|PointParameters|MaterialParameters|LightSourceParameters|LightModelParameters|LightModelProducts|LightProducts|FogParameters)\\b"
-    - statement: "\\b(const|attribute|varying|uniform|in|out|inout|if|else|discard|while|for|do)\\b"
-    - special: "\\b(break|continue|return)\\b"
+    - statement: "\\b(const|attribute|varying|uniform|in|out|inout|if|else|return|discard|while|for|do)\\b"
+    - statement: "\\b(break|continue)\\b"
     - constant.bool: "\\b(true|false)\\b"
-    - symbol.operator: "[\\-+/*=<>?:!~%&|^]"
+    - symbol.operator: "[-+/*=<>?:!~%&|^]"
     - constant.number: "\\b([0-9]+|0x[0-9a-fA-F]*)\\b"
-    - comment: "(^|[[:space:]])//.*"
+
+    - comment: 
+        start: "//"
+        end: "$"
+        rules:
+            - todo: "TODO:?"
+
     - comment:
         start: "/\\*"
         end: "\\*/"
-        rules: []
-
-    - todo: "TODO:?"
-    - indent-char.whitespace: "[[:space:]]+$"
-    - indent-char: "   + +| +  +"
+        rules:
+            - todo: "TODO:?"