Proper pretty printing and error handling on non-cool if condition.
This commit is contained in:
6
test/parse/non_bool_cond.golden
Normal file
6
test/parse/non_bool_cond.golden
Normal file
@@ -0,0 +1,6 @@
|
||||
(program
|
||||
(fun vertex vs_main -> float4 (@position)
|
||||
[(:= pos float3 (@position))]
|
||||
(if 1
|
||||
(return (float4 pos 1)))
|
||||
(return (float4 0))))
|
||||
@@ -1,9 +1,9 @@
|
||||
(program
|
||||
(fun vertex vs_main -> float4 (@position)
|
||||
[(:= pos float3 (@position))]
|
||||
(if (> pos.x 100)
|
||||
(return (float4 pos 1))
|
||||
(if (> pos.x 50)
|
||||
(return (float4 pos 1))
|
||||
(return (float4 1))))
|
||||
(return (float4 0))))
|
||||
[(:= pos float3 (@position))]
|
||||
(if (> pos.x 100)
|
||||
(return (float4 pos 1))
|
||||
(if (> pos.x 50)
|
||||
(return (float4 pos 1))
|
||||
(return (float4 1))))
|
||||
(return (float4 0))))
|
||||
6
test/parse/simple_if.golden
Normal file
6
test/parse/simple_if.golden
Normal file
@@ -0,0 +1,6 @@
|
||||
(program
|
||||
(fun vertex vs_main -> float4 (@position)
|
||||
[(:= pos float3 (@position))]
|
||||
(if (> 0 100)
|
||||
(return (float4 pos 1)))
|
||||
(return (float4 0))))
|
||||
7
test/parse/simple_if_else.golden
Normal file
7
test/parse/simple_if_else.golden
Normal file
@@ -0,0 +1,7 @@
|
||||
(program
|
||||
(fun vertex vs_main -> float4 (@position)
|
||||
[(:= pos float3 (@position))]
|
||||
(if (> 0 100)
|
||||
(return (float4 pos 1))
|
||||
(return (float4 1)))
|
||||
(return (float4 0))))
|
||||
Reference in New Issue
Block a user