From 9eb5c9bfa3fcf8d7b03efd7d4def71e39ae3f799 Mon Sep 17 00:00:00 2001 From: Bad Diode Date: Mon, 24 Jun 2024 21:24:48 +0200 Subject: Change grammar for struct literals --- tests/variables.bad | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/variables.bad b/tests/variables.bad index 61d1956..88e04d1 100644 --- a/tests/variables.bad +++ b/tests/variables.bad @@ -44,14 +44,14 @@ struct entity { } ; Symbols followed by curly braces output struct literals. -let particle = entity { +let particle = entity : { ; Two ways of initializing inner fields. - pos = vec { x = 1 y = 2 } + pos = vec : { x = 1 y = 2 } attr.id = 1 attr.name = "particle" ; Missing initialization fields default to zero. - vel = vec { y = -3 } + vel = vec : { y = -3 } } ; We can have static arrays and have indexed access. -- cgit v1.2.1