diff options
author | Bad Diode <bd@badd10de.dev> | 2024-06-24 21:24:48 +0200 |
---|---|---|
committer | Bad Diode <bd@badd10de.dev> | 2024-06-24 21:24:48 +0200 |
commit | 9eb5c9bfa3fcf8d7b03efd7d4def71e39ae3f799 (patch) | |
tree | 12b6ac10b074ba2db7e0118fed9054571ae6811b /tests | |
parent | 2e7daa8e0765d293b1029131f6fde0592546bc0d (diff) | |
download | bdl-9eb5c9bfa3fcf8d7b03efd7d4def71e39ae3f799.tar.gz bdl-9eb5c9bfa3fcf8d7b03efd7d4def71e39ae3f799.zip |
Change grammar for struct literals
Diffstat (limited to 'tests')
-rw-r--r-- | tests/variables.bad | 6 |
1 files changed, 3 insertions, 3 deletions
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 { | |||
44 | } | 44 | } |
45 | 45 | ||
46 | ; Symbols followed by curly braces output struct literals. | 46 | ; Symbols followed by curly braces output struct literals. |
47 | let particle = entity { | 47 | let particle = entity : { |
48 | ; Two ways of initializing inner fields. | 48 | ; Two ways of initializing inner fields. |
49 | pos = vec { x = 1 y = 2 } | 49 | pos = vec : { x = 1 y = 2 } |
50 | attr.id = 1 | 50 | attr.id = 1 |
51 | attr.name = "particle" | 51 | attr.name = "particle" |
52 | 52 | ||
53 | ; Missing initialization fields default to zero. | 53 | ; Missing initialization fields default to zero. |
54 | vel = vec { y = -3 } | 54 | vel = vec : { y = -3 } |
55 | } | 55 | } |
56 | 56 | ||
57 | ; We can have static arrays and have indexed access. | 57 | ; We can have static arrays and have indexed access. |