Skip to content

Commit 311ff19

Browse files
remove line and col from token creators
This will conflict with #212
1 parent 1b339f4 commit 311ff19

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

R/initialize.R

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,7 @@ initialize_spaces <- function(pd_flat) {
3939
}
4040

4141
remove_line_col <- function(pd_flat) {
42-
pd_flat$line1 <- NULL
43-
pd_flat$col1 <- NULL
44-
pd_flat$line2 <- NULL
45-
pd_flat$col2 <- NULL
42+
pd_flat[c("line1", "line2", "col1", "col2")] <- NULL
4643
pd_flat
4744
}
4845

R/nested.R

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,5 @@ combine_children <- function(child, internal_child) {
179179
#' @param pd_nested A nested parse table.
180180
#' @return The line number on which the first token occurs.
181181
find_start_line <- function(pd_nested) {
182-
if (pd_nested$terminal[1]) return(pd_nested$line1[1])
183-
first_child <- which(!pd_nested$terminal)[1]
184-
find_start_line(pd_nested$child[[first_child]])
182+
pd_nested$line1[1]
185183
}

0 commit comments

Comments
 (0)