Skip to content

Op assignment indention #99

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

Merged
merged 12 commits into from
Jul 28, 2017

Conversation

lorenzwalthert
Copy link
Collaborator

@lorenzwalthert lorenzwalthert commented Jul 28, 2017

fixing:

#97 and #96 was a bit complicated since solving the problem required to further flatten the nested parse tables.

As the assignment operators requires flattening from right, flatten_operators_one was completely redesigned. The flattening itself was outsourced to flatten_pd(), which can flatten from right or left. Within flatten_pd, binding together a parse table and its child was outsourced to bind_with_child
interaction between math tokens and special tokens and assignment
Copy link
Member

@krlmlr krlmlr left a comment

Choose a reason for hiding this comment

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

Looks great. You need to write "fixes ..." before each # if you want them to be auto-closed when the PR is merged.

R/modify_pd.R Outdated
@@ -23,16 +23,17 @@ indent_curly <- function(pd, indent_by) {

#' @rdname update_indention
indent_op <- function(pd, indent_by, token = c(math_token,
"SPECIAL-PIPE")) {
"SPECIAL-PIPE",
"LEFT_ASSIGN", "
Copy link
Member

Choose a reason for hiding this comment

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

Please double-check.

R/relevel.R Outdated
@@ -12,19 +12,55 @@ flatten_operators <- function(pd_nested) {
post_visit(c(flatten_operators_one))
}


#' Flaten one level of nesting with its child
Copy link
Member

Choose a reason for hiding this comment

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

Spelling.

@codecov
Copy link

codecov bot commented Jul 28, 2017

Codecov Report

❗ No coverage uploaded for pull request base (master@e716887). Click here to learn what that means.
The diff coverage is 64.28%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master      #99   +/-   ##
=========================================
  Coverage          ?   91.77%           
=========================================
  Files             ?       18           
  Lines             ?      596           
  Branches          ?        0           
=========================================
  Hits              ?      547           
  Misses            ?       49           
  Partials          ?        0
Impacted Files Coverage Δ
R/serialized_tests.R 100% <ø> (ø)
R/nested.R 100% <ø> (ø)
R/rules-spacing.R 93.87% <ø> (ø)
R/get_transformers.R 96.49% <ø> (ø)
R/token.R 0% <0%> (ø)
R/modify_pd.R 90% <100%> (ø)
R/serialize.R 100% <100%> (ø)
R/transform.R 84.61% <100%> (ø)
R/relevel.R 100% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e716887...3389c50. Read the comment docs.

@codecov
Copy link

codecov bot commented Jul 28, 2017

Codecov Report

❗ No coverage uploaded for pull request base (master@e716887). Click here to learn what that means.
The diff coverage is 64.28%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master      #99   +/-   ##
=========================================
  Coverage          ?   91.77%           
=========================================
  Files             ?       18           
  Lines             ?      596           
  Branches          ?        0           
=========================================
  Hits              ?      547           
  Misses            ?       49           
  Partials          ?        0
Impacted Files Coverage Δ
R/serialized_tests.R 100% <ø> (ø)
R/get_transformers.R 96.49% <ø> (ø)
R/rules-spacing.R 93.87% <ø> (ø)
R/nested.R 100% <ø> (ø)
R/token.R 0% <0%> (ø)
R/modify_pd.R 90% <100%> (ø)
R/transform.R 84.61% <100%> (ø)
R/relevel.R 100% <100%> (ø)
R/serialize.R 100% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e716887...96d81b9. Read the comment docs.

@lorenzwalthert lorenzwalthert merged commit 3b09707 into r-lib:master Jul 28, 2017
lorenzwalthert added a commit to lorenzwalthert/styler that referenced this pull request Jan 15, 2022
lorenzwalthert added a commit to lorenzwalthert/styler that referenced this pull request Jan 15, 2022
lorenzwalthert added a commit to lorenzwalthert/styler that referenced this pull request Jan 15, 2022
lorenzwalthert added a commit to lorenzwalthert/styler that referenced this pull request Jan 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants