Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #32775 and #34023, issues showing kw and parameters exprs #34038

Merged
merged 1 commit into from
Dec 15, 2019

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