Skip to content

Commit 000d650

Browse files
authored
Merge pull request #309 from lorettayao/fix-array-init
Fix array compound literal parsing
2 parents c044948 + 4049889 commit 000d650

File tree

8 files changed

+298
-63
lines changed

8 files changed

+298
-63
lines changed

src/defs.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#define MAX_TOKEN_LEN 256
1515
#define MAX_ID_LEN 64
1616
#define MAX_LINE_LEN 256
17-
#define MAX_VAR_LEN 32
17+
#define MAX_VAR_LEN 128
1818
#define MAX_TYPE_LEN 32
1919
#define MAX_PARAMS 8
2020
#define MAX_LOCALS 1600
@@ -410,6 +410,11 @@ struct var {
410410
* the variable is based on the top of the local stack.
411411
*/
412412
bool ofs_based_on_stack_top;
413+
414+
/* True when this variable was synthesized to hold a compound literal
415+
* (e.g., array or struct literal temporaries).
416+
*/
417+
bool is_compound_literal;
413418
};
414419

415420
typedef struct {

0 commit comments

Comments
 (0)