Commit Graph

8 Commits

Author SHA1 Message Date
Rui Ueyama bbfe3f4369 Add global initializer for scalar and string 2020-12-07 12:00:06 +09:00
Rui Ueyama 483b194a80 Handle union initializers for local variables 2020-12-07 12:00:06 +09:00
Rui Ueyama aca19dd350 Allow to initialize a struct with other struct 2020-12-07 12:00:06 +09:00
Rui Ueyama e9d2c46ab3 Handle struct initializers for local variables 2020-12-07 12:00:06 +09:00
Rui Ueyama 5b95533603 Allow to omit array length if an initializer is given
So that you can write something like `int x[] = {1, 2, 3}`
instead of `int x[3] = {1, 2, 3}`.
2020-12-07 12:00:06 +09:00
Rui Ueyama 0d717373cc Add string literal initializer 2020-12-07 12:00:06 +09:00
Rui Ueyama ae0a37dc4b Initialize excess array elements with zero 2020-12-07 12:00:06 +09:00
Rui Ueyama 22dd560ecf Support local variable initializers 2020-12-07 12:00:06 +09:00