summaryrefslogtreecommitdiffstats
path: root/parser.y
diff options
context:
space:
mode:
Diffstat (limited to 'parser.y')
-rw-r--r--parser.y7
1 files changed, 4 insertions, 3 deletions
diff --git a/parser.y b/parser.y
index bdc72010..d7c31c8b 100644
--- a/parser.y
+++ b/parser.y
@@ -903,9 +903,10 @@ hash : HASH_H list { if (parser->quasi_level > 0 && unquotes_occur(
yybadtok(yychar, lit("hash literal")); }
;
-struct : HASH_S list { if (parser->quasi_level > 0 && unquotes_occur($2, 0))
- $$ = rl(cons(struct_lit_s, $2),
- num($1));
+struct : HASH_S list { if ((parser->quasi_level > 0 && unquotes_occur($2, 0)) ||
+ (parser->read_unknown_structs &&
+ !find_struct_type(first($2))))
+ { $$ = rl(cons(struct_lit_s, $2), num($1)); }
else
{ val strct = make_struct_lit(first($2),
rest($2));