File tree 3 files changed +16
-2
lines changed
3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ Julia v1.5 Release Notes
3
3
4
4
New language features
5
5
---------------------
6
-
6
+ * Macro calls ` @foo {...} ` can now also be written ` @foo{...} ` (without the space) ( [ # 34498 ] ).
7
7
8
8
Language changes
9
9
----------------
Original file line number Diff line number Diff line change 1241
1241
((#\{ )
1242
1242
(disallow-space s ex t)
1243
1243
(take-token s)
1244
- (loop (list* 'curly ex (parse-call-arglist s #\} ))))
1244
+ (let ((args (parse-call-arglist s #\} )))
1245
+ (if macrocall?
1246
+ `(call ,ex (braces ,@args))
1247
+ (loop (list* 'curly ex args)))))
1245
1248
((#\" #\` )
1246
1249
(if (and (or (symbol? ex) (valid-modref? ex))
1247
1250
(not (operator? ex))
Original file line number Diff line number Diff line change 364
364
@test expr == Meta. parse (pf > pg ? " (x$(f) y)$(g) z" : " x$(f) (y$(g) z)" )
365
365
end
366
366
end
367
+
368
+ # issue 34498
369
+ @testset " macro calls @foo{...}" begin
370
+ @test :(@foo {}) == :(@foo {})
371
+ @test :(@foo {bar}) == :(@foo {bar})
372
+ @test :(@foo {bar,baz}) == :(@foo {bar,baz})
373
+ @test :(@foo {bar}(baz)) == :((@foo {bar})(baz))
374
+ @test :(@foo {bar}{baz}) == :((@foo {bar}){baz})
375
+ @test :(@foo {bar}[baz]) == :((@foo {bar})[baz])
376
+ @test :(@foo {bar} + baz) == :((@foo {bar}) + baz)
377
+ end
You can’t perform that action at this time.
0 commit comments