-
Notifications
You must be signed in to change notification settings - Fork 73
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
Op assignment indention #99
Conversation
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
There was a problem hiding this 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", " |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spelling.
Codecov Report
@@ Coverage Diff @@
## master #99 +/- ##
=========================================
Coverage ? 91.77%
=========================================
Files ? 18
Lines ? 596
Branches ? 0
=========================================
Hits ? 547
Misses ? 49
Partials ? 0
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #99 +/- ##
=========================================
Coverage ? 91.77%
=========================================
Files ? 18
Lines ? 596
Branches ? 0
=========================================
Hits ? 547
Misses ? 49
Partials ? 0
Continue to review full report at Codecov.
|
fixing:
#97 and #96 was a bit complicated since solving the problem required to further flatten the nested parse tables.