Added inferred types and missing length function.

This commit is contained in:
2025-01-10 22:44:15 +01:00
parent 8bd766281e
commit ec31046d30
16 changed files with 218 additions and 13 deletions

View File

@@ -1,4 +1,4 @@
test/field_without_type_specifier.ink:2,0: error: Expected type specifier after field name.
x := 5.0;
^

(program
(fun vertex vs_main
[]
(:= x 5)))

View File

@@ -0,0 +1,18 @@
(program
(fun bar -> float
[]
(return 5))
(fun foo -> float
[]
(return (bar)))
(fun vertex vs_main -> float4 (@position)
[(:= pos float3 (@position))]
(:= f 2)
(:= i 10)
(= f (foo))
(:= v2 (float2 2 2))
(:= v3 (float3 2 2 3))
(:= v4 (float4 4 5 6 7))
(return (float4 1 1 1 1))))