We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1d8fc08 commit d5d117cCopy full SHA for d5d117c
src/parser.c
@@ -151,8 +151,9 @@ static Expr* parse_primary(Parser* parser) {
151
Token lb = parser->previous_token; // the '<' token
152
Expr* mp = expr_map(lb.line, lb.column);
153
if (parser->current_token.type == TOKEN_RANGLE) {
154
- report_error(parser, "Empty map literal is not allowed");
155
- return NULL;
+ // Allow empty map literal: consume '>' and return empty map
+ advance(parser);
156
+ return mp;
157
}
158
do {
159
// parse key
0 commit comments