projects
/
onyx.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f7b0ed7
)
forgot to make "#auto" work with compound declarations
author
Brendan Hansen
<brendan.f.hansen@gmail.com>
Wed, 5 Oct 2022 00:20:34 +0000
(19:20 -0500)
committer
Brendan Hansen
<brendan.f.hansen@gmail.com>
Wed, 5 Oct 2022 00:20:34 +0000
(19:20 -0500)
compiler/src/parser.c
patch
|
blob
|
history
diff --git
a/compiler/src/parser.c
b/compiler/src/parser.c
index 8c878f61db36ebcb9d25dc8734727391ef572a40..4d1ed8886043f23bc35604fb26c60939173c1e6f 100644
(file)
--- a/
compiler/src/parser.c
+++ b/
compiler/src/parser.c
@@
-1299,7
+1299,13
@@
static i32 parse_possible_compound_symbol_declaration(OnyxParser* parser, AstNod
prev_local->next = (AstNode *) assignment;
} else {
- AstType* type_for_all = parse_type(parser);
+ AstType* type_for_all = NULL;
+
+ // See comment in parse_possible_symbol_declaration about "#auto"
+ if (!parse_possible_directive(parser, "auto")) {
+ type_for_all = parse_type(parser);
+ }
+
forll (AstLocal, local, first_local, next) {
local->type_node = type_for_all;
}