You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Comments in if clause without braces not recognised correctly #278
reprex::reprex_info()
#> Created by the reprex package v0.1.1.9000 on 2017-11-08styler::style_text(
"if (!inherits(geom, 'Geom')) # for geoms that return more than one thing a()")
#> Error in if (has_if_without_curly) {: missing value where TRUE/FALSE needed
Need to make consistent use of next_non_comment() to find correct positions.
What makes you think we need to review all transformers? I think line spacing indention transformers are fine, for line break transformers we check that the token before the line break to remove is not a comment so the only ones remaining are the token transformers, which I think, are tricky. I filed #279 which hopefully resolves the issues.
However, I think you are right in that we may want to parse the result to check for equivalence of the parse data.
To be on the safe side, yes, we may want to set the default scope to "line_breaks" and add a warning for scope = "tokens"
But keeping the source does not give the desired output. Why do you think we should use keep.source = TRUE
reprex::reprex_info()
#> Created by the reprex package v0.1.1.9000 on 2017-11-19
identical(parse(text="a+1", keep.source=TRUE), parse(text="a + 1", keep.source=TRUE))
#> [1] FALSE
Activity
krlmlr commentedon Nov 12, 2017
This looks like a lot of work -- do we need to review all transformers?
I'd like to suggest the following:
"line_breaks"scope > "line_breaks"How does that sound?
lorenzwalthert commentedon Nov 18, 2017
What makes you think we need to review all transformers? I think line spacing indention transformers are fine, for line break transformers we check that the token before the line break to remove is not a comment so the only ones remaining are the token transformers, which I think, are tricky. I filed #279 which hopefully resolves the issues.
However, I think you are right in that we may want to parse the result to check for equivalence of the parse data.
To be on the safe side, yes, we may want to set the default scope to
"line_breaks"and add a warning forscope = "tokens"krlmlr commentedon Nov 18, 2017
Agree that spacing transformers are fine, but it seems we need to double-check transformers that merge lines.
One more thing: Parse data identity probably needs
keep.source = FALSEin theparse()calls.lorenzwalthert commentedon Nov 19, 2017
But keeping the source does not give the desired output. Why do you think we should use
keep.source = TRUEkrlmlr commentedon Nov 19, 2017
I thought we should use
keep.source = FALSE.lorenzwalthert commentedon Nov 19, 2017
ugh right...