Darkyenus / glsl4idea

A GLSL language plugin for IntelliJ IDEA
GNU Lesser General Public License v3.0
101 stars 31 forks source link

Switch statements are not recognised #68

Closed AbigailBuccaneer closed 9 years ago

AbigailBuccaneer commented 9 years ago

The parser makes no attempt to parse switch statements. They end up parsed as a function call, a missing semicolon and then a compound statement.

Relevant Piglit testcases:

fail/switch-case-duplicated.vert
fail/switch-case-empty-end.vert
fail/switch-case-in-int.vert
fail/switch-case-uniform-int.vert
fail/switch-default-duplicated.vert
fail/switch-expression-const-float.vert
fail/switch-expression-const-ivec2.vert
fail/switch-expression-const-vec2.vert
fail/switch-expression-in-float.vert
fail/switch-expression-in-vec2.vert
fail/switch-expression-uniform-float.vert
fail/switch-expression-uniform-vec2.vert
fail/switch-expression-var-float.vert
fail/switch-expression-var-vec2.vert
fail/switch.frag
fail/switch-nested-case.vert
fail/switch-nested-default.vert
fail/switch-uint-vs-int.vert
pass/switch-case-const-int-expression.vert
pass/switch-case-const-int.vert
pass/switch-case-fallthrough.vert
pass/switch-case-statement.vert
pass/switch-default.vert
pass/switch-expression-const-int.vert
pass/switch-expression-in-int.vert
pass/switch-expression-uniform-int.vert
pass/switch-expression-var-int.vert
pass/switch-nested-break.vert
pass/switch-nested-loop.vert
pass/switch-nested-switch.vert