Skip to content

Commit 65d99f7

Browse files
move short to tokenize
1 parent 9b9af35 commit 65d99f7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

R/nested.R

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ compute_parse_data_nested <- function(text) {
3030
add_terminal_token_after()
3131

3232
parse_data$child <- rep(list(NULL), length(parse_data$text))
33-
parse_data$short <- substr(parse_data$text, 1, 5)
34-
3533
pd_nested <- parse_data %>%
3634
nest_parse_data() %>%
3735
flatten_operators()
@@ -48,6 +46,7 @@ tokenize <- function(text) {
4846
parsed <- parse(text = text, keep.source = TRUE)
4947
parse_data <- as_tibble(utils::getParseData(parsed, includeText = NA)) %>%
5048
enhance_mapping_special()
49+
parse_data$short <- substr(parse_data$text, 1, 5)
5150
parse_data
5251
}
5352

0 commit comments

Comments
 (0)