Skip to content

Conversation

JeffBezanson
Copy link
Member

This attempts to track where = expressions are parsed with head kw and show them correctly, using fallback Expr(...) printing when necessary. Also handles ; in tuples, since that is closely related.

fix #32775
fix #34023

@JeffBezanson JeffBezanson added bugfix This change fixes an existing bug display and printing Aesthetics and correctness of printed representations of objects. labels Dec 6, 2019
Copy link
Member

@vtjnash vtjnash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it worthwhile to print an extra block expression for Expr(:call, :call, :(a = 2)), which has the same syntax meaning though a different parse structure:

call( (a = 2;) )

@JeffBezanson
Copy link
Member Author

That's clever! I think it's better to print the exact structure whenever possible though, even if that means using the ugly $(Expr(...)). Should come up rarely enough.

@JeffBezanson JeffBezanson added the triage This should be discussed on a triage call label Dec 12, 2019
@JeffBezanson JeffBezanson removed the triage This should be discussed on a triage call label Dec 13, 2019
@JeffBezanson JeffBezanson merged commit ad6752b into master Dec 15, 2019
@JeffBezanson JeffBezanson deleted the jb/showkws branch December 15, 2019 03:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix This change fixes an existing bug display and printing Aesthetics and correctness of printed representations of objects.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Printing of kw-args with bang needs a space improve show to handle ; in a tuple

4 participants