-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Labels
display and printingAesthetics and correctness of printed representations of objects.Aesthetics and correctness of printed representations of objects.parserLanguage parsing and surface syntaxLanguage parsing and surface syntax
Description
Keyword arguments are usually written without space: fn(;a=1) = a^2. However if the kwarg ends in a bang this does not work:
julia> f(;fn!=x->x[1]=1) = 1
ERROR: syntax: invalid keyword argument syntax "(fn != x -> begin
# REPL[24], line 1
x[1] = 1
end)"
Stacktrace:
[1] top-level scope at REPL[24]:1and a space is needed. Could no-space be supported?
This would then also be consistent with the current printing of the Expr:
julia> Expr(:kw, :fn!, :a)
:(fn!=a)Metadata
Metadata
Assignees
Labels
display and printingAesthetics and correctness of printed representations of objects.Aesthetics and correctness of printed representations of objects.parserLanguage parsing and surface syntaxLanguage parsing and surface syntax