diff --git a/DESCRIPTION b/DESCRIPTION index 436183202..ce13fc8b2 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: styler Title: Non-Invasive Pretty Printing of R Code -Version: 1.2.0.9000 +Version: 1.2.0.9001 Authors@R: c(person(given = "Kirill", family = "Müller", @@ -81,6 +81,7 @@ Collate: 'testing-public-api.R' 'testing.R' 'token-create.R' + 'transform-block.R' 'transform-code.R' 'transform-files.R' 'ui-caching.R' diff --git a/NEWS.md b/NEWS.md index f43345acc..1392fd41c 100644 --- a/NEWS.md +++ b/NEWS.md @@ -20,8 +20,10 @@ before will be instantaneous. This brings large speed boosts in many situations, e.g. when `style_pkg()` is run but only a few files have changed since the last styling or when using the [styler pre-commit - hook](https://github.com/lorenzwalthert/precommit). See `help("caching")` - for details (#538). + hook](https://github.com/lorenzwalthert/precommit). Because styler caches + by expression, you will also get speed boosts in large files with many + expressions when you only change a few o them. See `help("caching")` for + details (#538, #578). * `create_style_guide()` gains two arguments `style_guide_name` and `style_guide_version` that are carried as meta data, in particular to version diff --git a/R/initialize.R b/R/initialize.R index 98a04a6fa..6362a4acb 100644 --- a/R/initialize.R +++ b/R/initialize.R @@ -20,6 +20,8 @@ default_style_guide_attributes <- function(pd_flat) { validate_parse_data() } + + #' Initialize attributes #' #' @name initialize_attributes diff --git a/R/nest.R b/R/nest.R index 1e6ef28c6..960bc3296 100644 --- a/R/nest.R +++ b/R/nest.R @@ -7,11 +7,14 @@ #' of the parse table. #' @importFrom purrr when #' @keywords internal -compute_parse_data_nested <- function(text) { +compute_parse_data_nested <- function(text, + transformers) { parse_data <- tokenize(text) %>% add_terminal_token_before() %>% add_terminal_token_after() %>% - add_stylerignore() + add_stylerignore() %>% + add_attributes_caching(transformers) %>% + drop_cached_children() env_add_stylerignore(parse_data) @@ -19,11 +22,97 @@ compute_parse_data_nested <- function(text) { pd_nested <- parse_data %>% nest_parse_data() %>% flatten_operators() %>% - when(any(parse_data$token == "EQ_ASSIGN") ~ relocate_eq_assign(.), ~.) + when(any(parse_data$token == "EQ_ASSIGN") ~ relocate_eq_assign(.), ~.) %>% + add_cache_block() pd_nested } +#' Add the block id to a parse table +#' +#' Must be after [nest_parse_data()] because requires a nested parse table as +#' input. +#' @param pd_nested A top level nest. +#' @keywords internal +#' @importFrom rlang seq2 +add_cache_block <- function(pd_nested) { + if (cache_is_activated()) { + pd_nested$block <- cache_find_block(pd_nested) + } else { + pd_nested$block <- rep(1, nrow(pd_nested)) + } + pd_nested +} + +#' Drop all children of a top level expression that are cached +#' +#' Note that we do cache top-level comments. Because package code has a lot of +#' roxygen comments and each of them is a top level expresion, checking is +#' very expensive. +#' @param pd A top-level nest. +#' @details +#' Because we process in blocks of expressions for speed, a cached expression +#' will always end up in a block that won't be styled again (usual case), unless +#' it's on a line where multiple expressions sit and at least one is not styled +#' (exception). +#' +#' **usual case: All other expressions in a block are cached** +#' +#' Cached expressiond don't need to be transformed with `transformers` in +#' [parse_transform_serialize_r_block()], we simply return `text` for the top +#' level token. For that +#' reason, the nested parse table can, at the rows where these expressions are +#' located, be shallow, i.e. it does not have to contain a child, because it +#' will neither be transformed nor serialized anytime. This function drops all +#' associated tokens except the top-level token for such expressions, which will +#' result in large speed improvements in [compute_parse_data_nested()] because +#' nesting is expensive and will not be done for cached expressions. +#' +#' **exception: Not all other expressions in a block are cached** +#' +#' As described in [cache_find_block()], expressions on the same line are always +#' put into one block. If any element of a block is not cached, the block will +#' be styled as a whole. If the parse table was made shallow (and the top level) +#' expresion is still marked as non-terminal, `text` will never be used in the +#' transformation process and eventually lost. Hence, we must change the top +#' level expression to a terminal. It will act like a comment in the sense that +#' it is a fixed `text`. +#' +#' Because for the usual case, it does not even matter if the cached expression +#' is a terminal or not (because it is not processed), we can safely set +#' `terminal = TRUE` in general. +#' @section Implementation: +#' Because the structure of the parse table is not always "top-level expression +#' first, then children", this function creates a temporary parse table that has +#' this property and then extract the ids and subset the original parse table so +#' it is shallow in the right places. +#' @keywords internal +drop_cached_children <- function(pd) { + + if (cache_is_activated()) { + + pd_parent_first <- pd[order(pd$line1, pd$col1, -pd$line2, -pd$col2, as.integer(pd$terminal)),] + pos_ids_to_keep <- pd_parent_first %>% + split(cumsum(pd_parent_first$parent == 0)) %>% + map(find_pos_id_to_keep) %>% + unlist() %>% + unname() + pd[pd$pos_id %in% pos_ids_to_keep,] + } else { + pd + } + +} + +find_pos_id_to_keep <- function(pd) { + if (pd$is_cached[1]) { + pd$pos_id[1] + } else { + pd$pos_id + } + } + + #' Turn off styling for parts of the code #' #' Using stylerignore markers, you can temporarily turn off styler. See a @@ -137,6 +226,25 @@ add_terminal_token_before <- function(pd_flat) { left_join(pd_flat, ., by = "id") } +#' Initialise variables related to caching +#' +#' @param transformers A list with transformer functions, used to check if +#' the code is cached. +#' @describeIn add_token_terminal Initializes `newlines` and `lag_newlines`. +#' @keywords internal +add_attributes_caching <- function(pd_flat, transformers) { + pd_flat$block <- pd_flat$is_cached <- rep(NA, nrow(pd_flat)) + if (cache_is_activated()) { + pd_flat$is_cached[pd_flat$parent == 0] <- map_lgl( + pd_flat$text[pd_flat$parent == 0], + is_cached, transformers, cache_dir_default() + ) + is_comment <- pd_flat$token == "COMMENT" + pd_flat$is_cached[is_comment] <- rep(FALSE, sum(is_comment)) + } + pd_flat +} + #' @describeIn add_token_terminal Removes column `terimnal_token_before`. Might #' be used to prevent the use of invalidated information, e.g. if tokens were #' added to the nested parse table. @@ -220,13 +328,3 @@ combine_children <- function(child, internal_child) { } bound[order(bound$pos_id), ] } - -#' Get the start right -#' -#' On what line does the first token occur? -#' @param pd_nested A nested parse table. -#' @return The line number on which the first token occurs. -#' @keywords internal -find_start_line <- function(pd_nested) { - pd_nested$line1[1] -} diff --git a/R/nested-to-tree.R b/R/nested-to-tree.R index 294b5d462..dc5af094b 100644 --- a/R/nested-to-tree.R +++ b/R/nested-to-tree.R @@ -30,6 +30,7 @@ create_tree_from_pd_with_default_style_attributes <- function(pd, structure_only #' @return An object of class "Node" and "R6". #' @examples #' if (rlang::is_installed("data.tree")) { +#' cache_deactivate() # keep things simple #' code <- "a <- function(x) { if(x > 1) { 1+1 } else {x} }" #' nested_pd <- styler:::compute_parse_data_nested(code) #' initialized <- styler:::pre_visit(nested_pd, c(default_style_guide_attributes)) diff --git a/R/parse.R b/R/parse.R index 1ed7d0a0e..dc8b40671 100644 --- a/R/parse.R +++ b/R/parse.R @@ -71,11 +71,12 @@ has_crlf_as_first_line_sep <- function(message, initial_text) { #' * A column "child" that contains *nest*s. #' #' @param text A character vector. +#' @inheritParams get_parse_data #' @return A flat parse table #' @importFrom rlang seq2 #' @keywords internal tokenize <- function(text) { - get_parse_data(text, include_text = NA) %>% + get_parse_data(text, include_text = TRUE) %>% ensure_correct_str_txt(text) %>% enhance_mapping_special() } @@ -83,7 +84,9 @@ tokenize <- function(text) { #' Obtain robust parse data #' #' Wrapper around `utils::getParseData(parse(text = text))` that returns a flat -#' parse table. +#' parse table. When caching information should be added, make sure that +#' the cache is activated with `cache_activate()` and both `transformers` and +#' `cache_dir` are non-`NULL`. #' @param text The text to parse. #' @param include_text Passed to [utils::getParseData()] as `includeText`. #' @param ... Other arguments passed to [utils::getParseData()]. @@ -96,6 +99,7 @@ get_parse_data <- function(text, include_text = TRUE, ...) { utils::getParseData(parsed, includeText = include_text), .name_repair = "minimal") %>% add_id_and_short() + parser_version_set(parser_version_find(pd)) pd } diff --git a/R/relevel.R b/R/relevel.R index 5e18ca1c2..249b89081 100644 --- a/R/relevel.R +++ b/R/relevel.R @@ -183,7 +183,10 @@ relocate_eq_assign_nest <- function(pd) { #' Two assignment tokens `EQ_ASSIGN` belong to the same block if they are not #' separated by more than one token. Token between `EQ_ASSIGN` tokens belong #' to the `EQ_ASSIGN` token occurring before them, except the token right before -#' `EQ_ASSING` already belongs to the `EQ_ASSING` after it. +#' `EQ_ASSING` already belongs to the `EQ_ASSING` after it. Note that this +#' notion is unrelated to the column *block* in the parse table, which is used +#' to [parse_transform_serialize_r()] code blocks and leave out the ones that +#' are cached. #' @param pd A parse table. #' @keywords internal find_block_id <- function(pd) { diff --git a/R/serialize.R b/R/serialize.R index 810825d7a..e85b28232 100644 --- a/R/serialize.R +++ b/R/serialize.R @@ -2,11 +2,10 @@ #' #' Collapses a flattened parse table into character vector representation. #' @inheritParams apply_stylerignore -#' @param start_line The line number on which the code starts. #' @keywords internal -serialize_parse_data_flattened <- function(flattened_pd, start_line = 1) { - flattened_pd$lag_newlines[1] <- start_line - 1 +serialize_parse_data_flattened <- function(flattened_pd) { flattened_pd <- apply_stylerignore(flattened_pd) + flattened_pd$lag_newlines[1] <- 0 # resolve start_line elsewhere res <- with( flattened_pd, paste0( diff --git a/R/token-create.R b/R/token-create.R index 233f944ca..0b8d040b2 100644 --- a/R/token-create.R +++ b/R/token-create.R @@ -18,6 +18,10 @@ #' @param terminal Boolean vector indicating whether a token is a terminal or #' not. #' @param child The children of the tokens. +#' @param stylerignore Boolean to indicate if the line should be ignored by +#' styler. +#' @param block The block (of caching) to which the token belongs. An integer. +#' @param is_cached Whether the token is cached already. #' @family token creators #' @keywords internal create_tokens <- function(tokens, @@ -31,7 +35,9 @@ create_tokens <- function(tokens, indents = 0, terminal = TRUE, child = NULL, - stylerignore = FALSE) { + stylerignore = FALSE, + block = NA, + is_cached = NA) { len_text <- length(texts) new_tibble( list( @@ -50,7 +56,9 @@ create_tokens <- function(tokens, indention_ref_pos_id = indention_ref_pos_ids, indent = indents, child = rep(list(child), len_text), - stylerignore = stylerignore + stylerignore = stylerignore, + block = block, + is_cached = is_cached ), nrow = len_text ) diff --git a/R/transform-block.R b/R/transform-block.R new file mode 100644 index 000000000..5c138fd90 --- /dev/null +++ b/R/transform-block.R @@ -0,0 +1,96 @@ +#' Parse, transform and serialize a nested parse table +#' +#' We process blocks of nested parse tables for speed. See [cache_find_block()] +#' for details on how a top level nest is split into blocks. +#' @param pd_nested A block of the nested parse table. +#' @param start_line The line number on which the code starts. +#' @inheritParams apply_transformers +#' @keywords internal +parse_transform_serialize_r_block <- function(pd_nested, + start_line, + transformers) { + if (!all(pd_nested$is_cached, na.rm = TRUE) || !cache_is_activated()) { + transformed_pd <- apply_transformers(pd_nested, transformers) + flattened_pd <- post_visit(transformed_pd, list(extract_terminals)) %>% + enrich_terminals(transformers$use_raw_indention) %>% + apply_ref_indention() %>% + set_regex_indention( + pattern = transformers$reindention$regex_pattern, + target_indention = transformers$reindention$indention, + comments_only = transformers$reindention$comments_only + ) + serialized_transformed_text <- serialize_parse_data_flattened(flattened_pd) + } else { + serialized_transformed_text <- map2( + c(0, find_blank_lines_to_next_expr(pd_nested)[-1] - 1L), + pd_nested$text, + ~ c(rep("", .x), .y) + ) %>% + unlist() + } + c(rep("", start_line - 1), serialized_transformed_text) +} + +#' Find the groups of expressions that should be processed together +#' +#' Every expression is an expression itself, Expressions on same line are in +#' same block. +#' Multiple expressions can sit on one row, e.g. in line comment and commands +#' separated with ";". This creates a problem when processing each expression +#' separately because when putting them together, we need complicated handling +#' of line breaks between them, as it is not apriory clear that there is a line +#' break separating them. To avoid this, we put top level expressions that sit +#' on the same line into one block, so the assumption that there is a line break +#' between each block of expressions holds. +#' @param pd A top level parse table. +#' @details +#' we want to for turning points: +#' - change in cache state is a turning point +#' - expressions that are not on a new line cannot be a turning point. In this +#' case, the turning point is moved to the first expression on the line +#' @param pd A top level nest. +#' @keywords internal +cache_find_block <- function(pd) { + + first_after_cache_state_switch <- pd$is_cached != lag(pd$is_cached, default = !pd$is_cached[1]) + + not_first_on_line <- find_blank_lines_to_next_expr(pd) == 0 + invalid_turning_point_idx <- which( + not_first_on_line & first_after_cache_state_switch + ) + + first_on_line_idx <- which(!not_first_on_line) + valid_replacements <- map_int(invalid_turning_point_idx, function(x) { + last(which(x > first_on_line_idx)) + }) + sort(unique(c( + setdiff(which(first_after_cache_state_switch), invalid_turning_point_idx), + valid_replacements + ))) %>% + unwhich(nrow(pd)) %>% + cumsum() +} + + +#' Find blank lines +#' +#' What number of line breaks lay between the expressions? +#' @param pd_nested A nested parse table. +#' @return The line number on which the first token occurs. +#' @keywords internal +find_blank_lines_to_next_expr <- function(pd_nested) { + pd_nested$line1 - lag(pd_nested$line2, default = 0) +} + +#' Number of lines between cache blocks +#' +#' This is relevant when putting expressions together into a block and preserve +#' blank lines between them. Note that because code does not need to start on +#' line 1, the first element of the output is the number of lines until the +#' first block. +#' @param pd A top level nest. +find_blank_lines_to_next_block <- function(pd) { + block_boundary <- pd$block != lag(pd$block, default = 0) + find_blank_lines_to_next_expr(pd)[block_boundary] +} + diff --git a/R/transform-files.R b/R/transform-files.R index 5ed4bbae4..32a01ecdb 100644 --- a/R/transform-files.R +++ b/R/transform-files.R @@ -78,7 +78,6 @@ make_transformer <- function(transformers, warn_empty = TRUE) { force(transformers) assert_transformers(transformers) - cache_dir <- c("styler", cache_get_name()) assert_R.cache_installation(action = "warn") is_R.cache_installed <- rlang::is_installed("R.cache") @@ -87,11 +86,7 @@ make_transformer <- function(transformers, should_use_cache <- is_R.cache_installed && cache_is_activated() if (should_use_cache) { - use_cache <- R.cache::generateCache( - key = cache_make_key(text, transformers), - dirs = cache_dir - ) %>% - file.exists() + use_cache <- is_cached(text, transformers) } else { use_cache <- FALSE } @@ -105,11 +100,7 @@ make_transformer <- function(transformers, ~. ) if (should_use_cache) { - R.cache::generateCache( - key = cache_make_key(transformed_code, transformers), - dirs = cache_dir - ) %>% - file.create() + cache_write(transformed_code, transformers) } transformed_code } else { @@ -195,32 +186,37 @@ split_roxygen_segments <- function(text, roxygen_examples) { #' @seealso [parse_transform_serialize_roxygen()] #' @importFrom rlang abort #' @keywords internal -parse_transform_serialize_r <- function(text, transformers, warn_empty = TRUE) { +parse_transform_serialize_r <- function(text, + transformers, + warn_empty = TRUE) { text <- assert_text(text) - pd_nested <- compute_parse_data_nested(text) - start_line <- find_start_line(pd_nested) + pd_nested <- compute_parse_data_nested(text, transformers) + + blank_lines_to_next_expr <- find_blank_lines_to_next_block(pd_nested) if (nrow(pd_nested) == 0) { if (warn_empty) { warn("Text to style did not contain any tokens. Returning empty string.") } return("") } - transformed_pd <- apply_transformers(pd_nested, transformers) - flattened_pd <- post_visit(transformed_pd, list(extract_terminals)) %>% - enrich_terminals(transformers$use_raw_indention) %>% - apply_ref_indention() %>% - set_regex_indention( - pattern = transformers$reindention$regex_pattern, - target_indention = transformers$reindention$indention, - comments_only = transformers$reindention$comments_only - ) - serialized_transformed_text <- - serialize_parse_data_flattened(flattened_pd, start_line = start_line) + + text_out <- pd_nested %>% + split(pd_nested$block) %>% + unname() %>% + map2(blank_lines_to_next_expr, + parse_transform_serialize_r_block, + transformers = transformers + ) %>% + unlist() if (can_verify_roundtrip(transformers)) { - verify_roundtrip(text, serialized_transformed_text) + verify_roundtrip(text, text_out) + } + + if (cache_is_activated()) { + cache_by_expression(text_out, transformers) } - serialized_transformed_text + text_out } #' Apply transformers to a parse table diff --git a/R/utils-cache.R b/R/utils-cache.R index 5465c72ed..ca82143cd 100644 --- a/R/utils-cache.R +++ b/R/utils-cache.R @@ -13,11 +13,32 @@ hash_standardize <- function(text) { list() } +#' Check if text is cached +#' +#' This boils down to check if the hash exists at the caching dir as a file. +#' @param text,transformers Passed to [cache_make_key()] to generate a key. +#' @param cache_dir The caching directory relative to the `.Rcache` root to +#' look for a cached value. +#' @keywords internal +is_cached <- function(text, transformers, cache_dir = cache_dir_default()) { + R.cache::generateCache( + key = cache_make_key(text, transformers), + dirs = cache_dir + ) %>% + file.exists() + +} + + #' Make a key for `R.cache` #' #' This is used to determine if caching already corresponds to a style guide. +#' @param text Code to create a cache for. This should be styled text, as the +#' approach used by styler does not cache input, but styled code. +#' @param transformers A list of transformer functions, because we can only +#' know if text is already correct if we know which transformer function it +#' should be styled with. #' @details -#' #' We need to compare: #' #' * text to style. Will be passed to hash function as is. @@ -98,6 +119,28 @@ cache_is_activated <- function(cache_name = NULL) { } } +#' Cache text +#' +#' Splits `text` into expressions and adds these to the cache. Note that +#' comments are **not** cached because caching them is too expensive. +#' @param text A character vector with one or more expressions. +#' @param transformers The transformers. +#' @keywords internal +cache_by_expression <- function(text, transformers) { + expressions <- parse(text = text, keep.source = TRUE) %>% + utils::getParseData(includeText = TRUE) + expressions[expressions$parent == 0 & expressions$token != "COMMENT", "text"] %>% + map(~cache_write(.x, transformers = transformers)) +} + +cache_write <- function(text, transformers) { + R.cache::generateCache( + key = cache_make_key(text, transformers), + dirs = cache_dir_default() + ) %>% + file.create() +} + styler_version <- unlist(unname(read.dcf("DESCRIPTION")[, "Version"])) cache_get_name <- function() { @@ -114,3 +157,7 @@ cache_get_or_derive_name <- function(cache_name) { cache_name } +cache_dir_default <- function() { + c("styler", cache_get_name()) +} + diff --git a/R/utils.R b/R/utils.R index d532c0614..3d47445d3 100644 --- a/R/utils.R +++ b/R/utils.R @@ -99,5 +99,11 @@ option_read <- function(x, default = NULL, error_if_not_found = TRUE) { } else { rlang::abort(paste("R option", x, "most be set.")) } +} + +unwhich <- function(x, length) { + x_ <- rep(FALSE, length) + x_[x] <- TRUE + x_ } diff --git a/man/add_cache_block.Rd b/man/add_cache_block.Rd new file mode 100644 index 000000000..16e985b03 --- /dev/null +++ b/man/add_cache_block.Rd @@ -0,0 +1,16 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/nest.R +\name{add_cache_block} +\alias{add_cache_block} +\title{Add the block id to a parse table} +\usage{ +add_cache_block(pd_nested) +} +\arguments{ +\item{pd_nested}{A top level nest.} +} +\description{ +Must be after \code{\link[=nest_parse_data]{nest_parse_data()}} because requires a nested parse table as +input. +} +\keyword{internal} diff --git a/man/add_token_terminal.Rd b/man/add_token_terminal.Rd index fcf41ee3e..6b020f2be 100644 --- a/man/add_token_terminal.Rd +++ b/man/add_token_terminal.Rd @@ -4,6 +4,7 @@ \alias{add_token_terminal} \alias{add_terminal_token_after} \alias{add_terminal_token_before} +\alias{add_attributes_caching} \alias{remove_terminal_token_before_and_after} \title{Add information about previous / next token to each terminal} \usage{ @@ -11,16 +12,25 @@ add_terminal_token_after(pd_flat) add_terminal_token_before(pd_flat) +add_attributes_caching(pd_flat, transformers) + remove_terminal_token_before_and_after(pd_flat) } \arguments{ \item{pd_flat}{A flat parse table.} + +\item{transformers}{A list with transformer functions, used to check if +the code is cached.} } \description{ Add information about previous / next token to each terminal + +Initialise variables related to caching } \section{Functions}{ \itemize{ +\item \code{add_attributes_caching}: Initializes \code{newlines} and \code{lag_newlines}. + \item \code{remove_terminal_token_before_and_after}: Removes column \code{terimnal_token_before}. Might be used to prevent the use of invalidated information, e.g. if tokens were added to the nested parse table. diff --git a/man/cache_by_expression.Rd b/man/cache_by_expression.Rd new file mode 100644 index 000000000..ad1557c75 --- /dev/null +++ b/man/cache_by_expression.Rd @@ -0,0 +1,18 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/utils-cache.R +\name{cache_by_expression} +\alias{cache_by_expression} +\title{Cache text} +\usage{ +cache_by_expression(text, transformers) +} +\arguments{ +\item{text}{A character vector with one or more expressions.} + +\item{transformers}{The transformers.} +} +\description{ +Splits \code{text} into expressions and adds these to the cache. Note that +comments are \strong{not} cached because caching them is too expensive. +} +\keyword{internal} diff --git a/man/cache_find_block.Rd b/man/cache_find_block.Rd new file mode 100644 index 000000000..fbe64379c --- /dev/null +++ b/man/cache_find_block.Rd @@ -0,0 +1,31 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/transform-block.R +\name{cache_find_block} +\alias{cache_find_block} +\title{Find the groups of expressions that should be processed together} +\usage{ +cache_find_block(pd) +} +\arguments{ +\item{pd}{A top level nest.} +} +\description{ +Every expression is an expression itself, Expressions on same line are in +same block. +Multiple expressions can sit on one row, e.g. in line comment and commands +separated with ";". This creates a problem when processing each expression +separately because when putting them together, we need complicated handling +of line breaks between them, as it is not apriory clear that there is a line +break separating them. To avoid this, we put top level expressions that sit +on the same line into one block, so the assumption that there is a line break +between each block of expressions holds. +} +\details{ +we want to for turning points: +\itemize{ +\item change in cache state is a turning point +\item expressions that are not on a new line cannot be a turning point. In this +case, the turning point is moved to the first expression on the line +} +} +\keyword{internal} diff --git a/man/cache_make_key.Rd b/man/cache_make_key.Rd index a9e88cf4d..b94616cc1 100644 --- a/man/cache_make_key.Rd +++ b/man/cache_make_key.Rd @@ -6,6 +6,14 @@ \usage{ cache_make_key(text, transformers) } +\arguments{ +\item{text}{Code to create a cache for. This should be styled text, as the +approach used by styler does not cache input, but styled code.} + +\item{transformers}{A list of transformer functions, because we can only +know if text is already correct if we know which transformer function it +should be styled with.} +} \description{ This is used to determine if caching already corresponds to a style guide. } diff --git a/man/compute_parse_data_nested.Rd b/man/compute_parse_data_nested.Rd index 240821ca7..fe93bbc11 100644 --- a/man/compute_parse_data_nested.Rd +++ b/man/compute_parse_data_nested.Rd @@ -4,7 +4,7 @@ \alias{compute_parse_data_nested} \title{Obtain a nested parse table from a character vector} \usage{ -compute_parse_data_nested(text) +compute_parse_data_nested(text, transformers) } \arguments{ \item{text}{A character vector to parse.} diff --git a/man/create_node_from_nested_root.Rd b/man/create_node_from_nested_root.Rd index 1c30750e9..4177ac4ac 100644 --- a/man/create_node_from_nested_root.Rd +++ b/man/create_node_from_nested_root.Rd @@ -22,6 +22,7 @@ at once. } \examples{ if (rlang::is_installed("data.tree")) { + cache_deactivate() # keep things simple code <- "a <- function(x) { if(x > 1) { 1+1 } else {x} }" nested_pd <- styler:::compute_parse_data_nested(code) initialized <- styler:::pre_visit(nested_pd, c(default_style_guide_attributes)) diff --git a/man/create_tokens.Rd b/man/create_tokens.Rd index aaee4c921..989590f9e 100644 --- a/man/create_tokens.Rd +++ b/man/create_tokens.Rd @@ -16,7 +16,9 @@ create_tokens( indents = 0, terminal = TRUE, child = NULL, - stylerignore = FALSE + stylerignore = FALSE, + block = NA, + is_cached = NA ) } \arguments{ @@ -47,6 +49,13 @@ corresponding to the tokens.} not.} \item{child}{The children of the tokens.} + +\item{stylerignore}{Boolean to indicate if the line should be ignored by +styler.} + +\item{block}{The block (of caching) to which the token belongs. An integer.} + +\item{is_cached}{Whether the token is cached already.} } \description{ Creates a terminal token represented as (a row of) a parse table. diff --git a/man/drop_cached_children.Rd b/man/drop_cached_children.Rd new file mode 100644 index 000000000..ded1498c1 --- /dev/null +++ b/man/drop_cached_children.Rd @@ -0,0 +1,57 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/nest.R +\name{drop_cached_children} +\alias{drop_cached_children} +\title{Drop all children of a top level expression that are cached} +\usage{ +drop_cached_children(pd) +} +\arguments{ +\item{pd}{A top-level nest.} +} +\description{ +Note that we do cache top-level comments. Because package code has a lot of +roxygen comments and each of them is a top level expresion, checking is +very expensive. +} +\details{ +Because we process in blocks of expressions for speed, a cached expression +will always end up in a block that won't be styled again (usual case), unless +it's on a line where multiple expressions sit and at least one is not styled +(exception). + +\strong{usual case: All other expressions in a block are cached} + +Cached expressiond don't need to be transformed with \code{transformers} in +\code{\link[=parse_transform_serialize_r_block]{parse_transform_serialize_r_block()}}, we simply return \code{text} for the top +level token. For that +reason, the nested parse table can, at the rows where these expressions are +located, be shallow, i.e. it does not have to contain a child, because it +will neither be transformed nor serialized anytime. This function drops all +associated tokens except the top-level token for such expressions, which will +result in large speed improvements in \code{\link[=compute_parse_data_nested]{compute_parse_data_nested()}} because +nesting is expensive and will not be done for cached expressions. + +\strong{exception: Not all other expressions in a block are cached} + +As described in \code{\link[=cache_find_block]{cache_find_block()}}, expressions on the same line are always +put into one block. If any element of a block is not cached, the block will +be styled as a whole. If the parse table was made shallow (and the top level) +expresion is still marked as non-terminal, \code{text} will never be used in the +transformation process and eventually lost. Hence, we must change the top +level expression to a terminal. It will act like a comment in the sense that +it is a fixed \code{text}. + +Because for the usual case, it does not even matter if the cached expression +is a terminal or not (because it is not processed), we can safely set +\code{terminal = TRUE} in general. +} +\section{Implementation}{ + +Because the structure of the parse table is not always "top-level expression +first, then children", this function creates a temporary parse table that has +this property and then extract the ids and subset the original parse table so +it is shallow in the right places. +} + +\keyword{internal} diff --git a/man/find_blank_lines_to_next_block.Rd b/man/find_blank_lines_to_next_block.Rd new file mode 100644 index 000000000..b8c8bdafa --- /dev/null +++ b/man/find_blank_lines_to_next_block.Rd @@ -0,0 +1,17 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/transform-block.R +\name{find_blank_lines_to_next_block} +\alias{find_blank_lines_to_next_block} +\title{Number of lines between cache blocks} +\usage{ +find_blank_lines_to_next_block(pd) +} +\arguments{ +\item{pd}{A top level nest.} +} +\description{ +This is relevant when putting expressions together into a block and preserve +blank lines between them. Note that because code does not need to start on +line 1, the first element of the output is the number of lines until the +first block. +} diff --git a/man/find_blank_lines_to_next_expr.Rd b/man/find_blank_lines_to_next_expr.Rd new file mode 100644 index 000000000..e03ae2e37 --- /dev/null +++ b/man/find_blank_lines_to_next_expr.Rd @@ -0,0 +1,18 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/transform-block.R +\name{find_blank_lines_to_next_expr} +\alias{find_blank_lines_to_next_expr} +\title{Find blank lines} +\usage{ +find_blank_lines_to_next_expr(pd_nested) +} +\arguments{ +\item{pd_nested}{A nested parse table.} +} +\value{ +The line number on which the first token occurs. +} +\description{ +What number of line breaks lay between the expressions? +} +\keyword{internal} diff --git a/man/find_block_id.Rd b/man/find_block_id.Rd index c5728a7e5..2635a8420 100644 --- a/man/find_block_id.Rd +++ b/man/find_block_id.Rd @@ -13,6 +13,9 @@ find_block_id(pd) Two assignment tokens \code{EQ_ASSIGN} belong to the same block if they are not separated by more than one token. Token between \code{EQ_ASSIGN} tokens belong to the \code{EQ_ASSIGN} token occurring before them, except the token right before -\code{EQ_ASSING} already belongs to the \code{EQ_ASSING} after it. +\code{EQ_ASSING} already belongs to the \code{EQ_ASSING} after it. Note that this +notion is unrelated to the column \emph{block} in the parse table, which is used +to \code{\link[=parse_transform_serialize_r]{parse_transform_serialize_r()}} code blocks and leave out the ones that +are cached. } \keyword{internal} diff --git a/man/find_start_line.Rd b/man/find_start_line.Rd deleted file mode 100644 index a88ed7c52..000000000 --- a/man/find_start_line.Rd +++ /dev/null @@ -1,18 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/nest.R -\name{find_start_line} -\alias{find_start_line} -\title{Get the start right} -\usage{ -find_start_line(pd_nested) -} -\arguments{ -\item{pd_nested}{A nested parse table.} -} -\value{ -The line number on which the first token occurs. -} -\description{ -On what line does the first token occur? -} -\keyword{internal} diff --git a/man/get_parse_data.Rd b/man/get_parse_data.Rd index d83160d1c..7b02964ae 100644 --- a/man/get_parse_data.Rd +++ b/man/get_parse_data.Rd @@ -15,6 +15,8 @@ get_parse_data(text, include_text = TRUE, ...) } \description{ Wrapper around \code{utils::getParseData(parse(text = text))} that returns a flat -parse table. +parse table. When caching information should be added, make sure that +the cache is activated with \code{cache_activate()} and both \code{transformers} and +\code{cache_dir} are non-\code{NULL}. } \keyword{internal} diff --git a/man/is_cached.Rd b/man/is_cached.Rd new file mode 100644 index 000000000..6cf4ad076 --- /dev/null +++ b/man/is_cached.Rd @@ -0,0 +1,18 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/utils-cache.R +\name{is_cached} +\alias{is_cached} +\title{Check if text is cached} +\usage{ +is_cached(text, transformers, cache_dir = cache_dir_default()) +} +\arguments{ +\item{text, transformers}{Passed to \code{\link[=cache_make_key]{cache_make_key()}} to generate a key.} + +\item{cache_dir}{The caching directory relative to the \code{.Rcache} root to +look for a cached value.} +} +\description{ +This boils down to check if the hash exists at the caching dir as a file. +} +\keyword{internal} diff --git a/man/parse_transform_serialize_r_block.Rd b/man/parse_transform_serialize_r_block.Rd new file mode 100644 index 000000000..6383cfaef --- /dev/null +++ b/man/parse_transform_serialize_r_block.Rd @@ -0,0 +1,20 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/transform-block.R +\name{parse_transform_serialize_r_block} +\alias{parse_transform_serialize_r_block} +\title{Parse, transform and serialize a nested parse table} +\usage{ +parse_transform_serialize_r_block(pd_nested, start_line, transformers) +} +\arguments{ +\item{pd_nested}{A block of the nested parse table.} + +\item{start_line}{The line number on which the code starts.} + +\item{transformers}{A list of \emph{named} transformer functions} +} +\description{ +We process blocks of nested parse tables for speed. See \code{\link[=cache_find_block]{cache_find_block()}} +for details on how a top level nest is split into blocks. +} +\keyword{internal} diff --git a/man/serialize_parse_data_flattened.Rd b/man/serialize_parse_data_flattened.Rd index 6efda30f0..a59ad9657 100644 --- a/man/serialize_parse_data_flattened.Rd +++ b/man/serialize_parse_data_flattened.Rd @@ -4,12 +4,10 @@ \alias{serialize_parse_data_flattened} \title{Serialize flattened parse data} \usage{ -serialize_parse_data_flattened(flattened_pd, start_line = 1) +serialize_parse_data_flattened(flattened_pd) } \arguments{ \item{flattened_pd}{A flattened parse table.} - -\item{start_line}{The line number on which the code starts.} } \description{ Collapses a flattened parse table into character vector representation. diff --git a/tests/testthat/alignment/named-in_tree b/tests/testthat/alignment/named-in_tree index 1ba7abf96..37a1044f3 100644 --- a/tests/testthat/alignment/named-in_tree +++ b/tests/testthat/alignment/named-in_tree @@ -1,704 +1,704 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--COMMENT: # alg [0/0] {1} - ¦--expr: [1/0] {2} - ¦ ¦--expr: [0/0] {4} + ¦--expr: call( [1/0] {2} + ¦ ¦--expr: call [0/0] {4} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {3} ¦ ¦--'(': ( [0/2] {5} ¦ ¦--SYMBOL_SUB: x [1/3] {6} ¦ ¦--EQ_SUB: = [0/1] {7} - ¦ ¦--expr: [0/0] {9} + ¦ ¦--expr: 1 [0/0] {9} ¦ ¦ °--NUM_CONST: 1 [0/0] {8} ¦ ¦--',': , [0/1] {10} ¦ ¦--SYMBOL_SUB: kdd [0/2] {11} ¦ ¦--EQ_SUB: = [0/2] {12} - ¦ ¦--expr: [0/0] {14} + ¦ ¦--expr: 2 [0/0] {14} ¦ ¦ °--NUM_CONST: 2 [0/0] {13} ¦ ¦--',': , [0/2] {15} ¦ ¦--SYMBOL_SUB: xy [1/2] {16} ¦ ¦--EQ_SUB: = [0/1] {17} - ¦ ¦--expr: [0/0] {19} + ¦ ¦--expr: 2 [0/0] {19} ¦ ¦ °--NUM_CONST: 2 [0/0] {18} ¦ ¦--',': , [0/1] {20} ¦ ¦--SYMBOL_SUB: n [0/4] {21} ¦ ¦--EQ_SUB: = [0/1] {22} - ¦ ¦--expr: [0/0] {24} + ¦ ¦--expr: 33 [0/0] {24} ¦ ¦ °--NUM_CONST: 33 [0/0] {23} ¦ ¦--',': , [0/0] {25} ¦ °--')': ) [1/0] {26} ¦--COMMENT: # wit [2/0] {27} - ¦--expr: [1/0] {28} - ¦ ¦--expr: [0/0] {30} + ¦--expr: call( [1/0] {28} + ¦ ¦--expr: call [0/0] {30} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {29} ¦ ¦--'(': ( [0/2] {31} ¦ ¦--SYMBOL_SUB: x [1/3] {32} ¦ ¦--EQ_SUB: = [0/1] {33} - ¦ ¦--expr: [0/0] {35} + ¦ ¦--expr: 1 [0/0] {35} ¦ ¦ °--NUM_CONST: 1 [0/0] {34} ¦ ¦--',': , [0/1] {36} ¦ ¦--SYMBOL_SUB: kdd [0/2] {37} ¦ ¦--EQ_SUB: = [0/2] {38} - ¦ ¦--expr: [0/0] {40} + ¦ ¦--expr: 2 [0/0] {40} ¦ ¦ °--NUM_CONST: 2 [0/0] {39} ¦ ¦--',': , [0/2] {41} ¦ ¦--SYMBOL_SUB: xy [1/2] {42} ¦ ¦--EQ_SUB: = [0/1] {43} - ¦ ¦--expr: [0/0] {45} + ¦ ¦--expr: 2 [0/0] {45} ¦ ¦ °--NUM_CONST: 2 [0/0] {44} ¦ ¦--',': , [0/1] {46} ¦ ¦--SYMBOL_SUB: n [0/4] {47} ¦ ¦--EQ_SUB: = [0/1] {48} - ¦ ¦--expr: [0/0] {50} + ¦ ¦--expr: 33 [0/0] {50} ¦ ¦ °--NUM_CONST: 33 [0/0] {49} ¦ °--')': ) [1/0] {51} ¦--COMMENT: # alg [2/0] {52} - ¦--expr: [1/0] {53} - ¦ ¦--expr: [0/0] {55} + ¦--expr: call( [1/0] {53} + ¦ ¦--expr: call [0/0] {55} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {54} ¦ ¦--'(': ( [0/2] {56} ¦ ¦--SYMBOL_SUB: x [1/2] {57} ¦ ¦--EQ_SUB: = [0/1] {58} - ¦ ¦--expr: [0/0] {60} + ¦ ¦--expr: 1 [0/0] {60} ¦ ¦ °--NUM_CONST: 1 [0/0] {59} ¦ ¦--',': , [0/1] {61} ¦ ¦--SYMBOL_SUB: kdd [0/2] {62} ¦ ¦--EQ_SUB: = [0/2] {63} - ¦ ¦--expr: [0/0] {65} + ¦ ¦--expr: 2 [0/0] {65} ¦ ¦ °--NUM_CONST: 2 [0/0] {64} ¦ ¦--',': , [0/2] {66} ¦ ¦--SYMBOL_SUB: xy [1/1] {67} ¦ ¦--EQ_SUB: = [0/1] {68} - ¦ ¦--expr: [0/0] {70} + ¦ ¦--expr: 2 [0/0] {70} ¦ ¦ °--NUM_CONST: 2 [0/0] {69} ¦ ¦--',': , [0/1] {71} ¦ ¦--SYMBOL_SUB: n [0/4] {72} ¦ ¦--EQ_SUB: = [0/1] {73} - ¦ ¦--expr: [0/0] {75} + ¦ ¦--expr: 33 [0/0] {75} ¦ ¦ °--NUM_CONST: 33 [0/0] {74} ¦ ¦--',': , [0/0] {76} ¦ °--')': ) [1/0] {77} ¦--COMMENT: # alg [2/0] {78} - ¦--expr: [1/0] {79} - ¦ ¦--expr: [0/0] {81} + ¦--expr: call( [1/0] {79} + ¦ ¦--expr: call [0/0] {81} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {80} ¦ ¦--'(': ( [0/2] {82} ¦ ¦--SYMBOL_SUB: x [1/2] {83} ¦ ¦--EQ_SUB: = [0/1] {84} - ¦ ¦--expr: [0/0] {86} + ¦ ¦--expr: 1 [0/0] {86} ¦ ¦ °--NUM_CONST: 1 [0/0] {85} ¦ ¦--',': , [0/1] {87} ¦ ¦--SYMBOL_SUB: kdd [0/2] {88} ¦ ¦--EQ_SUB: = [0/2] {89} - ¦ ¦--expr: [0/0] {91} + ¦ ¦--expr: 2 [0/0] {91} ¦ ¦ °--NUM_CONST: 2 [0/0] {90} ¦ ¦--',': , [0/2] {92} ¦ ¦--SYMBOL_SUB: xy [1/1] {93} ¦ ¦--EQ_SUB: = [0/1] {94} - ¦ ¦--expr: [0/0] {96} + ¦ ¦--expr: 2 [0/0] {96} ¦ ¦ °--NUM_CONST: 2 [0/0] {95} ¦ ¦--',': , [0/1] {97} ¦ ¦--SYMBOL_SUB: n [0/4] {98} ¦ ¦--EQ_SUB: = [0/1] {99} - ¦ ¦--expr: [0/0] {101} + ¦ ¦--expr: 33 [0/0] {101} ¦ ¦ °--NUM_CONST: 33 [0/0] {100} ¦ ¦--',': , [0/0] {102} ¦ °--')': ) [1/0] {103} ¦--COMMENT: # alg [2/0] {104} - ¦--expr: [1/0] {105} - ¦ ¦--expr: [0/0] {107} + ¦--expr: call( [1/0] {105} + ¦ ¦--expr: call [0/0] {107} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {106} ¦ ¦--'(': ( [0/2] {108} ¦ ¦--SYMBOL_SUB: x [1/2] {109} ¦ ¦--EQ_SUB: = [0/0] {110} - ¦ ¦--expr: [0/0] {112} + ¦ ¦--expr: 1 [0/0] {112} ¦ ¦ °--NUM_CONST: 1 [0/0] {111} ¦ ¦--',': , [0/3] {113} ¦ ¦--SYMBOL_SUB: kdd [0/2] {114} ¦ ¦--EQ_SUB: = [0/2] {115} - ¦ ¦--expr: [0/0] {117} + ¦ ¦--expr: 2 [0/0] {117} ¦ ¦ °--NUM_CONST: 2 [0/0] {116} ¦ ¦--',': , [0/2] {118} ¦ ¦--SYMBOL_SUB: xy [1/1] {119} ¦ ¦--EQ_SUB: = [0/0] {120} - ¦ ¦--expr: [0/0] {122} + ¦ ¦--expr: 2 [0/0] {122} ¦ ¦ °--NUM_CONST: 2 [0/0] {121} ¦ ¦--',': , [0/3] {123} ¦ ¦--SYMBOL_SUB: n [0/4] {124} ¦ ¦--EQ_SUB: = [0/1] {125} - ¦ ¦--expr: [0/0] {127} + ¦ ¦--expr: 33 [0/0] {127} ¦ ¦ °--NUM_CONST: 33 [0/0] {126} ¦ ¦--',': , [0/0] {128} ¦ °--')': ) [1/0] {129} ¦--COMMENT: # alg [2/0] {130} - ¦--expr: [1/0] {131} - ¦ ¦--expr: [0/0] {133} + ¦--expr: call( [1/0] {131} + ¦ ¦--expr: call [0/0] {133} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {132} ¦ ¦--'(': ( [0/2] {134} ¦ ¦--SYMBOL_SUB: x [1/2] {135} ¦ ¦--EQ_SUB: = [0/1] {136} - ¦ ¦--expr: [0/0] {138} + ¦ ¦--expr: 1 [0/0] {138} ¦ ¦ °--NUM_CONST: 1 [0/0] {137} ¦ ¦--',': , [0/3] {139} ¦ ¦--SYMBOL_SUB: kdd [0/2] {140} ¦ ¦--EQ_SUB: = [0/2] {141} - ¦ ¦--expr: [0/0] {143} + ¦ ¦--expr: 2 [0/0] {143} ¦ ¦ °--NUM_CONST: 2 [0/0] {142} ¦ ¦--',': , [0/2] {144} ¦ ¦--SYMBOL_SUB: xy [1/1] {145} ¦ ¦--EQ_SUB: = [0/1] {146} - ¦ ¦--expr: [0/0] {148} + ¦ ¦--expr: 2 [0/0] {148} ¦ ¦ °--NUM_CONST: 2 [0/0] {147} ¦ ¦--',': , [0/1] {149} ¦ ¦--SYMBOL_SUB: n [0/1] {150} ¦ ¦--EQ_SUB: = [0/1] {151} - ¦ ¦--expr: [0/0] {153} + ¦ ¦--expr: 33 [0/0] {153} ¦ ¦ °--NUM_CONST: 33 [0/0] {152} ¦ ¦--',': , [0/0] {154} ¦ °--')': ) [1/0] {155} ¦--COMMENT: # alg [2/0] {156} - ¦--expr: [1/0] {157} - ¦ ¦--expr: [0/0] {159} + ¦--expr: call( [1/0] {157} + ¦ ¦--expr: call [0/0] {159} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {158} ¦ ¦--'(': ( [0/2] {160} ¦ ¦--SYMBOL_SUB: x [1/2] {161} ¦ ¦--EQ_SUB: = [0/2] {162} - ¦ ¦--expr: [0/0] {164} + ¦ ¦--expr: 1 [0/0] {164} ¦ ¦ °--NUM_CONST: 1 [0/0] {163} ¦ ¦--',': , [0/3] {165} ¦ ¦--SYMBOL_SUB: kdd [0/2] {166} ¦ ¦--EQ_SUB: = [0/2] {167} - ¦ ¦--expr: [0/0] {169} + ¦ ¦--expr: 2 [0/0] {169} ¦ ¦ °--NUM_CONST: 2 [0/0] {168} ¦ ¦--',': , [0/2] {170} ¦ ¦--SYMBOL_SUB: xy [1/1] {171} ¦ ¦--EQ_SUB: = [0/1] {172} - ¦ ¦--expr: [0/0] {174} + ¦ ¦--expr: 22 [0/0] {174} ¦ ¦ °--NUM_CONST: 22 [0/0] {173} ¦ ¦--',': , [0/1] {175} ¦ ¦--SYMBOL_SUB: n [0/1] {176} ¦ ¦--EQ_SUB: = [0/1] {177} - ¦ ¦--expr: [0/0] {179} + ¦ ¦--expr: 33 [0/0] {179} ¦ ¦ °--NUM_CONST: 33 [0/0] {178} ¦ ¦--',': , [0/0] {180} ¦ °--')': ) [1/0] {181} ¦--COMMENT: # alg [2/0] {182} - ¦--expr: [1/0] {183} - ¦ ¦--expr: [0/0] {185} + ¦--expr: call( [1/0] {183} + ¦ ¦--expr: call [0/0] {185} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {184} ¦ ¦--'(': ( [0/2] {186} ¦ ¦--SYMBOL_SUB: x [1/2] {187} ¦ ¦--EQ_SUB: = [0/1] {188} - ¦ ¦--expr: [0/0] {190} + ¦ ¦--expr: 1 [0/0] {190} ¦ ¦ °--NUM_CONST: 1 [0/0] {189} ¦ ¦--',': , [0/1] {191} ¦ ¦--SYMBOL_SUB: d [0/1] {192} ¦ ¦--EQ_SUB: = [0/1] {193} - ¦ ¦--expr: [0/0] {195} + ¦ ¦--expr: 2 [0/0] {195} ¦ ¦ °--NUM_CONST: 2 [0/0] {194} ¦ ¦--',': , [0/2] {196} ¦ ¦--SYMBOL_SUB: xy [1/1] {197} ¦ ¦--EQ_SUB: = [0/1] {198} - ¦ ¦--expr: [0/0] {200} + ¦ ¦--expr: 22 [0/0] {200} ¦ ¦ °--NUM_CONST: 22 [0/0] {199} ¦ ¦--',': , [0/1] {201} ¦ ¦--SYMBOL_SUB: n [0/1] {202} ¦ ¦--EQ_SUB: = [0/1] {203} - ¦ ¦--expr: [0/0] {205} + ¦ ¦--expr: 33 [0/0] {205} ¦ ¦ °--NUM_CONST: 33 [0/0] {204} ¦ ¦--',': , [0/0] {206} ¦ °--')': ) [1/0] {207} ¦--COMMENT: # alg [3/0] {208} - ¦--expr: [1/0] {209} - ¦ ¦--expr: [0/0] {211} + ¦--expr: call( [1/0] {209} + ¦ ¦--expr: call [0/0] {211} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {210} ¦ ¦--'(': ( [0/2] {212} ¦ ¦--SYMBOL_SUB: x [1/2] {213} ¦ ¦--EQ_SUB: = [0/1] {214} - ¦ ¦--expr: [0/0] {216} + ¦ ¦--expr: 1 [0/0] {216} ¦ ¦ °--NUM_CONST: 1 [0/0] {215} ¦ ¦--',': , [0/3] {217} ¦ ¦--SYMBOL_SUB: kdd [0/2] {218} ¦ ¦--EQ_SUB: = [0/2] {219} - ¦ ¦--expr: [0/0] {221} + ¦ ¦--expr: 2 [0/0] {221} ¦ ¦ °--NUM_CONST: 2 [0/0] {220} ¦ ¦--',': , [0/1] {222} ¦ ¦--SYMBOL_SUB: k [0/1] {223} ¦ ¦--EQ_SUB: = [0/1] {224} - ¦ ¦--expr: [0/0] {226} + ¦ ¦--expr: "abc" [0/0] {226} ¦ ¦ °--STR_CONST: "abc" [0/0] {225} ¦ ¦--',': , [0/2] {227} ¦ ¦--SYMBOL_SUB: xy [1/1] {228} ¦ ¦--EQ_SUB: = [0/1] {229} - ¦ ¦--expr: [0/0] {231} + ¦ ¦--expr: 2 [0/0] {231} ¦ ¦ °--NUM_CONST: 2 [0/0] {230} ¦ ¦--',': , [0/3] {232} ¦ ¦--SYMBOL_SUB: n [0/4] {233} ¦ ¦--EQ_SUB: = [0/1] {234} - ¦ ¦--expr: [0/0] {236} + ¦ ¦--expr: 33 [0/0] {236} ¦ ¦ °--NUM_CONST: 33 [0/0] {235} ¦ ¦--',': , [0/1] {237} ¦ ¦--SYMBOL_SUB: z [0/1] {238} ¦ ¦--EQ_SUB: = [0/1] {239} - ¦ ¦--expr: [0/0] {241} + ¦ ¦--expr: "333" [0/0] {241} ¦ ¦ °--STR_CONST: "333" [0/0] {240} ¦ °--')': ) [1/0] {242} ¦--COMMENT: # alg [3/0] {243} - ¦--expr: [1/0] {244} - ¦ ¦--expr: [0/0] {246} + ¦--expr: call( [1/0] {244} + ¦ ¦--expr: call [0/0] {246} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {245} ¦ ¦--'(': ( [0/2] {247} ¦ ¦--SYMBOL_SUB: x [1/2] {248} ¦ ¦--EQ_SUB: = [0/1] {249} - ¦ ¦--expr: [0/0] {251} + ¦ ¦--expr: 1 [0/0] {251} ¦ ¦ °--NUM_CONST: 1 [0/0] {250} ¦ ¦--',': , [0/2] {252} ¦ ¦--SYMBOL_SUB: xy [1/1] {253} ¦ ¦--EQ_SUB: = [0/1] {254} - ¦ ¦--expr: [0/0] {256} + ¦ ¦--expr: 2 [0/0] {256} ¦ ¦ °--NUM_CONST: 2 [0/0] {255} ¦ ¦--',': , [0/3] {257} ¦ ¦--SYMBOL_SUB: n [0/4] {258} ¦ ¦--EQ_SUB: = [0/1] {259} - ¦ ¦--expr: [0/0] {261} + ¦ ¦--expr: 33 [0/0] {261} ¦ ¦ °--NUM_CONST: 33 [0/0] {260} ¦ ¦--',': , [0/1] {262} ¦ ¦--SYMBOL_SUB: z [0/1] {263} ¦ ¦--EQ_SUB: = [0/1] {264} - ¦ ¦--expr: [0/0] {266} + ¦ ¦--expr: "333" [0/0] {266} ¦ ¦ °--STR_CONST: "333" [0/0] {265} ¦ °--')': ) [1/0] {267} ¦--COMMENT: # alg [2/0] {268} - ¦--expr: [1/0] {269} - ¦ ¦--expr: [0/0] {271} + ¦--expr: call( [1/0] {269} + ¦ ¦--expr: call [0/0] {271} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {270} ¦ ¦--'(': ( [0/2] {272} ¦ ¦--SYMBOL_SUB: x [1/2] {273} ¦ ¦--EQ_SUB: = [0/1] {274} - ¦ ¦--expr: [0/0] {276} + ¦ ¦--expr: 1 [0/0] {276} ¦ ¦ °--NUM_CONST: 1 [0/0] {275} ¦ ¦--',': , [0/1] {277} ¦ ¦--SYMBOL_SUB: n [0/1] {278} ¦ ¦--EQ_SUB: = [0/1] {279} - ¦ ¦--expr: [0/0] {281} + ¦ ¦--expr: 33 [0/0] {281} ¦ ¦ °--NUM_CONST: 33 [0/0] {280} ¦ ¦--',': , [0/1] {282} ¦ ¦--SYMBOL_SUB: z [0/1] {283} ¦ ¦--EQ_SUB: = [0/1] {284} - ¦ ¦--expr: [0/0] {286} + ¦ ¦--expr: "333" [0/0] {286} ¦ ¦ °--STR_CONST: "333" [0/0] {285} ¦ ¦--',': , [0/2] {287} ¦ ¦--SYMBOL_SUB: xy [2/1] {288} ¦ ¦--EQ_SUB: = [0/1] {289} - ¦ ¦--expr: [0/0] {291} + ¦ ¦--expr: 2 [0/0] {291} ¦ ¦ °--NUM_CONST: 2 [0/0] {290} ¦ ¦--',': , [0/0] {292} ¦ °--')': ) [1/0] {293} ¦--COMMENT: # ali [2/0] {294} - ¦--expr: [1/0] {295} - ¦ ¦--expr: [0/0] {297} + ¦--expr: call( [1/0] {295} + ¦ ¦--expr: call [0/0] {297} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {296} ¦ ¦--'(': ( [0/2] {298} ¦ ¦--SYMBOL_SUB: k [1/1] {299} ¦ ¦--EQ_SUB: = [0/2] {300} - ¦ ¦--expr: [0/0] {301} - ¦ ¦ ¦--expr: [0/0] {303} + ¦ ¦--expr: ff("p [0/0] {301} + ¦ ¦ ¦--expr: ff [0/0] {303} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: ff [0/0] {302} ¦ ¦ ¦--'(': ( [0/0] {304} - ¦ ¦ ¦--expr: [0/0] {306} + ¦ ¦ ¦--expr: "pk" [0/0] {306} ¦ ¦ ¦ °--STR_CONST: "pk" [0/0] {305} ¦ ¦ °--')': ) [0/0] {307} ¦ ¦--',': , [0/1] {308} ¦ ¦--SYMBOL_SUB: k [0/2] {309} ¦ ¦--EQ_SUB: = [0/1] {310} - ¦ ¦--expr: [0/0] {312} + ¦ ¦--expr: 3 [0/0] {312} ¦ ¦ °--NUM_CONST: 3 [0/0] {311} ¦ ¦--',': , [0/2] {313} ¦ ¦--SYMBOL_SUB: b [1/1] {314} ¦ ¦--EQ_SUB: = [0/1] {315} - ¦ ¦--expr: [0/0] {316} - ¦ ¦ ¦--expr: [0/0] {318} + ¦ ¦--expr: f(-g) [0/0] {316} + ¦ ¦ ¦--expr: f [0/0] {318} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: f [0/0] {317} ¦ ¦ ¦--'(': ( [0/0] {319} - ¦ ¦ ¦--expr: [0/0] {320} + ¦ ¦ ¦--expr: -g [0/0] {320} ¦ ¦ ¦ ¦--'-': - [0/0] {321} - ¦ ¦ ¦ °--expr: [0/0] {323} + ¦ ¦ ¦ °--expr: g [0/0] {323} ¦ ¦ ¦ °--SYMBOL: g [0/0] {322} ¦ ¦ °--')': ) [0/0] {324} ¦ ¦--',': , [0/5] {325} - ¦ ¦--expr: [0/0] {326} - ¦ ¦ ¦--expr: [0/1] {328} + ¦ ¦--expr: 22 + [0/0] {326} + ¦ ¦ ¦--expr: 22 [0/1] {328} ¦ ¦ ¦ °--NUM_CONST: 22 [0/0] {327} ¦ ¦ ¦--'+': + [0/1] {329} - ¦ ¦ °--expr: [0/0] {331} + ¦ ¦ °--expr: 1 [0/0] {331} ¦ ¦ °--NUM_CONST: 1 [0/0] {330} ¦ ¦--',': , [0/2] {332} - ¦ ¦--expr: [1/0] {334} + ¦ ¦--expr: 44 [1/0] {334} ¦ ¦ °--NUM_CONST: 44 [0/0] {333} ¦ ¦--',': , [0/15] {335} - ¦ ¦--expr: [0/0] {337} + ¦ ¦--expr: 323 [0/0] {337} ¦ ¦ °--NUM_CONST: 323 [0/0] {336} ¦ °--')': ) [1/0] {338} ¦--COMMENT: # ali [2/0] {339} - ¦--expr: [1/0] {340} - ¦ ¦--expr: [0/0] {342} + ¦--expr: call( [1/0] {340} + ¦ ¦--expr: call [0/0] {342} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {341} ¦ ¦--'(': ( [0/2] {343} ¦ ¦--SYMBOL_SUB: k [1/1] {344} ¦ ¦--EQ_SUB: = [0/2] {345} - ¦ ¦--expr: [0/0] {346} - ¦ ¦ ¦--expr: [0/0] {348} + ¦ ¦--expr: ff("p [0/0] {346} + ¦ ¦ ¦--expr: ff [0/0] {348} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: ff [0/0] {347} ¦ ¦ ¦--'(': ( [0/0] {349} - ¦ ¦ ¦--expr: [0/0] {351} + ¦ ¦ ¦--expr: "pk" [0/0] {351} ¦ ¦ ¦ °--STR_CONST: "pk" [0/0] {350} ¦ ¦ °--')': ) [0/0] {352} ¦ ¦--',': , [0/1] {353} ¦ ¦--SYMBOL_SUB: k [0/2] {354} ¦ ¦--EQ_SUB: = [0/1] {355} - ¦ ¦--expr: [0/0] {357} + ¦ ¦--expr: 3 [0/0] {357} ¦ ¦ °--NUM_CONST: 3 [0/0] {356} ¦ ¦--',': , [0/2] {358} ¦ ¦--SYMBOL_SUB: b [1/1] {359} ¦ ¦--EQ_SUB: = [0/1] {360} - ¦ ¦--expr: [0/0] {361} - ¦ ¦ ¦--expr: [0/0] {363} + ¦ ¦--expr: f(-g) [0/0] {361} + ¦ ¦ ¦--expr: f [0/0] {363} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: f [0/0] {362} ¦ ¦ ¦--'(': ( [0/0] {364} - ¦ ¦ ¦--expr: [0/0] {365} + ¦ ¦ ¦--expr: -g [0/0] {365} ¦ ¦ ¦ ¦--'-': - [0/0] {366} - ¦ ¦ ¦ °--expr: [0/0] {368} + ¦ ¦ ¦ °--expr: g [0/0] {368} ¦ ¦ ¦ °--SYMBOL: g [0/0] {367} ¦ ¦ °--')': ) [0/0] {369} ¦ ¦--',': , [0/5] {370} - ¦ ¦--expr: [0/0] {371} - ¦ ¦ ¦--expr: [0/1] {373} + ¦ ¦--expr: 22 + [0/0] {371} + ¦ ¦ ¦--expr: 22 [0/1] {373} ¦ ¦ ¦ °--NUM_CONST: 22 [0/0] {372} ¦ ¦ ¦--'+': + [0/1] {374} - ¦ ¦ °--expr: [0/0] {376} + ¦ ¦ °--expr: 1 [0/0] {376} ¦ ¦ °--NUM_CONST: 1 [0/0] {375} ¦ ¦--',': , [0/2] {377} - ¦ ¦--expr: [1/0] {379} + ¦ ¦--expr: 44 [1/0] {379} ¦ ¦ °--NUM_CONST: 44 [0/0] {378} ¦ ¦--',': , [0/15] {380} - ¦ ¦--expr: [0/0] {382} + ¦ ¦--expr: 323 [0/0] {382} ¦ ¦ °--NUM_CONST: 323 [0/0] {381} ¦ ¦--',': , [0/0] {383} ¦ °--')': ) [1/0] {384} ¦--COMMENT: # no [2/0] {385} - ¦--expr: [1/0] {386} - ¦ ¦--expr: [0/0] {388} + ¦--expr: call( [1/0] {386} + ¦ ¦--expr: call [0/0] {388} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {387} ¦ ¦--'(': ( [0/2] {389} ¦ ¦--SYMBOL_SUB: k [1/1] {390} ¦ ¦--EQ_SUB: = [0/2] {391} - ¦ ¦--expr: [0/0] {392} - ¦ ¦ ¦--expr: [0/0] {394} + ¦ ¦--expr: ff("p [0/0] {392} + ¦ ¦ ¦--expr: ff [0/0] {394} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: ff [0/0] {393} ¦ ¦ ¦--'(': ( [0/0] {395} - ¦ ¦ ¦--expr: [0/0] {397} + ¦ ¦ ¦--expr: "pk" [0/0] {397} ¦ ¦ ¦ °--STR_CONST: "pk" [0/0] {396} ¦ ¦ °--')': ) [0/0] {398} ¦ ¦--',': , [0/1] {399} ¦ ¦--SYMBOL_SUB: k [0/2] {400} ¦ ¦--EQ_SUB: = [0/1] {401} - ¦ ¦--expr: [0/0] {403} + ¦ ¦--expr: 3 [0/0] {403} ¦ ¦ °--NUM_CONST: 3 [0/0] {402} ¦ ¦--',': , [0/2] {404} ¦ ¦--SYMBOL_SUB: b [1/1] {405} ¦ ¦--EQ_SUB: = [0/1] {406} - ¦ ¦--expr: [0/0] {407} - ¦ ¦ ¦--expr: [0/0] {409} + ¦ ¦--expr: f(-g) [0/0] {407} + ¦ ¦ ¦--expr: f [0/0] {409} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: f [0/0] {408} ¦ ¦ ¦--'(': ( [0/0] {410} - ¦ ¦ ¦--expr: [0/0] {411} + ¦ ¦ ¦--expr: -g [0/0] {411} ¦ ¦ ¦ ¦--'-': - [0/0] {412} - ¦ ¦ ¦ °--expr: [0/0] {414} + ¦ ¦ ¦ °--expr: g [0/0] {414} ¦ ¦ ¦ °--SYMBOL: g [0/0] {413} ¦ ¦ °--')': ) [0/0] {415} ¦ ¦--',': , [0/5] {416} - ¦ ¦--expr: [0/0] {417} - ¦ ¦ ¦--expr: [0/1] {419} + ¦ ¦--expr: 22 + [0/0] {417} + ¦ ¦ ¦--expr: 22 [0/1] {419} ¦ ¦ ¦ °--NUM_CONST: 22 [0/0] {418} ¦ ¦ ¦--'+': + [0/1] {420} - ¦ ¦ °--expr: [0/0] {422} + ¦ ¦ °--expr: 1 [0/0] {422} ¦ ¦ °--NUM_CONST: 1 [0/0] {421} ¦ ¦--',': , [0/2] {423} - ¦ ¦--expr: [1/0] {425} + ¦ ¦--expr: 44 [1/0] {425} ¦ ¦ °--NUM_CONST: 44 [0/0] {424} ¦ °--')': ) [1/0] {426} ¦--COMMENT: # ali [2/0] {427} - ¦--expr: [1/0] {428} - ¦ ¦--expr: [0/0] {430} + ¦--expr: call( [1/0] {428} + ¦ ¦--expr: call [0/0] {430} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {429} ¦ ¦--'(': ( [0/2] {431} - ¦ ¦--expr: [1/0] {433} + ¦ ¦--expr: 44 [1/0] {433} ¦ ¦ °--NUM_CONST: 44 [0/0] {432} ¦ ¦--',': , [0/2] {434} ¦ ¦--SYMBOL_SUB: k [1/1] {435} ¦ ¦--EQ_SUB: = [0/2] {436} - ¦ ¦--expr: [0/0] {437} - ¦ ¦ ¦--expr: [0/0] {439} + ¦ ¦--expr: ff("p [0/0] {437} + ¦ ¦ ¦--expr: ff [0/0] {439} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: ff [0/0] {438} ¦ ¦ ¦--'(': ( [0/0] {440} - ¦ ¦ ¦--expr: [0/0] {442} + ¦ ¦ ¦--expr: "pk" [0/0] {442} ¦ ¦ ¦ °--STR_CONST: "pk" [0/0] {441} ¦ ¦ °--')': ) [0/0] {443} ¦ ¦--',': , [0/1] {444} ¦ ¦--SYMBOL_SUB: k [0/2] {445} ¦ ¦--EQ_SUB: = [0/1] {446} - ¦ ¦--expr: [0/0] {448} + ¦ ¦--expr: 3 [0/0] {448} ¦ ¦ °--NUM_CONST: 3 [0/0] {447} ¦ ¦--',': , [0/2] {449} ¦ ¦--SYMBOL_SUB: b [1/1] {450} ¦ ¦--EQ_SUB: = [0/1] {451} - ¦ ¦--expr: [0/0] {452} - ¦ ¦ ¦--expr: [0/0] {454} + ¦ ¦--expr: f(-g) [0/0] {452} + ¦ ¦ ¦--expr: f [0/0] {454} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: f [0/0] {453} ¦ ¦ ¦--'(': ( [0/0] {455} - ¦ ¦ ¦--expr: [0/0] {456} + ¦ ¦ ¦--expr: -g [0/0] {456} ¦ ¦ ¦ ¦--'-': - [0/0] {457} - ¦ ¦ ¦ °--expr: [0/0] {459} + ¦ ¦ ¦ °--expr: g [0/0] {459} ¦ ¦ ¦ °--SYMBOL: g [0/0] {458} ¦ ¦ °--')': ) [0/0] {460} ¦ ¦--',': , [0/5] {461} - ¦ ¦--expr: [0/0] {462} - ¦ ¦ ¦--expr: [0/1] {464} + ¦ ¦--expr: 22 + [0/0] {462} + ¦ ¦ ¦--expr: 22 [0/1] {464} ¦ ¦ ¦ °--NUM_CONST: 22 [0/0] {463} ¦ ¦ ¦--'+': + [0/1] {465} - ¦ ¦ °--expr: [0/0] {467} + ¦ ¦ °--expr: 1 [0/0] {467} ¦ ¦ °--NUM_CONST: 1 [0/0] {466} ¦ ¦--',': , [0/0] {468} ¦ °--')': ) [1/0] {469} ¦--COMMENT: # ali [2/0] {470} - ¦--expr: [1/0] {471} - ¦ ¦--expr: [0/0] {473} + ¦--expr: call( [1/0] {471} + ¦ ¦--expr: call [0/0] {473} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {472} ¦ ¦--'(': ( [0/2] {474} ¦ ¦--SYMBOL_SUB: k [1/1] {475} ¦ ¦--EQ_SUB: = [0/2] {476} - ¦ ¦--expr: [0/0] {477} - ¦ ¦ ¦--expr: [0/0] {479} + ¦ ¦--expr: ff("p [0/0] {477} + ¦ ¦ ¦--expr: ff [0/0] {479} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: ff [0/0] {478} ¦ ¦ ¦--'(': ( [0/0] {480} - ¦ ¦ ¦--expr: [0/0] {482} + ¦ ¦ ¦--expr: "pk" [0/0] {482} ¦ ¦ ¦ °--STR_CONST: "pk" [0/0] {481} ¦ ¦ °--')': ) [0/0] {483} ¦ ¦--',': , [0/1] {484} ¦ ¦--SYMBOL_SUB: k [0/2] {485} ¦ ¦--EQ_SUB: = [0/1] {486} - ¦ ¦--expr: [0/0] {488} + ¦ ¦--expr: 3 [0/0] {488} ¦ ¦ °--NUM_CONST: 3 [0/0] {487} ¦ ¦--',': , [0/2] {489} - ¦ ¦--expr: [1/0] {491} + ¦ ¦--expr: 44 [1/0] {491} ¦ ¦ °--NUM_CONST: 44 [0/0] {490} ¦ ¦--',': , [0/2] {492} ¦ ¦--SYMBOL_SUB: b [1/1] {493} ¦ ¦--EQ_SUB: = [0/1] {494} - ¦ ¦--expr: [0/0] {495} - ¦ ¦ ¦--expr: [0/0] {497} + ¦ ¦--expr: f(-g) [0/0] {495} + ¦ ¦ ¦--expr: f [0/0] {497} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: f [0/0] {496} ¦ ¦ ¦--'(': ( [0/0] {498} - ¦ ¦ ¦--expr: [0/0] {499} + ¦ ¦ ¦--expr: -g [0/0] {499} ¦ ¦ ¦ ¦--'-': - [0/0] {500} - ¦ ¦ ¦ °--expr: [0/0] {502} + ¦ ¦ ¦ °--expr: g [0/0] {502} ¦ ¦ ¦ °--SYMBOL: g [0/0] {501} ¦ ¦ °--')': ) [0/0] {503} ¦ ¦--',': , [0/5] {504} - ¦ ¦--expr: [0/0] {505} - ¦ ¦ ¦--expr: [0/1] {507} + ¦ ¦--expr: 22 + [0/0] {505} + ¦ ¦ ¦--expr: 22 [0/1] {507} ¦ ¦ ¦ °--NUM_CONST: 22 [0/0] {506} ¦ ¦ ¦--'+': + [0/1] {508} - ¦ ¦ °--expr: [0/0] {510} + ¦ ¦ °--expr: 1 [0/0] {510} ¦ ¦ °--NUM_CONST: 1 [0/0] {509} ¦ ¦--',': , [0/0] {511} ¦ °--')': ) [1/0] {512} ¦--COMMENT: # if [4/0] {513} ¦--COMMENT: # not [1/0] {514} - ¦--expr: [1/0] {515} - ¦ ¦--expr: [0/0] {517} + ¦--expr: fell( [1/0] {515} + ¦ ¦--expr: fell [0/0] {517} ¦ ¦ °--SYMBOL_FUNCTION_CALL: fell [0/0] {516} ¦ ¦--'(': ( [0/2] {518} ¦ ¦--SYMBOL_SUB: x [1/1] {519} ¦ ¦--EQ_SUB: = [0/3] {520} - ¦ ¦--expr: [0/0] {522} + ¦ ¦--expr: 1 [0/0] {522} ¦ ¦ °--NUM_CONST: 1 [0/0] {521} ¦ ¦--',': , [0/2] {523} ¦ ¦--SYMBOL_SUB: y [1/1] {524} ¦ ¦--EQ_SUB: = [0/2] {525} - ¦ ¦--expr: [0/0] {527} + ¦ ¦--expr: 23 [0/0] {527} ¦ ¦ °--NUM_CONST: 23 [0/0] {526} ¦ ¦--',': , [0/2] {528} ¦ ¦--SYMBOL_SUB: zz [1/1] {529} ¦ ¦--EQ_SUB: = [0/1] {530} - ¦ ¦--expr: [0/0] {532} + ¦ ¦--expr: NULL [0/0] {532} ¦ ¦ °--NULL_CONST: NULL [0/0] {531} ¦ °--')': ) [1/0] {533} ¦--COMMENT: # ali [2/0] {534} - ¦--expr: [1/0] {535} - ¦ ¦--expr: [0/0] {537} + ¦--expr: fell( [1/0] {535} + ¦ ¦--expr: fell [0/0] {537} ¦ ¦ °--SYMBOL_FUNCTION_CALL: fell [0/0] {536} ¦ ¦--'(': ( [0/2] {538} ¦ ¦--SYMBOL_SUB: x [1/1] {539} ¦ ¦--EQ_SUB: = [0/5] {540} - ¦ ¦--expr: [0/0] {542} + ¦ ¦--expr: 1 [0/0] {542} ¦ ¦ °--NUM_CONST: 1 [0/0] {541} ¦ ¦--',': , [0/2] {543} ¦ ¦--SYMBOL_SUB: y [1/1] {544} ¦ ¦--EQ_SUB: = [0/4] {545} - ¦ ¦--expr: [0/0] {547} + ¦ ¦--expr: 23 [0/0] {547} ¦ ¦ °--NUM_CONST: 23 [0/0] {546} ¦ ¦--',': , [0/2] {548} ¦ ¦--SYMBOL_SUB: zz [1/1] {549} ¦ ¦--EQ_SUB: = [0/1] {550} - ¦ ¦--expr: [0/0] {552} + ¦ ¦--expr: NULL [0/0] {552} ¦ ¦ °--NULL_CONST: NULL [0/0] {551} ¦ °--')': ) [1/0] {553} ¦--COMMENT: # ali [2/0] {554} - ¦--expr: [1/0] {555} - ¦ ¦--expr: [0/0] {557} + ¦--expr: call( [1/0] {555} + ¦ ¦--expr: call [0/0] {557} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {556} ¦ ¦--'(': ( [0/2] {558} ¦ ¦--SYMBOL_SUB: a [1/2] {559} ¦ ¦--EQ_SUB: = [0/2] {560} - ¦ ¦--expr: [0/0] {562} + ¦ ¦--expr: 2 [0/0] {562} ¦ ¦ °--NUM_CONST: 2 [0/0] {561} ¦ ¦--',': , [0/2] {563} ¦ ¦--SYMBOL_SUB: bb [1/1] {564} ¦ ¦--EQ_SUB: = [0/2] {565} - ¦ ¦--expr: [0/0] {567} + ¦ ¦--expr: 3 [0/0] {567} ¦ ¦ °--NUM_CONST: 3 [0/0] {566} ¦ ¦--',': , [1/0] {568} ¦ °--')': ) [0/0] {569} ¦--COMMENT: # ali [3/0] {570} - ¦--expr: [1/0] {571} - ¦ ¦--expr: [0/0] {573} + ¦--expr: call( [1/0] {571} + ¦ ¦--expr: call [0/0] {573} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {572} ¦ ¦--'(': ( [0/2] {574} ¦ ¦--SYMBOL_SUB: a [1/2] {575} ¦ ¦--EQ_SUB: = [0/2] {576} - ¦ ¦--expr: [0/0] {578} + ¦ ¦--expr: 2 [0/0] {578} ¦ ¦ °--NUM_CONST: 2 [0/0] {577} ¦ ¦--',': , [0/1] {579} ¦ ¦--SYMBOL_SUB: x [0/1] {580} ¦ ¦--EQ_SUB: = [0/1] {581} - ¦ ¦--expr: [0/0] {583} + ¦ ¦--expr: 111 [0/0] {583} ¦ ¦ °--NUM_CONST: 111 [0/0] {582} ¦ ¦--',': , [0/2] {584} ¦ ¦--COMMENT: # ano [1/2] {585} ¦ ¦--SYMBOL_SUB: bb [1/1] {586} ¦ ¦--EQ_SUB: = [0/2] {587} - ¦ ¦--expr: [0/0] {589} + ¦ ¦--expr: 3 [0/0] {589} ¦ ¦ °--NUM_CONST: 3 [0/0] {588} ¦ ¦--',': , [0/1] {590} ¦ ¦--COMMENT: # hi [0/0] {591} ¦ °--')': ) [1/0] {592} ¦--COMMENT: # ali [2/0] {593} - ¦--expr: [1/0] {594} - ¦ ¦--expr: [0/0] {596} + ¦--expr: call( [1/0] {594} + ¦ ¦--expr: call [0/0] {596} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {595} ¦ ¦--'(': ( [0/2] {597} ¦ ¦--SYMBOL_SUB: a [1/2] {598} ¦ ¦--EQ_SUB: = [0/2] {599} - ¦ ¦--expr: [0/0] {601} + ¦ ¦--expr: 2 [0/0] {601} ¦ ¦ °--NUM_CONST: 2 [0/0] {600} ¦ ¦--',': , [0/1] {602} ¦ ¦--SYMBOL_SUB: x [0/1] {603} ¦ ¦--EQ_SUB: = [0/1] {604} - ¦ ¦--expr: [0/0] {606} + ¦ ¦--expr: 111 [0/0] {606} ¦ ¦ °--NUM_CONST: 111 [0/0] {605} ¦ ¦--',': , [0/2] {607} ¦ ¦--SYMBOL_SUB: bb [1/1] {608} ¦ ¦--EQ_SUB: = [0/2] {609} - ¦ ¦--expr: [0/0] {611} + ¦ ¦--expr: 3 [0/0] {611} ¦ ¦ °--NUM_CONST: 3 [0/0] {610} ¦ ¦--',': , [0/1] {612} ¦ ¦--COMMENT: # hi [0/0] {613} ¦ °--')': ) [1/0] {614} ¦--COMMENT: # ali [2/0] {615} - ¦--expr: [1/0] {616} - ¦ ¦--expr: [0/0] {618} + ¦--expr: call( [1/0] {616} + ¦ ¦--expr: call [0/0] {618} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {617} ¦ ¦--'(': ( [0/2] {619} ¦ ¦--COMMENT: # ano [1/2] {620} ¦ ¦--SYMBOL_SUB: a [1/2] {621} ¦ ¦--EQ_SUB: = [0/2] {622} - ¦ ¦--expr: [0/0] {624} + ¦ ¦--expr: 2 [0/0] {624} ¦ ¦ °--NUM_CONST: 2 [0/0] {623} ¦ ¦--',': , [0/1] {625} ¦ ¦--SYMBOL_SUB: x [0/1] {626} ¦ ¦--EQ_SUB: = [0/1] {627} - ¦ ¦--expr: [0/0] {629} + ¦ ¦--expr: 111 [0/0] {629} ¦ ¦ °--NUM_CONST: 111 [0/0] {628} ¦ ¦--',': , [0/2] {630} ¦ ¦--SYMBOL_SUB: bb [1/1] {631} ¦ ¦--EQ_SUB: = [0/2] {632} - ¦ ¦--expr: [0/0] {634} + ¦ ¦--expr: 3 [0/0] {634} ¦ ¦ °--NUM_CONST: 3 [0/0] {633} ¦ ¦--',': , [0/1] {635} ¦ ¦--COMMENT: # hi [0/0] {636} ¦ °--')': ) [1/0] {637} ¦--COMMENT: # ali [2/0] {638} - ¦--expr: [1/0] {639} - ¦ ¦--expr: [0/0] {641} + ¦--expr: call( [1/0] {639} + ¦ ¦--expr: call [0/0] {641} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {640} ¦ ¦--'(': ( [0/2] {642} ¦ ¦--COMMENT: # ano [1/2] {643} ¦ ¦--SYMBOL_SUB: a [1/2] {644} ¦ ¦--EQ_SUB: = [0/2] {645} - ¦ ¦--expr: [0/0] {647} + ¦ ¦--expr: 2 [0/0] {647} ¦ ¦ °--NUM_CONST: 2 [0/0] {646} ¦ ¦--',': , [0/1] {648} ¦ ¦--SYMBOL_SUB: x [0/1] {649} ¦ ¦--EQ_SUB: = [0/1] {650} - ¦ ¦--expr: [0/0] {652} + ¦ ¦--expr: 111 [0/0] {652} ¦ ¦ °--NUM_CONST: 111 [0/0] {651} ¦ ¦--',': , [0/2] {653} ¦ ¦--SYMBOL_SUB: bb [1/1] {654} ¦ ¦--EQ_SUB: = [0/2] {655} - ¦ ¦--expr: [0/1] {657} + ¦ ¦--expr: 3 [0/1] {657} ¦ ¦ °--NUM_CONST: 3 [0/0] {656} ¦ ¦--COMMENT: # hi [0/0] {658} ¦ °--')': ) [1/0] {659} ¦--COMMENT: # not [2/0] {660} - ¦--expr: [1/0] {661} - ¦ ¦--expr: [0/0] {663} + ¦--expr: call( [1/0] {661} + ¦ ¦--expr: call [0/0] {663} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {662} ¦ ¦--'(': ( [0/2] {664} ¦ ¦--SYMBOL_SUB: a [1/1] {665} ¦ ¦--EQ_SUB: = [0/2] {666} - ¦ ¦--expr: [0/0] {668} + ¦ ¦--expr: 2 [0/0] {668} ¦ ¦ °--NUM_CONST: 2 [0/0] {667} ¦ ¦--',': , [0/1] {669} ¦ ¦--SYMBOL_SUB: x [0/1] {670} ¦ ¦--EQ_SUB: = [0/1] {671} - ¦ ¦--expr: [0/0] {673} + ¦ ¦--expr: 111 [0/0] {673} ¦ ¦ °--NUM_CONST: 111 [0/0] {672} ¦ ¦--',': , [0/2] {674} ¦ ¦--SYMBOL_SUB: bb [1/1] {675} ¦ ¦--EQ_SUB: = [0/2] {676} - ¦ ¦--expr: [0/0] {678} + ¦ ¦--expr: 3 [0/0] {678} ¦ ¦ °--NUM_CONST: 3 [0/0] {677} ¦ ¦--',': , [0/1] {679} ¦ ¦--COMMENT: # hi [0/0] {680} ¦ °--')': ) [1/0] {681} ¦--COMMENT: # not [2/0] {682} - ¦--expr: [1/0] {683} - ¦ ¦--expr: [0/0] {685} + ¦--expr: call( [1/0] {683} + ¦ ¦--expr: call [0/0] {685} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {684} ¦ ¦--'(': ( [0/2] {686} ¦ ¦--COMMENT: # ano [1/2] {687} ¦ ¦--SYMBOL_SUB: a [1/1] {688} ¦ ¦--EQ_SUB: = [0/2] {689} - ¦ ¦--expr: [0/0] {691} + ¦ ¦--expr: 2 [0/0] {691} ¦ ¦ °--NUM_CONST: 2 [0/0] {690} ¦ ¦--',': , [0/1] {692} ¦ ¦--SYMBOL_SUB: x [0/1] {693} ¦ ¦--EQ_SUB: = [0/1] {694} - ¦ ¦--expr: [0/0] {696} + ¦ ¦--expr: 111 [0/0] {696} ¦ ¦ °--NUM_CONST: 111 [0/0] {695} ¦ ¦--',': , [0/2] {697} ¦ ¦--SYMBOL_SUB: bb [1/1] {698} ¦ ¦--EQ_SUB: = [0/2] {699} - ¦ ¦--expr: [0/0] {701} + ¦ ¦--expr: 3 [0/0] {701} ¦ ¦ °--NUM_CONST: 3 [0/0] {700} ¦ ¦--',': , [0/2] {702} ¦ ¦--COMMENT: # hi [1/0] {703} @@ -707,19 +707,20 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--COMMENT: # not [1/0] {706} ¦--COMMENT: # in [1/0] {707} ¦--COMMENT: # the [1/0] {708} - °--expr: [1/0] {709} - ¦--expr: [0/0] {711} + °--expr: call( [1/0] {709} + ¦--expr: call [0/0] {711} ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {710} ¦--'(': ( [0/2] {712} ¦--SYMBOL_SUB: x [1/2] {713} ¦--EQ_SUB: = [0/1] {714} - ¦--expr: [0/0] {716} + ¦--expr: 95232 [0/0] {716} ¦ °--NUM_CONST: 95232 [0/0] {715} ¦--',': , [0/2] {717} ¦--SYMBOL_SUB: y [1/2] {718} ¦--EQ_SUB: = [0/1] {719} - ¦--expr: [0/0] {720} - ¦ ¦--expr: [0/0] {722} + ¦--expr: f( + [0/0] {720} + ¦ ¦--expr: f [0/0] {722} ¦ ¦ °--SYMBOL_FUNCTION_CALL: f [0/0] {721} ¦ ¦--'(': ( [0/2] {723} ¦ °--')': ) [1/0] {724} diff --git a/tests/testthat/cache-with-r-cache/mlflow-1-in.R b/tests/testthat/cache-with-r-cache/mlflow-1-in.R new file mode 100644 index 000000000..eb0ebb231 --- /dev/null +++ b/tests/testthat/cache-with-r-cache/mlflow-1-in.R @@ -0,0 +1,90 @@ +# Returns the current MLflow R package version +mlflow_version <- function() { + utils::packageVersion("mlflow") +} + +# Returns the name of a conda environment in which to install the Python MLflow package +mlflow_conda_env_name <- function() { + paste("r-mlflow", mlflow_version(), sep = "-") +} + +# Create conda env used by MLflow if it doesn't already exist +#' @importFrom reticulate conda_install conda_create conda_list +#' @param python_version Python version to use within conda environment created for +#' installing the MLflow CLI. +mlflow_maybe_create_conda_env <- function(python_version) { + packages <- c(paste("python", python_version, sep = "=")) + conda <- mlflow_conda_bin() + conda_env_name <- mlflow_conda_env_name() + if (!conda_env_name %in% conda_list(conda = conda)$name) { + conda_create(conda_env_name, conda = conda, packages = packages) + } +} + +#' Install MLflow +#' +#' Installs auxiliary dependencies of MLflow (e.g. the MLflow CLI). As a +#' one-time setup step, you must run install_mlflow() to install these +#' dependencies before calling other MLflow APIs. +#' +#' install_mlflow() requires Python and Conda to be installed. +#' See \url{https://www.python.org/getit/} and \url{https://docs.conda.io/projects/conda/en/latest/user-guide/install/}. +#' +#' Alternatively, you can set MLFLOW_PYTHON_BIN and MLFLOW_BIN environment variables +#' instead. MLFLOW_PYTHON_BIN should point to python executable and MLFLOW_BIN to mlflow cli +#' executable. These variables allow you to use custom mlflow installation. Note that there may be +#' some compatibility issues if the custom mlflow version does not match the version of the R +#' package. +#' +#' @examples +#' \dontrun{ +#' library(mlflow) +#' install_mlflow() +#' } +#' +#' @importFrom reticulate conda_install conda_create conda_list +#' @param python_version Optional Python version to use within conda environment created for +#' installing the MLflow CLI. If unspecified, defaults to using Python 3.6 +#' @export +install_mlflow <- function(python_version = "3.6") { + mlflow_maybe_create_conda_env(python_version) + # Install the Python MLflow package with version == the current R package version + packages <- c(paste("mlflow", "==", mlflow_version(), sep = "")) + conda <- mlflow_conda_bin() + conda_install(packages, envname = mlflow_conda_env_name(), pip = TRUE, conda = conda) +} + +#' Uninstall MLflow +#' +#' Uninstalls MLflow by removing the Conda environment. +#' +#' @examples +#' \dontrun{ +#' library(mlflow) +#' install_mlflow() +#' uninstall_mlflow() +#' } +#' +#' @importFrom reticulate conda_install conda_create conda_list +#' @export +uninstall_mlflow <- function() { + reticulate::conda_remove(envname = mlflow_conda_env_name(), conda = mlflow_conda_bin()) +} + + +mlflow_conda_bin <- function() { + conda_home <- Sys.getenv("MLFLOW_CONDA_HOME", NA) + conda <- if (!is.na(conda_home)) paste(conda_home, "bin", "conda", sep = "/") else "auto" + conda_try <- try(conda_binary(conda = conda), silent = TRUE) + if (class(conda_try) == "try-error") { + msg <- paste(attributes(conda_try)$condition$message, + paste( + " If you are not using conda, you can set the environment variable", + "MLFLOW_PYTHON_BIN to the path of your python executable." + ), + sep = "\n" + ) + stop(msg) + } + conda_try +} diff --git a/tests/testthat/curly-curly/mixed-in_tree b/tests/testthat/curly-curly/mixed-in_tree index e2ffe8200..eb0ffc2e6 100644 --- a/tests/testthat/curly-curly/mixed-in_tree +++ b/tests/testthat/curly-curly/mixed-in_tree @@ -2,81 +2,89 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--COMMENT: ## . [0/0] {1} ¦--COMMENT: ## l [1/0] {2} ¦--COMMENT: # not [1/0] {3} - ¦--expr: [1/0] {4} - ¦ ¦--expr: [0/0] {6} + ¦--expr: call( [1/0] {4} + ¦ ¦--expr: call [0/0] {6} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {5} ¦ ¦--'(': ( [0/0] {7} - ¦ ¦--expr: [0/0] {8} + ¦ ¦--expr: {{ x [0/0] {8} ¦ ¦ ¦--'{': { [0/0] {9} - ¦ ¦ ¦--expr: [0/0] {10} + ¦ ¦ ¦--expr: { x } [0/0] {10} ¦ ¦ ¦ ¦--'{': { [0/1] {11} - ¦ ¦ ¦ ¦--expr: [0/1] {13} + ¦ ¦ ¦ ¦--expr: x [0/1] {13} ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {12} ¦ ¦ ¦ °--'}': } [0/0] {14} ¦ ¦ °--'}': } [0/0] {15} ¦ °--')': ) [0/0] {16} ¦--COMMENT: # rem [2/0] {17} - ¦--expr: [1/0] {18} - ¦ ¦--expr: [0/0] {20} + ¦--expr: call( [1/0] {18} + ¦ ¦--expr: call [0/0] {20} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {19} ¦ ¦--'(': ( [0/0] {21} - ¦ ¦--expr: [0/0] {22} + ¦ ¦--expr: {{ + [0/0] {22} ¦ ¦ ¦--'{': { [0/0] {23} - ¦ ¦ ¦--expr: [0/0] {24} + ¦ ¦ ¦--expr: { + x [0/0] {24} ¦ ¦ ¦ ¦--'{': { [0/2] {25} - ¦ ¦ ¦ ¦--expr: [1/0] {27} + ¦ ¦ ¦ ¦--expr: x [1/0] {27} ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {26} ¦ ¦ ¦ °--'}': } [1/0] {28} ¦ ¦ °--'}': } [0/0] {29} ¦ °--')': ) [0/0] {30} - ¦--expr: [2/0] {31} - ¦ ¦--expr: [0/0] {33} + ¦--expr: call( [2/0] {31} + ¦ ¦--expr: call [0/0] {33} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {32} ¦ ¦--'(': ( [0/0] {34} - ¦ ¦--expr: [0/0] {35} + ¦ ¦--expr: { + { [0/0] {35} ¦ ¦ ¦--'{': { [0/2] {36} - ¦ ¦ ¦--expr: [1/0] {37} + ¦ ¦ ¦--expr: {x +} [1/0] {37} ¦ ¦ ¦ ¦--'{': { [0/0] {38} - ¦ ¦ ¦ ¦--expr: [0/0] {40} + ¦ ¦ ¦ ¦--expr: x [0/0] {40} ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {39} ¦ ¦ ¦ °--'}': } [1/0] {41} ¦ ¦ °--'}': } [0/0] {42} ¦ °--')': ) [0/0] {43} - ¦--expr: [2/0] {44} - ¦ ¦--expr: [0/0] {46} + ¦--expr: call( [2/0] {44} + ¦ ¦--expr: call [0/0] {46} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {45} ¦ ¦--'(': ( [0/0] {47} - ¦ ¦--expr: [0/0] {48} + ¦ ¦--expr: { + { [0/0] {48} ¦ ¦ ¦--'{': { [0/2] {49} - ¦ ¦ ¦--expr: [1/0] {50} + ¦ ¦ ¦--expr: {x} [1/0] {50} ¦ ¦ ¦ ¦--'{': { [0/0] {51} - ¦ ¦ ¦ ¦--expr: [0/0] {53} + ¦ ¦ ¦ ¦--expr: x [0/0] {53} ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {52} ¦ ¦ ¦ °--'}': } [0/0] {54} ¦ ¦ °--'}': } [0/0] {55} ¦ °--')': ) [1/0] {56} - ¦--expr: [2/0] {57} - ¦ ¦--expr: [0/0] {59} + ¦--expr: call( [2/0] {57} + ¦ ¦--expr: call [0/0] {59} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {58} ¦ ¦--'(': ( [0/0] {60} - ¦ ¦--expr: [0/0] {61} + ¦ ¦--expr: { + { [0/0] {61} ¦ ¦ ¦--'{': { [0/2] {62} - ¦ ¦ ¦--expr: [1/2] {63} + ¦ ¦ ¦--expr: {x} [1/2] {63} ¦ ¦ ¦ ¦--'{': { [0/0] {64} - ¦ ¦ ¦ ¦--expr: [0/0] {66} + ¦ ¦ ¦ ¦--expr: x [0/0] {66} ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {65} ¦ ¦ ¦ °--'}': } [0/0] {67} ¦ ¦ °--'}': } [1/0] {68} ¦ °--')': ) [0/0] {69} - ¦--expr: [2/0] {70} - ¦ ¦--expr: [0/0] {72} + ¦--expr: call( [2/0] {70} + ¦ ¦--expr: call [0/0] {72} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {71} ¦ ¦--'(': ( [0/2] {73} - ¦ ¦--expr: [1/2] {74} + ¦ ¦--expr: { + { [1/2] {74} ¦ ¦ ¦--'{': { [0/2] {75} - ¦ ¦ ¦--expr: [1/4] {76} + ¦ ¦ ¦--expr: {x + [1/4] {76} ¦ ¦ ¦ ¦--'{': { [0/0] {77} - ¦ ¦ ¦ ¦--expr: [0/2] {79} + ¦ ¦ ¦ ¦--expr: x [0/2] {79} ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {78} ¦ ¦ ¦ °--'}': } [1/0] {80} ¦ ¦ °--'}': } [1/0] {81} @@ -84,368 +92,375 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--COMMENT: ## . [2/0] {83} ¦--COMMENT: ## s [1/0] {84} ¦--COMMENT: # not [2/0] {85} - ¦--expr: [1/0] {86} - ¦ ¦--expr: [0/0] {88} + ¦--expr: call( [1/0] {86} + ¦ ¦--expr: call [0/0] {88} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {87} ¦ ¦--'(': ( [0/0] {89} - ¦ ¦--expr: [0/0] {90} + ¦ ¦--expr: {{ x [0/0] {90} ¦ ¦ ¦--'{': { [0/0] {91} - ¦ ¦ ¦--expr: [0/0] {92} + ¦ ¦ ¦--expr: { x } [0/0] {92} ¦ ¦ ¦ ¦--'{': { [0/1] {93} - ¦ ¦ ¦ ¦--expr: [0/1] {95} + ¦ ¦ ¦ ¦--expr: x [0/1] {95} ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {94} ¦ ¦ ¦ °--'}': } [0/0] {96} ¦ ¦ °--'}': } [0/0] {97} ¦ °--')': ) [0/0] {98} ¦--COMMENT: # rem [2/0] {99} - ¦--expr: [1/0] {100} - ¦ ¦--expr: [0/0] {102} + ¦--expr: call( [1/0] {100} + ¦ ¦--expr: call [0/0] {102} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {101} ¦ ¦--'(': ( [0/0] {103} - ¦ ¦--expr: [0/0] {104} + ¦ ¦--expr: { { x [0/0] {104} ¦ ¦ ¦--'{': { [0/1] {105} - ¦ ¦ ¦--expr: [0/0] {106} + ¦ ¦ ¦--expr: { x } [0/0] {106} ¦ ¦ ¦ ¦--'{': { [0/1] {107} - ¦ ¦ ¦ ¦--expr: [0/1] {109} + ¦ ¦ ¦ ¦--expr: x [0/1] {109} ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {108} ¦ ¦ ¦ °--'}': } [0/0] {110} ¦ ¦ °--'}': } [0/0] {111} ¦ °--')': ) [0/0] {112} - ¦--expr: [1/0] {113} - ¦ ¦--expr: [0/0] {115} + ¦--expr: call( [1/0] {113} + ¦ ¦--expr: call [0/0] {115} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {114} ¦ ¦--'(': ( [0/0] {116} - ¦ ¦--expr: [0/1] {117} + ¦ ¦--expr: { { x [0/1] {117} ¦ ¦ ¦--'{': { [0/1] {118} - ¦ ¦ ¦--expr: [0/0] {119} + ¦ ¦ ¦--expr: { x } [0/0] {119} ¦ ¦ ¦ ¦--'{': { [0/1] {120} - ¦ ¦ ¦ ¦--expr: [0/1] {122} + ¦ ¦ ¦ ¦--expr: x [0/1] {122} ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {121} ¦ ¦ ¦ °--'}': } [0/0] {123} ¦ ¦ °--'}': } [0/0] {124} ¦ °--')': ) [0/0] {125} - ¦--expr: [1/0] {126} - ¦ ¦--expr: [0/0] {128} + ¦--expr: call( [1/0] {126} + ¦ ¦--expr: call [0/0] {128} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {127} ¦ ¦--'(': ( [0/1] {129} - ¦ ¦--expr: [0/0] {130} + ¦ ¦--expr: { { x [0/0] {130} ¦ ¦ ¦--'{': { [0/1] {131} - ¦ ¦ ¦--expr: [0/0] {132} + ¦ ¦ ¦--expr: { x } [0/0] {132} ¦ ¦ ¦ ¦--'{': { [0/1] {133} - ¦ ¦ ¦ ¦--expr: [0/1] {135} + ¦ ¦ ¦ ¦--expr: x [0/1] {135} ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {134} ¦ ¦ ¦ °--'}': } [0/0] {136} ¦ ¦ °--'}': } [0/0] {137} ¦ °--')': ) [0/0] {138} - ¦--expr: [1/0] {139} - ¦ ¦--expr: [0/0] {141} + ¦--expr: call( [1/0] {139} + ¦ ¦--expr: call [0/0] {141} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {140} ¦ ¦--'(': ( [0/1] {142} - ¦ ¦--expr: [0/0] {143} + ¦ ¦--expr: { { x [0/0] {143} ¦ ¦ ¦--'{': { [0/1] {144} - ¦ ¦ ¦--expr: [0/1] {145} + ¦ ¦ ¦--expr: { x } [0/1] {145} ¦ ¦ ¦ ¦--'{': { [0/1] {146} - ¦ ¦ ¦ ¦--expr: [0/1] {148} + ¦ ¦ ¦ ¦--expr: x [0/1] {148} ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {147} ¦ ¦ ¦ °--'}': } [0/0] {149} ¦ ¦ °--'}': } [0/0] {150} ¦ °--')': ) [0/0] {151} ¦--COMMENT: # ins [2/0] {152} - ¦--expr: [1/0] {153} - ¦ ¦--expr: [0/0] {155} + ¦--expr: call( [1/0] {153} + ¦ ¦--expr: call [0/0] {155} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {154} ¦ ¦--'(': ( [0/0] {156} - ¦ ¦--expr: [0/0] {157} + ¦ ¦--expr: {{x } [0/0] {157} ¦ ¦ ¦--'{': { [0/0] {158} - ¦ ¦ ¦--expr: [0/0] {159} + ¦ ¦ ¦--expr: {x } [0/0] {159} ¦ ¦ ¦ ¦--'{': { [0/0] {160} - ¦ ¦ ¦ ¦--expr: [0/1] {162} + ¦ ¦ ¦ ¦--expr: x [0/1] {162} ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {161} ¦ ¦ ¦ °--'}': } [0/0] {163} ¦ ¦ °--'}': } [0/0] {164} ¦ °--')': ) [0/0] {165} - ¦--expr: [1/0] {166} - ¦ ¦--expr: [0/0] {168} + ¦--expr: call( [1/0] {166} + ¦ ¦--expr: call [0/0] {168} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {167} ¦ ¦--'(': ( [0/0] {169} - ¦ ¦--expr: [0/0] {170} + ¦ ¦--expr: {{x}} [0/0] {170} ¦ ¦ ¦--'{': { [0/0] {171} - ¦ ¦ ¦--expr: [0/0] {172} + ¦ ¦ ¦--expr: {x} [0/0] {172} ¦ ¦ ¦ ¦--'{': { [0/0] {173} - ¦ ¦ ¦ ¦--expr: [0/0] {175} + ¦ ¦ ¦ ¦--expr: x [0/0] {175} ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {174} ¦ ¦ ¦ °--'}': } [0/0] {176} ¦ ¦ °--'}': } [0/0] {177} ¦ °--')': ) [0/0] {178} - ¦--expr: [1/0] {179} - ¦ ¦--expr: [0/0] {181} + ¦--expr: call( [1/0] {179} + ¦ ¦--expr: call [0/0] {181} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {180} ¦ ¦--'(': ( [0/0] {182} - ¦ ¦--expr: [0/0] {183} + ¦ ¦--expr: {{ x} [0/0] {183} ¦ ¦ ¦--'{': { [0/0] {184} - ¦ ¦ ¦--expr: [0/0] {185} + ¦ ¦ ¦--expr: { x} [0/0] {185} ¦ ¦ ¦ ¦--'{': { [0/1] {186} - ¦ ¦ ¦ ¦--expr: [0/0] {188} + ¦ ¦ ¦ ¦--expr: x [0/0] {188} ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {187} ¦ ¦ ¦ °--'}': } [0/0] {189} ¦ ¦ °--'}': } [0/0] {190} ¦ °--')': ) [0/0] {191} ¦--COMMENT: # not [2/0] {192} - ¦--expr: [1/0] {193} - ¦ ¦--expr: [0/0] {195} + ¦--expr: call( [1/0] {193} + ¦ ¦--expr: call [0/0] {195} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {194} ¦ ¦--'(': ( [0/0] {196} - ¦ ¦--expr: [0/0] {197} + ¦ ¦--expr: {{ x [0/0] {197} ¦ ¦ ¦--'{': { [0/0] {198} - ¦ ¦ ¦--expr: [0/0] {199} + ¦ ¦ ¦--expr: { x } [0/0] {199} ¦ ¦ ¦ ¦--'{': { [0/1] {200} - ¦ ¦ ¦ ¦--expr: [0/1] {202} + ¦ ¦ ¦ ¦--expr: x [0/1] {202} ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {201} ¦ ¦ ¦ °--'}': } [0/0] {203} ¦ ¦ °--'}': } [0/0] {204} ¦ °--')': ) [0/0] {205} ¦--COMMENT: # com [3/0] {206} - ¦--expr: [1/0] {207} - ¦ ¦--expr: [0/0] {209} + ¦--expr: call( [1/0] {207} + ¦ ¦--expr: call [0/0] {209} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {208} ¦ ¦--'(': ( [0/0] {210} - ¦ ¦--expr: [0/0] {211} + ¦ ¦--expr: {{ x} [0/0] {211} ¦ ¦ ¦--'{': { [0/0] {212} - ¦ ¦ ¦--expr: [0/2] {213} + ¦ ¦ ¦--expr: { x} [0/2] {213} ¦ ¦ ¦ ¦--'{': { [0/1] {214} - ¦ ¦ ¦ ¦--expr: [0/0] {216} + ¦ ¦ ¦ ¦--expr: x [0/0] {216} ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {215} ¦ ¦ ¦ °--'}': } [0/0] {217} ¦ ¦ °--'}': } [1/0] {218} ¦ °--')': ) [0/0] {219} - ¦--expr: [2/0] {220} - ¦ ¦--expr: [0/0] {222} + ¦--expr: call( [2/0] {220} + ¦ ¦--expr: call [0/0] {222} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {221} ¦ ¦--'(': ( [0/0] {223} - ¦ ¦--expr: [0/0] {224} + ¦ ¦--expr: { + { [0/0] {224} ¦ ¦ ¦--'{': { [0/2] {225} - ¦ ¦ ¦--expr: [1/0] {226} + ¦ ¦ ¦--expr: { x} [1/0] {226} ¦ ¦ ¦ ¦--'{': { [0/1] {227} - ¦ ¦ ¦ ¦--expr: [0/0] {229} + ¦ ¦ ¦ ¦--expr: x [0/0] {229} ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {228} ¦ ¦ ¦ °--'}': } [0/0] {230} ¦ ¦ °--'}': } [0/0] {231} ¦ °--')': ) [0/0] {232} ¦--COMMENT: # not [2/0] {233} - ¦--expr: [1/0] {234} + ¦--expr: { + y [1/0] {234} ¦ ¦--'{': { [0/2] {235} - ¦ ¦--expr: [1/0] {237} + ¦ ¦--expr: y [1/0] {237} ¦ ¦ °--SYMBOL: y [0/0] {236} ¦ °--'}': } [1/0] {238} - ¦--expr: [1/0] {239} + ¦--expr: { 1 + [1/0] {239} ¦ ¦--'{': { [0/1] {240} - ¦ ¦--expr: [0/0] {241} - ¦ ¦ ¦--expr: [0/1] {243} + ¦ ¦--expr: 1 + 1 [0/0] {241} + ¦ ¦ ¦--expr: 1 [0/1] {243} ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {242} ¦ ¦ ¦--'+': + [0/1] {244} - ¦ ¦ °--expr: [0/0] {246} + ¦ ¦ °--expr: 1 [0/0] {246} ¦ ¦ °--NUM_CONST: 1 [0/0] {245} ¦ °--'}': } [0/0] {247} - ¦--expr: [1/1] {248} + ¦--expr: {{1 + [1/1] {248} ¦ ¦--'{': { [0/0] {249} - ¦ ¦--expr: [0/0] {250} - ¦ ¦ ¦--expr: [0/1] {251} + ¦ ¦--expr: {1 + [0/0] {250} + ¦ ¦ ¦--expr: {1 + [0/1] {251} ¦ ¦ ¦ ¦--'{': { [0/0] {252} - ¦ ¦ ¦ ¦--expr: [0/0] {253} - ¦ ¦ ¦ ¦ ¦--expr: [0/1] {255} + ¦ ¦ ¦ ¦--expr: 1 + a [0/0] {253} + ¦ ¦ ¦ ¦ ¦--expr: 1 [0/1] {255} ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {254} ¦ ¦ ¦ ¦ ¦--'+': + [0/1] {256} - ¦ ¦ ¦ ¦ °--expr: [0/0] {258} + ¦ ¦ ¦ ¦ °--expr: a [0/0] {258} ¦ ¦ ¦ ¦ °--SYMBOL: a [0/0] {257} ¦ ¦ ¦ °--'}': } [0/0] {259} ¦ ¦ ¦--'+': + [0/1] {260} - ¦ ¦ °--expr: [0/0] {262} + ¦ ¦ °--expr: 1 [0/0] {262} ¦ ¦ °--NUM_CONST: 1 [0/0] {261} ¦ °--'}': } [0/0] {263} ¦--COMMENT: # not [0/0] {264} ¦--COMMENT: ## . [3/0] {265} ¦--COMMENT: ## m [1/0] {266} - ¦--expr: [1/0] {267} - ¦ ¦--expr: [0/0] {269} + ¦--expr: call( [1/0] {267} + ¦ ¦--expr: call [0/0] {269} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {268} ¦ ¦--'(': ( [0/0] {270} - ¦ ¦--expr: [0/0] {272} + ¦ ¦--expr: "test [0/0] {272} ¦ ¦ °--STR_CONST: "test [0/0] {271} ¦ ¦--',': , [0/1] {273} - ¦ ¦--expr: [0/0] {274} + ¦ ¦--expr: { + 1 [0/0] {274} ¦ ¦ ¦--'{': { [0/2] {275} - ¦ ¦ ¦--expr: [1/0] {277} + ¦ ¦ ¦--expr: 1 [1/0] {277} ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {276} ¦ ¦ °--'}': } [1/0] {278} ¦ °--')': ) [0/0] {279} - ¦--expr: [2/0] {280} - ¦ ¦--expr: [0/0] {282} + ¦--expr: call( [2/0] {280} + ¦ ¦--expr: call [0/0] {282} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {281} ¦ ¦--'(': ( [0/2] {283} - ¦ ¦--expr: [1/0] {285} + ¦ ¦--expr: "test [1/0] {285} ¦ ¦ °--STR_CONST: "test [0/0] {284} ¦ ¦--',': , [0/1] {286} - ¦ ¦--expr: [0/0] {287} + ¦ ¦--expr: { + 1 [0/0] {287} ¦ ¦ ¦--'{': { [0/2] {288} - ¦ ¦ ¦--expr: [1/0] {290} + ¦ ¦ ¦--expr: 1 [1/0] {290} ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {289} ¦ ¦ °--'}': } [1/0] {291} ¦ °--')': ) [0/0] {292} - ¦--expr: [2/0] {293} - ¦ ¦--expr: [0/0] {295} + ¦--expr: call( [2/0] {293} + ¦ ¦--expr: call [0/0] {295} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {294} ¦ ¦--'(': ( [0/0] {296} - ¦ ¦--expr: [0/0] {298} + ¦ ¦--expr: "test [0/0] {298} ¦ ¦ °--STR_CONST: "test [0/0] {297} ¦ ¦--',': , [0/5] {299} - ¦ ¦--expr: [1/0] {300} + ¦ ¦--expr: { + [1/0] {300} ¦ ¦ ¦--'{': { [0/4] {301} - ¦ ¦ ¦--expr: [1/2] {303} + ¦ ¦ ¦--expr: 1 [1/2] {303} ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {302} ¦ ¦ °--'}': } [1/0] {304} ¦ °--')': ) [0/0] {305} - ¦--expr: [2/0] {306} - ¦ ¦--expr: [0/0] {308} + ¦--expr: call( [2/0] {306} + ¦ ¦--expr: call [0/0] {308} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {307} ¦ ¦--'(': ( [0/0] {309} - ¦ ¦--expr: [0/0] {311} + ¦ ¦--expr: "test [0/0] {311} ¦ ¦ °--STR_CONST: "test [0/0] {310} ¦ ¦--',': , [0/1] {312} - ¦ ¦--expr: [0/0] {313} + ¦ ¦--expr: { + 1 [0/0] {313} ¦ ¦ ¦--'{': { [0/2] {314} - ¦ ¦ ¦--expr: [1/1] {316} + ¦ ¦ ¦--expr: 1 [1/1] {316} ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {315} ¦ ¦ °--'}': } [0/0] {317} ¦ °--')': ) [1/0] {318} - ¦--expr: [2/0] {319} - ¦ ¦--expr: [0/0] {321} + ¦--expr: call( [2/0] {319} + ¦ ¦--expr: call [0/0] {321} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {320} ¦ ¦--'(': ( [0/0] {322} - ¦ ¦--expr: [0/0] {323} + ¦ ¦--expr: { + 1 [0/0] {323} ¦ ¦ ¦--'{': { [0/2] {324} - ¦ ¦ ¦--expr: [1/0] {326} + ¦ ¦ ¦--expr: 1 [1/0] {326} ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {325} ¦ ¦ °--'}': } [1/0] {327} ¦ ¦--',': , [0/1] {328} - ¦ ¦--expr: [0/0] {329} - ¦ ¦ ¦--expr: [0/1] {331} + ¦ ¦--expr: a + b [0/0] {329} + ¦ ¦ ¦--expr: a [0/1] {331} ¦ ¦ ¦ °--SYMBOL: a [0/0] {330} ¦ ¦ ¦--'+': + [0/1] {332} - ¦ ¦ °--expr: [0/0] {334} + ¦ ¦ °--expr: b [0/0] {334} ¦ ¦ °--SYMBOL: b [0/0] {333} ¦ ¦--',': , [0/1] {335} - ¦ ¦--expr: [0/0] {336} + ¦ ¦--expr: { 33 [0/0] {336} ¦ ¦ ¦--'{': { [0/1] {337} - ¦ ¦ ¦--expr: [0/0] {338} - ¦ ¦ ¦ ¦--expr: [0/1] {340} + ¦ ¦ ¦--expr: 33 / [0/0] {338} + ¦ ¦ ¦ ¦--expr: 33 [0/1] {340} ¦ ¦ ¦ ¦ °--NUM_CONST: 33 [0/0] {339} ¦ ¦ ¦ ¦--'/': / [0/1] {341} - ¦ ¦ ¦ °--expr: [0/0] {342} - ¦ ¦ ¦ ¦--expr: [0/0] {344} + ¦ ¦ ¦ °--expr: f(c) [0/0] {342} + ¦ ¦ ¦ ¦--expr: f [0/0] {344} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: f [0/0] {343} ¦ ¦ ¦ ¦--'(': ( [0/0] {345} - ¦ ¦ ¦ ¦--expr: [0/0] {347} + ¦ ¦ ¦ ¦--expr: c [0/0] {347} ¦ ¦ ¦ ¦ °--SYMBOL: c [0/0] {346} ¦ ¦ ¦ °--')': ) [0/0] {348} ¦ ¦ °--'}': } [0/0] {349} ¦ °--')': ) [0/0] {350} - ¦--expr: [2/0] {351} - ¦ ¦--expr: [0/0] {353} + ¦--expr: call( [2/0] {351} + ¦ ¦--expr: call [0/0] {353} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {352} ¦ ¦--'(': ( [0/0] {354} - ¦ ¦--expr: [0/0] {355} + ¦ ¦--expr: {{ x [0/0] {355} ¦ ¦ ¦--'{': { [0/0] {356} - ¦ ¦ ¦--expr: [0/0] {357} + ¦ ¦ ¦--expr: { x } [0/0] {357} ¦ ¦ ¦ ¦--'{': { [0/1] {358} - ¦ ¦ ¦ ¦--expr: [0/1] {360} + ¦ ¦ ¦ ¦--expr: x [0/1] {360} ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {359} ¦ ¦ ¦ °--'}': } [0/0] {361} ¦ ¦ °--'}': } [0/0] {362} ¦ ¦--',': , [0/1] {363} - ¦ ¦--expr: [0/0] {364} + ¦ ¦--expr: {{ y} [0/0] {364} ¦ ¦ ¦--'{': { [0/0] {365} - ¦ ¦ ¦--expr: [0/0] {366} + ¦ ¦ ¦--expr: { y} [0/0] {366} ¦ ¦ ¦ ¦--'{': { [0/1] {367} - ¦ ¦ ¦ ¦--expr: [0/0] {369} + ¦ ¦ ¦ ¦--expr: y [0/0] {369} ¦ ¦ ¦ ¦ °--SYMBOL: y [0/0] {368} ¦ ¦ ¦ °--'}': } [0/0] {370} ¦ ¦ °--'}': } [0/0] {371} ¦ °--')': ) [0/0] {372} - ¦--expr: [1/0] {373} - ¦ ¦--expr: [0/0] {375} + ¦--expr: call( [1/0] {373} + ¦ ¦--expr: call [0/0] {375} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {374} ¦ ¦--'(': ( [0/0] {376} - ¦ ¦--expr: [0/0] {377} + ¦ ¦--expr: {{ x [0/0] {377} ¦ ¦ ¦--'{': { [0/0] {378} - ¦ ¦ ¦--expr: [0/0] {379} + ¦ ¦ ¦--expr: { x } [0/0] {379} ¦ ¦ ¦ ¦--'{': { [0/1] {380} - ¦ ¦ ¦ ¦--expr: [0/1] {382} + ¦ ¦ ¦ ¦--expr: x [0/1] {382} ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {381} ¦ ¦ ¦ °--'}': } [0/0] {383} ¦ ¦ °--'}': } [0/0] {384} ¦ ¦--',': , [0/1] {385} - ¦ ¦--expr: [0/0] {386} + ¦ ¦--expr: {{ y} [0/0] {386} ¦ ¦ ¦--'{': { [0/0] {387} - ¦ ¦ ¦--expr: [0/2] {388} + ¦ ¦ ¦--expr: { y} [0/2] {388} ¦ ¦ ¦ ¦--'{': { [0/1] {389} - ¦ ¦ ¦ ¦--expr: [0/0] {391} + ¦ ¦ ¦ ¦--expr: y [0/0] {391} ¦ ¦ ¦ ¦ °--SYMBOL: y [0/0] {390} ¦ ¦ ¦ °--'}': } [0/0] {392} ¦ ¦ °--'}': } [1/0] {393} ¦ °--')': ) [0/0] {394} - ¦--expr: [1/0] {395} - ¦ ¦--expr: [0/0] {397} + ¦--expr: call( [1/0] {395} + ¦ ¦--expr: call [0/0] {397} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {396} ¦ ¦--'(': ( [0/2] {398} - ¦ ¦--expr: [1/0] {399} + ¦ ¦--expr: {{ x [1/0] {399} ¦ ¦ ¦--'{': { [0/0] {400} - ¦ ¦ ¦--expr: [0/0] {401} + ¦ ¦ ¦--expr: { x } [0/0] {401} ¦ ¦ ¦ ¦--'{': { [0/1] {402} - ¦ ¦ ¦ ¦--expr: [0/1] {404} + ¦ ¦ ¦ ¦--expr: x [0/1] {404} ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {403} ¦ ¦ ¦ °--'}': } [0/0] {405} ¦ ¦ °--'}': } [0/0] {406} ¦ ¦--',': , [0/1] {407} - ¦ ¦--expr: [0/0] {408} + ¦ ¦--expr: {{ y} [0/0] {408} ¦ ¦ ¦--'{': { [0/0] {409} - ¦ ¦ ¦--expr: [0/0] {410} + ¦ ¦ ¦--expr: { y} [0/0] {410} ¦ ¦ ¦ ¦--'{': { [0/1] {411} - ¦ ¦ ¦ ¦--expr: [0/0] {413} + ¦ ¦ ¦ ¦--expr: y [0/0] {413} ¦ ¦ ¦ ¦ °--SYMBOL: y [0/0] {412} ¦ ¦ ¦ °--'}': } [0/0] {414} ¦ ¦ °--'}': } [0/0] {415} ¦ °--')': ) [0/0] {416} - °--expr: [2/0] {417} - ¦--expr: [0/0] {419} + °--expr: call( [2/0] {417} + ¦--expr: call [0/0] {419} ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {418} ¦--'(': ( [0/2] {420} - ¦--expr: [1/0] {421} + ¦--expr: {{ x [1/0] {421} ¦ ¦--'{': { [0/0] {422} - ¦ ¦--expr: [0/0] {423} + ¦ ¦--expr: { x } [0/0] {423} ¦ ¦ ¦--'{': { [0/1] {424} - ¦ ¦ ¦--expr: [0/1] {426} + ¦ ¦ ¦--expr: x [0/1] {426} ¦ ¦ ¦ °--SYMBOL: x [0/0] {425} ¦ ¦ °--'}': } [0/0] {427} ¦ °--'}': } [0/0] {428} ¦--',': , [0/2] {429} - ¦--expr: [1/0] {430} - ¦ ¦--expr: [0/1] {431} + ¦--expr: {{ y} [1/0] {430} + ¦ ¦--expr: {{ y} [0/1] {431} ¦ ¦ ¦--'{': { [0/0] {432} - ¦ ¦ ¦--expr: [0/0] {433} + ¦ ¦ ¦--expr: { y} [0/0] {433} ¦ ¦ ¦ ¦--'{': { [0/1] {434} - ¦ ¦ ¦ ¦--expr: [0/0] {436} + ¦ ¦ ¦ ¦--expr: y [0/0] {436} ¦ ¦ ¦ ¦ °--SYMBOL: y [0/0] {435} ¦ ¦ ¦ °--'}': } [0/0] {437} ¦ ¦ °--'}': } [0/0] {438} ¦ ¦--LEFT_ASSIGN: := [0/1] {439} - ¦ °--expr: [0/0] {441} + ¦ °--expr: 3 [0/0] {441} ¦ °--NUM_CONST: 3 [0/0] {440} ¦--',': , [0/1] {442} - ¦--expr: [0/0] {443} - ¦ ¦--expr: [0/0] {445} + ¦--expr: f(bk) [0/0] {443} + ¦ ¦--expr: f [0/0] {445} ¦ ¦ °--SYMBOL_FUNCTION_CALL: f [0/0] {444} ¦ ¦--'(': ( [0/0] {446} - ¦ ¦--expr: [0/0] {448} + ¦ ¦--expr: bk [0/0] {448} ¦ ¦ °--SYMBOL: bk [0/0] {447} ¦ °--')': ) [0/0] {449} °--')': ) [1/0] {450} diff --git a/tests/testthat/escaping/basic-escape-in_tree b/tests/testthat/escaping/basic-escape-in_tree index 8c38989a0..22d994fcb 100644 --- a/tests/testthat/escaping/basic-escape-in_tree +++ b/tests/testthat/escaping/basic-escape-in_tree @@ -3,44 +3,44 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--COMMENT: #' [1/0] {2} ¦--COMMENT: #' @e [1/0] {3} ¦--COMMENT: #' ca [1/0] {4} - ¦--expr: [1/0] {6} + ¦--expr: NULL [1/0] {6} ¦ °--NULL_CONST: NULL [0/0] {5} ¦--COMMENT: #' th [3/0] {7} ¦--COMMENT: #' [1/0] {8} ¦--COMMENT: #' @e [1/0] {9} ¦--COMMENT: #' ca [1/0] {10} - ¦--expr: [1/0] {12} + ¦--expr: NULL [1/0] {12} ¦ °--NULL_CONST: NULL [0/0] {11} ¦--COMMENT: #' th [2/0] {13} ¦--COMMENT: #' [1/0] {14} ¦--COMMENT: #' @e [1/0] {15} ¦--COMMENT: #' ca [1/0] {16} ¦--COMMENT: #' an [1/0] {17} - ¦--expr: [1/0] {19} + ¦--expr: NULL [1/0] {19} ¦ °--NULL_CONST: NULL [0/0] {18} ¦--COMMENT: #' th [3/0] {20} ¦--COMMENT: #' [1/0] {21} ¦--COMMENT: #' @e [1/0] {22} ¦--COMMENT: #' ca [1/0] {23} ¦--COMMENT: #' an [1/0] {24} - ¦--expr: [1/0] {26} + ¦--expr: NULL [1/0] {26} ¦ °--NULL_CONST: NULL [0/0] {25} - ¦--expr: [2/0] {28} + ¦--expr: 'sing [2/0] {28} ¦ °--STR_CONST: 'sing [0/0] {27} - ¦--expr: [2/1] {29} - ¦ ¦--expr: [0/1] {31} + ¦--expr: x <- [2/1] {29} + ¦ ¦--expr: x [0/1] {31} ¦ ¦ °--SYMBOL: x [0/0] {30} ¦ ¦--LEFT_ASSIGN: <- [0/1] {32} - ¦ °--expr: [0/0] {34} + ¦ °--expr: ' 2' [0/0] {34} ¦ °--STR_CONST: ' 2' [0/0] {33} ¦--COMMENT: # the [0/0] {35} - ¦--expr: [2/0] {36} - ¦ ¦--expr: [0/1] {38} + ¦--expr: x <- [2/0] {36} + ¦ ¦--expr: x [0/1] {38} ¦ ¦ °--SYMBOL: x [0/0] {37} ¦ ¦--LEFT_ASSIGN: <- [0/1] {39} - ¦ °--expr: [0/0] {41} + ¦ °--expr: '\001 [0/0] {41} ¦ °--STR_CONST: '\001 [0/0] {40} - ¦--expr: [1/0] {43} + ¦--expr: '\x01 [1/0] {43} ¦ °--STR_CONST: '\x01 [0/0] {42} ¦--COMMENT: # FIX [2/0] {44} °--COMMENT: # FIX [1/0] {45} diff --git a/tests/testthat/fun_dec/fun_dec_scope_spaces-in_tree b/tests/testthat/fun_dec/fun_dec_scope_spaces-in_tree index c3c4ec139..4fad90015 100644 --- a/tests/testthat/fun_dec/fun_dec_scope_spaces-in_tree +++ b/tests/testthat/fun_dec/fun_dec_scope_spaces-in_tree @@ -1,9 +1,9 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} - ¦ ¦--expr: [0/1] {3} + ¦--expr: a <- [0/0] {1} + ¦ ¦--expr: a [0/1] {3} ¦ ¦ °--SYMBOL: a [0/0] {2} ¦ ¦--LEFT_ASSIGN: <- [0/1] {4} - ¦ °--expr: [0/0] {5} + ¦ °--expr: funct [0/0] {5} ¦ ¦--FUNCTION: funct [0/0] {6} ¦ ¦--'(': ( [0/0] {7} ¦ ¦--SYMBOL_FORMALS: x [0/0] {8} @@ -11,20 +11,21 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦ ¦--COMMENT: # [0/0] {10} ¦ ¦--SYMBOL_FORMALS: y [1/0] {11} ¦ ¦--')': ) [1/1] {12} - ¦ °--expr: [0/0] {13} + ¦ °--expr: { + x [0/0] {13} ¦ ¦--'{': { [0/2] {14} - ¦ ¦--expr: [1/0] {15} - ¦ ¦ ¦--expr: [0/1] {17} + ¦ ¦--expr: x - 1 [1/0] {15} + ¦ ¦ ¦--expr: x [0/1] {17} ¦ ¦ ¦ °--SYMBOL: x [0/0] {16} ¦ ¦ ¦--'-': - [0/1] {18} - ¦ ¦ °--expr: [0/0] {20} + ¦ ¦ °--expr: 1 [0/0] {20} ¦ ¦ °--NUM_CONST: 1 [0/0] {19} ¦ °--'}': } [1/0] {21} - ¦--expr: [3/0] {22} - ¦ ¦--expr: [0/1] {24} + ¦--expr: a <- [3/0] {22} + ¦ ¦--expr: a [0/1] {24} ¦ ¦ °--SYMBOL: a [0/0] {23} ¦ ¦--LEFT_ASSIGN: <- [0/1] {25} - ¦ °--expr: [0/0] {26} + ¦ °--expr: funct [0/0] {26} ¦ ¦--FUNCTION: funct [0/0] {27} ¦ ¦--'(': ( [0/0] {28} ¦ ¦--SYMBOL_FORMALS: x [0/0] {29} @@ -33,47 +34,50 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦ ¦--SYMBOL_FORMALS: y [1/0] {32} ¦ ¦--')': ) [0/1] {33} ¦ ¦--COMMENT: # [0/0] {34} - ¦ °--expr: [1/0] {35} + ¦ °--expr: { + x [1/0] {35} ¦ ¦--'{': { [0/2] {36} - ¦ ¦--expr: [1/0] {38} + ¦ ¦--expr: x [1/0] {38} ¦ ¦ °--SYMBOL: x [0/0] {37} ¦ °--'}': } [1/0] {39} - ¦--expr: [2/0] {40} + ¦--expr: funct [2/0] {40} ¦ ¦--FUNCTION: funct [0/0] {41} ¦ ¦--'(': ( [0/0] {42} ¦ ¦--SYMBOL_FORMALS: a [0/1] {43} ¦ ¦--EQ_FORMALS: = [0/11] {44} - ¦ ¦--expr: [1/0] {46} + ¦ ¦--expr: b [1/0] {46} ¦ ¦ °--SYMBOL: b [0/0] {45} ¦ ¦--',': , [0/9] {47} ¦ ¦--SYMBOL_FORMALS: c [1/0] {48} ¦ ¦--')': ) [0/1] {49} - ¦ °--expr: [0/0] {50} + ¦ °--expr: {} [0/0] {50} ¦ ¦--'{': { [0/0] {51} ¦ °--'}': } [0/0] {52} - ¦--expr: [2/0] {53} + ¦--expr: funct [2/0] {53} ¦ ¦--FUNCTION: funct [0/0] {54} ¦ ¦--'(': ( [0/0] {55} ¦ ¦--SYMBOL_FORMALS: a [0/1] {56} ¦ ¦--EQ_FORMALS: = [0/11] {57} - ¦ ¦--expr: [1/0] {59} + ¦ ¦--expr: b [1/0] {59} ¦ ¦ °--SYMBOL: b [0/0] {58} ¦ ¦--',': , [0/9] {60} ¦ ¦--SYMBOL_FORMALS: c [1/0] {61} ¦ ¦--')': ) [0/1] {62} - ¦ °--expr: [0/0] {63} + ¦ °--expr: { + +} [0/0] {63} ¦ ¦--'{': { [0/0] {64} ¦ °--'}': } [2/0] {65} - °--expr: [2/0] {66} + °--expr: funct [2/0] {66} ¦--FUNCTION: funct [0/0] {67} ¦--'(': ( [0/0] {68} ¦--SYMBOL_FORMALS: a [0/1] {69} ¦--EQ_FORMALS: = [0/11] {70} - ¦--expr: [1/0] {72} + ¦--expr: b [1/0] {72} ¦ °--SYMBOL: b [0/0] {71} ¦--',': , [0/9] {73} ¦--SYMBOL_FORMALS: c [1/0] {74} ¦--')': ) [1/1] {75} - °--expr: [0/0] {76} + °--expr: {} [0/0] {76} ¦--'{': { [0/0] {77} °--'}': } [0/0] {78} diff --git a/tests/testthat/fun_dec/line_break_fun_dec-in_tree b/tests/testthat/fun_dec/line_break_fun_dec-in_tree index a37d37a6e..8fb8259be 100644 --- a/tests/testthat/fun_dec/line_break_fun_dec-in_tree +++ b/tests/testthat/fun_dec/line_break_fun_dec-in_tree @@ -1,9 +1,9 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} - ¦ ¦--expr: [0/1] {3} + ¦--expr: a <- [0/0] {1} + ¦ ¦--expr: a [0/1] {3} ¦ ¦ °--SYMBOL: a [0/0] {2} ¦ ¦--LEFT_ASSIGN: <- [0/1] {4} - ¦ °--expr: [0/0] {5} + ¦ °--expr: funct [0/0] {5} ¦ ¦--FUNCTION: funct [0/0] {6} ¦ ¦--'(': ( [0/0] {7} ¦ ¦--SYMBOL_FORMALS: x [0/0] {8} @@ -11,20 +11,21 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦ ¦--COMMENT: # [0/14] {10} ¦ ¦--SYMBOL_FORMALS: y [1/14] {11} ¦ ¦--')': ) [1/1] {12} - ¦ °--expr: [0/0] {13} + ¦ °--expr: { + x [0/0] {13} ¦ ¦--'{': { [0/2] {14} - ¦ ¦--expr: [1/0] {15} - ¦ ¦ ¦--expr: [0/1] {17} + ¦ ¦--expr: x - 1 [1/0] {15} + ¦ ¦ ¦--expr: x [0/1] {17} ¦ ¦ ¦ °--SYMBOL: x [0/0] {16} ¦ ¦ ¦--'-': - [0/1] {18} - ¦ ¦ °--expr: [0/0] {20} + ¦ ¦ °--expr: 1 [0/0] {20} ¦ ¦ °--NUM_CONST: 1 [0/0] {19} ¦ °--'}': } [1/0] {21} - ¦--expr: [3/0] {22} - ¦ ¦--expr: [0/1] {24} + ¦--expr: a <- [3/0] {22} + ¦ ¦--expr: a [0/1] {24} ¦ ¦ °--SYMBOL: a [0/0] {23} ¦ ¦--LEFT_ASSIGN: <- [0/1] {25} - ¦ °--expr: [0/0] {26} + ¦ °--expr: funct [0/0] {26} ¦ ¦--FUNCTION: funct [0/0] {27} ¦ ¦--'(': ( [0/0] {28} ¦ ¦--SYMBOL_FORMALS: x [0/0] {29} @@ -33,16 +34,17 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦ ¦--SYMBOL_FORMALS: y [1/0] {32} ¦ ¦--')': ) [0/1] {33} ¦ ¦--COMMENT: # [0/0] {34} - ¦ °--expr: [1/0] {35} + ¦ °--expr: { + x [1/0] {35} ¦ ¦--'{': { [0/2] {36} - ¦ ¦--expr: [1/0] {38} + ¦ ¦--expr: x [1/0] {38} ¦ ¦ °--SYMBOL: x [0/0] {37} ¦ °--'}': } [1/0] {39} - °--expr: [2/0] {40} - ¦--expr: [0/1] {42} + °--expr: a <- [2/0] {40} + ¦--expr: a [0/1] {42} ¦ °--SYMBOL: a [0/0] {41} ¦--LEFT_ASSIGN: <- [0/1] {43} - °--expr: [0/0] {44} + °--expr: funct [0/0] {44} ¦--FUNCTION: funct [0/0] {45} ¦--'(': ( [0/0] {46} ¦--SYMBOL_FORMALS: x [0/0] {47} @@ -51,8 +53,9 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--SYMBOL_FORMALS: y [1/1] {50} ¦--COMMENT: # [0/12] {51} ¦--')': ) [1/1] {52} - °--expr: [0/0] {53} + °--expr: { + y [0/0] {53} ¦--'{': { [0/2] {54} - ¦--expr: [1/0] {56} + ¦--expr: y [1/0] {56} ¦ °--SYMBOL: y [0/0] {55} °--'}': } [1/0] {57} diff --git a/tests/testthat/helpers-devel-options.R b/tests/testthat/helpers-devel-options.R index 8751489f7..926df3260 100644 --- a/tests/testthat/helpers-devel-options.R +++ b/tests/testthat/helpers-devel-options.R @@ -1,2 +1,6 @@ cat("In tests/testthat/helpers-devel-options: ") cache_deactivate() + +styler_version <- utils::packageDescription("styler", fields = "Version") +clear_testthat_cache <- purrr::partial(cache_clear, "testthat", ask = FALSE) +activate_testthat_cache <- purrr::partial(cache_activate, "testthat") diff --git a/tests/testthat/indention_curly_brackets/multi_line_curly_only-in_tree b/tests/testthat/indention_curly_brackets/multi_line_curly_only-in_tree index 687eb554a..1205a1a3f 100644 --- a/tests/testthat/indention_curly_brackets/multi_line_curly_only-in_tree +++ b/tests/testthat/indention_curly_brackets/multi_line_curly_only-in_tree @@ -1,26 +1,27 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: [0/0] {1} + °--expr: { + [0/0] {1} ¦--'{': { [0/9] {2} - ¦--expr: [1/0] {3} + ¦--expr: {1 + [1/0] {3} ¦ ¦--'{': { [0/0] {4} - ¦ ¦--expr: [0/0] {5} - ¦ ¦ ¦--expr: [0/1] {7} + ¦ ¦--expr: 1 + 3 [0/0] {5} + ¦ ¦ ¦--expr: 1 [0/1] {7} ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {6} ¦ ¦ ¦--'+': + [0/1] {8} - ¦ ¦ °--expr: [0/0] {10} + ¦ ¦ °--expr: 3 [0/0] {10} ¦ ¦ °--NUM_CONST: 3 [0/0] {9} ¦ °--'}': } [0/0] {11} - ¦--expr: [1/6] {12} + ¦--expr: {2 + [1/6] {12} ¦ ¦--'{': { [0/0] {13} - ¦ ¦--expr: [0/0] {14} - ¦ ¦ ¦--expr: [0/1] {16} + ¦ ¦--expr: 2 + s [0/0] {14} + ¦ ¦ ¦--expr: 2 [0/1] {16} ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {15} ¦ ¦ ¦--'+': + [0/1] {17} - ¦ ¦ °--expr: [0/0] {18} - ¦ ¦ ¦--expr: [0/0] {20} + ¦ ¦ °--expr: sin(p [0/0] {18} + ¦ ¦ ¦--expr: sin [0/0] {20} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: sin [0/0] {19} ¦ ¦ ¦--'(': ( [0/0] {21} - ¦ ¦ ¦--expr: [0/0] {23} + ¦ ¦ ¦--expr: pi [0/0] {23} ¦ ¦ ¦ °--SYMBOL: pi [0/0] {22} ¦ ¦ °--')': ) [0/0] {24} ¦ °--'}': } [0/0] {25} diff --git a/tests/testthat/indention_curly_brackets/multi_line_curly_round_only-in_tree b/tests/testthat/indention_curly_brackets/multi_line_curly_round_only-in_tree index ba8432bc1..8c1eda02c 100644 --- a/tests/testthat/indention_curly_brackets/multi_line_curly_round_only-in_tree +++ b/tests/testthat/indention_curly_brackets/multi_line_curly_round_only-in_tree @@ -1,58 +1,61 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: [0/0] {1} - ¦--expr: [0/1] {3} + °--expr: a <- [0/0] {1} + ¦--expr: a [0/1] {3} ¦ °--SYMBOL: a [0/0] {2} ¦--LEFT_ASSIGN: <- [0/1] {4} - °--expr: [0/0] {5} + °--expr: funct [0/0] {5} ¦--FUNCTION: funct [0/0] {6} ¦--'(': ( [0/0] {7} ¦--SYMBOL_FORMALS: x [0/0] {8} ¦--')': ) [0/1] {9} - °--expr: [0/0] {10} + °--expr: { +x < [0/0] {10} ¦--'{': { [0/0] {11} - ¦--expr: [1/0] {12} - ¦ ¦--expr: [0/1] {14} + ¦--expr: x <- [1/0] {12} + ¦ ¦--expr: x [0/1] {14} ¦ ¦ °--SYMBOL: x [0/0] {13} ¦ ¦--LEFT_ASSIGN: <- [0/1] {15} - ¦ °--expr: [0/0] {16} - ¦ ¦--expr: [0/0] {18} + ¦ °--expr: c(1, + [0/0] {16} + ¦ ¦--expr: c [0/0] {18} ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {17} ¦ ¦--'(': ( [0/0] {19} - ¦ ¦--expr: [0/0] {21} + ¦ ¦--expr: 1 [0/0] {21} ¦ ¦ °--NUM_CONST: 1 [0/0] {20} ¦ ¦--',': , [0/7] {22} - ¦ ¦--expr: [1/0] {23} - ¦ ¦ ¦--expr: [0/1] {25} + ¦ ¦--expr: 2 + 3 [1/0] {23} + ¦ ¦ ¦--expr: 2 [0/1] {25} ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {24} ¦ ¦ ¦--'+': + [0/1] {26} - ¦ ¦ °--expr: [0/0] {28} + ¦ ¦ °--expr: 3 [0/0] {28} ¦ ¦ °--NUM_CONST: 3 [0/0] {27} ¦ ¦--',': , [0/0] {29} - ¦ ¦--expr: [1/0] {30} - ¦ ¦ ¦--expr: [0/0] {32} + ¦ ¦--expr: sin(p [1/0] {30} + ¦ ¦ ¦--expr: sin [0/0] {32} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: sin [0/0] {31} ¦ ¦ ¦--'(': ( [0/0] {33} - ¦ ¦ ¦--expr: [0/0] {35} + ¦ ¦ ¦--expr: pi [0/0] {35} ¦ ¦ ¦ °--SYMBOL: pi [0/0] {34} ¦ ¦ °--')': ) [0/0] {36} ¦ °--')': ) [0/0] {37} - ¦--expr: [2/8] {38} + ¦--expr: if(x [2/8] {38} ¦ ¦--IF: if [0/0] {39} ¦ ¦--'(': ( [0/0] {40} - ¦ ¦--expr: [0/0] {41} - ¦ ¦ ¦--expr: [0/1] {43} + ¦ ¦--expr: x > 1 [0/0] {41} + ¦ ¦ ¦--expr: x [0/1] {43} ¦ ¦ ¦ °--SYMBOL: x [0/0] {42} ¦ ¦ ¦--GT: > [0/1] {44} - ¦ ¦ °--expr: [0/0] {46} + ¦ ¦ °--expr: 10 [0/0] {46} ¦ ¦ °--NUM_CONST: 10 [0/0] {45} ¦ ¦--')': ) [0/1] {47} - ¦ °--expr: [0/0] {48} + ¦ °--expr: { + [0/0] {48} ¦ ¦--'{': { [0/4] {49} - ¦ ¦--expr: [1/16] {50} - ¦ ¦ ¦--expr: [0/0] {52} + ¦ ¦--expr: retur [1/16] {50} + ¦ ¦ ¦--expr: retur [0/0] {52} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: retur [0/0] {51} ¦ ¦ ¦--'(': ( [0/0] {53} - ¦ ¦ ¦--expr: [0/0] {55} + ¦ ¦ ¦--expr: "done [0/0] {55} ¦ ¦ ¦ °--STR_CONST: "done [0/0] {54} ¦ ¦ °--')': ) [0/0] {56} ¦ °--'}': } [1/0] {57} diff --git a/tests/testthat/indention_curly_brackets/multi_line_curly_round_spacing-in_tree b/tests/testthat/indention_curly_brackets/multi_line_curly_round_spacing-in_tree index 45cc88db3..67285abef 100644 --- a/tests/testthat/indention_curly_brackets/multi_line_curly_round_spacing-in_tree +++ b/tests/testthat/indention_curly_brackets/multi_line_curly_round_spacing-in_tree @@ -1,58 +1,61 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: [0/0] {1} - ¦--expr: [0/0] {3} + °--expr: b<-fu [0/0] {1} + ¦--expr: b [0/0] {3} ¦ °--SYMBOL: b [0/0] {2} ¦--LEFT_ASSIGN: <- [0/0] {4} - °--expr: [0/0] {5} + °--expr: funct [0/0] {5} ¦--FUNCTION: funct [0/0] {6} ¦--'(': ( [0/0] {7} ¦--SYMBOL_FORMALS: x [0/3] {8} ¦--')': ) [0/0] {9} - °--expr: [0/0] {10} + °--expr: { + x [0/0] {10} ¦--'{': { [0/2] {11} - ¦--expr: [1/2] {12} - ¦ ¦--expr: [0/1] {14} + ¦--expr: x <- [1/2] {12} + ¦ ¦--expr: x [0/1] {14} ¦ ¦ °--SYMBOL: x [0/0] {13} ¦ ¦--LEFT_ASSIGN: <- [0/1] {15} - ¦ °--expr: [0/0] {16} - ¦ ¦--expr: [0/0] {18} + ¦ °--expr: c(1, + [0/0] {16} + ¦ ¦--expr: c [0/0] {18} ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {17} ¦ ¦--'(': ( [0/0] {19} - ¦ ¦--expr: [0/0] {21} + ¦ ¦--expr: 1 [0/0] {21} ¦ ¦ °--NUM_CONST: 1 [0/0] {20} ¦ ¦--',': , [0/19] {22} - ¦ ¦--expr: [1/0] {23} - ¦ ¦ ¦--expr: [0/0] {25} + ¦ ¦--expr: 2+ [1/0] {23} + ¦ ¦ ¦--expr: 2 [0/0] {25} ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {24} ¦ ¦ ¦--'+': + [0/5] {26} - ¦ ¦ °--expr: [0/0] {28} + ¦ ¦ °--expr: 3 [0/0] {28} ¦ ¦ °--NUM_CONST: 3 [0/0] {27} ¦ ¦--',': , [0/9] {29} - ¦ ¦--expr: [1/1] {30} - ¦ ¦ ¦--expr: [0/0] {32} + ¦ ¦--expr: sin(p [1/1] {30} + ¦ ¦ ¦--expr: sin [0/0] {32} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: sin [0/0] {31} ¦ ¦ ¦--'(': ( [0/0] {33} - ¦ ¦ ¦--expr: [0/0] {35} + ¦ ¦ ¦--expr: pi [0/0] {35} ¦ ¦ ¦ °--SYMBOL: pi [0/0] {34} ¦ ¦ °--')': ) [0/0] {36} ¦ °--')': ) [0/0] {37} - ¦--expr: [2/20] {38} + ¦--expr: if(x [2/20] {38} ¦ ¦--IF: if [0/0] {39} ¦ ¦--'(': ( [0/0] {40} - ¦ ¦--expr: [0/0] {41} - ¦ ¦ ¦--expr: [0/1] {43} + ¦ ¦--expr: x > 1 [0/0] {41} + ¦ ¦ ¦--expr: x [0/1] {43} ¦ ¦ ¦ °--SYMBOL: x [0/0] {42} ¦ ¦ ¦--GT: > [0/1] {44} - ¦ ¦ °--expr: [0/0] {46} + ¦ ¦ °--expr: 10 [0/0] {46} ¦ ¦ °--NUM_CONST: 10 [0/0] {45} ¦ ¦--')': ) [0/0] {47} - ¦ °--expr: [0/0] {48} + ¦ °--expr: { +ret [0/0] {48} ¦ ¦--'{': { [0/0] {49} - ¦ ¦--expr: [1/2] {50} - ¦ ¦ ¦--expr: [0/0] {52} + ¦ ¦--expr: retur [1/2] {50} + ¦ ¦ ¦--expr: retur [0/0] {52} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: retur [0/0] {51} ¦ ¦ ¦--'(': ( [0/0] {53} - ¦ ¦ ¦--expr: [0/0] {55} + ¦ ¦ ¦--expr: "done [0/0] {55} ¦ ¦ ¦ °--STR_CONST: "done [0/0] {54} ¦ ¦ °--')': ) [0/0] {56} ¦ °--'}': } [1/0] {57} diff --git a/tests/testthat/indention_curly_brackets/multi_line_curly_while_for_if_fun-in_tree b/tests/testthat/indention_curly_brackets/multi_line_curly_while_for_if_fun-in_tree index 3a62a3ecc..99ff47e9c 100644 --- a/tests/testthat/indention_curly_brackets/multi_line_curly_while_for_if_fun-in_tree +++ b/tests/testthat/indention_curly_brackets/multi_line_curly_while_for_if_fun-in_tree @@ -1,9 +1,9 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: [0/0] {1} - ¦--expr: [0/1] {3} + °--expr: a <- [0/0] {1} + ¦--expr: a [0/1] {3} ¦ °--SYMBOL: a [0/0] {2} ¦--LEFT_ASSIGN: <- [0/1] {4} - °--expr: [0/0] {5} + °--expr: funct [0/0] {5} ¦--FUNCTION: funct [0/0] {6} ¦--'(': ( [0/0] {7} ¦--SYMBOL_FORMALS: x [0/0] {8} @@ -12,74 +12,78 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--',': , [0/1] {11} ¦--SYMBOL_FORMALS: z [0/0] {12} ¦--')': ) [0/12] {13} - °--expr: [0/0] {14} + °--expr: { + w [0/0] {14} ¦--'{': { [0/2] {15} - ¦--expr: [1/6] {16} + ¦--expr: while [1/6] {16} ¦ ¦--WHILE: while [0/0] {17} ¦ ¦--'(': ( [0/0] {18} - ¦ ¦--expr: [0/0] {19} - ¦ ¦ ¦--expr: [0/0] {20} - ¦ ¦ ¦ ¦--expr: [0/0] {22} + ¦ ¦--expr: 2+2> [0/0] {19} + ¦ ¦ ¦--expr: 2+2 [0/0] {20} + ¦ ¦ ¦ ¦--expr: 2 [0/0] {22} ¦ ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {21} ¦ ¦ ¦ ¦--'+': + [0/0] {23} - ¦ ¦ ¦ °--expr: [0/0] {25} + ¦ ¦ ¦ °--expr: 2 [0/0] {25} ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {24} ¦ ¦ ¦--GT: > [0/1] {26} - ¦ ¦ °--expr: [0/0] {27} - ¦ ¦ ¦--expr: [0/0] {29} + ¦ ¦ °--expr: call( [0/0] {27} + ¦ ¦ ¦--expr: call [0/0] {29} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {28} ¦ ¦ ¦--'(': ( [0/0] {30} - ¦ ¦ ¦--expr: [0/0] {32} + ¦ ¦ ¦--expr: 3 [0/0] {32} ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {31} ¦ ¦ ¦--',': , [0/0] {33} - ¦ ¦ ¦--expr: [0/0] {35} + ¦ ¦ ¦--expr: 1 [0/0] {35} ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {34} ¦ ¦ °--')': ) [0/0] {36} ¦ ¦--')': ) [0/1] {37} - ¦ °--expr: [0/0] {38} + ¦ °--expr: { + [0/0] {38} ¦ ¦--'{': { [0/4] {39} - ¦ ¦--expr: [1/4] {40} + ¦ ¦--expr: if (i [1/4] {40} ¦ ¦ ¦--IF: if [0/1] {41} ¦ ¦ ¦--'(': ( [0/0] {42} - ¦ ¦ ¦--expr: [0/0] {43} - ¦ ¦ ¦ ¦--expr: [0/0] {45} + ¦ ¦ ¦--expr: isTRU [0/0] {43} + ¦ ¦ ¦ ¦--expr: isTRU [0/0] {45} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: isTRU [0/0] {44} ¦ ¦ ¦ ¦--'(': ( [0/0] {46} - ¦ ¦ ¦ ¦--expr: [0/0] {48} + ¦ ¦ ¦ ¦--expr: x [0/0] {48} ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {47} ¦ ¦ ¦ °--')': ) [0/0] {49} ¦ ¦ ¦--')': ) [0/1] {50} - ¦ ¦ °--expr: [0/0] {51} + ¦ ¦ °--expr: { + [0/0] {51} ¦ ¦ ¦--'{': { [0/6] {52} - ¦ ¦ ¦--expr: [1/0] {54} + ¦ ¦ ¦--expr: b [1/0] {54} ¦ ¦ ¦ °--SYMBOL: b [0/0] {53} ¦ ¦ °--'}': } [1/0] {55} ¦ °--'}': } [1/0] {56} - ¦--expr: [1/0] {57} + ¦--expr: for(a [1/0] {57} ¦ ¦--FOR: for [0/0] {58} - ¦ ¦--forcond: [0/0] {59} + ¦ ¦--forcond: (a in [0/0] {59} ¦ ¦ ¦--'(': ( [0/0] {60} ¦ ¦ ¦--SYMBOL: a [0/1] {61} ¦ ¦ ¦--IN: in [0/1] {62} - ¦ ¦ ¦--expr: [0/0] {63} - ¦ ¦ ¦ ¦--expr: [0/0] {65} + ¦ ¦ ¦--expr: 1:19 [0/0] {63} + ¦ ¦ ¦ ¦--expr: 1 [0/0] {65} ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {64} ¦ ¦ ¦ ¦--':': : [0/0] {66} - ¦ ¦ ¦ °--expr: [0/0] {68} + ¦ ¦ ¦ °--expr: 19 [0/0] {68} ¦ ¦ ¦ °--NUM_CONST: 19 [0/0] {67} ¦ ¦ °--')': ) [0/0] {69} - ¦ °--expr: [0/0] {70} + ¦ °--expr: { + [0/0] {70} ¦ ¦--'{': { [0/4] {71} - ¦ ¦--expr: [1/2] {72} - ¦ ¦ ¦--expr: [0/1] {73} - ¦ ¦ ¦ ¦--expr: [0/0] {75} + ¦ ¦--expr: x[i] [1/2] {72} + ¦ ¦ ¦--expr: x[i] [0/1] {73} + ¦ ¦ ¦ ¦--expr: x [0/0] {75} ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {74} ¦ ¦ ¦ ¦--'[': [ [0/0] {76} - ¦ ¦ ¦ ¦--expr: [0/0] {78} + ¦ ¦ ¦ ¦--expr: i [0/0] {78} ¦ ¦ ¦ ¦ °--SYMBOL: i [0/0] {77} ¦ ¦ ¦ °--']': ] [0/0] {79} ¦ ¦ ¦--'+': + [0/0] {80} - ¦ ¦ °--expr: [0/0] {82} + ¦ ¦ °--expr: 1 [0/0] {82} ¦ ¦ °--NUM_CONST: 1 [0/0] {81} ¦ °--'}': } [1/0] {83} °--'}': } [1/0] {84} diff --git a/tests/testthat/indention_curly_brackets/one_line_curly-in_tree b/tests/testthat/indention_curly_brackets/one_line_curly-in_tree index 7e2dba564..20ecfb8ac 100644 --- a/tests/testthat/indention_curly_brackets/one_line_curly-in_tree +++ b/tests/testthat/indention_curly_brackets/one_line_curly-in_tree @@ -1,14 +1,14 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: [0/0] {1} - ¦--expr: [0/1] {3} + °--expr: a <- [0/0] {1} + ¦--expr: a [0/1] {3} ¦ °--SYMBOL: a [0/0] {2} ¦--LEFT_ASSIGN: <- [0/1] {4} - °--expr: [0/0] {5} + °--expr: {1+1} [0/0] {5} ¦--'{': { [0/0] {6} - ¦--expr: [0/0] {7} - ¦ ¦--expr: [0/0] {9} + ¦--expr: 1+1 [0/0] {7} + ¦ ¦--expr: 1 [0/0] {9} ¦ ¦ °--NUM_CONST: 1 [0/0] {8} ¦ ¦--'+': + [0/0] {10} - ¦ °--expr: [0/0] {12} + ¦ °--expr: 1 [0/0] {12} ¦ °--NUM_CONST: 1 [0/0] {11} °--'}': } [0/0] {13} diff --git a/tests/testthat/indention_fun_calls/non_strict_calls-in_tree b/tests/testthat/indention_fun_calls/non_strict_calls-in_tree index 8440d2a42..1d50cd650 100644 --- a/tests/testthat/indention_fun_calls/non_strict_calls-in_tree +++ b/tests/testthat/indention_fun_calls/non_strict_calls-in_tree @@ -1,121 +1,121 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} - ¦ ¦--expr: [0/0] {3} + ¦--expr: call( [0/0] {1} + ¦ ¦--expr: call [0/0] {3} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {2} ¦ ¦--'(': ( [0/0] {4} - ¦ ¦--expr: [0/0] {6} + ¦ ¦--expr: a [0/0] {6} ¦ ¦ °--SYMBOL: a [0/0] {5} ¦ ¦--',': , [0/5] {7} - ¦ ¦--expr: [1/0] {9} + ¦ ¦--expr: b [1/0] {9} ¦ ¦ °--SYMBOL: b [0/0] {8} ¦ °--')': ) [0/0] {10} - ¦--expr: [2/0] {11} - ¦ ¦--expr: [0/0] {13} + ¦--expr: call( [2/0] {11} + ¦ ¦--expr: call [0/0] {13} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {12} ¦ ¦--'(': ( [0/0] {14} - ¦ ¦--expr: [0/0] {16} + ¦ ¦--expr: a [0/0] {16} ¦ ¦ °--SYMBOL: a [0/0] {15} ¦ ¦--',': , [0/5] {17} ¦ ¦--SYMBOL_SUB: b [1/1] {18} ¦ ¦--EQ_SUB: = [0/1] {19} - ¦ ¦--expr: [0/0] {21} + ¦ ¦--expr: 3 [0/0] {21} ¦ ¦ °--NUM_CONST: 3 [0/0] {20} ¦ °--')': ) [0/0] {22} - ¦--expr: [2/0] {23} - ¦ ¦--expr: [0/0] {25} + ¦--expr: call( [2/0] {23} + ¦ ¦--expr: call [0/0] {25} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {24} ¦ ¦--'(': ( [0/0] {26} ¦ ¦--SYMBOL_SUB: a [0/1] {27} ¦ ¦--EQ_SUB: = [0/1] {28} - ¦ ¦--expr: [0/0] {30} + ¦ ¦--expr: 1 [0/0] {30} ¦ ¦ °--NUM_CONST: 1 [0/0] {29} ¦ ¦--',': , [0/1] {31} ¦ ¦--SYMBOL_SUB: b [0/1] {32} ¦ ¦--EQ_SUB: = [0/7] {33} - ¦ ¦--expr: [1/0] {35} + ¦ ¦--expr: 3 [1/0] {35} ¦ ¦ °--NUM_CONST: 3 [0/0] {34} ¦ °--')': ) [0/0] {36} - ¦--expr: [2/0] {37} - ¦ ¦--expr: [0/0] {39} + ¦--expr: call( [2/0] {37} + ¦ ¦--expr: call [0/0] {39} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {38} ¦ ¦--'(': ( [0/0] {40} ¦ ¦--SYMBOL_SUB: a [0/1] {41} ¦ ¦--EQ_SUB: = [0/7] {42} - ¦ ¦--expr: [1/0] {44} + ¦ ¦--expr: 1 [1/0] {44} ¦ ¦ °--NUM_CONST: 1 [0/0] {43} ¦ ¦--',': , [0/1] {45} ¦ ¦--SYMBOL_SUB: b [0/1] {46} ¦ ¦--EQ_SUB: = [0/1] {47} - ¦ ¦--expr: [0/0] {49} + ¦ ¦--expr: 3 [0/0] {49} ¦ ¦ °--NUM_CONST: 3 [0/0] {48} ¦ °--')': ) [0/0] {50} - ¦--expr: [2/0] {51} - ¦ ¦--expr: [0/0] {53} + ¦--expr: call( [2/0] {51} + ¦ ¦--expr: call [0/0] {53} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {52} ¦ ¦--'(': ( [0/0] {54} ¦ ¦--SYMBOL_SUB: a [0/1] {55} ¦ ¦--EQ_SUB: = [0/1] {56} - ¦ ¦--expr: [0/0] {58} + ¦ ¦--expr: 1 [0/0] {58} ¦ ¦ °--NUM_CONST: 1 [0/0] {57} ¦ ¦--',': , [0/2] {59} ¦ ¦--SYMBOL_SUB: b [1/1] {60} ¦ ¦--EQ_SUB: = [0/1] {61} - ¦ ¦--expr: [0/0] {63} + ¦ ¦--expr: 3 [0/0] {63} ¦ ¦ °--NUM_CONST: 3 [0/0] {62} ¦ °--')': ) [1/0] {64} - ¦--expr: [2/0] {65} - ¦ ¦--expr: [0/0] {67} + ¦--expr: call( [2/0] {65} + ¦ ¦--expr: call [0/0] {67} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {66} ¦ ¦--'(': ( [0/2] {68} ¦ ¦--SYMBOL_SUB: a [1/1] {69} ¦ ¦--EQ_SUB: = [0/1] {70} - ¦ ¦--expr: [0/0] {72} + ¦ ¦--expr: 1 [0/0] {72} ¦ ¦ °--NUM_CONST: 1 [0/0] {71} ¦ ¦--',': , [0/2] {73} ¦ ¦--SYMBOL_SUB: b [1/1] {74} ¦ ¦--EQ_SUB: = [0/1] {75} - ¦ ¦--expr: [0/0] {77} + ¦ ¦--expr: 3 [0/0] {77} ¦ ¦ °--NUM_CONST: 3 [0/0] {76} ¦ °--')': ) [1/0] {78} - ¦--expr: [2/0] {79} - ¦ ¦--expr: [0/0] {81} + ¦--expr: call( [2/0] {79} + ¦ ¦--expr: call [0/0] {81} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {80} ¦ ¦--'(': ( [0/2] {82} ¦ ¦--SYMBOL_SUB: a [1/1] {83} ¦ ¦--EQ_SUB: = [0/4] {84} - ¦ ¦--expr: [1/0] {86} + ¦ ¦--expr: 1 [1/0] {86} ¦ ¦ °--NUM_CONST: 1 [0/0] {85} ¦ ¦--',': , [0/2] {87} ¦ ¦--SYMBOL_SUB: b [1/1] {88} ¦ ¦--EQ_SUB: = [0/1] {89} - ¦ ¦--expr: [0/0] {91} + ¦ ¦--expr: 3 [0/0] {91} ¦ ¦ °--NUM_CONST: 3 [0/0] {90} ¦ °--')': ) [1/0] {92} - ¦--expr: [2/0] {93} - ¦ ¦--expr: [0/0] {95} + ¦--expr: call( [2/0] {93} + ¦ ¦--expr: call [0/0] {95} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {94} ¦ ¦--'(': ( [0/2] {96} ¦ ¦--SYMBOL_SUB: a [1/1] {97} ¦ ¦--EQ_SUB: = [0/4] {98} - ¦ ¦--expr: [1/0] {100} + ¦ ¦--expr: 1 [1/0] {100} ¦ ¦ °--NUM_CONST: 1 [0/0] {99} ¦ ¦--',': , [0/1] {101} ¦ ¦--SYMBOL_SUB: b [0/1] {102} ¦ ¦--EQ_SUB: = [0/1] {103} - ¦ ¦--expr: [0/0] {105} + ¦ ¦--expr: 3 [0/0] {105} ¦ ¦ °--NUM_CONST: 3 [0/0] {104} ¦ °--')': ) [1/0] {106} - °--expr: [2/0] {107} - ¦--expr: [0/0] {109} + °--expr: call( [2/0] {107} + ¦--expr: call [0/0] {109} ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {108} ¦--'(': ( [0/2] {110} ¦--SYMBOL_SUB: a [1/1] {111} ¦--EQ_SUB: = [0/4] {112} - ¦--expr: [1/0] {114} + ¦--expr: 1 [1/0] {114} ¦ °--NUM_CONST: 1 [0/0] {113} ¦--',': , [0/1] {115} ¦--SYMBOL_SUB: b [0/1] {116} ¦--EQ_SUB: = [0/4] {117} - ¦--expr: [1/0] {119} + ¦--expr: 3 [1/0] {119} ¦ °--NUM_CONST: 3 [0/0] {118} °--')': ) [1/0] {120} diff --git a/tests/testthat/indention_fun_calls/strict_calls-in_tree b/tests/testthat/indention_fun_calls/strict_calls-in_tree index 6c2575f20..36a0c9a05 100644 --- a/tests/testthat/indention_fun_calls/strict_calls-in_tree +++ b/tests/testthat/indention_fun_calls/strict_calls-in_tree @@ -1,25 +1,25 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: [0/0] {1} - ¦--expr: [0/0] {3} + °--expr: call( [0/0] {1} + ¦--expr: call [0/0] {3} ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {2} ¦--'(': ( [0/0] {4} - ¦--expr: [1/3] {5} - ¦ ¦--expr: [0/0] {7} + ¦--expr: call( [1/3] {5} + ¦ ¦--expr: call [0/0] {7} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {6} ¦ ¦--'(': ( [0/3] {8} - ¦ ¦--expr: [1/0] {9} - ¦ ¦ ¦--expr: [0/0] {11} + ¦ ¦--expr: call( [1/0] {9} + ¦ ¦ ¦--expr: call [0/0] {11} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {10} ¦ ¦ ¦--'(': ( [0/0] {12} - ¦ ¦ ¦--expr: [1/3] {13} - ¦ ¦ ¦ ¦--expr: [0/0] {15} + ¦ ¦ ¦--expr: call( [1/3] {13} + ¦ ¦ ¦ ¦--expr: call [0/0] {15} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {14} ¦ ¦ ¦ ¦--'(': ( [0/10] {16} - ¦ ¦ ¦ ¦--expr: [1/0] {17} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {19} + ¦ ¦ ¦ ¦--expr: call( [1/0] {17} + ¦ ¦ ¦ ¦ ¦--expr: call [0/0] {19} ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {18} ¦ ¦ ¦ ¦ ¦--'(': ( [0/5] {20} - ¦ ¦ ¦ ¦ ¦--expr: [1/3] {22} + ¦ ¦ ¦ ¦ ¦--expr: 2 [1/3] {22} ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {21} ¦ ¦ ¦ ¦ °--')': ) [1/0] {23} ¦ ¦ ¦ °--')': ) [1/0] {24} diff --git a/tests/testthat/indention_multiple/curly_and_round-in_tree b/tests/testthat/indention_multiple/curly_and_round-in_tree index cf006823a..48acfd1c0 100644 --- a/tests/testthat/indention_multiple/curly_and_round-in_tree +++ b/tests/testthat/indention_multiple/curly_and_round-in_tree @@ -1,85 +1,94 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} - ¦ ¦--expr: [0/0] {3} + ¦--expr: test_ [0/0] {1} + ¦ ¦--expr: test_ [0/0] {3} ¦ ¦ °--SYMBOL_FUNCTION_CALL: test_ [0/0] {2} ¦ ¦--'(': ( [0/0] {4} - ¦ ¦--expr: [0/0] {6} + ¦ ¦--expr: "this [0/0] {6} ¦ ¦ °--STR_CONST: "this [0/0] {5} ¦ ¦--',': , [0/1] {7} - ¦ ¦--expr: [0/0] {8} + ¦ ¦--expr: { + t [0/0] {8} ¦ ¦ ¦--'{': { [0/2] {9} - ¦ ¦ ¦--expr: [1/0] {10} - ¦ ¦ ¦ ¦--expr: [0/0] {12} + ¦ ¦ ¦--expr: test( [1/0] {10} + ¦ ¦ ¦ ¦--expr: test [0/0] {12} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: test [0/0] {11} ¦ ¦ ¦ ¦--'(': ( [0/0] {13} - ¦ ¦ ¦ ¦--expr: [0/0] {15} + ¦ ¦ ¦ ¦--expr: x [0/0] {15} ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {14} ¦ ¦ ¦ ¦--',': , [0/1] {16} - ¦ ¦ ¦ ¦--expr: [0/0] {18} + ¦ ¦ ¦ ¦--expr: y [0/0] {18} ¦ ¦ ¦ ¦ °--SYMBOL: y [0/0] {17} ¦ ¦ ¦ ¦--',': , [0/1] {19} - ¦ ¦ ¦ ¦--expr: [0/0] {20} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {22} + ¦ ¦ ¦ ¦--expr: call( [0/0] {20} + ¦ ¦ ¦ ¦ ¦--expr: call [0/0] {22} ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {21} ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {23} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {25} + ¦ ¦ ¦ ¦ ¦--expr: z [0/0] {25} ¦ ¦ ¦ ¦ ¦ °--SYMBOL: z [0/0] {24} ¦ ¦ ¦ ¦ °--')': ) [0/0] {26} ¦ ¦ ¦ °--')': ) [0/0] {27} ¦ ¦ °--'}': } [1/0] {28} ¦ °--')': ) [0/0] {29} - ¦--expr: [2/0] {30} + ¦--expr: (({{ + [2/0] {30} ¦ ¦--'(': ( [0/0] {31} - ¦ ¦--expr: [0/0] {32} + ¦ ¦--expr: ({{ + [0/0] {32} ¦ ¦ ¦--'(': ( [0/0] {33} - ¦ ¦ ¦--expr: [0/0] {34} + ¦ ¦ ¦--expr: {{ + [0/0] {34} ¦ ¦ ¦ ¦--'{': { [0/0] {35} - ¦ ¦ ¦ ¦--expr: [0/0] {36} + ¦ ¦ ¦ ¦--expr: { + c [0/0] {36} ¦ ¦ ¦ ¦ ¦--'{': { [0/2] {37} - ¦ ¦ ¦ ¦ ¦--expr: [1/0] {38} - ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/0] {40} + ¦ ¦ ¦ ¦ ¦--expr: call( [1/0] {38} + ¦ ¦ ¦ ¦ ¦ ¦--expr: call [0/0] {40} ¦ ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {39} ¦ ¦ ¦ ¦ ¦ ¦--'(': ( [0/4] {41} - ¦ ¦ ¦ ¦ ¦ ¦--expr: [1/0] {43} + ¦ ¦ ¦ ¦ ¦ ¦--expr: 12 [1/0] {43} ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 12 [0/0] {42} ¦ ¦ ¦ ¦ ¦ ¦--',': , [0/1] {44} - ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/0] {45} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/1] {47} + ¦ ¦ ¦ ¦ ¦ ¦--expr: 1 + 1 [0/0] {45} + ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: 1 [0/1] {47} ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {46} ¦ ¦ ¦ ¦ ¦ ¦ ¦--'+': + [0/1] {48} - ¦ ¦ ¦ ¦ ¦ ¦ °--expr: [0/0] {50} + ¦ ¦ ¦ ¦ ¦ ¦ °--expr: 1 [0/0] {50} ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {49} ¦ ¦ ¦ ¦ ¦ ¦--',': , [0/4] {51} - ¦ ¦ ¦ ¦ ¦ ¦--expr: [1/0] {53} + ¦ ¦ ¦ ¦ ¦ ¦--expr: 26 [1/0] {53} ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 26 [0/0] {52} ¦ ¦ ¦ ¦ ¦ °--')': ) [0/0] {54} ¦ ¦ ¦ ¦ °--'}': } [1/0] {55} ¦ ¦ ¦ °--'}': } [0/0] {56} ¦ ¦ °--')': ) [0/0] {57} ¦ °--')': ) [0/0] {58} - °--expr: [3/0] {59} + °--expr: (({{ + [3/0] {59} ¦--'(': ( [0/0] {60} - ¦--expr: [0/0] {61} + ¦--expr: ({{ + [0/0] {61} ¦ ¦--'(': ( [0/0] {62} - ¦ ¦--expr: [0/0] {63} + ¦ ¦--expr: {{ + [0/0] {63} ¦ ¦ ¦--'{': { [0/0] {64} - ¦ ¦ ¦--expr: [0/0] {65} + ¦ ¦ ¦--expr: { + c [0/0] {65} ¦ ¦ ¦ ¦--'{': { [0/2] {66} - ¦ ¦ ¦ ¦--expr: [1/0] {67} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {69} + ¦ ¦ ¦ ¦--expr: call( [1/0] {67} + ¦ ¦ ¦ ¦ ¦--expr: call [0/0] {69} ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {68} ¦ ¦ ¦ ¦ ¦--'(': ( [0/4] {70} - ¦ ¦ ¦ ¦ ¦--expr: [1/0] {72} + ¦ ¦ ¦ ¦ ¦--expr: 12 [1/0] {72} ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 12 [0/0] {71} ¦ ¦ ¦ ¦ ¦--',': , [0/1] {73} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {74} - ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/1] {76} + ¦ ¦ ¦ ¦ ¦--expr: 1 + 1 [0/0] {74} + ¦ ¦ ¦ ¦ ¦ ¦--expr: 1 [0/1] {76} ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {75} ¦ ¦ ¦ ¦ ¦ ¦--'+': + [0/1] {77} - ¦ ¦ ¦ ¦ ¦ °--expr: [0/0] {79} + ¦ ¦ ¦ ¦ ¦ °--expr: 1 [0/0] {79} ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {78} ¦ ¦ ¦ ¦ ¦--',': , [0/4] {80} - ¦ ¦ ¦ ¦ ¦--expr: [1/2] {82} + ¦ ¦ ¦ ¦ ¦--expr: 26 [1/2] {82} ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 26 [0/0] {81} ¦ ¦ ¦ ¦ °--')': ) [1/0] {83} ¦ ¦ ¦ °--'}': } [1/0] {84} diff --git a/tests/testthat/indention_multiple/curly_only-in_tree b/tests/testthat/indention_multiple/curly_only-in_tree index 0feb6f7fb..3135ed9b6 100644 --- a/tests/testthat/indention_multiple/curly_only-in_tree +++ b/tests/testthat/indention_multiple/curly_only-in_tree @@ -1,45 +1,52 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/7] {1} + ¦--expr: { + [0/7] {1} ¦ ¦--'{': { [0/10] {2} - ¦ ¦--expr: [1/1] {3} - ¦ ¦ ¦--expr: [0/1] {5} + ¦ ¦--expr: 1 + 1 [1/1] {3} + ¦ ¦ ¦--expr: 1 [0/1] {5} ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {4} ¦ ¦ ¦--'+': + [0/1] {6} - ¦ ¦ °--expr: [0/0] {8} + ¦ ¦ °--expr: 1 [0/0] {8} ¦ ¦ °--NUM_CONST: 1 [0/0] {7} ¦ °--'}': } [1/0] {9} - ¦--expr: [2/0] {10} + ¦--expr: {{{ +2 [2/0] {10} ¦ ¦--'{': { [0/0] {11} - ¦ ¦--expr: [0/0] {12} + ¦ ¦--expr: {{ +25 [0/0] {12} ¦ ¦ ¦--'{': { [0/0] {13} - ¦ ¦ ¦--expr: [0/0] {14} + ¦ ¦ ¦--expr: { +25 [0/0] {14} ¦ ¦ ¦ ¦--'{': { [0/0] {15} - ¦ ¦ ¦ ¦--expr: [1/7] {16} - ¦ ¦ ¦ ¦ ¦--expr: [0/1] {18} + ¦ ¦ ¦ ¦--expr: 25 * [1/7] {16} + ¦ ¦ ¦ ¦ ¦--expr: 25 [0/1] {18} ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 25 [0/0] {17} ¦ ¦ ¦ ¦ ¦--'*': * [0/1] {19} - ¦ ¦ ¦ ¦ °--expr: [0/0] {21} + ¦ ¦ ¦ ¦ °--expr: 4 [0/0] {21} ¦ ¦ ¦ ¦ °--NUM_CONST: 4 [0/0] {20} ¦ ¦ ¦ °--'}': } [1/0] {22} ¦ ¦ °--'}': } [0/0] {23} ¦ °--'}': } [0/0] {24} - °--expr: [2/0] {25} + °--expr: { +{ + [2/0] {25} ¦--'{': { [0/0] {26} - ¦--expr: [1/0] {27} + ¦--expr: { + 1 [1/0] {27} ¦ ¦--'{': { [0/2] {28} - ¦ ¦--expr: [1/0] {29} - ¦ ¦ ¦--expr: [0/1] {31} + ¦ ¦--expr: 1 + 1 [1/0] {29} + ¦ ¦ ¦--expr: 1 [0/1] {31} ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {30} ¦ ¦ ¦--'+': + [0/1] {32} - ¦ ¦ °--expr: [0/0] {33} - ¦ ¦ ¦--expr: [0/1] {35} + ¦ ¦ °--expr: 142 * [0/0] {33} + ¦ ¦ ¦--expr: 142 [0/1] {35} ¦ ¦ ¦ °--NUM_CONST: 142 [0/0] {34} ¦ ¦ ¦--'*': * [0/1] {36} - ¦ ¦ °--expr: [0/0] {37} - ¦ ¦ ¦--expr: [0/0] {39} + ¦ ¦ °--expr: sin(p [0/0] {37} + ¦ ¦ ¦--expr: sin [0/0] {39} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: sin [0/0] {38} ¦ ¦ ¦--'(': ( [0/0] {40} - ¦ ¦ ¦--expr: [0/0] {42} + ¦ ¦ ¦--expr: pi [0/0] {42} ¦ ¦ ¦ °--SYMBOL: pi [0/0] {41} ¦ ¦ °--')': ) [0/0] {43} ¦ °--'}': } [1/0] {44} diff --git a/tests/testthat/indention_multiple/edge_strict_mixed-in_tree b/tests/testthat/indention_multiple/edge_strict_mixed-in_tree index 747c14c5e..a2a815bd7 100644 --- a/tests/testthat/indention_multiple/edge_strict_mixed-in_tree +++ b/tests/testthat/indention_multiple/edge_strict_mixed-in_tree @@ -1,35 +1,45 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} + ¦--expr: { +( + [0/0] {1} ¦ ¦--'{': { [0/0] {2} - ¦ ¦--expr: [1/0] {3} + ¦ ¦--expr: ( + [1/0] {3} ¦ ¦ ¦--'(': ( [0/7] {4} - ¦ ¦ ¦--expr: [1/2] {5} + ¦ ¦ ¦--expr: (( +{{ [1/2] {5} ¦ ¦ ¦ ¦--'(': ( [0/0] {6} - ¦ ¦ ¦ ¦--expr: [0/0] {7} + ¦ ¦ ¦ ¦--expr: ( +{{ + [0/0] {7} ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {8} - ¦ ¦ ¦ ¦ ¦--expr: [1/0] {9} + ¦ ¦ ¦ ¦ ¦--expr: {{ + [1/0] {9} ¦ ¦ ¦ ¦ ¦ ¦--'{': { [0/0] {10} - ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/0] {11} + ¦ ¦ ¦ ¦ ¦ ¦--expr: { + [0/0] {11} ¦ ¦ ¦ ¦ ¦ ¦ ¦--'{': { [0/8] {12} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: [1/4] {13} + ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: { + [1/4] {13} ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--'{': { [0/10] {14} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: [1/8] {15} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/0] {17} + ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: c(99, [1/8] {15} + ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: c [0/0] {17} ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {16} ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {18} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/0] {20} + ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: 99 [0/0] {20} ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 99 [0/0] {19} ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--',': , [0/9] {21} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: [1/0] {22} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/1] {24} + ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: 1 + 1 [1/0] {22} + ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: 1 [0/1] {24} ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {23} ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--'+': + [0/1] {25} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--expr: [0/0] {27} + ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--expr: 1 [0/0] {27} ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {26} ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--',': , [0/17] {28} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: [1/0] {29} + ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: { + [1/0] {29} ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--'{': { [0/4] {30} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: [1/0] {32} + ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: "with [1/0] {32} ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--STR_CONST: "with [0/0] {31} ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--'}': } [1/0] {33} ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--')': ) [0/0] {34} @@ -40,33 +50,37 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦ ¦ ¦ °--')': ) [0/0] {39} ¦ ¦ °--')': ) [1/0] {40} ¦ °--'}': } [1/0] {41} - ¦--expr: [3/0] {42} + ¦--expr: ((( + [3/0] {42} ¦ ¦--'(': ( [0/0] {43} - ¦ ¦--expr: [0/0] {44} + ¦ ¦--expr: (( + [0/0] {44} ¦ ¦ ¦--'(': ( [0/0] {45} - ¦ ¦ ¦--expr: [0/0] {46} - ¦ ¦ ¦ ¦--expr: [0/1] {47} + ¦ ¦ ¦--expr: ( + 1 [0/0] {46} + ¦ ¦ ¦ ¦--expr: ( + 1 [0/1] {47} ¦ ¦ ¦ ¦ ¦--'(': ( [0/2] {48} - ¦ ¦ ¦ ¦ ¦--expr: [1/0] {49} - ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/1] {51} + ¦ ¦ ¦ ¦ ¦--expr: 1 + 2 [1/0] {49} + ¦ ¦ ¦ ¦ ¦ ¦--expr: 1 [0/1] {51} ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {50} ¦ ¦ ¦ ¦ ¦ ¦--'+': + [0/1] {52} - ¦ ¦ ¦ ¦ ¦ °--expr: [0/0] {54} + ¦ ¦ ¦ ¦ ¦ °--expr: 2 [0/0] {54} ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {53} ¦ ¦ ¦ ¦ °--')': ) [0/0] {55} ¦ ¦ ¦ ¦--'*': * [0/1] {56} - ¦ ¦ ¦ °--expr: [0/0] {57} + ¦ ¦ ¦ °--expr: (3 + [0/0] {57} ¦ ¦ ¦ ¦--'(': ( [0/0] {58} - ¦ ¦ ¦ ¦--expr: [0/0] {59} - ¦ ¦ ¦ ¦ ¦--expr: [0/1] {61} + ¦ ¦ ¦ ¦--expr: 3 + 4 [0/0] {59} + ¦ ¦ ¦ ¦ ¦--expr: 3 [0/1] {61} ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {60} ¦ ¦ ¦ ¦ ¦--'+': + [0/1] {62} - ¦ ¦ ¦ ¦ °--expr: [0/0] {64} + ¦ ¦ ¦ ¦ °--expr: 4 [0/0] {64} ¦ ¦ ¦ ¦ °--NUM_CONST: 4 [0/0] {63} ¦ ¦ ¦ °--')': ) [1/0] {65} ¦ ¦ °--')': ) [0/0] {66} ¦ °--')': ) [0/0] {67} - °--expr: [3/0] {68} + °--expr: funct [3/0] {68} ¦--FUNCTION: funct [0/0] {69} ¦--'(': ( [0/0] {70} ¦--SYMBOL_FORMALS: x [0/0] {71} @@ -75,6 +89,7 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--',': , [0/1] {74} ¦--SYMBOL_FORMALS: z [0/0] {75} ¦--')': ) [0/1] {76} - °--expr: [0/0] {77} + °--expr: { +} [0/0] {77} ¦--'{': { [0/0] {78} °--'}': } [1/0] {79} diff --git a/tests/testthat/indention_multiple/edge_strict_random-in_tree b/tests/testthat/indention_multiple/edge_strict_random-in_tree index 66255318d..1f6495ff9 100644 --- a/tests/testthat/indention_multiple/edge_strict_random-in_tree +++ b/tests/testthat/indention_multiple/edge_strict_random-in_tree @@ -1,31 +1,33 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/3] {1} + ¦--expr: {{( [0/3] {1} ¦ ¦--'{': { [0/0] {2} - ¦ ¦--expr: [0/0] {3} + ¦ ¦--expr: {( [0/0] {3} ¦ ¦ ¦--'{': { [0/0] {4} - ¦ ¦ ¦--expr: [0/0] {5} + ¦ ¦ ¦--expr: ( { [0/0] {5} ¦ ¦ ¦ ¦--'(': ( [0/3] {6} - ¦ ¦ ¦ ¦--expr: [0/0] {7} + ¦ ¦ ¦ ¦--expr: {{{{ [0/0] {7} ¦ ¦ ¦ ¦ ¦--'{': { [0/0] {8} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {9} + ¦ ¦ ¦ ¦ ¦--expr: {{{ [0/0] {9} ¦ ¦ ¦ ¦ ¦ ¦--'{': { [0/0] {10} - ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/0] {11} + ¦ ¦ ¦ ¦ ¦ ¦--expr: {{ { [0/0] {11} ¦ ¦ ¦ ¦ ¦ ¦ ¦--'{': { [0/0] {12} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/0] {13} + ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: { {{ [0/0] {13} ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--'{': { [0/2] {14} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/0] {15} + ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: {{{{ [0/0] {15} ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--'{': { [0/0] {16} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/0] {17} + ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: {{{ [0/0] {17} ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--'{': { [0/0] {18} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/0] {19} + ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: {{ [0/0] {19} ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--'{': { [0/0] {20} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/0] {21} + ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: { ( [0/0] {21} ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--'{': { [0/3] {22} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/0] {23} + ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: (( + [0/0] {23} ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {24} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/0] {25} + ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: ( + 1 [0/0] {25} ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--'(': ( [0/2] {26} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: [1/0] {28} + ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: 19 [1/0] {28} ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 19 [0/0] {27} ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--')': ) [1/0] {29} ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--')': ) [0/0] {30} @@ -40,41 +42,43 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦ ¦ ¦ °--')': ) [0/0] {39} ¦ ¦ °--'}': } [0/0] {40} ¦ °--'}': } [0/0] {41} - ¦--expr: [3/3] {42} + ¦--expr: ( + c [3/3] {42} ¦ ¦--'(': ( [0/2] {43} - ¦ ¦--expr: [1/3] {44} - ¦ ¦ ¦--expr: [0/0] {46} + ¦ ¦--expr: c("x" [1/3] {44} + ¦ ¦ ¦--expr: c [0/0] {46} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {45} ¦ ¦ ¦--'(': ( [0/0] {47} - ¦ ¦ ¦--expr: [0/0] {49} + ¦ ¦ ¦--expr: "x" [0/0] {49} ¦ ¦ ¦ °--STR_CONST: "x" [0/0] {48} ¦ ¦ ¦--',': , [0/1] {50} - ¦ ¦ ¦--expr: [0/0] {52} + ¦ ¦ ¦--expr: "y" [0/0] {52} ¦ ¦ ¦ °--STR_CONST: "y" [0/0] {51} ¦ ¦ ¦--',': , [0/1] {53} - ¦ ¦ ¦--expr: [0/0] {55} + ¦ ¦ ¦--expr: "z" [0/0] {55} ¦ ¦ ¦ °--STR_CONST: "z" [0/0] {54} ¦ ¦ ¦--',': , [0/1] {56} - ¦ ¦ ¦--expr: [0/0] {58} + ¦ ¦ ¦--expr: "sin( [0/0] {58} ¦ ¦ ¦ °--STR_CONST: "sin( [0/0] {57} ¦ ¦ °--')': ) [0/0] {59} ¦ °--')': ) [1/0] {60} - °--expr: [3/0] {61} + °--expr: { + c [3/0] {61} ¦--'{': { [0/2] {62} - ¦--expr: [1/0] {63} - ¦ ¦--expr: [0/0] {65} + ¦--expr: c("x" [1/0] {63} + ¦ ¦--expr: c [0/0] {65} ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {64} ¦ ¦--'(': ( [0/0] {66} - ¦ ¦--expr: [0/0] {68} + ¦ ¦--expr: "x" [0/0] {68} ¦ ¦ °--STR_CONST: "x" [0/0] {67} ¦ ¦--',': , [0/1] {69} - ¦ ¦--expr: [0/0] {71} + ¦ ¦--expr: "y" [0/0] {71} ¦ ¦ °--STR_CONST: "y" [0/0] {70} ¦ ¦--',': , [0/1] {72} - ¦ ¦--expr: [0/0] {74} + ¦ ¦--expr: "z" [0/0] {74} ¦ ¦ °--STR_CONST: "z" [0/0] {73} ¦ ¦--',': , [0/1] {75} - ¦ ¦--expr: [0/0] {77} + ¦ ¦--expr: "sin( [0/0] {77} ¦ ¦ °--STR_CONST: "sin( [0/0] {76} ¦ °--')': ) [0/0] {78} °--'}': } [1/0] {79} diff --git a/tests/testthat/indention_multiple/fun_for_new_line-in_tree b/tests/testthat/indention_multiple/fun_for_new_line-in_tree index 9a02e8376..8ec66a854 100644 --- a/tests/testthat/indention_multiple/fun_for_new_line-in_tree +++ b/tests/testthat/indention_multiple/fun_for_new_line-in_tree @@ -1,25 +1,27 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} + ¦--expr: funct [0/0] {1} ¦ ¦--FUNCTION: funct [0/0] {2} ¦ ¦--'(': ( [0/0] {3} ¦ ¦--')': ) [0/0] {4} - ¦ °--expr: [1/0] {6} + ¦ °--expr: NULL [1/0] {6} ¦ °--NULL_CONST: NULL [0/0] {5} - °--expr: [2/0] {7} + °--expr: for ( [2/0] {7} ¦--FOR: for [0/1] {8} - ¦--forcond: [0/1] {9} + ¦--forcond: (i in [0/1] {9} ¦ ¦--'(': ( [0/0] {10} ¦ ¦--SYMBOL: i [0/1] {11} ¦ ¦--IN: in [0/1] {12} - ¦ ¦--expr: [0/0] {13} - ¦ ¦ ¦--expr: [0/0] {15} + ¦ ¦--expr: 1:3 [0/0] {13} + ¦ ¦ ¦--expr: 1 [0/0] {15} ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {14} ¦ ¦ ¦--':': : [0/0] {16} - ¦ ¦ °--expr: [0/0] {18} + ¦ ¦ °--expr: 3 [0/0] {18} ¦ ¦ °--NUM_CONST: 3 [0/0] {17} ¦ °--')': ) [0/0] {19} - °--expr: [1/0] {20} + °--expr: { +2 + [1/0] {20} ¦--'{': { [0/0] {21} - ¦--expr: [1/1] {23} + ¦--expr: 2 [1/1] {23} ¦ °--NUM_CONST: 2 [0/0] {22} °--'}': } [1/0] {24} diff --git a/tests/testthat/indention_multiple/if_else_curly-in_tree b/tests/testthat/indention_multiple/if_else_curly-in_tree index 1ef4bc7ac..8485b4544 100644 --- a/tests/testthat/indention_multiple/if_else_curly-in_tree +++ b/tests/testthat/indention_multiple/if_else_curly-in_tree @@ -1,69 +1,78 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} + ¦--expr: { + [0/0] {1} ¦ ¦--'{': { [0/4] {2} - ¦ ¦--expr: [1/0] {3} + ¦ ¦--expr: if (T [1/0] {3} ¦ ¦ ¦--IF: if [0/1] {4} ¦ ¦ ¦--'(': ( [0/0] {5} - ¦ ¦ ¦--expr: [0/0] {7} + ¦ ¦ ¦--expr: TRUE [0/0] {7} ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {6} ¦ ¦ ¦--')': ) [0/0] {8} - ¦ ¦ ¦--expr: [1/4] {10} + ¦ ¦ ¦--expr: 3 [1/4] {10} ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {9} ¦ ¦ ¦--ELSE: else [1/0] {11} - ¦ ¦ °--expr: [1/0] {13} + ¦ ¦ °--expr: 4 [1/0] {13} ¦ ¦ °--NUM_CONST: 4 [0/0] {12} ¦ °--'}': } [1/0] {14} - ¦--expr: [2/0] {15} + ¦--expr: { +if [2/0] {15} ¦ ¦--'{': { [0/0] {16} - ¦ ¦--expr: [1/0] {17} + ¦ ¦--expr: if (T [1/0] {17} ¦ ¦ ¦--IF: if [0/1] {18} ¦ ¦ ¦--'(': ( [0/0] {19} - ¦ ¦ ¦--expr: [0/0] {21} + ¦ ¦ ¦--expr: TRUE [0/0] {21} ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {20} ¦ ¦ ¦--')': ) [0/1] {22} - ¦ ¦ ¦--expr: [0/1] {23} + ¦ ¦ ¦--expr: { + [0/1] {23} ¦ ¦ ¦ ¦--'{': { [0/3] {24} - ¦ ¦ ¦ ¦--expr: [1/4] {26} + ¦ ¦ ¦ ¦--expr: 3 [1/4] {26} ¦ ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {25} ¦ ¦ ¦ °--'}': } [1/0] {27} ¦ ¦ ¦--ELSE: else [0/0] {28} - ¦ ¦ °--expr: [1/0] {30} + ¦ ¦ °--expr: 4 [1/0] {30} ¦ ¦ °--NUM_CONST: 4 [0/0] {29} ¦ °--'}': } [1/0] {31} - ¦--expr: [2/0] {32} + ¦--expr: { +if [2/0] {32} ¦ ¦--'{': { [0/0] {33} - ¦ ¦--expr: [1/0] {34} + ¦ ¦--expr: if (T [1/0] {34} ¦ ¦ ¦--IF: if [0/1] {35} ¦ ¦ ¦--'(': ( [0/0] {36} - ¦ ¦ ¦--expr: [0/0] {38} + ¦ ¦ ¦--expr: TRUE [0/0] {38} ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {37} ¦ ¦ ¦--')': ) [0/4] {39} - ¦ ¦ ¦--expr: [1/0] {41} + ¦ ¦ ¦--expr: 3 [1/0] {41} ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {40} ¦ ¦ ¦--ELSE: else [1/1] {42} - ¦ ¦ °--expr: [0/0] {43} + ¦ ¦ °--expr: { + 4 [0/0] {43} ¦ ¦ ¦--'{': { [0/2] {44} - ¦ ¦ ¦--expr: [1/0] {46} + ¦ ¦ ¦--expr: 4 [1/0] {46} ¦ ¦ ¦ °--NUM_CONST: 4 [0/0] {45} ¦ ¦ °--'}': } [1/0] {47} ¦ °--'}': } [1/0] {48} - °--expr: [2/0] {49} + °--expr: { +if [2/0] {49} ¦--'{': { [0/0] {50} - ¦--expr: [1/0] {51} + ¦--expr: if (T [1/0] {51} ¦ ¦--IF: if [0/1] {52} ¦ ¦--'(': ( [0/0] {53} - ¦ ¦--expr: [0/0] {55} + ¦ ¦--expr: TRUE [0/0] {55} ¦ ¦ °--NUM_CONST: TRUE [0/0] {54} ¦ ¦--')': ) [0/1] {56} - ¦ ¦--expr: [0/1] {57} + ¦ ¦--expr: { + [0/1] {57} ¦ ¦ ¦--'{': { [0/5] {58} - ¦ ¦ ¦--expr: [1/4] {60} + ¦ ¦ ¦--expr: 3 [1/4] {60} ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {59} ¦ ¦ °--'}': } [1/0] {61} ¦ ¦--ELSE: else [0/1] {62} - ¦ °--expr: [0/0] {63} + ¦ °--expr: { +4 +} [0/0] {63} ¦ ¦--'{': { [0/0] {64} - ¦ ¦--expr: [1/0] {66} + ¦ ¦--expr: 4 [1/0] {66} ¦ ¦ °--NUM_CONST: 4 [0/0] {65} ¦ °--'}': } [1/0] {67} °--'}': } [1/0] {68} diff --git a/tests/testthat/indention_multiple/overall-in_tree b/tests/testthat/indention_multiple/overall-in_tree index f655d59a7..93795a351 100644 --- a/tests/testthat/indention_multiple/overall-in_tree +++ b/tests/testthat/indention_multiple/overall-in_tree @@ -3,78 +3,82 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--COMMENT: #' [1/0] {2} ¦--COMMENT: #' @p [1/0] {3} ¦--COMMENT: #' [1/0] {4} - ¦--expr: [1/0] {5} - ¦ ¦--expr: [0/1] {7} + ¦--expr: a <- [1/0] {5} + ¦ ¦--expr: a [0/1] {7} ¦ ¦ °--SYMBOL: a [0/0] {6} ¦ ¦--LEFT_ASSIGN: <- [0/1] {8} - ¦ °--expr: [0/0] {9} + ¦ °--expr: funct [0/0] {9} ¦ ¦--FUNCTION: funct [0/0] {10} ¦ ¦--'(': ( [0/0] {11} ¦ ¦--SYMBOL_FORMALS: x [0/0] {12} ¦ ¦--')': ) [0/1] {13} - ¦ °--expr: [0/0] {14} + ¦ °--expr: { + t [0/0] {14} ¦ ¦--'{': { [0/2] {15} - ¦ ¦--expr: [1/2] {16} - ¦ ¦ ¦--expr: [0/0] {18} + ¦ ¦--expr: test_ [1/2] {16} + ¦ ¦ ¦--expr: test_ [0/0] {18} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: test_ [0/0] {17} ¦ ¦ ¦--'(': ( [0/0] {19} - ¦ ¦ ¦--expr: [0/0] {21} + ¦ ¦ ¦--expr: "I wa [0/0] {21} ¦ ¦ ¦ °--STR_CONST: "I wa [0/0] {20} ¦ ¦ ¦--',': , [0/1] {22} - ¦ ¦ ¦--expr: [0/0] {23} + ¦ ¦ ¦--expr: { + [0/0] {23} ¦ ¦ ¦ ¦--'{': { [0/4] {24} - ¦ ¦ ¦ ¦--expr: [1/4] {25} - ¦ ¦ ¦ ¦ ¦--expr: [0/1] {27} + ¦ ¦ ¦ ¦--expr: out < [1/4] {25} + ¦ ¦ ¦ ¦ ¦--expr: out [0/1] {27} ¦ ¦ ¦ ¦ ¦ °--SYMBOL: out [0/0] {26} ¦ ¦ ¦ ¦ ¦--LEFT_ASSIGN: <- [0/1] {28} - ¦ ¦ ¦ ¦ °--expr: [0/0] {29} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {31} + ¦ ¦ ¦ ¦ °--expr: c(1, [0/0] {29} + ¦ ¦ ¦ ¦ ¦--expr: c [0/0] {31} ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {30} ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {32} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {34} + ¦ ¦ ¦ ¦ ¦--expr: 1 [0/0] {34} ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {33} ¦ ¦ ¦ ¦ ¦--',': , [0/1] {35} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {36} - ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/0] {38} + ¦ ¦ ¦ ¦ ¦--expr: c( + [0/0] {36} + ¦ ¦ ¦ ¦ ¦ ¦--expr: c [0/0] {38} ¦ ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {37} ¦ ¦ ¦ ¦ ¦ ¦--'(': ( [0/6] {39} - ¦ ¦ ¦ ¦ ¦ ¦--expr: [1/4] {40} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/1] {42} + ¦ ¦ ¦ ¦ ¦ ¦--expr: 22 + [1/4] {40} + ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: 22 [0/1] {42} ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 22 [0/0] {41} ¦ ¦ ¦ ¦ ¦ ¦ ¦--'+': + [0/1] {43} - ¦ ¦ ¦ ¦ ¦ ¦ °--expr: [0/0] {45} + ¦ ¦ ¦ ¦ ¦ ¦ °--expr: 1 [0/0] {45} ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {44} ¦ ¦ ¦ ¦ ¦ °--')': ) [1/0] {46} ¦ ¦ ¦ ¦ °--')': ) [0/0] {47} - ¦ ¦ ¦ ¦--expr: [1/2] {48} + ¦ ¦ ¦ ¦--expr: if (x [1/2] {48} ¦ ¦ ¦ ¦ ¦--IF: if [0/1] {49} ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {50} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {51} - ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/1] {53} + ¦ ¦ ¦ ¦ ¦--expr: x > 1 [0/0] {51} + ¦ ¦ ¦ ¦ ¦ ¦--expr: x [0/1] {53} ¦ ¦ ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {52} ¦ ¦ ¦ ¦ ¦ ¦--GT: > [0/1] {54} - ¦ ¦ ¦ ¦ ¦ °--expr: [0/0] {56} + ¦ ¦ ¦ ¦ ¦ °--expr: 10 [0/0] {56} ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 10 [0/0] {55} ¦ ¦ ¦ ¦ ¦--')': ) [0/1] {57} - ¦ ¦ ¦ ¦ °--expr: [0/0] {58} + ¦ ¦ ¦ ¦ °--expr: { + [0/0] {58} ¦ ¦ ¦ ¦ ¦--'{': { [0/6] {59} - ¦ ¦ ¦ ¦ ¦--expr: [1/4] {60} + ¦ ¦ ¦ ¦ ¦--expr: for ( [1/4] {60} ¦ ¦ ¦ ¦ ¦ ¦--FOR: for [0/1] {61} - ¦ ¦ ¦ ¦ ¦ ¦--forcond: [0/1] {62} + ¦ ¦ ¦ ¦ ¦ ¦--forcond: (x in [0/1] {62} ¦ ¦ ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {63} ¦ ¦ ¦ ¦ ¦ ¦ ¦--SYMBOL: x [0/1] {64} ¦ ¦ ¦ ¦ ¦ ¦ ¦--IN: in [0/1] {65} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/0] {67} + ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: 22 [0/0] {67} ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 22 [0/0] {66} ¦ ¦ ¦ ¦ ¦ ¦ °--')': ) [0/0] {68} - ¦ ¦ ¦ ¦ ¦ °--expr: [0/0] {69} + ¦ ¦ ¦ ¦ ¦ °--expr: { # F [0/0] {69} ¦ ¦ ¦ ¦ ¦ ¦--'{': { [0/1] {70} ¦ ¦ ¦ ¦ ¦ ¦--COMMENT: # FIX [0/8] {71} - ¦ ¦ ¦ ¦ ¦ ¦--expr: [1/6] {72} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/0] {74} + ¦ ¦ ¦ ¦ ¦ ¦--expr: prin( [1/6] {72} + ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: prin [0/0] {74} ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: prin [0/0] {73} ¦ ¦ ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {75} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/0] {77} + ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: x [0/0] {77} ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {76} ¦ ¦ ¦ ¦ ¦ ¦ °--')': ) [0/0] {78} ¦ ¦ ¦ ¦ ¦ °--'}': } [1/0] {79} @@ -82,70 +86,73 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦ ¦ ¦ °--'}': } [1/0] {81} ¦ ¦ °--')': ) [0/0] {82} ¦ ¦--COMMENT: # we [1/2] {83} - ¦ ¦--expr: [1/2] {84} - ¦ ¦ ¦--expr: [0/0] {86} + ¦ ¦--expr: c( + [1/2] {84} + ¦ ¦ ¦--expr: c [0/0] {86} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {85} ¦ ¦ ¦--'(': ( [0/4] {87} - ¦ ¦ ¦--expr: [1/0] {88} - ¦ ¦ ¦ ¦--expr: [0/0] {90} + ¦ ¦ ¦--expr: list( [1/0] {88} + ¦ ¦ ¦ ¦--expr: list [0/0] {90} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: list [0/0] {89} ¦ ¦ ¦ ¦--'(': ( [0/0] {91} - ¦ ¦ ¦ ¦--expr: [0/0] {92} - ¦ ¦ ¦ ¦ ¦--expr: [0/1] {94} + ¦ ¦ ¦ ¦--expr: x + 2 [0/0] {92} + ¦ ¦ ¦ ¦ ¦--expr: x [0/1] {94} ¦ ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {93} ¦ ¦ ¦ ¦ ¦--'+': + [0/1] {95} - ¦ ¦ ¦ ¦ °--expr: [0/0] {97} + ¦ ¦ ¦ ¦ °--expr: 2 [0/0] {97} ¦ ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {96} ¦ ¦ ¦ °--')': ) [0/0] {98} ¦ ¦ ¦--',': , [0/4] {99} - ¦ ¦ ¦--expr: [1/0] {100} - ¦ ¦ ¦ ¦--expr: [0/0] {102} + ¦ ¦ ¦--expr: c(c( + [1/0] {100} + ¦ ¦ ¦ ¦--expr: c [0/0] {102} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {101} ¦ ¦ ¦ ¦--'(': ( [0/0] {103} - ¦ ¦ ¦ ¦--expr: [0/0] {104} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {106} + ¦ ¦ ¦ ¦--expr: c( + [0/0] {104} + ¦ ¦ ¦ ¦ ¦--expr: c [0/0] {106} ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {105} ¦ ¦ ¦ ¦ ¦--'(': ( [0/6] {107} - ¦ ¦ ¦ ¦ ¦--expr: [1/0] {108} - ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/1] {110} + ¦ ¦ ¦ ¦ ¦--expr: 26 ^ [1/0] {108} + ¦ ¦ ¦ ¦ ¦ ¦--expr: 26 [0/1] {110} ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 26 [0/0] {109} ¦ ¦ ¦ ¦ ¦ ¦--'^': ^ [0/1] {111} - ¦ ¦ ¦ ¦ ¦ °--expr: [0/0] {113} + ¦ ¦ ¦ ¦ ¦ °--expr: 2 [0/0] {113} ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {112} ¦ ¦ ¦ ¦ ¦--',': , [0/6] {114} - ¦ ¦ ¦ ¦ ¦--expr: [1/0] {116} + ¦ ¦ ¦ ¦ ¦--expr: 8 [1/0] {116} ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 8 [0/0] {115} ¦ ¦ ¦ ¦ ¦--',': , [0/6] {117} - ¦ ¦ ¦ ¦ ¦--expr: [1/2] {119} + ¦ ¦ ¦ ¦ ¦--expr: 7 [1/2] {119} ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 7 [0/0] {118} ¦ ¦ ¦ ¦ °--')': ) [1/0] {120} ¦ ¦ ¦ °--')': ) [0/0] {121} ¦ ¦ °--')': ) [0/0] {122} - ¦ ¦--expr: [2/0] {123} - ¦ ¦ ¦--expr: [0/0] {125} + ¦ ¦--expr: call( [2/0] {123} + ¦ ¦ ¦--expr: call [0/0] {125} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {124} ¦ ¦ ¦--'(': ( [0/4] {126} - ¦ ¦ ¦--expr: [1/0] {128} + ¦ ¦ ¦--expr: 1 [1/0] {128} ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {127} ¦ ¦ ¦--',': , [0/1] {129} - ¦ ¦ ¦--expr: [0/0] {131} + ¦ ¦ ¦--expr: 2 [0/0] {131} ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {130} ¦ ¦ ¦--',': , [0/4] {132} - ¦ ¦ ¦--expr: [1/0] {133} - ¦ ¦ ¦ ¦--expr: [0/1] {136} + ¦ ¦ ¦--expr: 23 + [1/0] {133} + ¦ ¦ ¦ ¦--expr: 23 [0/1] {136} ¦ ¦ ¦ ¦ °--NUM_CONST: 23 [0/0] {135} ¦ ¦ ¦ ¦--'+': + [0/1] {137} - ¦ ¦ ¦ ¦--expr: [0/1] {139} + ¦ ¦ ¦ ¦--expr: Inf [0/1] {139} ¦ ¦ ¦ ¦ °--NUM_CONST: Inf [0/0] {138} ¦ ¦ ¦ ¦--'-': - [0/1] {140} - ¦ ¦ ¦ °--expr: [0/0] {142} + ¦ ¦ ¦ °--expr: 99 [0/0] {142} ¦ ¦ ¦ °--NUM_CONST: 99 [0/0] {141} ¦ ¦ ¦--',': , [0/1] {143} - ¦ ¦ ¦--expr: [0/0] {144} - ¦ ¦ ¦ ¦--expr: [0/0] {146} + ¦ ¦ ¦--expr: call( [0/0] {144} + ¦ ¦ ¦ ¦--expr: call [0/0] {146} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {145} ¦ ¦ ¦ ¦--'(': ( [0/6] {147} - ¦ ¦ ¦ ¦--expr: [1/2] {149} + ¦ ¦ ¦ ¦--expr: 16 [1/2] {149} ¦ ¦ ¦ ¦ °--NUM_CONST: 16 [0/0] {148} ¦ ¦ ¦ °--')': ) [1/0] {150} ¦ ¦ °--')': ) [0/0] {151} diff --git a/tests/testthat/indention_multiple/round_closing_on_same_line-in_tree b/tests/testthat/indention_multiple/round_closing_on_same_line-in_tree index 14fc50971..145b8bb50 100644 --- a/tests/testthat/indention_multiple/round_closing_on_same_line-in_tree +++ b/tests/testthat/indention_multiple/round_closing_on_same_line-in_tree @@ -1,20 +1,20 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: [0/0] {1} - ¦--expr: [0/0] {3} + °--expr: c(cal [0/0] {1} + ¦--expr: c [0/0] {3} ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {2} ¦--'(': ( [0/0] {4} - ¦--expr: [0/0] {5} - ¦ ¦--expr: [0/0] {7} + ¦--expr: call( [0/0] {5} + ¦ ¦--expr: call [0/0] {7} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {6} ¦ ¦--'(': ( [0/0] {8} - ¦ ¦--expr: [0/0] {10} + ¦ ¦--expr: 2 [0/0] {10} ¦ ¦ °--NUM_CONST: 2 [0/0] {9} ¦ °--')': ) [0/0] {11} ¦--',': , [0/1] {12} - ¦--expr: [0/0] {14} + ¦--expr: 1 [0/0] {14} ¦ °--NUM_CONST: 1 [0/0] {13} ¦--',': , [0/1] {15} ¦--COMMENT: # com [0/0] {16} - ¦--expr: [1/1] {18} + ¦--expr: 29 [1/1] {18} ¦ °--NUM_CONST: 29 [0/0] {17} °--')': ) [1/0] {19} diff --git a/tests/testthat/indention_multiple/round_only-in_tree b/tests/testthat/indention_multiple/round_only-in_tree index 9f6c571db..70166c710 100644 --- a/tests/testthat/indention_multiple/round_only-in_tree +++ b/tests/testthat/indention_multiple/round_only-in_tree @@ -1,28 +1,39 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/3] {1} + ¦--expr: ((((( [0/3] {1} ¦ ¦--'(': ( [0/0] {2} - ¦ ¦--expr: [0/0] {3} + ¦ ¦--expr: (((( + [0/0] {3} ¦ ¦ ¦--'(': ( [0/0] {4} - ¦ ¦ ¦--expr: [0/0] {5} + ¦ ¦ ¦--expr: ((( +1 [0/0] {5} ¦ ¦ ¦ ¦--'(': ( [0/0] {6} - ¦ ¦ ¦ ¦--expr: [0/0] {7} + ¦ ¦ ¦ ¦--expr: (( +1 + [0/0] {7} ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {8} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {9} + ¦ ¦ ¦ ¦ ¦--expr: ( +1 + [0/0] {9} ¦ ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {10} - ¦ ¦ ¦ ¦ ¦ ¦--expr: [1/7] {12} + ¦ ¦ ¦ ¦ ¦ ¦--expr: 1 [1/7] {12} ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {11} ¦ ¦ ¦ ¦ ¦ °--')': ) [1/0] {13} ¦ ¦ ¦ ¦ °--')': ) [0/0] {14} ¦ ¦ ¦ °--')': ) [0/0] {15} ¦ ¦ °--')': ) [0/0] {16} ¦ °--')': ) [0/0] {17} - °--expr: [2/0] {18} + °--expr: ((( +2 [2/0] {18} ¦--'(': ( [0/0] {19} - ¦--expr: [0/0] {20} + ¦--expr: (( +2 + [0/0] {20} ¦ ¦--'(': ( [0/0] {21} - ¦ ¦--expr: [0/0] {22} + ¦ ¦--expr: ( +2 +) [0/0] {22} ¦ ¦ ¦--'(': ( [0/0] {23} - ¦ ¦ ¦--expr: [1/0] {25} + ¦ ¦ ¦--expr: 2 [1/0] {25} ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {24} ¦ ¦ °--')': ) [1/0] {26} ¦ °--')': ) [0/0] {27} diff --git a/tests/testthat/indention_operators/dollar_R6-in_tree b/tests/testthat/indention_operators/dollar_R6-in_tree index 54eedb3b1..31105cc5a 100644 --- a/tests/testthat/indention_operators/dollar_R6-in_tree +++ b/tests/testthat/indention_operators/dollar_R6-in_tree @@ -1,25 +1,30 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: [0/0] {1} - ¦--expr: [0/0] {3} - ¦ ¦--expr: [0/0] {4} - ¦ ¦ ¦--expr: [0/2] {5} - ¦ ¦ ¦ ¦--expr: [0/0] {6} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {8} + °--expr: x$ + [0/0] {1} + ¦--expr: x$ + [0/0] {3} + ¦ ¦--expr: x$ + [0/0] {4} + ¦ ¦ ¦--expr: x$ + [0/2] {5} + ¦ ¦ ¦ ¦--expr: x$ + [0/0] {6} + ¦ ¦ ¦ ¦ ¦--expr: x [0/0] {8} ¦ ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {7} ¦ ¦ ¦ ¦ ¦--'$': $ [0/3] {9} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: add [1/0] {10} ¦ ¦ ¦ ¦--'(': ( [0/0] {11} - ¦ ¦ ¦ ¦--expr: [0/0] {13} + ¦ ¦ ¦ ¦--expr: 10 [0/0] {13} ¦ ¦ ¦ ¦ °--NUM_CONST: 10 [0/0] {12} ¦ ¦ ¦ °--')': ) [0/0] {14} ¦ ¦ ¦--'$': $ [0/0] {15} ¦ ¦ °--SYMBOL_FUNCTION_CALL: add [1/0] {16} ¦ ¦--'(': ( [0/0] {17} - ¦ ¦--expr: [0/0] {19} + ¦ ¦--expr: 10 [0/0] {19} ¦ ¦ °--NUM_CONST: 10 [0/0] {18} ¦ °--')': ) [0/0] {20} ¦--'$': $ [0/0] {21} ¦--SYMBOL: sum [0/1] {22} ¦--'+': + [0/0] {23} - °--expr: [1/0] {25} + °--expr: 3 [1/0] {25} °--NUM_CONST: 3 [0/0] {24} diff --git a/tests/testthat/indention_operators/eq_assign-in_tree b/tests/testthat/indention_operators/eq_assign-in_tree index 46bc3780f..c11954b1d 100644 --- a/tests/testthat/indention_operators/eq_assign-in_tree +++ b/tests/testthat/indention_operators/eq_assign-in_tree @@ -1,42 +1,47 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} - ¦ ¦--expr: [0/0] {3} + ¦--expr: switc [0/0] {1} + ¦ ¦--expr: switc [0/0] {3} ¦ ¦ °--SYMBOL_FUNCTION_CALL: switc [0/0] {2} ¦ ¦--'(': ( [0/0] {4} - ¦ ¦--expr: [0/0] {6} + ¦ ¦--expr: engin [0/0] {6} ¦ ¦ °--SYMBOL: engin [0/0] {5} ¦ ¦--',': , [0/4] {7} ¦ ¦--SYMBOL_SUB: pdfte [1/1] {8} ¦ ¦--EQ_SUB: = [0/1] {9} - ¦ ¦--expr: [0/0] {10} + ¦ ¦--expr: { + [0/0] {10} ¦ ¦ ¦--'{': { [0/5] {11} - ¦ ¦ ¦--expr: [1/9] {12} + ¦ ¦ ¦--expr: if (a [1/9] {12} ¦ ¦ ¦ ¦--IF: if [0/1] {13} ¦ ¦ ¦ ¦--'(': ( [0/0] {14} - ¦ ¦ ¦ ¦--expr: [0/0] {16} + ¦ ¦ ¦ ¦--expr: any [0/0] {16} ¦ ¦ ¦ ¦ °--SYMBOL: any [0/0] {15} ¦ ¦ ¦ ¦--')': ) [0/1] {17} - ¦ ¦ ¦ °--expr: [0/0] {18} + ¦ ¦ ¦ °--expr: { + [0/0] {18} ¦ ¦ ¦ ¦--'{': { [0/14] {19} - ¦ ¦ ¦ ¦--expr: [1/12] {21} + ¦ ¦ ¦ ¦--expr: x [1/12] {21} ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {20} ¦ ¦ ¦ °--'}': } [1/0] {22} ¦ ¦ °--'}': } [1/0] {23} ¦ ¦--',': , [0/7] {24} ¦ ¦--SYMBOL_SUB: new [1/0] {25} ¦ ¦--EQ_SUB: = [0/0] {26} - ¦ ¦--expr: [0/3] {27} + ¦ ¦--expr: ( + [0/3] {27} ¦ ¦ ¦--'(': ( [0/6] {28} - ¦ ¦ ¦--expr: [1/7] {30} + ¦ ¦ ¦--expr: 2 [1/7] {30} ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {29} ¦ ¦ °--')': ) [1/0] {31} ¦ °--')': ) [0/0] {32} - °--expr: [2/0] {33} + °--expr: { + a [2/0] {33} ¦--'{': { [0/2] {34} - ¦--expr: [1/0] {35} - ¦ ¦--expr: [0/1] {37} + ¦--expr: a <- + [1/0] {35} + ¦ ¦--expr: a [0/1] {37} ¦ ¦ °--SYMBOL: a [0/0] {36} ¦ ¦--LEFT_ASSIGN: <- [0/4] {38} - ¦ °--expr: [1/0] {40} + ¦ °--expr: 3 [1/0] {40} ¦ °--NUM_CONST: 3 [0/0] {39} °--'}': } [1/0] {41} diff --git a/tests/testthat/indention_operators/eq_formal_simple-in_tree b/tests/testthat/indention_operators/eq_formal_simple-in_tree index 3f273def8..ce4a97830 100644 --- a/tests/testthat/indention_operators/eq_formal_simple-in_tree +++ b/tests/testthat/indention_operators/eq_formal_simple-in_tree @@ -1,29 +1,30 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: [0/0] {1} - ¦--expr: [0/1] {3} + °--expr: abbbb [0/0] {1} + ¦--expr: abbbb [0/1] {3} ¦ °--SYMBOL: abbbb [0/0] {2} ¦--LEFT_ASSIGN: <- [0/1] {4} - °--expr: [0/0] {5} + °--expr: funct [0/0] {5} ¦--FUNCTION: funct [0/0] {6} ¦--'(': ( [0/0] {7} ¦--SYMBOL_FORMALS: x [0/1] {8} ¦--EQ_FORMALS: = [0/18] {9} - ¦--expr: [1/18] {11} + ¦--expr: 22 [1/18] {11} ¦ °--NUM_CONST: 22 [0/0] {10} ¦--')': ) [1/1] {12} - °--expr: [0/0] {13} + °--expr: { + d [0/0] {13} ¦--'{': { [0/2] {14} - ¦--expr: [1/0] {15} - ¦ ¦--expr: [0/0] {17} + ¦--expr: data_ [1/0] {15} + ¦ ¦--expr: data_ [0/0] {17} ¦ ¦ °--SYMBOL_FUNCTION_CALL: data_ [0/0] {16} ¦ ¦--'(': ( [0/4] {18} ¦ ¦--SYMBOL_SUB: x [1/1] {19} ¦ ¦--EQ_SUB: = [0/6] {20} - ¦ ¦--expr: [1/2] {21} - ¦ ¦ ¦--expr: [0/1] {23} + ¦ ¦--expr: long_ [1/2] {21} + ¦ ¦ ¦--expr: long_ [0/1] {23} ¦ ¦ ¦ °--SYMBOL: long_ [0/0] {22} ¦ ¦ ¦--'*': * [0/1] {24} - ¦ ¦ °--expr: [0/0] {26} + ¦ ¦ °--expr: x [0/0] {26} ¦ ¦ °--SYMBOL: x [0/0] {25} ¦ °--')': ) [1/0] {27} °--'}': } [1/0] {28} diff --git a/tests/testthat/indention_operators/eq_formals_complex_indention-in_tree b/tests/testthat/indention_operators/eq_formals_complex_indention-in_tree index a5d7ed7ae..dde5f33df 100644 --- a/tests/testthat/indention_operators/eq_formals_complex_indention-in_tree +++ b/tests/testthat/indention_operators/eq_formals_complex_indention-in_tree @@ -1,31 +1,31 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} + ¦--expr: funct [0/0] {1} ¦ ¦--FUNCTION: funct [0/0] {2} ¦ ¦--'(': ( [0/0] {3} ¦ ¦--SYMBOL_FORMALS: a [0/1] {4} ¦ ¦--EQ_FORMALS: = [0/0] {5} - ¦ ¦--expr: [1/0] {7} + ¦ ¦--expr: 33 [1/0] {7} ¦ ¦ °--NUM_CONST: 33 [0/0] {6} ¦ ¦--',': , [0/2] {8} ¦ ¦--SYMBOL_FORMALS: b [1/2] {9} ¦ ¦--')': ) [1/1] {10} - ¦ °--expr: [0/0] {11} + ¦ °--expr: {} [0/0] {11} ¦ ¦--'{': { [0/0] {12} ¦ °--'}': } [0/0] {13} - ¦--expr: [2/0] {14} + ¦--expr: funct [2/0] {14} ¦ ¦--FUNCTION: funct [0/0] {15} ¦ ¦--'(': ( [0/0] {16} ¦ ¦--SYMBOL_FORMALS: a [0/1] {17} ¦ ¦--EQ_FORMALS: = [0/4] {18} - ¦ ¦--expr: [1/0] {20} + ¦ ¦--expr: 33 [1/0] {20} ¦ ¦ °--NUM_CONST: 33 [0/0] {19} ¦ ¦--',': , [0/2] {21} ¦ ¦--SYMBOL_FORMALS: b [1/2] {22} ¦ ¦--')': ) [0/1] {23} - ¦ °--expr: [0/0] {24} + ¦ °--expr: {} [0/0] {24} ¦ ¦--'{': { [0/0] {25} ¦ °--'}': } [0/0] {26} - ¦--expr: [2/0] {27} + ¦--expr: funct [2/0] {27} ¦ ¦--FUNCTION: funct [0/0] {28} ¦ ¦--'(': ( [0/0] {29} ¦ ¦--SYMBOL_FORMALS: a [0/1] {30} @@ -34,10 +34,10 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦ ¦--',': , [0/0] {33} ¦ ¦--SYMBOL_FORMALS: c [1/2] {34} ¦ ¦--')': ) [1/1] {35} - ¦ °--expr: [0/0] {36} + ¦ °--expr: {} [0/0] {36} ¦ ¦--'{': { [0/0] {37} ¦ °--'}': } [0/0] {38} - ¦--expr: [2/0] {39} + ¦--expr: funct [2/0] {39} ¦ ¦--FUNCTION: funct [0/0] {40} ¦ ¦--'(': ( [0/0] {41} ¦ ¦--SYMBOL_FORMALS: a [0/0] {42} @@ -46,50 +46,52 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦ ¦--',': , [0/0] {45} ¦ ¦--SYMBOL_FORMALS: c [1/0] {46} ¦ ¦--')': ) [0/1] {47} - ¦ °--expr: [0/0] {48} + ¦ °--expr: {} [0/0] {48} ¦ ¦--'{': { [0/0] {49} ¦ °--'}': } [0/0] {50} - ¦--expr: [2/0] {51} + ¦--expr: funct [2/0] {51} ¦ ¦--FUNCTION: funct [0/0] {52} ¦ ¦--'(': ( [0/0] {53} ¦ ¦--SYMBOL_FORMALS: ss [0/0] {54} ¦ ¦--',': , [0/3] {55} ¦ ¦--SYMBOL_FORMALS: a [1/1] {56} ¦ ¦--EQ_FORMALS: = [0/0] {57} - ¦ ¦--expr: [1/0] {59} + ¦ ¦--expr: 3 [1/0] {59} ¦ ¦ °--NUM_CONST: 3 [0/0] {58} ¦ ¦--',': , [0/3] {60} ¦ ¦--SYMBOL_FORMALS: er [1/1] {61} ¦ ¦--EQ_FORMALS: = [0/2] {62} - ¦ ¦--expr: [1/1] {64} + ¦ ¦--expr: 4 [1/1] {64} ¦ ¦ °--NUM_CONST: 4 [0/0] {63} ¦ ¦--')': ) [1/1] {65} - ¦ °--expr: [0/0] {66} + ¦ °--expr: {} [0/0] {66} ¦ ¦--'{': { [0/0] {67} ¦ °--'}': } [0/0] {68} - °--expr: [2/0] {69} + °--expr: funct [2/0] {69} ¦--FUNCTION: funct [0/0] {70} ¦--'(': ( [0/0] {71} ¦--SYMBOL_FORMALS: a [0/1] {72} ¦--EQ_FORMALS: = [0/11] {73} - ¦--expr: [1/0] {75} + ¦--expr: b [1/0] {75} ¦ °--SYMBOL: b [0/0] {74} ¦--',': , [0/9] {76} ¦--SYMBOL_FORMALS: f [1/1] {77} ¦--EQ_FORMALS: = [0/11] {78} - ¦--expr: [1/0] {80} + ¦--expr: d [1/0] {80} ¦ °--SYMBOL: d [0/0] {79} ¦--',': , [0/1] {81} ¦--SYMBOL_FORMALS: c [0/1] {82} ¦--EQ_FORMALS: = [0/11] {83} - ¦--expr: [1/0] {85} + ¦--expr: 3 [1/0] {85} ¦ °--NUM_CONST: 3 [0/0] {84} ¦--',': , [0/1] {86} ¦--SYMBOL_FORMALS: d [0/1] {87} ¦--EQ_FORMALS: = [0/11] {88} - ¦--expr: [1/0] {90} + ¦--expr: 4 [1/0] {90} ¦ °--NUM_CONST: 4 [0/0] {89} ¦--')': ) [0/1] {91} - °--expr: [0/0] {92} + °--expr: { + +} [0/0] {92} ¦--'{': { [0/0] {93} °--'}': } [2/0] {94} diff --git a/tests/testthat/indention_operators/eq_formals_complex_tokens-in_tree b/tests/testthat/indention_operators/eq_formals_complex_tokens-in_tree index a5d7ed7ae..dde5f33df 100644 --- a/tests/testthat/indention_operators/eq_formals_complex_tokens-in_tree +++ b/tests/testthat/indention_operators/eq_formals_complex_tokens-in_tree @@ -1,31 +1,31 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} + ¦--expr: funct [0/0] {1} ¦ ¦--FUNCTION: funct [0/0] {2} ¦ ¦--'(': ( [0/0] {3} ¦ ¦--SYMBOL_FORMALS: a [0/1] {4} ¦ ¦--EQ_FORMALS: = [0/0] {5} - ¦ ¦--expr: [1/0] {7} + ¦ ¦--expr: 33 [1/0] {7} ¦ ¦ °--NUM_CONST: 33 [0/0] {6} ¦ ¦--',': , [0/2] {8} ¦ ¦--SYMBOL_FORMALS: b [1/2] {9} ¦ ¦--')': ) [1/1] {10} - ¦ °--expr: [0/0] {11} + ¦ °--expr: {} [0/0] {11} ¦ ¦--'{': { [0/0] {12} ¦ °--'}': } [0/0] {13} - ¦--expr: [2/0] {14} + ¦--expr: funct [2/0] {14} ¦ ¦--FUNCTION: funct [0/0] {15} ¦ ¦--'(': ( [0/0] {16} ¦ ¦--SYMBOL_FORMALS: a [0/1] {17} ¦ ¦--EQ_FORMALS: = [0/4] {18} - ¦ ¦--expr: [1/0] {20} + ¦ ¦--expr: 33 [1/0] {20} ¦ ¦ °--NUM_CONST: 33 [0/0] {19} ¦ ¦--',': , [0/2] {21} ¦ ¦--SYMBOL_FORMALS: b [1/2] {22} ¦ ¦--')': ) [0/1] {23} - ¦ °--expr: [0/0] {24} + ¦ °--expr: {} [0/0] {24} ¦ ¦--'{': { [0/0] {25} ¦ °--'}': } [0/0] {26} - ¦--expr: [2/0] {27} + ¦--expr: funct [2/0] {27} ¦ ¦--FUNCTION: funct [0/0] {28} ¦ ¦--'(': ( [0/0] {29} ¦ ¦--SYMBOL_FORMALS: a [0/1] {30} @@ -34,10 +34,10 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦ ¦--',': , [0/0] {33} ¦ ¦--SYMBOL_FORMALS: c [1/2] {34} ¦ ¦--')': ) [1/1] {35} - ¦ °--expr: [0/0] {36} + ¦ °--expr: {} [0/0] {36} ¦ ¦--'{': { [0/0] {37} ¦ °--'}': } [0/0] {38} - ¦--expr: [2/0] {39} + ¦--expr: funct [2/0] {39} ¦ ¦--FUNCTION: funct [0/0] {40} ¦ ¦--'(': ( [0/0] {41} ¦ ¦--SYMBOL_FORMALS: a [0/0] {42} @@ -46,50 +46,52 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦ ¦--',': , [0/0] {45} ¦ ¦--SYMBOL_FORMALS: c [1/0] {46} ¦ ¦--')': ) [0/1] {47} - ¦ °--expr: [0/0] {48} + ¦ °--expr: {} [0/0] {48} ¦ ¦--'{': { [0/0] {49} ¦ °--'}': } [0/0] {50} - ¦--expr: [2/0] {51} + ¦--expr: funct [2/0] {51} ¦ ¦--FUNCTION: funct [0/0] {52} ¦ ¦--'(': ( [0/0] {53} ¦ ¦--SYMBOL_FORMALS: ss [0/0] {54} ¦ ¦--',': , [0/3] {55} ¦ ¦--SYMBOL_FORMALS: a [1/1] {56} ¦ ¦--EQ_FORMALS: = [0/0] {57} - ¦ ¦--expr: [1/0] {59} + ¦ ¦--expr: 3 [1/0] {59} ¦ ¦ °--NUM_CONST: 3 [0/0] {58} ¦ ¦--',': , [0/3] {60} ¦ ¦--SYMBOL_FORMALS: er [1/1] {61} ¦ ¦--EQ_FORMALS: = [0/2] {62} - ¦ ¦--expr: [1/1] {64} + ¦ ¦--expr: 4 [1/1] {64} ¦ ¦ °--NUM_CONST: 4 [0/0] {63} ¦ ¦--')': ) [1/1] {65} - ¦ °--expr: [0/0] {66} + ¦ °--expr: {} [0/0] {66} ¦ ¦--'{': { [0/0] {67} ¦ °--'}': } [0/0] {68} - °--expr: [2/0] {69} + °--expr: funct [2/0] {69} ¦--FUNCTION: funct [0/0] {70} ¦--'(': ( [0/0] {71} ¦--SYMBOL_FORMALS: a [0/1] {72} ¦--EQ_FORMALS: = [0/11] {73} - ¦--expr: [1/0] {75} + ¦--expr: b [1/0] {75} ¦ °--SYMBOL: b [0/0] {74} ¦--',': , [0/9] {76} ¦--SYMBOL_FORMALS: f [1/1] {77} ¦--EQ_FORMALS: = [0/11] {78} - ¦--expr: [1/0] {80} + ¦--expr: d [1/0] {80} ¦ °--SYMBOL: d [0/0] {79} ¦--',': , [0/1] {81} ¦--SYMBOL_FORMALS: c [0/1] {82} ¦--EQ_FORMALS: = [0/11] {83} - ¦--expr: [1/0] {85} + ¦--expr: 3 [1/0] {85} ¦ °--NUM_CONST: 3 [0/0] {84} ¦--',': , [0/1] {86} ¦--SYMBOL_FORMALS: d [0/1] {87} ¦--EQ_FORMALS: = [0/11] {88} - ¦--expr: [1/0] {90} + ¦--expr: 4 [1/0] {90} ¦ °--NUM_CONST: 4 [0/0] {89} ¦--')': ) [0/1] {91} - °--expr: [0/0] {92} + °--expr: { + +} [0/0] {92} ¦--'{': { [0/0] {93} °--'}': } [2/0] {94} diff --git a/tests/testthat/indention_operators/eq_sub_complex_indention-in_tree b/tests/testthat/indention_operators/eq_sub_complex_indention-in_tree index 6a104d82d..51e45b4fa 100644 --- a/tests/testthat/indention_operators/eq_sub_complex_indention-in_tree +++ b/tests/testthat/indention_operators/eq_sub_complex_indention-in_tree @@ -1,108 +1,113 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} - ¦ ¦--expr: [0/0] {3} + ¦--expr: call( [0/0] {1} + ¦ ¦--expr: call [0/0] {3} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {2} ¦ ¦--'(': ( [0/0] {4} ¦ ¦--SYMBOL_SUB: a [0/1] {5} ¦ ¦--EQ_SUB: = [0/7] {6} - ¦ ¦--expr: [1/0] {8} + ¦ ¦--expr: 5 [1/0] {8} ¦ ¦ °--NUM_CONST: 5 [0/0] {7} ¦ ¦--',': , [0/5] {9} - ¦ ¦--expr: [1/0] {11} + ¦ ¦--expr: b [1/0] {11} ¦ ¦ °--SYMBOL: b [0/0] {10} ¦ °--')': ) [0/0] {12} - ¦--expr: [2/0] {13} - ¦ ¦--expr: [0/0] {15} + ¦--expr: call( [2/0] {13} + ¦ ¦--expr: call [0/0] {15} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {14} ¦ ¦--'(': ( [0/0] {16} ¦ ¦--SYMBOL_SUB: a [0/1] {17} ¦ ¦--EQ_SUB: = [0/7] {18} - ¦ ¦--expr: [1/0] {20} + ¦ ¦--expr: 5 [1/0] {20} ¦ ¦ °--NUM_CONST: 5 [0/0] {19} ¦ ¦--',': , [0/5] {21} - ¦ ¦--expr: [1/5] {23} + ¦ ¦--expr: b [1/5] {23} ¦ ¦ °--SYMBOL: b [0/0] {22} ¦ °--')': ) [1/0] {24} ¦--COMMENT: # mul [2/0] {25} - ¦--expr: [1/0] {26} + ¦--expr: { + v [1/0] {26} ¦ ¦--'{': { [0/2] {27} - ¦ ¦--expr: [1/0] {28} - ¦ ¦ ¦--expr: [0/1] {30} + ¦ ¦--expr: v <- [1/0] {28} + ¦ ¦ ¦--expr: v [0/1] {30} ¦ ¦ ¦ °--SYMBOL: v [0/0] {29} ¦ ¦ ¦--LEFT_ASSIGN: <- [0/1] {31} - ¦ ¦ °--expr: [0/0] {32} + ¦ ¦ °--expr: funct [0/0] {32} ¦ ¦ ¦--FUNCTION: funct [0/0] {33} ¦ ¦ ¦--'(': ( [0/0] {34} ¦ ¦ ¦--SYMBOL_FORMALS: x [0/1] {35} ¦ ¦ ¦--EQ_FORMALS: = [0/2] {36} - ¦ ¦ ¦--expr: [1/0] {38} + ¦ ¦ ¦--expr: 122 [1/0] {38} ¦ ¦ ¦ °--NUM_CONST: 122 [0/0] {37} ¦ ¦ ¦--',': , [0/2] {39} ¦ ¦ ¦--SYMBOL_FORMALS: y [1/0] {40} ¦ ¦ ¦--')': ) [0/1] {41} - ¦ ¦ °--expr: [0/0] {42} + ¦ ¦ °--expr: { + [0/0] {42} ¦ ¦ ¦--'{': { [0/7] {43} ¦ ¦ °--'}': } [1/0] {44} ¦ °--'}': } [1/0] {45} - ¦--expr: [3/0] {46} + ¦--expr: { + [3/0] {46} ¦ ¦--'{': { [0/8] {47} - ¦ ¦--expr: [1/0] {48} - ¦ ¦ ¦--expr: [0/1] {50} + ¦ ¦--expr: v <- [1/0] {48} + ¦ ¦ ¦--expr: v [0/1] {50} ¦ ¦ ¦ °--SYMBOL: v [0/0] {49} ¦ ¦ ¦--LEFT_ASSIGN: <- [0/1] {51} - ¦ ¦ °--expr: [0/0] {52} + ¦ ¦ °--expr: funct [0/0] {52} ¦ ¦ ¦--FUNCTION: funct [0/0] {53} ¦ ¦ ¦--'(': ( [0/0] {54} ¦ ¦ ¦--SYMBOL_FORMALS: x [0/1] {55} ¦ ¦ ¦--EQ_FORMALS: = [0/1] {56} - ¦ ¦ ¦--expr: [0/0] {58} + ¦ ¦ ¦--expr: 122 [0/0] {58} ¦ ¦ ¦ °--NUM_CONST: 122 [0/0] {57} ¦ ¦ ¦--',': , [0/22] {59} ¦ ¦ ¦--SYMBOL_FORMALS: y [1/0] {60} ¦ ¦ ¦--')': ) [0/1] {61} - ¦ ¦ °--expr: [0/0] {62} + ¦ ¦ °--expr: { + [0/0] {62} ¦ ¦ ¦--'{': { [0/8] {63} ¦ ¦ °--'}': } [1/0] {64} ¦ °--'}': } [1/0] {65} - °--expr: [2/0] {66} - ¦--expr: [0/1] {68} + °--expr: MyCla [2/0] {66} + ¦--expr: MyCla [0/1] {68} ¦ °--SYMBOL: MyCla [0/0] {67} ¦--LEFT_ASSIGN: <- [0/1] {69} - °--expr: [0/0] {70} - ¦--expr: [0/0] {71} + °--expr: R6::R [0/0] {70} + ¦--expr: R6::R [0/0] {71} ¦ ¦--SYMBOL_PACKAGE: R6 [0/0] {72} ¦ ¦--NS_GET: :: [0/0] {73} ¦ °--SYMBOL_FUNCTION_CALL: R6Cla [0/0] {74} ¦--'(': ( [0/8] {75} - ¦--expr: [1/0] {77} + ¦--expr: "MyCl [1/0] {77} ¦ °--STR_CONST: "MyCl [0/0] {76} ¦--',': , [0/8] {78} ¦--SYMBOL_SUB: publi [1/1] {79} ¦--EQ_SUB: = [0/1] {80} - ¦--expr: [0/0] {81} - ¦ ¦--expr: [0/0] {83} + ¦--expr: list( [0/0] {81} + ¦ ¦--expr: list [0/0] {83} ¦ ¦ °--SYMBOL_FUNCTION_CALL: list [0/0] {82} ¦ ¦--'(': ( [0/0] {84} ¦ ¦--SYMBOL_SUB: initi [0/1] {85} ¦ ¦--EQ_SUB: = [0/1] {86} - ¦ ¦--expr: [0/8] {87} + ¦ ¦--expr: funct [0/8] {87} ¦ ¦ ¦--FUNCTION: funct [0/0] {88} ¦ ¦ ¦--'(': ( [0/0] {89} ¦ ¦ ¦--SYMBOL_FORMALS: my_ar [0/0] {90} ¦ ¦ ¦--',': , [0/44] {91} ¦ ¦ ¦--SYMBOL_FORMALS: my_na [1/1] {92} ¦ ¦ ¦--EQ_FORMALS: = [0/1] {93} - ¦ ¦ ¦--expr: [0/0] {95} + ¦ ¦ ¦--expr: 1 [0/0] {95} ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {94} ¦ ¦ ¦--')': ) [0/1] {96} - ¦ ¦ °--expr: [0/0] {97} + ¦ ¦ °--expr: { + [0/0] {97} ¦ ¦ ¦--'{': { [0/16] {98} - ¦ ¦ ¦--expr: [1/8] {99} - ¦ ¦ ¦ ¦--expr: [0/0] {101} + ¦ ¦ ¦--expr: retur [1/8] {99} + ¦ ¦ ¦ ¦--expr: retur [0/0] {101} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: retur [0/0] {100} ¦ ¦ ¦ ¦--'(': ( [0/0] {102} - ¦ ¦ ¦ ¦--expr: [0/0] {103} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {105} + ¦ ¦ ¦ ¦--expr: invis [0/0] {103} + ¦ ¦ ¦ ¦ ¦--expr: invis [0/0] {105} ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: invis [0/0] {104} ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {106} ¦ ¦ ¦ ¦ °--')': ) [0/0] {107} diff --git a/tests/testthat/indention_operators/eq_sub_complex_tokens-in_tree b/tests/testthat/indention_operators/eq_sub_complex_tokens-in_tree index e0aa7cf38..39a97fc74 100644 --- a/tests/testthat/indention_operators/eq_sub_complex_tokens-in_tree +++ b/tests/testthat/indention_operators/eq_sub_complex_tokens-in_tree @@ -1,25 +1,25 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} - ¦ ¦--expr: [0/0] {3} + ¦--expr: call( [0/0] {1} + ¦ ¦--expr: call [0/0] {3} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {2} ¦ ¦--'(': ( [0/0] {4} ¦ ¦--SYMBOL_SUB: a [0/1] {5} ¦ ¦--EQ_SUB: = [0/7] {6} - ¦ ¦--expr: [1/0] {8} + ¦ ¦--expr: 5 [1/0] {8} ¦ ¦ °--NUM_CONST: 5 [0/0] {7} ¦ ¦--',': , [0/5] {9} - ¦ ¦--expr: [1/0] {11} + ¦ ¦--expr: b [1/0] {11} ¦ ¦ °--SYMBOL: b [0/0] {10} ¦ °--')': ) [0/0] {12} - °--expr: [2/0] {13} - ¦--expr: [0/0] {15} + °--expr: call( [2/0] {13} + ¦--expr: call [0/0] {15} ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {14} ¦--'(': ( [0/0] {16} ¦--SYMBOL_SUB: a [0/1] {17} ¦--EQ_SUB: = [0/7] {18} - ¦--expr: [1/0] {20} + ¦--expr: 5 [1/0] {20} ¦ °--NUM_CONST: 5 [0/0] {19} ¦--',': , [0/5] {21} - ¦--expr: [1/5] {23} + ¦--expr: b [1/5] {23} ¦ °--SYMBOL: b [0/0] {22} °--')': ) [1/0] {24} diff --git a/tests/testthat/indention_operators/function-multiline-no-braces-non-strict-in_tree b/tests/testthat/indention_operators/function-multiline-no-braces-non-strict-in_tree index 767984697..aa5df2234 100644 --- a/tests/testthat/indention_operators/function-multiline-no-braces-non-strict-in_tree +++ b/tests/testthat/indention_operators/function-multiline-no-braces-non-strict-in_tree @@ -1,102 +1,105 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} - ¦ ¦--expr: [0/1] {3} + ¦--expr: g <- [0/0] {1} + ¦ ¦--expr: g [0/1] {3} ¦ ¦ °--SYMBOL: g [0/0] {2} ¦ ¦--LEFT_ASSIGN: <- [0/1] {4} - ¦ °--expr: [0/0] {5} + ¦ °--expr: funct [0/0] {5} ¦ ¦--FUNCTION: funct [0/0] {6} ¦ ¦--'(': ( [0/0] {7} ¦ ¦--SYMBOL_FORMALS: k [0/0] {8} ¦ ¦--')': ) [0/2] {9} - ¦ °--expr: [1/0] {11} + ¦ °--expr: NULL [1/0] {11} ¦ °--NULL_CONST: NULL [0/0] {10} - ¦--expr: [3/0] {12} - ¦ ¦--expr: [0/1] {14} + ¦--expr: g <- [3/0] {12} + ¦ ¦--expr: g [0/1] {14} ¦ ¦ °--SYMBOL: g [0/0] {13} ¦ ¦--LEFT_ASSIGN: <- [0/1] {15} - ¦ °--expr: [0/0] {16} + ¦ °--expr: funct [0/0] {16} ¦ ¦--FUNCTION: funct [0/0] {17} ¦ ¦--'(': ( [0/0] {18} ¦ ¦--SYMBOL_FORMALS: k [0/0] {19} ¦ ¦--')': ) [0/1] {20} - ¦ °--expr: [0/0] {21} - ¦ ¦--expr: [0/0] {23} + ¦ °--expr: h( + [0/0] {21} + ¦ ¦--expr: h [0/0] {23} ¦ ¦ °--SYMBOL_FUNCTION_CALL: h [0/0] {22} ¦ ¦--'(': ( [0/2] {24} - ¦ ¦--expr: [1/0] {26} + ¦ ¦--expr: NULL [1/0] {26} ¦ ¦ °--NULL_CONST: NULL [0/0] {25} ¦ °--')': ) [1/0] {27} - ¦--expr: [3/0] {28} - ¦ ¦--expr: [0/1] {30} + ¦--expr: g <- [3/0] {28} + ¦ ¦--expr: g [0/1] {30} ¦ ¦ °--SYMBOL: g [0/0] {29} ¦ ¦--LEFT_ASSIGN: <- [0/1] {31} - ¦ °--expr: [0/0] {32} + ¦ °--expr: funct [0/0] {32} ¦ ¦--FUNCTION: funct [0/0] {33} ¦ ¦--'(': ( [0/0] {34} ¦ ¦--SYMBOL_FORMALS: k [0/0] {35} ¦ ¦--')': ) [0/1] {36} - ¦ °--expr: [0/0] {37} - ¦ ¦--expr: [0/0] {39} + ¦ °--expr: h( # [0/0] {37} + ¦ ¦--expr: h [0/0] {39} ¦ ¦ °--SYMBOL_FUNCTION_CALL: h [0/0] {38} ¦ ¦--'(': ( [0/1] {40} ¦ ¦--COMMENT: # y [0/2] {41} - ¦ ¦--expr: [1/1] {43} + ¦ ¦--expr: NULL [1/1] {43} ¦ ¦ °--NULL_CONST: NULL [0/0] {42} ¦ ¦--COMMENT: # x [0/0] {44} ¦ °--')': ) [1/0] {45} - ¦--expr: [2/0] {46} - ¦ ¦--expr: [0/1] {48} + ¦--expr: g <- [2/0] {46} + ¦ ¦--expr: g [0/1] {48} ¦ ¦ °--SYMBOL: g [0/0] {47} ¦ ¦--LEFT_ASSIGN: <- [0/1] {49} - ¦ °--expr: [0/0] {50} + ¦ °--expr: funct [0/0] {50} ¦ ¦--FUNCTION: funct [0/0] {51} ¦ ¦--'(': ( [0/0] {52} ¦ ¦--SYMBOL_FORMALS: k [0/0] {53} ¦ ¦--')': ) [0/1] {54} - ¦ °--expr: [0/0] {55} - ¦ ¦--expr: [0/0] {57} + ¦ °--expr: h( # [0/0] {55} + ¦ ¦--expr: h [0/0] {57} ¦ ¦ °--SYMBOL_FUNCTION_CALL: h [0/0] {56} ¦ ¦--'(': ( [0/1] {58} ¦ ¦--COMMENT: # y [0/2] {59} - ¦ ¦--expr: [1/0] {61} + ¦ ¦--expr: NULL [1/0] {61} ¦ ¦ °--NULL_CONST: NULL [0/0] {60} ¦ °--')': ) [1/0] {62} - ¦--expr: [3/0] {63} - ¦ ¦--expr: [0/1] {65} + ¦--expr: g <- [3/0] {63} + ¦ ¦--expr: g [0/1] {65} ¦ ¦ °--SYMBOL: g [0/0] {64} ¦ ¦--LEFT_ASSIGN: <- [0/1] {66} - ¦ °--expr: [0/0] {67} + ¦ °--expr: funct [0/0] {67} ¦ ¦--FUNCTION: funct [0/0] {68} ¦ ¦--'(': ( [0/0] {69} ¦ ¦--SYMBOL_FORMALS: k [0/0] {70} ¦ ¦--')': ) [0/1] {71} - ¦ °--expr: [0/0] {72} - ¦ ¦--expr: [0/0] {74} + ¦ °--expr: h( + [0/0] {72} + ¦ ¦--expr: h [0/0] {74} ¦ ¦ °--SYMBOL_FUNCTION_CALL: h [0/0] {73} ¦ ¦--'(': ( [0/2] {75} - ¦ ¦--expr: [1/1] {77} + ¦ ¦--expr: NULL [1/1] {77} ¦ ¦ °--NULL_CONST: NULL [0/0] {76} ¦ ¦--COMMENT: # 3jk [0/0] {78} ¦ °--')': ) [1/0] {79} - °--expr: [2/0] {80} - ¦--expr: [0/1] {82} + °--expr: g <- [2/0] {80} + ¦--expr: g [0/1] {82} ¦ °--SYMBOL: g [0/0] {81} ¦--LEFT_ASSIGN: <- [0/1] {83} - °--expr: [0/0] {84} + °--expr: funct [0/0] {84} ¦--FUNCTION: funct [0/0] {85} ¦--'(': ( [0/0] {86} ¦--SYMBOL_FORMALS: k [0/0] {87} ¦--')': ) [0/1] {88} - °--expr: [0/0] {89} - ¦--expr: [0/0] {91} + °--expr: h( + [0/0] {89} + ¦--expr: h [0/0] {91} ¦ °--SYMBOL_FUNCTION_CALL: h [0/0] {90} ¦--'(': ( [0/2] {92} - ¦--expr: [1/0] {93} + ¦--expr: if (T [1/0] {93} ¦ ¦--IF: if [0/1] {94} ¦ ¦--'(': ( [0/0] {95} - ¦ ¦--expr: [0/0] {97} + ¦ ¦--expr: TRUE [0/0] {97} ¦ ¦ °--NUM_CONST: TRUE [0/0] {96} ¦ ¦--')': ) [0/4] {98} - ¦ °--expr: [1/0] {100} + ¦ °--expr: x [1/0] {100} ¦ °--SYMBOL: x [0/0] {99} °--')': ) [1/0] {101} diff --git a/tests/testthat/indention_operators/function-multiline-no-braces-strict-in_tree b/tests/testthat/indention_operators/function-multiline-no-braces-strict-in_tree index 767984697..aa5df2234 100644 --- a/tests/testthat/indention_operators/function-multiline-no-braces-strict-in_tree +++ b/tests/testthat/indention_operators/function-multiline-no-braces-strict-in_tree @@ -1,102 +1,105 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} - ¦ ¦--expr: [0/1] {3} + ¦--expr: g <- [0/0] {1} + ¦ ¦--expr: g [0/1] {3} ¦ ¦ °--SYMBOL: g [0/0] {2} ¦ ¦--LEFT_ASSIGN: <- [0/1] {4} - ¦ °--expr: [0/0] {5} + ¦ °--expr: funct [0/0] {5} ¦ ¦--FUNCTION: funct [0/0] {6} ¦ ¦--'(': ( [0/0] {7} ¦ ¦--SYMBOL_FORMALS: k [0/0] {8} ¦ ¦--')': ) [0/2] {9} - ¦ °--expr: [1/0] {11} + ¦ °--expr: NULL [1/0] {11} ¦ °--NULL_CONST: NULL [0/0] {10} - ¦--expr: [3/0] {12} - ¦ ¦--expr: [0/1] {14} + ¦--expr: g <- [3/0] {12} + ¦ ¦--expr: g [0/1] {14} ¦ ¦ °--SYMBOL: g [0/0] {13} ¦ ¦--LEFT_ASSIGN: <- [0/1] {15} - ¦ °--expr: [0/0] {16} + ¦ °--expr: funct [0/0] {16} ¦ ¦--FUNCTION: funct [0/0] {17} ¦ ¦--'(': ( [0/0] {18} ¦ ¦--SYMBOL_FORMALS: k [0/0] {19} ¦ ¦--')': ) [0/1] {20} - ¦ °--expr: [0/0] {21} - ¦ ¦--expr: [0/0] {23} + ¦ °--expr: h( + [0/0] {21} + ¦ ¦--expr: h [0/0] {23} ¦ ¦ °--SYMBOL_FUNCTION_CALL: h [0/0] {22} ¦ ¦--'(': ( [0/2] {24} - ¦ ¦--expr: [1/0] {26} + ¦ ¦--expr: NULL [1/0] {26} ¦ ¦ °--NULL_CONST: NULL [0/0] {25} ¦ °--')': ) [1/0] {27} - ¦--expr: [3/0] {28} - ¦ ¦--expr: [0/1] {30} + ¦--expr: g <- [3/0] {28} + ¦ ¦--expr: g [0/1] {30} ¦ ¦ °--SYMBOL: g [0/0] {29} ¦ ¦--LEFT_ASSIGN: <- [0/1] {31} - ¦ °--expr: [0/0] {32} + ¦ °--expr: funct [0/0] {32} ¦ ¦--FUNCTION: funct [0/0] {33} ¦ ¦--'(': ( [0/0] {34} ¦ ¦--SYMBOL_FORMALS: k [0/0] {35} ¦ ¦--')': ) [0/1] {36} - ¦ °--expr: [0/0] {37} - ¦ ¦--expr: [0/0] {39} + ¦ °--expr: h( # [0/0] {37} + ¦ ¦--expr: h [0/0] {39} ¦ ¦ °--SYMBOL_FUNCTION_CALL: h [0/0] {38} ¦ ¦--'(': ( [0/1] {40} ¦ ¦--COMMENT: # y [0/2] {41} - ¦ ¦--expr: [1/1] {43} + ¦ ¦--expr: NULL [1/1] {43} ¦ ¦ °--NULL_CONST: NULL [0/0] {42} ¦ ¦--COMMENT: # x [0/0] {44} ¦ °--')': ) [1/0] {45} - ¦--expr: [2/0] {46} - ¦ ¦--expr: [0/1] {48} + ¦--expr: g <- [2/0] {46} + ¦ ¦--expr: g [0/1] {48} ¦ ¦ °--SYMBOL: g [0/0] {47} ¦ ¦--LEFT_ASSIGN: <- [0/1] {49} - ¦ °--expr: [0/0] {50} + ¦ °--expr: funct [0/0] {50} ¦ ¦--FUNCTION: funct [0/0] {51} ¦ ¦--'(': ( [0/0] {52} ¦ ¦--SYMBOL_FORMALS: k [0/0] {53} ¦ ¦--')': ) [0/1] {54} - ¦ °--expr: [0/0] {55} - ¦ ¦--expr: [0/0] {57} + ¦ °--expr: h( # [0/0] {55} + ¦ ¦--expr: h [0/0] {57} ¦ ¦ °--SYMBOL_FUNCTION_CALL: h [0/0] {56} ¦ ¦--'(': ( [0/1] {58} ¦ ¦--COMMENT: # y [0/2] {59} - ¦ ¦--expr: [1/0] {61} + ¦ ¦--expr: NULL [1/0] {61} ¦ ¦ °--NULL_CONST: NULL [0/0] {60} ¦ °--')': ) [1/0] {62} - ¦--expr: [3/0] {63} - ¦ ¦--expr: [0/1] {65} + ¦--expr: g <- [3/0] {63} + ¦ ¦--expr: g [0/1] {65} ¦ ¦ °--SYMBOL: g [0/0] {64} ¦ ¦--LEFT_ASSIGN: <- [0/1] {66} - ¦ °--expr: [0/0] {67} + ¦ °--expr: funct [0/0] {67} ¦ ¦--FUNCTION: funct [0/0] {68} ¦ ¦--'(': ( [0/0] {69} ¦ ¦--SYMBOL_FORMALS: k [0/0] {70} ¦ ¦--')': ) [0/1] {71} - ¦ °--expr: [0/0] {72} - ¦ ¦--expr: [0/0] {74} + ¦ °--expr: h( + [0/0] {72} + ¦ ¦--expr: h [0/0] {74} ¦ ¦ °--SYMBOL_FUNCTION_CALL: h [0/0] {73} ¦ ¦--'(': ( [0/2] {75} - ¦ ¦--expr: [1/1] {77} + ¦ ¦--expr: NULL [1/1] {77} ¦ ¦ °--NULL_CONST: NULL [0/0] {76} ¦ ¦--COMMENT: # 3jk [0/0] {78} ¦ °--')': ) [1/0] {79} - °--expr: [2/0] {80} - ¦--expr: [0/1] {82} + °--expr: g <- [2/0] {80} + ¦--expr: g [0/1] {82} ¦ °--SYMBOL: g [0/0] {81} ¦--LEFT_ASSIGN: <- [0/1] {83} - °--expr: [0/0] {84} + °--expr: funct [0/0] {84} ¦--FUNCTION: funct [0/0] {85} ¦--'(': ( [0/0] {86} ¦--SYMBOL_FORMALS: k [0/0] {87} ¦--')': ) [0/1] {88} - °--expr: [0/0] {89} - ¦--expr: [0/0] {91} + °--expr: h( + [0/0] {89} + ¦--expr: h [0/0] {91} ¦ °--SYMBOL_FUNCTION_CALL: h [0/0] {90} ¦--'(': ( [0/2] {92} - ¦--expr: [1/0] {93} + ¦--expr: if (T [1/0] {93} ¦ ¦--IF: if [0/1] {94} ¦ ¦--'(': ( [0/0] {95} - ¦ ¦--expr: [0/0] {97} + ¦ ¦--expr: TRUE [0/0] {97} ¦ ¦ °--NUM_CONST: TRUE [0/0] {96} ¦ ¦--')': ) [0/4] {98} - ¦ °--expr: [1/0] {100} + ¦ °--expr: x [1/0] {100} ¦ °--SYMBOL: x [0/0] {99} °--')': ) [1/0] {101} diff --git a/tests/testthat/indention_operators/if-else-no-braces-not-strict-in_tree b/tests/testthat/indention_operators/if-else-no-braces-not-strict-in_tree index 150fe53a5..450857878 100644 --- a/tests/testthat/indention_operators/if-else-no-braces-not-strict-in_tree +++ b/tests/testthat/indention_operators/if-else-no-braces-not-strict-in_tree @@ -1,66 +1,71 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} + ¦--expr: if (T [0/0] {1} ¦ ¦--IF: if [0/1] {2} ¦ ¦--'(': ( [0/0] {3} - ¦ ¦--expr: [0/0] {5} + ¦ ¦--expr: TRUE [0/0] {5} ¦ ¦ °--NUM_CONST: TRUE [0/0] {4} ¦ ¦--')': ) [0/1] {6} - ¦ ¦--expr: [0/1] {7} - ¦ ¦ ¦--expr: [0/0] {9} + ¦ ¦--expr: c( + [0/1] {7} + ¦ ¦ ¦--expr: c [0/0] {9} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {8} ¦ ¦ ¦--'(': ( [0/2] {10} - ¦ ¦ ¦--expr: [1/0] {12} + ¦ ¦ ¦--expr: 2 [1/0] {12} ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {11} ¦ ¦ °--')': ) [1/0] {13} ¦ ¦--ELSE: else [0/1] {14} - ¦ °--expr: [0/0] {15} - ¦ ¦--expr: [0/0] {17} + ¦ °--expr: c( + [0/0] {15} + ¦ ¦--expr: c [0/0] {17} ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {16} ¦ ¦--'(': ( [0/2] {18} - ¦ ¦--expr: [1/0] {20} + ¦ ¦--expr: 1 [1/0] {20} ¦ ¦ °--NUM_CONST: 1 [0/0] {19} ¦ °--')': ) [1/0] {21} - ¦--expr: [2/0] {22} + ¦--expr: if (T [2/0] {22} ¦ ¦--IF: if [0/1] {23} ¦ ¦--'(': ( [0/0] {24} - ¦ ¦--expr: [0/0] {26} + ¦ ¦--expr: TRUE [0/0] {26} ¦ ¦ °--NUM_CONST: TRUE [0/0] {25} ¦ ¦--')': ) [0/1] {27} - ¦ ¦--expr: [0/1] {28} - ¦ ¦ ¦--expr: [0/0] {30} + ¦ ¦--expr: c( + [0/1] {28} + ¦ ¦ ¦--expr: c [0/0] {30} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {29} ¦ ¦ ¦--'(': ( [0/2] {31} - ¦ ¦ ¦--expr: [1/0] {33} + ¦ ¦ ¦--expr: 2 [1/0] {33} ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {32} ¦ ¦ °--')': ) [1/0] {34} ¦ ¦--ELSE: else [0/1] {35} - ¦ °--expr: [0/0] {36} - ¦ ¦--expr: [0/0] {38} + ¦ °--expr: c( # [0/0] {36} + ¦ ¦--expr: c [0/0] {38} ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {37} ¦ ¦--'(': ( [0/1] {39} ¦ ¦--COMMENT: # not [0/2] {40} - ¦ ¦--expr: [1/0] {42} + ¦ ¦--expr: 1 [1/0] {42} ¦ ¦ °--NUM_CONST: 1 [0/0] {41} ¦ °--')': ) [1/0] {43} - °--expr: [2/0] {44} + °--expr: if (T [2/0] {44} ¦--IF: if [0/1] {45} ¦--'(': ( [0/0] {46} - ¦--expr: [0/0] {48} + ¦--expr: TRUE [0/0] {48} ¦ °--NUM_CONST: TRUE [0/0] {47} ¦--')': ) [0/1] {49} - ¦--expr: [0/1] {50} - ¦ ¦--expr: [0/0] {52} + ¦--expr: c( + [0/1] {50} + ¦ ¦--expr: c [0/0] {52} ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {51} ¦ ¦--'(': ( [0/2] {53} - ¦ ¦--expr: [1/1] {55} + ¦ ¦--expr: 2 [1/1] {55} ¦ ¦ °--NUM_CONST: 2 [0/0] {54} ¦ ¦--COMMENT: # als [0/0] {56} ¦ °--')': ) [1/0] {57} ¦--ELSE: else [0/1] {58} - °--expr: [0/0] {59} - ¦--expr: [0/0] {61} + °--expr: c( + [0/0] {59} + ¦--expr: c [0/0] {61} ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {60} ¦--'(': ( [0/2] {62} - ¦--expr: [1/0] {64} + ¦--expr: 1 [1/0] {64} ¦ °--NUM_CONST: 1 [0/0] {63} °--')': ) [1/0] {65} diff --git a/tests/testthat/indention_operators/logical_special_eq_sub-in_tree b/tests/testthat/indention_operators/logical_special_eq_sub-in_tree index 0ca35a0e9..b5005d279 100644 --- a/tests/testthat/indention_operators/logical_special_eq_sub-in_tree +++ b/tests/testthat/indention_operators/logical_special_eq_sub-in_tree @@ -1,43 +1,47 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/2] {1} - ¦ ¦--expr: [0/1] {3} + ¦--expr: a || + [0/2] {1} + ¦ ¦--expr: a [0/1] {3} ¦ ¦ °--SYMBOL: a [0/0] {2} ¦ ¦--OR2: || [0/0] {4} - ¦ °--expr: [1/0] {6} + ¦ °--expr: b [1/0] {6} ¦ °--SYMBOL: b [0/0] {5} - ¦--expr: [2/0] {7} - ¦ ¦--expr: [0/1] {9} + ¦--expr: a > +4 [2/0] {7} + ¦ ¦--expr: a [0/1] {9} ¦ ¦ °--SYMBOL: a [0/0] {8} ¦ ¦--GT: > [0/0] {10} - ¦ °--expr: [1/0] {12} + ¦ °--expr: 4 [1/0] {12} ¦ °--NUM_CONST: 4 [0/0] {11} - ¦--expr: [2/0] {13} - ¦ ¦--expr: [0/0] {15} + ¦--expr: a& +3 [2/0] {13} + ¦ ¦--expr: a [0/0] {15} ¦ ¦ °--SYMBOL: a [0/0] {14} ¦ ¦--AND: & [0/0] {16} - ¦ °--expr: [1/0] {18} + ¦ °--expr: 3 [1/0] {18} ¦ °--NUM_CONST: 3 [0/0] {17} - ¦--expr: [2/0] {19} - ¦ ¦--expr: [0/1] {21} + ¦--expr: b %in [2/0] {19} + ¦ ¦--expr: b [0/1] {21} ¦ ¦ °--SYMBOL: b [0/0] {20} ¦ ¦--SPECIAL-IN: %in% [0/1] {22} - ¦ °--expr: [1/0] {24} + ¦ °--expr: c [1/0] {24} ¦ °--SYMBOL: c [0/0] {23} - ¦--expr: [2/0] {25} - ¦ ¦--expr: [0/0] {27} + ¦--expr: data_ [2/0] {25} + ¦ ¦--expr: data_ [0/0] {27} ¦ ¦ °--SYMBOL_FUNCTION_CALL: data_ [0/0] {26} ¦ ¦--'(': ( [0/0] {28} ¦ ¦--SYMBOL_SUB: a [1/5] {29} ¦ ¦--EQ_SUB: = [0/6] {30} - ¦ ¦--expr: [1/1] {31} - ¦ ¦ ¦--expr: [0/0] {33} + ¦ ¦--expr: list( [1/1] {31} + ¦ ¦ ¦--expr: list [0/0] {33} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: list [0/0] {32} ¦ ¦ ¦--'(': ( [0/0] {34} ¦ ¦ °--')': ) [0/0] {35} ¦ °--')': ) [1/0] {36} - °--equal_assign: [1/0] {37} - ¦--expr: [0/1] {39} + °--equal_assign: b = +3 [1/0] {37} + ¦--expr: b [0/1] {39} ¦ °--SYMBOL: b [0/0] {38} ¦--EQ_ASSIGN: = [0/0] {40} - °--expr: [1/0] {42} + °--expr: 3 [1/0] {42} °--NUM_CONST: 3 [0/0] {41} diff --git a/tests/testthat/indention_operators/multiply_divide-in_tree b/tests/testthat/indention_operators/multiply_divide-in_tree index c148d6da2..22a0e338c 100644 --- a/tests/testthat/indention_operators/multiply_divide-in_tree +++ b/tests/testthat/indention_operators/multiply_divide-in_tree @@ -1,31 +1,33 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/3] {1} - ¦ ¦--expr: [0/1] {4} + ¦--expr: 1 / +2 [0/3] {1} + ¦ ¦--expr: 1 [0/1] {4} ¦ ¦ °--NUM_CONST: 1 [0/0] {3} ¦ ¦--'/': / [0/0] {5} - ¦ ¦--expr: [1/1] {7} + ¦ ¦--expr: 2 [1/1] {7} ¦ ¦ °--NUM_CONST: 2 [0/0] {6} ¦ ¦--'+': + [0/1] {8} - ¦ °--expr: [0/0] {9} - ¦ ¦--expr: [0/1] {14} + ¦ °--expr: 3 * +1 [0/0] {9} + ¦ ¦--expr: 3 [0/1] {14} ¦ ¦ °--NUM_CONST: 3 [0/0] {13} ¦ ¦--'*': * [0/0] {15} - ¦ ¦--expr: [1/1] {17} + ¦ ¦--expr: 17 [1/1] {17} ¦ ¦ °--NUM_CONST: 17 [0/0] {16} ¦ ¦--'*': * [0/0] {18} - ¦ ¦--expr: [1/1] {20} + ¦ ¦--expr: 22222 [1/1] {20} ¦ ¦ °--NUM_CONST: 22222 [0/0] {19} ¦ ¦--'/': / [0/6] {21} - ¦ ¦--expr: [1/1] {23} + ¦ ¦--expr: 19 [1/1] {23} ¦ ¦ °--NUM_CONST: 19 [0/0] {22} ¦ ¦--'*': * [0/6] {24} - ¦ °--expr: [1/0] {25} + ¦ °--expr: -1 [1/0] {25} ¦ ¦--'-': - [0/0] {26} - ¦ °--expr: [0/0] {28} + ¦ °--expr: 1 [0/0] {28} ¦ °--NUM_CONST: 1 [0/0] {27} - °--expr: [2/0] {29} - ¦--expr: [0/1] {31} + °--expr: 3 * 2 [2/0] {29} + ¦--expr: 3 [0/1] {31} ¦ °--NUM_CONST: 3 [0/0] {30} ¦--'*': * [0/1] {32} - °--expr: [0/0] {34} + °--expr: 22 [0/0] {34} °--NUM_CONST: 22 [0/0] {33} diff --git a/tests/testthat/indention_operators/nested-for-spacing-scope-indention-in_tree b/tests/testthat/indention_operators/nested-for-spacing-scope-indention-in_tree index e155d0e13..a6579de76 100644 --- a/tests/testthat/indention_operators/nested-for-spacing-scope-indention-in_tree +++ b/tests/testthat/indention_operators/nested-for-spacing-scope-indention-in_tree @@ -1,51 +1,54 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} + ¦--expr: for ( [0/0] {1} ¦ ¦--FOR: for [0/1] {2} - ¦ ¦--forcond: [0/0] {3} + ¦ ¦--forcond: (x in [0/0] {3} ¦ ¦ ¦--'(': ( [0/0] {4} ¦ ¦ ¦--SYMBOL: x [0/1] {5} ¦ ¦ ¦--IN: in [0/1] {6} - ¦ ¦ ¦--expr: [0/0] {8} + ¦ ¦ ¦--expr: 1 [0/0] {8} ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {7} ¦ ¦ °--')': ) [0/0] {9} - ¦ °--expr: [0/0] {10} + ¦ °--expr: { +x +f [0/0] {10} ¦ ¦--'{': { [0/0] {11} - ¦ ¦--expr: [1/0] {13} + ¦ ¦--expr: x [1/0] {13} ¦ ¦ °--SYMBOL: x [0/0] {12} - ¦ ¦--expr: [1/0] {14} + ¦ ¦--expr: for ( [1/0] {14} ¦ ¦ ¦--FOR: for [0/1] {15} - ¦ ¦ ¦--forcond: [0/0] {16} + ¦ ¦ ¦--forcond: (x in [0/0] {16} ¦ ¦ ¦ ¦--'(': ( [0/0] {17} ¦ ¦ ¦ ¦--SYMBOL: x [0/1] {18} ¦ ¦ ¦ ¦--IN: in [0/1] {19} - ¦ ¦ ¦ ¦--expr: [0/1] {21} + ¦ ¦ ¦ ¦--expr: k [0/1] {21} ¦ ¦ ¦ ¦ °--SYMBOL: k [0/0] {20} ¦ ¦ ¦ °--')': ) [0/0] {22} - ¦ ¦ °--expr: [1/0] {24} + ¦ ¦ °--expr: 3 [1/0] {24} ¦ ¦ °--NUM_CONST: 3 [0/0] {23} ¦ °--'}': } [1/0] {25} - °--expr: [2/0] {26} + °--expr: for ( [2/0] {26} ¦--FOR: for [0/1] {27} - ¦--forcond: [0/1] {28} + ¦--forcond: (x in [0/1] {28} ¦ ¦--'(': ( [0/0] {29} ¦ ¦--SYMBOL: x [0/1] {30} ¦ ¦--IN: in [0/1] {31} - ¦ ¦--expr: [0/0] {33} + ¦ ¦--expr: 1 [0/0] {33} ¦ ¦ °--NUM_CONST: 1 [0/0] {32} ¦ °--')': ) [0/0] {34} - °--expr: [0/0] {35} + °--expr: { + x [0/0] {35} ¦--'{': { [0/2] {36} - ¦--expr: [1/2] {38} + ¦--expr: x [1/2] {38} ¦ °--SYMBOL: x [0/0] {37} - ¦--expr: [1/0] {39} + ¦--expr: for ( [1/0] {39} ¦ ¦--FOR: for [0/1] {40} - ¦ ¦--forcond: [0/2] {41} + ¦ ¦--forcond: (x in [0/2] {41} ¦ ¦ ¦--'(': ( [0/0] {42} ¦ ¦ ¦--SYMBOL: x [0/1] {43} ¦ ¦ ¦--IN: in [0/1] {44} - ¦ ¦ ¦--expr: [0/1] {46} + ¦ ¦ ¦--expr: k [0/1] {46} ¦ ¦ ¦ °--SYMBOL: k [0/0] {45} ¦ ¦ °--')': ) [0/0] {47} - ¦ °--expr: [1/0] {49} + ¦ °--expr: 3 [1/0] {49} ¦ °--NUM_CONST: 3 [0/0] {48} °--'}': } [1/0] {50} diff --git a/tests/testthat/indention_operators/nested-for-spacing-scope-spaces-in_tree b/tests/testthat/indention_operators/nested-for-spacing-scope-spaces-in_tree index 166350095..2f0f75e20 100644 --- a/tests/testthat/indention_operators/nested-for-spacing-scope-spaces-in_tree +++ b/tests/testthat/indention_operators/nested-for-spacing-scope-spaces-in_tree @@ -1,51 +1,53 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} + ¦--expr: for ( [0/0] {1} ¦ ¦--FOR: for [0/1] {2} - ¦ ¦--forcond: [0/1] {3} + ¦ ¦--forcond: (x in [0/1] {3} ¦ ¦ ¦--'(': ( [0/0] {4} ¦ ¦ ¦--SYMBOL: x [0/1] {5} ¦ ¦ ¦--IN: in [0/1] {6} - ¦ ¦ ¦--expr: [0/0] {8} + ¦ ¦ ¦--expr: 1 [0/0] {8} ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {7} ¦ ¦ °--')': ) [0/0] {9} - ¦ °--expr: [0/0] {10} + ¦ °--expr: { + x [0/0] {10} ¦ ¦--'{': { [0/2] {11} - ¦ ¦--expr: [1/2] {13} + ¦ ¦--expr: x [1/2] {13} ¦ ¦ °--SYMBOL: x [0/0] {12} - ¦ ¦--expr: [1/0] {14} + ¦ ¦--expr: for ( [1/0] {14} ¦ ¦ ¦--FOR: for [0/1] {15} - ¦ ¦ ¦--forcond: [0/4] {16} + ¦ ¦ ¦--forcond: (x in [0/4] {16} ¦ ¦ ¦ ¦--'(': ( [0/0] {17} ¦ ¦ ¦ ¦--SYMBOL: x [0/1] {18} ¦ ¦ ¦ ¦--IN: in [0/1] {19} - ¦ ¦ ¦ ¦--expr: [0/1] {21} + ¦ ¦ ¦ ¦--expr: k [0/1] {21} ¦ ¦ ¦ ¦ °--SYMBOL: k [0/0] {20} ¦ ¦ ¦ °--')': ) [0/0] {22} - ¦ ¦ °--expr: [1/0] {24} + ¦ ¦ °--expr: 3 [1/0] {24} ¦ ¦ °--NUM_CONST: 3 [0/0] {23} ¦ °--'}': } [1/0] {25} - °--expr: [2/0] {26} + °--expr: for ( [2/0] {26} ¦--FOR: for [0/1] {27} - ¦--forcond: [0/1] {28} + ¦--forcond: (x in [0/1] {28} ¦ ¦--'(': ( [0/0] {29} ¦ ¦--SYMBOL: x [0/1] {30} ¦ ¦--IN: in [0/1] {31} - ¦ ¦--expr: [0/0] {33} + ¦ ¦--expr: 1 [0/0] {33} ¦ ¦ °--NUM_CONST: 1 [0/0] {32} ¦ °--')': ) [0/0] {34} - °--expr: [0/0] {35} + °--expr: { + x [0/0] {35} ¦--'{': { [0/2] {36} - ¦--expr: [1/2] {38} + ¦--expr: x [1/2] {38} ¦ °--SYMBOL: x [0/0] {37} - ¦--expr: [1/0] {39} + ¦--expr: for ( [1/0] {39} ¦ ¦--FOR: for [0/1] {40} - ¦ ¦--forcond: [0/2] {41} + ¦ ¦--forcond: (x in [0/2] {41} ¦ ¦ ¦--'(': ( [0/0] {42} ¦ ¦ ¦--SYMBOL: x [0/1] {43} ¦ ¦ ¦--IN: in [0/1] {44} - ¦ ¦ ¦--expr: [0/1] {46} + ¦ ¦ ¦--expr: k [0/1] {46} ¦ ¦ ¦ °--SYMBOL: k [0/0] {45} ¦ ¦ °--')': ) [0/0] {47} - ¦ °--expr: [1/0] {49} + ¦ °--expr: 3 [1/0] {49} ¦ °--NUM_CONST: 3 [0/0] {48} °--'}': } [1/0] {50} diff --git a/tests/testthat/indention_operators/not_first_trigger-in_tree b/tests/testthat/indention_operators/not_first_trigger-in_tree index af98853e3..a25d4081f 100644 --- a/tests/testthat/indention_operators/not_first_trigger-in_tree +++ b/tests/testthat/indention_operators/not_first_trigger-in_tree @@ -1,65 +1,70 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} - ¦ ¦--expr: [0/0] {3} + ¦--expr: 1+ ( + [0/0] {1} + ¦ ¦--expr: 1 [0/0] {3} ¦ ¦ °--NUM_CONST: 1 [0/0] {2} ¦ ¦--'+': + [0/1] {4} - ¦ ¦--expr: [0/1] {6} + ¦ ¦--expr: ( + 3 [0/1] {6} ¦ ¦ ¦--'(': ( [0/2] {7} - ¦ ¦ ¦--expr: [1/0] {9} + ¦ ¦ ¦--expr: 3 [1/0] {9} ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {8} ¦ ¦ °--')': ) [1/0] {10} ¦ ¦--SPECIAL-PIPE: %>% [0/0] {11} - ¦ °--expr: [1/0] {12} - ¦ ¦--expr: [0/0] {14} + ¦ °--expr: j() [1/0] {12} + ¦ ¦--expr: j [0/0] {14} ¦ ¦ °--SYMBOL_FUNCTION_CALL: j [0/0] {13} ¦ ¦--'(': ( [0/0] {15} ¦ °--')': ) [0/0] {16} - ¦--expr: [2/0] {17} - ¦ ¦--expr: [0/1] {19} + ¦--expr: a <- [2/0] {17} + ¦ ¦--expr: a [0/1] {19} ¦ ¦ °--SYMBOL: a [0/0] {18} ¦ ¦--LEFT_ASSIGN: <- [0/1] {20} - ¦ ¦--expr: [0/1] {22} - ¦ ¦ ¦--expr: [0/0] {24} + ¦ ¦--expr: c(x, [0/1] {22} + ¦ ¦ ¦--expr: c [0/0] {24} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {23} ¦ ¦ ¦--'(': ( [0/0] {25} - ¦ ¦ ¦--expr: [0/0] {27} + ¦ ¦ ¦--expr: x [0/0] {27} ¦ ¦ ¦ °--SYMBOL: x [0/0] {26} ¦ ¦ ¦--',': , [0/1] {28} - ¦ ¦ ¦--expr: [0/0] {30} + ¦ ¦ ¦--expr: y [0/0] {30} ¦ ¦ ¦ °--SYMBOL: y [0/0] {29} ¦ ¦ ¦--',': , [0/7] {31} - ¦ ¦ ¦--expr: [1/0] {33} + ¦ ¦ ¦--expr: z [1/0] {33} ¦ ¦ ¦ °--SYMBOL: z [0/0] {32} ¦ ¦ °--')': ) [0/0] {34} ¦ ¦--SPECIAL-PIPE: %>% [0/0] {35} - ¦ °--expr: [1/0] {36} - ¦ ¦--expr: [0/0] {38} + ¦ °--expr: k() [1/0] {36} + ¦ ¦--expr: k [0/0] {38} ¦ ¦ °--SYMBOL_FUNCTION_CALL: k [0/0] {37} ¦ ¦--'(': ( [0/0] {39} ¦ °--')': ) [0/0] {40} - °--expr: [2/0] {41} - ¦--expr: [0/1] {44} + °--expr: a + ( [2/0] {41} + ¦--expr: a [0/1] {44} ¦ °--SYMBOL: a [0/0] {43} ¦--'+': + [0/1] {45} - ¦--expr: [0/3] {46} + ¦--expr: ( + c [0/3] {46} ¦ ¦--'(': ( [0/2] {47} - ¦ ¦--expr: [1/0] {49} + ¦ ¦--expr: c [1/0] {49} ¦ ¦ °--SYMBOL: c [0/0] {48} ¦ °--')': ) [1/0] {50} ¦--'+': + [0/1] {51} - ¦--expr: [0/0] {53} + ¦--expr: ( + c( [0/0] {53} ¦ ¦--'(': ( [0/1] {54} - ¦ ¦--expr: [1/0] {55} - ¦ ¦ ¦--expr: [0/0] {57} + ¦ ¦--expr: c( + [1/0] {55} + ¦ ¦ ¦--expr: c [0/0] {57} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {56} ¦ ¦ ¦--'(': ( [0/2] {58} - ¦ ¦ ¦--expr: [1/5] {60} + ¦ ¦ ¦--expr: 2 [1/5] {60} ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {59} ¦ ¦ °--')': ) [1/0] {61} ¦ °--')': ) [1/0] {62} ¦--SPECIAL-PIPE: %>% [0/0] {63} - °--expr: [1/0] {64} - ¦--expr: [0/0] {66} + °--expr: j() [1/0] {64} + ¦--expr: j [0/0] {66} ¦ °--SYMBOL_FUNCTION_CALL: j [0/0] {65} ¦--'(': ( [0/0] {67} °--')': ) [0/0] {68} diff --git a/tests/testthat/indention_operators/overall-in_tree b/tests/testthat/indention_operators/overall-in_tree index 0cbd13843..9f04d8e5d 100644 --- a/tests/testthat/indention_operators/overall-in_tree +++ b/tests/testthat/indention_operators/overall-in_tree @@ -1,180 +1,186 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} - ¦ ¦--expr: [0/0] {6} + ¦--expr: pd%>% [0/0] {1} + ¦ ¦--expr: pd [0/0] {6} ¦ ¦ °--SYMBOL: pd [0/0] {5} ¦ ¦--SPECIAL-PIPE: %>% [0/0] {7} - ¦ ¦--expr: [1/1] {8} - ¦ ¦ ¦--expr: [0/0] {10} + ¦ ¦--expr: mutat [1/1] {8} + ¦ ¦ ¦--expr: mutat [0/0] {10} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: mutat [0/0] {9} ¦ ¦ ¦--'(': ( [0/0] {11} ¦ ¦ ¦--SYMBOL_SUB: x [0/1] {12} ¦ ¦ ¦--EQ_SUB: = [0/0] {13} - ¦ ¦ ¦--expr: [0/0] {14} - ¦ ¦ ¦ ¦--expr: [0/0] {16} + ¦ ¦ ¦--expr: devid [0/0] {14} + ¦ ¦ ¦ ¦--expr: devid [0/0] {16} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: devid [0/0] {15} ¦ ¦ ¦ ¦--'(': ( [0/0] {17} - ¦ ¦ ¦ ¦--expr: [0/0] {18} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {20} + ¦ ¦ ¦ ¦--expr: call3 [0/0] {18} + ¦ ¦ ¦ ¦ ¦--expr: call3 [0/0] {20} ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call3 [0/0] {19} ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {21} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {23} + ¦ ¦ ¦ ¦ ¦--expr: a [0/0] {23} ¦ ¦ ¦ ¦ ¦ °--SYMBOL: a [0/0] {22} ¦ ¦ ¦ ¦ ¦--',': , [0/1] {24} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {26} + ¦ ¦ ¦ ¦ ¦--expr: b [0/0] {26} ¦ ¦ ¦ ¦ ¦ °--SYMBOL: b [0/0] {25} ¦ ¦ ¦ ¦ ¦--',': , [0/1] {27} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {28} - ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/1] {30} + ¦ ¦ ¦ ¦ ¦--expr: 1 + q [0/0] {28} + ¦ ¦ ¦ ¦ ¦ ¦--expr: 1 [0/1] {30} ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {29} ¦ ¦ ¦ ¦ ¦ ¦--'+': + [0/1] {31} - ¦ ¦ ¦ ¦ ¦ °--expr: [0/0] {33} + ¦ ¦ ¦ ¦ ¦ °--expr: q [0/0] {33} ¦ ¦ ¦ ¦ ¦ °--SYMBOL: q [0/0] {32} ¦ ¦ ¦ ¦ °--')': ) [0/0] {34} ¦ ¦ ¦ °--')': ) [0/0] {35} ¦ ¦ °--')': ) [0/0] {36} ¦ ¦--SPECIAL-PIPE: %>% [0/5] {37} - ¦ ¦--expr: [1/1] {38} - ¦ ¦ ¦--expr: [0/0] {40} + ¦ ¦--expr: filte [1/1] {38} + ¦ ¦ ¦--expr: filte [0/0] {40} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: filte [0/0] {39} ¦ ¦ ¦--'(': ( [0/1] {41} - ¦ ¦ ¦--expr: [0/0] {42} + ¦ ¦ ¦--expr: !term [0/0] {42} ¦ ¦ ¦ ¦--'!': ! [0/0] {43} - ¦ ¦ ¦ °--expr: [0/0] {45} + ¦ ¦ ¦ °--expr: termi [0/0] {45} ¦ ¦ ¦ °--SYMBOL: termi [0/0] {44} ¦ ¦ °--')': ) [0/0] {46} ¦ ¦--SPECIAL-PIPE: %>% [0/2] {47} - ¦ ¦--expr: [1/0] {48} - ¦ ¦ ¦--expr: [0/0] {50} + ¦ ¦--expr: ggplo [1/0] {48} + ¦ ¦ ¦--expr: ggplo [0/0] {50} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: ggplo [0/0] {49} ¦ ¦ ¦--'(': ( [0/0] {51} - ¦ ¦ ¦--expr: [0/0] {52} - ¦ ¦ ¦ ¦--expr: [0/0] {54} + ¦ ¦ ¦--expr: aes(x [0/0] {52} + ¦ ¦ ¦ ¦--expr: aes [0/0] {54} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: aes [0/0] {53} ¦ ¦ ¦ ¦--'(': ( [0/0] {55} ¦ ¦ ¦ ¦--SYMBOL_SUB: x [0/1] {56} ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {57} - ¦ ¦ ¦ ¦--expr: [0/0] {59} + ¦ ¦ ¦ ¦--expr: new [0/0] {59} ¦ ¦ ¦ ¦ °--SYMBOL: new [0/0] {58} ¦ ¦ ¦ ¦--',': , [0/1] {60} ¦ ¦ ¦ ¦--SYMBOL_SUB: y [0/1] {61} ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {62} - ¦ ¦ ¦ ¦--expr: [0/0] {64} + ¦ ¦ ¦ ¦--expr: old [0/0] {64} ¦ ¦ ¦ ¦ °--SYMBOL: old [0/0] {63} ¦ ¦ ¦ °--')': ) [0/0] {65} ¦ ¦ °--')': ) [0/0] {66} ¦ ¦--'+': + [0/0] {67} - ¦ °--expr: [1/0] {68} - ¦ ¦--expr: [0/0] {70} + ¦ °--expr: geom_ [1/0] {68} + ¦ ¦--expr: geom_ [0/0] {70} ¦ ¦ °--SYMBOL_FUNCTION_CALL: geom_ [0/0] {69} ¦ ¦--'(': ( [0/0] {71} ¦ °--')': ) [0/0] {72} - ¦--expr: [2/0] {73} - ¦ ¦--expr: [0/0] {75} + ¦--expr: 1+( +2 [2/0] {73} + ¦ ¦--expr: 1 [0/0] {75} ¦ ¦ °--NUM_CONST: 1 [0/0] {74} ¦ ¦--'+': + [0/0] {76} - ¦ °--expr: [0/0] {77} + ¦ °--expr: ( +22- [0/0] {77} ¦ ¦--'(': ( [0/0] {78} - ¦ ¦--expr: [1/2] {79} - ¦ ¦ ¦--expr: [0/0] {83} + ¦ ¦--expr: 22- ( [1/2] {79} + ¦ ¦ ¦--expr: 22 [0/0] {83} ¦ ¦ ¦ °--NUM_CONST: 22 [0/0] {82} ¦ ¦ ¦--'-': - [0/1] {84} - ¦ ¦ ¦--expr: [0/1] {85} + ¦ ¦ ¦--expr: (1/ + [0/1] {85} ¦ ¦ ¦ ¦--'(': ( [0/0] {86} - ¦ ¦ ¦ ¦--expr: [0/0] {87} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {93} + ¦ ¦ ¦ ¦--expr: 1/ + [0/0] {87} + ¦ ¦ ¦ ¦ ¦--expr: 1 [0/0] {93} ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {92} ¦ ¦ ¦ ¦ ¦--'/': / [0/2] {94} - ¦ ¦ ¦ ¦ ¦--expr: [1/1] {96} + ¦ ¦ ¦ ¦ ¦--expr: 2718 [1/1] {96} ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 2718 [0/0] {95} ¦ ¦ ¦ ¦ ¦--'/': / [0/4] {97} - ¦ ¦ ¦ ¦ ¦--expr: [1/0] {99} + ¦ ¦ ¦ ¦ ¦--expr: 23 [1/0] {99} ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 23 [0/0] {98} ¦ ¦ ¦ ¦ ¦--'*': * [0/1] {100} - ¦ ¦ ¦ ¦ ¦--expr: [0/1] {102} + ¦ ¦ ¦ ¦ ¦--expr: 29 [0/1] {102} ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 29 [0/0] {101} ¦ ¦ ¦ ¦ ¦--'*': * [0/1] {103} - ¦ ¦ ¦ ¦ ¦--expr: [0/5] {104} + ¦ ¦ ¦ ¦ ¦--expr: ( + [0/5] {104} ¦ ¦ ¦ ¦ ¦ ¦--'(': ( [0/12] {105} - ¦ ¦ ¦ ¦ ¦ ¦--expr: [1/0] {106} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/5] {109} + ¦ ¦ ¦ ¦ ¦ ¦--expr: 2 [1/0] {106} + ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: 2 [0/5] {109} ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {108} ¦ ¦ ¦ ¦ ¦ ¦ ¦--'*': * [0/1] {110} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/1] {111} + ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: (22*- [0/1] {111} ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {112} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/0] {113} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/0] {115} + ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: 22*-1 [0/0] {113} + ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: 22 [0/0] {115} ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 22 [0/0] {114} ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--'*': * [0/0] {116} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--expr: [0/0] {117} + ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--expr: -1 [0/0] {117} ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--'-': - [0/0] {118} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--expr: [0/0] {120} + ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--expr: 1 [0/0] {120} ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {119} ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--')': ) [0/0] {121} ¦ ¦ ¦ ¦ ¦ ¦ ¦--'+': + [0/14] {122} - ¦ ¦ ¦ ¦ ¦ ¦ °--expr: [1/0] {124} + ¦ ¦ ¦ ¦ ¦ ¦ °--expr: 1 [1/0] {124} ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {123} ¦ ¦ ¦ ¦ ¦ °--')': ) [0/0] {125} ¦ ¦ ¦ ¦ ¦--'-': - [0/10] {126} - ¦ ¦ ¦ ¦ °--expr: [1/0] {128} + ¦ ¦ ¦ ¦ °--expr: 18 [1/0] {128} ¦ ¦ ¦ ¦ °--NUM_CONST: 18 [0/0] {127} ¦ ¦ ¦ °--')': ) [0/0] {129} ¦ ¦ ¦--'+': + [0/4] {130} - ¦ ¦ ¦--expr: [1/1] {131} - ¦ ¦ ¦ ¦--expr: [0/0] {133} + ¦ ¦ ¦--expr: sin( [1/1] {131} + ¦ ¦ ¦ ¦--expr: sin [0/0] {133} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: sin [0/0] {132} ¦ ¦ ¦ ¦--'(': ( [0/4] {134} - ¦ ¦ ¦ ¦--expr: [0/0] {136} + ¦ ¦ ¦ ¦--expr: pi [0/0] {136} ¦ ¦ ¦ ¦ °--SYMBOL: pi [0/0] {135} ¦ ¦ ¦ °--')': ) [0/0] {137} ¦ ¦ ¦--'-': - [0/0] {138} - ¦ ¦ °--expr: [1/0] {140} + ¦ ¦ °--expr: 2 [1/0] {140} ¦ ¦ °--NUM_CONST: 2 [0/0] {139} ¦ °--')': ) [1/0] {141} - ¦--expr: [2/1] {142} - ¦ ¦--expr: [0/1] {144} + ¦--expr: a <- [2/1] {142} + ¦ ¦--expr: a [0/1] {144} ¦ ¦ °--SYMBOL: a [0/0] {143} ¦ ¦--LEFT_ASSIGN: <- [0/1] {145} - ¦ °--expr: [0/0] {146} + ¦ °--expr: funct [0/0] {146} ¦ ¦--FUNCTION: funct [0/0] {147} ¦ ¦--'(': ( [0/0] {148} ¦ ¦--SYMBOL_FORMALS: z [0/0] {149} ¦ ¦--')': ) [0/1] {150} - ¦ °--expr: [0/0] {151} + ¦ °--expr: { + a [0/0] {151} ¦ ¦--'{': { [0/2] {152} - ¦ ¦--expr: [1/0] {153} - ¦ ¦ ¦--expr: [0/1] {156} + ¦ ¦--expr: a %>% [1/0] {153} + ¦ ¦ ¦--expr: a [0/1] {156} ¦ ¦ ¦ °--SYMBOL: a [0/0] {155} ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/4] {157} - ¦ ¦ ¦--expr: [1/1] {158} - ¦ ¦ ¦ ¦--expr: [0/0] {160} + ¦ ¦ ¦--expr: q() [1/1] {158} + ¦ ¦ ¦ ¦--expr: q [0/0] {160} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: q [0/0] {159} ¦ ¦ ¦ ¦--'(': ( [0/0] {161} ¦ ¦ ¦ °--')': ) [0/0] {162} ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/4] {163} - ¦ ¦ °--expr: [1/0] {164} - ¦ ¦ ¦--expr: [0/0] {166} + ¦ ¦ °--expr: n() [1/0] {164} + ¦ ¦ ¦--expr: n [0/0] {166} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: n [0/0] {165} ¦ ¦ ¦--'(': ( [0/0] {167} ¦ ¦ °--')': ) [0/0] {168} ¦ °--'}': } [1/0] {169} - °--expr: [2/0] {170} - ¦--expr: [0/1] {174} + °--expr: a %>% [2/0] {170} + ¦--expr: a [0/1] {174} ¦ °--SYMBOL: a [0/0] {173} ¦--SPECIAL-PIPE: %>% [0/0] {175} - ¦--expr: [1/0] {176} - ¦ ¦--expr: [0/0] {178} + ¦--expr: b() [1/0] {176} + ¦ ¦--expr: b [0/0] {178} ¦ ¦ °--SYMBOL_FUNCTION_CALL: b [0/0] {177} ¦ ¦--'(': ( [0/0] {179} ¦ °--')': ) [0/0] {180} ¦--SPECIAL-PIPE: %>% [0/0] {181} - ¦--expr: [1/0] {182} - ¦ ¦--expr: [0/0] {184} + ¦--expr: c() [1/0] {182} + ¦ ¦--expr: c [0/0] {184} ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {183} ¦ ¦--'(': ( [0/0] {185} ¦ °--')': ) [0/0] {186} ¦--SPECIAL-PIPE: %>% [0/0] {187} - °--expr: [1/0] {188} - ¦--expr: [0/0] {190} + °--expr: k() [1/0] {188} + ¦--expr: k [0/0] {190} ¦ °--SYMBOL_FUNCTION_CALL: k [0/0] {189} ¦--'(': ( [0/0] {191} °--')': ) [0/0] {192} diff --git a/tests/testthat/indention_operators/pipe_and_assignment-in_tree b/tests/testthat/indention_operators/pipe_and_assignment-in_tree index b873fc151..f7586ded7 100644 --- a/tests/testthat/indention_operators/pipe_and_assignment-in_tree +++ b/tests/testthat/indention_operators/pipe_and_assignment-in_tree @@ -1,43 +1,43 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} - ¦ ¦--expr: [0/4] {3} + ¦--expr: a [0/0] {1} + ¦ ¦--expr: a [0/4] {3} ¦ ¦ °--SYMBOL: a [0/0] {2} ¦ ¦--LEFT_ASSIGN: <- [0/0] {4} - ¦ ¦--expr: [1/1] {7} - ¦ ¦ ¦--expr: [0/0] {9} + ¦ ¦--expr: b() [1/1] {7} + ¦ ¦ ¦--expr: b [0/0] {9} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: b [0/0] {8} ¦ ¦ ¦--'(': ( [0/0] {10} ¦ ¦ °--')': ) [0/0] {11} ¦ ¦--SPECIAL-PIPE: %>% [0/2] {12} - ¦ ¦--expr: [1/1] {13} - ¦ ¦ ¦--expr: [0/0] {15} + ¦ ¦--expr: q() [1/1] {13} + ¦ ¦ ¦--expr: q [0/0] {15} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: q [0/0] {14} ¦ ¦ ¦--'(': ( [0/0] {16} ¦ ¦ °--')': ) [0/0] {17} ¦ ¦--SPECIAL-PIPE: %>% [0/5] {18} - ¦ °--expr: [1/0] {19} - ¦ ¦--expr: [0/0] {21} + ¦ °--expr: g() [1/0] {19} + ¦ ¦--expr: g [0/0] {21} ¦ ¦ °--SYMBOL_FUNCTION_CALL: g [0/0] {20} ¦ ¦--'(': ( [0/0] {22} ¦ °--')': ) [0/0] {23} - °--expr: [2/0] {24} - ¦--expr: [0/1] {26} + °--expr: a <- [2/0] {24} + ¦--expr: a [0/1] {26} ¦ °--SYMBOL: a [0/0] {25} ¦--LEFT_ASSIGN: <- [0/4] {27} - ¦--expr: [0/1] {30} - ¦ ¦--expr: [0/0] {32} + ¦--expr: b() [0/1] {30} + ¦ ¦--expr: b [0/0] {32} ¦ ¦ °--SYMBOL_FUNCTION_CALL: b [0/0] {31} ¦ ¦--'(': ( [0/0] {33} ¦ °--')': ) [0/0] {34} ¦--SPECIAL-PIPE: %>% [0/2] {35} - ¦--expr: [1/0] {36} - ¦ ¦--expr: [0/0] {38} + ¦--expr: c() [1/0] {36} + ¦ ¦--expr: c [0/0] {38} ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {37} ¦ ¦--'(': ( [0/0] {39} ¦ °--')': ) [0/0] {40} ¦--SPECIAL-PIPE: %>% [0/0] {41} - °--expr: [1/0] {42} - ¦--expr: [0/0] {44} + °--expr: ggg() [1/0] {42} + ¦--expr: ggg [0/0] {44} ¦ °--SYMBOL_FUNCTION_CALL: ggg [0/0] {43} ¦--'(': ( [0/0] {45} °--')': ) [0/0] {46} diff --git a/tests/testthat/indention_operators/pipe_and_assignment_and_comment-in_tree b/tests/testthat/indention_operators/pipe_and_assignment_and_comment-in_tree index 382dded4e..b88ba53ae 100644 --- a/tests/testthat/indention_operators/pipe_and_assignment_and_comment-in_tree +++ b/tests/testthat/indention_operators/pipe_and_assignment_and_comment-in_tree @@ -1,112 +1,114 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} - ¦ ¦--expr: [0/1] {3} + ¦--expr: a <-# [0/0] {1} + ¦ ¦--expr: a [0/1] {3} ¦ ¦ °--SYMBOL: a [0/0] {2} ¦ ¦--LEFT_ASSIGN: <- [0/0] {4} ¦ ¦--COMMENT: # [0/2] {5} - ¦ ¦--expr: [1/1] {8} - ¦ ¦ ¦--expr: [0/0] {10} + ¦ ¦--expr: b() [1/1] {8} + ¦ ¦ ¦--expr: b [0/0] {10} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: b [0/0] {9} ¦ ¦ ¦--'(': ( [0/0] {11} ¦ ¦ °--')': ) [0/0] {12} ¦ ¦--SPECIAL-PIPE: %>% [0/2] {13} - ¦ ¦--expr: [1/1] {14} - ¦ ¦ ¦--expr: [0/0] {16} + ¦ ¦--expr: c() [1/1] {14} + ¦ ¦ ¦--expr: c [0/0] {16} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {15} ¦ ¦ ¦--'(': ( [0/0] {17} ¦ ¦ °--')': ) [0/0] {18} ¦ ¦--SPECIAL-PIPE: %>% [0/2] {19} - ¦ °--expr: [1/0] {20} - ¦ ¦--expr: [0/0] {22} + ¦ °--expr: d() [1/0] {20} + ¦ ¦--expr: d [0/0] {22} ¦ ¦ °--SYMBOL_FUNCTION_CALL: d [0/0] {21} ¦ ¦--'(': ( [0/0] {23} ¦ °--')': ) [0/0] {24} - ¦--expr: [2/0] {25} - ¦ ¦--expr: [0/1] {27} + ¦--expr: a <- [2/0] {25} + ¦ ¦--expr: a [0/1] {27} ¦ ¦ °--SYMBOL: a [0/0] {26} ¦ ¦--LEFT_ASSIGN: <- [0/1] {28} ¦ ¦--COMMENT: # [0/2] {29} - ¦ ¦--expr: [1/1] {32} - ¦ ¦ ¦--expr: [0/0] {34} + ¦ ¦--expr: b() [1/1] {32} + ¦ ¦ ¦--expr: b [0/0] {34} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: b [0/0] {33} ¦ ¦ ¦--'(': ( [0/0] {35} ¦ ¦ °--')': ) [0/0] {36} ¦ ¦--SPECIAL-PIPE: %>% [0/2] {37} - ¦ ¦--expr: [1/1] {38} - ¦ ¦ ¦--expr: [0/0] {40} + ¦ ¦--expr: c() [1/1] {38} + ¦ ¦ ¦--expr: c [0/0] {40} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {39} ¦ ¦ ¦--'(': ( [0/0] {41} ¦ ¦ °--')': ) [0/0] {42} ¦ ¦--SPECIAL-PIPE: %>% [0/2] {43} - ¦ °--expr: [1/0] {44} - ¦ ¦--expr: [0/0] {46} + ¦ °--expr: d() [1/0] {44} + ¦ ¦--expr: d [0/0] {46} ¦ ¦ °--SYMBOL_FUNCTION_CALL: d [0/0] {45} ¦ ¦--'(': ( [0/0] {47} ¦ °--')': ) [0/0] {48} - ¦--expr: [3/0] {49} - ¦ ¦--expr: [0/1] {51} + ¦--expr: a <- + [3/0] {49} + ¦ ¦--expr: a [0/1] {51} ¦ ¦ °--SYMBOL: a [0/0] {50} ¦ ¦--LEFT_ASSIGN: <- [0/2] {52} - ¦ ¦--expr: [1/1] {55} - ¦ ¦ ¦--expr: [0/0] {57} + ¦ ¦--expr: b() [1/1] {55} + ¦ ¦ ¦--expr: b [0/0] {57} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: b [0/0] {56} ¦ ¦ ¦--'(': ( [0/0] {58} ¦ ¦ °--')': ) [0/0] {59} ¦ ¦--SPECIAL-PIPE: %>% [0/2] {60} - ¦ ¦--expr: [1/1] {61} - ¦ ¦ ¦--expr: [0/0] {63} + ¦ ¦--expr: c() [1/1] {61} + ¦ ¦ ¦--expr: c [0/0] {63} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {62} ¦ ¦ ¦--'(': ( [0/0] {64} ¦ ¦ °--')': ) [0/0] {65} ¦ ¦--SPECIAL-PIPE: %>% [0/2] {66} - ¦ °--expr: [1/0] {67} - ¦ ¦--expr: [0/0] {69} + ¦ °--expr: d() [1/0] {67} + ¦ ¦--expr: d [0/0] {69} ¦ ¦ °--SYMBOL_FUNCTION_CALL: d [0/0] {68} ¦ ¦--'(': ( [0/0] {70} ¦ °--')': ) [0/0] {71} - ¦--expr: [2/0] {72} - ¦ ¦--expr: [0/1] {74} + ¦--expr: a <- [2/0] {72} + ¦ ¦--expr: a [0/1] {74} ¦ ¦ °--SYMBOL: a [0/0] {73} ¦ ¦--LEFT_ASSIGN: <- [0/1] {75} - ¦ ¦--expr: [0/1] {80} + ¦ ¦--expr: c [0/1] {80} ¦ ¦ °--SYMBOL: c [0/0] {79} ¦ ¦--SPECIAL-PIPE: %>% [0/2] {81} - ¦ ¦--expr: [1/0] {82} - ¦ ¦ ¦--expr: [0/0] {84} + ¦ ¦--expr: b() [1/0] {82} + ¦ ¦ ¦--expr: b [0/0] {84} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: b [0/0] {83} ¦ ¦ ¦--'(': ( [0/0] {85} ¦ ¦ °--')': ) [0/0] {86} ¦ ¦--SPECIAL-PIPE: %>% [0/2] {87} - ¦ ¦--expr: [1/1] {88} - ¦ ¦ ¦--expr: [0/0] {90} + ¦ ¦--expr: c( ) [1/1] {88} + ¦ ¦ ¦--expr: c [0/0] {90} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {89} ¦ ¦ ¦--'(': ( [0/1] {91} ¦ ¦ °--')': ) [0/0] {92} ¦ ¦--SPECIAL-PIPE: %>% [0/2] {93} - ¦ °--expr: [1/0] {94} - ¦ ¦--expr: [0/0] {96} + ¦ °--expr: d() [1/0] {94} + ¦ ¦--expr: d [0/0] {96} ¦ ¦ °--SYMBOL_FUNCTION_CALL: d [0/0] {95} ¦ ¦--'(': ( [0/0] {97} ¦ °--')': ) [0/0] {98} - ¦--expr: [2/0] {99} - ¦ ¦--expr: [0/1] {101} + ¦--expr: a <- + [2/0] {99} + ¦ ¦--expr: a [0/1] {101} ¦ ¦ °--SYMBOL: a [0/0] {100} ¦ ¦--LEFT_ASSIGN: <- [0/2] {102} - ¦ ¦--expr: [1/1] {105} - ¦ ¦ ¦--expr: [0/0] {107} + ¦ ¦--expr: b() [1/1] {105} + ¦ ¦ ¦--expr: b [0/0] {107} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: b [0/0] {106} ¦ ¦ ¦--'(': ( [0/0] {108} ¦ ¦ °--')': ) [0/0] {109} ¦ ¦--SPECIAL-PIPE: %>% [0/1] {110} ¦ ¦--COMMENT: # [0/2] {111} - ¦ ¦--expr: [1/1] {112} - ¦ ¦ ¦--expr: [0/0] {114} + ¦ ¦--expr: c() [1/1] {112} + ¦ ¦ ¦--expr: c [0/0] {114} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {113} ¦ ¦ ¦--'(': ( [0/0] {115} ¦ ¦ °--')': ) [0/0] {116} ¦ ¦--SPECIAL-PIPE: %>% [0/2] {117} - ¦ °--expr: [1/0] {118} - ¦ ¦--expr: [0/0] {120} + ¦ °--expr: d() [1/0] {118} + ¦ ¦--expr: d [0/0] {120} ¦ ¦ °--SYMBOL_FUNCTION_CALL: d [0/0] {119} ¦ ¦--'(': ( [0/0] {121} ¦ °--')': ) [0/0] {122} diff --git a/tests/testthat/indention_operators/pipe_and_assignment_and_math-in_tree b/tests/testthat/indention_operators/pipe_and_assignment_and_math-in_tree index c096ad5df..ecbf9d3ab 100644 --- a/tests/testthat/indention_operators/pipe_and_assignment_and_math-in_tree +++ b/tests/testthat/indention_operators/pipe_and_assignment_and_math-in_tree @@ -1,27 +1,27 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: [0/0] {1} - ¦--expr: [0/1] {3} + °--expr: q <- [0/0] {1} + ¦--expr: q [0/1] {3} ¦ °--SYMBOL: q [0/0] {2} ¦--LEFT_ASSIGN: <- [0/2] {4} - ¦--expr: [0/0] {9} + ¦--expr: a [0/0] {9} ¦ °--SYMBOL: a [0/0] {8} ¦--'+': + [0/2] {10} - ¦--expr: [1/1] {11} + ¦--expr: - 3 [1/1] {11} ¦ ¦--'-': - [0/1] {12} - ¦ °--expr: [0/0] {14} + ¦ °--expr: 3 [0/0] {14} ¦ °--NUM_CONST: 3 [0/0] {13} ¦--'+': + [0/0] {15} - ¦--expr: [1/0] {17} + ¦--expr: 2 [1/0] {17} ¦ °--NUM_CONST: 2 [0/0] {16} ¦--'+': + [0/0] {18} - ¦--expr: [1/0] {20} - ¦ ¦--expr: [0/0] {22} + ¦--expr: g() [1/0] {20} + ¦ ¦--expr: g [0/0] {22} ¦ ¦ °--SYMBOL_FUNCTION_CALL: g [0/0] {21} ¦ ¦--'(': ( [0/0] {23} ¦ °--')': ) [0/0] {24} ¦--SPECIAL-PIPE: %>% [0/3] {25} - °--expr: [1/0] {26} - ¦--expr: [0/0] {28} + °--expr: k() [1/0] {26} + ¦--expr: k [0/0] {28} ¦ °--SYMBOL_FUNCTION_CALL: k [0/0] {27} ¦--'(': ( [0/0] {29} °--')': ) [0/0] {30} diff --git a/tests/testthat/indention_operators/pipe_simple-in_tree b/tests/testthat/indention_operators/pipe_simple-in_tree index 91e09c012..a9e31900d 100644 --- a/tests/testthat/indention_operators/pipe_simple-in_tree +++ b/tests/testthat/indention_operators/pipe_simple-in_tree @@ -1,56 +1,56 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} - ¦ ¦--expr: [0/1] {6} + ¦--expr: a %>% [0/0] {1} + ¦ ¦--expr: a [0/1] {6} ¦ ¦ °--SYMBOL: a [0/0] {5} ¦ ¦--SPECIAL-PIPE: %>% [0/0] {7} - ¦ ¦--expr: [1/1] {8} - ¦ ¦ ¦--expr: [0/0] {10} + ¦ ¦--expr: b() [1/1] {8} + ¦ ¦ ¦--expr: b [0/0] {10} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: b [0/0] {9} ¦ ¦ ¦--'(': ( [0/0] {11} ¦ ¦ °--')': ) [0/0] {12} ¦ ¦--SPECIAL-PIPE: %>% [0/0] {13} - ¦ ¦--expr: [1/1] {14} - ¦ ¦ ¦--expr: [0/0] {16} + ¦ ¦--expr: c() [1/1] {14} + ¦ ¦ ¦--expr: c [0/0] {16} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {15} ¦ ¦ ¦--'(': ( [0/0] {17} ¦ ¦ °--')': ) [0/0] {18} ¦ ¦--SPECIAL-PIPE: %>% [0/10] {19} - ¦ ¦--expr: [1/1] {20} - ¦ ¦ ¦--expr: [0/0] {22} + ¦ ¦--expr: d(1 + [1/1] {20} + ¦ ¦ ¦--expr: d [0/0] {22} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: d [0/0] {21} ¦ ¦ ¦--'(': ( [0/0] {23} - ¦ ¦ ¦--expr: [0/0] {24} - ¦ ¦ ¦ ¦--expr: [0/1] {26} + ¦ ¦ ¦--expr: 1 + e [0/0] {24} + ¦ ¦ ¦ ¦--expr: 1 [0/1] {26} ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {25} ¦ ¦ ¦ ¦--'+': + [0/1] {27} - ¦ ¦ ¦ °--expr: [0/0] {28} - ¦ ¦ ¦ ¦--expr: [0/1] {30} + ¦ ¦ ¦ °--expr: e (si [0/0] {28} + ¦ ¦ ¦ ¦--expr: e [0/1] {30} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: e [0/0] {29} ¦ ¦ ¦ ¦--'(': ( [0/0] {31} - ¦ ¦ ¦ ¦--expr: [0/0] {32} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {34} + ¦ ¦ ¦ ¦--expr: sin(f [0/0] {32} + ¦ ¦ ¦ ¦ ¦--expr: sin [0/0] {34} ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: sin [0/0] {33} ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {35} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {37} + ¦ ¦ ¦ ¦ ¦--expr: f [0/0] {37} ¦ ¦ ¦ ¦ ¦ °--SYMBOL: f [0/0] {36} ¦ ¦ ¦ ¦ °--')': ) [0/0] {38} ¦ ¦ ¦ °--')': ) [0/0] {39} ¦ ¦ °--')': ) [0/0] {40} ¦ ¦--SPECIAL-PIPE: %>% [0/33] {41} - ¦ °--expr: [1/0] {42} - ¦ ¦--expr: [0/0] {44} + ¦ °--expr: g_out [1/0] {42} + ¦ ¦--expr: g_out [0/0] {44} ¦ ¦ °--SYMBOL_FUNCTION_CALL: g_out [0/0] {43} ¦ ¦--'(': ( [0/0] {45} ¦ °--')': ) [0/0] {46} - °--expr: [2/0] {47} - ¦--expr: [0/1] {49} + °--expr: a <- [2/0] {47} + ¦--expr: a [0/1] {49} ¦ °--SYMBOL: a [0/0] {48} ¦--LEFT_ASSIGN: <- [0/1] {50} - °--expr: [0/0] {51} + °--expr: funct [0/0] {51} ¦--FUNCTION: funct [0/0] {52} ¦--'(': ( [0/0] {53} ¦--SYMBOL_FORMALS: jon_t [0/0] {54} ¦--')': ) [0/1] {55} - °--expr: [0/0] {56} + °--expr: {} [0/0] {56} ¦--'{': { [0/0] {57} °--'}': } [0/0] {58} diff --git a/tests/testthat/indention_operators/pipe_with_dot-in_tree b/tests/testthat/indention_operators/pipe_with_dot-in_tree index 21719b4bd..61a900661 100644 --- a/tests/testthat/indention_operators/pipe_with_dot-in_tree +++ b/tests/testthat/indention_operators/pipe_with_dot-in_tree @@ -1,23 +1,23 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: [0/0] {1} - ¦--expr: [0/1] {2} - ¦ ¦--expr: [0/0] {4} + °--expr: strsp [0/0] {1} + ¦--expr: strsp [0/1] {2} + ¦ ¦--expr: strsp [0/0] {4} ¦ ¦ °--SYMBOL_FUNCTION_CALL: strsp [0/0] {3} ¦ ¦--'(': ( [0/0] {5} - ¦ ¦--expr: [0/0] {7} + ¦ ¦--expr: "\n" [0/0] {7} ¦ ¦ °--STR_CONST: "\n" [0/0] {6} ¦ ¦--',': , [0/1] {8} ¦ ¦--SYMBOL_SUB: fixed [0/1] {9} ¦ ¦--EQ_SUB: = [0/1] {10} - ¦ ¦--expr: [0/0] {12} + ¦ ¦--expr: TRUE [0/0] {12} ¦ ¦ °--NUM_CONST: TRUE [0/0] {11} ¦ °--')': ) [0/0] {13} ¦--SPECIAL-PIPE: %>% [0/2] {14} - °--expr: [1/0] {15} - ¦--expr: [0/0] {17} + °--expr: .[[1L [1/0] {15} + ¦--expr: . [0/0] {17} ¦ °--SYMBOL: . [0/0] {16} ¦--LBB: [[ [0/0] {18} - ¦--expr: [0/0] {20} + ¦--expr: 1L [0/0] {20} ¦ °--NUM_CONST: 1L [0/0] {19} ¦--']': ] [0/0] {21} °--']': ] [0/0] {22} diff --git a/tests/testthat/indention_operators/plus_minus-in_tree b/tests/testthat/indention_operators/plus_minus-in_tree index b1ba42e09..d805fc5a7 100644 --- a/tests/testthat/indention_operators/plus_minus-in_tree +++ b/tests/testthat/indention_operators/plus_minus-in_tree @@ -1,22 +1,23 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} - ¦ ¦--expr: [0/1] {6} + ¦--expr: 1 + + [0/0] {1} + ¦ ¦--expr: 1 [0/1] {6} ¦ ¦ °--NUM_CONST: 1 [0/0] {5} ¦ ¦--'+': + [0/7] {7} - ¦ ¦--expr: [1/1] {9} + ¦ ¦--expr: 2 [1/1] {9} ¦ ¦ °--NUM_CONST: 2 [0/0] {8} ¦ ¦--'+': + [0/0] {10} - ¦ ¦--expr: [1/1] {12} + ¦ ¦--expr: 3 [1/1] {12} ¦ ¦ °--NUM_CONST: 3 [0/0] {11} ¦ ¦--'+': + [0/7] {13} - ¦ ¦--expr: [1/1] {15} + ¦ ¦--expr: 4 [1/1] {15} ¦ ¦ °--NUM_CONST: 4 [0/0] {14} ¦ ¦--'-': - [0/2] {16} - ¦ °--expr: [1/0] {18} + ¦ °--expr: 5 [1/0] {18} ¦ °--NUM_CONST: 5 [0/0] {17} - °--expr: [2/0] {19} - ¦--expr: [0/1] {21} + °--expr: 1 + 1 [2/0] {19} + ¦--expr: 1 [0/1] {21} ¦ °--NUM_CONST: 1 [0/0] {20} ¦--'+': + [0/1] {22} - °--expr: [0/0] {24} + °--expr: 1 [0/0] {24} °--NUM_CONST: 1 [0/0] {23} diff --git a/tests/testthat/indention_operators/while_for_if_without_curly_non_strict-in_tree b/tests/testthat/indention_operators/while_for_if_without_curly_non_strict-in_tree index 3f691a08e..375209df0 100644 --- a/tests/testthat/indention_operators/while_for_if_without_curly_non_strict-in_tree +++ b/tests/testthat/indention_operators/while_for_if_without_curly_non_strict-in_tree @@ -1,251 +1,253 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} + ¦--expr: while [0/0] {1} ¦ ¦--WHILE: while [0/1] {2} ¦ ¦--'(': ( [0/0] {3} - ¦ ¦--expr: [0/0] {4} - ¦ ¦ ¦--expr: [0/1] {6} + ¦ ¦--expr: x > 3 [0/0] {4} + ¦ ¦ ¦--expr: x [0/1] {6} ¦ ¦ ¦ °--SYMBOL: x [0/0] {5} ¦ ¦ ¦--GT: > [0/1] {7} - ¦ ¦ °--expr: [0/0] {9} + ¦ ¦ °--expr: 3 [0/0] {9} ¦ ¦ °--NUM_CONST: 3 [0/0] {8} ¦ ¦--')': ) [0/2] {10} - ¦ °--expr: [1/0] {11} - ¦ ¦--expr: [0/0] {13} + ¦ °--expr: retur [1/0] {11} + ¦ ¦--expr: retur [0/0] {13} ¦ ¦ °--SYMBOL_FUNCTION_CALL: retur [0/0] {12} ¦ ¦--'(': ( [0/0] {14} - ¦ ¦--expr: [0/0] {16} + ¦ ¦--expr: FALSE [0/0] {16} ¦ ¦ °--NUM_CONST: FALSE [0/0] {15} ¦ °--')': ) [0/0] {17} - ¦--expr: [2/0] {18} + ¦--expr: for ( [2/0] {18} ¦ ¦--FOR: for [0/1] {19} - ¦ ¦--forcond: [0/2] {20} + ¦ ¦--forcond: (i in [0/2] {20} ¦ ¦ ¦--'(': ( [0/0] {21} ¦ ¦ ¦--SYMBOL: i [0/1] {22} ¦ ¦ ¦--IN: in [0/1] {23} - ¦ ¦ ¦--expr: [0/0] {24} - ¦ ¦ ¦ ¦--expr: [0/0] {26} + ¦ ¦ ¦--expr: 1:3 [0/0] {24} + ¦ ¦ ¦ ¦--expr: 1 [0/0] {26} ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {25} ¦ ¦ ¦ ¦--':': : [0/0] {27} - ¦ ¦ ¦ °--expr: [0/0] {29} + ¦ ¦ ¦ °--expr: 3 [0/0] {29} ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {28} ¦ ¦ °--')': ) [0/0] {30} - ¦ °--expr: [1/0] {31} - ¦ ¦--expr: [0/0] {33} + ¦ °--expr: print [1/0] {31} + ¦ ¦--expr: print [0/0] {33} ¦ ¦ °--SYMBOL_FUNCTION_CALL: print [0/0] {32} ¦ ¦--'(': ( [0/0] {34} - ¦ ¦--expr: [0/0] {36} + ¦ ¦--expr: i [0/0] {36} ¦ ¦ °--SYMBOL: i [0/0] {35} ¦ °--')': ) [0/0] {37} - ¦--expr: [2/0] {38} + ¦--expr: if (x [2/0] {38} ¦ ¦--IF: if [0/1] {39} ¦ ¦--'(': ( [0/0] {40} - ¦ ¦--expr: [0/0] {42} + ¦ ¦--expr: x [0/0] {42} ¦ ¦ °--SYMBOL: x [0/0] {41} ¦ ¦--')': ) [0/2] {43} - ¦ °--expr: [1/0] {44} - ¦ ¦--expr: [0/0] {46} + ¦ °--expr: call2 [1/0] {44} + ¦ ¦--expr: call2 [0/0] {46} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call2 [0/0] {45} ¦ ¦--'(': ( [0/0] {47} - ¦ ¦--expr: [0/0] {49} + ¦ ¦--expr: 3 [0/0] {49} ¦ ¦ °--NUM_CONST: 3 [0/0] {48} ¦ °--')': ) [0/0] {50} - ¦--expr: [2/0] {51} + ¦--expr: for ( [2/0] {51} ¦ ¦--FOR: for [0/1] {52} - ¦ ¦--forcond: [0/1] {53} + ¦ ¦--forcond: (i in [0/1] {53} ¦ ¦ ¦--'(': ( [0/0] {54} ¦ ¦ ¦--SYMBOL: i [0/1] {55} ¦ ¦ ¦--IN: in [0/1] {56} - ¦ ¦ ¦--expr: [0/0] {57} - ¦ ¦ ¦ ¦--expr: [0/0] {59} + ¦ ¦ ¦--expr: 1:3 [0/0] {57} + ¦ ¦ ¦ ¦--expr: 1 [0/0] {59} ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {58} ¦ ¦ ¦ ¦--':': : [0/0] {60} - ¦ ¦ ¦ °--expr: [0/0] {62} + ¦ ¦ ¦ °--expr: 3 [0/0] {62} ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {61} ¦ ¦ °--')': ) [0/0] {63} ¦ ¦--COMMENT: # [0/2] {64} - ¦ °--expr: [1/0] {65} - ¦ ¦--expr: [0/0] {67} + ¦ °--expr: print [1/0] {65} + ¦ ¦--expr: print [0/0] {67} ¦ ¦ °--SYMBOL_FUNCTION_CALL: print [0/0] {66} ¦ ¦--'(': ( [0/0] {68} - ¦ ¦--expr: [0/0] {70} + ¦ ¦--expr: i [0/0] {70} ¦ ¦ °--SYMBOL: i [0/0] {69} ¦ °--')': ) [0/0] {71} - ¦--expr: [2/0] {72} + ¦--expr: for ( [2/0] {72} ¦ ¦--FOR: for [0/1] {73} - ¦ ¦--forcond: [0/1] {74} + ¦ ¦--forcond: (i in [0/1] {74} ¦ ¦ ¦--'(': ( [0/0] {75} ¦ ¦ ¦--SYMBOL: i [0/1] {76} ¦ ¦ ¦--IN: in [0/5] {77} - ¦ ¦ ¦--expr: [1/0] {78} - ¦ ¦ ¦ ¦--expr: [0/0] {80} + ¦ ¦ ¦--expr: 1:3 [1/0] {78} + ¦ ¦ ¦ ¦--expr: 1 [0/0] {80} ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {79} ¦ ¦ ¦ ¦--':': : [0/0] {81} - ¦ ¦ ¦ °--expr: [0/0] {83} + ¦ ¦ ¦ °--expr: 3 [0/0] {83} ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {82} ¦ ¦ °--')': ) [0/0] {84} ¦ ¦--COMMENT: # [0/2] {85} - ¦ °--expr: [1/0] {86} - ¦ ¦--expr: [0/0] {88} + ¦ °--expr: print [1/0] {86} + ¦ ¦--expr: print [0/0] {88} ¦ ¦ °--SYMBOL_FUNCTION_CALL: print [0/0] {87} ¦ ¦--'(': ( [0/0] {89} - ¦ ¦--expr: [0/0] {91} + ¦ ¦--expr: i [0/0] {91} ¦ ¦ °--SYMBOL: i [0/0] {90} ¦ °--')': ) [0/0] {92} - ¦--expr: [2/0] {93} + ¦--expr: for ( [2/0] {93} ¦ ¦--FOR: for [0/1] {94} - ¦ ¦--forcond: [0/1] {95} + ¦ ¦--forcond: (i in [0/1] {95} ¦ ¦ ¦--'(': ( [0/0] {96} ¦ ¦ ¦--SYMBOL: i [0/1] {97} ¦ ¦ ¦--IN: in [0/1] {98} ¦ ¦ ¦--COMMENT: # [0/5] {99} - ¦ ¦ ¦--expr: [1/0] {100} - ¦ ¦ ¦ ¦--expr: [0/0] {102} + ¦ ¦ ¦--expr: 1:3 [1/0] {100} + ¦ ¦ ¦ ¦--expr: 1 [0/0] {102} ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {101} ¦ ¦ ¦ ¦--':': : [0/0] {103} - ¦ ¦ ¦ °--expr: [0/0] {105} + ¦ ¦ ¦ °--expr: 3 [0/0] {105} ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {104} ¦ ¦ °--')': ) [0/0] {106} ¦ ¦--COMMENT: # [0/2] {107} - ¦ °--expr: [1/0] {108} - ¦ ¦--expr: [0/0] {110} + ¦ °--expr: print [1/0] {108} + ¦ ¦--expr: print [0/0] {110} ¦ ¦ °--SYMBOL_FUNCTION_CALL: print [0/0] {109} ¦ ¦--'(': ( [0/0] {111} - ¦ ¦--expr: [0/0] {113} + ¦ ¦--expr: i [0/0] {113} ¦ ¦ °--SYMBOL: i [0/0] {112} ¦ °--')': ) [0/0] {114} - ¦--expr: [2/0] {115} + ¦--expr: for ( [2/0] {115} ¦ ¦--FOR: for [0/1] {116} - ¦ ¦--forcond: [0/1] {117} + ¦ ¦--forcond: (# + [0/1] {117} ¦ ¦ ¦--'(': ( [0/0] {118} ¦ ¦ ¦--COMMENT: # [0/2] {119} ¦ ¦ ¦--SYMBOL: i [1/1] {120} ¦ ¦ ¦--IN: in [0/1] {121} ¦ ¦ ¦--COMMENT: # [0/2] {122} - ¦ ¦ ¦--expr: [1/0] {123} - ¦ ¦ ¦ ¦--expr: [0/0] {125} + ¦ ¦ ¦--expr: 1:3 [1/0] {123} + ¦ ¦ ¦ ¦--expr: 1 [0/0] {125} ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {124} ¦ ¦ ¦ ¦--':': : [0/0] {126} - ¦ ¦ ¦ °--expr: [0/0] {128} + ¦ ¦ ¦ °--expr: 3 [0/0] {128} ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {127} ¦ ¦ ¦--COMMENT: # [0/0] {129} ¦ ¦ °--')': ) [1/0] {130} ¦ ¦--COMMENT: # [0/2] {131} - ¦ °--expr: [1/0] {132} - ¦ ¦--expr: [0/0] {134} + ¦ °--expr: print [1/0] {132} + ¦ ¦--expr: print [0/0] {134} ¦ ¦ °--SYMBOL_FUNCTION_CALL: print [0/0] {133} ¦ ¦--'(': ( [0/0] {135} - ¦ ¦--expr: [0/0] {137} + ¦ ¦--expr: i [0/0] {137} ¦ ¦ °--SYMBOL: i [0/0] {136} ¦ °--')': ) [0/0] {138} - ¦--expr: [3/0] {139} + ¦--expr: while [3/0] {139} ¦ ¦--WHILE: while [0/1] {140} ¦ ¦--'(': ( [0/0] {141} - ¦ ¦--expr: [0/0] {142} - ¦ ¦ ¦--expr: [0/1] {144} + ¦ ¦--expr: x > 3 [0/0] {142} + ¦ ¦ ¦--expr: x [0/1] {144} ¦ ¦ ¦ °--SYMBOL: x [0/0] {143} ¦ ¦ ¦--GT: > [0/1] {145} - ¦ ¦ °--expr: [0/0] {147} + ¦ ¦ °--expr: 3 [0/0] {147} ¦ ¦ °--NUM_CONST: 3 [0/0] {146} ¦ ¦--')': ) [0/1] {148} ¦ ¦--COMMENT: # [0/2] {149} - ¦ °--expr: [1/0] {150} - ¦ ¦--expr: [0/0] {152} + ¦ °--expr: retur [1/0] {150} + ¦ ¦--expr: retur [0/0] {152} ¦ ¦ °--SYMBOL_FUNCTION_CALL: retur [0/0] {151} ¦ ¦--'(': ( [0/0] {153} - ¦ ¦--expr: [0/0] {155} + ¦ ¦--expr: FALSE [0/0] {155} ¦ ¦ °--NUM_CONST: FALSE [0/0] {154} ¦ °--')': ) [0/0] {156} - ¦--expr: [2/0] {157} + ¦--expr: while [2/0] {157} ¦ ¦--WHILE: while [0/1] {158} ¦ ¦--'(': ( [0/0] {159} - ¦ ¦--expr: [0/1] {160} - ¦ ¦ ¦--expr: [0/1] {162} + ¦ ¦--expr: x > 3 [0/1] {160} + ¦ ¦ ¦--expr: x [0/1] {162} ¦ ¦ ¦ °--SYMBOL: x [0/0] {161} ¦ ¦ ¦--GT: > [0/1] {163} - ¦ ¦ °--expr: [0/0] {165} + ¦ ¦ °--expr: 3 [0/0] {165} ¦ ¦ °--NUM_CONST: 3 [0/0] {164} ¦ ¦--COMMENT: # [0/0] {166} ¦ ¦--')': ) [1/2] {167} - ¦ °--expr: [1/0] {168} - ¦ ¦--expr: [0/0] {170} + ¦ °--expr: retur [1/0] {168} + ¦ ¦--expr: retur [0/0] {170} ¦ ¦ °--SYMBOL_FUNCTION_CALL: retur [0/0] {169} ¦ ¦--'(': ( [0/0] {171} - ¦ ¦--expr: [0/0] {173} + ¦ ¦--expr: FALSE [0/0] {173} ¦ ¦ °--NUM_CONST: FALSE [0/0] {172} ¦ °--')': ) [0/0] {174} - ¦--expr: [2/0] {175} + ¦--expr: while [2/0] {175} ¦ ¦--WHILE: while [0/1] {176} ¦ ¦--'(': ( [0/1] {177} ¦ ¦--COMMENT: # tes [0/2] {178} - ¦ ¦--expr: [1/0] {179} - ¦ ¦ ¦--expr: [0/1] {181} + ¦ ¦--expr: x > 3 [1/0] {179} + ¦ ¦ ¦--expr: x [0/1] {181} ¦ ¦ ¦ °--SYMBOL: x [0/0] {180} ¦ ¦ ¦--GT: > [0/1] {182} - ¦ ¦ °--expr: [0/0] {184} + ¦ ¦ °--expr: 3 [0/0] {184} ¦ ¦ °--NUM_CONST: 3 [0/0] {183} ¦ ¦--')': ) [0/1] {185} ¦ ¦--COMMENT: # ano [0/2] {186} - ¦ °--expr: [1/0] {187} - ¦ ¦--expr: [0/0] {189} + ¦ °--expr: retur [1/0] {187} + ¦ ¦--expr: retur [0/0] {189} ¦ ¦ °--SYMBOL_FUNCTION_CALL: retur [0/0] {188} ¦ ¦--'(': ( [0/0] {190} - ¦ ¦--expr: [0/0] {192} + ¦ ¦--expr: FALSE [0/0] {192} ¦ ¦ °--NUM_CONST: FALSE [0/0] {191} ¦ °--')': ) [0/0] {193} - ¦--expr: [2/0] {194} + ¦--expr: while [2/0] {194} ¦ ¦--WHILE: while [0/1] {195} ¦ ¦--'(': ( [0/2] {196} - ¦ ¦--expr: [1/1] {197} - ¦ ¦ ¦--expr: [0/1] {199} + ¦ ¦--expr: 2 > # [1/1] {197} + ¦ ¦ ¦--expr: 2 [0/1] {199} ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {198} ¦ ¦ ¦--GT: > [0/1] {200} ¦ ¦ ¦--COMMENT: #here [0/2] {201} - ¦ ¦ °--expr: [1/0] {203} + ¦ ¦ °--expr: 3 [1/0] {203} ¦ ¦ °--NUM_CONST: 3 [0/0] {202} ¦ ¦--COMMENT: # [0/0] {204} ¦ ¦--')': ) [1/1] {205} ¦ ¦--COMMENT: # [0/2] {206} - ¦ °--expr: [1/0] {208} + ¦ °--expr: FALSE [1/0] {208} ¦ °--NUM_CONST: FALSE [0/0] {207} - ¦--expr: [2/0] {209} + ¦--expr: while [2/0] {209} ¦ ¦--WHILE: while [0/1] {210} ¦ ¦--'(': ( [0/2] {211} - ¦ ¦--expr: [1/1] {212} - ¦ ¦ ¦--expr: [0/1] {214} + ¦ ¦--expr: 2 > # [1/1] {212} + ¦ ¦ ¦--expr: 2 [0/1] {214} ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {213} ¦ ¦ ¦--GT: > [0/1] {215} ¦ ¦ ¦--COMMENT: #here [0/2] {216} - ¦ ¦ °--expr: [1/0] {218} + ¦ ¦ °--expr: 3 [1/0] {218} ¦ ¦ °--NUM_CONST: 3 [0/0] {217} ¦ ¦--COMMENT: # [0/0] {219} ¦ ¦--')': ) [1/2] {220} - ¦ °--expr: [1/0] {222} + ¦ °--expr: FALSE [1/0] {222} ¦ °--NUM_CONST: FALSE [0/0] {221} - ¦--expr: [2/0] {223} + ¦--expr: while [2/0] {223} ¦ ¦--WHILE: while [0/1] {224} ¦ ¦--'(': ( [0/2] {225} - ¦ ¦--expr: [1/0] {226} - ¦ ¦ ¦--expr: [0/1] {228} + ¦ ¦--expr: 2 > # [1/0] {226} + ¦ ¦ ¦--expr: 2 [0/1] {228} ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {227} ¦ ¦ ¦--GT: > [0/1] {229} ¦ ¦ ¦--COMMENT: #here [0/2] {230} - ¦ ¦ °--expr: [1/0] {232} + ¦ ¦ °--expr: 3 [1/0] {232} ¦ ¦ °--NUM_CONST: 3 [0/0] {231} ¦ ¦--')': ) [1/1] {233} ¦ ¦--COMMENT: # [0/2] {234} - ¦ °--expr: [1/0] {236} + ¦ °--expr: FALSE [1/0] {236} ¦ °--NUM_CONST: FALSE [0/0] {235} - °--expr: [2/0] {237} + °--expr: while [2/0] {237} ¦--WHILE: while [0/1] {238} ¦--'(': ( [0/0] {239} ¦--COMMENT: # [0/2] {240} - ¦--expr: [1/0] {241} - ¦ ¦--expr: [0/1] {243} + ¦--expr: 2 > + [1/0] {241} + ¦ ¦--expr: 2 [0/1] {243} ¦ ¦ °--NUM_CONST: 2 [0/0] {242} ¦ ¦--GT: > [0/2] {244} - ¦ °--expr: [1/0] {246} + ¦ °--expr: 3 [1/0] {246} ¦ °--NUM_CONST: 3 [0/0] {245} ¦--')': ) [1/1] {247} ¦--COMMENT: # [0/2] {248} - °--expr: [1/0] {250} + °--expr: FALSE [1/0] {250} °--NUM_CONST: FALSE [0/0] {249} diff --git a/tests/testthat/indention_operators/while_for_if_without_curly_strict-in_tree b/tests/testthat/indention_operators/while_for_if_without_curly_strict-in_tree index 6cb3cfc8d..3375e43cc 100644 --- a/tests/testthat/indention_operators/while_for_if_without_curly_strict-in_tree +++ b/tests/testthat/indention_operators/while_for_if_without_curly_strict-in_tree @@ -1,251 +1,253 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} + ¦--expr: while [0/0] {1} ¦ ¦--WHILE: while [0/1] {2} ¦ ¦--'(': ( [0/0] {3} - ¦ ¦--expr: [0/0] {4} - ¦ ¦ ¦--expr: [0/1] {6} + ¦ ¦--expr: x > 3 [0/0] {4} + ¦ ¦ ¦--expr: x [0/1] {6} ¦ ¦ ¦ °--SYMBOL: x [0/0] {5} ¦ ¦ ¦--GT: > [0/1] {7} - ¦ ¦ °--expr: [0/0] {9} + ¦ ¦ °--expr: 3 [0/0] {9} ¦ ¦ °--NUM_CONST: 3 [0/0] {8} ¦ ¦--')': ) [0/0] {10} - ¦ °--expr: [1/0] {11} - ¦ ¦--expr: [0/0] {13} + ¦ °--expr: retur [1/0] {11} + ¦ ¦--expr: retur [0/0] {13} ¦ ¦ °--SYMBOL_FUNCTION_CALL: retur [0/0] {12} ¦ ¦--'(': ( [0/0] {14} - ¦ ¦--expr: [0/0] {16} + ¦ ¦--expr: FALSE [0/0] {16} ¦ ¦ °--NUM_CONST: FALSE [0/0] {15} ¦ °--')': ) [0/0] {17} - ¦--expr: [2/0] {18} + ¦--expr: for ( [2/0] {18} ¦ ¦--FOR: for [0/1] {19} - ¦ ¦--forcond: [0/0] {20} + ¦ ¦--forcond: (i in [0/0] {20} ¦ ¦ ¦--'(': ( [0/0] {21} ¦ ¦ ¦--SYMBOL: i [0/1] {22} ¦ ¦ ¦--IN: in [0/1] {23} - ¦ ¦ ¦--expr: [0/0] {24} - ¦ ¦ ¦ ¦--expr: [0/0] {26} + ¦ ¦ ¦--expr: 1:3 [0/0] {24} + ¦ ¦ ¦ ¦--expr: 1 [0/0] {26} ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {25} ¦ ¦ ¦ ¦--':': : [0/0] {27} - ¦ ¦ ¦ °--expr: [0/0] {29} + ¦ ¦ ¦ °--expr: 3 [0/0] {29} ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {28} ¦ ¦ °--')': ) [0/0] {30} - ¦ °--expr: [1/0] {31} - ¦ ¦--expr: [0/0] {33} + ¦ °--expr: print [1/0] {31} + ¦ ¦--expr: print [0/0] {33} ¦ ¦ °--SYMBOL_FUNCTION_CALL: print [0/0] {32} ¦ ¦--'(': ( [0/0] {34} - ¦ ¦--expr: [0/0] {36} + ¦ ¦--expr: i [0/0] {36} ¦ ¦ °--SYMBOL: i [0/0] {35} ¦ °--')': ) [0/0] {37} - ¦--expr: [2/0] {38} + ¦--expr: if (x [2/0] {38} ¦ ¦--IF: if [0/1] {39} ¦ ¦--'(': ( [0/0] {40} - ¦ ¦--expr: [0/0] {42} + ¦ ¦--expr: x [0/0] {42} ¦ ¦ °--SYMBOL: x [0/0] {41} ¦ ¦--')': ) [0/0] {43} - ¦ °--expr: [1/0] {44} - ¦ ¦--expr: [0/0] {46} + ¦ °--expr: call2 [1/0] {44} + ¦ ¦--expr: call2 [0/0] {46} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call2 [0/0] {45} ¦ ¦--'(': ( [0/0] {47} - ¦ ¦--expr: [0/0] {49} + ¦ ¦--expr: 3 [0/0] {49} ¦ ¦ °--NUM_CONST: 3 [0/0] {48} ¦ °--')': ) [0/0] {50} - ¦--expr: [2/0] {51} + ¦--expr: for ( [2/0] {51} ¦ ¦--FOR: for [0/1] {52} - ¦ ¦--forcond: [0/1] {53} + ¦ ¦--forcond: (i in [0/1] {53} ¦ ¦ ¦--'(': ( [0/0] {54} ¦ ¦ ¦--SYMBOL: i [0/1] {55} ¦ ¦ ¦--IN: in [0/1] {56} - ¦ ¦ ¦--expr: [0/0] {57} - ¦ ¦ ¦ ¦--expr: [0/0] {59} + ¦ ¦ ¦--expr: 1:3 [0/0] {57} + ¦ ¦ ¦ ¦--expr: 1 [0/0] {59} ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {58} ¦ ¦ ¦ ¦--':': : [0/0] {60} - ¦ ¦ ¦ °--expr: [0/0] {62} + ¦ ¦ ¦ °--expr: 3 [0/0] {62} ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {61} ¦ ¦ °--')': ) [0/0] {63} ¦ ¦--COMMENT: # [0/2] {64} - ¦ °--expr: [1/0] {65} - ¦ ¦--expr: [0/0] {67} + ¦ °--expr: print [1/0] {65} + ¦ ¦--expr: print [0/0] {67} ¦ ¦ °--SYMBOL_FUNCTION_CALL: print [0/0] {66} ¦ ¦--'(': ( [0/0] {68} - ¦ ¦--expr: [0/0] {70} + ¦ ¦--expr: i [0/0] {70} ¦ ¦ °--SYMBOL: i [0/0] {69} ¦ °--')': ) [0/0] {71} - ¦--expr: [2/0] {72} + ¦--expr: for ( [2/0] {72} ¦ ¦--FOR: for [0/1] {73} - ¦ ¦--forcond: [0/1] {74} + ¦ ¦--forcond: (i in [0/1] {74} ¦ ¦ ¦--'(': ( [0/0] {75} ¦ ¦ ¦--SYMBOL: i [0/1] {76} ¦ ¦ ¦--IN: in [0/5] {77} - ¦ ¦ ¦--expr: [1/0] {78} - ¦ ¦ ¦ ¦--expr: [0/0] {80} + ¦ ¦ ¦--expr: 1:3 [1/0] {78} + ¦ ¦ ¦ ¦--expr: 1 [0/0] {80} ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {79} ¦ ¦ ¦ ¦--':': : [0/0] {81} - ¦ ¦ ¦ °--expr: [0/0] {83} + ¦ ¦ ¦ °--expr: 3 [0/0] {83} ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {82} ¦ ¦ °--')': ) [0/0] {84} ¦ ¦--COMMENT: # [0/2] {85} - ¦ °--expr: [1/0] {86} - ¦ ¦--expr: [0/0] {88} + ¦ °--expr: print [1/0] {86} + ¦ ¦--expr: print [0/0] {88} ¦ ¦ °--SYMBOL_FUNCTION_CALL: print [0/0] {87} ¦ ¦--'(': ( [0/0] {89} - ¦ ¦--expr: [0/0] {91} + ¦ ¦--expr: i [0/0] {91} ¦ ¦ °--SYMBOL: i [0/0] {90} ¦ °--')': ) [0/0] {92} - ¦--expr: [2/0] {93} + ¦--expr: for ( [2/0] {93} ¦ ¦--FOR: for [0/1] {94} - ¦ ¦--forcond: [0/1] {95} + ¦ ¦--forcond: (i in [0/1] {95} ¦ ¦ ¦--'(': ( [0/0] {96} ¦ ¦ ¦--SYMBOL: i [0/1] {97} ¦ ¦ ¦--IN: in [0/1] {98} ¦ ¦ ¦--COMMENT: # [0/5] {99} - ¦ ¦ ¦--expr: [1/0] {100} - ¦ ¦ ¦ ¦--expr: [0/0] {102} + ¦ ¦ ¦--expr: 1:3 [1/0] {100} + ¦ ¦ ¦ ¦--expr: 1 [0/0] {102} ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {101} ¦ ¦ ¦ ¦--':': : [0/0] {103} - ¦ ¦ ¦ °--expr: [0/0] {105} + ¦ ¦ ¦ °--expr: 3 [0/0] {105} ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {104} ¦ ¦ °--')': ) [0/0] {106} ¦ ¦--COMMENT: # [0/2] {107} - ¦ °--expr: [1/0] {108} - ¦ ¦--expr: [0/0] {110} + ¦ °--expr: print [1/0] {108} + ¦ ¦--expr: print [0/0] {110} ¦ ¦ °--SYMBOL_FUNCTION_CALL: print [0/0] {109} ¦ ¦--'(': ( [0/0] {111} - ¦ ¦--expr: [0/0] {113} + ¦ ¦--expr: i [0/0] {113} ¦ ¦ °--SYMBOL: i [0/0] {112} ¦ °--')': ) [0/0] {114} - ¦--expr: [2/0] {115} + ¦--expr: for ( [2/0] {115} ¦ ¦--FOR: for [0/1] {116} - ¦ ¦--forcond: [0/1] {117} + ¦ ¦--forcond: (# + [0/1] {117} ¦ ¦ ¦--'(': ( [0/0] {118} ¦ ¦ ¦--COMMENT: # [0/2] {119} ¦ ¦ ¦--SYMBOL: i [1/1] {120} ¦ ¦ ¦--IN: in [0/1] {121} ¦ ¦ ¦--COMMENT: # [0/5] {122} - ¦ ¦ ¦--expr: [1/0] {123} - ¦ ¦ ¦ ¦--expr: [0/0] {125} + ¦ ¦ ¦--expr: 1:3 [1/0] {123} + ¦ ¦ ¦ ¦--expr: 1 [0/0] {125} ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {124} ¦ ¦ ¦ ¦--':': : [0/0] {126} - ¦ ¦ ¦ °--expr: [0/0] {128} + ¦ ¦ ¦ °--expr: 3 [0/0] {128} ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {127} ¦ ¦ ¦--COMMENT: # [0/2] {129} ¦ ¦ °--')': ) [1/0] {130} ¦ ¦--COMMENT: # [0/2] {131} - ¦ °--expr: [1/0] {132} - ¦ ¦--expr: [0/0] {134} + ¦ °--expr: print [1/0] {132} + ¦ ¦--expr: print [0/0] {134} ¦ ¦ °--SYMBOL_FUNCTION_CALL: print [0/0] {133} ¦ ¦--'(': ( [0/0] {135} - ¦ ¦--expr: [0/0] {137} + ¦ ¦--expr: i [0/0] {137} ¦ ¦ °--SYMBOL: i [0/0] {136} ¦ °--')': ) [0/0] {138} - ¦--expr: [3/0] {139} + ¦--expr: while [3/0] {139} ¦ ¦--WHILE: while [0/1] {140} ¦ ¦--'(': ( [0/0] {141} - ¦ ¦--expr: [0/0] {142} - ¦ ¦ ¦--expr: [0/1] {144} + ¦ ¦--expr: x > 3 [0/0] {142} + ¦ ¦ ¦--expr: x [0/1] {144} ¦ ¦ ¦ °--SYMBOL: x [0/0] {143} ¦ ¦ ¦--GT: > [0/1] {145} - ¦ ¦ °--expr: [0/0] {147} + ¦ ¦ °--expr: 3 [0/0] {147} ¦ ¦ °--NUM_CONST: 3 [0/0] {146} ¦ ¦--')': ) [0/1] {148} ¦ ¦--COMMENT: # [0/2] {149} - ¦ °--expr: [1/0] {150} - ¦ ¦--expr: [0/0] {152} + ¦ °--expr: retur [1/0] {150} + ¦ ¦--expr: retur [0/0] {152} ¦ ¦ °--SYMBOL_FUNCTION_CALL: retur [0/0] {151} ¦ ¦--'(': ( [0/0] {153} - ¦ ¦--expr: [0/0] {155} + ¦ ¦--expr: FALSE [0/0] {155} ¦ ¦ °--NUM_CONST: FALSE [0/0] {154} ¦ °--')': ) [0/0] {156} - ¦--expr: [2/0] {157} + ¦--expr: while [2/0] {157} ¦ ¦--WHILE: while [0/1] {158} ¦ ¦--'(': ( [0/0] {159} - ¦ ¦--expr: [0/1] {160} - ¦ ¦ ¦--expr: [0/1] {162} + ¦ ¦--expr: x > 3 [0/1] {160} + ¦ ¦ ¦--expr: x [0/1] {162} ¦ ¦ ¦ °--SYMBOL: x [0/0] {161} ¦ ¦ ¦--GT: > [0/1] {163} - ¦ ¦ °--expr: [0/0] {165} + ¦ ¦ °--expr: 3 [0/0] {165} ¦ ¦ °--NUM_CONST: 3 [0/0] {164} ¦ ¦--COMMENT: # [0/7] {166} ¦ ¦--')': ) [1/2] {167} - ¦ °--expr: [1/0] {168} - ¦ ¦--expr: [0/0] {170} + ¦ °--expr: retur [1/0] {168} + ¦ ¦--expr: retur [0/0] {170} ¦ ¦ °--SYMBOL_FUNCTION_CALL: retur [0/0] {169} ¦ ¦--'(': ( [0/0] {171} - ¦ ¦--expr: [0/0] {173} + ¦ ¦--expr: FALSE [0/0] {173} ¦ ¦ °--NUM_CONST: FALSE [0/0] {172} ¦ °--')': ) [0/0] {174} - ¦--expr: [2/0] {175} + ¦--expr: while [2/0] {175} ¦ ¦--WHILE: while [0/1] {176} ¦ ¦--'(': ( [0/1] {177} ¦ ¦--COMMENT: # tes [0/2] {178} - ¦ ¦--expr: [1/0] {179} - ¦ ¦ ¦--expr: [0/1] {181} + ¦ ¦--expr: x > 3 [1/0] {179} + ¦ ¦ ¦--expr: x [0/1] {181} ¦ ¦ ¦ °--SYMBOL: x [0/0] {180} ¦ ¦ ¦--GT: > [0/1] {182} - ¦ ¦ °--expr: [0/0] {184} + ¦ ¦ °--expr: 3 [0/0] {184} ¦ ¦ °--NUM_CONST: 3 [0/0] {183} ¦ ¦--')': ) [0/1] {185} ¦ ¦--COMMENT: # ano [0/2] {186} - ¦ °--expr: [1/0] {187} - ¦ ¦--expr: [0/0] {189} + ¦ °--expr: retur [1/0] {187} + ¦ ¦--expr: retur [0/0] {189} ¦ ¦ °--SYMBOL_FUNCTION_CALL: retur [0/0] {188} ¦ ¦--'(': ( [0/0] {190} - ¦ ¦--expr: [0/0] {192} + ¦ ¦--expr: FALSE [0/0] {192} ¦ ¦ °--NUM_CONST: FALSE [0/0] {191} ¦ °--')': ) [0/0] {193} - ¦--expr: [2/0] {194} + ¦--expr: while [2/0] {194} ¦ ¦--WHILE: while [0/1] {195} ¦ ¦--'(': ( [0/2] {196} - ¦ ¦--expr: [1/1] {197} - ¦ ¦ ¦--expr: [0/1] {199} + ¦ ¦--expr: 2 > # [1/1] {197} + ¦ ¦ ¦--expr: 2 [0/1] {199} ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {198} ¦ ¦ ¦--GT: > [0/1] {200} ¦ ¦ ¦--COMMENT: #here [0/2] {201} - ¦ ¦ °--expr: [1/0] {203} + ¦ ¦ °--expr: 3 [1/0] {203} ¦ ¦ °--NUM_CONST: 3 [0/0] {202} ¦ ¦--COMMENT: # [0/2] {204} ¦ ¦--')': ) [1/1] {205} ¦ ¦--COMMENT: # [0/2] {206} - ¦ °--expr: [1/0] {208} + ¦ °--expr: FALSE [1/0] {208} ¦ °--NUM_CONST: FALSE [0/0] {207} - ¦--expr: [2/0] {209} + ¦--expr: while [2/0] {209} ¦ ¦--WHILE: while [0/1] {210} ¦ ¦--'(': ( [0/2] {211} - ¦ ¦--expr: [1/1] {212} - ¦ ¦ ¦--expr: [0/1] {214} + ¦ ¦--expr: 2 > # [1/1] {212} + ¦ ¦ ¦--expr: 2 [0/1] {214} ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {213} ¦ ¦ ¦--GT: > [0/1] {215} ¦ ¦ ¦--COMMENT: #here [0/2] {216} - ¦ ¦ °--expr: [1/0] {218} + ¦ ¦ °--expr: 3 [1/0] {218} ¦ ¦ °--NUM_CONST: 3 [0/0] {217} ¦ ¦--COMMENT: # [0/0] {219} ¦ ¦--')': ) [1/2] {220} - ¦ °--expr: [1/0] {222} + ¦ °--expr: FALSE [1/0] {222} ¦ °--NUM_CONST: FALSE [0/0] {221} - ¦--expr: [2/0] {223} + ¦--expr: while [2/0] {223} ¦ ¦--WHILE: while [0/1] {224} ¦ ¦--'(': ( [0/2] {225} - ¦ ¦--expr: [1/0] {226} - ¦ ¦ ¦--expr: [0/1] {228} + ¦ ¦--expr: 2 > # [1/0] {226} + ¦ ¦ ¦--expr: 2 [0/1] {228} ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {227} ¦ ¦ ¦--GT: > [0/1] {229} ¦ ¦ ¦--COMMENT: #here [0/2] {230} - ¦ ¦ °--expr: [1/0] {232} + ¦ ¦ °--expr: 3 [1/0] {232} ¦ ¦ °--NUM_CONST: 3 [0/0] {231} ¦ ¦--')': ) [1/1] {233} ¦ ¦--COMMENT: # [0/2] {234} - ¦ °--expr: [1/0] {236} + ¦ °--expr: FALSE [1/0] {236} ¦ °--NUM_CONST: FALSE [0/0] {235} - °--expr: [2/0] {237} + °--expr: while [2/0] {237} ¦--WHILE: while [0/1] {238} ¦--'(': ( [0/0] {239} ¦--COMMENT: # [0/2] {240} - ¦--expr: [1/0] {241} - ¦ ¦--expr: [0/1] {243} + ¦--expr: 2 > + [1/0] {241} + ¦ ¦--expr: 2 [0/1] {243} ¦ ¦ °--NUM_CONST: 2 [0/0] {242} ¦ ¦--GT: > [0/2] {244} - ¦ °--expr: [1/0] {246} + ¦ °--expr: 3 [1/0] {246} ¦ °--NUM_CONST: 3 [0/0] {245} ¦--')': ) [1/1] {247} ¦--COMMENT: # [0/2] {248} - °--expr: [1/0] {250} + °--expr: FALSE [1/0] {250} °--NUM_CONST: FALSE [0/0] {249} diff --git a/tests/testthat/indention_operators/while_for_without_curly_same_line_non_strict-in_tree b/tests/testthat/indention_operators/while_for_without_curly_same_line_non_strict-in_tree index 6311c2398..95ae7014b 100644 --- a/tests/testthat/indention_operators/while_for_without_curly_same_line_non_strict-in_tree +++ b/tests/testthat/indention_operators/while_for_without_curly_same_line_non_strict-in_tree @@ -1,157 +1,163 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} + ¦--expr: while [0/0] {1} ¦ ¦--WHILE: while [0/0] {2} ¦ ¦--'(': ( [0/0] {3} - ¦ ¦--expr: [0/0] {4} - ¦ ¦ ¦--expr: [0/1] {6} + ¦ ¦--expr: x == [0/0] {4} + ¦ ¦ ¦--expr: x [0/1] {6} ¦ ¦ ¦ °--SYMBOL: x [0/0] {5} ¦ ¦ ¦--EQ: == [0/1] {7} - ¦ ¦ °--expr: [0/0] {9} + ¦ ¦ °--expr: 2 [0/0] {9} ¦ ¦ °--NUM_CONST: 2 [0/0] {8} ¦ ¦--')': ) [0/1] {10} - ¦ °--expr: [0/0] {11} - ¦ ¦--expr: [0/0] {13} + ¦ °--expr: h( + [0/0] {11} + ¦ ¦--expr: h [0/0] {13} ¦ ¦ °--SYMBOL_FUNCTION_CALL: h [0/0] {12} ¦ ¦--'(': ( [0/2] {14} - ¦ ¦--expr: [1/0] {16} + ¦ ¦--expr: 2 [1/0] {16} ¦ ¦ °--NUM_CONST: 2 [0/0] {15} ¦ °--')': ) [1/0] {17} - ¦--expr: [2/0] {18} + ¦--expr: while [2/0] {18} ¦ ¦--WHILE: while [0/0] {19} ¦ ¦--'(': ( [0/0] {20} - ¦ ¦--expr: [0/0] {21} - ¦ ¦ ¦--expr: [0/1] {23} + ¦ ¦--expr: x == [0/0] {21} + ¦ ¦ ¦--expr: x [0/1] {23} ¦ ¦ ¦ °--SYMBOL: x [0/0] {22} ¦ ¦ ¦--EQ: == [0/1] {24} - ¦ ¦ °--expr: [0/0] {26} + ¦ ¦ °--expr: 2 [0/0] {26} ¦ ¦ °--NUM_CONST: 2 [0/0] {25} ¦ ¦--')': ) [0/1] {27} - ¦ °--expr: [0/0] {28} - ¦ ¦--expr: [0/0] {30} + ¦ °--expr: h( # [0/0] {28} + ¦ ¦--expr: h [0/0] {30} ¦ ¦ °--SYMBOL_FUNCTION_CALL: h [0/0] {29} ¦ ¦--'(': ( [0/1] {31} ¦ ¦--COMMENT: # com [0/2] {32} - ¦ ¦--expr: [1/0] {34} + ¦ ¦--expr: 2 [1/0] {34} ¦ ¦ °--NUM_CONST: 2 [0/0] {33} ¦ °--')': ) [1/0] {35} - ¦--expr: [2/0] {36} + ¦--expr: while [2/0] {36} ¦ ¦--WHILE: while [0/0] {37} ¦ ¦--'(': ( [0/0] {38} - ¦ ¦--expr: [0/0] {39} - ¦ ¦ ¦--expr: [0/1] {40} - ¦ ¦ ¦ ¦--expr: [0/1] {42} + ¦ ¦--expr: x == [0/0] {39} + ¦ ¦ ¦--expr: x == [0/1] {40} + ¦ ¦ ¦ ¦--expr: x [0/1] {42} ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {41} ¦ ¦ ¦ ¦--EQ: == [0/1] {43} - ¦ ¦ ¦ °--expr: [0/0] {45} + ¦ ¦ ¦ °--expr: 2 [0/0] {45} ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {44} ¦ ¦ ¦--AND2: && [0/6] {46} - ¦ ¦ °--expr: [1/0] {47} - ¦ ¦ ¦--expr: [0/1] {48} - ¦ ¦ ¦ ¦--expr: [0/1] {50} + ¦ ¦ °--expr: 2 + 2 [1/0] {47} + ¦ ¦ ¦--expr: 2 + 2 [0/1] {48} + ¦ ¦ ¦ ¦--expr: 2 [0/1] {50} ¦ ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {49} ¦ ¦ ¦ ¦--'+': + [0/1] {51} - ¦ ¦ ¦ °--expr: [0/0] {53} + ¦ ¦ ¦ °--expr: 2 [0/0] {53} ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {52} ¦ ¦ ¦--EQ: == [0/1] {54} - ¦ ¦ °--expr: [0/0] {56} + ¦ ¦ °--expr: 2 [0/0] {56} ¦ ¦ °--NUM_CONST: 2 [0/0] {55} ¦ ¦--')': ) [0/1] {57} - ¦ °--expr: [0/0] {58} - ¦ ¦--expr: [0/0] {60} + ¦ °--expr: h( + [0/0] {58} + ¦ ¦--expr: h [0/0] {60} ¦ ¦ °--SYMBOL_FUNCTION_CALL: h [0/0] {59} ¦ ¦--'(': ( [0/2] {61} - ¦ ¦--expr: [1/0] {63} + ¦ ¦--expr: 2 [1/0] {63} ¦ ¦ °--NUM_CONST: 2 [0/0] {62} ¦ °--')': ) [1/0] {64} - ¦--expr: [3/0] {65} + ¦--expr: for(x [3/0] {65} ¦ ¦--FOR: for [0/0] {66} - ¦ ¦--forcond: [0/1] {67} + ¦ ¦--forcond: (x in [0/1] {67} ¦ ¦ ¦--'(': ( [0/0] {68} ¦ ¦ ¦--SYMBOL: x [0/1] {69} ¦ ¦ ¦--IN: in [0/1] {70} - ¦ ¦ ¦--expr: [0/0] {71} - ¦ ¦ ¦ ¦--expr: [0/0] {73} + ¦ ¦ ¦--expr: 1:22 [0/0] {71} + ¦ ¦ ¦ ¦--expr: 1 [0/0] {73} ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {72} ¦ ¦ ¦ ¦--':': : [0/0] {74} - ¦ ¦ ¦ °--expr: [0/0] {76} + ¦ ¦ ¦ °--expr: 22 [0/0] {76} ¦ ¦ ¦ °--NUM_CONST: 22 [0/0] {75} ¦ ¦ °--')': ) [0/0] {77} - ¦ °--expr: [0/0] {78} - ¦ ¦--expr: [0/0] {80} + ¦ °--expr: h( + [0/0] {78} + ¦ ¦--expr: h [0/0] {80} ¦ ¦ °--SYMBOL_FUNCTION_CALL: h [0/0] {79} ¦ ¦--'(': ( [0/2] {81} - ¦ ¦--expr: [1/0] {83} + ¦ ¦--expr: 2 [1/0] {83} ¦ ¦ °--NUM_CONST: 2 [0/0] {82} ¦ °--')': ) [1/0] {84} - ¦--expr: [2/0] {85} + ¦--expr: for(x [2/0] {85} ¦ ¦--FOR: for [0/0] {86} - ¦ ¦--forcond: [0/1] {87} + ¦ ¦--forcond: (x in [0/1] {87} ¦ ¦ ¦--'(': ( [0/0] {88} ¦ ¦ ¦--SYMBOL: x [0/1] {89} ¦ ¦ ¦--IN: in [0/1] {90} - ¦ ¦ ¦--expr: [0/0] {91} - ¦ ¦ ¦ ¦--expr: [0/0] {93} + ¦ ¦ ¦--expr: 1:22 [0/0] {91} + ¦ ¦ ¦ ¦--expr: 1 [0/0] {93} ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {92} ¦ ¦ ¦ ¦--':': : [0/0] {94} - ¦ ¦ ¦ °--expr: [0/0] {96} + ¦ ¦ ¦ °--expr: 22 [0/0] {96} ¦ ¦ ¦ °--NUM_CONST: 22 [0/0] {95} ¦ ¦ °--')': ) [0/0] {97} - ¦ °--expr: [0/0] {98} - ¦ ¦--expr: [0/0] {100} + ¦ °--expr: h( # [0/0] {98} + ¦ ¦--expr: h [0/0] {100} ¦ ¦ °--SYMBOL_FUNCTION_CALL: h [0/0] {99} ¦ ¦--'(': ( [0/1] {101} ¦ ¦--COMMENT: # com [0/2] {102} - ¦ ¦--expr: [1/0] {104} + ¦ ¦--expr: 2 [1/0] {104} ¦ ¦ °--NUM_CONST: 2 [0/0] {103} ¦ °--')': ) [1/0] {105} - ¦--expr: [2/0] {106} + ¦--expr: for(k [2/0] {106} ¦ ¦--FOR: for [0/0] {107} - ¦ ¦--forcond: [0/1] {108} + ¦ ¦--forcond: (k in [0/1] {108} ¦ ¦ ¦--'(': ( [0/0] {109} ¦ ¦ ¦--SYMBOL: k [0/1] {110} ¦ ¦ ¦--IN: in [0/1] {111} - ¦ ¦ ¦--expr: [0/0] {112} - ¦ ¦ ¦ ¦--expr: [0/0] {114} + ¦ ¦ ¦--expr: f( + [0/0] {112} + ¦ ¦ ¦ ¦--expr: f [0/0] {114} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: f [0/0] {113} ¦ ¦ ¦ ¦--'(': ( [0/2] {115} - ¦ ¦ ¦ ¦--expr: [1/0] {116} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {118} + ¦ ¦ ¦ ¦--expr: 2:22 [1/0] {116} + ¦ ¦ ¦ ¦ ¦--expr: 2 [0/0] {118} ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {117} ¦ ¦ ¦ ¦ ¦--':': : [0/0] {119} - ¦ ¦ ¦ ¦ °--expr: [0/0] {121} + ¦ ¦ ¦ ¦ °--expr: 22 [0/0] {121} ¦ ¦ ¦ ¦ °--NUM_CONST: 22 [0/0] {120} ¦ ¦ ¦ °--')': ) [1/0] {122} ¦ ¦ °--')': ) [0/0] {123} - ¦ °--expr: [0/0] {124} - ¦ ¦--expr: [0/0] {126} + ¦ °--expr: h( + [0/0] {124} + ¦ ¦--expr: h [0/0] {126} ¦ ¦ °--SYMBOL_FUNCTION_CALL: h [0/0] {125} ¦ ¦--'(': ( [0/8] {127} - ¦ ¦--expr: [1/6] {129} + ¦ ¦--expr: 2 [1/6] {129} ¦ ¦ °--NUM_CONST: 2 [0/0] {128} ¦ °--')': ) [1/0] {130} - °--expr: [2/0] {131} + °--expr: for(k [2/0] {131} ¦--FOR: for [0/0] {132} - ¦--forcond: [0/1] {133} + ¦--forcond: (k in [0/1] {133} ¦ ¦--'(': ( [0/0] {134} ¦ ¦--SYMBOL: k [0/1] {135} ¦ ¦--IN: in [0/1] {136} - ¦ ¦--expr: [0/0] {137} - ¦ ¦ ¦--expr: [0/0] {139} + ¦ ¦--expr: f( + [0/0] {137} + ¦ ¦ ¦--expr: f [0/0] {139} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: f [0/0] {138} ¦ ¦ ¦--'(': ( [0/2] {140} - ¦ ¦ ¦--expr: [1/1] {141} - ¦ ¦ ¦ ¦--expr: [0/0] {143} + ¦ ¦ ¦--expr: 2:22 [1/1] {141} + ¦ ¦ ¦ ¦--expr: 2 [0/0] {143} ¦ ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {142} ¦ ¦ ¦ ¦--':': : [0/0] {144} - ¦ ¦ ¦ °--expr: [0/0] {146} + ¦ ¦ ¦ °--expr: 22 [0/0] {146} ¦ ¦ ¦ °--NUM_CONST: 22 [0/0] {145} ¦ ¦ ¦--COMMENT: # com [0/0] {147} ¦ ¦ °--')': ) [1/0] {148} ¦ °--')': ) [0/0] {149} - °--expr: [0/0] {150} - ¦--expr: [0/0] {152} + °--expr: h(2) [0/0] {150} + ¦--expr: h [0/0] {152} ¦ °--SYMBOL_FUNCTION_CALL: h [0/0] {151} ¦--'(': ( [0/0] {153} - ¦--expr: [0/0] {155} + ¦--expr: 2 [0/0] {155} ¦ °--NUM_CONST: 2 [0/0] {154} °--')': ) [0/0] {156} diff --git a/tests/testthat/indention_round_brackets/arithmetic_no_start-in_tree b/tests/testthat/indention_round_brackets/arithmetic_no_start-in_tree index 28c23a4b2..4f3aa7dc8 100644 --- a/tests/testthat/indention_round_brackets/arithmetic_no_start-in_tree +++ b/tests/testthat/indention_round_brackets/arithmetic_no_start-in_tree @@ -1,17 +1,19 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: [0/0] {1} - ¦--expr: [0/1] {4} + °--expr: 1 + + [0/0] {1} + ¦--expr: 1 [0/1] {4} ¦ °--NUM_CONST: 1 [0/0] {3} ¦--'+': + [0/13] {5} - ¦--expr: [1/1] {7} + ¦--expr: 2 [1/1] {7} ¦ °--NUM_CONST: 2 [0/0] {6} ¦--'+': + [0/1] {8} - °--expr: [0/0] {9} + °--expr: ( +3 + [0/0] {9} ¦--'(': ( [0/0] {10} - ¦--expr: [1/0] {11} - ¦ ¦--expr: [0/1] {13} + ¦--expr: 3 + 4 [1/0] {11} + ¦ ¦--expr: 3 [0/1] {13} ¦ ¦ °--NUM_CONST: 3 [0/0] {12} ¦ ¦--'+': + [0/1] {14} - ¦ °--expr: [0/0] {16} + ¦ °--expr: 4 [0/0] {16} ¦ °--NUM_CONST: 4 [0/0] {15} °--')': ) [0/0] {17} diff --git a/tests/testthat/indention_round_brackets/arithmetic_start-in_tree b/tests/testthat/indention_round_brackets/arithmetic_start-in_tree index cd0af42a3..b4c868352 100644 --- a/tests/testthat/indention_round_brackets/arithmetic_start-in_tree +++ b/tests/testthat/indention_round_brackets/arithmetic_start-in_tree @@ -1,20 +1,23 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: [0/0] {1} + °--expr: (1 + + [0/0] {1} ¦--'(': ( [0/0] {2} - ¦--expr: [0/0] {3} - ¦ ¦--expr: [0/1] {6} + ¦--expr: 1 + +2 [0/0] {3} + ¦ ¦--expr: 1 [0/1] {6} ¦ ¦ °--NUM_CONST: 1 [0/0] {5} ¦ ¦--'+': + [0/0] {7} - ¦ ¦--expr: [1/1] {9} + ¦ ¦--expr: 2 [1/1] {9} ¦ ¦ °--NUM_CONST: 2 [0/0] {8} ¦ ¦--'+': + [0/1] {10} - ¦ °--expr: [0/0] {11} + ¦ °--expr: ( +3 + [0/0] {11} ¦ ¦--'(': ( [0/0] {12} - ¦ ¦--expr: [1/2] {13} - ¦ ¦ ¦--expr: [0/1] {15} + ¦ ¦--expr: 3 + 4 [1/2] {13} + ¦ ¦ ¦--expr: 3 [0/1] {15} ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {14} ¦ ¦ ¦--'+': + [0/1] {16} - ¦ ¦ °--expr: [0/0] {18} + ¦ ¦ °--expr: 4 [0/0] {18} ¦ ¦ °--NUM_CONST: 4 [0/0] {17} ¦ °--')': ) [1/0] {19} °--')': ) [1/0] {20} diff --git a/tests/testthat/indention_round_brackets/multi_line-no-indention-in_tree b/tests/testthat/indention_round_brackets/multi_line-no-indention-in_tree index 4d1a98f90..cdf8dcd24 100644 --- a/tests/testthat/indention_round_brackets/multi_line-no-indention-in_tree +++ b/tests/testthat/indention_round_brackets/multi_line-no-indention-in_tree @@ -1,39 +1,39 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: [0/0] {1} - ¦--expr: [0/0] {3} + °--expr: call( [0/0] {1} + ¦--expr: call [0/0] {3} ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {2} ¦--'(': ( [0/0] {4} - ¦--expr: [1/0] {6} + ¦--expr: 1 [1/0] {6} ¦ °--NUM_CONST: 1 [0/0] {5} ¦--',': , [0/0] {7} - ¦--expr: [1/0] {8} - ¦ ¦--expr: [0/0] {10} + ¦--expr: call2 [1/0] {8} + ¦ ¦--expr: call2 [0/0] {10} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call2 [0/0] {9} ¦ ¦--'(': ( [0/0] {11} - ¦ ¦--expr: [1/0] {13} + ¦ ¦--expr: 2 [1/0] {13} ¦ ¦ °--NUM_CONST: 2 [0/0] {12} ¦ ¦--',': , [0/1] {14} - ¦ ¦--expr: [0/0] {16} + ¦ ¦--expr: 3 [0/0] {16} ¦ ¦ °--NUM_CONST: 3 [0/0] {15} ¦ ¦--',': , [0/0] {17} - ¦ ¦--expr: [1/0] {18} - ¦ ¦ ¦--expr: [0/0] {20} + ¦ ¦--expr: call3 [1/0] {18} + ¦ ¦ ¦--expr: call3 [0/0] {20} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call3 [0/0] {19} ¦ ¦ ¦--'(': ( [0/0] {21} - ¦ ¦ ¦--expr: [0/0] {23} + ¦ ¦ ¦--expr: 1 [0/0] {23} ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {22} ¦ ¦ ¦--',': , [0/1] {24} - ¦ ¦ ¦--expr: [0/0] {26} + ¦ ¦ ¦--expr: 2 [0/0] {26} ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {25} ¦ ¦ ¦--',': , [0/1] {27} - ¦ ¦ ¦--expr: [0/0] {29} + ¦ ¦ ¦--expr: 22 [0/0] {29} ¦ ¦ ¦ °--NUM_CONST: 22 [0/0] {28} ¦ ¦ °--')': ) [0/0] {30} ¦ ¦--',': , [0/0] {31} - ¦ ¦--expr: [1/0] {33} + ¦ ¦--expr: 5 [1/0] {33} ¦ ¦ °--NUM_CONST: 5 [0/0] {32} ¦ °--')': ) [1/0] {34} ¦--',': , [0/0] {35} - ¦--expr: [1/0] {37} + ¦--expr: 144 [1/0] {37} ¦ °--NUM_CONST: 144 [0/0] {36} °--')': ) [1/0] {38} diff --git a/tests/testthat/indention_round_brackets/multi_line-random-in_tree b/tests/testthat/indention_round_brackets/multi_line-random-in_tree index b87ae9a02..def8bc3ab 100644 --- a/tests/testthat/indention_round_brackets/multi_line-random-in_tree +++ b/tests/testthat/indention_round_brackets/multi_line-random-in_tree @@ -1,39 +1,39 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: [0/0] {1} - ¦--expr: [0/0] {3} + °--expr: call( [0/0] {1} + ¦--expr: call [0/0] {3} ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {2} ¦--'(': ( [0/0] {4} - ¦--expr: [1/0] {6} + ¦--expr: 1 [1/0] {6} ¦ °--NUM_CONST: 1 [0/0] {5} ¦--',': , [0/2] {7} - ¦--expr: [1/0] {8} - ¦ ¦--expr: [0/0] {10} + ¦--expr: call2 [1/0] {8} + ¦ ¦--expr: call2 [0/0] {10} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call2 [0/0] {9} ¦ ¦--'(': ( [0/4] {11} - ¦ ¦--expr: [1/0] {13} + ¦ ¦--expr: 2 [1/0] {13} ¦ ¦ °--NUM_CONST: 2 [0/0] {12} ¦ ¦--',': , [0/1] {14} - ¦ ¦--expr: [0/0] {16} + ¦ ¦--expr: 3 [0/0] {16} ¦ ¦ °--NUM_CONST: 3 [0/0] {15} ¦ ¦--',': , [0/0] {17} - ¦ ¦--expr: [1/0] {18} - ¦ ¦ ¦--expr: [0/0] {20} + ¦ ¦--expr: call3 [1/0] {18} + ¦ ¦ ¦--expr: call3 [0/0] {20} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call3 [0/0] {19} ¦ ¦ ¦--'(': ( [0/0] {21} - ¦ ¦ ¦--expr: [0/0] {23} + ¦ ¦ ¦--expr: 1 [0/0] {23} ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {22} ¦ ¦ ¦--',': , [0/1] {24} - ¦ ¦ ¦--expr: [0/0] {26} + ¦ ¦ ¦--expr: 2 [0/0] {26} ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {25} ¦ ¦ ¦--',': , [0/1] {27} - ¦ ¦ ¦--expr: [0/0] {29} + ¦ ¦ ¦--expr: 22 [0/0] {29} ¦ ¦ ¦ °--NUM_CONST: 22 [0/0] {28} ¦ ¦ °--')': ) [0/0] {30} ¦ ¦--',': , [0/13] {31} - ¦ ¦--expr: [1/2] {33} + ¦ ¦--expr: 5 [1/2] {33} ¦ ¦ °--NUM_CONST: 5 [0/0] {32} ¦ °--')': ) [1/0] {34} ¦--',': , [0/2] {35} - ¦--expr: [1/12] {37} + ¦--expr: 144 [1/12] {37} ¦ °--NUM_CONST: 144 [0/0] {36} °--')': ) [1/0] {38} diff --git a/tests/testthat/indention_round_brackets/one_line-in_tree b/tests/testthat/indention_round_brackets/one_line-in_tree index dff115ebd..89d3695f6 100644 --- a/tests/testthat/indention_round_brackets/one_line-in_tree +++ b/tests/testthat/indention_round_brackets/one_line-in_tree @@ -1,31 +1,31 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: [0/0] {1} - ¦--expr: [0/1] {3} + °--expr: a <- [0/0] {1} + ¦--expr: a [0/1] {3} ¦ °--SYMBOL: a [0/0] {2} ¦--LEFT_ASSIGN: <- [0/1] {4} - °--expr: [0/0] {5} - ¦--expr: [0/0] {7} + °--expr: xyz(x [0/0] {5} + ¦--expr: xyz [0/0] {7} ¦ °--SYMBOL_FUNCTION_CALL: xyz [0/0] {6} ¦--'(': ( [0/0] {8} - ¦--expr: [0/0] {10} + ¦--expr: x [0/0] {10} ¦ °--SYMBOL: x [0/0] {9} ¦--',': , [0/1] {11} - ¦--expr: [0/0] {13} + ¦--expr: 22 [0/0] {13} ¦ °--NUM_CONST: 22 [0/0] {12} ¦--',': , [0/1] {14} - ¦--expr: [0/0] {15} + ¦--expr: if(x [0/0] {15} ¦ ¦--IF: if [0/0] {16} ¦ ¦--'(': ( [0/0] {17} - ¦ ¦--expr: [0/0] {18} - ¦ ¦ ¦--expr: [0/1] {20} + ¦ ¦--expr: x > 1 [0/0] {18} + ¦ ¦ ¦--expr: x [0/1] {20} ¦ ¦ ¦ °--SYMBOL: x [0/0] {19} ¦ ¦ ¦--GT: > [0/1] {21} - ¦ ¦ °--expr: [0/0] {23} + ¦ ¦ °--expr: 1 [0/0] {23} ¦ ¦ °--NUM_CONST: 1 [0/0] {22} ¦ ¦--')': ) [0/1] {24} - ¦ ¦--expr: [0/1] {26} + ¦ ¦--expr: 33 [0/1] {26} ¦ ¦ °--NUM_CONST: 33 [0/0] {25} ¦ ¦--ELSE: else [0/1] {27} - ¦ °--expr: [0/0] {29} + ¦ °--expr: 4 [0/0] {29} ¦ °--NUM_CONST: 4 [0/0] {28} °--')': ) [0/0] {30} diff --git a/tests/testthat/indention_round_brackets/one_line-nested-in_tree b/tests/testthat/indention_round_brackets/one_line-nested-in_tree index dff115ebd..89d3695f6 100644 --- a/tests/testthat/indention_round_brackets/one_line-nested-in_tree +++ b/tests/testthat/indention_round_brackets/one_line-nested-in_tree @@ -1,31 +1,31 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: [0/0] {1} - ¦--expr: [0/1] {3} + °--expr: a <- [0/0] {1} + ¦--expr: a [0/1] {3} ¦ °--SYMBOL: a [0/0] {2} ¦--LEFT_ASSIGN: <- [0/1] {4} - °--expr: [0/0] {5} - ¦--expr: [0/0] {7} + °--expr: xyz(x [0/0] {5} + ¦--expr: xyz [0/0] {7} ¦ °--SYMBOL_FUNCTION_CALL: xyz [0/0] {6} ¦--'(': ( [0/0] {8} - ¦--expr: [0/0] {10} + ¦--expr: x [0/0] {10} ¦ °--SYMBOL: x [0/0] {9} ¦--',': , [0/1] {11} - ¦--expr: [0/0] {13} + ¦--expr: 22 [0/0] {13} ¦ °--NUM_CONST: 22 [0/0] {12} ¦--',': , [0/1] {14} - ¦--expr: [0/0] {15} + ¦--expr: if(x [0/0] {15} ¦ ¦--IF: if [0/0] {16} ¦ ¦--'(': ( [0/0] {17} - ¦ ¦--expr: [0/0] {18} - ¦ ¦ ¦--expr: [0/1] {20} + ¦ ¦--expr: x > 1 [0/0] {18} + ¦ ¦ ¦--expr: x [0/1] {20} ¦ ¦ ¦ °--SYMBOL: x [0/0] {19} ¦ ¦ ¦--GT: > [0/1] {21} - ¦ ¦ °--expr: [0/0] {23} + ¦ ¦ °--expr: 1 [0/0] {23} ¦ ¦ °--NUM_CONST: 1 [0/0] {22} ¦ ¦--')': ) [0/1] {24} - ¦ ¦--expr: [0/1] {26} + ¦ ¦--expr: 33 [0/1] {26} ¦ ¦ °--NUM_CONST: 33 [0/0] {25} ¦ ¦--ELSE: else [0/1] {27} - ¦ °--expr: [0/0] {29} + ¦ °--expr: 4 [0/0] {29} ¦ °--NUM_CONST: 4 [0/0] {28} °--')': ) [0/0] {30} diff --git a/tests/testthat/indention_square_brackets/square_brackets_line_break-in_tree b/tests/testthat/indention_square_brackets/square_brackets_line_break-in_tree index a7fdbe6ea..79f137220 100644 --- a/tests/testthat/indention_square_brackets/square_brackets_line_break-in_tree +++ b/tests/testthat/indention_square_brackets/square_brackets_line_break-in_tree @@ -1,117 +1,120 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} - ¦ ¦--expr: [0/0] {3} + ¦--expr: range [0/0] {1} + ¦ ¦--expr: range [0/0] {3} ¦ ¦ °--SYMBOL: range [0/0] {2} ¦ ¦--'[': [ [0/0] {4} - ¦ ¦--expr: [0/0] {5} - ¦ ¦ ¦--expr: [0/1] {6} - ¦ ¦ ¦ ¦--expr: [0/1] {8} + ¦ ¦--expr: tag = [0/0] {5} + ¦ ¦ ¦--expr: tag = [0/1] {6} + ¦ ¦ ¦ ¦--expr: tag [0/1] {8} ¦ ¦ ¦ ¦ °--SYMBOL: tag [0/0] {7} ¦ ¦ ¦ ¦--EQ: == [0/1] {9} - ¦ ¦ ¦ °--expr: [0/0] {11} + ¦ ¦ ¦ °--expr: "non_ [0/0] {11} ¦ ¦ ¦ °--STR_CONST: "non_ [0/0] {10} ¦ ¦ ¦--AND: & [0/1] {12} - ¦ ¦ °--expr: [0/0] {13} - ¦ ¦ ¦--expr: [0/0] {15} + ¦ ¦ °--expr: str_d [0/0] {13} + ¦ ¦ ¦--expr: str_d [0/0] {15} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: str_d [0/0] {14} ¦ ¦ ¦--'(': ( [0/0] {16} - ¦ ¦ ¦--expr: [0/0] {18} + ¦ ¦ ¦--expr: text [0/0] {18} ¦ ¦ ¦ °--SYMBOL: text [0/0] {17} ¦ ¦ ¦--',': , [0/1] {19} - ¦ ¦ ¦--expr: [0/0] {21} + ¦ ¦ ¦--expr: ";" [0/0] {21} ¦ ¦ ¦ °--STR_CONST: ";" [0/0] {20} ¦ ¦ °--')': ) [0/0] {22} ¦ ¦--',': , [0/0] {23} - ¦ ¦--expr: [1/0] {24} - ¦ ¦ ¦--expr: [0/1] {26} + ¦ ¦--expr: text [1/0] {24} + ¦ ¦ ¦--expr: text [0/1] {26} ¦ ¦ ¦ °--SYMBOL: text [0/0] {25} ¦ ¦ ¦--LEFT_ASSIGN: := [0/1] {27} - ¦ ¦ °--expr: [0/0] {28} - ¦ ¦ ¦--expr: [0/0] {30} + ¦ ¦ °--expr: str_r [0/0] {28} + ¦ ¦ ¦--expr: str_r [0/0] {30} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: str_r [0/0] {29} ¦ ¦ ¦--'(': ( [0/0] {31} - ¦ ¦ ¦--expr: [0/0] {33} + ¦ ¦ ¦--expr: text [0/0] {33} ¦ ¦ ¦ °--SYMBOL: text [0/0] {32} ¦ ¦ ¦--',': , [0/1] {34} - ¦ ¦ ¦--expr: [0/0] {36} + ¦ ¦ ¦--expr: ";" [0/0] {36} ¦ ¦ ¦ °--STR_CONST: ";" [0/0] {35} ¦ ¦ ¦--',': , [0/1] {37} - ¦ ¦ ¦--expr: [0/0] {39} + ¦ ¦ ¦--expr: "\n" [0/0] {39} ¦ ¦ ¦ °--STR_CONST: "\n" [0/0] {38} ¦ ¦ °--')': ) [0/0] {40} ¦ °--']': ] [0/0] {41} - ¦--expr: [2/0] {42} - ¦ ¦--expr: [0/0] {44} + ¦--expr: fak[a [2/0] {42} + ¦ ¦--expr: fak [0/0] {44} ¦ ¦ °--SYMBOL: fak [0/0] {43} ¦ ¦--'[': [ [0/0] {45} - ¦ ¦--expr: [0/0] {47} + ¦ ¦--expr: a [0/0] {47} ¦ ¦ °--SYMBOL: a [0/0] {46} ¦ ¦--',': , [0/1] {48} - ¦ ¦--expr: [0/0] {50} + ¦ ¦--expr: b [0/0] {50} ¦ ¦ °--SYMBOL: b [0/0] {49} ¦ °--']': ] [0/0] {51} - ¦--expr: [2/0] {52} - ¦ ¦--expr: [0/0] {54} + ¦--expr: fac[a [2/0] {52} + ¦ ¦--expr: fac [0/0] {54} ¦ ¦ °--SYMBOL: fac [0/0] {53} ¦ ¦--'[': [ [0/0] {55} - ¦ ¦--expr: [0/0] {57} + ¦ ¦--expr: a [0/0] {57} ¦ ¦ °--SYMBOL: a [0/0] {56} ¦ ¦--',': , [0/4] {58} - ¦ ¦--expr: [1/0] {60} + ¦ ¦--expr: b [1/0] {60} ¦ ¦ °--SYMBOL: b [0/0] {59} ¦ °--']': ] [0/0] {61} - ¦--expr: [2/0] {62} - ¦ ¦--expr: [0/0] {64} + ¦--expr: fac[ + [2/0] {62} + ¦ ¦--expr: fac [0/0] {64} ¦ ¦ °--SYMBOL: fac [0/0] {63} ¦ ¦--'[': [ [0/2] {65} - ¦ ¦--expr: [1/0] {67} + ¦ ¦--expr: a [1/0] {67} ¦ ¦ °--SYMBOL: a [0/0] {66} ¦ ¦--',': , [0/2] {68} - ¦ ¦--expr: [1/2] {70} + ¦ ¦--expr: b [1/2] {70} ¦ ¦ °--SYMBOL: b [0/0] {69} ¦ °--']': ] [1/0] {71} - ¦--expr: [2/0] {72} - ¦ ¦--expr: [0/0] {74} + ¦--expr: fac[ + [2/0] {72} + ¦ ¦--expr: fac [0/0] {74} ¦ ¦ °--SYMBOL: fac [0/0] {73} ¦ ¦--'[': [ [0/2] {75} ¦ ¦--',': , [1/1] {76} - ¦ ¦--expr: [0/0] {77} - ¦ ¦ ¦--expr: [0/0] {79} + ¦ ¦--expr: `:`(a [0/0] {77} + ¦ ¦ ¦--expr: `:` [0/0] {79} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: `:` [0/0] {78} ¦ ¦ ¦--'(': ( [0/0] {80} ¦ ¦ ¦--SYMBOL_SUB: a [0/1] {81} ¦ ¦ ¦--EQ_SUB: = [0/1] {82} - ¦ ¦ ¦--expr: [0/0] {84} + ¦ ¦ ¦--expr: b [0/0] {84} ¦ ¦ ¦ °--SYMBOL: b [0/0] {83} ¦ ¦ °--')': ) [0/0] {85} ¦ °--']': ] [0/0] {86} - ¦--expr: [2/0] {87} - ¦ ¦--expr: [0/0] {89} + ¦--expr: fac[ + [2/0] {87} + ¦ ¦--expr: fac [0/0] {89} ¦ ¦ °--SYMBOL: fac [0/0] {88} ¦ ¦--'[': [ [0/2] {90} ¦ ¦--',': , [1/1] {91} - ¦ ¦--expr: [0/0] {92} - ¦ ¦ ¦--expr: [0/0] {94} + ¦ ¦--expr: `:`(a [0/0] {92} + ¦ ¦ ¦--expr: `:` [0/0] {94} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: `:` [0/0] {93} ¦ ¦ ¦--'(': ( [0/0] {95} ¦ ¦ ¦--SYMBOL_SUB: a [0/1] {96} ¦ ¦ ¦--EQ_SUB: = [0/1] {97} - ¦ ¦ ¦--expr: [0/0] {99} + ¦ ¦ ¦--expr: b [0/0] {99} ¦ ¦ ¦ °--SYMBOL: b [0/0] {98} ¦ ¦ °--')': ) [0/0] {100} ¦ °--']': ] [1/0] {101} - °--expr: [2/0] {102} - ¦--expr: [0/0] {104} + °--expr: fac[, [2/0] {102} + ¦--expr: fac [0/0] {104} ¦ °--SYMBOL: fac [0/0] {103} ¦--'[': [ [0/0] {105} ¦--',': , [0/1] {106} - ¦--expr: [0/0] {107} - ¦ ¦--expr: [0/0] {109} + ¦--expr: `:`(a [0/0] {107} + ¦ ¦--expr: `:` [0/0] {109} ¦ ¦ °--SYMBOL_FUNCTION_CALL: `:` [0/0] {108} ¦ ¦--'(': ( [0/0] {110} ¦ ¦--SYMBOL_SUB: a [0/1] {111} ¦ ¦--EQ_SUB: = [0/1] {112} - ¦ ¦--expr: [0/0] {114} + ¦ ¦--expr: c [0/0] {114} ¦ ¦ °--SYMBOL: c [0/0] {113} ¦ °--')': ) [0/0] {115} °--']': ] [1/0] {116} diff --git a/tests/testthat/insertion_comment_interaction/if_else_if_else_non_strict-in_tree b/tests/testthat/insertion_comment_interaction/if_else_if_else_non_strict-in_tree index 2588b2bfe..8604c95f4 100644 --- a/tests/testthat/insertion_comment_interaction/if_else_if_else_non_strict-in_tree +++ b/tests/testthat/insertion_comment_interaction/if_else_if_else_non_strict-in_tree @@ -1,256 +1,256 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} + ¦--expr: if(TR [0/0] {1} ¦ ¦--IF: if [0/0] {2} ¦ ¦--'(': ( [0/0] {3} - ¦ ¦--expr: [0/0] {5} + ¦ ¦--expr: TRUE [0/0] {5} ¦ ¦ °--NUM_CONST: TRUE [0/0] {4} ¦ ¦--')': ) [0/0] {6} - ¦ ¦--expr: [0/1] {8} + ¦ ¦--expr: NULL [0/1] {8} ¦ ¦ °--NULL_CONST: NULL [0/0] {7} ¦ ¦--ELSE: else [0/1] {9} - ¦ °--expr: [0/0] {10} + ¦ °--expr: if(FA [0/0] {10} ¦ ¦--IF: if [0/0] {11} ¦ ¦--'(': ( [0/0] {12} - ¦ ¦--expr: [0/0] {14} + ¦ ¦--expr: FALSE [0/0] {14} ¦ ¦ °--NUM_CONST: FALSE [0/0] {13} ¦ ¦--')': ) [0/0] {15} - ¦ ¦--expr: [0/1] {17} + ¦ ¦--expr: NULL [0/1] {17} ¦ ¦ °--NULL_CONST: NULL [0/0] {16} ¦ ¦--ELSE: else [0/1] {18} - ¦ °--expr: [0/0] {20} + ¦ °--expr: NULL [0/0] {20} ¦ °--NULL_CONST: NULL [0/0] {19} - ¦--expr: [2/1] {21} + ¦--expr: if(TR [2/1] {21} ¦ ¦--IF: if [0/0] {22} ¦ ¦--'(': ( [0/0] {23} - ¦ ¦--expr: [0/0] {25} + ¦ ¦--expr: TRUE [0/0] {25} ¦ ¦ °--NUM_CONST: TRUE [0/0] {24} ¦ ¦--')': ) [0/0] {26} - ¦ ¦--expr: [0/1] {28} + ¦ ¦--expr: NULL [0/1] {28} ¦ ¦ °--NULL_CONST: NULL [0/0] {27} ¦ ¦--ELSE: else [0/1] {29} - ¦ °--expr: [0/0] {30} + ¦ °--expr: if(FA [0/0] {30} ¦ ¦--IF: if [0/0] {31} ¦ ¦--'(': ( [0/0] {32} - ¦ ¦--expr: [0/0] {34} + ¦ ¦--expr: FALSE [0/0] {34} ¦ ¦ °--NUM_CONST: FALSE [0/0] {33} ¦ ¦--')': ) [0/0] {35} - ¦ ¦--expr: [0/1] {37} + ¦ ¦--expr: NULL [0/1] {37} ¦ ¦ °--NULL_CONST: NULL [0/0] {36} ¦ ¦--ELSE: else [0/1] {38} - ¦ °--expr: [0/0] {40} + ¦ °--expr: NULL [0/0] {40} ¦ °--NULL_CONST: NULL [0/0] {39} ¦--COMMENT: # com [0/0] {41} - ¦--expr: [3/0] {42} + ¦--expr: if(TR [3/0] {42} ¦ ¦--IF: if [0/0] {43} ¦ ¦--'(': ( [0/0] {44} - ¦ ¦--expr: [0/0] {46} + ¦ ¦--expr: TRUE [0/0] {46} ¦ ¦ °--NUM_CONST: TRUE [0/0] {45} ¦ ¦--')': ) [0/0] {47} - ¦ ¦--expr: [0/1] {49} + ¦ ¦--expr: NULL [0/1] {49} ¦ ¦ °--NULL_CONST: NULL [0/0] {48} ¦ ¦--ELSE: else [0/1] {50} - ¦ °--expr: [0/0] {51} + ¦ °--expr: if(FA [0/0] {51} ¦ ¦--IF: if [0/0] {52} ¦ ¦--'(': ( [0/0] {53} - ¦ ¦--expr: [0/0] {55} + ¦ ¦--expr: FALSE [0/0] {55} ¦ ¦ °--NUM_CONST: FALSE [0/0] {54} ¦ ¦--')': ) [0/0] {56} - ¦ ¦--expr: [0/1] {58} + ¦ ¦--expr: NULL [0/1] {58} ¦ ¦ °--NULL_CONST: NULL [0/0] {57} ¦ ¦--ELSE: else [0/1] {59} ¦ ¦--COMMENT: # com [0/1] {60} - ¦ °--expr: [1/0] {62} + ¦ °--expr: NULL [1/0] {62} ¦ °--NULL_CONST: NULL [0/0] {61} ¦--COMMENT: # if( [2/0] {63} ¦--COMMENT: # el [1/0] {64} - ¦--expr: [2/0] {65} + ¦--expr: if(TR [2/0] {65} ¦ ¦--IF: if [0/0] {66} ¦ ¦--'(': ( [0/0] {67} - ¦ ¦--expr: [0/0] {69} + ¦ ¦--expr: TRUE [0/0] {69} ¦ ¦ °--NUM_CONST: TRUE [0/0] {68} ¦ ¦--')': ) [0/0] {70} - ¦ ¦--expr: [0/1] {72} + ¦ ¦--expr: NULL [0/1] {72} ¦ ¦ °--NULL_CONST: NULL [0/0] {71} ¦ ¦--ELSE: else [0/1] {73} - ¦ °--expr: [0/0] {74} + ¦ °--expr: if(FA [0/0] {74} ¦ ¦--IF: if [0/0] {75} ¦ ¦--'(': ( [0/0] {76} - ¦ ¦--expr: [0/0] {78} + ¦ ¦--expr: FALSE [0/0] {78} ¦ ¦ °--NUM_CONST: FALSE [0/0] {77} ¦ ¦--')': ) [0/1] {79} ¦ ¦--COMMENT: # com [0/0] {80} - ¦ ¦--expr: [1/1] {82} + ¦ ¦--expr: NULL [1/1] {82} ¦ ¦ °--NULL_CONST: NULL [0/0] {81} ¦ ¦--ELSE: else [0/1] {83} - ¦ °--expr: [0/0] {85} + ¦ °--expr: NULL [0/0] {85} ¦ °--NULL_CONST: NULL [0/0] {84} - ¦--expr: [2/0] {86} + ¦--expr: if(TR [2/0] {86} ¦ ¦--IF: if [0/0] {87} ¦ ¦--'(': ( [0/0] {88} - ¦ ¦--expr: [0/0] {90} + ¦ ¦--expr: TRUE [0/0] {90} ¦ ¦ °--NUM_CONST: TRUE [0/0] {89} ¦ ¦--')': ) [0/0] {91} - ¦ ¦--expr: [0/1] {93} + ¦ ¦--expr: NULL [0/1] {93} ¦ ¦ °--NULL_CONST: NULL [0/0] {92} ¦ ¦--ELSE: else [0/1] {94} - ¦ °--expr: [0/0] {95} + ¦ °--expr: if(FA [0/0] {95} ¦ ¦--IF: if [0/0] {96} ¦ ¦--'(': ( [0/0] {97} - ¦ ¦--expr: [0/1] {99} + ¦ ¦--expr: FALSE [0/1] {99} ¦ ¦ °--NUM_CONST: FALSE [0/0] {98} ¦ ¦--COMMENT: # com [0/0] {100} ¦ ¦--')': ) [1/0] {101} - ¦ ¦--expr: [0/1] {103} + ¦ ¦--expr: NULL [0/1] {103} ¦ ¦ °--NULL_CONST: NULL [0/0] {102} ¦ ¦--ELSE: else [0/1] {104} - ¦ °--expr: [0/0] {106} + ¦ °--expr: NULL [0/0] {106} ¦ °--NULL_CONST: NULL [0/0] {105} - ¦--expr: [2/0] {107} + ¦--expr: if(TR [2/0] {107} ¦ ¦--IF: if [0/0] {108} ¦ ¦--'(': ( [0/0] {109} - ¦ ¦--expr: [0/0] {111} + ¦ ¦--expr: TRUE [0/0] {111} ¦ ¦ °--NUM_CONST: TRUE [0/0] {110} ¦ ¦--')': ) [0/0] {112} - ¦ ¦--expr: [0/1] {114} + ¦ ¦--expr: NULL [0/1] {114} ¦ ¦ °--NULL_CONST: NULL [0/0] {113} ¦ ¦--ELSE: else [0/1] {115} - ¦ °--expr: [0/0] {116} + ¦ °--expr: if( # [0/0] {116} ¦ ¦--IF: if [0/0] {117} ¦ ¦--'(': ( [0/1] {118} ¦ ¦--COMMENT: # com [0/0] {119} - ¦ ¦--expr: [1/0] {121} + ¦ ¦--expr: FALSE [1/0] {121} ¦ ¦ °--NUM_CONST: FALSE [0/0] {120} ¦ ¦--')': ) [0/0] {122} - ¦ ¦--expr: [0/1] {124} + ¦ ¦--expr: NULL [0/1] {124} ¦ ¦ °--NULL_CONST: NULL [0/0] {123} ¦ ¦--ELSE: else [0/1] {125} - ¦ °--expr: [0/0] {127} + ¦ °--expr: NULL [0/0] {127} ¦ °--NULL_CONST: NULL [0/0] {126} - ¦--expr: [2/0] {128} + ¦--expr: if(TR [2/0] {128} ¦ ¦--IF: if [0/0] {129} ¦ ¦--'(': ( [0/0] {130} - ¦ ¦--expr: [0/0] {132} + ¦ ¦--expr: TRUE [0/0] {132} ¦ ¦ °--NUM_CONST: TRUE [0/0] {131} ¦ ¦--')': ) [0/0] {133} - ¦ ¦--expr: [0/1] {135} + ¦ ¦--expr: NULL [0/1] {135} ¦ ¦ °--NULL_CONST: NULL [0/0] {134} ¦ ¦--ELSE: else [0/1] {136} - ¦ °--expr: [0/0] {137} + ¦ °--expr: if # [0/0] {137} ¦ ¦--IF: if [0/1] {138} ¦ ¦--COMMENT: # com [0/0] {139} ¦ ¦--'(': ( [1/0] {140} - ¦ ¦--expr: [0/0] {142} + ¦ ¦--expr: FALSE [0/0] {142} ¦ ¦ °--NUM_CONST: FALSE [0/0] {141} ¦ ¦--')': ) [0/0] {143} - ¦ ¦--expr: [0/1] {145} + ¦ ¦--expr: NULL [0/1] {145} ¦ ¦ °--NULL_CONST: NULL [0/0] {144} ¦ ¦--ELSE: else [0/1] {146} - ¦ °--expr: [0/0] {148} + ¦ °--expr: NULL [0/0] {148} ¦ °--NULL_CONST: NULL [0/0] {147} - ¦--expr: [2/0] {149} + ¦--expr: if(TR [2/0] {149} ¦ ¦--IF: if [0/0] {150} ¦ ¦--'(': ( [0/0] {151} - ¦ ¦--expr: [0/0] {153} + ¦ ¦--expr: TRUE [0/0] {153} ¦ ¦ °--NUM_CONST: TRUE [0/0] {152} ¦ ¦--')': ) [0/0] {154} - ¦ ¦--expr: [0/1] {156} + ¦ ¦--expr: NULL [0/1] {156} ¦ ¦ °--NULL_CONST: NULL [0/0] {155} ¦ ¦--ELSE: else [0/1] {157} ¦ ¦--COMMENT: # com [0/1] {158} - ¦ °--expr: [1/0] {159} + ¦ °--expr: if(FA [1/0] {159} ¦ ¦--IF: if [0/0] {160} ¦ ¦--'(': ( [0/0] {161} - ¦ ¦--expr: [0/0] {163} + ¦ ¦--expr: FALSE [0/0] {163} ¦ ¦ °--NUM_CONST: FALSE [0/0] {162} ¦ ¦--')': ) [0/0] {164} - ¦ ¦--expr: [0/1] {166} + ¦ ¦--expr: NULL [0/1] {166} ¦ ¦ °--NULL_CONST: NULL [0/0] {165} ¦ ¦--ELSE: else [0/1] {167} - ¦ °--expr: [0/0] {169} + ¦ °--expr: NULL [0/0] {169} ¦ °--NULL_CONST: NULL [0/0] {168} ¦--COMMENT: # if( [2/0] {170} ¦--COMMENT: # el [1/0] {171} - ¦--expr: [2/0] {172} + ¦--expr: if(TR [2/0] {172} ¦ ¦--IF: if [0/0] {173} ¦ ¦--'(': ( [0/0] {174} - ¦ ¦--expr: [0/0] {176} + ¦ ¦--expr: TRUE [0/0] {176} ¦ ¦ °--NUM_CONST: TRUE [0/0] {175} ¦ ¦--')': ) [0/1] {177} ¦ ¦--COMMENT: # com [0/0] {178} - ¦ ¦--expr: [1/1] {180} + ¦ ¦--expr: NULL [1/1] {180} ¦ ¦ °--NULL_CONST: NULL [0/0] {179} ¦ ¦--ELSE: else [0/1] {181} - ¦ °--expr: [0/0] {182} + ¦ °--expr: if(FA [0/0] {182} ¦ ¦--IF: if [0/0] {183} ¦ ¦--'(': ( [0/0] {184} - ¦ ¦--expr: [0/0] {186} + ¦ ¦--expr: FALSE [0/0] {186} ¦ ¦ °--NUM_CONST: FALSE [0/0] {185} ¦ ¦--')': ) [0/0] {187} - ¦ ¦--expr: [0/1] {189} + ¦ ¦--expr: NULL [0/1] {189} ¦ ¦ °--NULL_CONST: NULL [0/0] {188} ¦ ¦--ELSE: else [0/1] {190} - ¦ °--expr: [0/0] {192} + ¦ °--expr: NULL [0/0] {192} ¦ °--NULL_CONST: NULL [0/0] {191} - ¦--expr: [2/0] {193} + ¦--expr: if(TR [2/0] {193} ¦ ¦--IF: if [0/0] {194} ¦ ¦--'(': ( [0/0] {195} - ¦ ¦--expr: [0/1] {197} + ¦ ¦--expr: TRUE [0/1] {197} ¦ ¦ °--NUM_CONST: TRUE [0/0] {196} ¦ ¦--COMMENT: # com [0/0] {198} ¦ ¦--')': ) [1/0] {199} - ¦ ¦--expr: [0/1] {201} + ¦ ¦--expr: NULL [0/1] {201} ¦ ¦ °--NULL_CONST: NULL [0/0] {200} ¦ ¦--ELSE: else [0/1] {202} - ¦ °--expr: [0/0] {203} + ¦ °--expr: if(FA [0/0] {203} ¦ ¦--IF: if [0/0] {204} ¦ ¦--'(': ( [0/0] {205} - ¦ ¦--expr: [0/0] {207} + ¦ ¦--expr: FALSE [0/0] {207} ¦ ¦ °--NUM_CONST: FALSE [0/0] {206} ¦ ¦--')': ) [0/0] {208} - ¦ ¦--expr: [0/1] {210} + ¦ ¦--expr: NULL [0/1] {210} ¦ ¦ °--NULL_CONST: NULL [0/0] {209} ¦ ¦--ELSE: else [0/1] {211} - ¦ °--expr: [0/0] {213} + ¦ °--expr: NULL [0/0] {213} ¦ °--NULL_CONST: NULL [0/0] {212} - ¦--expr: [2/0] {214} + ¦--expr: if( # [2/0] {214} ¦ ¦--IF: if [0/0] {215} ¦ ¦--'(': ( [0/1] {216} ¦ ¦--COMMENT: # com [0/0] {217} - ¦ ¦--expr: [1/0] {219} + ¦ ¦--expr: TRUE [1/0] {219} ¦ ¦ °--NUM_CONST: TRUE [0/0] {218} ¦ ¦--')': ) [0/0] {220} - ¦ ¦--expr: [0/1] {222} + ¦ ¦--expr: NULL [0/1] {222} ¦ ¦ °--NULL_CONST: NULL [0/0] {221} ¦ ¦--ELSE: else [0/1] {223} - ¦ °--expr: [0/0] {224} + ¦ °--expr: if(FA [0/0] {224} ¦ ¦--IF: if [0/0] {225} ¦ ¦--'(': ( [0/0] {226} - ¦ ¦--expr: [0/0] {228} + ¦ ¦--expr: FALSE [0/0] {228} ¦ ¦ °--NUM_CONST: FALSE [0/0] {227} ¦ ¦--')': ) [0/0] {229} - ¦ ¦--expr: [0/1] {231} + ¦ ¦--expr: NULL [0/1] {231} ¦ ¦ °--NULL_CONST: NULL [0/0] {230} ¦ ¦--ELSE: else [0/1] {232} - ¦ °--expr: [0/0] {234} + ¦ °--expr: NULL [0/0] {234} ¦ °--NULL_CONST: NULL [0/0] {233} - °--expr: [2/0] {235} + °--expr: if # [2/0] {235} ¦--IF: if [0/1] {236} ¦--COMMENT: # com [0/0] {237} ¦--'(': ( [1/0] {238} - ¦--expr: [0/0] {240} + ¦--expr: TRUE [0/0] {240} ¦ °--NUM_CONST: TRUE [0/0] {239} ¦--')': ) [0/0] {241} - ¦--expr: [0/1] {243} + ¦--expr: NULL [0/1] {243} ¦ °--NULL_CONST: NULL [0/0] {242} ¦--ELSE: else [0/1] {244} - °--expr: [0/0] {245} + °--expr: if(FA [0/0] {245} ¦--IF: if [0/0] {246} ¦--'(': ( [0/0] {247} - ¦--expr: [0/0] {249} + ¦--expr: FALSE [0/0] {249} ¦ °--NUM_CONST: FALSE [0/0] {248} ¦--')': ) [0/0] {250} - ¦--expr: [0/1] {252} + ¦--expr: NULL [0/1] {252} ¦ °--NULL_CONST: NULL [0/0] {251} ¦--ELSE: else [0/1] {253} - °--expr: [0/0] {255} + °--expr: NULL [0/0] {255} °--NULL_CONST: NULL [0/0] {254} diff --git a/tests/testthat/insertion_comment_interaction/if_else_if_else_strict-in_tree b/tests/testthat/insertion_comment_interaction/if_else_if_else_strict-in_tree index 2588b2bfe..8604c95f4 100644 --- a/tests/testthat/insertion_comment_interaction/if_else_if_else_strict-in_tree +++ b/tests/testthat/insertion_comment_interaction/if_else_if_else_strict-in_tree @@ -1,256 +1,256 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} + ¦--expr: if(TR [0/0] {1} ¦ ¦--IF: if [0/0] {2} ¦ ¦--'(': ( [0/0] {3} - ¦ ¦--expr: [0/0] {5} + ¦ ¦--expr: TRUE [0/0] {5} ¦ ¦ °--NUM_CONST: TRUE [0/0] {4} ¦ ¦--')': ) [0/0] {6} - ¦ ¦--expr: [0/1] {8} + ¦ ¦--expr: NULL [0/1] {8} ¦ ¦ °--NULL_CONST: NULL [0/0] {7} ¦ ¦--ELSE: else [0/1] {9} - ¦ °--expr: [0/0] {10} + ¦ °--expr: if(FA [0/0] {10} ¦ ¦--IF: if [0/0] {11} ¦ ¦--'(': ( [0/0] {12} - ¦ ¦--expr: [0/0] {14} + ¦ ¦--expr: FALSE [0/0] {14} ¦ ¦ °--NUM_CONST: FALSE [0/0] {13} ¦ ¦--')': ) [0/0] {15} - ¦ ¦--expr: [0/1] {17} + ¦ ¦--expr: NULL [0/1] {17} ¦ ¦ °--NULL_CONST: NULL [0/0] {16} ¦ ¦--ELSE: else [0/1] {18} - ¦ °--expr: [0/0] {20} + ¦ °--expr: NULL [0/0] {20} ¦ °--NULL_CONST: NULL [0/0] {19} - ¦--expr: [2/1] {21} + ¦--expr: if(TR [2/1] {21} ¦ ¦--IF: if [0/0] {22} ¦ ¦--'(': ( [0/0] {23} - ¦ ¦--expr: [0/0] {25} + ¦ ¦--expr: TRUE [0/0] {25} ¦ ¦ °--NUM_CONST: TRUE [0/0] {24} ¦ ¦--')': ) [0/0] {26} - ¦ ¦--expr: [0/1] {28} + ¦ ¦--expr: NULL [0/1] {28} ¦ ¦ °--NULL_CONST: NULL [0/0] {27} ¦ ¦--ELSE: else [0/1] {29} - ¦ °--expr: [0/0] {30} + ¦ °--expr: if(FA [0/0] {30} ¦ ¦--IF: if [0/0] {31} ¦ ¦--'(': ( [0/0] {32} - ¦ ¦--expr: [0/0] {34} + ¦ ¦--expr: FALSE [0/0] {34} ¦ ¦ °--NUM_CONST: FALSE [0/0] {33} ¦ ¦--')': ) [0/0] {35} - ¦ ¦--expr: [0/1] {37} + ¦ ¦--expr: NULL [0/1] {37} ¦ ¦ °--NULL_CONST: NULL [0/0] {36} ¦ ¦--ELSE: else [0/1] {38} - ¦ °--expr: [0/0] {40} + ¦ °--expr: NULL [0/0] {40} ¦ °--NULL_CONST: NULL [0/0] {39} ¦--COMMENT: # com [0/0] {41} - ¦--expr: [3/0] {42} + ¦--expr: if(TR [3/0] {42} ¦ ¦--IF: if [0/0] {43} ¦ ¦--'(': ( [0/0] {44} - ¦ ¦--expr: [0/0] {46} + ¦ ¦--expr: TRUE [0/0] {46} ¦ ¦ °--NUM_CONST: TRUE [0/0] {45} ¦ ¦--')': ) [0/0] {47} - ¦ ¦--expr: [0/1] {49} + ¦ ¦--expr: NULL [0/1] {49} ¦ ¦ °--NULL_CONST: NULL [0/0] {48} ¦ ¦--ELSE: else [0/1] {50} - ¦ °--expr: [0/0] {51} + ¦ °--expr: if(FA [0/0] {51} ¦ ¦--IF: if [0/0] {52} ¦ ¦--'(': ( [0/0] {53} - ¦ ¦--expr: [0/0] {55} + ¦ ¦--expr: FALSE [0/0] {55} ¦ ¦ °--NUM_CONST: FALSE [0/0] {54} ¦ ¦--')': ) [0/0] {56} - ¦ ¦--expr: [0/1] {58} + ¦ ¦--expr: NULL [0/1] {58} ¦ ¦ °--NULL_CONST: NULL [0/0] {57} ¦ ¦--ELSE: else [0/1] {59} ¦ ¦--COMMENT: # com [0/1] {60} - ¦ °--expr: [1/0] {62} + ¦ °--expr: NULL [1/0] {62} ¦ °--NULL_CONST: NULL [0/0] {61} ¦--COMMENT: # if( [2/0] {63} ¦--COMMENT: # el [1/0] {64} - ¦--expr: [2/0] {65} + ¦--expr: if(TR [2/0] {65} ¦ ¦--IF: if [0/0] {66} ¦ ¦--'(': ( [0/0] {67} - ¦ ¦--expr: [0/0] {69} + ¦ ¦--expr: TRUE [0/0] {69} ¦ ¦ °--NUM_CONST: TRUE [0/0] {68} ¦ ¦--')': ) [0/0] {70} - ¦ ¦--expr: [0/1] {72} + ¦ ¦--expr: NULL [0/1] {72} ¦ ¦ °--NULL_CONST: NULL [0/0] {71} ¦ ¦--ELSE: else [0/1] {73} - ¦ °--expr: [0/0] {74} + ¦ °--expr: if(FA [0/0] {74} ¦ ¦--IF: if [0/0] {75} ¦ ¦--'(': ( [0/0] {76} - ¦ ¦--expr: [0/0] {78} + ¦ ¦--expr: FALSE [0/0] {78} ¦ ¦ °--NUM_CONST: FALSE [0/0] {77} ¦ ¦--')': ) [0/1] {79} ¦ ¦--COMMENT: # com [0/0] {80} - ¦ ¦--expr: [1/1] {82} + ¦ ¦--expr: NULL [1/1] {82} ¦ ¦ °--NULL_CONST: NULL [0/0] {81} ¦ ¦--ELSE: else [0/1] {83} - ¦ °--expr: [0/0] {85} + ¦ °--expr: NULL [0/0] {85} ¦ °--NULL_CONST: NULL [0/0] {84} - ¦--expr: [2/0] {86} + ¦--expr: if(TR [2/0] {86} ¦ ¦--IF: if [0/0] {87} ¦ ¦--'(': ( [0/0] {88} - ¦ ¦--expr: [0/0] {90} + ¦ ¦--expr: TRUE [0/0] {90} ¦ ¦ °--NUM_CONST: TRUE [0/0] {89} ¦ ¦--')': ) [0/0] {91} - ¦ ¦--expr: [0/1] {93} + ¦ ¦--expr: NULL [0/1] {93} ¦ ¦ °--NULL_CONST: NULL [0/0] {92} ¦ ¦--ELSE: else [0/1] {94} - ¦ °--expr: [0/0] {95} + ¦ °--expr: if(FA [0/0] {95} ¦ ¦--IF: if [0/0] {96} ¦ ¦--'(': ( [0/0] {97} - ¦ ¦--expr: [0/1] {99} + ¦ ¦--expr: FALSE [0/1] {99} ¦ ¦ °--NUM_CONST: FALSE [0/0] {98} ¦ ¦--COMMENT: # com [0/0] {100} ¦ ¦--')': ) [1/0] {101} - ¦ ¦--expr: [0/1] {103} + ¦ ¦--expr: NULL [0/1] {103} ¦ ¦ °--NULL_CONST: NULL [0/0] {102} ¦ ¦--ELSE: else [0/1] {104} - ¦ °--expr: [0/0] {106} + ¦ °--expr: NULL [0/0] {106} ¦ °--NULL_CONST: NULL [0/0] {105} - ¦--expr: [2/0] {107} + ¦--expr: if(TR [2/0] {107} ¦ ¦--IF: if [0/0] {108} ¦ ¦--'(': ( [0/0] {109} - ¦ ¦--expr: [0/0] {111} + ¦ ¦--expr: TRUE [0/0] {111} ¦ ¦ °--NUM_CONST: TRUE [0/0] {110} ¦ ¦--')': ) [0/0] {112} - ¦ ¦--expr: [0/1] {114} + ¦ ¦--expr: NULL [0/1] {114} ¦ ¦ °--NULL_CONST: NULL [0/0] {113} ¦ ¦--ELSE: else [0/1] {115} - ¦ °--expr: [0/0] {116} + ¦ °--expr: if( # [0/0] {116} ¦ ¦--IF: if [0/0] {117} ¦ ¦--'(': ( [0/1] {118} ¦ ¦--COMMENT: # com [0/0] {119} - ¦ ¦--expr: [1/0] {121} + ¦ ¦--expr: FALSE [1/0] {121} ¦ ¦ °--NUM_CONST: FALSE [0/0] {120} ¦ ¦--')': ) [0/0] {122} - ¦ ¦--expr: [0/1] {124} + ¦ ¦--expr: NULL [0/1] {124} ¦ ¦ °--NULL_CONST: NULL [0/0] {123} ¦ ¦--ELSE: else [0/1] {125} - ¦ °--expr: [0/0] {127} + ¦ °--expr: NULL [0/0] {127} ¦ °--NULL_CONST: NULL [0/0] {126} - ¦--expr: [2/0] {128} + ¦--expr: if(TR [2/0] {128} ¦ ¦--IF: if [0/0] {129} ¦ ¦--'(': ( [0/0] {130} - ¦ ¦--expr: [0/0] {132} + ¦ ¦--expr: TRUE [0/0] {132} ¦ ¦ °--NUM_CONST: TRUE [0/0] {131} ¦ ¦--')': ) [0/0] {133} - ¦ ¦--expr: [0/1] {135} + ¦ ¦--expr: NULL [0/1] {135} ¦ ¦ °--NULL_CONST: NULL [0/0] {134} ¦ ¦--ELSE: else [0/1] {136} - ¦ °--expr: [0/0] {137} + ¦ °--expr: if # [0/0] {137} ¦ ¦--IF: if [0/1] {138} ¦ ¦--COMMENT: # com [0/0] {139} ¦ ¦--'(': ( [1/0] {140} - ¦ ¦--expr: [0/0] {142} + ¦ ¦--expr: FALSE [0/0] {142} ¦ ¦ °--NUM_CONST: FALSE [0/0] {141} ¦ ¦--')': ) [0/0] {143} - ¦ ¦--expr: [0/1] {145} + ¦ ¦--expr: NULL [0/1] {145} ¦ ¦ °--NULL_CONST: NULL [0/0] {144} ¦ ¦--ELSE: else [0/1] {146} - ¦ °--expr: [0/0] {148} + ¦ °--expr: NULL [0/0] {148} ¦ °--NULL_CONST: NULL [0/0] {147} - ¦--expr: [2/0] {149} + ¦--expr: if(TR [2/0] {149} ¦ ¦--IF: if [0/0] {150} ¦ ¦--'(': ( [0/0] {151} - ¦ ¦--expr: [0/0] {153} + ¦ ¦--expr: TRUE [0/0] {153} ¦ ¦ °--NUM_CONST: TRUE [0/0] {152} ¦ ¦--')': ) [0/0] {154} - ¦ ¦--expr: [0/1] {156} + ¦ ¦--expr: NULL [0/1] {156} ¦ ¦ °--NULL_CONST: NULL [0/0] {155} ¦ ¦--ELSE: else [0/1] {157} ¦ ¦--COMMENT: # com [0/1] {158} - ¦ °--expr: [1/0] {159} + ¦ °--expr: if(FA [1/0] {159} ¦ ¦--IF: if [0/0] {160} ¦ ¦--'(': ( [0/0] {161} - ¦ ¦--expr: [0/0] {163} + ¦ ¦--expr: FALSE [0/0] {163} ¦ ¦ °--NUM_CONST: FALSE [0/0] {162} ¦ ¦--')': ) [0/0] {164} - ¦ ¦--expr: [0/1] {166} + ¦ ¦--expr: NULL [0/1] {166} ¦ ¦ °--NULL_CONST: NULL [0/0] {165} ¦ ¦--ELSE: else [0/1] {167} - ¦ °--expr: [0/0] {169} + ¦ °--expr: NULL [0/0] {169} ¦ °--NULL_CONST: NULL [0/0] {168} ¦--COMMENT: # if( [2/0] {170} ¦--COMMENT: # el [1/0] {171} - ¦--expr: [2/0] {172} + ¦--expr: if(TR [2/0] {172} ¦ ¦--IF: if [0/0] {173} ¦ ¦--'(': ( [0/0] {174} - ¦ ¦--expr: [0/0] {176} + ¦ ¦--expr: TRUE [0/0] {176} ¦ ¦ °--NUM_CONST: TRUE [0/0] {175} ¦ ¦--')': ) [0/1] {177} ¦ ¦--COMMENT: # com [0/0] {178} - ¦ ¦--expr: [1/1] {180} + ¦ ¦--expr: NULL [1/1] {180} ¦ ¦ °--NULL_CONST: NULL [0/0] {179} ¦ ¦--ELSE: else [0/1] {181} - ¦ °--expr: [0/0] {182} + ¦ °--expr: if(FA [0/0] {182} ¦ ¦--IF: if [0/0] {183} ¦ ¦--'(': ( [0/0] {184} - ¦ ¦--expr: [0/0] {186} + ¦ ¦--expr: FALSE [0/0] {186} ¦ ¦ °--NUM_CONST: FALSE [0/0] {185} ¦ ¦--')': ) [0/0] {187} - ¦ ¦--expr: [0/1] {189} + ¦ ¦--expr: NULL [0/1] {189} ¦ ¦ °--NULL_CONST: NULL [0/0] {188} ¦ ¦--ELSE: else [0/1] {190} - ¦ °--expr: [0/0] {192} + ¦ °--expr: NULL [0/0] {192} ¦ °--NULL_CONST: NULL [0/0] {191} - ¦--expr: [2/0] {193} + ¦--expr: if(TR [2/0] {193} ¦ ¦--IF: if [0/0] {194} ¦ ¦--'(': ( [0/0] {195} - ¦ ¦--expr: [0/1] {197} + ¦ ¦--expr: TRUE [0/1] {197} ¦ ¦ °--NUM_CONST: TRUE [0/0] {196} ¦ ¦--COMMENT: # com [0/0] {198} ¦ ¦--')': ) [1/0] {199} - ¦ ¦--expr: [0/1] {201} + ¦ ¦--expr: NULL [0/1] {201} ¦ ¦ °--NULL_CONST: NULL [0/0] {200} ¦ ¦--ELSE: else [0/1] {202} - ¦ °--expr: [0/0] {203} + ¦ °--expr: if(FA [0/0] {203} ¦ ¦--IF: if [0/0] {204} ¦ ¦--'(': ( [0/0] {205} - ¦ ¦--expr: [0/0] {207} + ¦ ¦--expr: FALSE [0/0] {207} ¦ ¦ °--NUM_CONST: FALSE [0/0] {206} ¦ ¦--')': ) [0/0] {208} - ¦ ¦--expr: [0/1] {210} + ¦ ¦--expr: NULL [0/1] {210} ¦ ¦ °--NULL_CONST: NULL [0/0] {209} ¦ ¦--ELSE: else [0/1] {211} - ¦ °--expr: [0/0] {213} + ¦ °--expr: NULL [0/0] {213} ¦ °--NULL_CONST: NULL [0/0] {212} - ¦--expr: [2/0] {214} + ¦--expr: if( # [2/0] {214} ¦ ¦--IF: if [0/0] {215} ¦ ¦--'(': ( [0/1] {216} ¦ ¦--COMMENT: # com [0/0] {217} - ¦ ¦--expr: [1/0] {219} + ¦ ¦--expr: TRUE [1/0] {219} ¦ ¦ °--NUM_CONST: TRUE [0/0] {218} ¦ ¦--')': ) [0/0] {220} - ¦ ¦--expr: [0/1] {222} + ¦ ¦--expr: NULL [0/1] {222} ¦ ¦ °--NULL_CONST: NULL [0/0] {221} ¦ ¦--ELSE: else [0/1] {223} - ¦ °--expr: [0/0] {224} + ¦ °--expr: if(FA [0/0] {224} ¦ ¦--IF: if [0/0] {225} ¦ ¦--'(': ( [0/0] {226} - ¦ ¦--expr: [0/0] {228} + ¦ ¦--expr: FALSE [0/0] {228} ¦ ¦ °--NUM_CONST: FALSE [0/0] {227} ¦ ¦--')': ) [0/0] {229} - ¦ ¦--expr: [0/1] {231} + ¦ ¦--expr: NULL [0/1] {231} ¦ ¦ °--NULL_CONST: NULL [0/0] {230} ¦ ¦--ELSE: else [0/1] {232} - ¦ °--expr: [0/0] {234} + ¦ °--expr: NULL [0/0] {234} ¦ °--NULL_CONST: NULL [0/0] {233} - °--expr: [2/0] {235} + °--expr: if # [2/0] {235} ¦--IF: if [0/1] {236} ¦--COMMENT: # com [0/0] {237} ¦--'(': ( [1/0] {238} - ¦--expr: [0/0] {240} + ¦--expr: TRUE [0/0] {240} ¦ °--NUM_CONST: TRUE [0/0] {239} ¦--')': ) [0/0] {241} - ¦--expr: [0/1] {243} + ¦--expr: NULL [0/1] {243} ¦ °--NULL_CONST: NULL [0/0] {242} ¦--ELSE: else [0/1] {244} - °--expr: [0/0] {245} + °--expr: if(FA [0/0] {245} ¦--IF: if [0/0] {246} ¦--'(': ( [0/0] {247} - ¦--expr: [0/0] {249} + ¦--expr: FALSE [0/0] {249} ¦ °--NUM_CONST: FALSE [0/0] {248} ¦--')': ) [0/0] {250} - ¦--expr: [0/1] {252} + ¦--expr: NULL [0/1] {252} ¦ °--NULL_CONST: NULL [0/0] {251} ¦--ELSE: else [0/1] {253} - °--expr: [0/0] {255} + °--expr: NULL [0/0] {255} °--NULL_CONST: NULL [0/0] {254} diff --git a/tests/testthat/insertion_comment_interaction/if_else_non_strict-in_tree b/tests/testthat/insertion_comment_interaction/if_else_non_strict-in_tree index 3dbeca382..7d277ba18 100644 --- a/tests/testthat/insertion_comment_interaction/if_else_non_strict-in_tree +++ b/tests/testthat/insertion_comment_interaction/if_else_non_strict-in_tree @@ -1,86 +1,86 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} + ¦--expr: if(TR [0/0] {1} ¦ ¦--IF: if [0/0] {2} ¦ ¦--'(': ( [0/0] {3} - ¦ ¦--expr: [0/0] {5} + ¦ ¦--expr: TRUE [0/0] {5} ¦ ¦ °--NUM_CONST: TRUE [0/0] {4} ¦ ¦--')': ) [0/0] {6} - ¦ ¦--expr: [0/1] {8} + ¦ ¦--expr: NULL [0/1] {8} ¦ ¦ °--NULL_CONST: NULL [0/0] {7} ¦ ¦--ELSE: else [0/1] {9} - ¦ °--expr: [0/0] {11} + ¦ °--expr: NULL [0/0] {11} ¦ °--NULL_CONST: NULL [0/0] {10} - ¦--expr: [2/1] {12} + ¦--expr: if(TR [2/1] {12} ¦ ¦--IF: if [0/0] {13} ¦ ¦--'(': ( [0/0] {14} - ¦ ¦--expr: [0/0] {16} + ¦ ¦--expr: TRUE [0/0] {16} ¦ ¦ °--NUM_CONST: TRUE [0/0] {15} ¦ ¦--')': ) [0/0] {17} - ¦ ¦--expr: [0/1] {19} + ¦ ¦--expr: NULL [0/1] {19} ¦ ¦ °--NULL_CONST: NULL [0/0] {18} ¦ ¦--ELSE: else [0/1] {20} - ¦ °--expr: [0/0] {22} + ¦ °--expr: NULL [0/0] {22} ¦ °--NULL_CONST: NULL [0/0] {21} ¦--COMMENT: # com [0/0] {23} - ¦--expr: [3/0] {24} + ¦--expr: if(TR [3/0] {24} ¦ ¦--IF: if [0/0] {25} ¦ ¦--'(': ( [0/0] {26} - ¦ ¦--expr: [0/0] {28} + ¦ ¦--expr: TRUE [0/0] {28} ¦ ¦ °--NUM_CONST: TRUE [0/0] {27} ¦ ¦--')': ) [0/0] {29} - ¦ ¦--expr: [0/1] {31} + ¦ ¦--expr: NULL [0/1] {31} ¦ ¦ °--NULL_CONST: NULL [0/0] {30} ¦ ¦--ELSE: else [0/1] {32} ¦ ¦--COMMENT: # com [0/1] {33} - ¦ °--expr: [1/0] {35} + ¦ °--expr: NULL [1/0] {35} ¦ °--NULL_CONST: NULL [0/0] {34} ¦--COMMENT: # if( [2/0] {36} ¦--COMMENT: # el [1/0] {37} - ¦--expr: [2/0] {38} + ¦--expr: if(TR [2/0] {38} ¦ ¦--IF: if [0/0] {39} ¦ ¦--'(': ( [0/0] {40} - ¦ ¦--expr: [0/0] {42} + ¦ ¦--expr: TRUE [0/0] {42} ¦ ¦ °--NUM_CONST: TRUE [0/0] {41} ¦ ¦--')': ) [0/1] {43} ¦ ¦--COMMENT: # com [0/0] {44} - ¦ ¦--expr: [1/1] {46} + ¦ ¦--expr: NULL [1/1] {46} ¦ ¦ °--NULL_CONST: NULL [0/0] {45} ¦ ¦--ELSE: else [0/1] {47} - ¦ °--expr: [0/0] {49} + ¦ °--expr: NULL [0/0] {49} ¦ °--NULL_CONST: NULL [0/0] {48} - ¦--expr: [2/0] {50} + ¦--expr: if(TR [2/0] {50} ¦ ¦--IF: if [0/0] {51} ¦ ¦--'(': ( [0/0] {52} - ¦ ¦--expr: [0/1] {54} + ¦ ¦--expr: TRUE [0/1] {54} ¦ ¦ °--NUM_CONST: TRUE [0/0] {53} ¦ ¦--COMMENT: # com [0/0] {55} ¦ ¦--')': ) [1/0] {56} - ¦ ¦--expr: [0/1] {58} + ¦ ¦--expr: NULL [0/1] {58} ¦ ¦ °--NULL_CONST: NULL [0/0] {57} ¦ ¦--ELSE: else [0/1] {59} - ¦ °--expr: [0/0] {61} + ¦ °--expr: NULL [0/0] {61} ¦ °--NULL_CONST: NULL [0/0] {60} - ¦--expr: [2/0] {62} + ¦--expr: if( # [2/0] {62} ¦ ¦--IF: if [0/0] {63} ¦ ¦--'(': ( [0/1] {64} ¦ ¦--COMMENT: # com [0/0] {65} - ¦ ¦--expr: [1/0] {67} + ¦ ¦--expr: TRUE [1/0] {67} ¦ ¦ °--NUM_CONST: TRUE [0/0] {66} ¦ ¦--')': ) [0/0] {68} - ¦ ¦--expr: [0/1] {70} + ¦ ¦--expr: NULL [0/1] {70} ¦ ¦ °--NULL_CONST: NULL [0/0] {69} ¦ ¦--ELSE: else [0/1] {71} - ¦ °--expr: [0/0] {73} + ¦ °--expr: NULL [0/0] {73} ¦ °--NULL_CONST: NULL [0/0] {72} - °--expr: [2/0] {74} + °--expr: if # [2/0] {74} ¦--IF: if [0/1] {75} ¦--COMMENT: # com [0/0] {76} ¦--'(': ( [1/0] {77} - ¦--expr: [0/0] {79} + ¦--expr: TRUE [0/0] {79} ¦ °--NUM_CONST: TRUE [0/0] {78} ¦--')': ) [0/0] {80} - ¦--expr: [0/1] {82} + ¦--expr: NULL [0/1] {82} ¦ °--NULL_CONST: NULL [0/0] {81} ¦--ELSE: else [0/1] {83} - °--expr: [0/0] {85} + °--expr: NULL [0/0] {85} °--NULL_CONST: NULL [0/0] {84} diff --git a/tests/testthat/insertion_comment_interaction/if_else_strict-in_tree b/tests/testthat/insertion_comment_interaction/if_else_strict-in_tree index 3dbeca382..7d277ba18 100644 --- a/tests/testthat/insertion_comment_interaction/if_else_strict-in_tree +++ b/tests/testthat/insertion_comment_interaction/if_else_strict-in_tree @@ -1,86 +1,86 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} + ¦--expr: if(TR [0/0] {1} ¦ ¦--IF: if [0/0] {2} ¦ ¦--'(': ( [0/0] {3} - ¦ ¦--expr: [0/0] {5} + ¦ ¦--expr: TRUE [0/0] {5} ¦ ¦ °--NUM_CONST: TRUE [0/0] {4} ¦ ¦--')': ) [0/0] {6} - ¦ ¦--expr: [0/1] {8} + ¦ ¦--expr: NULL [0/1] {8} ¦ ¦ °--NULL_CONST: NULL [0/0] {7} ¦ ¦--ELSE: else [0/1] {9} - ¦ °--expr: [0/0] {11} + ¦ °--expr: NULL [0/0] {11} ¦ °--NULL_CONST: NULL [0/0] {10} - ¦--expr: [2/1] {12} + ¦--expr: if(TR [2/1] {12} ¦ ¦--IF: if [0/0] {13} ¦ ¦--'(': ( [0/0] {14} - ¦ ¦--expr: [0/0] {16} + ¦ ¦--expr: TRUE [0/0] {16} ¦ ¦ °--NUM_CONST: TRUE [0/0] {15} ¦ ¦--')': ) [0/0] {17} - ¦ ¦--expr: [0/1] {19} + ¦ ¦--expr: NULL [0/1] {19} ¦ ¦ °--NULL_CONST: NULL [0/0] {18} ¦ ¦--ELSE: else [0/1] {20} - ¦ °--expr: [0/0] {22} + ¦ °--expr: NULL [0/0] {22} ¦ °--NULL_CONST: NULL [0/0] {21} ¦--COMMENT: # com [0/0] {23} - ¦--expr: [3/0] {24} + ¦--expr: if(TR [3/0] {24} ¦ ¦--IF: if [0/0] {25} ¦ ¦--'(': ( [0/0] {26} - ¦ ¦--expr: [0/0] {28} + ¦ ¦--expr: TRUE [0/0] {28} ¦ ¦ °--NUM_CONST: TRUE [0/0] {27} ¦ ¦--')': ) [0/0] {29} - ¦ ¦--expr: [0/1] {31} + ¦ ¦--expr: NULL [0/1] {31} ¦ ¦ °--NULL_CONST: NULL [0/0] {30} ¦ ¦--ELSE: else [0/1] {32} ¦ ¦--COMMENT: # com [0/1] {33} - ¦ °--expr: [1/0] {35} + ¦ °--expr: NULL [1/0] {35} ¦ °--NULL_CONST: NULL [0/0] {34} ¦--COMMENT: # if( [2/0] {36} ¦--COMMENT: # el [1/0] {37} - ¦--expr: [2/0] {38} + ¦--expr: if(TR [2/0] {38} ¦ ¦--IF: if [0/0] {39} ¦ ¦--'(': ( [0/0] {40} - ¦ ¦--expr: [0/0] {42} + ¦ ¦--expr: TRUE [0/0] {42} ¦ ¦ °--NUM_CONST: TRUE [0/0] {41} ¦ ¦--')': ) [0/1] {43} ¦ ¦--COMMENT: # com [0/0] {44} - ¦ ¦--expr: [1/1] {46} + ¦ ¦--expr: NULL [1/1] {46} ¦ ¦ °--NULL_CONST: NULL [0/0] {45} ¦ ¦--ELSE: else [0/1] {47} - ¦ °--expr: [0/0] {49} + ¦ °--expr: NULL [0/0] {49} ¦ °--NULL_CONST: NULL [0/0] {48} - ¦--expr: [2/0] {50} + ¦--expr: if(TR [2/0] {50} ¦ ¦--IF: if [0/0] {51} ¦ ¦--'(': ( [0/0] {52} - ¦ ¦--expr: [0/1] {54} + ¦ ¦--expr: TRUE [0/1] {54} ¦ ¦ °--NUM_CONST: TRUE [0/0] {53} ¦ ¦--COMMENT: # com [0/0] {55} ¦ ¦--')': ) [1/0] {56} - ¦ ¦--expr: [0/1] {58} + ¦ ¦--expr: NULL [0/1] {58} ¦ ¦ °--NULL_CONST: NULL [0/0] {57} ¦ ¦--ELSE: else [0/1] {59} - ¦ °--expr: [0/0] {61} + ¦ °--expr: NULL [0/0] {61} ¦ °--NULL_CONST: NULL [0/0] {60} - ¦--expr: [2/0] {62} + ¦--expr: if( # [2/0] {62} ¦ ¦--IF: if [0/0] {63} ¦ ¦--'(': ( [0/1] {64} ¦ ¦--COMMENT: # com [0/0] {65} - ¦ ¦--expr: [1/0] {67} + ¦ ¦--expr: TRUE [1/0] {67} ¦ ¦ °--NUM_CONST: TRUE [0/0] {66} ¦ ¦--')': ) [0/0] {68} - ¦ ¦--expr: [0/1] {70} + ¦ ¦--expr: NULL [0/1] {70} ¦ ¦ °--NULL_CONST: NULL [0/0] {69} ¦ ¦--ELSE: else [0/1] {71} - ¦ °--expr: [0/0] {73} + ¦ °--expr: NULL [0/0] {73} ¦ °--NULL_CONST: NULL [0/0] {72} - °--expr: [2/0] {74} + °--expr: if # [2/0] {74} ¦--IF: if [0/1] {75} ¦--COMMENT: # com [0/0] {76} ¦--'(': ( [1/0] {77} - ¦--expr: [0/0] {79} + ¦--expr: TRUE [0/0] {79} ¦ °--NUM_CONST: TRUE [0/0] {78} ¦--')': ) [0/0] {80} - ¦--expr: [0/1] {82} + ¦--expr: NULL [0/1] {82} ¦ °--NULL_CONST: NULL [0/0] {81} ¦--ELSE: else [0/1] {83} - °--expr: [0/0] {85} + °--expr: NULL [0/0] {85} °--NULL_CONST: NULL [0/0] {84} diff --git a/tests/testthat/insertion_comment_interaction/just_if_non_strict-in_tree b/tests/testthat/insertion_comment_interaction/just_if_non_strict-in_tree index e7a382077..cc8154b6e 100644 --- a/tests/testthat/insertion_comment_interaction/just_if_non_strict-in_tree +++ b/tests/testthat/insertion_comment_interaction/just_if_non_strict-in_tree @@ -1,54 +1,54 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} + ¦--expr: if(TR [0/0] {1} ¦ ¦--IF: if [0/0] {2} ¦ ¦--'(': ( [0/0] {3} - ¦ ¦--expr: [0/0] {5} + ¦ ¦--expr: TRUE [0/0] {5} ¦ ¦ °--NUM_CONST: TRUE [0/0] {4} ¦ ¦--')': ) [0/0] {6} - ¦ °--expr: [0/0] {8} + ¦ °--expr: NULL [0/0] {8} ¦ °--NULL_CONST: NULL [0/0] {7} - ¦--expr: [2/1] {9} + ¦--expr: if(TR [2/1] {9} ¦ ¦--IF: if [0/0] {10} ¦ ¦--'(': ( [0/0] {11} - ¦ ¦--expr: [0/0] {13} + ¦ ¦--expr: TRUE [0/0] {13} ¦ ¦ °--NUM_CONST: TRUE [0/0] {12} ¦ ¦--')': ) [0/0] {14} - ¦ °--expr: [0/0] {16} + ¦ °--expr: NULL [0/0] {16} ¦ °--NULL_CONST: NULL [0/0] {15} ¦--COMMENT: # com [0/0] {17} - ¦--expr: [3/0] {18} + ¦--expr: if(TR [3/0] {18} ¦ ¦--IF: if [0/0] {19} ¦ ¦--'(': ( [0/0] {20} - ¦ ¦--expr: [0/0] {22} + ¦ ¦--expr: TRUE [0/0] {22} ¦ ¦ °--NUM_CONST: TRUE [0/0] {21} ¦ ¦--')': ) [0/1] {23} ¦ ¦--COMMENT: # com [0/0] {24} - ¦ °--expr: [1/0] {26} + ¦ °--expr: NULL [1/0] {26} ¦ °--NULL_CONST: NULL [0/0] {25} - ¦--expr: [2/0] {27} + ¦--expr: if(TR [2/0] {27} ¦ ¦--IF: if [0/0] {28} ¦ ¦--'(': ( [0/0] {29} - ¦ ¦--expr: [0/1] {31} + ¦ ¦--expr: TRUE [0/1] {31} ¦ ¦ °--NUM_CONST: TRUE [0/0] {30} ¦ ¦--COMMENT: # com [0/0] {32} ¦ ¦--')': ) [1/0] {33} - ¦ °--expr: [0/0] {35} + ¦ °--expr: NULL [0/0] {35} ¦ °--NULL_CONST: NULL [0/0] {34} - ¦--expr: [2/0] {36} + ¦--expr: if( # [2/0] {36} ¦ ¦--IF: if [0/0] {37} ¦ ¦--'(': ( [0/1] {38} ¦ ¦--COMMENT: # com [0/0] {39} - ¦ ¦--expr: [1/0] {41} + ¦ ¦--expr: TRUE [1/0] {41} ¦ ¦ °--NUM_CONST: TRUE [0/0] {40} ¦ ¦--')': ) [0/0] {42} - ¦ °--expr: [0/0] {44} + ¦ °--expr: NULL [0/0] {44} ¦ °--NULL_CONST: NULL [0/0] {43} - °--expr: [2/0] {45} + °--expr: if # [2/0] {45} ¦--IF: if [0/1] {46} ¦--COMMENT: # com [0/0] {47} ¦--'(': ( [1/0] {48} - ¦--expr: [0/0] {50} + ¦--expr: TRUE [0/0] {50} ¦ °--NUM_CONST: TRUE [0/0] {49} ¦--')': ) [0/0] {51} - °--expr: [0/0] {53} + °--expr: NULL [0/0] {53} °--NULL_CONST: NULL [0/0] {52} diff --git a/tests/testthat/insertion_comment_interaction/just_if_strict-in_tree b/tests/testthat/insertion_comment_interaction/just_if_strict-in_tree index e7a382077..cc8154b6e 100644 --- a/tests/testthat/insertion_comment_interaction/just_if_strict-in_tree +++ b/tests/testthat/insertion_comment_interaction/just_if_strict-in_tree @@ -1,54 +1,54 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} + ¦--expr: if(TR [0/0] {1} ¦ ¦--IF: if [0/0] {2} ¦ ¦--'(': ( [0/0] {3} - ¦ ¦--expr: [0/0] {5} + ¦ ¦--expr: TRUE [0/0] {5} ¦ ¦ °--NUM_CONST: TRUE [0/0] {4} ¦ ¦--')': ) [0/0] {6} - ¦ °--expr: [0/0] {8} + ¦ °--expr: NULL [0/0] {8} ¦ °--NULL_CONST: NULL [0/0] {7} - ¦--expr: [2/1] {9} + ¦--expr: if(TR [2/1] {9} ¦ ¦--IF: if [0/0] {10} ¦ ¦--'(': ( [0/0] {11} - ¦ ¦--expr: [0/0] {13} + ¦ ¦--expr: TRUE [0/0] {13} ¦ ¦ °--NUM_CONST: TRUE [0/0] {12} ¦ ¦--')': ) [0/0] {14} - ¦ °--expr: [0/0] {16} + ¦ °--expr: NULL [0/0] {16} ¦ °--NULL_CONST: NULL [0/0] {15} ¦--COMMENT: # com [0/0] {17} - ¦--expr: [3/0] {18} + ¦--expr: if(TR [3/0] {18} ¦ ¦--IF: if [0/0] {19} ¦ ¦--'(': ( [0/0] {20} - ¦ ¦--expr: [0/0] {22} + ¦ ¦--expr: TRUE [0/0] {22} ¦ ¦ °--NUM_CONST: TRUE [0/0] {21} ¦ ¦--')': ) [0/1] {23} ¦ ¦--COMMENT: # com [0/0] {24} - ¦ °--expr: [1/0] {26} + ¦ °--expr: NULL [1/0] {26} ¦ °--NULL_CONST: NULL [0/0] {25} - ¦--expr: [2/0] {27} + ¦--expr: if(TR [2/0] {27} ¦ ¦--IF: if [0/0] {28} ¦ ¦--'(': ( [0/0] {29} - ¦ ¦--expr: [0/1] {31} + ¦ ¦--expr: TRUE [0/1] {31} ¦ ¦ °--NUM_CONST: TRUE [0/0] {30} ¦ ¦--COMMENT: # com [0/0] {32} ¦ ¦--')': ) [1/0] {33} - ¦ °--expr: [0/0] {35} + ¦ °--expr: NULL [0/0] {35} ¦ °--NULL_CONST: NULL [0/0] {34} - ¦--expr: [2/0] {36} + ¦--expr: if( # [2/0] {36} ¦ ¦--IF: if [0/0] {37} ¦ ¦--'(': ( [0/1] {38} ¦ ¦--COMMENT: # com [0/0] {39} - ¦ ¦--expr: [1/0] {41} + ¦ ¦--expr: TRUE [1/0] {41} ¦ ¦ °--NUM_CONST: TRUE [0/0] {40} ¦ ¦--')': ) [0/0] {42} - ¦ °--expr: [0/0] {44} + ¦ °--expr: NULL [0/0] {44} ¦ °--NULL_CONST: NULL [0/0] {43} - °--expr: [2/0] {45} + °--expr: if # [2/0] {45} ¦--IF: if [0/1] {46} ¦--COMMENT: # com [0/0] {47} ¦--'(': ( [1/0] {48} - ¦--expr: [0/0] {50} + ¦--expr: TRUE [0/0] {50} ¦ °--NUM_CONST: TRUE [0/0] {49} ¦--')': ) [0/0] {51} - °--expr: [0/0] {53} + °--expr: NULL [0/0] {53} °--NULL_CONST: NULL [0/0] {52} diff --git a/tests/testthat/line_breaks_and_other/braces-fun-calls1-in_tree b/tests/testthat/line_breaks_and_other/braces-fun-calls1-in_tree index fcb313c47..a62afee1c 100644 --- a/tests/testthat/line_breaks_and_other/braces-fun-calls1-in_tree +++ b/tests/testthat/line_breaks_and_other/braces-fun-calls1-in_tree @@ -1,125 +1,131 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--COMMENT: # the [0/0] {1} - ¦--expr: [1/0] {2} - ¦ ¦--expr: [0/0] {4} + ¦--expr: test_ [1/0] {2} + ¦ ¦--expr: test_ [0/0] {4} ¦ ¦ °--SYMBOL_FUNCTION_CALL: test_ [0/0] {3} ¦ ¦--'(': ( [0/0] {5} - ¦ ¦--expr: [0/0] {7} + ¦ ¦--expr: x [0/0] {7} ¦ ¦ °--SYMBOL: x [0/0] {6} ¦ ¦--',': , [0/1] {8} - ¦ ¦--expr: [0/0] {9} + ¦ ¦--expr: { + h [0/0] {9} ¦ ¦ ¦--'{': { [0/2] {10} - ¦ ¦ ¦--expr: [1/0] {12} + ¦ ¦ ¦--expr: hh [1/0] {12} ¦ ¦ ¦ °--SYMBOL: hh [0/0] {11} ¦ ¦ °--'}': } [1/0] {13} ¦ °--')': ) [0/0] {14} - ¦--expr: [2/0] {15} - ¦ ¦--expr: [0/0] {17} + ¦--expr: test_ [2/0] {15} + ¦ ¦--expr: test_ [0/0] {17} ¦ ¦ °--SYMBOL_FUNCTION_CALL: test_ [0/0] {16} ¦ ¦--'(': ( [0/0] {18} - ¦ ¦--expr: [0/0] {20} + ¦ ¦--expr: x [0/0] {20} ¦ ¦ °--SYMBOL: x [0/0] {19} ¦ ¦--',': , [0/2] {21} - ¦ ¦--expr: [1/0] {22} + ¦ ¦--expr: { + [1/0] {22} ¦ ¦ ¦--'{': { [0/4] {23} - ¦ ¦ ¦--expr: [1/2] {25} + ¦ ¦ ¦--expr: hh [1/2] {25} ¦ ¦ ¦ °--SYMBOL: hh [0/0] {24} ¦ ¦ °--'}': } [1/0] {26} ¦ °--')': ) [1/0] {27} ¦--COMMENT: # the [3/0] {28} ¦--COMMENT: # (cl [1/0] {29} - ¦--expr: [1/0] {30} - ¦ ¦--expr: [0/0] {32} + ¦--expr: tryCa [1/0] {30} + ¦ ¦--expr: tryCa [0/0] {32} ¦ ¦ °--SYMBOL_FUNCTION_CALL: tryCa [0/0] {31} ¦ ¦--'(': ( [0/0] {33} - ¦ ¦--expr: [0/0] {34} + ¦ ¦--expr: { + e [0/0] {34} ¦ ¦ ¦--'{': { [0/2] {35} - ¦ ¦ ¦--expr: [1/0] {36} - ¦ ¦ ¦ ¦--expr: [0/0] {38} + ¦ ¦ ¦--expr: exp(x [1/0] {36} + ¦ ¦ ¦ ¦--expr: exp [0/0] {38} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: exp [0/0] {37} ¦ ¦ ¦ ¦--'(': ( [0/0] {39} - ¦ ¦ ¦ ¦--expr: [0/0] {41} + ¦ ¦ ¦ ¦--expr: x [0/0] {41} ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {40} ¦ ¦ ¦ °--')': ) [0/0] {42} ¦ ¦ °--'}': } [1/0] {43} ¦ ¦--',': , [0/1] {44} ¦ ¦--SYMBOL_SUB: error [0/1] {45} ¦ ¦--EQ_SUB: = [0/1] {46} - ¦ ¦--expr: [0/0] {47} + ¦ ¦--expr: funct [0/0] {47} ¦ ¦ ¦--FUNCTION: funct [0/0] {48} ¦ ¦ ¦--'(': ( [0/0] {49} ¦ ¦ ¦--SYMBOL_FORMALS: x [0/0] {50} ¦ ¦ ¦--')': ) [0/1] {51} - ¦ ¦ °--expr: [0/0] {53} + ¦ ¦ °--expr: x [0/0] {53} ¦ ¦ °--SYMBOL: x [0/0] {52} ¦ °--')': ) [0/0] {54} - ¦--expr: [2/0] {55} - ¦ ¦--expr: [0/0] {57} + ¦--expr: tryCa [2/0] {55} + ¦ ¦--expr: tryCa [0/0] {57} ¦ ¦ °--SYMBOL_FUNCTION_CALL: tryCa [0/0] {56} ¦ ¦--'(': ( [0/2] {58} - ¦ ¦--expr: [1/0] {59} + ¦ ¦--expr: { + [1/0] {59} ¦ ¦ ¦--'{': { [0/4] {60} - ¦ ¦ ¦--expr: [1/2] {61} - ¦ ¦ ¦ ¦--expr: [0/0] {63} + ¦ ¦ ¦--expr: exp(x [1/2] {61} + ¦ ¦ ¦ ¦--expr: exp [0/0] {63} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: exp [0/0] {62} ¦ ¦ ¦ ¦--'(': ( [0/0] {64} - ¦ ¦ ¦ ¦--expr: [0/0] {66} + ¦ ¦ ¦ ¦--expr: x [0/0] {66} ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {65} ¦ ¦ ¦ °--')': ) [0/0] {67} ¦ ¦ °--'}': } [1/0] {68} ¦ ¦--',': , [0/2] {69} ¦ ¦--SYMBOL_SUB: error [1/1] {70} ¦ ¦--EQ_SUB: = [0/1] {71} - ¦ ¦--expr: [0/0] {72} + ¦ ¦--expr: funct [0/0] {72} ¦ ¦ ¦--FUNCTION: funct [0/0] {73} ¦ ¦ ¦--'(': ( [0/0] {74} ¦ ¦ ¦--SYMBOL_FORMALS: x [0/0] {75} ¦ ¦ ¦--')': ) [0/1] {76} - ¦ ¦ °--expr: [0/0] {78} + ¦ ¦ °--expr: x [0/0] {78} ¦ ¦ °--SYMBOL: x [0/0] {77} ¦ °--')': ) [1/0] {79} - ¦--expr: [2/0] {80} - ¦ ¦--expr: [0/0] {82} + ¦--expr: call( [2/0] {80} + ¦ ¦--expr: call [0/0] {82} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {81} ¦ ¦--'(': ( [0/0] {83} - ¦ ¦--expr: [0/0] {84} + ¦ ¦--expr: { + b [0/0] {84} ¦ ¦ ¦--'{': { [0/2] {85} - ¦ ¦ ¦--expr: [1/0] {87} + ¦ ¦ ¦--expr: blibl [1/0] {87} ¦ ¦ ¦ °--SYMBOL: blibl [0/0] {86} ¦ ¦ °--'}': } [1/0] {88} ¦ ¦--',': , [0/1] {89} - ¦ ¦--expr: [0/0] {90} + ¦ ¦--expr: { + b [0/0] {90} ¦ ¦ ¦--'{': { [0/2] {91} - ¦ ¦ ¦--expr: [1/0] {93} + ¦ ¦ ¦--expr: blubl [1/0] {93} ¦ ¦ ¦ °--SYMBOL: blubl [0/0] {92} ¦ ¦ °--'}': } [1/0] {94} ¦ °--')': ) [0/0] {95} ¦--COMMENT: # cur [2/0] {96} - ¦--expr: [1/0] {97} - ¦ ¦--expr: [0/0] {99} + ¦--expr: fio({ [1/0] {97} + ¦ ¦--expr: fio [0/0] {99} ¦ ¦ °--SYMBOL_FUNCTION_CALL: fio [0/0] {98} ¦ ¦--'(': ( [0/0] {100} - ¦ ¦--expr: [0/0] {101} + ¦ ¦--expr: {{x}} [0/0] {101} ¦ ¦ ¦--'{': { [0/0] {102} - ¦ ¦ ¦--expr: [0/0] {103} + ¦ ¦ ¦--expr: {x} [0/0] {103} ¦ ¦ ¦ ¦--'{': { [0/0] {104} - ¦ ¦ ¦ ¦--expr: [0/0] {106} + ¦ ¦ ¦ ¦--expr: x [0/0] {106} ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {105} ¦ ¦ ¦ °--'}': } [0/0] {107} ¦ ¦ °--'}': } [0/0] {108} ¦ °--')': ) [0/0] {109} - °--expr: [2/0] {110} - ¦--expr: [0/0] {112} + °--expr: test_ [2/0] {110} + ¦--expr: test_ [0/0] {112} ¦ °--SYMBOL_FUNCTION_CALL: test_ [0/0] {111} ¦--'(': ( [0/0] {113} - ¦--expr: [0/0] {115} + ¦--expr: "x" [0/0] {115} ¦ °--STR_CONST: "x" [0/0] {114} ¦--',': , [0/1] {116} - ¦--expr: [0/0] {117} + ¦--expr: {{ k [0/0] {117} ¦ ¦--'{': { [0/0] {118} - ¦ ¦--expr: [0/0] {119} + ¦ ¦--expr: { k } [0/0] {119} ¦ ¦ ¦--'{': { [0/1] {120} - ¦ ¦ ¦--expr: [0/1] {122} + ¦ ¦ ¦--expr: k [0/1] {122} ¦ ¦ ¦ °--SYMBOL: k [0/0] {121} ¦ ¦ °--'}': } [0/0] {123} ¦ °--'}': } [0/0] {124} diff --git a/tests/testthat/line_breaks_and_other/braces-fun-calls2-in_tree b/tests/testthat/line_breaks_and_other/braces-fun-calls2-in_tree index 4923c8f79..45d0ddb38 100644 --- a/tests/testthat/line_breaks_and_other/braces-fun-calls2-in_tree +++ b/tests/testthat/line_breaks_and_other/braces-fun-calls2-in_tree @@ -1,244 +1,266 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} - ¦ ¦--expr: [0/0] {3} + ¦--expr: test( [0/0] {1} + ¦ ¦--expr: test [0/0] {3} ¦ ¦ °--SYMBOL_FUNCTION_CALL: test [0/0] {2} ¦ ¦--'(': ( [0/2] {4} - ¦ ¦--expr: [1/0] {6} + ¦ ¦--expr: "x" [1/0] {6} ¦ ¦ °--STR_CONST: "x" [0/0] {5} ¦ ¦--',': , [0/2] {7} - ¦ ¦--expr: [1/0] {8} + ¦ ¦--expr: { + + [1/0] {8} ¦ ¦ ¦--'{': { [0/2] {9} ¦ ¦ °--'}': } [2/0] {10} ¦ ¦--',': , [0/1] {11} - ¦ ¦--expr: [0/0] {12} - ¦ ¦ ¦--expr: [0/1] {14} + ¦ ¦--expr: a + b [0/0] {12} + ¦ ¦ ¦--expr: a [0/1] {14} ¦ ¦ ¦ °--SYMBOL: a [0/0] {13} ¦ ¦ ¦--'+': + [0/1] {15} - ¦ ¦ °--expr: [0/0] {17} + ¦ ¦ °--expr: b [0/0] {17} ¦ ¦ °--SYMBOL: b [0/0] {16} ¦ ¦--',': , [0/1] {18} - ¦ ¦--expr: [0/0] {19} + ¦ ¦--expr: { + [0/0] {19} ¦ ¦ ¦--'{': { [0/4] {20} - ¦ ¦ ¦--expr: [1/2] {21} - ¦ ¦ ¦ ¦--expr: [0/0] {23} + ¦ ¦ ¦--expr: s(x = [1/2] {21} + ¦ ¦ ¦ ¦--expr: s [0/0] {23} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: s [0/0] {22} ¦ ¦ ¦ ¦--'(': ( [0/0] {24} ¦ ¦ ¦ ¦--SYMBOL_SUB: x [0/1] {25} ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {26} - ¦ ¦ ¦ ¦--expr: [0/0] {28} + ¦ ¦ ¦ ¦--expr: sd [0/0] {28} ¦ ¦ ¦ ¦ °--SYMBOL: sd [0/0] {27} ¦ ¦ ¦ °--')': ) [0/0] {29} ¦ ¦ °--'}': } [1/0] {30} ¦ °--')': ) [1/0] {31} - ¦--expr: [2/0] {32} - ¦ ¦--expr: [0/0] {34} + ¦--expr: test( [2/0] {32} + ¦ ¦--expr: test [0/0] {34} ¦ ¦ °--SYMBOL_FUNCTION_CALL: test [0/0] {33} ¦ ¦--'(': ( [0/2] {35} - ¦ ¦--expr: [1/0] {37} + ¦ ¦--expr: "x" [1/0] {37} ¦ ¦ °--STR_CONST: "x" [0/0] {36} ¦ ¦--',': , [0/1] {38} - ¦ ¦--expr: [0/0] {39} + ¦ ¦--expr: { + + [0/0] {39} ¦ ¦ ¦--'{': { [0/2] {40} ¦ ¦ °--'}': } [2/0] {41} ¦ ¦--',': , [0/1] {42} - ¦ ¦--expr: [0/0] {43} - ¦ ¦ ¦--expr: [0/1] {45} + ¦ ¦--expr: a + b [0/0] {43} + ¦ ¦ ¦--expr: a [0/1] {45} ¦ ¦ ¦ °--SYMBOL: a [0/0] {44} ¦ ¦ ¦--'+': + [0/1] {46} - ¦ ¦ °--expr: [0/0] {48} + ¦ ¦ °--expr: b [0/0] {48} ¦ ¦ °--SYMBOL: b [0/0] {47} ¦ ¦--',': , [0/1] {49} - ¦ ¦--expr: [0/0] {50} + ¦ ¦--expr: { + [0/0] {50} ¦ ¦ ¦--'{': { [0/4] {51} - ¦ ¦ ¦--expr: [1/2] {52} - ¦ ¦ ¦ ¦--expr: [0/0] {54} + ¦ ¦ ¦--expr: s(x = [1/2] {52} + ¦ ¦ ¦ ¦--expr: s [0/0] {54} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: s [0/0] {53} ¦ ¦ ¦ ¦--'(': ( [0/0] {55} ¦ ¦ ¦ ¦--SYMBOL_SUB: x [0/1] {56} ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {57} - ¦ ¦ ¦ ¦--expr: [0/0] {59} + ¦ ¦ ¦ ¦--expr: sd [0/0] {59} ¦ ¦ ¦ ¦ °--SYMBOL: sd [0/0] {58} ¦ ¦ ¦ °--')': ) [0/0] {60} ¦ ¦ °--'}': } [1/0] {61} ¦ °--')': ) [1/0] {62} - ¦--expr: [2/0] {63} - ¦ ¦--expr: [0/0] {65} + ¦--expr: test( [2/0] {63} + ¦ ¦--expr: test [0/0] {65} ¦ ¦ °--SYMBOL_FUNCTION_CALL: test [0/0] {64} ¦ ¦--'(': ( [0/2] {66} - ¦ ¦--expr: [1/0] {68} + ¦ ¦--expr: "x" [1/0] {68} ¦ ¦ °--STR_CONST: "x" [0/0] {67} ¦ ¦--',': , [0/2] {69} - ¦ ¦--expr: [1/0] {70} + ¦ ¦--expr: { + + [1/0] {70} ¦ ¦ ¦--'{': { [0/2] {71} ¦ ¦ °--'}': } [2/0] {72} ¦ ¦--',': , [0/2] {73} - ¦ ¦--expr: [1/0] {74} - ¦ ¦ ¦--expr: [0/1] {76} + ¦ ¦--expr: a + b [1/0] {74} + ¦ ¦ ¦--expr: a [0/1] {76} ¦ ¦ ¦ °--SYMBOL: a [0/0] {75} ¦ ¦ ¦--'+': + [0/1] {77} - ¦ ¦ °--expr: [0/0] {79} + ¦ ¦ °--expr: b [0/0] {79} ¦ ¦ °--SYMBOL: b [0/0] {78} ¦ ¦--',': , [0/1] {80} - ¦ ¦--expr: [0/0] {81} + ¦ ¦--expr: { + [0/0] {81} ¦ ¦ ¦--'{': { [0/4] {82} - ¦ ¦ ¦--expr: [1/2] {83} - ¦ ¦ ¦ ¦--expr: [0/0] {85} + ¦ ¦ ¦--expr: s(x = [1/2] {83} + ¦ ¦ ¦ ¦--expr: s [0/0] {85} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: s [0/0] {84} ¦ ¦ ¦ ¦--'(': ( [0/0] {86} ¦ ¦ ¦ ¦--SYMBOL_SUB: x [0/1] {87} ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {88} - ¦ ¦ ¦ ¦--expr: [0/0] {90} + ¦ ¦ ¦ ¦--expr: sd [0/0] {90} ¦ ¦ ¦ ¦ °--SYMBOL: sd [0/0] {89} ¦ ¦ ¦ °--')': ) [0/0] {91} ¦ ¦ °--'}': } [1/0] {92} ¦ °--')': ) [1/0] {93} - ¦--expr: [3/0] {94} - ¦ ¦--expr: [0/0] {96} + ¦--expr: test( [3/0] {94} + ¦ ¦--expr: test [0/0] {96} ¦ ¦ °--SYMBOL_FUNCTION_CALL: test [0/0] {95} ¦ ¦--'(': ( [0/2] {97} - ¦ ¦--expr: [1/0] {99} + ¦ ¦--expr: "x" [1/0] {99} ¦ ¦ °--STR_CONST: "x" [0/0] {98} ¦ ¦--',': , [0/2] {100} - ¦ ¦--expr: [1/0] {101} + ¦ ¦--expr: { + + [1/0] {101} ¦ ¦ ¦--'{': { [0/2] {102} ¦ ¦ °--'}': } [2/0] {103} ¦ ¦--',': , [0/2] {104} - ¦ ¦--expr: [1/0] {105} - ¦ ¦ ¦--expr: [0/1] {107} + ¦ ¦--expr: a + b [1/0] {105} + ¦ ¦ ¦--expr: a [0/1] {107} ¦ ¦ ¦ °--SYMBOL: a [0/0] {106} ¦ ¦ ¦--'+': + [0/1] {108} - ¦ ¦ °--expr: [0/0] {110} + ¦ ¦ °--expr: b [0/0] {110} ¦ ¦ °--SYMBOL: b [0/0] {109} ¦ ¦--',': , [0/2] {111} - ¦ ¦--expr: [1/0] {112} + ¦ ¦--expr: { + [1/0] {112} ¦ ¦ ¦--'{': { [0/4] {113} - ¦ ¦ ¦--expr: [1/2] {114} - ¦ ¦ ¦ ¦--expr: [0/0] {116} + ¦ ¦ ¦--expr: s(x = [1/2] {114} + ¦ ¦ ¦ ¦--expr: s [0/0] {116} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: s [0/0] {115} ¦ ¦ ¦ ¦--'(': ( [0/0] {117} ¦ ¦ ¦ ¦--SYMBOL_SUB: x [0/1] {118} ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {119} - ¦ ¦ ¦ ¦--expr: [0/0] {121} + ¦ ¦ ¦ ¦--expr: sd [0/0] {121} ¦ ¦ ¦ ¦ °--SYMBOL: sd [0/0] {120} ¦ ¦ ¦ °--')': ) [0/0] {122} ¦ ¦ °--'}': } [1/0] {123} ¦ °--')': ) [1/0] {124} - ¦--expr: [2/0] {125} - ¦ ¦--expr: [0/0] {127} + ¦--expr: test( [2/0] {125} + ¦ ¦--expr: test [0/0] {127} ¦ ¦ °--SYMBOL_FUNCTION_CALL: test [0/0] {126} ¦ ¦--'(': ( [0/2] {128} - ¦ ¦--expr: [1/0] {130} + ¦ ¦--expr: "x" [1/0] {130} ¦ ¦ °--STR_CONST: "x" [0/0] {129} ¦ ¦--',': , [0/2] {131} - ¦ ¦--expr: [1/0] {132} + ¦ ¦--expr: { + + [1/0] {132} ¦ ¦ ¦--'{': { [0/2] {133} ¦ ¦ °--'}': } [2/0] {134} ¦ ¦--',': , [0/1] {135} ¦ ¦--COMMENT: # h [0/2] {136} - ¦ ¦--expr: [1/0] {137} - ¦ ¦ ¦--expr: [0/1] {139} + ¦ ¦--expr: a + b [1/0] {137} + ¦ ¦ ¦--expr: a [0/1] {139} ¦ ¦ ¦ °--SYMBOL: a [0/0] {138} ¦ ¦ ¦--'+': + [0/1] {140} - ¦ ¦ °--expr: [0/0] {142} + ¦ ¦ °--expr: b [0/0] {142} ¦ ¦ °--SYMBOL: b [0/0] {141} ¦ ¦--',': , [0/1] {143} - ¦ ¦--expr: [0/0] {144} + ¦ ¦--expr: { + [0/0] {144} ¦ ¦ ¦--'{': { [0/4] {145} - ¦ ¦ ¦--expr: [1/2] {146} - ¦ ¦ ¦ ¦--expr: [0/0] {148} + ¦ ¦ ¦--expr: s(x = [1/2] {146} + ¦ ¦ ¦ ¦--expr: s [0/0] {148} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: s [0/0] {147} ¦ ¦ ¦ ¦--'(': ( [0/0] {149} ¦ ¦ ¦ ¦--SYMBOL_SUB: x [0/1] {150} ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {151} - ¦ ¦ ¦ ¦--expr: [0/0] {153} + ¦ ¦ ¦ ¦--expr: sd [0/0] {153} ¦ ¦ ¦ ¦ °--SYMBOL: sd [0/0] {152} ¦ ¦ ¦ °--')': ) [0/0] {154} ¦ ¦ °--'}': } [1/0] {155} ¦ °--')': ) [1/0] {156} - ¦--expr: [2/0] {157} - ¦ ¦--expr: [0/0] {159} + ¦--expr: test( [2/0] {157} + ¦ ¦--expr: test [0/0] {159} ¦ ¦ °--SYMBOL_FUNCTION_CALL: test [0/0] {158} ¦ ¦--'(': ( [0/2] {160} - ¦ ¦--expr: [1/0] {162} + ¦ ¦--expr: "x" [1/0] {162} ¦ ¦ °--STR_CONST: "x" [0/0] {161} ¦ ¦--',': , [0/2] {163} - ¦ ¦--expr: [1/0] {164} + ¦ ¦--expr: { + + [1/0] {164} ¦ ¦ ¦--'{': { [0/2] {165} ¦ ¦ °--'}': } [2/0] {166} ¦ ¦--',': , [0/1] {167} ¦ ¦--COMMENT: # h [0/2] {168} - ¦ ¦--expr: [1/0] {169} - ¦ ¦ ¦--expr: [0/1] {171} + ¦ ¦--expr: a + b [1/0] {169} + ¦ ¦ ¦--expr: a [0/1] {171} ¦ ¦ ¦ °--SYMBOL: a [0/0] {170} ¦ ¦ ¦--'+': + [0/1] {172} - ¦ ¦ °--expr: [0/0] {174} + ¦ ¦ °--expr: b [0/0] {174} ¦ ¦ °--SYMBOL: b [0/0] {173} ¦ ¦--',': , [0/2] {175} ¦ ¦--COMMENT: # k [1/2] {176} - ¦ ¦--expr: [1/0] {177} + ¦ ¦--expr: { + [1/0] {177} ¦ ¦ ¦--'{': { [0/4] {178} - ¦ ¦ ¦--expr: [1/2] {179} - ¦ ¦ ¦ ¦--expr: [0/0] {181} + ¦ ¦ ¦--expr: s(x = [1/2] {179} + ¦ ¦ ¦ ¦--expr: s [0/0] {181} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: s [0/0] {180} ¦ ¦ ¦ ¦--'(': ( [0/0] {182} ¦ ¦ ¦ ¦--SYMBOL_SUB: x [0/1] {183} ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {184} - ¦ ¦ ¦ ¦--expr: [0/0] {186} + ¦ ¦ ¦ ¦--expr: sd [0/0] {186} ¦ ¦ ¦ ¦ °--SYMBOL: sd [0/0] {185} ¦ ¦ ¦ °--')': ) [0/0] {187} ¦ ¦ °--'}': } [1/0] {188} ¦ °--')': ) [1/0] {189} - ¦--expr: [2/0] {190} - ¦ ¦--expr: [0/0] {192} + ¦--expr: test( [2/0] {190} + ¦ ¦--expr: test [0/0] {192} ¦ ¦ °--SYMBOL_FUNCTION_CALL: test [0/0] {191} ¦ ¦--'(': ( [0/2] {193} - ¦ ¦--expr: [1/0] {195} + ¦ ¦--expr: "x" [1/0] {195} ¦ ¦ °--STR_CONST: "x" [0/0] {194} ¦ ¦--',': , [0/2] {196} - ¦ ¦--expr: [1/0] {197} + ¦ ¦--expr: { + + [1/0] {197} ¦ ¦ ¦--'{': { [0/2] {198} ¦ ¦ °--'}': } [2/0] {199} ¦ ¦--',': , [0/2] {200} - ¦ ¦--expr: [1/0] {201} - ¦ ¦ ¦--expr: [0/1] {203} + ¦ ¦--expr: a + b [1/0] {201} + ¦ ¦ ¦--expr: a [0/1] {203} ¦ ¦ ¦ °--SYMBOL: a [0/0] {202} ¦ ¦ ¦--'+': + [0/1] {204} - ¦ ¦ °--expr: [0/0] {206} + ¦ ¦ °--expr: b [0/0] {206} ¦ ¦ °--SYMBOL: b [0/0] {205} ¦ ¦--',': , [0/2] {207} ¦ ¦--COMMENT: # k [0/2] {208} - ¦ ¦--expr: [1/0] {209} + ¦ ¦--expr: { + [1/0] {209} ¦ ¦ ¦--'{': { [0/4] {210} - ¦ ¦ ¦--expr: [1/2] {211} - ¦ ¦ ¦ ¦--expr: [0/0] {213} + ¦ ¦ ¦--expr: s(x = [1/2] {211} + ¦ ¦ ¦ ¦--expr: s [0/0] {213} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: s [0/0] {212} ¦ ¦ ¦ ¦--'(': ( [0/0] {214} ¦ ¦ ¦ ¦--SYMBOL_SUB: x [0/1] {215} ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {216} - ¦ ¦ ¦ ¦--expr: [0/0] {218} + ¦ ¦ ¦ ¦--expr: sd [0/0] {218} ¦ ¦ ¦ ¦ °--SYMBOL: sd [0/0] {217} ¦ ¦ ¦ °--')': ) [0/0] {219} ¦ ¦ °--'}': } [1/0] {220} ¦ °--')': ) [1/0] {221} - °--expr: [2/0] {222} - ¦--expr: [0/0] {224} + °--expr: tetst [2/0] {222} + ¦--expr: tetst [0/0] {224} ¦ °--SYMBOL_FUNCTION_CALL: tetst [0/0] {223} ¦--'(': ( [0/2] {225} - ¦--expr: [1/0] {227} + ¦--expr: "x" [1/0] {227} ¦ °--STR_CONST: "x" [0/0] {226} ¦--',': , [0/2] {228} - ¦--expr: [1/0] {229} + ¦--expr: { + [1/0] {229} ¦ ¦--'{': { [0/4] {230} - ¦ ¦--expr: [1/2] {232} + ¦ ¦--expr: x [1/2] {232} ¦ ¦ °--SYMBOL: x [0/0] {231} ¦ °--'}': } [1/0] {233} ¦--',': , [0/1] {234} - ¦--expr: [0/0] {235} - ¦ ¦--expr: [0/1] {237} + ¦--expr: 1 + + [0/0] {235} + ¦ ¦--expr: 1 [0/1] {237} ¦ ¦ °--NUM_CONST: 1 [0/0] {236} ¦ ¦--'+': + [0/1] {238} - ¦ °--expr: [0/0] {239} + ¦ °--expr: +1 [0/0] {239} ¦ ¦--'+': + [0/0] {240} - ¦ °--expr: [0/0] {242} + ¦ °--expr: 1 [0/0] {242} ¦ °--NUM_CONST: 1 [0/0] {241} °--')': ) [1/0] {243} diff --git a/tests/testthat/line_breaks_and_other/comma-in_tree b/tests/testthat/line_breaks_and_other/comma-in_tree index 931125253..92771fe7c 100644 --- a/tests/testthat/line_breaks_and_other/comma-in_tree +++ b/tests/testthat/line_breaks_and_other/comma-in_tree @@ -1,97 +1,97 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} - ¦ ¦--expr: [0/0] {3} + ¦--expr: call( [0/0] {1} + ¦ ¦--expr: call [0/0] {3} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {2} ¦ ¦--'(': ( [0/0] {4} - ¦ ¦--expr: [0/0] {6} + ¦ ¦--expr: a [0/0] {6} ¦ ¦ °--SYMBOL: a [0/0] {5} ¦ ¦--',': , [0/5] {7} - ¦ ¦--expr: [1/5] {9} + ¦ ¦--expr: b [1/5] {9} ¦ ¦ °--SYMBOL: b [0/0] {8} ¦ ¦--',': , [1/1] {10} - ¦ ¦--expr: [0/0] {12} + ¦ ¦--expr: c [0/0] {12} ¦ ¦ °--SYMBOL: c [0/0] {11} ¦ °--')': ) [0/0] {13} - ¦--expr: [2/0] {14} - ¦ ¦--expr: [0/0] {16} + ¦--expr: call( [2/0] {14} + ¦ ¦--expr: call [0/0] {16} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {15} ¦ ¦--'(': ( [0/0] {17} - ¦ ¦--expr: [0/0] {19} + ¦ ¦--expr: a [0/0] {19} ¦ ¦ °--SYMBOL: a [0/0] {18} ¦ ¦--',': , [0/1] {20} - ¦ ¦--expr: [0/5] {22} + ¦ ¦--expr: b [0/5] {22} ¦ ¦ °--SYMBOL: b [0/0] {21} ¦ ¦--',': , [1/5] {23} - ¦ ¦--expr: [1/0] {25} + ¦ ¦--expr: c [1/0] {25} ¦ ¦ °--SYMBOL: c [0/0] {24} ¦ °--')': ) [0/0] {26} - ¦--expr: [2/0] {27} - ¦ ¦--expr: [0/0] {29} + ¦--expr: call( [2/0] {27} + ¦ ¦--expr: call [0/0] {29} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {28} ¦ ¦--'(': ( [0/0] {30} - ¦ ¦--expr: [0/0] {32} + ¦ ¦--expr: a [0/0] {32} ¦ ¦ °--SYMBOL: a [0/0] {31} ¦ ¦--',': , [0/0] {33} ¦ °--')': ) [0/0] {34} - ¦--expr: [1/0] {35} - ¦ ¦--expr: [0/0] {37} + ¦--expr: call( [1/0] {35} + ¦ ¦--expr: call [0/0] {37} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {36} ¦ ¦--'(': ( [0/0] {38} - ¦ ¦--expr: [0/0] {40} + ¦ ¦--expr: a [0/0] {40} ¦ ¦ °--SYMBOL: a [0/0] {39} ¦ ¦--',': , [0/0] {41} ¦ °--')': ) [1/0] {42} - ¦--expr: [2/0] {43} - ¦ ¦--expr: [0/0] {45} + ¦--expr: call( [2/0] {43} + ¦ ¦--expr: call [0/0] {45} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {44} ¦ ¦--'(': ( [0/0] {46} - ¦ ¦--expr: [0/5] {48} + ¦ ¦--expr: a [0/5] {48} ¦ ¦ °--SYMBOL: a [0/0] {47} ¦ ¦--',': , [1/0] {49} ¦ °--')': ) [0/0] {50} - °--expr: [2/0] {51} - ¦--expr: [0/1] {53} + °--expr: mpg % [2/0] {51} + ¦--expr: mpg [0/1] {53} ¦ °--SYMBOL: mpg [0/0] {52} ¦--SPECIAL-PIPE: %>% [0/4] {54} - °--expr: [1/0] {55} - ¦--expr: [0/0] {57} + °--expr: summa [1/0] {55} + ¦--expr: summa [0/0] {57} ¦ °--SYMBOL_FUNCTION_CALL: summa [0/0] {56} ¦--'(': ( [0/0] {58} ¦--SYMBOL_SUB: avg_c [0/1] {59} ¦--EQ_SUB: = [0/1] {60} - ¦--expr: [0/0] {61} - ¦ ¦--expr: [0/0] {63} + ¦--expr: mean( [0/0] {61} + ¦ ¦--expr: mean [0/0] {63} ¦ ¦ °--SYMBOL_FUNCTION_CALL: mean [0/0] {62} ¦ ¦--'(': ( [0/0] {64} - ¦ ¦--expr: [0/0] {66} + ¦ ¦--expr: cty [0/0] {66} ¦ ¦ °--SYMBOL: cty [0/0] {65} ¦ °--')': ) [0/0] {67} ¦--',': , [1/1] {68} ¦--SYMBOL_SUB: avg_h [0/1] {69} ¦--EQ_SUB: = [0/1] {70} - ¦--expr: [0/0] {71} - ¦ ¦--expr: [0/0] {73} + ¦--expr: mean( [0/0] {71} + ¦ ¦--expr: mean [0/0] {73} ¦ ¦ °--SYMBOL_FUNCTION_CALL: mean [0/0] {72} ¦ ¦--'(': ( [0/0] {74} - ¦ ¦--expr: [0/0] {76} + ¦ ¦--expr: hwy [0/0] {76} ¦ ¦ °--SYMBOL: hwy [0/0] {75} ¦ °--')': ) [0/0] {77} ¦--',': , [1/1] {78} ¦--SYMBOL_SUB: n [0/1] {79} ¦--EQ_SUB: = [0/1] {80} - ¦--expr: [0/0] {81} - ¦ ¦--expr: [0/0] {83} + ¦--expr: n() [0/0] {81} + ¦ ¦--expr: n [0/0] {83} ¦ ¦ °--SYMBOL_FUNCTION_CALL: n [0/0] {82} ¦ ¦--'(': ( [0/0] {84} ¦ °--')': ) [0/0] {85} ¦--',': , [1/1] {86} ¦--SYMBOL_SUB: n_cla [0/1] {87} ¦--EQ_SUB: = [0/1] {88} - ¦--expr: [0/0] {89} - ¦ ¦--expr: [0/0] {91} + ¦--expr: n_dis [0/0] {89} + ¦ ¦--expr: n_dis [0/0] {91} ¦ ¦ °--SYMBOL_FUNCTION_CALL: n_dis [0/0] {90} ¦ ¦--'(': ( [0/0] {92} - ¦ ¦--expr: [0/0] {94} + ¦ ¦--expr: class [0/0] {94} ¦ ¦ °--SYMBOL: class [0/0] {93} ¦ °--')': ) [0/0] {95} °--')': ) [0/0] {96} diff --git a/tests/testthat/line_breaks_and_other/curly-in_tree b/tests/testthat/line_breaks_and_other/curly-in_tree index 6ee2720ba..5ebdd6ffb 100644 --- a/tests/testthat/line_breaks_and_other/curly-in_tree +++ b/tests/testthat/line_breaks_and_other/curly-in_tree @@ -1,112 +1,119 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--COMMENT: # { n [0/0] {1} - ¦--expr: [1/0] {2} + ¦--expr: if (y [1/0] {2} ¦ ¦--IF: if [0/1] {3} ¦ ¦--'(': ( [0/0] {4} - ¦ ¦--expr: [0/0] {5} - ¦ ¦ ¦--expr: [0/1] {7} + ¦ ¦--expr: y == [0/0] {5} + ¦ ¦ ¦--expr: y [0/1] {7} ¦ ¦ ¦ °--SYMBOL: y [0/0] {6} ¦ ¦ ¦--EQ: == [0/1] {8} - ¦ ¦ °--expr: [0/0] {10} + ¦ ¦ °--expr: 0 [0/0] {10} ¦ ¦ °--NUM_CONST: 0 [0/0] {9} ¦ ¦--')': ) [0/0] {11} - ¦ ¦--expr: [1/1] {12} + ¦ ¦--expr: { + 1 [1/1] {12} ¦ ¦ ¦--'{': { [0/2] {13} - ¦ ¦ ¦--expr: [1/0] {15} + ¦ ¦ ¦--expr: 1 [1/0] {15} ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {14} ¦ ¦ °--'}': } [1/0] {16} ¦ ¦--ELSE: else [0/1] {17} - ¦ °--expr: [0/0] {18} + ¦ °--expr: { + 2 [0/0] {18} ¦ ¦--'{': { [0/2] {19} - ¦ ¦--expr: [1/0] {21} + ¦ ¦--expr: 2 [1/0] {21} ¦ ¦ °--NUM_CONST: 2 [0/0] {20} ¦ °--'}': } [1/0] {22} - ¦--expr: [2/0] {23} - ¦ ¦--expr: [0/0] {25} + ¦--expr: test_ [2/0] {23} + ¦ ¦--expr: test_ [0/0] {25} ¦ ¦ °--SYMBOL_FUNCTION_CALL: test_ [0/0] {24} ¦ ¦--'(': ( [0/0] {26} - ¦ ¦--expr: [0/0] {28} + ¦ ¦--expr: "I am [0/0] {28} ¦ ¦ °--STR_CONST: "I am [0/0] {27} ¦ ¦--',': , [0/10] {29} - ¦ ¦--expr: [1/0] {30} + ¦ ¦--expr: { + [1/0] {30} ¦ ¦ ¦--'{': { [0/12] {31} - ¦ ¦ ¦--expr: [1/10] {32} - ¦ ¦ ¦ ¦--expr: [0/0] {34} + ¦ ¦ ¦--expr: a_tes [1/10] {32} + ¦ ¦ ¦ ¦--expr: a_tes [0/0] {34} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: a_tes [0/0] {33} ¦ ¦ ¦ ¦--'(': ( [0/0] {35} - ¦ ¦ ¦ ¦--expr: [0/0] {37} + ¦ ¦ ¦ ¦--expr: x [0/0] {37} ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {36} ¦ ¦ ¦ °--')': ) [0/0] {38} ¦ ¦ °--'}': } [1/0] {39} ¦ °--')': ) [0/0] {40} ¦--COMMENT: # A { [3/0] {41} - ¦--expr: [1/0] {42} + ¦--expr: if (x [1/0] {42} ¦ ¦--IF: if [0/1] {43} ¦ ¦--'(': ( [0/0] {44} - ¦ ¦--expr: [0/0] {45} - ¦ ¦ ¦--expr: [0/1] {47} + ¦ ¦--expr: x > 3 [0/0] {45} + ¦ ¦ ¦--expr: x [0/1] {47} ¦ ¦ ¦ °--SYMBOL: x [0/0] {46} ¦ ¦ ¦--GT: > [0/1] {48} - ¦ ¦ °--expr: [0/0] {50} + ¦ ¦ °--expr: 3 [0/0] {50} ¦ ¦ °--NUM_CONST: 3 [0/0] {49} ¦ ¦--')': ) [0/1] {51} - ¦ °--expr: [0/0] {52} + ¦ °--expr: { "x" [0/0] {52} ¦ ¦--'{': { [0/1] {53} - ¦ ¦--expr: [0/0] {55} + ¦ ¦--expr: "x" [0/0] {55} ¦ ¦ °--STR_CONST: "x" [0/0] {54} ¦ °--'}': } [1/0] {56} ¦--COMMENT: # A } [2/0] {57} - ¦--expr: [1/0] {58} + ¦--expr: if (x [1/0] {58} ¦ ¦--IF: if [0/1] {59} ¦ ¦--'(': ( [0/0] {60} - ¦ ¦--expr: [0/0] {61} - ¦ ¦ ¦--expr: [0/1] {63} + ¦ ¦--expr: x > 3 [0/0] {61} + ¦ ¦ ¦--expr: x [0/1] {63} ¦ ¦ ¦ °--SYMBOL: x [0/0] {62} ¦ ¦ ¦--GT: > [0/1] {64} - ¦ ¦ °--expr: [0/0] {66} + ¦ ¦ °--expr: 3 [0/0] {66} ¦ ¦ °--NUM_CONST: 3 [0/0] {65} ¦ ¦--')': ) [0/1] {67} - ¦ °--expr: [0/0] {68} + ¦ °--expr: { + " [0/0] {68} ¦ ¦--'{': { [0/2] {69} - ¦ ¦--expr: [1/0] {71} + ¦ ¦--expr: "x" [1/0] {71} ¦ ¦ °--STR_CONST: "x" [0/0] {70} ¦ °--'}': } [0/0] {72} ¦--COMMENT: # ELS [2/0] {73} - ¦--expr: [1/0] {74} + ¦--expr: if (1 [1/0] {74} ¦ ¦--IF: if [0/1] {75} ¦ ¦--'(': ( [0/0] {76} - ¦ ¦--expr: [0/0] {77} - ¦ ¦ ¦--expr: [0/1] {79} + ¦ ¦--expr: 1 > 3 [0/0] {77} + ¦ ¦ ¦--expr: 1 [0/1] {79} ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {78} ¦ ¦ ¦--GT: > [0/1] {80} - ¦ ¦ °--expr: [0/0] {82} + ¦ ¦ °--expr: 3 [0/0] {82} ¦ ¦ °--NUM_CONST: 3 [0/0] {81} ¦ ¦--')': ) [0/1] {83} - ¦ ¦--expr: [0/1] {84} + ¦ ¦--expr: { + " [0/1] {84} ¦ ¦ ¦--'{': { [0/2] {85} - ¦ ¦ ¦--expr: [1/0] {87} + ¦ ¦ ¦--expr: "x" [1/0] {87} ¦ ¦ ¦ °--STR_CONST: "x" [0/0] {86} ¦ ¦ °--'}': } [1/0] {88} ¦ ¦--ELSE: else [0/1] {89} - ¦ °--expr: [0/0] {90} + ¦ °--expr: { + " [0/0] {90} ¦ ¦--'{': { [0/2] {91} - ¦ ¦--expr: [1/0] {93} + ¦ ¦--expr: "y" [1/0] {93} ¦ ¦ °--STR_CONST: "y" [0/0] {92} ¦ °--'}': } [1/0] {94} - °--expr: [2/0] {95} - ¦--expr: [0/0] {97} + °--expr: test_ [2/0] {95} + ¦--expr: test_ [0/0] {97} ¦ °--SYMBOL_FUNCTION_CALL: test_ [0/0] {96} ¦--'(': ( [0/0] {98} - ¦--expr: [0/0] {100} + ¦--expr: "I am [0/0] {100} ¦ °--STR_CONST: "I am [0/0] {99} ¦--',': , [0/1] {101} - ¦--expr: [0/0] {102} + ¦--expr: { + a [0/0] {102} ¦ ¦--'{': { [0/2] {103} - ¦ ¦--expr: [1/0] {104} - ¦ ¦ ¦--expr: [0/0] {106} + ¦ ¦--expr: a_tes [1/0] {104} + ¦ ¦ ¦--expr: a_tes [0/0] {106} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: a_tes [0/0] {105} ¦ ¦ ¦--'(': ( [0/0] {107} - ¦ ¦ ¦--expr: [0/0] {109} + ¦ ¦ ¦--expr: x [0/0] {109} ¦ ¦ ¦ °--SYMBOL: x [0/0] {108} ¦ ¦ °--')': ) [0/0] {110} ¦ °--'}': } [1/0] {111} diff --git a/tests/testthat/line_breaks_and_other/edge_comment_and_curly-in_tree b/tests/testthat/line_breaks_and_other/edge_comment_and_curly-in_tree index e6bcca9e6..46de8acd2 100644 --- a/tests/testthat/line_breaks_and_other/edge_comment_and_curly-in_tree +++ b/tests/testthat/line_breaks_and_other/edge_comment_and_curly-in_tree @@ -1,16 +1,17 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: [0/0] {1} - ¦--expr: [0/1] {3} + °--expr: a <- [0/0] {1} + ¦--expr: a [0/1] {3} ¦ °--SYMBOL: a [0/0] {2} ¦--LEFT_ASSIGN: <- [0/1] {4} - °--expr: [0/0] {5} + °--expr: funct [0/0] {5} ¦--FUNCTION: funct [0/0] {6} ¦--'(': ( [0/0] {7} ¦--SYMBOL_FORMALS: x [0/0] {8} ¦--')': ) [0/1] {9} ¦--COMMENT: # thi [0/0] {10} - °--expr: [1/0] {11} + °--expr: { + x [1/0] {11} ¦--'{': { [0/2] {12} - ¦--expr: [1/0] {14} + ¦--expr: x [1/0] {14} ¦ °--SYMBOL: x [0/0] {13} °--'}': } [1/0] {15} diff --git a/tests/testthat/line_breaks_and_other/ggplot2-in_tree b/tests/testthat/line_breaks_and_other/ggplot2-in_tree index 18ff38b32..da244db23 100644 --- a/tests/testthat/line_breaks_and_other/ggplot2-in_tree +++ b/tests/testthat/line_breaks_and_other/ggplot2-in_tree @@ -1,367 +1,367 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--COMMENT: # don [0/0] {1} - ¦--expr: [1/0] {2} - ¦ ¦--expr: [0/1] {3} - ¦ ¦ ¦--expr: [0/0] {5} + ¦--expr: ggplo [1/0] {2} + ¦ ¦--expr: ggplo [0/1] {3} + ¦ ¦ ¦--expr: ggplo [0/0] {5} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: ggplo [0/0] {4} ¦ ¦ ¦--'(': ( [0/0] {6} ¦ ¦ ¦--SYMBOL_SUB: data [0/1] {7} ¦ ¦ ¦--EQ_SUB: = [0/1] {8} - ¦ ¦ ¦--expr: [0/0] {10} + ¦ ¦ ¦--expr: mtcar [0/0] {10} ¦ ¦ ¦ °--SYMBOL: mtcar [0/0] {9} ¦ ¦ ¦--',': , [0/1] {11} ¦ ¦ ¦--SYMBOL_SUB: mappi [0/1] {12} ¦ ¦ ¦--EQ_SUB: = [0/1] {13} - ¦ ¦ ¦--expr: [0/0] {14} - ¦ ¦ ¦ ¦--expr: [0/0] {16} + ¦ ¦ ¦--expr: aes(x [0/0] {14} + ¦ ¦ ¦ ¦--expr: aes [0/0] {16} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: aes [0/0] {15} ¦ ¦ ¦ ¦--'(': ( [0/0] {17} ¦ ¦ ¦ ¦--SYMBOL_SUB: x [0/1] {18} ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {19} - ¦ ¦ ¦ ¦--expr: [0/0] {21} + ¦ ¦ ¦ ¦--expr: mpg [0/0] {21} ¦ ¦ ¦ ¦ °--SYMBOL: mpg [0/0] {20} ¦ ¦ ¦ ¦--',': , [0/1] {22} ¦ ¦ ¦ ¦--SYMBOL_SUB: y [0/1] {23} ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {24} - ¦ ¦ ¦ ¦--expr: [0/0] {26} + ¦ ¦ ¦ ¦--expr: vs [0/0] {26} ¦ ¦ ¦ ¦ °--SYMBOL: vs [0/0] {25} ¦ ¦ ¦ °--')': ) [0/0] {27} ¦ ¦ °--')': ) [0/0] {28} ¦ ¦--'+': + [0/2] {29} - ¦ °--expr: [1/0] {30} - ¦ ¦--expr: [0/0] {32} + ¦ °--expr: geom_ [1/0] {30} + ¦ ¦--expr: geom_ [0/0] {32} ¦ ¦ °--SYMBOL_FUNCTION_CALL: geom_ [0/0] {31} ¦ ¦--'(': ( [0/0] {33} ¦ °--')': ) [0/0] {34} ¦--COMMENT: # add [3/0] {35} - ¦--expr: [1/0] {36} - ¦ ¦--expr: [0/1] {37} - ¦ ¦ ¦--expr: [0/0] {39} + ¦--expr: ggplo [1/0] {36} + ¦ ¦--expr: ggplo [0/1] {37} + ¦ ¦ ¦--expr: ggplo [0/0] {39} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: ggplo [0/0] {38} ¦ ¦ ¦--'(': ( [0/0] {40} ¦ ¦ ¦--SYMBOL_SUB: data [0/1] {41} ¦ ¦ ¦--EQ_SUB: = [0/1] {42} - ¦ ¦ ¦--expr: [0/0] {44} + ¦ ¦ ¦--expr: mtcar [0/0] {44} ¦ ¦ ¦ °--SYMBOL: mtcar [0/0] {43} ¦ ¦ ¦--',': , [0/1] {45} ¦ ¦ ¦--SYMBOL_SUB: mappi [0/1] {46} ¦ ¦ ¦--EQ_SUB: = [0/1] {47} - ¦ ¦ ¦--expr: [0/0] {48} - ¦ ¦ ¦ ¦--expr: [0/0] {50} + ¦ ¦ ¦--expr: aes(x [0/0] {48} + ¦ ¦ ¦ ¦--expr: aes [0/0] {50} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: aes [0/0] {49} ¦ ¦ ¦ ¦--'(': ( [0/0] {51} ¦ ¦ ¦ ¦--SYMBOL_SUB: x [0/1] {52} ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {53} - ¦ ¦ ¦ ¦--expr: [0/0] {55} + ¦ ¦ ¦ ¦--expr: mpg [0/0] {55} ¦ ¦ ¦ ¦ °--SYMBOL: mpg [0/0] {54} ¦ ¦ ¦ ¦--',': , [0/1] {56} ¦ ¦ ¦ ¦--SYMBOL_SUB: y [0/1] {57} ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {58} - ¦ ¦ ¦ ¦--expr: [0/0] {60} + ¦ ¦ ¦ ¦--expr: vs [0/0] {60} ¦ ¦ ¦ ¦ °--SYMBOL: vs [0/0] {59} ¦ ¦ ¦ °--')': ) [0/0] {61} ¦ ¦ °--')': ) [0/0] {62} ¦ ¦--'+': + [0/1] {63} - ¦ °--expr: [0/0] {64} - ¦ ¦--expr: [0/0] {66} + ¦ °--expr: geom_ [0/0] {64} + ¦ ¦--expr: geom_ [0/0] {66} ¦ ¦ °--SYMBOL_FUNCTION_CALL: geom_ [0/0] {65} ¦ ¦--'(': ( [0/0] {67} ¦ °--')': ) [0/0] {68} ¦--COMMENT: # add [3/0] {69} - ¦--expr: [1/0] {70} - ¦ ¦--expr: [0/1] {71} - ¦ ¦ ¦--expr: [0/0] {72} + ¦--expr: ggplo [1/0] {70} + ¦ ¦--expr: ggplo [0/1] {71} + ¦ ¦ ¦--expr: ggplo [0/0] {72} ¦ ¦ ¦ ¦--SYMBOL_PACKAGE: ggplo [0/0] {73} ¦ ¦ ¦ ¦--NS_GET: :: [0/0] {74} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: ggplo [0/0] {75} ¦ ¦ ¦--'(': ( [0/0] {76} ¦ ¦ ¦--SYMBOL_SUB: data [0/1] {77} ¦ ¦ ¦--EQ_SUB: = [0/1] {78} - ¦ ¦ ¦--expr: [0/0] {80} + ¦ ¦ ¦--expr: mtcar [0/0] {80} ¦ ¦ ¦ °--SYMBOL: mtcar [0/0] {79} ¦ ¦ ¦--',': , [0/1] {81} ¦ ¦ ¦--SYMBOL_SUB: mappi [0/1] {82} ¦ ¦ ¦--EQ_SUB: = [0/1] {83} - ¦ ¦ ¦--expr: [0/0] {84} - ¦ ¦ ¦ ¦--expr: [0/0] {86} + ¦ ¦ ¦--expr: aes(x [0/0] {84} + ¦ ¦ ¦ ¦--expr: aes [0/0] {86} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: aes [0/0] {85} ¦ ¦ ¦ ¦--'(': ( [0/0] {87} ¦ ¦ ¦ ¦--SYMBOL_SUB: x [0/1] {88} ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {89} - ¦ ¦ ¦ ¦--expr: [0/0] {91} + ¦ ¦ ¦ ¦--expr: mpg [0/0] {91} ¦ ¦ ¦ ¦ °--SYMBOL: mpg [0/0] {90} ¦ ¦ ¦ ¦--',': , [0/1] {92} ¦ ¦ ¦ ¦--SYMBOL_SUB: y [0/1] {93} ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {94} - ¦ ¦ ¦ ¦--expr: [0/0] {96} + ¦ ¦ ¦ ¦--expr: vs [0/0] {96} ¦ ¦ ¦ ¦ °--SYMBOL: vs [0/0] {95} ¦ ¦ ¦ °--')': ) [0/0] {97} ¦ ¦ °--')': ) [0/0] {98} ¦ ¦--'+': + [0/1] {99} - ¦ °--expr: [0/0] {100} - ¦ ¦--expr: [0/0] {102} + ¦ °--expr: geom_ [0/0] {100} + ¦ ¦--expr: geom_ [0/0] {102} ¦ ¦ °--SYMBOL_FUNCTION_CALL: geom_ [0/0] {101} ¦ ¦--'(': ( [0/0] {103} ¦ °--')': ) [0/0] {104} ¦--COMMENT: # add [2/0] {105} - ¦--expr: [1/0] {106} - ¦ ¦--expr: [0/1] {107} - ¦ ¦ ¦--expr: [0/0] {109} + ¦--expr: ggplo [1/0] {106} + ¦ ¦--expr: ggplo [0/1] {107} + ¦ ¦ ¦--expr: ggplo [0/0] {109} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: ggplo [0/0] {108} ¦ ¦ ¦--'(': ( [0/0] {110} ¦ ¦ ¦--SYMBOL_SUB: data [0/1] {111} ¦ ¦ ¦--EQ_SUB: = [0/1] {112} - ¦ ¦ ¦--expr: [0/0] {114} + ¦ ¦ ¦--expr: mtcar [0/0] {114} ¦ ¦ ¦ °--SYMBOL: mtcar [0/0] {113} ¦ ¦ ¦--',': , [0/1] {115} ¦ ¦ ¦--SYMBOL_SUB: mappi [0/1] {116} ¦ ¦ ¦--EQ_SUB: = [0/1] {117} - ¦ ¦ ¦--expr: [0/0] {118} - ¦ ¦ ¦ ¦--expr: [0/0] {120} + ¦ ¦ ¦--expr: aes(x [0/0] {118} + ¦ ¦ ¦ ¦--expr: aes [0/0] {120} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: aes [0/0] {119} ¦ ¦ ¦ ¦--'(': ( [0/0] {121} ¦ ¦ ¦ ¦--SYMBOL_SUB: x [0/1] {122} ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {123} - ¦ ¦ ¦ ¦--expr: [0/0] {125} + ¦ ¦ ¦ ¦--expr: mpg [0/0] {125} ¦ ¦ ¦ ¦ °--SYMBOL: mpg [0/0] {124} ¦ ¦ ¦ ¦--',': , [0/1] {126} ¦ ¦ ¦ ¦--SYMBOL_SUB: y [0/1] {127} ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {128} - ¦ ¦ ¦ ¦--expr: [0/0] {130} + ¦ ¦ ¦ ¦--expr: vs [0/0] {130} ¦ ¦ ¦ ¦ °--SYMBOL: vs [0/0] {129} ¦ ¦ ¦ °--')': ) [0/0] {131} ¦ ¦ °--')': ) [0/0] {132} ¦ ¦--'+': + [0/1] {133} - ¦ °--expr: [0/0] {134} - ¦ ¦--expr: [0/0] {135} + ¦ °--expr: ggplo [0/0] {134} + ¦ ¦--expr: ggplo [0/0] {135} ¦ ¦ ¦--SYMBOL_PACKAGE: ggplo [0/0] {136} ¦ ¦ ¦--NS_GET: :: [0/0] {137} ¦ ¦ °--SYMBOL_FUNCTION_CALL: geom_ [0/0] {138} ¦ ¦--'(': ( [0/0] {139} ¦ °--')': ) [0/0] {140} ¦--COMMENT: # add [2/0] {141} - ¦--expr: [1/0] {142} - ¦ ¦--expr: [0/1] {144} - ¦ ¦ ¦--expr: [0/0] {146} + ¦--expr: ggplo [1/0] {142} + ¦ ¦--expr: ggplo [0/1] {144} + ¦ ¦ ¦--expr: ggplo [0/0] {146} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: ggplo [0/0] {145} ¦ ¦ ¦--'(': ( [0/0] {147} ¦ ¦ ¦--SYMBOL_SUB: data [0/1] {148} ¦ ¦ ¦--EQ_SUB: = [0/1] {149} - ¦ ¦ ¦--expr: [0/0] {151} + ¦ ¦ ¦--expr: mtcar [0/0] {151} ¦ ¦ ¦ °--SYMBOL: mtcar [0/0] {150} ¦ ¦ ¦--',': , [0/1] {152} ¦ ¦ ¦--SYMBOL_SUB: mappi [0/1] {153} ¦ ¦ ¦--EQ_SUB: = [0/1] {154} - ¦ ¦ ¦--expr: [0/0] {155} - ¦ ¦ ¦ ¦--expr: [0/0] {157} + ¦ ¦ ¦--expr: aes(x [0/0] {155} + ¦ ¦ ¦ ¦--expr: aes [0/0] {157} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: aes [0/0] {156} ¦ ¦ ¦ ¦--'(': ( [0/0] {158} ¦ ¦ ¦ ¦--SYMBOL_SUB: x [0/1] {159} ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {160} - ¦ ¦ ¦ ¦--expr: [0/0] {162} + ¦ ¦ ¦ ¦--expr: mpg [0/0] {162} ¦ ¦ ¦ ¦ °--SYMBOL: mpg [0/0] {161} ¦ ¦ ¦ ¦--',': , [0/1] {163} ¦ ¦ ¦ ¦--SYMBOL_SUB: y [0/1] {164} ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {165} - ¦ ¦ ¦ ¦--expr: [0/0] {167} + ¦ ¦ ¦ ¦--expr: vs [0/0] {167} ¦ ¦ ¦ ¦ °--SYMBOL: vs [0/0] {166} ¦ ¦ ¦ °--')': ) [0/0] {168} ¦ ¦ °--')': ) [0/0] {169} ¦ ¦--'+': + [0/1] {170} ¦ ¦--COMMENT: # com [0/2] {171} - ¦ ¦--expr: [1/1] {172} - ¦ ¦ ¦--expr: [0/0] {173} + ¦ ¦--expr: ggplo [1/1] {172} + ¦ ¦ ¦--expr: ggplo [0/0] {173} ¦ ¦ ¦ ¦--SYMBOL_PACKAGE: ggplo [0/0] {174} ¦ ¦ ¦ ¦--NS_GET: :: [0/0] {175} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: geom_ [0/0] {176} ¦ ¦ ¦--'(': ( [0/0] {177} ¦ ¦ °--')': ) [0/0] {178} ¦ ¦--'+': + [0/1] {179} - ¦ °--expr: [0/0] {180} - ¦ ¦--expr: [0/0] {182} + ¦ °--expr: g() [0/0] {180} + ¦ ¦--expr: g [0/0] {182} ¦ ¦ °--SYMBOL_FUNCTION_CALL: g [0/0] {181} ¦ ¦--'(': ( [0/0] {183} ¦ °--')': ) [0/0] {184} ¦--COMMENT: # add [3/0] {185} - ¦--expr: [1/1] {186} - ¦ ¦--expr: [0/1] {188} - ¦ ¦ ¦--expr: [0/0] {190} + ¦--expr: ggplo [1/1] {186} + ¦ ¦--expr: ggplo [0/1] {188} + ¦ ¦ ¦--expr: ggplo [0/0] {190} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: ggplo [0/0] {189} ¦ ¦ ¦--'(': ( [0/0] {191} ¦ ¦ ¦--SYMBOL_SUB: data [0/1] {192} ¦ ¦ ¦--EQ_SUB: = [0/1] {193} - ¦ ¦ ¦--expr: [0/0] {195} + ¦ ¦ ¦--expr: mtcar [0/0] {195} ¦ ¦ ¦ °--SYMBOL: mtcar [0/0] {194} ¦ ¦ ¦--',': , [0/1] {196} ¦ ¦ ¦--SYMBOL_SUB: mappi [0/1] {197} ¦ ¦ ¦--EQ_SUB: = [0/1] {198} - ¦ ¦ ¦--expr: [0/0] {199} - ¦ ¦ ¦ ¦--expr: [0/0] {201} + ¦ ¦ ¦--expr: aes(x [0/0] {199} + ¦ ¦ ¦ ¦--expr: aes [0/0] {201} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: aes [0/0] {200} ¦ ¦ ¦ ¦--'(': ( [0/0] {202} ¦ ¦ ¦ ¦--SYMBOL_SUB: x [0/1] {203} ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {204} - ¦ ¦ ¦ ¦--expr: [0/0] {206} + ¦ ¦ ¦ ¦--expr: mpg [0/0] {206} ¦ ¦ ¦ ¦ °--SYMBOL: mpg [0/0] {205} ¦ ¦ ¦ ¦--',': , [0/1] {207} ¦ ¦ ¦ ¦--SYMBOL_SUB: y [0/1] {208} ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {209} - ¦ ¦ ¦ ¦--expr: [0/0] {211} + ¦ ¦ ¦ ¦--expr: vs [0/0] {211} ¦ ¦ ¦ ¦ °--SYMBOL: vs [0/0] {210} ¦ ¦ ¦ °--')': ) [0/0] {212} ¦ ¦ °--')': ) [0/0] {213} ¦ ¦--'+': + [0/2] {214} - ¦ ¦--expr: [1/1] {215} - ¦ ¦ ¦--expr: [0/0] {216} + ¦ ¦--expr: ggplo [1/1] {215} + ¦ ¦ ¦--expr: ggplo [0/0] {216} ¦ ¦ ¦ ¦--SYMBOL_PACKAGE: ggplo [0/0] {217} ¦ ¦ ¦ ¦--NS_GET: :: [0/0] {218} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: geom_ [0/0] {219} ¦ ¦ ¦--'(': ( [0/0] {220} ¦ ¦ °--')': ) [0/0] {221} ¦ ¦--'+': + [0/1] {222} - ¦ °--expr: [0/0] {223} - ¦ ¦--expr: [0/0] {225} + ¦ °--expr: g() [0/0] {223} + ¦ ¦--expr: g [0/0] {225} ¦ ¦ °--SYMBOL_FUNCTION_CALL: g [0/0] {224} ¦ ¦--'(': ( [0/0] {226} ¦ °--')': ) [0/0] {227} ¦--COMMENT: # com [0/0] {228} ¦--COMMENT: # add [2/0] {229} - ¦--expr: [1/1] {230} - ¦ ¦--expr: [0/1] {232} - ¦ ¦ ¦--expr: [0/0] {234} + ¦--expr: ggplo [1/1] {230} + ¦ ¦--expr: ggplo [0/1] {232} + ¦ ¦ ¦--expr: ggplo [0/0] {234} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: ggplo [0/0] {233} ¦ ¦ ¦--'(': ( [0/0] {235} ¦ ¦ ¦--SYMBOL_SUB: data [0/1] {236} ¦ ¦ ¦--EQ_SUB: = [0/1] {237} - ¦ ¦ ¦--expr: [0/0] {239} + ¦ ¦ ¦--expr: mtcar [0/0] {239} ¦ ¦ ¦ °--SYMBOL: mtcar [0/0] {238} ¦ ¦ ¦--',': , [0/1] {240} ¦ ¦ ¦--SYMBOL_SUB: mappi [0/1] {241} ¦ ¦ ¦--EQ_SUB: = [0/1] {242} - ¦ ¦ ¦--expr: [0/0] {243} - ¦ ¦ ¦ ¦--expr: [0/0] {245} + ¦ ¦ ¦--expr: aes(x [0/0] {243} + ¦ ¦ ¦ ¦--expr: aes [0/0] {245} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: aes [0/0] {244} ¦ ¦ ¦ ¦--'(': ( [0/0] {246} ¦ ¦ ¦ ¦--SYMBOL_SUB: x [0/1] {247} ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {248} - ¦ ¦ ¦ ¦--expr: [0/0] {250} + ¦ ¦ ¦ ¦--expr: mpg [0/0] {250} ¦ ¦ ¦ ¦ °--SYMBOL: mpg [0/0] {249} ¦ ¦ ¦ ¦--',': , [0/1] {251} ¦ ¦ ¦ ¦--SYMBOL_SUB: y [0/1] {252} ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {253} - ¦ ¦ ¦ ¦--expr: [0/0] {255} + ¦ ¦ ¦ ¦--expr: vs [0/0] {255} ¦ ¦ ¦ ¦ °--SYMBOL: vs [0/0] {254} ¦ ¦ ¦ °--')': ) [0/0] {256} ¦ ¦ °--')': ) [0/0] {257} ¦ ¦--'+': + [0/1] {258} - ¦ ¦--expr: [0/1] {259} - ¦ ¦ ¦--expr: [0/0] {260} + ¦ ¦--expr: ggplo [0/1] {259} + ¦ ¦ ¦--expr: ggplo [0/0] {260} ¦ ¦ ¦ ¦--SYMBOL_PACKAGE: ggplo [0/0] {261} ¦ ¦ ¦ ¦--NS_GET: :: [0/0] {262} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: geom_ [0/0] {263} ¦ ¦ ¦--'(': ( [0/0] {264} ¦ ¦ °--')': ) [0/0] {265} ¦ ¦--'+': + [0/1] {266} - ¦ °--expr: [0/0] {267} - ¦ ¦--expr: [0/0] {269} + ¦ °--expr: g() [0/0] {267} + ¦ ¦--expr: g [0/0] {269} ¦ ¦ °--SYMBOL_FUNCTION_CALL: g [0/0] {268} ¦ ¦--'(': ( [0/0] {270} ¦ °--')': ) [0/0] {271} ¦--COMMENT: # com [0/0] {272} ¦--COMMENT: # add [3/0] {273} - ¦--expr: [1/1] {274} - ¦ ¦--expr: [0/1] {277} - ¦ ¦ ¦--expr: [0/0] {279} + ¦--expr: ggplo [1/1] {274} + ¦ ¦--expr: ggplo [0/1] {277} + ¦ ¦ ¦--expr: ggplo [0/0] {279} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: ggplo [0/0] {278} ¦ ¦ ¦--'(': ( [0/0] {280} ¦ ¦ ¦--SYMBOL_SUB: data [0/1] {281} ¦ ¦ ¦--EQ_SUB: = [0/1] {282} - ¦ ¦ ¦--expr: [0/0] {284} + ¦ ¦ ¦--expr: mtcar [0/0] {284} ¦ ¦ ¦ °--SYMBOL: mtcar [0/0] {283} ¦ ¦ ¦--',': , [0/1] {285} ¦ ¦ ¦--SYMBOL_SUB: mappi [0/1] {286} ¦ ¦ ¦--EQ_SUB: = [0/1] {287} - ¦ ¦ ¦--expr: [0/0] {288} - ¦ ¦ ¦ ¦--expr: [0/0] {290} + ¦ ¦ ¦--expr: aes(x [0/0] {288} + ¦ ¦ ¦ ¦--expr: aes [0/0] {290} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: aes [0/0] {289} ¦ ¦ ¦ ¦--'(': ( [0/0] {291} ¦ ¦ ¦ ¦--SYMBOL_SUB: x [0/1] {292} ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {293} - ¦ ¦ ¦ ¦--expr: [0/0] {295} + ¦ ¦ ¦ ¦--expr: mpg [0/0] {295} ¦ ¦ ¦ ¦ °--SYMBOL: mpg [0/0] {294} ¦ ¦ ¦ ¦--',': , [0/1] {296} ¦ ¦ ¦ ¦--SYMBOL_SUB: y [0/1] {297} ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {298} - ¦ ¦ ¦ ¦--expr: [0/0] {300} + ¦ ¦ ¦ ¦--expr: vs [0/0] {300} ¦ ¦ ¦ ¦ °--SYMBOL: vs [0/0] {299} ¦ ¦ ¦ °--')': ) [0/0] {301} ¦ ¦ °--')': ) [0/0] {302} ¦ ¦--'+': + [0/2] {303} - ¦ ¦--expr: [1/1] {304} - ¦ ¦ ¦--expr: [0/0] {305} + ¦ ¦--expr: ggplo [1/1] {304} + ¦ ¦ ¦--expr: ggplo [0/0] {305} ¦ ¦ ¦ ¦--SYMBOL_PACKAGE: ggplo [0/0] {306} ¦ ¦ ¦ ¦--NS_GET: :: [0/0] {307} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: geom_ [0/0] {308} ¦ ¦ ¦--'(': ( [0/0] {309} ¦ ¦ °--')': ) [0/0] {310} ¦ ¦--'+': + [0/1] {311} - ¦ ¦--expr: [0/2] {312} - ¦ ¦ ¦--expr: [0/0] {314} + ¦ ¦--expr: g() [0/2] {312} + ¦ ¦ ¦--expr: g [0/0] {314} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: g [0/0] {313} ¦ ¦ ¦--'(': ( [0/0] {315} ¦ ¦ °--')': ) [0/0] {316} ¦ ¦--'+': + [0/1] {317} - ¦ °--expr: [0/0] {318} - ¦ ¦--expr: [0/0] {320} + ¦ °--expr: geom_ [0/0] {318} + ¦ ¦--expr: geom_ [0/0] {320} ¦ ¦ °--SYMBOL_FUNCTION_CALL: geom_ [0/0] {319} ¦ ¦--'(': ( [0/0] {321} ¦ °--')': ) [0/0] {322} ¦--COMMENT: # com [0/0] {323} ¦--COMMENT: # whe [2/0] {324} - ¦--expr: [1/0] {325} - ¦ ¦--expr: [0/0] {326} - ¦ ¦ ¦--expr: [0/0] {328} + ¦--expr: x[1]+ [1/0] {325} + ¦ ¦--expr: x[1] [0/0] {326} + ¦ ¦ ¦--expr: x [0/0] {328} ¦ ¦ ¦ °--SYMBOL: x [0/0] {327} ¦ ¦ ¦--'[': [ [0/0] {329} - ¦ ¦ ¦--expr: [0/0] {331} + ¦ ¦ ¦--expr: 1 [0/0] {331} ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {330} ¦ ¦ °--']': ] [0/0] {332} ¦ ¦--'+': + [0/1] {333} - ¦ °--expr: [0/0] {334} - ¦ ¦--expr: [0/0] {336} + ¦ °--expr: c() [0/0] {334} + ¦ ¦--expr: c [0/0] {336} ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {335} ¦ ¦--'(': ( [0/0] {337} ¦ °--')': ) [0/0] {338} - ¦--expr: [2/0] {339} - ¦ ¦--expr: [0/1] {340} - ¦ ¦ ¦--expr: [0/0] {342} + ¦--expr: g() + [2/0] {339} + ¦ ¦--expr: g() [0/1] {340} + ¦ ¦ ¦--expr: g [0/0] {342} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: g [0/0] {341} ¦ ¦ ¦--'(': ( [0/0] {343} ¦ ¦ °--')': ) [0/0] {344} ¦ ¦--'+': + [0/1] {345} - ¦ °--expr: [0/0] {346} - ¦ ¦--expr: [0/0] {348} + ¦ °--expr: x[1] [0/0] {346} + ¦ ¦--expr: x [0/0] {348} ¦ ¦ °--SYMBOL: x [0/0] {347} ¦ ¦--'[': [ [0/0] {349} - ¦ ¦--expr: [0/0] {351} + ¦ ¦--expr: 1 [0/0] {351} ¦ ¦ °--NUM_CONST: 1 [0/0] {350} ¦ °--']': ] [0/0] {352} - °--expr: [2/0] {353} - ¦--expr: [0/1] {354} - ¦ ¦--expr: [0/0] {355} - ¦ ¦ ¦--expr: [0/0] {357} + °--expr: g()[2 [2/0] {353} + ¦--expr: g()[2 [0/1] {354} + ¦ ¦--expr: g() [0/0] {355} + ¦ ¦ ¦--expr: g [0/0] {357} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: g [0/0] {356} ¦ ¦ ¦--'(': ( [0/0] {358} ¦ ¦ °--')': ) [0/0] {359} ¦ ¦--'[': [ [0/0] {360} - ¦ ¦--expr: [0/0] {362} + ¦ ¦--expr: 2 [0/0] {362} ¦ ¦ °--NUM_CONST: 2 [0/0] {361} ¦ °--']': ] [0/0] {363} ¦--'+': + [0/1] {364} - °--expr: [0/0] {365} - ¦--expr: [0/0] {367} + °--expr: x[1] [0/0] {365} + ¦--expr: x [0/0] {367} ¦ °--SYMBOL: x [0/0] {366} ¦--'[': [ [0/0] {368} - ¦--expr: [0/0] {370} + ¦--expr: 1 [0/0] {370} ¦ °--NUM_CONST: 1 [0/0] {369} °--']': ] [0/0] {371} diff --git a/tests/testthat/line_breaks_and_other/if_with_line_break_indention-in_tree b/tests/testthat/line_breaks_and_other/if_with_line_break_indention-in_tree index 941df8abc..939eee536 100644 --- a/tests/testthat/line_breaks_and_other/if_with_line_break_indention-in_tree +++ b/tests/testthat/line_breaks_and_other/if_with_line_break_indention-in_tree @@ -1,46 +1,47 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--COMMENT: # add [0/0] {1} - ¦--expr: [1/0] {2} + ¦--expr: if (x [1/0] {2} ¦ ¦--IF: if [0/1] {3} ¦ ¦--'(': ( [0/0] {4} - ¦ ¦--expr: [0/0] {6} + ¦ ¦--expr: x [0/0] {6} ¦ ¦ °--SYMBOL: x [0/0] {5} ¦ ¦--')': ) [0/1] {7} - ¦ ¦--expr: [0/1] {8} + ¦ ¦--expr: {1+1+ [0/1] {8} ¦ ¦ ¦--'{': { [0/0] {9} - ¦ ¦ ¦--expr: [0/0] {10} - ¦ ¦ ¦ ¦--expr: [0/0] {13} + ¦ ¦ ¦--expr: 1+1++ [0/0] {10} + ¦ ¦ ¦ ¦--expr: 1 [0/0] {13} ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {12} ¦ ¦ ¦ ¦--'+': + [0/0] {14} - ¦ ¦ ¦ ¦--expr: [0/0] {16} + ¦ ¦ ¦ ¦--expr: 1 [0/0] {16} ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {15} ¦ ¦ ¦ ¦--'+': + [0/0] {17} - ¦ ¦ ¦ °--expr: [0/0] {18} + ¦ ¦ ¦ °--expr: +1 [0/0] {18} ¦ ¦ ¦ ¦--'+': + [0/0] {19} - ¦ ¦ ¦ °--expr: [0/0] {21} + ¦ ¦ ¦ °--expr: 1 [0/0] {21} ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {20} ¦ ¦ °--'}': } [0/0] {22} ¦ ¦--ELSE: else [0/0] {23} - ¦ °--expr: [0/0] {24} + ¦ °--expr: {3} [0/0] {24} ¦ ¦--'{': { [0/0] {25} - ¦ ¦--expr: [0/0] {27} + ¦ ¦--expr: 3 [0/0] {27} ¦ ¦ °--NUM_CONST: 3 [0/0] {26} ¦ °--'}': } [0/0] {28} ¦--COMMENT: # rem [2/0] {29} - °--expr: [1/0] {30} - ¦--expr: [0/0] {32} + °--expr: test_ [1/0] {30} + ¦--expr: test_ [0/0] {32} ¦ °--SYMBOL_FUNCTION_CALL: test_ [0/0] {31} ¦--'(': ( [0/0] {33} - ¦--expr: [0/0] {35} + ¦--expr: "x" [0/0] {35} ¦ °--STR_CONST: "x" [0/0] {34} ¦--',': , [0/0] {36} - ¦--expr: [1/0] {37} + ¦--expr: { + m [1/0] {37} ¦ ¦--'{': { [0/2] {38} - ¦ ¦--expr: [1/0] {39} - ¦ ¦ ¦--expr: [0/0] {41} + ¦ ¦--expr: my_te [1/0] {39} + ¦ ¦ ¦--expr: my_te [0/0] {41} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: my_te [0/0] {40} ¦ ¦ ¦--'(': ( [0/0] {42} - ¦ ¦ ¦--expr: [0/0] {44} + ¦ ¦ ¦--expr: call [0/0] {44} ¦ ¦ ¦ °--SYMBOL: call [0/0] {43} ¦ ¦ °--')': ) [0/0] {45} ¦ °--'}': } [1/0] {46} diff --git a/tests/testthat/line_breaks_and_other/pipe-line-breaks-in_tree b/tests/testthat/line_breaks_and_other/pipe-line-breaks-in_tree index 68f647175..4d4ce5928 100644 --- a/tests/testthat/line_breaks_and_other/pipe-line-breaks-in_tree +++ b/tests/testthat/line_breaks_and_other/pipe-line-breaks-in_tree @@ -1,402 +1,411 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} - ¦ ¦--expr: [0/0] {3} + ¦--expr: c(a % [0/0] {1} + ¦ ¦--expr: c [0/0] {3} ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {2} ¦ ¦--'(': ( [0/0] {4} - ¦ ¦--expr: [0/0] {5} - ¦ ¦ ¦--expr: [0/1] {7} + ¦ ¦--expr: a %>% [0/0] {5} + ¦ ¦ ¦--expr: a [0/1] {7} ¦ ¦ ¦ °--SYMBOL: a [0/0] {6} ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/1] {8} - ¦ ¦ °--expr: [0/0] {10} + ¦ ¦ °--expr: b [0/0] {10} ¦ ¦ °--SYMBOL: b [0/0] {9} ¦ °--')': ) [0/0] {11} - ¦--expr: [2/0] {12} - ¦ ¦--expr: [0/0] {14} + ¦--expr: c(a % [2/0] {12} + ¦ ¦--expr: c [0/0] {14} ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {13} ¦ ¦--'(': ( [0/0] {15} - ¦ ¦--expr: [0/0] {16} - ¦ ¦ ¦--expr: [0/1] {18} + ¦ ¦--expr: a %>% [0/0] {16} + ¦ ¦ ¦--expr: a [0/1] {18} ¦ ¦ ¦ °--SYMBOL: a [0/0] {17} ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/1] {19} - ¦ ¦ °--expr: [0/0] {20} - ¦ ¦ ¦--expr: [0/0] {22} + ¦ ¦ °--expr: b() [0/0] {20} + ¦ ¦ ¦--expr: b [0/0] {22} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: b [0/0] {21} ¦ ¦ ¦--'(': ( [0/0] {23} ¦ ¦ °--')': ) [0/0] {24} ¦ °--')': ) [0/0] {25} - ¦--expr: [2/0] {26} - ¦ ¦--expr: [0/0] {28} + ¦--expr: c(a + [2/0] {26} + ¦ ¦--expr: c [0/0] {28} ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {27} ¦ ¦--'(': ( [0/0] {29} - ¦ ¦--expr: [0/0] {30} - ¦ ¦ ¦--expr: [0/1] {32} + ¦ ¦--expr: a + b [0/0] {30} + ¦ ¦ ¦--expr: a [0/1] {32} ¦ ¦ ¦ °--SYMBOL: a [0/0] {31} ¦ ¦ ¦--'+': + [0/1] {33} - ¦ ¦ ¦--expr: [0/1] {36} + ¦ ¦ ¦--expr: b [0/1] {36} ¦ ¦ ¦ °--SYMBOL: b [0/0] {35} ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/1] {37} - ¦ ¦ °--expr: [0/0] {39} + ¦ ¦ °--expr: c [0/0] {39} ¦ ¦ °--SYMBOL: c [0/0] {38} ¦ °--')': ) [0/0] {40} - ¦--expr: [2/0] {41} - ¦ ¦--expr: [0/0] {43} + ¦--expr: c( + [2/0] {41} + ¦ ¦--expr: c [0/0] {43} ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {42} ¦ ¦--'(': ( [0/2] {44} - ¦ ¦--expr: [1/0] {45} - ¦ ¦ ¦--expr: [0/1] {47} + ¦ ¦--expr: a %>% [1/0] {45} + ¦ ¦ ¦--expr: a [0/1] {47} ¦ ¦ ¦ °--SYMBOL: a [0/0] {46} ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/1] {48} - ¦ ¦ °--expr: [0/0] {50} + ¦ ¦ °--expr: b [0/0] {50} ¦ ¦ °--SYMBOL: b [0/0] {49} ¦ °--')': ) [0/0] {51} - ¦--expr: [2/0] {52} - ¦ ¦--expr: [0/0] {54} + ¦--expr: c(a % [2/0] {52} + ¦ ¦--expr: c [0/0] {54} ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {53} ¦ ¦--'(': ( [0/0] {55} - ¦ ¦--expr: [0/0] {56} - ¦ ¦ ¦--expr: [0/1] {58} + ¦ ¦--expr: a %>% [0/0] {56} + ¦ ¦ ¦--expr: a [0/1] {58} ¦ ¦ ¦ °--SYMBOL: a [0/0] {57} ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/1] {59} - ¦ ¦ °--expr: [0/0] {60} - ¦ ¦ ¦--expr: [0/0] {62} + ¦ ¦ °--expr: b() [0/0] {60} + ¦ ¦ ¦--expr: b [0/0] {62} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: b [0/0] {61} ¦ ¦ ¦--'(': ( [0/0] {63} ¦ ¦ °--')': ) [0/0] {64} ¦ °--')': ) [1/0] {65} - ¦--expr: [2/0] {66} - ¦ ¦--expr: [0/0] {68} + ¦--expr: c(a % [2/0] {66} + ¦ ¦--expr: c [0/0] {68} ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {67} ¦ ¦--'(': ( [0/0] {69} - ¦ ¦--expr: [0/1] {70} - ¦ ¦ ¦--expr: [0/1] {72} + ¦ ¦--expr: a %>% [0/1] {70} + ¦ ¦ ¦--expr: a [0/1] {72} ¦ ¦ ¦ °--SYMBOL: a [0/0] {71} ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/1] {73} - ¦ ¦ °--expr: [0/0] {74} - ¦ ¦ ¦--expr: [0/0] {76} + ¦ ¦ °--expr: b() [0/0] {74} + ¦ ¦ ¦--expr: b [0/0] {76} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: b [0/0] {75} ¦ ¦ ¦--'(': ( [0/0] {77} ¦ ¦ °--')': ) [0/0] {78} ¦ ¦--COMMENT: # 33 [0/0] {79} ¦ °--')': ) [1/0] {80} - ¦--expr: [2/0] {81} - ¦ ¦--expr: [0/0] {83} + ¦--expr: c( + [2/0] {81} + ¦ ¦--expr: c [0/0] {83} ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {82} ¦ ¦--'(': ( [0/2] {84} - ¦ ¦--expr: [1/2] {85} - ¦ ¦ ¦--expr: [0/1] {87} + ¦ ¦--expr: a + b [1/2] {85} + ¦ ¦ ¦--expr: a [0/1] {87} ¦ ¦ ¦ °--SYMBOL: a [0/0] {86} ¦ ¦ ¦--'+': + [0/1] {88} - ¦ ¦ ¦--expr: [0/1] {91} + ¦ ¦ ¦--expr: b [0/1] {91} ¦ ¦ ¦ °--SYMBOL: b [0/0] {90} ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/1] {92} - ¦ ¦ °--expr: [0/0] {94} + ¦ ¦ °--expr: c [0/0] {94} ¦ ¦ °--SYMBOL: c [0/0] {93} ¦ °--')': ) [1/0] {95} - ¦--expr: [2/0] {96} - ¦ ¦--expr: [0/0] {98} + ¦--expr: c( + [2/0] {96} + ¦ ¦--expr: c [0/0] {98} ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {97} ¦ ¦--'(': ( [0/2] {99} - ¦ ¦--expr: [1/0] {100} - ¦ ¦ ¦--expr: [0/1] {102} + ¦ ¦--expr: a + b [1/0] {100} + ¦ ¦ ¦--expr: a [0/1] {102} ¦ ¦ ¦ °--SYMBOL: a [0/0] {101} ¦ ¦ ¦--'+': + [0/1] {103} - ¦ ¦ ¦--expr: [0/1] {106} + ¦ ¦ ¦--expr: b [0/1] {106} ¦ ¦ ¦ °--SYMBOL: b [0/0] {105} ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/4] {107} - ¦ ¦ °--expr: [1/0] {109} + ¦ ¦ °--expr: c [1/0] {109} ¦ ¦ °--SYMBOL: c [0/0] {108} ¦ °--')': ) [0/0] {110} - ¦--expr: [2/0] {111} - ¦ ¦--expr: [0/0] {113} + ¦--expr: c(a + [2/0] {111} + ¦ ¦--expr: c [0/0] {113} ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {112} ¦ ¦--'(': ( [0/0] {114} - ¦ ¦--expr: [0/0] {115} - ¦ ¦ ¦--expr: [0/1] {117} + ¦ ¦--expr: a + b [0/0] {115} + ¦ ¦ ¦--expr: a [0/1] {117} ¦ ¦ ¦ °--SYMBOL: a [0/0] {116} ¦ ¦ ¦--'+': + [0/1] {118} - ¦ ¦ ¦--expr: [0/1] {121} + ¦ ¦ ¦--expr: b [0/1] {121} ¦ ¦ ¦ °--SYMBOL: b [0/0] {120} ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/4] {122} - ¦ ¦ °--expr: [1/0] {124} + ¦ ¦ °--expr: c [1/0] {124} ¦ ¦ °--SYMBOL: c [0/0] {123} ¦ °--')': ) [0/0] {125} - ¦--expr: [2/0] {126} - ¦ ¦--expr: [0/0] {128} + ¦--expr: c( + [2/0] {126} + ¦ ¦--expr: c [0/0] {128} ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {127} ¦ ¦--'(': ( [0/2] {129} - ¦ ¦--expr: [1/0] {130} - ¦ ¦ ¦--expr: [0/1] {132} + ¦ ¦--expr: a + b [1/0] {130} + ¦ ¦ ¦--expr: a [0/1] {132} ¦ ¦ ¦ °--SYMBOL: a [0/0] {131} ¦ ¦ ¦--'+': + [0/1] {133} - ¦ ¦ ¦--expr: [0/1] {136} + ¦ ¦ ¦--expr: b [0/1] {136} ¦ ¦ ¦ °--SYMBOL: b [0/0] {135} ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/1] {137} ¦ ¦ ¦--COMMENT: # 654 [0/4] {138} - ¦ ¦ °--expr: [1/0] {140} + ¦ ¦ °--expr: c [1/0] {140} ¦ ¦ °--SYMBOL: c [0/0] {139} ¦ °--')': ) [1/0] {141} - ¦--expr: [2/0] {142} - ¦ ¦--expr: [0/0] {144} + ¦--expr: c( # [2/0] {142} + ¦ ¦--expr: c [0/0] {144} ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {143} ¦ ¦--'(': ( [0/1] {145} ¦ ¦--COMMENT: # rr [0/2] {146} - ¦ ¦--expr: [1/0] {147} - ¦ ¦ ¦--expr: [0/1] {149} + ¦ ¦--expr: a + b [1/0] {147} + ¦ ¦ ¦--expr: a [0/1] {149} ¦ ¦ ¦ °--SYMBOL: a [0/0] {148} ¦ ¦ ¦--'+': + [0/1] {150} - ¦ ¦ ¦--expr: [0/1] {153} + ¦ ¦ ¦--expr: b [0/1] {153} ¦ ¦ ¦ °--SYMBOL: b [0/0] {152} ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/4] {154} - ¦ ¦ °--expr: [1/0] {156} + ¦ ¦ °--expr: c [1/0] {156} ¦ ¦ °--SYMBOL: c [0/0] {155} ¦ °--')': ) [1/0] {157} - ¦--expr: [2/0] {158} - ¦ ¦--expr: [0/0] {160} + ¦--expr: c( + [2/0] {158} + ¦ ¦--expr: c [0/0] {160} ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {159} ¦ ¦--'(': ( [0/2] {161} - ¦ ¦--expr: [1/0] {162} - ¦ ¦ ¦--expr: [0/1] {164} + ¦ ¦--expr: a + + [1/0] {162} + ¦ ¦ ¦--expr: a [0/1] {164} ¦ ¦ ¦ °--SYMBOL: a [0/0] {163} ¦ ¦ ¦--'+': + [0/4] {165} - ¦ ¦ ¦--expr: [1/1] {168} + ¦ ¦ ¦--expr: b [1/1] {168} ¦ ¦ ¦ °--SYMBOL: b [0/0] {167} ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/1] {169} - ¦ ¦ °--expr: [0/0] {171} + ¦ ¦ °--expr: c [0/0] {171} ¦ ¦ °--SYMBOL: c [0/0] {170} ¦ °--')': ) [1/0] {172} - ¦--expr: [2/0] {173} - ¦ ¦--expr: [0/0] {175} + ¦--expr: c(a + [2/0] {173} + ¦ ¦--expr: c [0/0] {175} ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {174} ¦ ¦--'(': ( [0/0] {176} - ¦ ¦--expr: [0/0] {177} - ¦ ¦ ¦--expr: [0/1] {179} + ¦ ¦--expr: a + + [0/0] {177} + ¦ ¦ ¦--expr: a [0/1] {179} ¦ ¦ ¦ °--SYMBOL: a [0/0] {178} ¦ ¦ ¦--'+': + [0/4] {180} - ¦ ¦ ¦--expr: [1/1] {183} + ¦ ¦ ¦--expr: b [1/1] {183} ¦ ¦ ¦ °--SYMBOL: b [0/0] {182} ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/1] {184} - ¦ ¦ °--expr: [0/0] {186} + ¦ ¦ °--expr: c [0/0] {186} ¦ ¦ °--SYMBOL: c [0/0] {185} ¦ °--')': ) [1/0] {187} - ¦--expr: [2/0] {188} - ¦ ¦--expr: [0/1] {190} + ¦--expr: a %>% [2/0] {188} + ¦ ¦--expr: a [0/1] {190} ¦ ¦ °--SYMBOL: a [0/0] {189} ¦ ¦--SPECIAL-PIPE: %>% [0/1] {191} - ¦ °--expr: [0/0] {192} - ¦ ¦--expr: [0/0] {194} + ¦ °--expr: b( +) [0/0] {192} + ¦ ¦--expr: b [0/0] {194} ¦ ¦ °--SYMBOL_FUNCTION_CALL: b [0/0] {193} ¦ ¦--'(': ( [0/0] {195} ¦ °--')': ) [1/0] {196} - ¦--expr: [2/0] {197} - ¦ ¦--expr: [0/1] {200} + ¦--expr: a %>% [2/0] {197} + ¦ ¦--expr: a [0/1] {200} ¦ ¦ °--SYMBOL: a [0/0] {199} ¦ ¦--SPECIAL-PIPE: %>% [0/1] {201} - ¦ ¦--expr: [0/1] {202} - ¦ ¦ ¦--expr: [0/0] {204} + ¦ ¦--expr: b( +) [0/1] {202} + ¦ ¦ ¦--expr: b [0/0] {204} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: b [0/0] {203} ¦ ¦ ¦--'(': ( [0/0] {205} ¦ ¦ °--')': ) [1/0] {206} ¦ ¦--SPECIAL-PIPE: %>% [0/1] {207} - ¦ °--expr: [0/0] {209} + ¦ °--expr: q [0/0] {209} ¦ °--SYMBOL: q [0/0] {208} - ¦--expr: [2/0] {210} - ¦ ¦--expr: [0/1] {212} + ¦--expr: a %>% [2/0] {210} + ¦ ¦--expr: a [0/1] {212} ¦ ¦ °--SYMBOL: a [0/0] {211} ¦ ¦--SPECIAL-PIPE: %>% [0/2] {213} - ¦ °--expr: [1/0] {214} - ¦ ¦--expr: [0/0] {216} + ¦ °--expr: b() [1/0] {214} + ¦ ¦--expr: b [0/0] {216} ¦ ¦ °--SYMBOL_FUNCTION_CALL: b [0/0] {215} ¦ ¦--'(': ( [0/0] {217} ¦ °--')': ) [0/0] {218} - ¦--expr: [2/0] {219} - ¦ ¦--expr: [0/1] {222} + ¦--expr: a %>% [2/0] {219} + ¦ ¦--expr: a [0/1] {222} ¦ ¦ °--SYMBOL: a [0/0] {221} ¦ ¦--SPECIAL-PIPE: %>% [0/1] {223} - ¦ ¦--expr: [0/1] {224} - ¦ ¦ ¦--expr: [0/0] {226} + ¦ ¦--expr: b() [0/1] {224} + ¦ ¦ ¦--expr: b [0/0] {226} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: b [0/0] {225} ¦ ¦ ¦--'(': ( [0/0] {227} ¦ ¦ °--')': ) [0/0] {228} ¦ ¦--SPECIAL-PIPE: %>% [0/1] {229} - ¦ °--expr: [0/0] {231} + ¦ °--expr: c [0/0] {231} ¦ °--SYMBOL: c [0/0] {230} ¦--COMMENT: # sho [2/0] {232} - ¦--expr: [1/0] {233} - ¦ ¦--expr: [0/1] {235} + ¦--expr: a %>% [1/0] {233} + ¦ ¦--expr: a [0/1] {235} ¦ ¦ °--SYMBOL: a [0/0] {234} ¦ ¦--SPECIAL-PIPE: %>% [0/1] {236} - ¦ °--expr: [0/0] {237} - ¦ ¦--expr: [0/0] {239} + ¦ °--expr: b() [0/0] {237} + ¦ ¦--expr: b [0/0] {239} ¦ ¦ °--SYMBOL_FUNCTION_CALL: b [0/0] {238} ¦ ¦--'(': ( [0/0] {240} ¦ °--')': ) [0/0] {241} - ¦--expr: [2/0] {242} - ¦ ¦--expr: [0/0] {244} + ¦--expr: fun(x [2/0] {242} + ¦ ¦--expr: fun [0/0] {244} ¦ ¦ °--SYMBOL_FUNCTION_CALL: fun [0/0] {243} ¦ ¦--'(': ( [0/0] {245} - ¦ ¦--expr: [0/0] {247} + ¦ ¦--expr: x [0/0] {247} ¦ ¦ °--SYMBOL: x [0/0] {246} ¦ ¦--',': , [0/2] {248} - ¦ ¦--expr: [1/0] {249} - ¦ ¦ ¦--expr: [0/1] {251} + ¦ ¦--expr: a %>% [1/0] {249} + ¦ ¦ ¦--expr: a [0/1] {251} ¦ ¦ ¦ °--SYMBOL: a [0/0] {250} ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/1] {252} - ¦ ¦ °--expr: [0/0] {254} + ¦ ¦ °--expr: b [0/0] {254} ¦ ¦ °--SYMBOL: b [0/0] {253} ¦ °--')': ) [0/0] {255} - ¦--expr: [2/0] {256} - ¦ ¦--expr: [0/0] {258} + ¦--expr: fun(x [2/0] {256} + ¦ ¦--expr: fun [0/0] {258} ¦ ¦ °--SYMBOL_FUNCTION_CALL: fun [0/0] {257} ¦ ¦--'(': ( [0/0] {259} - ¦ ¦--expr: [0/0] {261} + ¦ ¦--expr: x [0/0] {261} ¦ ¦ °--SYMBOL: x [0/0] {260} ¦ ¦--',': , [0/4] {262} ¦ ¦--SYMBOL_SUB: gg [1/1] {263} ¦ ¦--EQ_SUB: = [0/1] {264} - ¦ ¦--expr: [0/0] {265} - ¦ ¦ ¦--expr: [0/1] {267} + ¦ ¦--expr: a %>% [0/0] {265} + ¦ ¦ ¦--expr: a [0/1] {267} ¦ ¦ ¦ °--SYMBOL: a [0/0] {266} ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/1] {268} - ¦ ¦ °--expr: [0/0] {270} + ¦ ¦ °--expr: b [0/0] {270} ¦ ¦ °--SYMBOL: b [0/0] {269} ¦ ¦--',': , [0/4] {271} - ¦ ¦--expr: [1/0] {272} - ¦ ¦ ¦--expr: [0/1] {274} + ¦ ¦--expr: tt %> [1/0] {272} + ¦ ¦ ¦--expr: tt [0/1] {274} ¦ ¦ ¦ °--SYMBOL: tt [0/0] {273} ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/1] {275} - ¦ ¦ °--expr: [0/0] {277} + ¦ ¦ °--expr: q [0/0] {277} ¦ ¦ °--SYMBOL: q [0/0] {276} ¦ °--')': ) [0/0] {278} - ¦--expr: [2/0] {279} - ¦ ¦--expr: [0/0] {281} + ¦--expr: fun(x [2/0] {279} + ¦ ¦--expr: fun [0/0] {281} ¦ ¦ °--SYMBOL_FUNCTION_CALL: fun [0/0] {280} ¦ ¦--'(': ( [0/0] {282} - ¦ ¦--expr: [0/0] {284} + ¦ ¦--expr: x [0/0] {284} ¦ ¦ °--SYMBOL: x [0/0] {283} ¦ ¦--',': , [0/1] {285} ¦ ¦--SYMBOL_SUB: gg [0/1] {286} ¦ ¦--EQ_SUB: = [0/1] {287} - ¦ ¦--expr: [0/0] {288} - ¦ ¦ ¦--expr: [0/1] {290} + ¦ ¦--expr: a %>% [0/0] {288} + ¦ ¦ ¦--expr: a [0/1] {290} ¦ ¦ ¦ °--SYMBOL: a [0/0] {289} ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/1] {291} - ¦ ¦ °--expr: [0/0] {293} + ¦ ¦ °--expr: b [0/0] {293} ¦ ¦ °--SYMBOL: b [0/0] {292} ¦ ¦--',': , [0/1] {294} - ¦ ¦--expr: [0/0] {295} - ¦ ¦ ¦--expr: [0/1] {297} + ¦ ¦--expr: tt %> [0/0] {295} + ¦ ¦ ¦--expr: tt [0/1] {297} ¦ ¦ ¦ °--SYMBOL: tt [0/0] {296} ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/1] {298} - ¦ ¦ °--expr: [0/0] {300} + ¦ ¦ °--expr: q [0/0] {300} ¦ ¦ °--SYMBOL: q [0/0] {299} ¦ °--')': ) [0/0] {301} - ¦--equal_assign: [2/0] {302} - ¦ ¦--expr: [0/1] {304} + ¦--equal_assign: z = a [2/0] {302} + ¦ ¦--expr: z [0/1] {304} ¦ ¦ °--SYMBOL: z [0/0] {303} ¦ ¦--EQ_ASSIGN: = [0/1] {305} - ¦ ¦--expr: [0/1] {308} + ¦ ¦--expr: a [0/1] {308} ¦ ¦ °--SYMBOL: a [0/0] {307} ¦ ¦--SPECIAL-PIPE: %>% [0/1] {309} - ¦ °--expr: [0/0] {310} - ¦ ¦--expr: [0/0] {312} + ¦ °--expr: b() [0/0] {310} + ¦ ¦--expr: b [0/0] {312} ¦ ¦ °--SYMBOL_FUNCTION_CALL: b [0/0] {311} ¦ ¦--'(': ( [0/0] {313} ¦ °--')': ) [0/0] {314} - ¦--expr: [2/0] {315} - ¦ ¦--expr: [0/0] {317} + ¦--expr: fun( [2/0] {315} + ¦ ¦--expr: fun [0/0] {317} ¦ ¦ °--SYMBOL_FUNCTION_CALL: fun [0/0] {316} ¦ ¦--'(': ( [0/1] {318} ¦ ¦--SYMBOL_SUB: s [0/1] {319} ¦ ¦--EQ_SUB: = [0/1] {320} - ¦ ¦--expr: [0/0] {321} - ¦ ¦ ¦--expr: [0/0] {323} + ¦ ¦--expr: g(x) [0/0] {321} + ¦ ¦ ¦--expr: g [0/0] {323} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: g [0/0] {322} ¦ ¦ ¦--'(': ( [0/0] {324} - ¦ ¦ ¦--expr: [0/0] {326} + ¦ ¦ ¦--expr: x [0/0] {326} ¦ ¦ ¦ °--SYMBOL: x [0/0] {325} ¦ ¦ °--')': ) [0/0] {327} ¦ ¦--',': , [0/4] {328} ¦ ¦--SYMBOL_SUB: gg [1/1] {329} ¦ ¦--EQ_SUB: = [0/1] {330} - ¦ ¦--expr: [0/0] {331} - ¦ ¦ ¦--expr: [0/1] {332} - ¦ ¦ ¦ ¦--expr: [0/0] {334} + ¦ ¦--expr: a(n = [0/0] {331} + ¦ ¦ ¦--expr: a(n = [0/1] {332} + ¦ ¦ ¦ ¦--expr: a [0/0] {334} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: a [0/0] {333} ¦ ¦ ¦ ¦--'(': ( [0/0] {335} - ¦ ¦ ¦ ¦--expr: [0/0] {336} - ¦ ¦ ¦ ¦ ¦--expr: [0/1] {338} + ¦ ¦ ¦ ¦--expr: n == [0/0] {336} + ¦ ¦ ¦ ¦ ¦--expr: n [0/1] {338} ¦ ¦ ¦ ¦ ¦ °--SYMBOL: n [0/0] {337} ¦ ¦ ¦ ¦ ¦--EQ: == [0/1] {339} - ¦ ¦ ¦ ¦ °--expr: [0/0] {341} + ¦ ¦ ¦ ¦ °--expr: 2 [0/0] {341} ¦ ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {340} ¦ ¦ ¦ °--')': ) [0/0] {342} ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/1] {343} - ¦ ¦ °--expr: [0/0] {345} + ¦ ¦ °--expr: b [0/0] {345} ¦ ¦ °--SYMBOL: b [0/0] {344} ¦ ¦--',': , [0/4] {346} - ¦ ¦--expr: [1/0] {347} - ¦ ¦ ¦--expr: [0/1] {349} + ¦ ¦--expr: tt %> [1/0] {347} + ¦ ¦ ¦--expr: tt [0/1] {349} ¦ ¦ ¦ °--SYMBOL: tt [0/0] {348} ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/1] {350} - ¦ ¦ °--expr: [0/0] {351} - ¦ ¦ ¦--expr: [0/0] {353} + ¦ ¦ °--expr: q(r = [0/0] {351} + ¦ ¦ ¦--expr: q [0/0] {353} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: q [0/0] {352} ¦ ¦ ¦--'(': ( [0/0] {354} ¦ ¦ ¦--SYMBOL_SUB: r [0/1] {355} ¦ ¦ ¦--EQ_SUB: = [0/1] {356} - ¦ ¦ ¦--expr: [0/0] {358} + ¦ ¦ ¦--expr: 3 [0/0] {358} ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {357} ¦ ¦ °--')': ) [0/0] {359} ¦ °--')': ) [0/0] {360} ¦--COMMENT: # FIX [2/0] {361} - ¦--expr: [1/0] {362} - ¦ ¦--expr: [0/0] {364} + ¦--expr: blew( [1/0] {362} + ¦ ¦--expr: blew [0/0] {364} ¦ ¦ °--SYMBOL_FUNCTION_CALL: blew [0/0] {363} ¦ ¦--'(': ( [0/0] {365} - ¦ ¦--expr: [0/0] {366} - ¦ ¦ ¦--expr: [0/1] {368} + ¦ ¦--expr: x %>% [0/0] {366} + ¦ ¦ ¦--expr: x [0/1] {368} ¦ ¦ ¦ °--SYMBOL: x [0/0] {367} ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/7] {369} - ¦ ¦ °--expr: [2/0] {370} - ¦ ¦ ¦--expr: [0/0] {372} + ¦ ¦ °--expr: c() [2/0] {370} + ¦ ¦ ¦--expr: c [0/0] {372} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {371} ¦ ¦ ¦--'(': ( [0/0] {373} ¦ ¦ °--')': ) [0/0] {374} ¦ ¦--',': , [0/1] {375} ¦ ¦--SYMBOL_SUB: y [0/1] {376} ¦ ¦--EQ_SUB: = [0/1] {377} - ¦ ¦--expr: [0/0] {379} + ¦ ¦--expr: 2 [0/0] {379} ¦ ¦ °--NUM_CONST: 2 [0/0] {378} ¦ °--')': ) [0/0] {380} ¦--COMMENT: # FIX [2/0] {381} - ¦--expr: [1/0] {382} - ¦ ¦--expr: [0/0] {384} + ¦--expr: blew( [1/0] {382} + ¦ ¦--expr: blew [0/0] {384} ¦ ¦ °--SYMBOL_FUNCTION_CALL: blew [0/0] {383} ¦ ¦--'(': ( [0/0] {385} ¦ ¦--SYMBOL_SUB: y [0/1] {386} ¦ ¦--EQ_SUB: = [0/1] {387} - ¦ ¦--expr: [0/0] {389} + ¦ ¦--expr: 2 [0/0] {389} ¦ ¦ °--NUM_CONST: 2 [0/0] {388} ¦ ¦--',': , [0/1] {390} - ¦ ¦--expr: [0/0] {391} - ¦ ¦ ¦--expr: [0/1] {393} + ¦ ¦--expr: x %>% [0/0] {391} + ¦ ¦ ¦--expr: x [0/1] {393} ¦ ¦ ¦ °--SYMBOL: x [0/0] {392} ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/7] {394} - ¦ ¦ °--expr: [1/0] {395} - ¦ ¦ ¦--expr: [0/0] {397} + ¦ ¦ °--expr: c() [1/0] {395} + ¦ ¦ ¦--expr: c [0/0] {397} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {396} ¦ ¦ ¦--'(': ( [0/0] {398} ¦ ¦ °--')': ) [0/0] {399} ¦ °--')': ) [0/0] {400} - °--expr: [3/0] {401} + °--expr: {a %> [3/0] {401} ¦--'{': { [0/0] {402} - ¦--expr: [0/0] {403} - ¦ ¦--expr: [0/1] {406} + ¦--expr: a %>% [0/0] {403} + ¦ ¦--expr: a [0/1] {406} ¦ ¦ °--SYMBOL: a [0/0] {405} ¦ ¦--SPECIAL-PIPE: %>% [0/1] {407} - ¦ ¦--expr: [0/1] {409} + ¦ ¦--expr: c [0/1] {409} ¦ ¦ °--SYMBOL: c [0/0] {408} ¦ ¦--'+': + [0/0] {410} - ¦ °--expr: [0/0] {412} + ¦ °--expr: 1 [0/0] {412} ¦ °--NUM_CONST: 1 [0/0] {411} °--'}': } [0/0] {413} diff --git a/tests/testthat/line_breaks_and_other/pipe_and_comment-in_tree b/tests/testthat/line_breaks_and_other/pipe_and_comment-in_tree index ab7ec0e93..f46b15c2a 100644 --- a/tests/testthat/line_breaks_and_other/pipe_and_comment-in_tree +++ b/tests/testthat/line_breaks_and_other/pipe_and_comment-in_tree @@ -1,15 +1,15 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: [0/0] {1} - ¦--expr: [0/1] {2} - ¦ ¦--expr: [0/0] {4} + °--expr: 1:10 [0/0] {1} + ¦--expr: 1:10 [0/1] {2} + ¦ ¦--expr: 1 [0/0] {4} ¦ ¦ °--NUM_CONST: 1 [0/0] {3} ¦ ¦--':': : [0/0] {5} - ¦ °--expr: [0/0] {7} + ¦ °--expr: 10 [0/0] {7} ¦ °--NUM_CONST: 10 [0/0] {6} ¦--SPECIAL-PIPE: %>% [0/1] {8} ¦--COMMENT: # sum [0/2] {9} - °--expr: [1/0] {10} - ¦--expr: [0/0] {12} + °--expr: sum() [1/0] {10} + ¦--expr: sum [0/0] {12} ¦ °--SYMBOL_FUNCTION_CALL: sum [0/0] {11} ¦--'(': ( [0/0] {13} °--')': ) [0/0] {14} diff --git a/tests/testthat/line_breaks_fun_call/line_breaks_and_comments-in_tree b/tests/testthat/line_breaks_fun_call/line_breaks_and_comments-in_tree index e121d7623..899d5d938 100644 --- a/tests/testthat/line_breaks_fun_call/line_breaks_and_comments-in_tree +++ b/tests/testthat/line_breaks_fun_call/line_breaks_and_comments-in_tree @@ -1,80 +1,80 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} - ¦ ¦--expr: [0/0] {3} + ¦--expr: call( [0/0] {1} + ¦ ¦--expr: call [0/0] {3} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {2} ¦ ¦--'(': ( [0/1] {4} ¦ ¦--COMMENT: # com [0/2] {5} - ¦ ¦--expr: [1/0] {7} + ¦ ¦--expr: am [1/0] {7} ¦ ¦ °--SYMBOL: am [0/0] {6} ¦ °--')': ) [1/0] {8} - ¦--expr: [2/0] {9} - ¦ ¦--expr: [0/0] {11} + ¦--expr: call( [2/0] {9} + ¦ ¦--expr: call [0/0] {11} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {10} ¦ ¦--'(': ( [0/2] {12} ¦ ¦--COMMENT: # com [1/2] {13} - ¦ ¦--expr: [1/0] {15} + ¦ ¦--expr: am [1/0] {15} ¦ ¦ °--SYMBOL: am [0/0] {14} ¦ °--')': ) [1/0] {16} - ¦--expr: [2/0] {17} - ¦ ¦--expr: [0/0] {19} + ¦--expr: call( [2/0] {17} + ¦ ¦--expr: call [0/0] {19} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {18} ¦ ¦--'(': ( [0/0] {20} - ¦ ¦--expr: [0/1] {22} + ¦ ¦--expr: am [0/1] {22} ¦ ¦ °--SYMBOL: am [0/0] {21} ¦ ¦--COMMENT: # com [0/0] {23} ¦ °--')': ) [1/0] {24} - ¦--expr: [2/0] {25} - ¦ ¦--expr: [0/0] {27} + ¦--expr: call( [2/0] {25} + ¦ ¦--expr: call [0/0] {27} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {26} ¦ ¦--'(': ( [0/0] {28} - ¦ ¦--expr: [0/0] {30} + ¦ ¦--expr: am [0/0] {30} ¦ ¦ °--SYMBOL: am [0/0] {29} ¦ ¦--',': , [0/1] {31} ¦ ¦--COMMENT: # com [0/2] {32} - ¦ ¦--expr: [1/0] {34} + ¦ ¦--expr: pm [1/0] {34} ¦ ¦ °--SYMBOL: pm [0/0] {33} ¦ °--')': ) [1/0] {35} - ¦--expr: [3/0] {36} - ¦ ¦--expr: [0/0] {38} + ¦--expr: call( [3/0] {36} + ¦ ¦--expr: call [0/0] {38} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {37} ¦ ¦--'(': ( [0/0] {39} - ¦ ¦--expr: [0/0] {41} + ¦ ¦--expr: b [0/0] {41} ¦ ¦ °--SYMBOL: b [0/0] {40} ¦ °--')': ) [1/0] {42} - ¦--expr: [2/0] {43} - ¦ ¦--expr: [0/0] {45} + ¦--expr: call( [2/0] {43} + ¦ ¦--expr: call [0/0] {45} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {44} ¦ ¦--'(': ( [0/2] {46} - ¦ ¦--expr: [1/0] {48} + ¦ ¦--expr: a [1/0] {48} ¦ ¦ °--SYMBOL: a [0/0] {47} ¦ °--')': ) [1/0] {49} - ¦--expr: [2/0] {50} - ¦ ¦--expr: [0/0] {52} + ¦--expr: call( [2/0] {50} + ¦ ¦--expr: call [0/0] {52} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {51} ¦ ¦--'(': ( [0/2] {53} - ¦ ¦--expr: [1/1] {55} + ¦ ¦--expr: a [1/1] {55} ¦ ¦ °--SYMBOL: a [0/0] {54} ¦ ¦--COMMENT: # b [0/0] {56} ¦ °--')': ) [1/0] {57} - ¦--expr: [2/0] {58} - ¦ ¦--expr: [0/0] {60} + ¦--expr: call( [2/0] {58} + ¦ ¦--expr: call [0/0] {60} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {59} ¦ ¦--'(': ( [0/1] {61} ¦ ¦--COMMENT: # [0/0] {62} ¦ °--')': ) [1/0] {63} - ¦--expr: [2/0] {64} - ¦ ¦--expr: [0/0] {66} + ¦--expr: call( [2/0] {64} + ¦ ¦--expr: call [0/0] {66} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {65} ¦ ¦--'(': ( [0/0] {67} - ¦ ¦--expr: [0/1] {69} + ¦ ¦--expr: a [0/1] {69} ¦ ¦ °--SYMBOL: a [0/0] {68} ¦ ¦--COMMENT: # b [0/0] {70} ¦ °--')': ) [1/0] {71} - °--expr: [1/0] {72} - ¦--expr: [0/0] {74} + °--expr: call( [1/0] {72} + ¦--expr: call [0/0] {74} ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {73} ¦--'(': ( [0/0] {75} ¦--COMMENT: # b [0/2] {76} - ¦--expr: [1/0] {78} + ¦--expr: a [1/0] {78} ¦ °--SYMBOL: a [0/0] {77} °--')': ) [0/0] {79} diff --git a/tests/testthat/line_breaks_fun_call/named_arguments-in_tree b/tests/testthat/line_breaks_fun_call/named_arguments-in_tree index 538b54f00..0d1a9212a 100644 --- a/tests/testthat/line_breaks_fun_call/named_arguments-in_tree +++ b/tests/testthat/line_breaks_fun_call/named_arguments-in_tree @@ -1,114 +1,114 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} - ¦ ¦--expr: [0/0] {3} + ¦--expr: call( [0/0] {1} + ¦ ¦--expr: call [0/0] {3} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {2} ¦ ¦--'(': ( [0/0] {4} - ¦ ¦--expr: [0/0] {6} + ¦ ¦--expr: 3 [0/0] {6} ¦ ¦ °--NUM_CONST: 3 [0/0] {5} ¦ ¦--',': , [0/5] {7} ¦ ¦--SYMBOL_SUB: b [1/1] {8} ¦ ¦--EQ_SUB: = [0/1] {9} - ¦ ¦--expr: [0/0] {11} + ¦ ¦--expr: 2 [0/0] {11} ¦ ¦ °--NUM_CONST: 2 [0/0] {10} ¦ ¦--',': , [0/1] {12} - ¦ ¦--expr: [0/0] {14} + ¦ ¦--expr: c [0/0] {14} ¦ ¦ °--SYMBOL: c [0/0] {13} ¦ °--')': ) [1/0] {15} - ¦--expr: [2/0] {16} - ¦ ¦--expr: [0/0] {18} + ¦--expr: gs(3, [2/0] {16} + ¦ ¦--expr: gs [0/0] {18} ¦ ¦ °--SYMBOL_FUNCTION_CALL: gs [0/0] {17} ¦ ¦--'(': ( [0/0] {19} - ¦ ¦--expr: [0/0] {21} + ¦ ¦--expr: 3 [0/0] {21} ¦ ¦ °--NUM_CONST: 3 [0/0] {20} ¦ ¦--',': , [0/1] {22} ¦ ¦--SYMBOL_SUB: b [0/1] {23} ¦ ¦--EQ_SUB: = [0/1] {24} - ¦ ¦--expr: [0/0] {26} + ¦ ¦--expr: 2 [0/0] {26} ¦ ¦ °--NUM_CONST: 2 [0/0] {25} ¦ ¦--',': , [0/3] {27} - ¦ ¦--expr: [1/0] {29} + ¦ ¦--expr: c [1/0] {29} ¦ ¦ °--SYMBOL: c [0/0] {28} ¦ °--')': ) [0/0] {30} - ¦--expr: [2/0] {31} - ¦ ¦--expr: [0/0] {33} + ¦--expr: call( [2/0] {31} + ¦ ¦--expr: call [0/0] {33} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {32} ¦ ¦--'(': ( [0/0] {34} - ¦ ¦--expr: [0/0] {36} + ¦ ¦--expr: 3 [0/0] {36} ¦ ¦ °--NUM_CONST: 3 [0/0] {35} ¦ ¦--',': , [0/1] {37} ¦ ¦--SYMBOL_SUB: b [0/1] {38} ¦ ¦--EQ_SUB: = [0/1] {39} - ¦ ¦--expr: [0/0] {41} + ¦ ¦--expr: 2 [0/0] {41} ¦ ¦ °--NUM_CONST: 2 [0/0] {40} ¦ ¦--',': , [0/1] {42} - ¦ ¦--expr: [0/0] {44} + ¦ ¦--expr: c [0/0] {44} ¦ ¦ °--SYMBOL: c [0/0] {43} ¦ °--')': ) [0/0] {45} - ¦--expr: [2/0] {46} - ¦ ¦--expr: [0/0] {48} + ¦--expr: map(d [2/0] {46} + ¦ ¦--expr: map [0/0] {48} ¦ ¦ °--SYMBOL_FUNCTION_CALL: map [0/0] {47} ¦ ¦--'(': ( [0/0] {49} - ¦ ¦--expr: [0/0] {51} + ¦ ¦--expr: data [0/0] {51} ¦ ¦ °--SYMBOL: data [0/0] {50} ¦ ¦--',': , [0/1] {52} - ¦ ¦--expr: [0/0] {54} + ¦ ¦--expr: fun [0/0] {54} ¦ ¦ °--SYMBOL: fun [0/0] {53} ¦ ¦--',': , [0/4] {55} ¦ ¦--SYMBOL_SUB: x [1/1] {56} ¦ ¦--EQ_SUB: = [0/1] {57} - ¦ ¦--expr: [0/0] {59} + ¦ ¦--expr: 3 [0/0] {59} ¦ ¦ °--NUM_CONST: 3 [0/0] {58} ¦ ¦--',': , [0/1] {60} ¦ ¦--SYMBOL_SUB: z [0/1] {61} ¦ ¦--EQ_SUB: = [0/1] {62} - ¦ ¦--expr: [0/0] {64} + ¦ ¦--expr: 33 [0/0] {64} ¦ ¦ °--NUM_CONST: 33 [0/0] {63} ¦ °--')': ) [0/0] {65} - ¦--expr: [2/0] {66} - ¦ ¦--expr: [0/0] {68} + ¦--expr: map2( [2/0] {66} + ¦ ¦--expr: map2 [0/0] {68} ¦ ¦ °--SYMBOL_FUNCTION_CALL: map2 [0/0] {67} ¦ ¦--'(': ( [0/0] {69} - ¦ ¦--expr: [0/0] {71} + ¦ ¦--expr: dat1 [0/0] {71} ¦ ¦ °--SYMBOL: dat1 [0/0] {70} ¦ ¦--',': , [0/1] {72} - ¦ ¦--expr: [0/0] {74} + ¦ ¦--expr: data2 [0/0] {74} ¦ ¦ °--SYMBOL: data2 [0/0] {73} ¦ ¦--',': , [0/1] {75} - ¦ ¦--expr: [0/0] {77} + ¦ ¦--expr: fun [0/0] {77} ¦ ¦ °--SYMBOL: fun [0/0] {76} ¦ ¦--',': , [0/1] {78} - ¦ ¦--expr: [0/0] {80} + ¦ ¦--expr: x [0/0] {80} ¦ ¦ °--SYMBOL: x [0/0] {79} ¦ ¦--',': , [0/1] {81} - ¦ ¦--expr: [0/0] {83} + ¦ ¦--expr: y [0/0] {83} ¦ ¦ °--SYMBOL: y [0/0] {82} ¦ ¦--',': , [0/5] {84} - ¦ ¦--expr: [1/0] {86} + ¦ ¦--expr: z [1/0] {86} ¦ ¦ °--SYMBOL: z [0/0] {85} ¦ °--')': ) [0/0] {87} - °--expr: [2/0] {88} - ¦--expr: [0/0] {90} + °--expr: map2( [2/0] {88} + ¦--expr: map2 [0/0] {90} ¦ °--SYMBOL_FUNCTION_CALL: map2 [0/0] {89} ¦--'(': ( [0/0] {91} - ¦--expr: [0/0] {93} + ¦--expr: dat1 [0/0] {93} ¦ °--SYMBOL: dat1 [0/0] {92} ¦--',': , [0/1] {94} - ¦--expr: [0/0] {96} + ¦--expr: data2 [0/0] {96} ¦ °--SYMBOL: data2 [0/0] {95} ¦--',': , [0/1] {97} - ¦--expr: [0/0] {99} + ¦--expr: fun [0/0] {99} ¦ °--SYMBOL: fun [0/0] {98} ¦--',': , [0/1] {100} ¦--SYMBOL_SUB: x [0/1] {101} ¦--EQ_SUB: = [0/1] {102} - ¦--expr: [0/0] {104} + ¦--expr: 1 [0/0] {104} ¦ °--NUM_CONST: 1 [0/0] {103} ¦--',': , [0/1] {105} ¦--SYMBOL_SUB: y [0/1] {106} ¦--EQ_SUB: = [0/1] {107} - ¦--expr: [0/0] {109} + ¦--expr: 2 [0/0] {109} ¦ °--NUM_CONST: 2 [0/0] {108} ¦--',': , [0/2] {110} - ¦--expr: [1/0] {112} + ¦--expr: z [1/0] {112} ¦ °--SYMBOL: z [0/0] {111} °--')': ) [1/0] {113} diff --git a/tests/testthat/line_breaks_fun_call/switch_ifelse_etc_no_line_break-in_tree b/tests/testthat/line_breaks_fun_call/switch_ifelse_etc_no_line_break-in_tree index 7912c96f4..b0104e558 100644 --- a/tests/testthat/line_breaks_fun_call/switch_ifelse_etc_no_line_break-in_tree +++ b/tests/testthat/line_breaks_fun_call/switch_ifelse_etc_no_line_break-in_tree @@ -1,57 +1,57 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} - ¦ ¦--expr: [0/0] {3} + ¦--expr: call( [0/0] {1} + ¦ ¦--expr: call [0/0] {3} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {2} ¦ ¦--'(': ( [0/2] {4} - ¦ ¦--expr: [1/0] {6} + ¦ ¦--expr: 2 [1/0] {6} ¦ ¦ °--NUM_CONST: 2 [0/0] {5} ¦ ¦--',': , [0/2] {7} - ¦ ¦--expr: [1/0] {9} + ¦ ¦--expr: 3 [1/0] {9} ¦ ¦ °--NUM_CONST: 3 [0/0] {8} ¦ °--')': ) [1/0] {10} - ¦--expr: [2/0] {11} - ¦ ¦--expr: [0/0] {13} + ¦--expr: switc [2/0] {11} + ¦ ¦--expr: switc [0/0] {13} ¦ ¦ °--SYMBOL_FUNCTION_CALL: switc [0/0] {12} ¦ ¦--'(': ( [0/0] {14} - ¦ ¦--expr: [0/0] {16} + ¦ ¦--expr: abc [0/0] {16} ¦ ¦ °--SYMBOL: abc [0/0] {15} ¦ ¦--',': , [0/2] {17} - ¦ ¦--expr: [1/0] {19} + ¦ ¦--expr: wei9 [1/0] {19} ¦ ¦ °--SYMBOL: wei9 [0/0] {18} ¦ °--')': ) [1/0] {20} - ¦--expr: [2/0] {21} - ¦ ¦--expr: [0/0] {23} + ¦--expr: switc [2/0] {21} + ¦ ¦--expr: switc [0/0] {23} ¦ ¦ °--SYMBOL_FUNCTION_CALL: switc [0/0] {22} ¦ ¦--'(': ( [0/0] {24} - ¦ ¦--expr: [0/0] {26} + ¦ ¦--expr: abc [0/0] {26} ¦ ¦ °--SYMBOL: abc [0/0] {25} ¦ ¦--',': , [0/2] {27} - ¦ ¦--expr: [1/0] {29} + ¦ ¦--expr: wei9 [1/0] {29} ¦ ¦ °--SYMBOL: wei9 [0/0] {28} ¦ °--')': ) [1/0] {30} - ¦--expr: [2/0] {31} - ¦ ¦--expr: [0/0] {33} + ¦--expr: if_el [2/0] {31} + ¦ ¦--expr: if_el [0/0] {33} ¦ ¦ °--SYMBOL_FUNCTION_CALL: if_el [0/0] {32} ¦ ¦--'(': ( [0/0] {34} - ¦ ¦--expr: [0/0] {36} + ¦ ¦--expr: a [0/0] {36} ¦ ¦ °--SYMBOL: a [0/0] {35} ¦ ¦--',': , [0/2] {37} - ¦ ¦--expr: [1/0] {39} + ¦ ¦--expr: c [1/0] {39} ¦ ¦ °--SYMBOL: c [0/0] {38} ¦ ¦--',': , [0/1] {40} - ¦ ¦--expr: [0/0] {42} + ¦ ¦--expr: v [0/0] {42} ¦ ¦ °--SYMBOL: v [0/0] {41} ¦ °--')': ) [1/0] {43} - °--expr: [2/0] {44} - ¦--expr: [0/0] {46} + °--expr: ifels [2/0] {44} + ¦--expr: ifels [0/0] {46} ¦ °--SYMBOL_FUNCTION_CALL: ifels [0/0] {45} ¦--'(': ( [0/0] {47} - ¦--expr: [0/0] {49} + ¦--expr: x [0/0] {49} ¦ °--SYMBOL: x [0/0] {48} ¦--',': , [0/2] {50} - ¦--expr: [1/0] {52} + ¦--expr: y [1/0] {52} ¦ °--SYMBOL: y [0/0] {51} ¦--',': , [0/1] {53} - ¦--expr: [0/0] {55} + ¦--expr: z [0/0] {55} ¦ °--SYMBOL: z [0/0] {54} °--')': ) [1/0] {56} diff --git a/tests/testthat/line_breaks_fun_call/token_dependent_comments-in_tree b/tests/testthat/line_breaks_fun_call/token_dependent_comments-in_tree index 0a20815a8..519525676 100644 --- a/tests/testthat/line_breaks_fun_call/token_dependent_comments-in_tree +++ b/tests/testthat/line_breaks_fun_call/token_dependent_comments-in_tree @@ -1,33 +1,33 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} - ¦ ¦--expr: [0/0] {3} + ¦--expr: call( [0/0] {1} + ¦ ¦--expr: call [0/0] {3} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {2} ¦ ¦--'(': ( [0/0] {4} - ¦ ¦--expr: [0/0] {5} - ¦ ¦ ¦--expr: [0/0] {7} + ¦ ¦--expr: call( [0/0] {5} + ¦ ¦ ¦--expr: call [0/0] {7} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {6} ¦ ¦ ¦--'(': ( [0/6] {8} ¦ ¦ ¦--COMMENT: # com [0/0] {9} - ¦ ¦ ¦--expr: [1/3] {11} + ¦ ¦ ¦--expr: 3 [1/3] {11} ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {10} ¦ ¦ ¦--',': , [0/1] {12} - ¦ ¦ ¦--expr: [0/2] {14} + ¦ ¦ ¦--expr: 4 [0/2] {14} ¦ ¦ ¦ °--NUM_CONST: 4 [0/0] {13} ¦ ¦ °--')': ) [1/0] {15} ¦ °--')': ) [0/0] {16} - °--expr: [2/0] {17} - ¦--expr: [0/0] {19} + °--expr: call( [2/0] {17} + ¦--expr: call [0/0] {19} ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {18} ¦--'(': ( [0/3] {20} - ¦--expr: [0/0] {21} - ¦ ¦--expr: [0/0] {23} + ¦--expr: call( [0/0] {21} + ¦ ¦--expr: call [0/0] {23} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {22} ¦ ¦--'(': ( [0/0] {24} - ¦ ¦--expr: [0/0] {26} + ¦ ¦--expr: 1 [0/0] {26} ¦ ¦ °--NUM_CONST: 1 [0/0] {25} ¦ ¦--',': , [0/1] {27} ¦ ¦--COMMENT: # com [0/4] {28} - ¦ ¦--expr: [1/0] {30} + ¦ ¦--expr: 3 [1/0] {30} ¦ ¦ °--NUM_CONST: 3 [0/0] {29} ¦ °--')': ) [1/0] {31} °--')': ) [0/0] {32} diff --git a/tests/testthat/line_breaks_fun_call/token_dependent_complex_non_strict-in_tree b/tests/testthat/line_breaks_fun_call/token_dependent_complex_non_strict-in_tree index 76e7330c7..40de220ba 100644 --- a/tests/testthat/line_breaks_fun_call/token_dependent_complex_non_strict-in_tree +++ b/tests/testthat/line_breaks_fun_call/token_dependent_complex_non_strict-in_tree @@ -1,135 +1,138 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} - ¦ ¦--expr: [0/0] {3} + ¦--expr: call( [0/0] {1} + ¦ ¦--expr: call [0/0] {3} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {2} ¦ ¦--'(': ( [0/0] {4} - ¦ ¦--expr: [0/0] {5} - ¦ ¦ ¦--expr: [0/0] {7} + ¦ ¦--expr: call( [0/0] {5} + ¦ ¦ ¦--expr: call [0/0] {7} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {6} ¦ ¦ ¦--'(': ( [0/2] {8} - ¦ ¦ ¦--expr: [1/0] {10} + ¦ ¦ ¦--expr: 2 [1/0] {10} ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {9} ¦ ¦ °--')': ) [1/0] {11} ¦ °--')': ) [0/0] {12} - ¦--expr: [2/0] {13} - ¦ ¦--expr: [0/0] {15} + ¦--expr: call( [2/0] {13} + ¦ ¦--expr: call [0/0] {15} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {14} ¦ ¦--'(': ( [0/0] {16} - ¦ ¦--expr: [0/0] {17} - ¦ ¦ ¦--expr: [0/0] {19} + ¦ ¦--expr: call( [0/0] {17} + ¦ ¦ ¦--expr: call [0/0] {19} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {18} ¦ ¦ ¦--'(': ( [0/0] {20} - ¦ ¦ ¦--expr: [0/0] {22} + ¦ ¦ ¦--expr: 1 [0/0] {22} ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {21} ¦ ¦ ¦--',': , [0/10] {23} - ¦ ¦ ¦--expr: [1/0] {25} + ¦ ¦ ¦--expr: 2 [1/0] {25} ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {24} ¦ ¦ °--')': ) [0/0] {26} ¦ °--')': ) [0/0] {27} ¦--COMMENT: # mul [1/0] {28} - ¦--expr: [1/0] {29} - ¦ ¦--expr: [0/0] {31} + ¦--expr: call( [1/0] {29} + ¦ ¦--expr: call [0/0] {31} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {30} ¦ ¦--'(': ( [0/0] {32} - ¦ ¦--expr: [0/0] {33} - ¦ ¦ ¦--expr: [0/0] {35} + ¦ ¦--expr: a(b(c [0/0] {33} + ¦ ¦ ¦--expr: a [0/0] {35} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: a [0/0] {34} ¦ ¦ ¦--'(': ( [0/0] {36} - ¦ ¦ ¦--expr: [0/0] {37} - ¦ ¦ ¦ ¦--expr: [0/0] {39} + ¦ ¦ ¦--expr: b(c({ [0/0] {37} + ¦ ¦ ¦ ¦--expr: b [0/0] {39} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: b [0/0] {38} ¦ ¦ ¦ ¦--'(': ( [0/0] {40} - ¦ ¦ ¦ ¦--expr: [0/0] {41} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {43} + ¦ ¦ ¦ ¦--expr: c({ +} [0/0] {41} + ¦ ¦ ¦ ¦ ¦--expr: c [0/0] {43} ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {42} ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {44} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {45} + ¦ ¦ ¦ ¦ ¦--expr: { +} [0/0] {45} ¦ ¦ ¦ ¦ ¦ ¦--'{': { [0/0] {46} ¦ ¦ ¦ ¦ ¦ °--'}': } [1/0] {47} ¦ ¦ ¦ ¦ °--')': ) [0/0] {48} ¦ ¦ ¦ °--')': ) [0/0] {49} ¦ ¦ °--')': ) [0/0] {50} ¦ °--')': ) [0/0] {51} - ¦--expr: [2/0] {52} - ¦ ¦--expr: [0/0] {54} + ¦--expr: call( [2/0] {52} + ¦ ¦--expr: call [0/0] {54} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {53} ¦ ¦--'(': ( [0/0] {55} - ¦ ¦--expr: [0/1] {56} - ¦ ¦ ¦--expr: [0/0] {58} + ¦ ¦--expr: call( [0/1] {56} + ¦ ¦ ¦--expr: call [0/0] {58} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {57} ¦ ¦ ¦--'(': ( [0/2] {59} - ¦ ¦ ¦--expr: [1/1] {61} + ¦ ¦ ¦--expr: 2 [1/1] {61} ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {60} ¦ ¦ °--')': ) [0/0] {62} ¦ ¦--',': , [0/2] {63} - ¦ ¦--expr: [1/1] {65} + ¦ ¦--expr: 5 [1/1] {65} ¦ ¦ °--NUM_CONST: 5 [0/0] {64} ¦ °--')': ) [0/0] {66} - ¦--expr: [3/0] {67} - ¦ ¦--expr: [0/0] {69} + ¦--expr: call( [3/0] {67} + ¦ ¦--expr: call [0/0] {69} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {68} ¦ ¦--'(': ( [0/0] {70} - ¦ ¦--expr: [0/0] {71} - ¦ ¦ ¦--expr: [0/0] {73} + ¦ ¦--expr: call( [0/0] {71} + ¦ ¦ ¦--expr: call [0/0] {73} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {72} ¦ ¦ ¦--'(': ( [0/0] {74} - ¦ ¦ ¦--expr: [0/0] {76} + ¦ ¦ ¦--expr: 1 [0/0] {76} ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {75} ¦ ¦ ¦--',': , [0/10] {77} - ¦ ¦ ¦--expr: [1/0] {79} + ¦ ¦ ¦--expr: 2 [1/0] {79} ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {78} ¦ ¦ ¦--',': , [0/1] {80} - ¦ ¦ ¦--expr: [0/0] {81} - ¦ ¦ ¦ ¦--expr: [0/0] {83} + ¦ ¦ ¦--expr: c( + [0/0] {81} + ¦ ¦ ¦ ¦--expr: c [0/0] {83} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {82} ¦ ¦ ¦ ¦--'(': ( [0/12] {84} - ¦ ¦ ¦ ¦--expr: [1/10] {86} + ¦ ¦ ¦ ¦--expr: 3 [1/10] {86} ¦ ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {85} ¦ ¦ ¦ °--')': ) [1/0] {87} ¦ ¦ °--')': ) [0/0] {88} ¦ °--')': ) [0/0] {89} - ¦--expr: [2/0] {90} - ¦ ¦--expr: [0/0] {92} + ¦--expr: call( [2/0] {90} + ¦ ¦--expr: call [0/0] {92} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {91} ¦ ¦--'(': ( [0/0] {93} - ¦ ¦--expr: [0/0] {95} + ¦ ¦--expr: 1 [0/0] {95} ¦ ¦ °--NUM_CONST: 1 [0/0] {94} ¦ ¦--',': , [0/5] {96} - ¦ ¦--expr: [1/0] {97} - ¦ ¦ ¦--expr: [0/0] {99} + ¦ ¦--expr: call2 [1/0] {97} + ¦ ¦ ¦--expr: call2 [0/0] {99} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call2 [0/0] {98} ¦ ¦ ¦--'(': ( [0/0] {100} - ¦ ¦ ¦--expr: [0/0] {102} + ¦ ¦ ¦--expr: 3 [0/0] {102} ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {101} ¦ ¦ ¦--',': , [0/1] {103} - ¦ ¦ ¦--expr: [0/0] {105} + ¦ ¦ ¦--expr: 4 [0/0] {105} ¦ ¦ ¦ °--NUM_CONST: 4 [0/0] {104} ¦ ¦ ¦--',': , [0/1] {106} - ¦ ¦ ¦--expr: [0/5] {107} - ¦ ¦ ¦ ¦--expr: [0/0] {109} + ¦ ¦ ¦--expr: call( [0/5] {107} + ¦ ¦ ¦ ¦--expr: call [0/0] {109} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {108} ¦ ¦ ¦ ¦--'(': ( [0/0] {110} - ¦ ¦ ¦ ¦--expr: [0/0] {112} + ¦ ¦ ¦ ¦--expr: 3 [0/0] {112} ¦ ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {111} ¦ ¦ ¦ ¦--',': , [0/22] {113} - ¦ ¦ ¦ ¦--expr: [1/0] {115} + ¦ ¦ ¦ ¦--expr: 4 [1/0] {115} ¦ ¦ ¦ ¦ °--NUM_CONST: 4 [0/0] {114} ¦ ¦ ¦ ¦--',': , [0/1] {116} - ¦ ¦ ¦ ¦--expr: [0/5] {117} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {119} + ¦ ¦ ¦ ¦--expr: call( [0/5] {117} + ¦ ¦ ¦ ¦ ¦--expr: call [0/0] {119} ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {118} ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {120} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {122} + ¦ ¦ ¦ ¦ ¦--expr: 5 [0/0] {122} ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 5 [0/0] {121} ¦ ¦ ¦ ¦ ¦--',': , [0/1] {123} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {125} + ¦ ¦ ¦ ¦ ¦--expr: 6 [0/0] {125} ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 6 [0/0] {124} ¦ ¦ ¦ ¦ ¦--',': , [0/1] {126} - ¦ ¦ ¦ ¦ ¦--expr: [0/22] {127} - ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/0] {129} + ¦ ¦ ¦ ¦ ¦--expr: call( [0/22] {127} + ¦ ¦ ¦ ¦ ¦ ¦--expr: call [0/0] {129} ¦ ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {128} ¦ ¦ ¦ ¦ ¦ ¦--'(': ( [0/24] {130} - ¦ ¦ ¦ ¦ ¦ ¦--expr: [1/22] {132} + ¦ ¦ ¦ ¦ ¦ ¦--expr: 2 [1/22] {132} ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {131} ¦ ¦ ¦ ¦ ¦ °--')': ) [1/0] {133} ¦ ¦ ¦ ¦ °--')': ) [1/0] {134} @@ -137,30 +140,30 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦ ¦ °--')': ) [1/0] {136} ¦ °--')': ) [1/0] {137} ¦--COMMENT: # com [2/0] {138} - ¦--expr: [2/0] {139} - ¦ ¦--expr: [0/0] {141} + ¦--expr: call( [2/0] {139} + ¦ ¦--expr: call [0/0] {141} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {140} ¦ ¦--'(': ( [0/0] {142} - ¦ ¦--expr: [0/0] {143} - ¦ ¦ ¦--expr: [0/0] {145} + ¦ ¦--expr: call( [0/0] {143} + ¦ ¦ ¦--expr: call [0/0] {145} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {144} ¦ ¦ ¦--'(': ( [0/2] {146} - ¦ ¦ ¦--expr: [1/0] {148} + ¦ ¦ ¦--expr: 2 [1/0] {148} ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {147} ¦ ¦ °--')': ) [1/0] {149} ¦ °--')': ) [0/0] {150} - °--expr: [2/0] {151} - ¦--expr: [0/0] {153} + °--expr: call( [2/0] {151} + ¦--expr: call [0/0] {153} ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {152} ¦--'(': ( [0/0] {154} - ¦--expr: [0/0] {156} + ¦--expr: 1 [0/0] {156} ¦ °--NUM_CONST: 1 [0/0] {155} ¦--',': , [0/1] {157} - ¦--expr: [0/0] {158} - ¦ ¦--expr: [0/0] {160} + ¦--expr: call( [0/0] {158} + ¦ ¦--expr: call [0/0] {160} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {159} ¦ ¦--'(': ( [0/2] {161} - ¦ ¦--expr: [1/0] {163} + ¦ ¦--expr: 23 [1/0] {163} ¦ ¦ °--NUM_CONST: 23 [0/0] {162} ¦ °--')': ) [1/0] {164} °--')': ) [0/0] {165} diff --git a/tests/testthat/line_breaks_fun_call/token_dependent_complex_strict-in_tree b/tests/testthat/line_breaks_fun_call/token_dependent_complex_strict-in_tree index 69fa8e6ba..427acba96 100644 --- a/tests/testthat/line_breaks_fun_call/token_dependent_complex_strict-in_tree +++ b/tests/testthat/line_breaks_fun_call/token_dependent_complex_strict-in_tree @@ -1,135 +1,138 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} - ¦ ¦--expr: [0/0] {3} + ¦--expr: call( [0/0] {1} + ¦ ¦--expr: call [0/0] {3} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {2} ¦ ¦--'(': ( [0/0] {4} - ¦ ¦--expr: [0/0] {5} - ¦ ¦ ¦--expr: [0/0] {7} + ¦ ¦--expr: call( [0/0] {5} + ¦ ¦ ¦--expr: call [0/0] {7} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {6} ¦ ¦ ¦--'(': ( [0/0] {8} - ¦ ¦ ¦--expr: [1/2] {10} + ¦ ¦ ¦--expr: 2 [1/2] {10} ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {9} ¦ ¦ °--')': ) [1/0] {11} ¦ °--')': ) [0/0] {12} - ¦--expr: [2/0] {13} - ¦ ¦--expr: [0/0] {15} + ¦--expr: call( [2/0] {13} + ¦ ¦--expr: call [0/0] {15} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {14} ¦ ¦--'(': ( [0/2] {16} - ¦ ¦--expr: [0/2] {17} - ¦ ¦ ¦--expr: [0/0] {19} + ¦ ¦--expr: call( [0/2] {17} + ¦ ¦ ¦--expr: call [0/0] {19} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {18} ¦ ¦ ¦--'(': ( [0/0] {20} - ¦ ¦ ¦--expr: [0/0] {22} + ¦ ¦ ¦--expr: 1 [0/0] {22} ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {21} ¦ ¦ ¦--',': , [0/6] {23} - ¦ ¦ ¦--expr: [1/0] {25} + ¦ ¦ ¦--expr: 2 [1/0] {25} ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {24} ¦ ¦ °--')': ) [0/0] {26} ¦ °--')': ) [0/0] {27} ¦--COMMENT: # mul [1/0] {28} - ¦--expr: [1/3] {29} - ¦ ¦--expr: [0/0] {31} + ¦--expr: call( [1/3] {29} + ¦ ¦--expr: call [0/0] {31} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {30} ¦ ¦--'(': ( [0/0] {32} - ¦ ¦--expr: [0/0] {33} - ¦ ¦ ¦--expr: [0/0] {35} + ¦ ¦--expr: a(b( [0/0] {33} + ¦ ¦ ¦--expr: a [0/0] {35} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: a [0/0] {34} ¦ ¦ ¦--'(': ( [0/0] {36} - ¦ ¦ ¦--expr: [0/0] {37} - ¦ ¦ ¦ ¦--expr: [0/0] {39} + ¦ ¦ ¦--expr: b( c [0/0] {37} + ¦ ¦ ¦ ¦--expr: b [0/0] {39} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: b [0/0] {38} ¦ ¦ ¦ ¦--'(': ( [0/2] {40} - ¦ ¦ ¦ ¦--expr: [0/0] {41} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {43} + ¦ ¦ ¦ ¦--expr: c({ + [0/0] {41} + ¦ ¦ ¦ ¦ ¦--expr: c [0/0] {43} ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {42} ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {44} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {45} + ¦ ¦ ¦ ¦ ¦--expr: { + [0/0] {45} ¦ ¦ ¦ ¦ ¦ ¦--'{': { [0/3] {46} ¦ ¦ ¦ ¦ ¦ °--'}': } [1/0] {47} ¦ ¦ ¦ ¦ °--')': ) [0/0] {48} ¦ ¦ ¦ °--')': ) [0/0] {49} ¦ ¦ °--')': ) [0/0] {50} ¦ °--')': ) [0/0] {51} - ¦--expr: [2/2] {52} - ¦ ¦--expr: [0/0] {54} + ¦--expr: call( [2/2] {52} + ¦ ¦--expr: call [0/0] {54} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {53} ¦ ¦--'(': ( [0/0] {55} - ¦ ¦--expr: [0/1] {56} - ¦ ¦ ¦--expr: [0/0] {58} + ¦ ¦--expr: call( [0/1] {56} + ¦ ¦ ¦--expr: call [0/0] {58} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {57} ¦ ¦ ¦--'(': ( [0/5] {59} - ¦ ¦ ¦--expr: [1/1] {61} + ¦ ¦ ¦--expr: 2 [1/1] {61} ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {60} ¦ ¦ °--')': ) [0/0] {62} ¦ ¦--',': , [0/0] {63} - ¦ ¦--expr: [1/1] {65} + ¦ ¦--expr: 5 [1/1] {65} ¦ ¦ °--NUM_CONST: 5 [0/0] {64} ¦ °--')': ) [0/0] {66} - ¦--expr: [3/0] {67} - ¦ ¦--expr: [0/0] {69} + ¦--expr: call( [3/0] {67} + ¦ ¦--expr: call [0/0] {69} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {68} ¦ ¦--'(': ( [0/0] {70} - ¦ ¦--expr: [0/0] {71} - ¦ ¦ ¦--expr: [0/0] {73} + ¦ ¦--expr: call( [0/0] {71} + ¦ ¦ ¦--expr: call [0/0] {73} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {72} ¦ ¦ ¦--'(': ( [0/0] {74} - ¦ ¦ ¦--expr: [0/0] {76} + ¦ ¦ ¦--expr: 1 [0/0] {76} ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {75} ¦ ¦ ¦--',': , [0/14] {77} - ¦ ¦ ¦--expr: [1/0] {79} + ¦ ¦ ¦--expr: 2 [1/0] {79} ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {78} ¦ ¦ ¦--',': , [0/1] {80} - ¦ ¦ ¦--expr: [0/0] {81} - ¦ ¦ ¦ ¦--expr: [0/0] {83} + ¦ ¦ ¦--expr: c( + [0/0] {81} + ¦ ¦ ¦ ¦--expr: c [0/0] {83} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {82} ¦ ¦ ¦ ¦--'(': ( [0/15] {84} - ¦ ¦ ¦ ¦--expr: [1/11] {86} + ¦ ¦ ¦ ¦--expr: 3 [1/11] {86} ¦ ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {85} ¦ ¦ ¦ °--')': ) [1/0] {87} ¦ ¦ °--')': ) [0/0] {88} ¦ °--')': ) [0/0] {89} - ¦--expr: [2/0] {90} - ¦ ¦--expr: [0/0] {92} + ¦--expr: call( [2/0] {90} + ¦ ¦--expr: call [0/0] {92} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {91} ¦ ¦--'(': ( [0/0] {93} - ¦ ¦--expr: [0/0] {95} + ¦ ¦--expr: 1 [0/0] {95} ¦ ¦ °--NUM_CONST: 1 [0/0] {94} ¦ ¦--',': , [0/3] {96} - ¦ ¦--expr: [1/0] {97} - ¦ ¦ ¦--expr: [0/0] {99} + ¦ ¦--expr: call2 [1/0] {97} + ¦ ¦ ¦--expr: call2 [0/0] {99} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call2 [0/0] {98} ¦ ¦ ¦--'(': ( [0/0] {100} - ¦ ¦ ¦--expr: [0/0] {102} + ¦ ¦ ¦--expr: 3 [0/0] {102} ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {101} ¦ ¦ ¦--',': , [0/1] {103} - ¦ ¦ ¦--expr: [0/0] {105} + ¦ ¦ ¦--expr: 4 [0/0] {105} ¦ ¦ ¦ °--NUM_CONST: 4 [0/0] {104} ¦ ¦ ¦--',': , [0/1] {106} - ¦ ¦ ¦--expr: [0/0] {107} - ¦ ¦ ¦ ¦--expr: [0/0] {109} + ¦ ¦ ¦--expr: call( [0/0] {107} + ¦ ¦ ¦ ¦--expr: call [0/0] {109} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {108} ¦ ¦ ¦ ¦--'(': ( [0/0] {110} - ¦ ¦ ¦ ¦--expr: [0/0] {112} + ¦ ¦ ¦ ¦--expr: 3 [0/0] {112} ¦ ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {111} ¦ ¦ ¦ ¦--',': , [0/0] {113} - ¦ ¦ ¦ ¦--expr: [1/0] {115} + ¦ ¦ ¦ ¦--expr: 4 [1/0] {115} ¦ ¦ ¦ ¦ °--NUM_CONST: 4 [0/0] {114} ¦ ¦ ¦ ¦--',': , [0/1] {116} - ¦ ¦ ¦ ¦--expr: [0/0] {117} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {119} + ¦ ¦ ¦ ¦--expr: call( [0/0] {117} + ¦ ¦ ¦ ¦ ¦--expr: call [0/0] {119} ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {118} ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {120} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {122} + ¦ ¦ ¦ ¦ ¦--expr: 5 [0/0] {122} ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 5 [0/0] {121} ¦ ¦ ¦ ¦ ¦--',': , [0/1] {123} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {125} + ¦ ¦ ¦ ¦ ¦--expr: 6 [0/0] {125} ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 6 [0/0] {124} ¦ ¦ ¦ ¦ ¦--',': , [0/1] {126} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {127} - ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/0] {129} + ¦ ¦ ¦ ¦ ¦--expr: call( [0/0] {127} + ¦ ¦ ¦ ¦ ¦ ¦--expr: call [0/0] {129} ¦ ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {128} ¦ ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {130} - ¦ ¦ ¦ ¦ ¦ ¦--expr: [1/0] {132} + ¦ ¦ ¦ ¦ ¦ ¦--expr: 2 [1/0] {132} ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {131} ¦ ¦ ¦ ¦ ¦ °--')': ) [1/0] {133} ¦ ¦ ¦ ¦ °--')': ) [1/0] {134} @@ -137,30 +140,30 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦ ¦ °--')': ) [1/0] {136} ¦ °--')': ) [1/0] {137} ¦--COMMENT: # com [2/0] {138} - ¦--expr: [2/2] {139} - ¦ ¦--expr: [0/0] {141} + ¦--expr: call( [2/2] {139} + ¦ ¦--expr: call [0/0] {141} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {140} ¦ ¦--'(': ( [0/0] {142} - ¦ ¦--expr: [0/0] {143} - ¦ ¦ ¦--expr: [0/0] {145} + ¦ ¦--expr: call( [0/0] {143} + ¦ ¦ ¦--expr: call [0/0] {145} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {144} ¦ ¦ ¦--'(': ( [0/0] {146} - ¦ ¦ ¦--expr: [1/0] {148} + ¦ ¦ ¦--expr: 2 [1/0] {148} ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {147} ¦ ¦ °--')': ) [1/0] {149} ¦ °--')': ) [0/0] {150} - °--expr: [2/0] {151} - ¦--expr: [0/0] {153} + °--expr: call( [2/0] {151} + ¦--expr: call [0/0] {153} ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {152} ¦--'(': ( [0/0] {154} - ¦--expr: [0/0] {156} + ¦--expr: 1 [0/0] {156} ¦ °--NUM_CONST: 1 [0/0] {155} ¦--',': , [0/1] {157} - ¦--expr: [0/0] {158} - ¦ ¦--expr: [0/0] {160} + ¦--expr: call( [0/0] {158} + ¦ ¦--expr: call [0/0] {160} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {159} ¦ ¦--'(': ( [0/2] {161} - ¦ ¦--expr: [1/0] {163} + ¦ ¦--expr: 23 [1/0] {163} ¦ ¦ °--NUM_CONST: 23 [0/0] {162} ¦ °--')': ) [1/0] {164} °--')': ) [0/0] {165} diff --git a/tests/testthat/line_breaks_fun_call/token_dependent_mixed-in_tree b/tests/testthat/line_breaks_fun_call/token_dependent_mixed-in_tree index 1dc1b027d..c9c77f628 100644 --- a/tests/testthat/line_breaks_fun_call/token_dependent_mixed-in_tree +++ b/tests/testthat/line_breaks_fun_call/token_dependent_mixed-in_tree @@ -1,237 +1,238 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} - ¦ ¦--expr: [0/0] {3} + ¦--expr: call( [0/0] {1} + ¦ ¦--expr: call [0/0] {3} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {2} ¦ ¦--'(': ( [0/0] {4} - ¦ ¦--expr: [0/0] {5} - ¦ ¦ ¦--expr: [0/0] {7} + ¦ ¦--expr: call( [0/0] {5} + ¦ ¦ ¦--expr: call [0/0] {7} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {6} ¦ ¦ ¦--'(': ( [0/0] {8} - ¦ ¦ ¦--expr: [0/0] {9} - ¦ ¦ ¦ ¦--expr: [0/0] {11} + ¦ ¦ ¦--expr: call3 [0/0] {9} + ¦ ¦ ¦ ¦--expr: call3 [0/0] {11} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call3 [0/0] {10} ¦ ¦ ¦ ¦--'(': ( [0/0] {12} ¦ ¦ ¦ °--')': ) [0/0] {13} ¦ ¦ ¦--',': , [0/1] {14} - ¦ ¦ ¦--expr: [0/0] {16} + ¦ ¦ ¦--expr: call [0/0] {16} ¦ ¦ ¦ °--SYMBOL: call [0/0] {15} ¦ ¦ ¦--',': , [0/6] {17} - ¦ ¦ ¦--expr: [1/0] {19} + ¦ ¦ ¦--expr: 4433 [1/0] {19} ¦ ¦ ¦ °--NUM_CONST: 4433 [0/0] {18} ¦ ¦ ¦--',': , [0/8] {20} - ¦ ¦ ¦--expr: [1/0] {22} + ¦ ¦ ¦--expr: 55 [1/0] {22} ¦ ¦ ¦ °--NUM_CONST: 55 [0/0] {21} ¦ ¦ °--')': ) [0/0] {23} ¦ °--')': ) [0/0] {24} - ¦--expr: [2/0] {25} - ¦ ¦--expr: [0/0] {27} + ¦--expr: call( [2/0] {25} + ¦ ¦--expr: call [0/0] {27} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {26} ¦ ¦--'(': ( [0/0] {28} - ¦ ¦--expr: [0/0] {29} - ¦ ¦ ¦--expr: [0/0] {31} + ¦ ¦--expr: call( [0/0] {29} + ¦ ¦ ¦--expr: call [0/0] {31} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {30} ¦ ¦ ¦--'(': ( [0/0] {32} - ¦ ¦ ¦--expr: [0/0] {33} - ¦ ¦ ¦ ¦--expr: [0/0] {35} + ¦ ¦ ¦--expr: call3 [0/0] {33} + ¦ ¦ ¦ ¦--expr: call3 [0/0] {35} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call3 [0/0] {34} ¦ ¦ ¦ ¦--'(': ( [0/0] {36} ¦ ¦ ¦ °--')': ) [0/0] {37} ¦ ¦ ¦--',': , [0/1] {38} - ¦ ¦ ¦--expr: [0/0] {40} + ¦ ¦ ¦--expr: call [0/0] {40} ¦ ¦ ¦ °--SYMBOL: call [0/0] {39} ¦ ¦ ¦--',': , [0/4] {41} - ¦ ¦ ¦--expr: [1/0] {43} + ¦ ¦ ¦--expr: 4433 [1/0] {43} ¦ ¦ ¦ °--NUM_CONST: 4433 [0/0] {42} ¦ ¦ ¦--',': , [0/10] {44} - ¦ ¦ ¦--expr: [1/0] {46} + ¦ ¦ ¦--expr: 55 [1/0] {46} ¦ ¦ ¦ °--NUM_CONST: 55 [0/0] {45} ¦ ¦ °--')': ) [1/0] {47} ¦ °--')': ) [0/0] {48} - ¦--expr: [1/0] {49} - ¦ ¦--expr: [0/0] {51} + ¦--expr: call( [1/0] {49} + ¦ ¦--expr: call [0/0] {51} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {50} ¦ ¦--'(': ( [0/0] {52} - ¦ ¦--expr: [0/0] {53} - ¦ ¦ ¦--expr: [0/0] {55} + ¦ ¦--expr: call( [0/0] {53} + ¦ ¦ ¦--expr: call [0/0] {55} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {54} ¦ ¦ ¦--'(': ( [0/0] {56} - ¦ ¦ ¦--expr: [0/0] {57} - ¦ ¦ ¦ ¦--expr: [0/0] {59} + ¦ ¦ ¦--expr: call3 [0/0] {57} + ¦ ¦ ¦ ¦--expr: call3 [0/0] {59} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call3 [0/0] {58} ¦ ¦ ¦ ¦--'(': ( [0/0] {60} ¦ ¦ ¦ °--')': ) [0/0] {61} ¦ ¦ ¦--',': , [0/1] {62} - ¦ ¦ ¦--expr: [0/0] {64} + ¦ ¦ ¦--expr: call [0/0] {64} ¦ ¦ ¦ °--SYMBOL: call [0/0] {63} ¦ ¦ ¦--',': , [0/13] {65} - ¦ ¦ ¦--expr: [1/0] {67} + ¦ ¦ ¦--expr: 4433 [1/0] {67} ¦ ¦ ¦ °--NUM_CONST: 4433 [0/0] {66} ¦ ¦ ¦--',': , [0/10] {68} - ¦ ¦ ¦--expr: [1/0] {70} + ¦ ¦ ¦--expr: 55 [1/0] {70} ¦ ¦ ¦ °--NUM_CONST: 55 [0/0] {69} ¦ ¦ °--')': ) [0/0] {71} ¦ °--')': ) [1/0] {72} ¦--COMMENT: # no [4/0] {73} - ¦--expr: [1/0] {74} - ¦ ¦--expr: [0/0] {76} + ¦--expr: call( [1/0] {74} + ¦ ¦--expr: call [0/0] {76} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {75} ¦ ¦--'(': ( [0/0] {77} - ¦ ¦--expr: [0/0] {78} - ¦ ¦ ¦--expr: [0/0] {80} + ¦ ¦--expr: call( [0/0] {78} + ¦ ¦ ¦--expr: call [0/0] {80} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {79} ¦ ¦ ¦--'(': ( [0/2] {81} - ¦ ¦ ¦--expr: [1/0] {83} + ¦ ¦ ¦--expr: 3 [1/0] {83} ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {82} ¦ ¦ ¦--',': , [0/1] {84} - ¦ ¦ ¦--expr: [0/0] {86} + ¦ ¦ ¦--expr: 4 [0/0] {86} ¦ ¦ ¦ °--NUM_CONST: 4 [0/0] {85} ¦ ¦ °--')': ) [1/0] {87} ¦ °--')': ) [0/0] {88} - ¦--expr: [3/0] {89} - ¦ ¦--expr: [0/0] {91} + ¦--expr: call( [3/0] {89} + ¦ ¦--expr: call [0/0] {91} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {90} ¦ ¦--'(': ( [0/0] {92} - ¦ ¦--expr: [0/4] {94} + ¦ ¦--expr: 3 [0/4] {94} ¦ ¦ °--NUM_CONST: 3 [0/0] {93} ¦ ¦--',': , [0/5] {95} - ¦ ¦--expr: [1/0] {97} + ¦ ¦--expr: 3 [1/0] {97} ¦ ¦ °--NUM_CONST: 3 [0/0] {96} ¦ °--')': ) [1/0] {98} - ¦--expr: [3/0] {99} - ¦ ¦--expr: [0/0] {101} + ¦--expr: call( [3/0] {99} + ¦ ¦--expr: call [0/0] {101} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {100} ¦ ¦--'(': ( [0/0] {102} - ¦ ¦--expr: [0/0] {103} - ¦ ¦ ¦--expr: [0/0] {105} + ¦ ¦--expr: call( [0/0] {103} + ¦ ¦ ¦--expr: call [0/0] {105} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {104} ¦ ¦ ¦--'(': ( [0/0] {106} - ¦ ¦ ¦--expr: [0/0] {107} - ¦ ¦ ¦ ¦--expr: [0/0] {109} + ¦ ¦ ¦--expr: call3 [0/0] {107} + ¦ ¦ ¦ ¦--expr: call3 [0/0] {109} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call3 [0/0] {108} ¦ ¦ ¦ ¦--'(': ( [0/0] {110} ¦ ¦ ¦ °--')': ) [0/0] {111} ¦ ¦ ¦--',': , [0/1] {112} - ¦ ¦ ¦--expr: [0/0] {114} + ¦ ¦ ¦--expr: call [0/0] {114} ¦ ¦ ¦ °--SYMBOL: call [0/0] {113} ¦ ¦ ¦--',': , [0/4] {115} - ¦ ¦ ¦--expr: [1/0] {117} + ¦ ¦ ¦--expr: 44 [1/0] {117} ¦ ¦ ¦ °--NUM_CONST: 44 [0/0] {116} ¦ ¦ ¦--',': , [0/4] {118} - ¦ ¦ ¦--expr: [1/0] {120} + ¦ ¦ ¦--expr: 55 [1/0] {120} ¦ ¦ ¦ °--NUM_CONST: 55 [0/0] {119} ¦ ¦ °--')': ) [1/0] {121} ¦ °--')': ) [0/0] {122} ¦--COMMENT: # [2/0] {123} - ¦--expr: [2/0] {124} - ¦ ¦--expr: [0/0] {126} + ¦--expr: call( [2/0] {124} + ¦ ¦--expr: call [0/0] {126} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {125} ¦ ¦--'(': ( [0/0] {127} - ¦ ¦--expr: [0/0] {129} + ¦ ¦--expr: call [0/0] {129} ¦ ¦ °--SYMBOL: call [0/0] {128} ¦ ¦--',': , [0/0] {130} - ¦ ¦--expr: [0/0] {131} - ¦ ¦ ¦--expr: [0/0] {133} + ¦ ¦--expr: call( [0/0] {131} + ¦ ¦ ¦--expr: call [0/0] {133} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {132} ¦ ¦ ¦--'(': ( [0/0] {134} ¦ ¦ °--')': ) [0/0] {135} ¦ ¦--',': , [0/5] {136} - ¦ ¦--expr: [1/0] {138} + ¦ ¦--expr: 3 [1/0] {138} ¦ ¦ °--NUM_CONST: 3 [0/0] {137} ¦ ¦--',': , [0/5] {139} - ¦ ¦--expr: [1/0] {141} + ¦ ¦--expr: 4 [1/0] {141} ¦ ¦ °--NUM_CONST: 4 [0/0] {140} ¦ °--')': ) [1/0] {142} - ¦--expr: [2/0] {143} - ¦ ¦--expr: [0/0] {145} + ¦--expr: call( [2/0] {143} + ¦ ¦--expr: call [0/0] {145} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {144} ¦ ¦--'(': ( [0/0] {146} - ¦ ¦--expr: [0/0] {147} - ¦ ¦ ¦--expr: [0/0] {149} + ¦ ¦--expr: call( [0/0] {147} + ¦ ¦ ¦--expr: call [0/0] {149} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {148} ¦ ¦ ¦--'(': ( [0/3] {150} - ¦ ¦ ¦--expr: [1/3] {152} + ¦ ¦ ¦--expr: 3 [1/3] {152} ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {151} ¦ ¦ ¦--',': , [0/1] {153} - ¦ ¦ ¦--expr: [0/0] {155} + ¦ ¦ ¦--expr: 4 [0/0] {155} ¦ ¦ ¦ °--NUM_CONST: 4 [0/0] {154} ¦ ¦ °--')': ) [1/0] {156} ¦ °--')': ) [0/0] {157} - ¦--expr: [2/0] {158} - ¦ ¦--expr: [0/0] {160} + ¦--expr: call( [2/0] {158} + ¦ ¦--expr: call [0/0] {160} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {159} ¦ ¦--'(': ( [0/0] {161} - ¦ ¦--expr: [0/0] {162} - ¦ ¦ ¦--expr: [0/0] {164} + ¦ ¦--expr: call( [0/0] {162} + ¦ ¦ ¦--expr: call [0/0] {164} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {163} ¦ ¦ ¦--'(': ( [0/0] {165} - ¦ ¦ ¦--expr: [0/0] {167} + ¦ ¦ ¦--expr: 1 [0/0] {167} ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {166} ¦ ¦ ¦--',': , [0/6] {168} - ¦ ¦ ¦--expr: [1/0] {170} + ¦ ¦ ¦--expr: 3 [1/0] {170} ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {169} ¦ ¦ °--')': ) [1/0] {171} ¦ °--')': ) [0/0] {172} ¦--COMMENT: # if [2/2] {173} - ¦--expr: [3/0] {174} - ¦ ¦--expr: [0/0] {176} + ¦--expr: call( [3/0] {174} + ¦ ¦--expr: call [0/0] {176} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {175} ¦ ¦--'(': ( [0/0] {177} - ¦ ¦--expr: [1/2] {179} + ¦ ¦--expr: 2 [1/2] {179} ¦ ¦ °--NUM_CONST: 2 [0/0] {178} ¦ °--')': ) [1/0] {180} - ¦--expr: [1/0] {181} - ¦ ¦--expr: [0/0] {183} + ¦--expr: cjald [1/0] {181} + ¦ ¦--expr: cjald [0/0] {183} ¦ ¦ °--SYMBOL_FUNCTION_CALL: cjald [0/0] {182} ¦ ¦--'(': ( [0/0] {184} - ¦ ¦--expr: [0/0] {186} + ¦ ¦--expr: 1 [0/0] {186} ¦ ¦ °--NUM_CONST: 1 [0/0] {185} ¦ ¦--',': , [0/11] {187} - ¦ ¦--expr: [1/0] {189} + ¦ ¦--expr: 3 [1/0] {189} ¦ ¦ °--NUM_CONST: 3 [0/0] {188} ¦ °--')': ) [0/0] {190} - ¦--expr: [2/2] {191} - ¦ ¦--expr: [0/0] {193} + ¦--expr: jclak [2/2] {191} + ¦ ¦--expr: jclak [0/0] {193} ¦ ¦ °--SYMBOL_FUNCTION_CALL: jclak [0/0] {192} ¦ ¦--'(': ( [0/2] {194} - ¦ ¦--expr: [0/0] {195} - ¦ ¦ ¦--expr: [0/0] {197} + ¦ ¦--expr: call( [0/0] {195} + ¦ ¦ ¦--expr: call [0/0] {197} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {196} ¦ ¦ ¦--'(': ( [0/0] {198} - ¦ ¦ ¦--expr: [0/0] {199} - ¦ ¦ ¦ ¦--expr: [0/0] {201} + ¦ ¦ ¦--expr: call( [0/0] {199} + ¦ ¦ ¦ ¦--expr: call [0/0] {201} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {200} ¦ ¦ ¦ ¦--'(': ( [0/0] {202} - ¦ ¦ ¦ ¦--expr: [0/2] {204} + ¦ ¦ ¦ ¦--expr: 2 [0/2] {204} ¦ ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {203} ¦ ¦ ¦ ¦--',': , [0/15] {205} - ¦ ¦ ¦ ¦--expr: [1/0] {207} + ¦ ¦ ¦ ¦--expr: 4 [1/0] {207} ¦ ¦ ¦ ¦ °--NUM_CONST: 4 [0/0] {206} ¦ ¦ ¦ °--')': ) [0/0] {208} ¦ ¦ °--')': ) [0/0] {209} ¦ °--')': ) [0/0] {210} - ¦--expr: [1/0] {211} - ¦ ¦--expr: [0/0] {213} + ¦--expr: fjadl [1/0] {211} + ¦ ¦--expr: fjadl [0/0] {213} ¦ ¦ °--SYMBOL_FUNCTION_CALL: fjadl [0/0] {212} ¦ ¦--'(': ( [0/0] {214} - ¦ ¦--expr: [0/0] {215} - ¦ ¦ ¦--expr: [0/0] {217} + ¦ ¦--expr: casl( [0/0] {215} + ¦ ¦ ¦--expr: casl [0/0] {217} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: casl [0/0] {216} ¦ ¦ ¦--'(': ( [0/0] {218} ¦ ¦ °--')': ) [0/0] {219} ¦ ¦--',': , [0/6] {220} - ¦ ¦--expr: [1/0] {222} + ¦ ¦--expr: 1 [1/0] {222} ¦ ¦ °--NUM_CONST: 1 [0/0] {221} ¦ °--')': ) [0/0] {223} - °--expr: [3/0] {224} - ¦--expr: [0/0] {226} + °--expr: test_ [3/0] {224} + ¦--expr: test_ [0/0] {226} ¦ °--SYMBOL_FUNCTION_CALL: test_ [0/0] {225} ¦--'(': ( [0/0] {227} - ¦--expr: [0/0] {229} + ¦--expr: "hi" [0/0] {229} ¦ °--STR_CONST: "hi" [0/0] {228} ¦--',': , [0/1] {230} - ¦--expr: [0/0] {231} + ¦--expr: { +"th [0/0] {231} ¦ ¦--'{': { [0/0] {232} - ¦ ¦--expr: [1/2] {234} + ¦ ¦--expr: "ther [1/2] {234} ¦ ¦ °--STR_CONST: "ther [0/0] {233} ¦ °--'}': } [1/0] {235} °--')': ) [0/0] {236} diff --git a/tests/testthat/math_token_spacing/non_strict_math_spacing_all-in_tree b/tests/testthat/math_token_spacing/non_strict_math_spacing_all-in_tree index 9060685f0..306fef807 100644 --- a/tests/testthat/math_token_spacing/non_strict_math_spacing_all-in_tree +++ b/tests/testthat/math_token_spacing/non_strict_math_spacing_all-in_tree @@ -1,23 +1,23 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: [0/0] {1} - ¦--expr: [0/0] {4} + °--expr: 1++1 [0/0] {1} + ¦--expr: 1 [0/0] {4} ¦ °--NUM_CONST: 1 [0/0] {3} ¦--'+': + [0/0] {5} - ¦--expr: [0/3] {6} + ¦--expr: +1 [0/3] {6} ¦ ¦--'+': + [0/0] {7} - ¦ °--expr: [0/0] {9} + ¦ °--expr: 1 [0/0] {9} ¦ °--NUM_CONST: 1 [0/0] {8} ¦--'-': - [0/7] {10} - °--expr: [0/0] {11} - ¦--expr: [0/1] {14} + °--expr: 3 / 2 [0/0] {11} + ¦--expr: 3 [0/1] {14} ¦ °--NUM_CONST: 3 [0/0] {13} ¦--'/': / [0/1] {15} - ¦--expr: [0/1] {17} + ¦--expr: 23 [0/1] {17} ¦ °--NUM_CONST: 23 [0/0] {16} ¦--'*': * [0/1] {18} - °--expr: [0/0] {19} - ¦--expr: [0/1] {21} + °--expr: 3 ^4 [0/0] {19} + ¦--expr: 3 [0/1] {21} ¦ °--NUM_CONST: 3 [0/0] {20} ¦--'^': ^ [0/0] {22} - °--expr: [0/0] {24} + °--expr: 4 [0/0] {24} °--NUM_CONST: 4 [0/0] {23} diff --git a/tests/testthat/math_token_spacing/strict_math_spacing_all-in_tree b/tests/testthat/math_token_spacing/strict_math_spacing_all-in_tree index 5ad9d6a49..1925476a7 100644 --- a/tests/testthat/math_token_spacing/strict_math_spacing_all-in_tree +++ b/tests/testthat/math_token_spacing/strict_math_spacing_all-in_tree @@ -1,23 +1,23 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: [0/0] {1} - ¦--expr: [0/1] {4} + °--expr: 1 ++ [0/0] {1} + ¦--expr: 1 [0/1] {4} ¦ °--NUM_CONST: 1 [0/0] {3} ¦--'+': + [0/0] {5} - ¦--expr: [0/1] {6} + ¦--expr: + 1 [0/1] {6} ¦ ¦--'+': + [0/1] {7} - ¦ °--expr: [0/0] {9} + ¦ °--expr: 1 [0/0] {9} ¦ °--NUM_CONST: 1 [0/0] {8} ¦--'-': - [0/1] {10} - °--expr: [0/0] {11} - ¦--expr: [0/1] {14} + °--expr: 3 / [0/0] {11} + ¦--expr: 3 [0/1] {14} ¦ °--NUM_CONST: 3 [0/0] {13} ¦--'/': / [0/7] {15} - ¦--expr: [0/0] {17} + ¦--expr: 23 [0/0] {17} ¦ °--NUM_CONST: 23 [0/0] {16} ¦--'*': * [0/1] {18} - °--expr: [0/0] {19} - ¦--expr: [0/0] {21} + °--expr: 3^ 4 [0/0] {19} + ¦--expr: 3 [0/0] {21} ¦ °--NUM_CONST: 3 [0/0] {20} ¦--'^': ^ [0/1] {22} - °--expr: [0/0] {24} + °--expr: 4 [0/0] {24} °--NUM_CONST: 4 [0/0] {23} diff --git a/tests/testthat/math_token_spacing/strict_math_spacing_zero_all_but_power-in_tree b/tests/testthat/math_token_spacing/strict_math_spacing_zero_all_but_power-in_tree index f2629cf50..d82f157ca 100644 --- a/tests/testthat/math_token_spacing/strict_math_spacing_zero_all_but_power-in_tree +++ b/tests/testthat/math_token_spacing/strict_math_spacing_zero_all_but_power-in_tree @@ -1,23 +1,23 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: [0/0] {1} - ¦--expr: [0/0] {4} + °--expr: 1++1- [0/0] {1} + ¦--expr: 1 [0/0] {4} ¦ °--NUM_CONST: 1 [0/0] {3} ¦--'+': + [0/0] {5} - ¦--expr: [0/0] {6} + ¦--expr: +1 [0/0] {6} ¦ ¦--'+': + [0/0] {7} - ¦ °--expr: [0/0] {9} + ¦ °--expr: 1 [0/0] {9} ¦ °--NUM_CONST: 1 [0/0] {8} ¦--'-': - [0/0] {10} - °--expr: [0/0] {11} - ¦--expr: [0/0] {14} + °--expr: 3/23* [0/0] {11} + ¦--expr: 3 [0/0] {14} ¦ °--NUM_CONST: 3 [0/0] {13} ¦--'/': / [0/0] {15} - ¦--expr: [0/0] {17} + ¦--expr: 23 [0/0] {17} ¦ °--NUM_CONST: 23 [0/0] {16} ¦--'*': * [0/0] {18} - °--expr: [0/0] {19} - ¦--expr: [0/0] {21} + °--expr: 3^4 [0/0] {19} + ¦--expr: 3 [0/0] {21} ¦ °--NUM_CONST: 3 [0/0] {20} ¦--'^': ^ [0/0] {22} - °--expr: [0/0] {24} + °--expr: 4 [0/0] {24} °--NUM_CONST: 4 [0/0] {23} diff --git a/tests/testthat/math_token_spacing/strict_math_spacing_zero_plus-in_tree b/tests/testthat/math_token_spacing/strict_math_spacing_zero_plus-in_tree index 539ec7fe6..c9e38aa79 100644 --- a/tests/testthat/math_token_spacing/strict_math_spacing_zero_plus-in_tree +++ b/tests/testthat/math_token_spacing/strict_math_spacing_zero_plus-in_tree @@ -1,23 +1,23 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: [0/0] {1} - ¦--expr: [0/0] {4} + °--expr: 1+ + [0/0] {1} + ¦--expr: 1 [0/0] {4} ¦ °--NUM_CONST: 1 [0/0] {3} ¦--'+': + [0/2] {5} - ¦--expr: [0/0] {6} + ¦--expr: +1 [0/0] {6} ¦ ¦--'+': + [0/0] {7} - ¦ °--expr: [0/0] {9} + ¦ °--expr: 1 [0/0] {9} ¦ °--NUM_CONST: 1 [0/0] {8} ¦--'-': - [0/1] {10} - °--expr: [0/0] {11} - ¦--expr: [0/3] {14} + °--expr: 3 / [0/0] {11} + ¦--expr: 3 [0/3] {14} ¦ °--NUM_CONST: 3 [0/0] {13} ¦--'/': / [0/0] {15} - ¦--expr: [0/0] {17} + ¦--expr: 23 [0/0] {17} ¦ °--NUM_CONST: 23 [0/0] {16} ¦--'*': * [0/1] {18} - °--expr: [0/0] {19} - ¦--expr: [0/0] {21} + °--expr: 3^ 4 [0/0] {19} + ¦--expr: 3 [0/0] {21} ¦ °--NUM_CONST: 3 [0/0] {20} ¦--'^': ^ [0/1] {22} - °--expr: [0/0] {24} + °--expr: 4 [0/0] {24} °--NUM_CONST: 4 [0/0] {23} diff --git a/tests/testthat/multiple_expressions/three_complex_expr-in_tree b/tests/testthat/multiple_expressions/three_complex_expr-in_tree index b332e24c4..4f556c36b 100644 --- a/tests/testthat/multiple_expressions/three_complex_expr-in_tree +++ b/tests/testthat/multiple_expressions/three_complex_expr-in_tree @@ -1,22 +1,23 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {2} + ¦--expr: x [0/0] {2} ¦ °--SYMBOL: x [0/0] {1} - ¦--expr: [1/0] {3} - ¦ ¦--expr: [0/0] {5} + ¦--expr: 1+1 [1/0] {3} + ¦ ¦--expr: 1 [0/0] {5} ¦ ¦ °--NUM_CONST: 1 [0/0] {4} ¦ ¦--'+': + [0/0] {6} - ¦ °--expr: [0/0] {8} + ¦ °--expr: 1 [0/0] {8} ¦ °--NUM_CONST: 1 [0/0] {7} - °--expr: [1/0] {9} - ¦--expr: [0/1] {11} + °--expr: y + ( [1/0] {9} + ¦--expr: y [0/1] {11} ¦ °--SYMBOL: y [0/0] {10} ¦--'+': + [0/1] {12} - °--expr: [0/0] {13} + °--expr: ( +2* [0/0] {13} ¦--'(': ( [0/0] {14} - ¦--expr: [1/0] {15} - ¦ ¦--expr: [0/0] {17} + ¦--expr: 2* z [1/0] {15} + ¦ ¦--expr: 2 [0/0] {17} ¦ ¦ °--NUM_CONST: 2 [0/0] {16} ¦ ¦--'*': * [0/1] {18} - ¦ °--expr: [0/0] {20} + ¦ °--expr: z [0/0] {20} ¦ °--SYMBOL: z [0/0] {19} °--')': ) [1/0] {21} diff --git a/tests/testthat/multiple_expressions/two_simple_expr-in_tree b/tests/testthat/multiple_expressions/two_simple_expr-in_tree index 8ed5bfe91..57159da53 100644 --- a/tests/testthat/multiple_expressions/two_simple_expr-in_tree +++ b/tests/testthat/multiple_expressions/two_simple_expr-in_tree @@ -1,5 +1,5 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {2} + ¦--expr: a [0/0] {2} ¦ °--SYMBOL: a [0/0] {1} - °--expr: [1/0] {4} + °--expr: b [1/0] {4} °--SYMBOL: b [0/0] {3} diff --git a/tests/testthat/parse_comments/eol_eof_spaces-in_tree b/tests/testthat/parse_comments/eol_eof_spaces-in_tree index dcc4e4720..4e6dc6302 100644 --- a/tests/testthat/parse_comments/eol_eof_spaces-in_tree +++ b/tests/testthat/parse_comments/eol_eof_spaces-in_tree @@ -1,5 +1,5 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--COMMENT: # com [0/0] {1} ¦--COMMENT: #' sp [1/0] {2} - °--expr: [1/0] {4} + °--expr: a [1/0] {4} °--SYMBOL: a [0/0] {3} diff --git a/tests/testthat/parse_comments/mixed-in_tree b/tests/testthat/parse_comments/mixed-in_tree index 43462d134..5168b8f66 100644 --- a/tests/testthat/parse_comments/mixed-in_tree +++ b/tests/testthat/parse_comments/mixed-in_tree @@ -1,10 +1,10 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--COMMENT: # A f [0/0] {1} - °--expr: [1/0] {2} - ¦--expr: [0/1] {4} + °--expr: a <- [1/0] {2} + ¦--expr: a [0/1] {4} ¦ °--SYMBOL: a [0/0] {3} ¦--LEFT_ASSIGN: <- [0/1] {5} - °--expr: [0/0] {6} + °--expr: funct [0/0] {6} ¦--FUNCTION: funct [0/0] {7} ¦--'(': ( [0/0] {8} ¦--SYMBOL_FORMALS: x [0/0] {9} @@ -13,19 +13,21 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--',': , [0/1] {12} ¦--SYMBOL_FORMALS: z [0/0] {13} ¦--')': ) [0/1] {14} - °--expr: [0/0] {15} + °--expr: { +if [0/0] {15} ¦--'{': { [0/0] {16} - ¦--expr: [1/0] {17} + ¦--expr: if (1 [1/0] {17} ¦ ¦--IF: if [0/1] {18} ¦ ¦--'(': ( [0/0] {19} - ¦ ¦--expr: [0/0] {20} - ¦ ¦ ¦--expr: [0/0] {22} + ¦ ¦--expr: 1>10 [0/0] {20} + ¦ ¦ ¦--expr: 1 [0/0] {22} ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {21} ¦ ¦ ¦--GT: > [0/0] {23} - ¦ ¦ °--expr: [0/0] {25} + ¦ ¦ °--expr: 10 [0/0] {25} ¦ ¦ °--NUM_CONST: 10 [0/0] {24} ¦ ¦--')': ) [0/1] {26} - ¦ °--expr: [0/0] {27} + ¦ °--expr: { +# t [0/0] {27} ¦ ¦--'{': { [0/0] {28} ¦ ¦--COMMENT: # thi [1/0] {29} ¦ °--'}': } [1/0] {30} diff --git a/tests/testthat/parse_comments/rplumber-in_tree b/tests/testthat/parse_comments/rplumber-in_tree index e0405d205..8faf0b7a9 100644 --- a/tests/testthat/parse_comments/rplumber-in_tree +++ b/tests/testthat/parse_comments/rplumber-in_tree @@ -1,67 +1,69 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--COMMENT: # myf [0/0] {1} ¦--COMMENT: #* @g [2/0] {2} - ¦--expr: [1/0] {3} - ¦ ¦--expr: [0/1] {5} + ¦--expr: norma [1/0] {3} + ¦ ¦--expr: norma [0/1] {5} ¦ ¦ °--SYMBOL: norma [0/0] {4} ¦ ¦--LEFT_ASSIGN: <- [0/1] {6} - ¦ °--expr: [0/0] {7} + ¦ °--expr: funct [0/0] {7} ¦ ¦--FUNCTION: funct [0/0] {8} ¦ ¦--'(': ( [0/0] {9} ¦ ¦--SYMBOL_FORMALS: sampl [0/0] {10} ¦ ¦--EQ_FORMALS: = [0/0] {11} - ¦ ¦--expr: [0/0] {13} + ¦ ¦--expr: 10 [0/0] {13} ¦ ¦ °--NUM_CONST: 10 [0/0] {12} ¦ ¦--')': ) [0/1] {14} - ¦ °--expr: [0/0] {15} + ¦ °--expr: { + d [0/0] {15} ¦ ¦--'{': { [0/2] {16} - ¦ ¦--expr: [1/2] {17} - ¦ ¦ ¦--expr: [0/1] {19} + ¦ ¦--expr: data [1/2] {17} + ¦ ¦ ¦--expr: data [0/1] {19} ¦ ¦ ¦ °--SYMBOL: data [0/0] {18} ¦ ¦ ¦--LEFT_ASSIGN: <- [0/1] {20} - ¦ ¦ °--expr: [0/0] {21} - ¦ ¦ ¦--expr: [0/0] {23} + ¦ ¦ °--expr: rnorm [0/0] {21} + ¦ ¦ ¦--expr: rnorm [0/0] {23} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: rnorm [0/0] {22} ¦ ¦ ¦--'(': ( [0/0] {24} - ¦ ¦ ¦--expr: [0/0] {26} + ¦ ¦ ¦--expr: sampl [0/0] {26} ¦ ¦ ¦ °--SYMBOL: sampl [0/0] {25} ¦ ¦ °--')': ) [0/0] {27} - ¦ ¦--expr: [1/0] {28} - ¦ ¦ ¦--expr: [0/0] {30} + ¦ ¦--expr: mean( [1/0] {28} + ¦ ¦ ¦--expr: mean [0/0] {30} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: mean [0/0] {29} ¦ ¦ ¦--'(': ( [0/0] {31} - ¦ ¦ ¦--expr: [0/0] {33} + ¦ ¦ ¦--expr: data [0/0] {33} ¦ ¦ ¦ °--SYMBOL: data [0/0] {32} ¦ ¦ °--')': ) [0/0] {34} ¦ °--'}': } [1/0] {35} ¦--COMMENT: #* @p [2/0] {36} - °--expr: [1/0] {37} - ¦--expr: [0/1] {39} + °--expr: addTw [1/0] {37} + ¦--expr: addTw [0/1] {39} ¦ °--SYMBOL: addTw [0/0] {38} ¦--LEFT_ASSIGN: <- [0/1] {40} - °--expr: [0/0] {41} + °--expr: funct [0/0] {41} ¦--FUNCTION: funct [0/0] {42} ¦--'(': ( [0/0] {43} ¦--SYMBOL_FORMALS: a [0/0] {44} ¦--',': , [0/1] {45} ¦--SYMBOL_FORMALS: b [0/0] {46} ¦--')': ) [0/1] {47} - °--expr: [0/0] {48} + °--expr: { + a [0/0] {48} ¦--'{': { [0/2] {49} - ¦--expr: [1/0] {50} - ¦ ¦--expr: [0/1] {51} - ¦ ¦ ¦--expr: [0/0] {53} + ¦--expr: as.nu [1/0] {50} + ¦ ¦--expr: as.nu [0/1] {51} + ¦ ¦ ¦--expr: as.nu [0/0] {53} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: as.nu [0/0] {52} ¦ ¦ ¦--'(': ( [0/0] {54} - ¦ ¦ ¦--expr: [0/0] {56} + ¦ ¦ ¦--expr: a [0/0] {56} ¦ ¦ ¦ °--SYMBOL: a [0/0] {55} ¦ ¦ °--')': ) [0/0] {57} ¦ ¦--'+': + [0/1] {58} - ¦ °--expr: [0/0] {59} - ¦ ¦--expr: [0/0] {61} + ¦ °--expr: as.nu [0/0] {59} + ¦ ¦--expr: as.nu [0/0] {61} ¦ ¦ °--SYMBOL_FUNCTION_CALL: as.nu [0/0] {60} ¦ ¦--'(': ( [0/0] {62} - ¦ ¦--expr: [0/0] {64} + ¦ ¦--expr: b [0/0] {64} ¦ ¦ °--SYMBOL: b [0/0] {63} ¦ °--')': ) [0/0] {65} °--'}': } [1/0] {66} diff --git a/tests/testthat/parse_comments/shebang_1-in_tree b/tests/testthat/parse_comments/shebang_1-in_tree index 72122538b..39bb6c0ca 100644 --- a/tests/testthat/parse_comments/shebang_1-in_tree +++ b/tests/testthat/parse_comments/shebang_1-in_tree @@ -2,22 +2,22 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--COMMENT: #A co [0/0] {1} ¦--COMMENT: #!/us [1/0] {2} ¦--COMMENT: #!/us [1/0] {3} - ¦--expr: [1/0] {4} - ¦ ¦--expr: [0/1] {6} + ¦--expr: a <- [1/0] {4} + ¦ ¦--expr: a [0/1] {6} ¦ ¦ °--SYMBOL: a [0/0] {5} ¦ ¦--LEFT_ASSIGN: <- [0/1] {7} - ¦ °--expr: [0/0] {9} + ¦ °--expr: 3 [0/0] {9} ¦ °--NUM_CONST: 3 [0/0] {8} ¦--COMMENT: #!/us [2/0] {10} - ¦--expr: [1/0] {11} - ¦ ¦--expr: [0/1] {13} + ¦--expr: dd <- [1/0] {11} + ¦ ¦--expr: dd [0/1] {13} ¦ ¦ °--SYMBOL: dd [0/0] {12} ¦ ¦--LEFT_ASSIGN: <- [0/1] {14} - ¦ °--expr: [0/0] {16} + ¦ °--expr: 33 [0/0] {16} ¦ °--NUM_CONST: 33 [0/0] {15} ¦--COMMENT: #!/us [1/0] {17} - ¦--expr: [1/0] {18} - ¦ ¦--expr: [0/0] {20} + ¦--expr: c() [1/0] {18} + ¦ ¦--expr: c [0/0] {20} ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {19} ¦ ¦--'(': ( [0/0] {21} ¦ °--')': ) [0/0] {22} diff --git a/tests/testthat/parse_comments/shebang_2-in_tree b/tests/testthat/parse_comments/shebang_2-in_tree index 109612d0f..dafbcf6ac 100644 --- a/tests/testthat/parse_comments/shebang_2-in_tree +++ b/tests/testthat/parse_comments/shebang_2-in_tree @@ -1,22 +1,22 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--COMMENT: #!/us [0/0] {1} ¦--COMMENT: #!/us [1/0] {2} - ¦--expr: [1/0] {3} - ¦ ¦--expr: [0/1] {5} + ¦--expr: a <- [1/0] {3} + ¦ ¦--expr: a [0/1] {5} ¦ ¦ °--SYMBOL: a [0/0] {4} ¦ ¦--LEFT_ASSIGN: <- [0/1] {6} - ¦ °--expr: [0/0] {8} + ¦ °--expr: 3 [0/0] {8} ¦ °--NUM_CONST: 3 [0/0] {7} ¦--COMMENT: #!/us [2/0] {9} - ¦--expr: [1/0] {10} - ¦ ¦--expr: [0/1] {12} + ¦--expr: dd <- [1/0] {10} + ¦ ¦--expr: dd [0/1] {12} ¦ ¦ °--SYMBOL: dd [0/0] {11} ¦ ¦--LEFT_ASSIGN: <- [0/1] {13} - ¦ °--expr: [0/0] {15} + ¦ °--expr: 33 [0/0] {15} ¦ °--NUM_CONST: 33 [0/0] {14} ¦--COMMENT: #!/us [1/0] {16} - ¦--expr: [1/0] {17} - ¦ ¦--expr: [0/0] {19} + ¦--expr: c() [1/0] {17} + ¦ ¦--expr: c [0/0] {19} ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {18} ¦ ¦--'(': ( [0/0] {20} ¦ °--')': ) [0/0] {21} diff --git a/tests/testthat/parse_comments/spinning_code_chunk_headers-in_tree b/tests/testthat/parse_comments/spinning_code_chunk_headers-in_tree index cdf0ceaaa..82e47c6a4 100644 --- a/tests/testthat/parse_comments/spinning_code_chunk_headers-in_tree +++ b/tests/testthat/parse_comments/spinning_code_chunk_headers-in_tree @@ -1,28 +1,30 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--COMMENT: #A co [0/0] {1} - ¦--expr: [1/0] {2} - ¦ ¦--expr: [0/1] {4} + ¦--expr: a <- [1/0] {2} + ¦ ¦--expr: a [0/1] {4} ¦ ¦ °--SYMBOL: a [0/0] {3} ¦ ¦--LEFT_ASSIGN: <- [0/1] {5} - ¦ °--expr: [0/0] {6} + ¦ °--expr: funct [0/0] {6} ¦ ¦--FUNCTION: funct [0/0] {7} ¦ ¦--'(': ( [0/0] {8} ¦ ¦--')': ) [0/1] {9} - ¦ °--expr: [0/0] {10} + ¦ °--expr: { + +} [0/0] {10} ¦ ¦--'{': { [0/0] {11} ¦ °--'}': } [2/0] {12} ¦--COMMENT: #+ ch [2/0] {13} - ¦--expr: [1/0] {15} + ¦--expr: "chun [1/0] {15} ¦ °--STR_CONST: "chun [0/0] {14} ¦--COMMENT: #- ch [2/0] {16} - ¦--expr: [1/0] {17} - ¦ ¦--expr: [0/0] {19} + ¦--expr: call( [1/0] {17} + ¦ ¦--expr: call [0/0] {19} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {18} ¦ ¦--'(': ( [0/0] {20} - ¦ ¦--expr: [0/0] {22} + ¦ ¦--expr: 2 [0/0] {22} ¦ ¦ °--NUM_CONST: 2 [0/0] {21} ¦ ¦--',': , [0/1] {23} - ¦ ¦--expr: [0/0] {25} + ¦ ¦--expr: 3 [0/0] {25} ¦ ¦ °--NUM_CONST: 3 [0/0] {24} ¦ °--')': ) [0/0] {26} °--COMMENT: #21 [1/0] {27} diff --git a/tests/testthat/parse_comments/with_indention-in_tree b/tests/testthat/parse_comments/with_indention-in_tree index fd2c47775..ee1218f53 100644 --- a/tests/testthat/parse_comments/with_indention-in_tree +++ b/tests/testthat/parse_comments/with_indention-in_tree @@ -1,69 +1,69 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--COMMENT: # a c [0/0] {1} - ¦--expr: [1/0] {2} - ¦ ¦--expr: [0/0] {4} + ¦--expr: call( [1/0] {2} + ¦ ¦--expr: call [0/0] {4} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {3} ¦ ¦--'(': ( [0/0] {5} - ¦ ¦--expr: [1/0] {7} + ¦ ¦--expr: 1 [1/0] {7} ¦ ¦ °--NUM_CONST: 1 [0/0] {6} ¦ ¦--',': , [0/0] {8} - ¦ ¦--expr: [1/0] {9} - ¦ ¦ ¦--expr: [0/0] {11} + ¦ ¦--expr: call2 [1/0] {9} + ¦ ¦ ¦--expr: call2 [0/0] {11} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call2 [0/0] {10} ¦ ¦ ¦--'(': ( [0/0] {12} - ¦ ¦ ¦--expr: [1/0] {14} + ¦ ¦ ¦--expr: 2 [1/0] {14} ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {13} ¦ ¦ ¦--',': , [0/1] {15} - ¦ ¦ ¦--expr: [0/0] {17} + ¦ ¦ ¦--expr: 3 [0/0] {17} ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {16} ¦ ¦ ¦--',': , [0/0] {18} - ¦ ¦ ¦--expr: [1/0] {19} - ¦ ¦ ¦ ¦--expr: [0/0] {21} + ¦ ¦ ¦--expr: call3 [1/0] {19} + ¦ ¦ ¦ ¦--expr: call3 [0/0] {21} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call3 [0/0] {20} ¦ ¦ ¦ ¦--'(': ( [0/0] {22} ¦ ¦ ¦ ¦--COMMENT: # zer [0/0] {23} ¦ ¦ ¦ ¦--COMMENT: # one [1/19] {24} ¦ ¦ ¦ ¦--COMMENT: # two [1/6] {25} - ¦ ¦ ¦ ¦--expr: [1/0] {27} + ¦ ¦ ¦ ¦--expr: 1 [1/0] {27} ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {26} ¦ ¦ ¦ ¦--',': , [0/1] {28} - ¦ ¦ ¦ ¦--expr: [0/1] {30} + ¦ ¦ ¦ ¦--expr: 2 [0/1] {30} ¦ ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {29} ¦ ¦ ¦ ¦--COMMENT: # two [0/6] {31} ¦ ¦ ¦ ¦--',': , [1/1] {32} - ¦ ¦ ¦ ¦--expr: [0/1] {34} + ¦ ¦ ¦ ¦--expr: 22 [0/1] {34} ¦ ¦ ¦ ¦ °--NUM_CONST: 22 [0/0] {33} ¦ ¦ ¦ ¦--COMMENT: # com [0/6] {35} ¦ ¦ ¦ °--')': ) [1/0] {36} ¦ ¦ ¦--',': , [0/4] {37} - ¦ ¦ ¦--expr: [1/2] {39} + ¦ ¦ ¦--expr: 5 [1/2] {39} ¦ ¦ ¦ °--NUM_CONST: 5 [0/0] {38} ¦ ¦ °--')': ) [1/0] {40} ¦ ¦--',': , [0/1] {41} ¦ ¦--COMMENT: #' A [0/17] {42} - ¦ ¦--expr: [1/18] {44} + ¦ ¦--expr: 144 [1/18] {44} ¦ ¦ °--NUM_CONST: 144 [0/0] {43} ¦ ¦--COMMENT: # ano [1/0] {45} ¦ °--')': ) [1/0] {46} ¦--COMMENT: # new [2/0] {47} - ¦--expr: [5/0] {48} - ¦ ¦--expr: [0/0] {50} + ¦--expr: a() [5/0] {48} + ¦ ¦--expr: a [0/0] {50} ¦ ¦ °--SYMBOL_FUNCTION_CALL: a [0/0] {49} ¦ ¦--'(': ( [0/0] {51} ¦ °--')': ) [0/0] {52} ¦--COMMENT: # I t [1/0] {53} ¦--COMMENT: # new [1/0] {54} - ¦--expr: [1/2] {55} - ¦ ¦--expr: [0/0] {57} + ¦--expr: b(x, [1/2] {55} + ¦ ¦--expr: b [0/0] {57} ¦ ¦ °--SYMBOL_FUNCTION_CALL: b [0/0] {56} ¦ ¦--'(': ( [0/0] {58} - ¦ ¦--expr: [0/0] {60} + ¦ ¦--expr: x [0/0] {60} ¦ ¦ °--SYMBOL: x [0/0] {59} ¦ ¦--',': , [0/1] {61} - ¦ ¦--expr: [0/0] {63} + ¦ ¦--expr: y [0/0] {63} ¦ ¦ °--SYMBOL: y [0/0] {62} ¦ ¦--',': , [0/1] {64} - ¦ ¦--expr: [0/0] {66} + ¦ ¦--expr: 7 [0/0] {66} ¦ ¦ °--NUM_CONST: 7 [0/0] {65} ¦ °--')': ) [0/0] {67} ¦--COMMENT: # hid [0/0] {68} diff --git a/tests/testthat/parsing/long_strings-in_tree b/tests/testthat/parsing/long_strings-in_tree index 476da5255..a8a743040 100644 --- a/tests/testthat/parsing/long_strings-in_tree +++ b/tests/testthat/parsing/long_strings-in_tree @@ -1,37 +1,39 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} - ¦ ¦--expr: [0/1] {3} + ¦--expr: b <- + [0/0] {1} + ¦ ¦--expr: b [0/1] {3} ¦ ¦ °--SYMBOL: b [0/0] {2} ¦ ¦--LEFT_ASSIGN: <- [0/1] {4} - ¦ °--expr: [1/0] {6} + ¦ °--expr: 3 [1/0] {6} ¦ °--NUM_CONST: 3 [0/0] {5} - ¦--expr: [1/0] {7} - ¦ ¦--expr: [0/1] {9} + ¦--expr: g <- + [1/0] {7} + ¦ ¦--expr: g [0/1] {9} ¦ ¦ °--SYMBOL: g [0/0] {8} ¦ ¦--LEFT_ASSIGN: <- [0/0] {10} - ¦ °--expr: [1/0] {12} + ¦ °--expr: "v x [1/0] {12} ¦ °--STR_CONST: "v x [0/0] {11} - ¦--expr: [2/0] {14} + ¦--expr: "'tes [2/0] {14} ¦ °--STR_CONST: "'tes [0/0] {13} - ¦--expr: [1/0] {15} - ¦ ¦--expr: [0/1] {17} + ¦--expr: 99 + [1/0] {15} + ¦ ¦--expr: 99 [0/1] {17} ¦ ¦ °--NUM_CONST: 99 [0/0] {16} ¦ ¦--'+': + [0/1] {18} - ¦ °--expr: [0/0] {20} + ¦ °--expr: 1 [0/0] {20} ¦ °--NUM_CONST: 1 [0/0] {19} - ¦--expr: [1/0] {22} + ¦--expr: 'test [1/0] {22} ¦ °--STR_CONST: 'test [0/0] {21} - ¦--expr: [1/1] {24} + ¦--expr: 'test [1/1] {24} ¦ °--STR_CONST: 'test [0/0] {23} ¦--COMMENT: # com [0/0] {25} - ¦--expr: [1/0] {27} + ¦--expr: 1 [1/0] {27} ¦ °--NUM_CONST: 1 [0/0] {26} - °--expr: [2/0] {28} - ¦--expr: [0/0] {30} + °--expr: call( [2/0] {28} + ¦--expr: call [0/0] {30} ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {29} ¦--'(': ( [0/0] {31} ¦--STR_CONST: "a_is [0/1] {32} ¦--EQ_SUB: = [0/1] {33} - ¦--expr: [0/0] {35} + ¦--expr: 2 [0/0] {35} ¦ °--NUM_CONST: 2 [0/0] {34} °--')': ) [0/0] {36} diff --git a/tests/testthat/parsing/repeated_parsing-in_tree b/tests/testthat/parsing/repeated_parsing-in_tree index d753ee067..c43c3b88e 100644 --- a/tests/testthat/parsing/repeated_parsing-in_tree +++ b/tests/testthat/parsing/repeated_parsing-in_tree @@ -2,11 +2,11 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--COMMENT: # [0/0] {1} ¦--COMMENT: # [1/0] {2} ¦--COMMENT: # [1/0] {3} - ¦--expr: [1/0] {4} - ¦ ¦--expr: [0/1] {6} + ¦--expr: r <- [1/0] {4} + ¦ ¦--expr: r [0/1] {6} ¦ ¦ °--SYMBOL: r [0/0] {5} ¦ ¦--LEFT_ASSIGN: <- [0/1] {7} - ¦ °--expr: [0/0] {8} + ¦ °--expr: funct [0/0] {8} ¦ ¦--FUNCTION: funct [0/0] {9} ¦ ¦--'(': ( [0/0] {10} ¦ ¦--SYMBOL_FORMALS: y [0/0] {11} @@ -15,132 +15,136 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦ ¦--',': , [0/1] {14} ¦ ¦--SYMBOL_FORMALS: g [0/1] {15} ¦ ¦--EQ_FORMALS: = [0/1] {16} - ¦ ¦--expr: [0/0] {18} + ¦ ¦--expr: 10 [0/0] {18} ¦ ¦ °--NUM_CONST: 10 [0/0] {17} ¦ ¦--')': ) [0/1] {19} - ¦ °--expr: [0/0] {20} + ¦ °--expr: { + b [0/0] {20} ¦ ¦--'{': { [0/2] {21} - ¦ ¦--expr: [1/2] {22} - ¦ ¦ ¦--expr: [0/0] {24} + ¦ ¦--expr: b("", [1/2] {22} + ¦ ¦ ¦--expr: b [0/0] {24} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: b [0/0] {23} ¦ ¦ ¦--'(': ( [0/0] {25} - ¦ ¦ ¦--expr: [0/0] {27} + ¦ ¦ ¦--expr: "" [0/0] {27} ¦ ¦ ¦ °--STR_CONST: "" [0/0] {26} ¦ ¦ ¦--',': , [0/1] {28} - ¦ ¦ ¦--expr: [0/0] {30} + ¦ ¦ ¦--expr: "" [0/0] {30} ¦ ¦ ¦ °--STR_CONST: "" [0/0] {29} ¦ ¦ °--')': ) [0/0] {31} ¦ ¦--COMMENT: # [2/2] {32} - ¦ ¦--expr: [1/2] {33} - ¦ ¦ ¦--expr: [0/1] {35} + ¦ ¦--expr: q <- [1/2] {33} + ¦ ¦ ¦--expr: q [0/1] {35} ¦ ¦ ¦ °--SYMBOL: q [0/0] {34} ¦ ¦ ¦--LEFT_ASSIGN: <- [0/1] {36} - ¦ ¦ °--expr: [0/0] {37} - ¦ ¦ ¦--expr: [0/0] {39} + ¦ ¦ °--expr: g(d(i [0/0] {37} + ¦ ¦ ¦--expr: g [0/0] {39} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: g [0/0] {38} ¦ ¦ ¦--'(': ( [0/0] {40} - ¦ ¦ ¦--expr: [0/0] {41} - ¦ ¦ ¦ ¦--expr: [0/0] {43} + ¦ ¦ ¦--expr: d(i) [0/0] {41} + ¦ ¦ ¦ ¦--expr: d [0/0] {43} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: d [0/0] {42} ¦ ¦ ¦ ¦--'(': ( [0/0] {44} - ¦ ¦ ¦ ¦--expr: [0/0] {46} + ¦ ¦ ¦ ¦--expr: i [0/0] {46} ¦ ¦ ¦ ¦ °--SYMBOL: i [0/0] {45} ¦ ¦ ¦ °--')': ) [0/0] {47} ¦ ¦ ¦--',': , [0/1] {48} - ¦ ¦ ¦--expr: [0/0] {49} + ¦ ¦ ¦--expr: funct [0/0] {49} ¦ ¦ ¦ ¦--FUNCTION: funct [0/0] {50} ¦ ¦ ¦ ¦--'(': ( [0/0] {51} ¦ ¦ ¦ ¦--SYMBOL_FORMALS: i [0/0] {52} ¦ ¦ ¦ ¦--')': ) [0/1] {53} - ¦ ¦ ¦ °--expr: [0/0] {54} + ¦ ¦ ¦ °--expr: { + [0/0] {54} ¦ ¦ ¦ ¦--'{': { [0/4] {55} - ¦ ¦ ¦ ¦--expr: [1/2] {56} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {58} + ¦ ¦ ¦ ¦--expr: d(op( [1/2] {56} + ¦ ¦ ¦ ¦ ¦--expr: d [0/0] {58} ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: d [0/0] {57} ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {59} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {60} - ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/0] {62} + ¦ ¦ ¦ ¦ ¦--expr: op(t[ [0/0] {60} + ¦ ¦ ¦ ¦ ¦ ¦--expr: op [0/0] {62} ¦ ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: op [0/0] {61} ¦ ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {63} - ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/0] {64} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/0] {66} + ¦ ¦ ¦ ¦ ¦ ¦--expr: t[[p] [0/0] {64} + ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: t [0/0] {66} ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--SYMBOL: t [0/0] {65} ¦ ¦ ¦ ¦ ¦ ¦ ¦--LBB: [[ [0/0] {67} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/0] {69} + ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: p [0/0] {69} ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--SYMBOL: p [0/0] {68} ¦ ¦ ¦ ¦ ¦ ¦ ¦--']': ] [0/0] {70} ¦ ¦ ¦ ¦ ¦ ¦ °--']': ] [0/0] {71} ¦ ¦ ¦ ¦ ¦ °--')': ) [0/0] {72} ¦ ¦ ¦ ¦ ¦--',': , [0/1] {73} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {74} - ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/0] {76} + ¦ ¦ ¦ ¦ ¦--expr: n(i = [0/0] {74} + ¦ ¦ ¦ ¦ ¦ ¦--expr: n [0/0] {76} ¦ ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: n [0/0] {75} ¦ ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {77} ¦ ¦ ¦ ¦ ¦ ¦--SYMBOL_SUB: i [0/1] {78} ¦ ¦ ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {79} - ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/0] {81} + ¦ ¦ ¦ ¦ ¦ ¦--expr: i [0/0] {81} ¦ ¦ ¦ ¦ ¦ ¦ °--SYMBOL: i [0/0] {80} ¦ ¦ ¦ ¦ ¦ °--')': ) [0/0] {82} ¦ ¦ ¦ ¦ °--')': ) [0/0] {83} ¦ ¦ ¦ °--'}': } [1/0] {84} ¦ ¦ °--')': ) [0/0] {85} - ¦ ¦--expr: [1/2] {86} - ¦ ¦ ¦--expr: [0/1] {87} - ¦ ¦ ¦ ¦--expr: [0/0] {89} + ¦ ¦--expr: f(cal [1/2] {86} + ¦ ¦ ¦--expr: f(cal [0/1] {87} + ¦ ¦ ¦ ¦--expr: f [0/0] {89} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: f [0/0] {88} ¦ ¦ ¦ ¦--'(': ( [0/0] {90} - ¦ ¦ ¦ ¦--expr: [0/0] {92} + ¦ ¦ ¦ ¦--expr: calls [0/0] {92} ¦ ¦ ¦ ¦ °--SYMBOL: calls [0/0] {91} ¦ ¦ ¦ °--')': ) [0/0] {93} ¦ ¦ ¦--LEFT_ASSIGN: <- [0/1] {94} - ¦ ¦ °--expr: [0/0] {95} - ¦ ¦ ¦--expr: [0/0] {97} + ¦ ¦ °--expr: f(g) [0/0] {95} + ¦ ¦ ¦--expr: f [0/0] {97} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: f [0/0] {96} ¦ ¦ ¦--'(': ( [0/0] {98} - ¦ ¦ ¦--expr: [0/0] {100} + ¦ ¦ ¦--expr: g [0/0] {100} ¦ ¦ ¦ °--SYMBOL: g [0/0] {99} ¦ ¦ °--')': ) [0/0] {101} - ¦ ¦--expr: [2/2] {102} - ¦ ¦ ¦--expr: [0/1] {104} + ¦ ¦--expr: mb <- [2/2] {102} + ¦ ¦ ¦--expr: mb [0/1] {104} ¦ ¦ ¦ °--SYMBOL: mb [0/0] {103} ¦ ¦ ¦--LEFT_ASSIGN: <- [0/1] {105} - ¦ ¦ °--expr: [0/0] {106} - ¦ ¦ ¦--expr: [0/0] {108} + ¦ ¦ °--expr: j(c( + [0/0] {106} + ¦ ¦ ¦--expr: j [0/0] {108} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: j [0/0] {107} ¦ ¦ ¦--'(': ( [0/0] {109} - ¦ ¦ ¦--expr: [0/0] {110} - ¦ ¦ ¦ ¦--expr: [0/0] {112} + ¦ ¦ ¦--expr: c( + [0/0] {110} + ¦ ¦ ¦ ¦--expr: c [0/0] {112} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {111} ¦ ¦ ¦ ¦--'(': ( [0/4] {113} - ¦ ¦ ¦ ¦--expr: [1/0] {114} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {116} + ¦ ¦ ¦ ¦--expr: q(a:: [1/0] {114} + ¦ ¦ ¦ ¦ ¦--expr: q [0/0] {116} ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: q [0/0] {115} ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {117} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {118} + ¦ ¦ ¦ ¦ ¦--expr: a::b [0/0] {118} ¦ ¦ ¦ ¦ ¦ ¦--SYMBOL_PACKAGE: a [0/0] {119} ¦ ¦ ¦ ¦ ¦ ¦--NS_GET: :: [0/0] {120} ¦ ¦ ¦ ¦ ¦ °--SYMBOL: b [0/0] {121} ¦ ¦ ¦ ¦ °--')': ) [0/0] {122} ¦ ¦ ¦ ¦--',': , [0/1] {123} - ¦ ¦ ¦ ¦--expr: [0/0] {125} + ¦ ¦ ¦ ¦--expr: r [0/0] {125} ¦ ¦ ¦ ¦ °--SYMBOL: r [0/0] {124} ¦ ¦ ¦ ¦--',': , [0/4] {126} - ¦ ¦ ¦ ¦--expr: [1/2] {127} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {129} + ¦ ¦ ¦ ¦--expr: y(u = [1/2] {127} + ¦ ¦ ¦ ¦ ¦--expr: y [0/0] {129} ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: y [0/0] {128} ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {130} ¦ ¦ ¦ ¦ ¦--SYMBOL_SUB: u [0/1] {131} ¦ ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {132} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {134} + ¦ ¦ ¦ ¦ ¦--expr: 1 [0/0] {134} ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {133} ¦ ¦ ¦ ¦ °--')': ) [0/0] {135} ¦ ¦ ¦ °--')': ) [1/0] {136} ¦ ¦ °--')': ) [0/0] {137} - ¦ ¦--expr: [1/0] {138} - ¦ ¦ ¦--expr: [0/0] {140} + ¦ ¦--expr: k(b) [1/0] {138} + ¦ ¦ ¦--expr: k [0/0] {140} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: k [0/0] {139} ¦ ¦ ¦--'(': ( [0/0] {141} - ¦ ¦ ¦--expr: [0/0] {143} + ¦ ¦ ¦--expr: b [0/0] {143} ¦ ¦ ¦ °--SYMBOL: b [0/0] {142} ¦ ¦ °--')': ) [0/0] {144} ¦ °--'}': } [1/0] {145} diff --git a/tests/testthat/relocate_eq_assign/eq_assign_ifelse_scope_line_breaks-in_tree b/tests/testthat/relocate_eq_assign/eq_assign_ifelse_scope_line_breaks-in_tree index 94e72e7dc..eecab69b4 100644 --- a/tests/testthat/relocate_eq_assign/eq_assign_ifelse_scope_line_breaks-in_tree +++ b/tests/testthat/relocate_eq_assign/eq_assign_ifelse_scope_line_breaks-in_tree @@ -1,30 +1,30 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--equal_assign: [0/0] {1} - ¦ ¦--expr: [0/1] {3} + ¦--equal_assign: x = 5 [0/0] {1} + ¦ ¦--expr: x [0/1] {3} ¦ ¦ °--SYMBOL: x [0/0] {2} ¦ ¦--EQ_ASSIGN: = [0/1] {4} - ¦ °--expr: [0/0] {6} + ¦ °--expr: 5 [0/0] {6} ¦ °--NUM_CONST: 5 [0/0] {5} - °--expr: [2/0] {7} + °--expr: if(x [2/0] {7} ¦--IF: if [0/0] {8} ¦--'(': ( [0/0] {9} - ¦--expr: [0/0] {10} - ¦ ¦--expr: [0/1] {12} + ¦--expr: x >= [0/0] {10} + ¦ ¦--expr: x [0/1] {12} ¦ ¦ °--SYMBOL: x [0/0] {11} ¦ ¦--GE: >= [0/1] {13} - ¦ °--expr: [0/0] {15} + ¦ °--expr: 5 [0/0] {15} ¦ °--NUM_CONST: 5 [0/0] {14} ¦--')': ) [0/2] {16} - ¦--equal_assign: [1/1] {17} - ¦ ¦--expr: [0/1] {19} + ¦--equal_assign: y = T [1/1] {17} + ¦ ¦--expr: y [0/1] {19} ¦ ¦ °--SYMBOL: y [0/0] {18} ¦ ¦--EQ_ASSIGN: = [0/1] {20} - ¦ °--expr: [0/0] {22} + ¦ °--expr: TRUE [0/0] {22} ¦ °--NUM_CONST: TRUE [0/0] {21} ¦--ELSE: else [0/4] {23} - °--equal_assign: [1/0] {24} - ¦--expr: [0/1] {26} + °--equal_assign: y = F [1/0] {24} + ¦--expr: y [0/1] {26} ¦ °--SYMBOL: y [0/0] {25} ¦--EQ_ASSIGN: = [0/1] {27} - °--expr: [0/0] {29} + °--expr: FALSE [0/0] {29} °--NUM_CONST: FALSE [0/0] {28} diff --git a/tests/testthat/relocate_eq_assign/eq_assign_ifelse_scope_tokens-in_tree b/tests/testthat/relocate_eq_assign/eq_assign_ifelse_scope_tokens-in_tree index 94e72e7dc..eecab69b4 100644 --- a/tests/testthat/relocate_eq_assign/eq_assign_ifelse_scope_tokens-in_tree +++ b/tests/testthat/relocate_eq_assign/eq_assign_ifelse_scope_tokens-in_tree @@ -1,30 +1,30 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--equal_assign: [0/0] {1} - ¦ ¦--expr: [0/1] {3} + ¦--equal_assign: x = 5 [0/0] {1} + ¦ ¦--expr: x [0/1] {3} ¦ ¦ °--SYMBOL: x [0/0] {2} ¦ ¦--EQ_ASSIGN: = [0/1] {4} - ¦ °--expr: [0/0] {6} + ¦ °--expr: 5 [0/0] {6} ¦ °--NUM_CONST: 5 [0/0] {5} - °--expr: [2/0] {7} + °--expr: if(x [2/0] {7} ¦--IF: if [0/0] {8} ¦--'(': ( [0/0] {9} - ¦--expr: [0/0] {10} - ¦ ¦--expr: [0/1] {12} + ¦--expr: x >= [0/0] {10} + ¦ ¦--expr: x [0/1] {12} ¦ ¦ °--SYMBOL: x [0/0] {11} ¦ ¦--GE: >= [0/1] {13} - ¦ °--expr: [0/0] {15} + ¦ °--expr: 5 [0/0] {15} ¦ °--NUM_CONST: 5 [0/0] {14} ¦--')': ) [0/2] {16} - ¦--equal_assign: [1/1] {17} - ¦ ¦--expr: [0/1] {19} + ¦--equal_assign: y = T [1/1] {17} + ¦ ¦--expr: y [0/1] {19} ¦ ¦ °--SYMBOL: y [0/0] {18} ¦ ¦--EQ_ASSIGN: = [0/1] {20} - ¦ °--expr: [0/0] {22} + ¦ °--expr: TRUE [0/0] {22} ¦ °--NUM_CONST: TRUE [0/0] {21} ¦--ELSE: else [0/4] {23} - °--equal_assign: [1/0] {24} - ¦--expr: [0/1] {26} + °--equal_assign: y = F [1/0] {24} + ¦--expr: y [0/1] {26} ¦ °--SYMBOL: y [0/0] {25} ¦--EQ_ASSIGN: = [0/1] {27} - °--expr: [0/0] {29} + °--expr: FALSE [0/0] {29} °--NUM_CONST: FALSE [0/0] {28} diff --git a/tests/testthat/relocate_eq_assign/eq_assign_multiple_tokens_eq_only-in_tree b/tests/testthat/relocate_eq_assign/eq_assign_multiple_tokens_eq_only-in_tree index 3f4a82b66..2b0bdc327 100644 --- a/tests/testthat/relocate_eq_assign/eq_assign_multiple_tokens_eq_only-in_tree +++ b/tests/testthat/relocate_eq_assign/eq_assign_multiple_tokens_eq_only-in_tree @@ -1,103 +1,103 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--equal_assign: [0/0] {1} - ¦ ¦--expr: [0/1] {3} + ¦--equal_assign: a = b [0/0] {1} + ¦ ¦--expr: a [0/1] {3} ¦ ¦ °--SYMBOL: a [0/0] {2} ¦ ¦--EQ_ASSIGN: = [0/1] {4} - ¦ ¦--expr: [0/1] {7} + ¦ ¦--expr: b [0/1] {7} ¦ ¦ °--SYMBOL: b [0/0] {6} ¦ ¦--EQ_ASSIGN: = [0/1] {8} - ¦ ¦--expr: [0/1] {11} + ¦ ¦--expr: c [0/1] {11} ¦ ¦ °--SYMBOL: c [0/0] {10} ¦ ¦--EQ_ASSIGN: = [0/1] {12} - ¦ ¦--expr: [0/1] {15} + ¦ ¦--expr: d [0/1] {15} ¦ ¦ °--SYMBOL: d [0/0] {14} ¦ ¦--EQ_ASSIGN: = [0/1] {16} - ¦ ¦--expr: [0/1] {19} + ¦ ¦--expr: e [0/1] {19} ¦ ¦ °--SYMBOL: e [0/0] {18} ¦ ¦--EQ_ASSIGN: = [0/1] {20} - ¦ ¦--expr: [0/7] {23} + ¦ ¦--expr: f [0/7] {23} ¦ ¦ °--SYMBOL: f [0/0] {22} ¦ ¦--EQ_ASSIGN: = [0/1] {24} - ¦ ¦--expr: [0/1] {27} + ¦ ¦--expr: g [0/1] {27} ¦ ¦ °--SYMBOL: g [0/0] {26} ¦ ¦--EQ_ASSIGN: = [0/1] {28} - ¦ °--expr: [0/0] {30} + ¦ °--expr: 4 [0/0] {30} ¦ °--NUM_CONST: 4 [0/0] {29} - ¦--expr: [1/0] {31} - ¦ ¦--expr: [0/1] {33} + ¦--expr: a <- [1/0] {31} + ¦ ¦--expr: a [0/1] {33} ¦ ¦ °--SYMBOL: a [0/0] {32} ¦ ¦--LEFT_ASSIGN: <- [0/1] {34} - ¦ °--expr: [0/0] {36} + ¦ °--expr: 3 [0/0] {36} ¦ °--NUM_CONST: 3 [0/0] {35} ¦--';': ; [0/1] {37} - ¦--equal_assign: [0/0] {38} - ¦ ¦--expr: [0/1] {40} + ¦--equal_assign: b = c [0/0] {38} + ¦ ¦--expr: b [0/1] {40} ¦ ¦ °--SYMBOL: b [0/0] {39} ¦ ¦--EQ_ASSIGN: = [0/1] {41} - ¦ ¦--expr: [0/1] {44} + ¦ ¦--expr: c [0/1] {44} ¦ ¦ °--SYMBOL: c [0/0] {43} ¦ ¦--EQ_ASSIGN: = [0/1] {45} - ¦ ¦--expr: [0/1] {48} + ¦ ¦--expr: d [0/1] {48} ¦ ¦ °--SYMBOL: d [0/0] {47} ¦ ¦--EQ_ASSIGN: = [0/1] {49} - ¦ ¦--expr: [0/1] {52} + ¦ ¦--expr: ey [0/1] {52} ¦ ¦ °--SYMBOL: ey [0/0] {51} ¦ ¦--LEFT_ASSIGN: <- [0/1] {53} - ¦ °--expr: [0/0] {55} + ¦ °--expr: 4 [0/0] {55} ¦ °--NUM_CONST: 4 [0/0] {54} - ¦--expr: [1/0] {56} - ¦ ¦--expr: [0/1] {58} + ¦--expr: a <- [1/0] {56} + ¦ ¦--expr: a [0/1] {58} ¦ ¦ °--SYMBOL: a [0/0] {57} ¦ ¦--LEFT_ASSIGN: <- [0/1] {59} - ¦ °--expr: [0/0] {61} + ¦ °--expr: 3 [0/0] {61} ¦ °--NUM_CONST: 3 [0/0] {60} ¦--';': ; [0/1] {62} - ¦--equal_assign: [0/0] {63} - ¦ ¦--expr: [0/1] {65} + ¦--equal_assign: b = c [0/0] {63} + ¦ ¦--expr: b [0/1] {65} ¦ ¦ °--SYMBOL: b [0/0] {64} ¦ ¦--EQ_ASSIGN: = [0/1] {66} - ¦ ¦--expr: [0/1] {69} + ¦ ¦--expr: c [0/1] {69} ¦ ¦ °--SYMBOL: c [0/0] {68} ¦ ¦--EQ_ASSIGN: = [0/1] {70} - ¦ ¦--expr: [0/1] {72} - ¦ ¦ ¦--expr: [0/1] {74} + ¦ ¦--expr: d <- [0/1] {72} + ¦ ¦ ¦--expr: d [0/1] {74} ¦ ¦ ¦ °--SYMBOL: d [0/0] {73} ¦ ¦ ¦--LEFT_ASSIGN: <- [0/1] {75} - ¦ ¦ °--expr: [0/0] {77} + ¦ ¦ °--expr: ey [0/0] {77} ¦ ¦ °--SYMBOL: ey [0/0] {76} ¦ ¦--EQ_ASSIGN: = [0/1] {78} - ¦ °--expr: [0/0] {80} + ¦ °--expr: 4 [0/0] {80} ¦ °--NUM_CONST: 4 [0/0] {79} - ¦--equal_assign: [1/0] {81} - ¦ ¦--expr: [0/1] {83} + ¦--equal_assign: ff = [1/0] {81} + ¦ ¦--expr: ff [0/1] {83} ¦ ¦ °--SYMBOL: ff [0/0] {82} ¦ ¦--EQ_ASSIGN: = [0/1] {84} - ¦ °--expr: [0/0] {86} + ¦ °--expr: 3 [0/0] {86} ¦ °--NUM_CONST: 3 [0/0] {85} ¦--';': ; [0/1] {87} - ¦--equal_assign: [0/1] {88} - ¦ ¦--expr: [0/1] {90} + ¦--equal_assign: b = c [0/1] {88} + ¦ ¦--expr: b [0/1] {90} ¦ ¦ °--SYMBOL: b [0/0] {89} ¦ ¦--EQ_ASSIGN: = [0/1] {91} - ¦ ¦--expr: [0/1] {94} + ¦ ¦--expr: c [0/1] {94} ¦ ¦ °--SYMBOL: c [0/0] {93} ¦ ¦--EQ_ASSIGN: = [0/1] {95} - ¦ ¦--expr: [0/1] {98} + ¦ ¦--expr: d [0/1] {98} ¦ ¦ °--SYMBOL: d [0/0] {97} ¦ ¦--EQ_ASSIGN: = [0/1] {99} - ¦ °--expr: [0/0] {101} + ¦ °--expr: 3 [0/0] {101} ¦ °--NUM_CONST: 3 [0/0] {100} ¦--';': ; [0/1] {102} - ¦--equal_assign: [0/0] {103} - ¦ ¦--expr: [0/1] {105} + ¦--equal_assign: g = 4 [0/0] {103} + ¦ ¦--expr: g [0/1] {105} ¦ ¦ °--SYMBOL: g [0/0] {104} ¦ ¦--EQ_ASSIGN: = [0/1] {106} - ¦ °--expr: [0/0] {108} + ¦ °--expr: 4 [0/0] {108} ¦ °--NUM_CONST: 4 [0/0] {107} ¦--';': ; [0/1] {109} - °--equal_assign: [0/0] {110} - ¦--expr: [0/1] {112} + °--equal_assign: ge = [0/0] {110} + ¦--expr: ge [0/1] {112} ¦ °--SYMBOL: ge [0/0] {111} ¦--EQ_ASSIGN: = [0/1] {113} - °--expr: [0/0] {115} + °--expr: 5 [0/0] {115} °--NUM_CONST: 5 [0/0] {114} diff --git a/tests/testthat/relocate_eq_assign/eq_assign_multiple_tokens_mixed-in_tree b/tests/testthat/relocate_eq_assign/eq_assign_multiple_tokens_mixed-in_tree index 4eb77d4a0..ff0392866 100644 --- a/tests/testthat/relocate_eq_assign/eq_assign_multiple_tokens_mixed-in_tree +++ b/tests/testthat/relocate_eq_assign/eq_assign_multiple_tokens_mixed-in_tree @@ -1,25 +1,25 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--equal_assign: [0/0] {1} - ¦--expr: [0/1] {3} + °--equal_assign: a = b [0/0] {1} + ¦--expr: a [0/1] {3} ¦ °--SYMBOL: a [0/0] {2} ¦--EQ_ASSIGN: = [0/1] {4} - ¦--expr: [0/1] {7} + ¦--expr: b [0/1] {7} ¦ °--SYMBOL: b [0/0] {6} ¦--EQ_ASSIGN: = [0/1] {8} - ¦--expr: [0/1] {11} + ¦--expr: c [0/1] {11} ¦ °--SYMBOL: c [0/0] {10} ¦--EQ_ASSIGN: = [0/1] {12} - ¦--expr: [0/1] {15} + ¦--expr: d [0/1] {15} ¦ °--SYMBOL: d [0/0] {14} ¦--EQ_ASSIGN: = [0/1] {16} - ¦--expr: [0/1] {19} + ¦--expr: e [0/1] {19} ¦ °--SYMBOL: e [0/0] {18} ¦--EQ_ASSIGN: = [0/1] {20} - ¦--expr: [0/7] {23} + ¦--expr: f [0/7] {23} ¦ °--SYMBOL: f [0/0] {22} ¦--EQ_ASSIGN: = [0/1] {24} - ¦--expr: [0/1] {27} + ¦--expr: g [0/1] {27} ¦ °--SYMBOL: g [0/0] {26} ¦--LEFT_ASSIGN: <- [0/1] {28} - °--expr: [0/0] {30} + °--expr: 4 [0/0] {30} °--NUM_CONST: 4 [0/0] {29} diff --git a/tests/testthat/roxygen-examples-complete/1-one-function-example-last-proper-run-in_tree b/tests/testthat/roxygen-examples-complete/1-one-function-example-last-proper-run-in_tree index 6e65a6a78..2cb3e2b3d 100644 --- a/tests/testthat/roxygen-examples-complete/1-one-function-example-last-proper-run-in_tree +++ b/tests/testthat/roxygen-examples-complete/1-one-function-example-last-proper-run-in_tree @@ -5,9 +5,9 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--COMMENT: #' (c [1/0] {4} ¦--COMMENT: #' Ca [1/0] {5} ¦--COMMENT: #'@ex [1/0] {6} - °--expr: [1/0] {7} - ¦--expr: [0/1] {9} + °--expr: a <- [1/0] {7} + ¦--expr: a [0/1] {9} ¦ °--SYMBOL: a [0/0] {8} ¦--LEFT_ASSIGN: <- [0/1] {10} - °--expr: [0/0] {12} + °--expr: 2 [0/0] {12} °--NUM_CONST: 2 [0/0] {11} diff --git a/tests/testthat/roxygen-examples-complete/10-styler-r-ui-in_tree b/tests/testthat/roxygen-examples-complete/10-styler-r-ui-in_tree index 6f1d3b595..070451e6e 100644 --- a/tests/testthat/roxygen-examples-complete/10-styler-r-ui-in_tree +++ b/tests/testthat/roxygen-examples-complete/10-styler-r-ui-in_tree @@ -2,7 +2,7 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--COMMENT: #' @a [0/0] {1} ¦--COMMENT: #' @i [1/0] {2} ¦--COMMENT: #' @i [1/0] {3} - ¦--expr: [1/0] {5} + ¦--expr: NULL [1/0] {5} ¦ °--NULL_CONST: NULL [0/0] {4} ¦--COMMENT: #' Pr [2/0] {6} ¦--COMMENT: #' [1/0] {7} @@ -66,110 +66,111 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--COMMENT: #' ) [1/0] {65} ¦--COMMENT: #' } [1/0] {66} ¦--COMMENT: #' @e [1/0] {67} - ¦--expr: [1/0] {68} - ¦ ¦--expr: [0/1] {70} + ¦--expr: style [1/0] {68} + ¦ ¦--expr: style [0/1] {70} ¦ ¦ °--SYMBOL: style [0/0] {69} ¦ ¦--LEFT_ASSIGN: <- [0/1] {71} - ¦ °--expr: [0/0] {72} + ¦ °--expr: funct [0/0] {72} ¦ ¦--FUNCTION: funct [0/0] {73} ¦ ¦--'(': ( [0/0] {74} ¦ ¦--SYMBOL_FORMALS: pkg [0/1] {75} ¦ ¦--EQ_FORMALS: = [0/1] {76} - ¦ ¦--expr: [0/0] {78} + ¦ ¦--expr: "." [0/0] {78} ¦ ¦ °--STR_CONST: "." [0/0] {77} ¦ ¦--',': , [0/22] {79} ¦ ¦--SYMBOL_FORMALS: ... [1/0] {80} ¦ ¦--',': , [0/22] {81} ¦ ¦--SYMBOL_FORMALS: style [1/1] {82} ¦ ¦--EQ_FORMALS: = [0/1] {83} - ¦ ¦--expr: [0/0] {85} + ¦ ¦--expr: tidyv [0/0] {85} ¦ ¦ °--SYMBOL: tidyv [0/0] {84} ¦ ¦--',': , [0/22] {86} ¦ ¦--SYMBOL_FORMALS: trans [1/1] {87} ¦ ¦--EQ_FORMALS: = [0/1] {88} - ¦ ¦--expr: [0/0] {89} - ¦ ¦ ¦--expr: [0/0] {91} + ¦ ¦--expr: style [0/0] {89} + ¦ ¦ ¦--expr: style [0/0] {91} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: style [0/0] {90} ¦ ¦ ¦--'(': ( [0/0] {92} - ¦ ¦ ¦--expr: [0/0] {94} + ¦ ¦ ¦--expr: ... [0/0] {94} ¦ ¦ ¦ °--SYMBOL: ... [0/0] {93} ¦ ¦ °--')': ) [0/0] {95} ¦ ¦--',': , [0/22] {96} ¦ ¦--SYMBOL_FORMALS: filet [1/1] {97} ¦ ¦--EQ_FORMALS: = [0/1] {98} - ¦ ¦--expr: [0/0] {100} + ¦ ¦--expr: "R" [0/0] {100} ¦ ¦ °--STR_CONST: "R" [0/0] {99} ¦ ¦--',': , [0/22] {101} ¦ ¦--SYMBOL_FORMALS: exclu [1/1] {102} ¦ ¦--EQ_FORMALS: = [0/1] {103} - ¦ ¦--expr: [0/0] {105} + ¦ ¦--expr: "R/Rc [0/0] {105} ¦ ¦ °--STR_CONST: "R/Rc [0/0] {104} ¦ ¦--',': , [0/22] {106} ¦ ¦--SYMBOL_FORMALS: inclu [1/1] {107} ¦ ¦--EQ_FORMALS: = [0/1] {108} - ¦ ¦--expr: [0/0] {110} + ¦ ¦--expr: TRUE [0/0] {110} ¦ ¦ °--NUM_CONST: TRUE [0/0] {109} ¦ ¦--')': ) [0/1] {111} - ¦ °--expr: [0/0] {112} + ¦ °--expr: { + p [0/0] {112} ¦ ¦--'{': { [0/2] {113} - ¦ ¦--expr: [1/2] {114} - ¦ ¦ ¦--expr: [0/1] {116} + ¦ ¦--expr: pkg_r [1/2] {114} + ¦ ¦ ¦--expr: pkg_r [0/1] {116} ¦ ¦ ¦ °--SYMBOL: pkg_r [0/0] {115} ¦ ¦ ¦--LEFT_ASSIGN: <- [0/1] {117} - ¦ ¦ °--expr: [0/0] {118} - ¦ ¦ ¦--expr: [0/0] {119} + ¦ ¦ °--expr: rproj [0/0] {118} + ¦ ¦ ¦--expr: rproj [0/0] {119} ¦ ¦ ¦ ¦--SYMBOL_PACKAGE: rproj [0/0] {120} ¦ ¦ ¦ ¦--NS_GET: :: [0/0] {121} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: find_ [0/0] {122} ¦ ¦ ¦--'(': ( [0/0] {123} ¦ ¦ ¦--SYMBOL_SUB: path [0/1] {124} ¦ ¦ ¦--EQ_SUB: = [0/1] {125} - ¦ ¦ ¦--expr: [0/0] {127} + ¦ ¦ ¦--expr: pkg [0/0] {127} ¦ ¦ ¦ °--SYMBOL: pkg [0/0] {126} ¦ ¦ °--')': ) [0/0] {128} - ¦ ¦--expr: [1/2] {129} - ¦ ¦ ¦--expr: [0/1] {131} + ¦ ¦--expr: chang [1/2] {129} + ¦ ¦ ¦--expr: chang [0/1] {131} ¦ ¦ ¦ °--SYMBOL: chang [0/0] {130} ¦ ¦ ¦--LEFT_ASSIGN: <- [0/1] {132} - ¦ ¦ °--expr: [0/0] {133} - ¦ ¦ ¦--expr: [0/0] {134} + ¦ ¦ °--expr: withr [0/0] {133} + ¦ ¦ ¦--expr: withr [0/0] {134} ¦ ¦ ¦ ¦--SYMBOL_PACKAGE: withr [0/0] {135} ¦ ¦ ¦ ¦--NS_GET: :: [0/0] {136} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: with_ [0/0] {137} ¦ ¦ ¦--'(': ( [0/0] {138} - ¦ ¦ ¦--expr: [0/0] {140} + ¦ ¦ ¦--expr: pkg_r [0/0] {140} ¦ ¦ ¦ °--SYMBOL: pkg_r [0/0] {139} ¦ ¦ ¦--',': , [0/1] {141} - ¦ ¦ ¦--expr: [0/0] {142} - ¦ ¦ ¦ ¦--expr: [0/0] {144} + ¦ ¦ ¦--expr: prett [0/0] {142} + ¦ ¦ ¦ ¦--expr: prett [0/0] {144} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: prett [0/0] {143} ¦ ¦ ¦ ¦--'(': ( [0/4] {145} - ¦ ¦ ¦ ¦--expr: [1/0] {147} + ¦ ¦ ¦ ¦--expr: trans [1/0] {147} ¦ ¦ ¦ ¦ °--SYMBOL: trans [0/0] {146} ¦ ¦ ¦ ¦--',': , [0/1] {148} - ¦ ¦ ¦ ¦--expr: [0/0] {150} + ¦ ¦ ¦ ¦--expr: filet [0/0] {150} ¦ ¦ ¦ ¦ °--SYMBOL: filet [0/0] {149} ¦ ¦ ¦ ¦--',': , [0/1] {151} - ¦ ¦ ¦ ¦--expr: [0/0] {153} + ¦ ¦ ¦ ¦--expr: exclu [0/0] {153} ¦ ¦ ¦ ¦ °--SYMBOL: exclu [0/0] {152} ¦ ¦ ¦ ¦--',': , [0/1] {154} - ¦ ¦ ¦ ¦--expr: [0/2] {156} + ¦ ¦ ¦ ¦--expr: inclu [0/2] {156} ¦ ¦ ¦ ¦ °--SYMBOL: inclu [0/0] {155} ¦ ¦ ¦ °--')': ) [1/0] {157} ¦ ¦ °--')': ) [0/0] {158} - ¦ ¦--expr: [1/0] {159} - ¦ ¦ ¦--expr: [0/0] {161} + ¦ ¦--expr: invis [1/0] {159} + ¦ ¦ ¦--expr: invis [0/0] {161} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: invis [0/0] {160} ¦ ¦ ¦--'(': ( [0/0] {162} - ¦ ¦ ¦--expr: [0/0] {164} + ¦ ¦ ¦--expr: chang [0/0] {164} ¦ ¦ ¦ °--SYMBOL: chang [0/0] {163} ¦ ¦ °--')': ) [0/0] {165} ¦ °--'}': } [1/0] {166} - ¦--expr: [2/0] {167} - ¦ ¦--expr: [0/1] {169} + ¦--expr: prett [2/0] {167} + ¦ ¦--expr: prett [0/1] {169} ¦ ¦ °--SYMBOL: prett [0/0] {168} ¦ ¦--LEFT_ASSIGN: <- [0/1] {170} - ¦ °--expr: [0/0] {171} + ¦ °--expr: funct [0/0] {171} ¦ ¦--FUNCTION: funct [0/0] {172} ¦ ¦--'(': ( [0/0] {173} ¦ ¦--SYMBOL_FORMALS: trans [0/0] {174} @@ -180,188 +181,193 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦ ¦--',': , [0/25] {179} ¦ ¦--SYMBOL_FORMALS: inclu [1/0] {180} ¦ ¦--')': ) [0/1] {181} - ¦ °--expr: [0/0] {182} + ¦ °--expr: { + f [0/0] {182} ¦ ¦--'{': { [0/2] {183} - ¦ ¦--expr: [1/2] {184} - ¦ ¦ ¦--expr: [0/1] {186} + ¦ ¦--expr: filet [1/2] {184} + ¦ ¦ ¦--expr: filet [0/1] {186} ¦ ¦ ¦ °--SYMBOL: filet [0/0] {185} ¦ ¦ ¦--LEFT_ASSIGN: <- [0/1] {187} - ¦ ¦ °--expr: [0/0] {188} - ¦ ¦ ¦--expr: [0/0] {190} + ¦ ¦ °--expr: set_a [0/0] {188} + ¦ ¦ ¦--expr: set_a [0/0] {190} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: set_a [0/0] {189} ¦ ¦ ¦--'(': ( [0/0] {191} - ¦ ¦ ¦--expr: [0/0] {193} + ¦ ¦ ¦--expr: filet [0/0] {193} ¦ ¦ ¦ °--SYMBOL: filet [0/0] {192} ¦ ¦ °--')': ) [0/0] {194} - ¦ ¦--expr: [1/2] {195} - ¦ ¦ ¦--expr: [0/1] {197} + ¦ ¦--expr: r_fil [1/2] {195} + ¦ ¦ ¦--expr: r_fil [0/1] {197} ¦ ¦ ¦ °--SYMBOL: r_fil [0/0] {196} ¦ ¦ ¦--LEFT_ASSIGN: <- [0/1] {198} - ¦ ¦ ¦--expr: [0/1] {201} + ¦ ¦ ¦--expr: vigne [0/1] {201} ¦ ¦ ¦ °--SYMBOL: vigne [0/0] {200} ¦ ¦ ¦--LEFT_ASSIGN: <- [0/1] {202} - ¦ ¦ ¦--expr: [0/1] {205} + ¦ ¦ ¦--expr: readm [0/1] {205} ¦ ¦ ¦ °--SYMBOL: readm [0/0] {204} ¦ ¦ ¦--LEFT_ASSIGN: <- [0/1] {206} - ¦ ¦ °--expr: [0/0] {208} + ¦ ¦ °--expr: NULL [0/0] {208} ¦ ¦ °--NULL_CONST: NULL [0/0] {207} - ¦ ¦--expr: [2/2] {209} + ¦ ¦--expr: if (" [2/2] {209} ¦ ¦ ¦--IF: if [0/1] {210} ¦ ¦ ¦--'(': ( [0/0] {211} - ¦ ¦ ¦--expr: [0/0] {212} - ¦ ¦ ¦ ¦--expr: [0/1] {214} + ¦ ¦ ¦--expr: "\\.r [0/0] {212} + ¦ ¦ ¦ ¦--expr: "\\.r [0/1] {214} ¦ ¦ ¦ ¦ °--STR_CONST: "\\.r [0/0] {213} ¦ ¦ ¦ ¦--SPECIAL-IN: %in% [0/1] {215} - ¦ ¦ ¦ °--expr: [0/0] {217} + ¦ ¦ ¦ °--expr: filet [0/0] {217} ¦ ¦ ¦ °--SYMBOL: filet [0/0] {216} ¦ ¦ ¦--')': ) [0/1] {218} - ¦ ¦ °--expr: [0/0] {219} + ¦ ¦ °--expr: { + [0/0] {219} ¦ ¦ ¦--'{': { [0/4] {220} - ¦ ¦ ¦--expr: [1/2] {221} - ¦ ¦ ¦ ¦--expr: [0/1] {223} + ¦ ¦ ¦--expr: r_fil [1/2] {221} + ¦ ¦ ¦ ¦--expr: r_fil [0/1] {223} ¦ ¦ ¦ ¦ °--SYMBOL: r_fil [0/0] {222} ¦ ¦ ¦ ¦--LEFT_ASSIGN: <- [0/1] {224} - ¦ ¦ ¦ °--expr: [0/0] {225} - ¦ ¦ ¦ ¦--expr: [0/0] {227} + ¦ ¦ ¦ °--expr: dir( + [0/0] {225} + ¦ ¦ ¦ ¦--expr: dir [0/0] {227} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: dir [0/0] {226} ¦ ¦ ¦ ¦--'(': ( [0/6] {228} ¦ ¦ ¦ ¦--SYMBOL_SUB: path [1/1] {229} ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {230} - ¦ ¦ ¦ ¦--expr: [0/0] {231} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {233} + ¦ ¦ ¦ ¦--expr: c("R" [0/0] {231} + ¦ ¦ ¦ ¦ ¦--expr: c [0/0] {233} ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {232} ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {234} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {236} + ¦ ¦ ¦ ¦ ¦--expr: "R" [0/0] {236} ¦ ¦ ¦ ¦ ¦ °--STR_CONST: "R" [0/0] {235} ¦ ¦ ¦ ¦ ¦--',': , [0/1] {237} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {239} + ¦ ¦ ¦ ¦ ¦--expr: "test [0/0] {239} ¦ ¦ ¦ ¦ ¦ °--STR_CONST: "test [0/0] {238} ¦ ¦ ¦ ¦ ¦--',': , [0/1] {240} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {242} + ¦ ¦ ¦ ¦ ¦--expr: "data [0/0] {242} ¦ ¦ ¦ ¦ ¦ °--STR_CONST: "data [0/0] {241} ¦ ¦ ¦ ¦ °--')': ) [0/0] {243} ¦ ¦ ¦ ¦--',': , [0/1] {244} ¦ ¦ ¦ ¦--SYMBOL_SUB: patte [0/1] {245} ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {246} - ¦ ¦ ¦ ¦--expr: [0/0] {248} + ¦ ¦ ¦ ¦--expr: "\\.r [0/0] {248} ¦ ¦ ¦ ¦ °--STR_CONST: "\\.r [0/0] {247} ¦ ¦ ¦ ¦--',': , [0/6] {249} ¦ ¦ ¦ ¦--SYMBOL_SUB: ignor [1/1] {250} ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {251} - ¦ ¦ ¦ ¦--expr: [0/0] {253} + ¦ ¦ ¦ ¦--expr: TRUE [0/0] {253} ¦ ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {252} ¦ ¦ ¦ ¦--',': , [0/1] {254} ¦ ¦ ¦ ¦--SYMBOL_SUB: recur [0/1] {255} ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {256} - ¦ ¦ ¦ ¦--expr: [0/0] {258} + ¦ ¦ ¦ ¦--expr: TRUE [0/0] {258} ¦ ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {257} ¦ ¦ ¦ ¦--',': , [0/1] {259} ¦ ¦ ¦ ¦--SYMBOL_SUB: full. [0/1] {260} ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {261} - ¦ ¦ ¦ ¦--expr: [0/4] {263} + ¦ ¦ ¦ ¦--expr: TRUE [0/4] {263} ¦ ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {262} ¦ ¦ ¦ °--')': ) [1/0] {264} ¦ ¦ °--'}': } [1/0] {265} - ¦ ¦--expr: [2/2] {266} + ¦ ¦--expr: if (" [2/2] {266} ¦ ¦ ¦--IF: if [0/1] {267} ¦ ¦ ¦--'(': ( [0/0] {268} - ¦ ¦ ¦--expr: [0/0] {269} - ¦ ¦ ¦ ¦--expr: [0/1] {271} + ¦ ¦ ¦--expr: "\\.r [0/0] {269} + ¦ ¦ ¦ ¦--expr: "\\.r [0/1] {271} ¦ ¦ ¦ ¦ °--STR_CONST: "\\.r [0/0] {270} ¦ ¦ ¦ ¦--SPECIAL-IN: %in% [0/1] {272} - ¦ ¦ ¦ °--expr: [0/0] {274} + ¦ ¦ ¦ °--expr: filet [0/0] {274} ¦ ¦ ¦ °--SYMBOL: filet [0/0] {273} ¦ ¦ ¦--')': ) [0/1] {275} - ¦ ¦ °--expr: [0/0] {276} + ¦ ¦ °--expr: { + [0/0] {276} ¦ ¦ ¦--'{': { [0/4] {277} - ¦ ¦ ¦--expr: [1/4] {278} - ¦ ¦ ¦ ¦--expr: [0/1] {280} + ¦ ¦ ¦--expr: vigne [1/4] {278} + ¦ ¦ ¦ ¦--expr: vigne [0/1] {280} ¦ ¦ ¦ ¦ °--SYMBOL: vigne [0/0] {279} ¦ ¦ ¦ ¦--LEFT_ASSIGN: <- [0/1] {281} - ¦ ¦ ¦ °--expr: [0/0] {282} - ¦ ¦ ¦ ¦--expr: [0/0] {284} + ¦ ¦ ¦ °--expr: dir( + [0/0] {282} + ¦ ¦ ¦ ¦--expr: dir [0/0] {284} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: dir [0/0] {283} ¦ ¦ ¦ ¦--'(': ( [0/6] {285} ¦ ¦ ¦ ¦--SYMBOL_SUB: path [1/1] {286} ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {287} - ¦ ¦ ¦ ¦--expr: [0/0] {289} + ¦ ¦ ¦ ¦--expr: "vign [0/0] {289} ¦ ¦ ¦ ¦ °--STR_CONST: "vign [0/0] {288} ¦ ¦ ¦ ¦--',': , [0/1] {290} ¦ ¦ ¦ ¦--SYMBOL_SUB: patte [0/1] {291} ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {292} - ¦ ¦ ¦ ¦--expr: [0/0] {294} + ¦ ¦ ¦ ¦--expr: "\\.r [0/0] {294} ¦ ¦ ¦ ¦ °--STR_CONST: "\\.r [0/0] {293} ¦ ¦ ¦ ¦--',': , [0/6] {295} ¦ ¦ ¦ ¦--SYMBOL_SUB: ignor [1/1] {296} ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {297} - ¦ ¦ ¦ ¦--expr: [0/0] {299} + ¦ ¦ ¦ ¦--expr: TRUE [0/0] {299} ¦ ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {298} ¦ ¦ ¦ ¦--',': , [0/1] {300} ¦ ¦ ¦ ¦--SYMBOL_SUB: recur [0/1] {301} ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {302} - ¦ ¦ ¦ ¦--expr: [0/0] {304} + ¦ ¦ ¦ ¦--expr: TRUE [0/0] {304} ¦ ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {303} ¦ ¦ ¦ ¦--',': , [0/1] {305} ¦ ¦ ¦ ¦--SYMBOL_SUB: full. [0/1] {306} ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {307} - ¦ ¦ ¦ ¦--expr: [0/4] {309} + ¦ ¦ ¦ ¦--expr: TRUE [0/4] {309} ¦ ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {308} ¦ ¦ ¦ °--')': ) [1/0] {310} - ¦ ¦ ¦--expr: [1/2] {311} - ¦ ¦ ¦ ¦--expr: [0/1] {313} + ¦ ¦ ¦--expr: readm [1/2] {311} + ¦ ¦ ¦ ¦--expr: readm [0/1] {313} ¦ ¦ ¦ ¦ °--SYMBOL: readm [0/0] {312} ¦ ¦ ¦ ¦--LEFT_ASSIGN: <- [0/1] {314} - ¦ ¦ ¦ °--expr: [0/0] {315} - ¦ ¦ ¦ ¦--expr: [0/0] {317} + ¦ ¦ ¦ °--expr: dir(p [0/0] {315} + ¦ ¦ ¦ ¦--expr: dir [0/0] {317} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: dir [0/0] {316} ¦ ¦ ¦ ¦--'(': ( [0/0] {318} ¦ ¦ ¦ ¦--SYMBOL_SUB: patte [0/1] {319} ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {320} - ¦ ¦ ¦ ¦--expr: [0/0] {322} + ¦ ¦ ¦ ¦--expr: "^rea [0/0] {322} ¦ ¦ ¦ ¦ °--STR_CONST: "^rea [0/0] {321} ¦ ¦ ¦ ¦--',': , [0/1] {323} ¦ ¦ ¦ ¦--SYMBOL_SUB: ignor [0/1] {324} ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {325} - ¦ ¦ ¦ ¦--expr: [0/0] {327} + ¦ ¦ ¦ ¦--expr: TRUE [0/0] {327} ¦ ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {326} ¦ ¦ ¦ °--')': ) [0/0] {328} ¦ ¦ °--'}': } [1/0] {329} - ¦ ¦--expr: [2/2] {330} - ¦ ¦ ¦--expr: [0/1] {332} + ¦ ¦--expr: files [2/2] {330} + ¦ ¦ ¦--expr: files [0/1] {332} ¦ ¦ ¦ °--SYMBOL: files [0/0] {331} ¦ ¦ ¦--LEFT_ASSIGN: <- [0/1] {333} - ¦ ¦ °--expr: [0/0] {334} - ¦ ¦ ¦--expr: [0/0] {336} + ¦ ¦ °--expr: setdi [0/0] {334} + ¦ ¦ ¦--expr: setdi [0/0] {336} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: setdi [0/0] {335} ¦ ¦ ¦--'(': ( [0/0] {337} - ¦ ¦ ¦--expr: [0/0] {338} - ¦ ¦ ¦ ¦--expr: [0/0] {340} + ¦ ¦ ¦--expr: c(r_f [0/0] {338} + ¦ ¦ ¦ ¦--expr: c [0/0] {340} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {339} ¦ ¦ ¦ ¦--'(': ( [0/0] {341} - ¦ ¦ ¦ ¦--expr: [0/0] {343} + ¦ ¦ ¦ ¦--expr: r_fil [0/0] {343} ¦ ¦ ¦ ¦ °--SYMBOL: r_fil [0/0] {342} ¦ ¦ ¦ ¦--',': , [0/1] {344} - ¦ ¦ ¦ ¦--expr: [0/0] {346} + ¦ ¦ ¦ ¦--expr: vigne [0/0] {346} ¦ ¦ ¦ ¦ °--SYMBOL: vigne [0/0] {345} ¦ ¦ ¦ ¦--',': , [0/1] {347} - ¦ ¦ ¦ ¦--expr: [0/0] {349} + ¦ ¦ ¦ ¦--expr: readm [0/0] {349} ¦ ¦ ¦ ¦ °--SYMBOL: readm [0/0] {348} ¦ ¦ ¦ °--')': ) [0/0] {350} ¦ ¦ ¦--',': , [0/1] {351} - ¦ ¦ ¦--expr: [0/0] {353} + ¦ ¦ ¦--expr: exclu [0/0] {353} ¦ ¦ ¦ °--SYMBOL: exclu [0/0] {352} ¦ ¦ °--')': ) [0/0] {354} - ¦ ¦--expr: [1/0] {355} - ¦ ¦ ¦--expr: [0/0] {357} + ¦ ¦--expr: trans [1/0] {355} + ¦ ¦ ¦--expr: trans [0/0] {357} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: trans [0/0] {356} ¦ ¦ ¦--'(': ( [0/0] {358} - ¦ ¦ ¦--expr: [0/0] {360} + ¦ ¦ ¦--expr: files [0/0] {360} ¦ ¦ ¦ °--SYMBOL: files [0/0] {359} ¦ ¦ ¦--',': , [0/1] {361} - ¦ ¦ ¦--expr: [0/0] {363} + ¦ ¦ ¦--expr: trans [0/0] {363} ¦ ¦ ¦ °--SYMBOL: trans [0/0] {362} ¦ ¦ ¦--',': , [0/1] {364} - ¦ ¦ ¦--expr: [0/0] {366} + ¦ ¦ ¦--expr: inclu [0/0] {366} ¦ ¦ ¦ °--SYMBOL: inclu [0/0] {365} ¦ ¦ °--')': ) [0/0] {367} ¦ °--'}': } [1/0] {368} @@ -382,11 +388,11 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--COMMENT: #' st [1/0] {383} ¦--COMMENT: #' st [1/0] {384} ¦--COMMENT: #' @e [1/0] {385} - ¦--expr: [1/0] {386} - ¦ ¦--expr: [0/1] {388} + ¦--expr: style [1/0] {386} + ¦ ¦--expr: style [0/1] {388} ¦ ¦ °--SYMBOL: style [0/0] {387} ¦ ¦--LEFT_ASSIGN: <- [0/1] {389} - ¦ °--expr: [0/0] {390} + ¦ °--expr: funct [0/0] {390} ¦ ¦--FUNCTION: funct [0/0] {391} ¦ ¦--'(': ( [0/0] {392} ¦ ¦--SYMBOL_FORMALS: text [0/0] {393} @@ -395,56 +401,57 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦ ¦--',': , [0/23] {396} ¦ ¦--SYMBOL_FORMALS: style [1/1] {397} ¦ ¦--EQ_FORMALS: = [0/1] {398} - ¦ ¦--expr: [0/0] {400} + ¦ ¦--expr: tidyv [0/0] {400} ¦ ¦ °--SYMBOL: tidyv [0/0] {399} ¦ ¦--',': , [0/23] {401} ¦ ¦--SYMBOL_FORMALS: trans [1/1] {402} ¦ ¦--EQ_FORMALS: = [0/1] {403} - ¦ ¦--expr: [0/0] {404} - ¦ ¦ ¦--expr: [0/0] {406} + ¦ ¦--expr: style [0/0] {404} + ¦ ¦ ¦--expr: style [0/0] {406} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: style [0/0] {405} ¦ ¦ ¦--'(': ( [0/0] {407} - ¦ ¦ ¦--expr: [0/0] {409} + ¦ ¦ ¦--expr: ... [0/0] {409} ¦ ¦ ¦ °--SYMBOL: ... [0/0] {408} ¦ ¦ °--')': ) [0/0] {410} ¦ ¦--',': , [0/23] {411} ¦ ¦--SYMBOL_FORMALS: inclu [1/1] {412} ¦ ¦--EQ_FORMALS: = [0/1] {413} - ¦ ¦--expr: [0/0] {415} + ¦ ¦--expr: TRUE [0/0] {415} ¦ ¦ °--NUM_CONST: TRUE [0/0] {414} ¦ ¦--')': ) [0/1] {416} - ¦ °--expr: [0/0] {417} + ¦ °--expr: { + t [0/0] {417} ¦ ¦--'{': { [0/2] {418} - ¦ ¦--expr: [1/2] {419} - ¦ ¦ ¦--expr: [0/1] {421} + ¦ ¦--expr: trans [1/2] {419} + ¦ ¦ ¦--expr: trans [0/1] {421} ¦ ¦ ¦ °--SYMBOL: trans [0/0] {420} ¦ ¦ ¦--LEFT_ASSIGN: <- [0/1] {422} - ¦ ¦ °--expr: [0/0] {423} - ¦ ¦ ¦--expr: [0/0] {425} + ¦ ¦ °--expr: make_ [0/0] {423} + ¦ ¦ ¦--expr: make_ [0/0] {425} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: make_ [0/0] {424} ¦ ¦ ¦--'(': ( [0/0] {426} - ¦ ¦ ¦--expr: [0/0] {428} + ¦ ¦ ¦--expr: trans [0/0] {428} ¦ ¦ ¦ °--SYMBOL: trans [0/0] {427} ¦ ¦ ¦--',': , [0/1] {429} - ¦ ¦ ¦--expr: [0/0] {431} + ¦ ¦ ¦--expr: inclu [0/0] {431} ¦ ¦ ¦ °--SYMBOL: inclu [0/0] {430} ¦ ¦ °--')': ) [0/0] {432} - ¦ ¦--expr: [1/2] {433} - ¦ ¦ ¦--expr: [0/1] {435} + ¦ ¦--expr: style [1/2] {433} + ¦ ¦ ¦--expr: style [0/1] {435} ¦ ¦ ¦ °--SYMBOL: style [0/0] {434} ¦ ¦ ¦--LEFT_ASSIGN: <- [0/1] {436} - ¦ ¦ °--expr: [0/0] {437} - ¦ ¦ ¦--expr: [0/0] {439} + ¦ ¦ °--expr: trans [0/0] {437} + ¦ ¦ ¦--expr: trans [0/0] {439} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: trans [0/0] {438} ¦ ¦ ¦--'(': ( [0/0] {440} - ¦ ¦ ¦--expr: [0/0] {442} + ¦ ¦ ¦--expr: text [0/0] {442} ¦ ¦ ¦ °--SYMBOL: text [0/0] {441} ¦ ¦ °--')': ) [0/0] {443} - ¦ ¦--expr: [1/0] {444} - ¦ ¦ ¦--expr: [0/0] {446} + ¦ ¦--expr: const [1/0] {444} + ¦ ¦ ¦--expr: const [0/0] {446} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: const [0/0] {445} ¦ ¦ ¦--'(': ( [0/0] {447} - ¦ ¦ ¦--expr: [0/0] {449} + ¦ ¦ ¦--expr: style [0/0] {449} ¦ ¦ ¦ °--SYMBOL: style [0/0] {448} ¦ ¦ °--')': ) [0/0] {450} ¦ °--'}': } [1/0] {451} @@ -465,95 +472,96 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--COMMENT: #' st [1/0] {466} ¦--COMMENT: #' } [1/0] {467} ¦--COMMENT: #' @e [1/0] {468} - ¦--expr: [1/0] {469} - ¦ ¦--expr: [0/1] {471} + ¦--expr: style [1/0] {469} + ¦ ¦--expr: style [0/1] {471} ¦ ¦ °--SYMBOL: style [0/0] {470} ¦ ¦--LEFT_ASSIGN: <- [0/1] {472} - ¦ °--expr: [0/0] {473} + ¦ °--expr: funct [0/0] {473} ¦ ¦--FUNCTION: funct [0/0] {474} ¦ ¦--'(': ( [0/0] {475} ¦ ¦--SYMBOL_FORMALS: path [0/1] {476} ¦ ¦--EQ_FORMALS: = [0/1] {477} - ¦ ¦--expr: [0/0] {479} + ¦ ¦--expr: "." [0/0] {479} ¦ ¦ °--STR_CONST: "." [0/0] {478} ¦ ¦--',': , [0/22] {480} ¦ ¦--SYMBOL_FORMALS: ... [1/0] {481} ¦ ¦--',': , [0/22] {482} ¦ ¦--SYMBOL_FORMALS: style [1/1] {483} ¦ ¦--EQ_FORMALS: = [0/1] {484} - ¦ ¦--expr: [0/0] {486} + ¦ ¦--expr: tidyv [0/0] {486} ¦ ¦ °--SYMBOL: tidyv [0/0] {485} ¦ ¦--',': , [0/22] {487} ¦ ¦--SYMBOL_FORMALS: trans [1/1] {488} ¦ ¦--EQ_FORMALS: = [0/1] {489} - ¦ ¦--expr: [0/0] {490} - ¦ ¦ ¦--expr: [0/0] {492} + ¦ ¦--expr: style [0/0] {490} + ¦ ¦ ¦--expr: style [0/0] {492} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: style [0/0] {491} ¦ ¦ ¦--'(': ( [0/0] {493} - ¦ ¦ ¦--expr: [0/0] {495} + ¦ ¦ ¦--expr: ... [0/0] {495} ¦ ¦ ¦ °--SYMBOL: ... [0/0] {494} ¦ ¦ °--')': ) [0/0] {496} ¦ ¦--',': , [0/22] {497} ¦ ¦--SYMBOL_FORMALS: filet [1/1] {498} ¦ ¦--EQ_FORMALS: = [0/1] {499} - ¦ ¦--expr: [0/0] {501} + ¦ ¦--expr: "R" [0/0] {501} ¦ ¦ °--STR_CONST: "R" [0/0] {500} ¦ ¦--',': , [0/22] {502} ¦ ¦--SYMBOL_FORMALS: recur [1/1] {503} ¦ ¦--EQ_FORMALS: = [0/1] {504} - ¦ ¦--expr: [0/0] {506} + ¦ ¦--expr: TRUE [0/0] {506} ¦ ¦ °--NUM_CONST: TRUE [0/0] {505} ¦ ¦--',': , [0/22] {507} ¦ ¦--SYMBOL_FORMALS: exclu [1/1] {508} ¦ ¦--EQ_FORMALS: = [0/1] {509} - ¦ ¦--expr: [0/0] {511} + ¦ ¦--expr: NULL [0/0] {511} ¦ ¦ °--NULL_CONST: NULL [0/0] {510} ¦ ¦--',': , [0/22] {512} ¦ ¦--SYMBOL_FORMALS: inclu [1/1] {513} ¦ ¦--EQ_FORMALS: = [0/1] {514} - ¦ ¦--expr: [0/0] {516} + ¦ ¦--expr: TRUE [0/0] {516} ¦ ¦ °--NUM_CONST: TRUE [0/0] {515} ¦ ¦--')': ) [0/1] {517} - ¦ °--expr: [0/0] {518} + ¦ °--expr: { + c [0/0] {518} ¦ ¦--'{': { [0/2] {519} - ¦ ¦--expr: [1/2] {520} - ¦ ¦ ¦--expr: [0/1] {522} + ¦ ¦--expr: chang [1/2] {520} + ¦ ¦ ¦--expr: chang [0/1] {522} ¦ ¦ ¦ °--SYMBOL: chang [0/0] {521} ¦ ¦ ¦--LEFT_ASSIGN: <- [0/1] {523} - ¦ ¦ °--expr: [0/0] {524} - ¦ ¦ ¦--expr: [0/0] {525} + ¦ ¦ °--expr: withr [0/0] {524} + ¦ ¦ ¦--expr: withr [0/0] {525} ¦ ¦ ¦ ¦--SYMBOL_PACKAGE: withr [0/0] {526} ¦ ¦ ¦ ¦--NS_GET: :: [0/0] {527} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: with_ [0/0] {528} ¦ ¦ ¦--'(': ( [0/4] {529} - ¦ ¦ ¦--expr: [1/0] {531} + ¦ ¦ ¦--expr: path [1/0] {531} ¦ ¦ ¦ °--SYMBOL: path [0/0] {530} ¦ ¦ ¦--',': , [0/1] {532} - ¦ ¦ ¦--expr: [0/2] {533} - ¦ ¦ ¦ ¦--expr: [0/0] {535} + ¦ ¦ ¦--expr: prett [0/2] {533} + ¦ ¦ ¦ ¦--expr: prett [0/0] {535} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: prett [0/0] {534} ¦ ¦ ¦ ¦--'(': ( [0/6] {536} - ¦ ¦ ¦ ¦--expr: [1/0] {538} + ¦ ¦ ¦ ¦--expr: trans [1/0] {538} ¦ ¦ ¦ ¦ °--SYMBOL: trans [0/0] {537} ¦ ¦ ¦ ¦--',': , [0/1] {539} - ¦ ¦ ¦ ¦--expr: [0/0] {541} + ¦ ¦ ¦ ¦--expr: filet [0/0] {541} ¦ ¦ ¦ ¦ °--SYMBOL: filet [0/0] {540} ¦ ¦ ¦ ¦--',': , [0/1] {542} - ¦ ¦ ¦ ¦--expr: [0/0] {544} + ¦ ¦ ¦ ¦--expr: recur [0/0] {544} ¦ ¦ ¦ ¦ °--SYMBOL: recur [0/0] {543} ¦ ¦ ¦ ¦--',': , [0/1] {545} - ¦ ¦ ¦ ¦--expr: [0/0] {547} + ¦ ¦ ¦ ¦--expr: exclu [0/0] {547} ¦ ¦ ¦ ¦ °--SYMBOL: exclu [0/0] {546} ¦ ¦ ¦ ¦--',': , [0/1] {548} - ¦ ¦ ¦ ¦--expr: [0/4] {550} + ¦ ¦ ¦ ¦--expr: inclu [0/4] {550} ¦ ¦ ¦ ¦ °--SYMBOL: inclu [0/0] {549} ¦ ¦ ¦ °--')': ) [1/0] {551} ¦ ¦ °--')': ) [1/0] {552} - ¦ ¦--expr: [1/0] {553} - ¦ ¦ ¦--expr: [0/0] {555} + ¦ ¦--expr: invis [1/0] {553} + ¦ ¦ ¦--expr: invis [0/0] {555} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: invis [0/0] {554} ¦ ¦ ¦--'(': ( [0/0] {556} - ¦ ¦ ¦--expr: [0/0] {558} + ¦ ¦ ¦--expr: chang [0/0] {558} ¦ ¦ ¦ °--SYMBOL: chang [0/0] {557} ¦ ¦ °--')': ) [0/0] {559} ¦ °--'}': } [1/0] {560} @@ -564,11 +572,11 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--COMMENT: #' @p [1/0] {565} ¦--COMMENT: #' [1/0] {566} ¦--COMMENT: #' @k [1/0] {567} - ¦--expr: [1/0] {568} - ¦ ¦--expr: [0/1] {570} + ¦--expr: prett [1/0] {568} + ¦ ¦--expr: prett [0/1] {570} ¦ ¦ °--SYMBOL: prett [0/0] {569} ¦ ¦--LEFT_ASSIGN: <- [0/1] {571} - ¦ °--expr: [0/0] {572} + ¦ °--expr: funct [0/0] {572} ¦ ¦--FUNCTION: funct [0/0] {573} ¦ ¦--'(': ( [0/0] {574} ¦ ¦--SYMBOL_FORMALS: trans [0/0] {575} @@ -581,65 +589,67 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦ ¦--',': , [0/25] {582} ¦ ¦--SYMBOL_FORMALS: inclu [1/0] {583} ¦ ¦--')': ) [0/1] {584} - ¦ °--expr: [0/0] {585} + ¦ °--expr: { + f [0/0] {585} ¦ ¦--'{': { [0/2] {586} - ¦ ¦--expr: [1/2] {587} - ¦ ¦ ¦--expr: [0/1] {589} + ¦ ¦--expr: files [1/2] {587} + ¦ ¦ ¦--expr: files [0/1] {589} ¦ ¦ ¦ °--SYMBOL: files [0/0] {588} ¦ ¦ ¦--LEFT_ASSIGN: <- [0/1] {590} - ¦ ¦ °--expr: [0/0] {591} - ¦ ¦ ¦--expr: [0/0] {593} + ¦ ¦ °--expr: dir( + [0/0] {591} + ¦ ¦ ¦--expr: dir [0/0] {593} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: dir [0/0] {592} ¦ ¦ ¦--'(': ( [0/4] {594} ¦ ¦ ¦--SYMBOL_SUB: path [1/1] {595} ¦ ¦ ¦--EQ_SUB: = [0/1] {596} - ¦ ¦ ¦--expr: [0/0] {598} + ¦ ¦ ¦--expr: "." [0/0] {598} ¦ ¦ ¦ °--STR_CONST: "." [0/0] {597} ¦ ¦ ¦--',': , [0/1] {599} ¦ ¦ ¦--SYMBOL_SUB: patte [0/1] {600} ¦ ¦ ¦--EQ_SUB: = [0/1] {601} - ¦ ¦ ¦--expr: [0/0] {602} - ¦ ¦ ¦ ¦--expr: [0/0] {604} + ¦ ¦ ¦--expr: map_f [0/0] {602} + ¦ ¦ ¦ ¦--expr: map_f [0/0] {604} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: map_f [0/0] {603} ¦ ¦ ¦ ¦--'(': ( [0/0] {605} - ¦ ¦ ¦ ¦--expr: [0/0] {607} + ¦ ¦ ¦ ¦--expr: filet [0/0] {607} ¦ ¦ ¦ ¦ °--SYMBOL: filet [0/0] {606} ¦ ¦ ¦ °--')': ) [0/0] {608} ¦ ¦ ¦--',': , [0/4] {609} ¦ ¦ ¦--SYMBOL_SUB: ignor [1/1] {610} ¦ ¦ ¦--EQ_SUB: = [0/1] {611} - ¦ ¦ ¦--expr: [0/0] {613} + ¦ ¦ ¦--expr: TRUE [0/0] {613} ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {612} ¦ ¦ ¦--',': , [0/1] {614} ¦ ¦ ¦--SYMBOL_SUB: recur [0/1] {615} ¦ ¦ ¦--EQ_SUB: = [0/1] {616} - ¦ ¦ ¦--expr: [0/0] {618} + ¦ ¦ ¦--expr: recur [0/0] {618} ¦ ¦ ¦ °--SYMBOL: recur [0/0] {617} ¦ ¦ ¦--',': , [0/1] {619} ¦ ¦ ¦--SYMBOL_SUB: full. [0/1] {620} ¦ ¦ ¦--EQ_SUB: = [0/1] {621} - ¦ ¦ ¦--expr: [0/2] {623} + ¦ ¦ ¦--expr: TRUE [0/2] {623} ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {622} ¦ ¦ °--')': ) [1/0] {624} - ¦ ¦--expr: [1/0] {625} - ¦ ¦ ¦--expr: [0/0] {627} + ¦ ¦--expr: trans [1/0] {625} + ¦ ¦ ¦--expr: trans [0/0] {627} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: trans [0/0] {626} ¦ ¦ ¦--'(': ( [0/4] {628} - ¦ ¦ ¦--expr: [1/0] {629} - ¦ ¦ ¦ ¦--expr: [0/0] {631} + ¦ ¦ ¦--expr: setdi [1/0] {629} + ¦ ¦ ¦ ¦--expr: setdi [0/0] {631} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: setdi [0/0] {630} ¦ ¦ ¦ ¦--'(': ( [0/0] {632} - ¦ ¦ ¦ ¦--expr: [0/0] {634} + ¦ ¦ ¦ ¦--expr: files [0/0] {634} ¦ ¦ ¦ ¦ °--SYMBOL: files [0/0] {633} ¦ ¦ ¦ ¦--',': , [0/1] {635} - ¦ ¦ ¦ ¦--expr: [0/0] {637} + ¦ ¦ ¦ ¦--expr: exclu [0/0] {637} ¦ ¦ ¦ ¦ °--SYMBOL: exclu [0/0] {636} ¦ ¦ ¦ °--')': ) [0/0] {638} ¦ ¦ ¦--',': , [0/1] {639} - ¦ ¦ ¦--expr: [0/0] {641} + ¦ ¦ ¦--expr: trans [0/0] {641} ¦ ¦ ¦ °--SYMBOL: trans [0/0] {640} ¦ ¦ ¦--',': , [0/1] {642} - ¦ ¦ ¦--expr: [0/2] {644} + ¦ ¦ ¦--expr: inclu [0/2] {644} ¦ ¦ ¦ °--SYMBOL: inclu [0/0] {643} ¦ ¦ °--')': ) [1/0] {645} ¦ °--'}': } [1/0] {646} @@ -665,11 +675,11 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--COMMENT: #' un [1/0] {666} ¦--COMMENT: #' @f [1/0] {667} ¦--COMMENT: #' @e [1/0] {668} - °--expr: [1/0] {669} - ¦--expr: [0/1] {671} + °--expr: style [1/0] {669} + ¦--expr: style [0/1] {671} ¦ °--SYMBOL: style [0/0] {670} ¦--LEFT_ASSIGN: <- [0/1] {672} - °--expr: [0/0] {673} + °--expr: funct [0/0] {673} ¦--FUNCTION: funct [0/0] {674} ¦--'(': ( [0/0] {675} ¦--SYMBOL_FORMALS: path [0/0] {676} @@ -678,68 +688,69 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--',': , [0/23] {679} ¦--SYMBOL_FORMALS: style [1/1] {680} ¦--EQ_FORMALS: = [0/1] {681} - ¦--expr: [0/0] {683} + ¦--expr: tidyv [0/0] {683} ¦ °--SYMBOL: tidyv [0/0] {682} ¦--',': , [0/23] {684} ¦--SYMBOL_FORMALS: trans [1/1] {685} ¦--EQ_FORMALS: = [0/1] {686} - ¦--expr: [0/0] {687} - ¦ ¦--expr: [0/0] {689} + ¦--expr: style [0/0] {687} + ¦ ¦--expr: style [0/0] {689} ¦ ¦ °--SYMBOL_FUNCTION_CALL: style [0/0] {688} ¦ ¦--'(': ( [0/0] {690} - ¦ ¦--expr: [0/0] {692} + ¦ ¦--expr: ... [0/0] {692} ¦ ¦ °--SYMBOL: ... [0/0] {691} ¦ °--')': ) [0/0] {693} ¦--',': , [0/23] {694} ¦--SYMBOL_FORMALS: inclu [1/1] {695} ¦--EQ_FORMALS: = [0/1] {696} - ¦--expr: [0/0] {698} + ¦--expr: TRUE [0/0] {698} ¦ °--NUM_CONST: TRUE [0/0] {697} ¦--')': ) [0/1] {699} - °--expr: [0/0] {700} + °--expr: { + c [0/0] {700} ¦--'{': { [0/2] {701} - ¦--expr: [1/2] {702} - ¦ ¦--expr: [0/1] {704} + ¦--expr: chang [1/2] {702} + ¦ ¦--expr: chang [0/1] {704} ¦ ¦ °--SYMBOL: chang [0/0] {703} ¦ ¦--LEFT_ASSIGN: <- [0/1] {705} - ¦ °--expr: [0/0] {706} - ¦ ¦--expr: [0/0] {707} + ¦ °--expr: withr [0/0] {706} + ¦ ¦--expr: withr [0/0] {707} ¦ ¦ ¦--SYMBOL_PACKAGE: withr [0/0] {708} ¦ ¦ ¦--NS_GET: :: [0/0] {709} ¦ ¦ °--SYMBOL_FUNCTION_CALL: with_ [0/0] {710} ¦ ¦--'(': ( [0/4] {711} - ¦ ¦--expr: [1/0] {712} - ¦ ¦ ¦--expr: [0/0] {714} + ¦ ¦--expr: dirna [1/0] {712} + ¦ ¦ ¦--expr: dirna [0/0] {714} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: dirna [0/0] {713} ¦ ¦ ¦--'(': ( [0/0] {715} - ¦ ¦ ¦--expr: [0/0] {717} + ¦ ¦ ¦--expr: path [0/0] {717} ¦ ¦ ¦ °--SYMBOL: path [0/0] {716} ¦ ¦ °--')': ) [0/0] {718} ¦ ¦--',': , [0/4] {719} - ¦ ¦--expr: [1/2] {720} - ¦ ¦ ¦--expr: [0/0] {722} + ¦ ¦--expr: trans [1/2] {720} + ¦ ¦ ¦--expr: trans [0/0] {722} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: trans [0/0] {721} ¦ ¦ ¦--'(': ( [0/0] {723} - ¦ ¦ ¦--expr: [0/0] {724} - ¦ ¦ ¦ ¦--expr: [0/0] {726} + ¦ ¦ ¦--expr: basen [0/0] {724} + ¦ ¦ ¦ ¦--expr: basen [0/0] {726} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: basen [0/0] {725} ¦ ¦ ¦ ¦--'(': ( [0/0] {727} - ¦ ¦ ¦ ¦--expr: [0/0] {729} + ¦ ¦ ¦ ¦--expr: path [0/0] {729} ¦ ¦ ¦ ¦ °--SYMBOL: path [0/0] {728} ¦ ¦ ¦ °--')': ) [0/0] {730} ¦ ¦ ¦--',': , [0/1] {731} - ¦ ¦ ¦--expr: [0/0] {733} + ¦ ¦ ¦--expr: trans [0/0] {733} ¦ ¦ ¦ °--SYMBOL: trans [0/0] {732} ¦ ¦ ¦--',': , [0/1] {734} - ¦ ¦ ¦--expr: [0/0] {736} + ¦ ¦ ¦--expr: inclu [0/0] {736} ¦ ¦ ¦ °--SYMBOL: inclu [0/0] {735} ¦ ¦ °--')': ) [0/0] {737} ¦ °--')': ) [1/0] {738} - ¦--expr: [1/0] {739} - ¦ ¦--expr: [0/0] {741} + ¦--expr: invis [1/0] {739} + ¦ ¦--expr: invis [0/0] {741} ¦ ¦ °--SYMBOL_FUNCTION_CALL: invis [0/0] {740} ¦ ¦--'(': ( [0/0] {742} - ¦ ¦--expr: [0/0] {744} + ¦ ¦--expr: chang [0/0] {744} ¦ ¦ °--SYMBOL: chang [0/0] {743} ¦ °--')': ) [0/0] {745} °--'}': } [1/0] {746} diff --git a/tests/testthat/roxygen-examples-complete/11-start-with-dontrun-in_tree b/tests/testthat/roxygen-examples-complete/11-start-with-dontrun-in_tree index b348ca120..9da283113 100644 --- a/tests/testthat/roxygen-examples-complete/11-start-with-dontrun-in_tree +++ b/tests/testthat/roxygen-examples-complete/11-start-with-dontrun-in_tree @@ -11,102 +11,103 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--COMMENT: #' ) [1/0] {10} ¦--COMMENT: #' } [1/0] {11} ¦--COMMENT: #' @e [1/0] {12} - °--expr: [1/0] {13} - ¦--expr: [0/1] {15} + °--expr: style [1/0] {13} + ¦--expr: style [0/1] {15} ¦ °--SYMBOL: style [0/0] {14} ¦--LEFT_ASSIGN: <- [0/1] {16} - °--expr: [0/0] {17} + °--expr: funct [0/0] {17} ¦--FUNCTION: funct [0/0] {18} ¦--'(': ( [0/0] {19} ¦--SYMBOL_FORMALS: pkg [0/1] {20} ¦--EQ_FORMALS: = [0/1] {21} - ¦--expr: [0/0] {23} + ¦--expr: "." [0/0] {23} ¦ °--STR_CONST: "." [0/0] {22} ¦--',': , [0/22] {24} ¦--SYMBOL_FORMALS: ... [1/0] {25} ¦--',': , [0/22] {26} ¦--SYMBOL_FORMALS: style [1/1] {27} ¦--EQ_FORMALS: = [0/1] {28} - ¦--expr: [0/0] {30} + ¦--expr: tidyv [0/0] {30} ¦ °--SYMBOL: tidyv [0/0] {29} ¦--',': , [0/22] {31} ¦--SYMBOL_FORMALS: trans [1/1] {32} ¦--EQ_FORMALS: = [0/1] {33} - ¦--expr: [0/0] {34} - ¦ ¦--expr: [0/0] {36} + ¦--expr: style [0/0] {34} + ¦ ¦--expr: style [0/0] {36} ¦ ¦ °--SYMBOL_FUNCTION_CALL: style [0/0] {35} ¦ ¦--'(': ( [0/0] {37} - ¦ ¦--expr: [0/0] {39} + ¦ ¦--expr: ... [0/0] {39} ¦ ¦ °--SYMBOL: ... [0/0] {38} ¦ °--')': ) [0/0] {40} ¦--',': , [0/22] {41} ¦--SYMBOL_FORMALS: filet [1/1] {42} ¦--EQ_FORMALS: = [0/1] {43} - ¦--expr: [0/0] {45} + ¦--expr: "R" [0/0] {45} ¦ °--STR_CONST: "R" [0/0] {44} ¦--',': , [0/22] {46} ¦--SYMBOL_FORMALS: exclu [1/1] {47} ¦--EQ_FORMALS: = [0/1] {48} - ¦--expr: [0/0] {50} + ¦--expr: "R/Rc [0/0] {50} ¦ °--STR_CONST: "R/Rc [0/0] {49} ¦--',': , [0/22] {51} ¦--SYMBOL_FORMALS: inclu [1/1] {52} ¦--EQ_FORMALS: = [0/1] {53} - ¦--expr: [0/0] {55} + ¦--expr: TRUE [0/0] {55} ¦ °--NUM_CONST: TRUE [0/0] {54} ¦--')': ) [0/1] {56} - °--expr: [0/0] {57} + °--expr: { + p [0/0] {57} ¦--'{': { [0/2] {58} - ¦--expr: [1/2] {59} - ¦ ¦--expr: [0/1] {61} + ¦--expr: pkg_r [1/2] {59} + ¦ ¦--expr: pkg_r [0/1] {61} ¦ ¦ °--SYMBOL: pkg_r [0/0] {60} ¦ ¦--LEFT_ASSIGN: <- [0/1] {62} - ¦ °--expr: [0/0] {63} - ¦ ¦--expr: [0/0] {64} + ¦ °--expr: rproj [0/0] {63} + ¦ ¦--expr: rproj [0/0] {64} ¦ ¦ ¦--SYMBOL_PACKAGE: rproj [0/0] {65} ¦ ¦ ¦--NS_GET: :: [0/0] {66} ¦ ¦ °--SYMBOL_FUNCTION_CALL: find_ [0/0] {67} ¦ ¦--'(': ( [0/0] {68} ¦ ¦--SYMBOL_SUB: path [0/1] {69} ¦ ¦--EQ_SUB: = [0/1] {70} - ¦ ¦--expr: [0/0] {72} + ¦ ¦--expr: pkg [0/0] {72} ¦ ¦ °--SYMBOL: pkg [0/0] {71} ¦ °--')': ) [0/0] {73} - ¦--expr: [1/2] {74} - ¦ ¦--expr: [0/1] {76} + ¦--expr: chang [1/2] {74} + ¦ ¦--expr: chang [0/1] {76} ¦ ¦ °--SYMBOL: chang [0/0] {75} ¦ ¦--LEFT_ASSIGN: <- [0/1] {77} - ¦ °--expr: [0/0] {78} - ¦ ¦--expr: [0/0] {79} + ¦ °--expr: withr [0/0] {78} + ¦ ¦--expr: withr [0/0] {79} ¦ ¦ ¦--SYMBOL_PACKAGE: withr [0/0] {80} ¦ ¦ ¦--NS_GET: :: [0/0] {81} ¦ ¦ °--SYMBOL_FUNCTION_CALL: with_ [0/0] {82} ¦ ¦--'(': ( [0/0] {83} - ¦ ¦--expr: [0/0] {85} + ¦ ¦--expr: pkg_r [0/0] {85} ¦ ¦ °--SYMBOL: pkg_r [0/0] {84} ¦ ¦--',': , [0/1] {86} - ¦ ¦--expr: [0/0] {87} - ¦ ¦ ¦--expr: [0/0] {89} + ¦ ¦--expr: prett [0/0] {87} + ¦ ¦ ¦--expr: prett [0/0] {89} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: prett [0/0] {88} ¦ ¦ ¦--'(': ( [0/4] {90} - ¦ ¦ ¦--expr: [1/0] {92} + ¦ ¦ ¦--expr: trans [1/0] {92} ¦ ¦ ¦ °--SYMBOL: trans [0/0] {91} ¦ ¦ ¦--',': , [0/1] {93} - ¦ ¦ ¦--expr: [0/0] {95} + ¦ ¦ ¦--expr: filet [0/0] {95} ¦ ¦ ¦ °--SYMBOL: filet [0/0] {94} ¦ ¦ ¦--',': , [0/1] {96} - ¦ ¦ ¦--expr: [0/0] {98} + ¦ ¦ ¦--expr: exclu [0/0] {98} ¦ ¦ ¦ °--SYMBOL: exclu [0/0] {97} ¦ ¦ ¦--',': , [0/1] {99} - ¦ ¦ ¦--expr: [0/2] {101} + ¦ ¦ ¦--expr: inclu [0/2] {101} ¦ ¦ ¦ °--SYMBOL: inclu [0/0] {100} ¦ ¦ °--')': ) [1/0] {102} ¦ °--')': ) [0/0] {103} - ¦--expr: [1/0] {104} - ¦ ¦--expr: [0/0] {106} + ¦--expr: invis [1/0] {104} + ¦ ¦--expr: invis [0/0] {106} ¦ ¦ °--SYMBOL_FUNCTION_CALL: invis [0/0] {105} ¦ ¦--'(': ( [0/0] {107} - ¦ ¦--expr: [0/0] {109} + ¦ ¦--expr: chang [0/0] {109} ¦ ¦ °--SYMBOL: chang [0/0] {108} ¦ °--')': ) [0/0] {110} °--'}': } [1/0] {111} diff --git a/tests/testthat/roxygen-examples-complete/12-dontshow-dontrun-donttest-in_tree b/tests/testthat/roxygen-examples-complete/12-dontshow-dontrun-donttest-in_tree index a7eb3e0a0..a22014f22 100644 --- a/tests/testthat/roxygen-examples-complete/12-dontshow-dontrun-donttest-in_tree +++ b/tests/testthat/roxygen-examples-complete/12-dontshow-dontrun-donttest-in_tree @@ -25,94 +25,97 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--COMMENT: #' } [1/0] {24} ¦--COMMENT: #' @i [1/0] {25} ¦--COMMENT: #' @e [1/0] {26} - ¦--expr: [1/0] {27} - ¦ ¦--expr: [0/1] {29} + ¦--expr: creat [1/0] {27} + ¦ ¦--expr: creat [0/1] {29} ¦ ¦ °--SYMBOL: creat [0/0] {28} ¦ ¦--LEFT_ASSIGN: <- [0/1] {30} - ¦ °--expr: [0/0] {31} + ¦ °--expr: funct [0/0] {31} ¦ ¦--FUNCTION: funct [0/0] {32} ¦ ¦--'(': ( [0/0] {33} ¦ ¦--SYMBOL_FORMALS: initi [0/1] {34} ¦ ¦--EQ_FORMALS: = [0/1] {35} - ¦ ¦--expr: [0/0] {37} + ¦ ¦--expr: defau [0/0] {37} ¦ ¦ °--SYMBOL: defau [0/0] {36} ¦ ¦--',': , [0/31] {38} ¦ ¦--SYMBOL_FORMALS: line_ [1/1] {39} ¦ ¦--EQ_FORMALS: = [0/1] {40} - ¦ ¦--expr: [0/0] {42} + ¦ ¦--expr: NULL [0/0] {42} ¦ ¦ °--NULL_CONST: NULL [0/0] {41} ¦ ¦--',': , [0/31] {43} ¦ ¦--SYMBOL_FORMALS: space [1/1] {44} ¦ ¦--EQ_FORMALS: = [0/1] {45} - ¦ ¦--expr: [0/0] {47} + ¦ ¦--expr: NULL [0/0] {47} ¦ ¦ °--NULL_CONST: NULL [0/0] {46} ¦ ¦--',': , [0/31] {48} ¦ ¦--SYMBOL_FORMALS: token [1/1] {49} ¦ ¦--EQ_FORMALS: = [0/1] {50} - ¦ ¦--expr: [0/0] {52} + ¦ ¦--expr: NULL [0/0] {52} ¦ ¦ °--NULL_CONST: NULL [0/0] {51} ¦ ¦--',': , [0/31] {53} ¦ ¦--SYMBOL_FORMALS: inden [1/1] {54} ¦ ¦--EQ_FORMALS: = [0/1] {55} - ¦ ¦--expr: [0/0] {57} + ¦ ¦--expr: NULL [0/0] {57} ¦ ¦ °--NULL_CONST: NULL [0/0] {56} ¦ ¦--',': , [0/31] {58} ¦ ¦--SYMBOL_FORMALS: use_r [1/1] {59} ¦ ¦--EQ_FORMALS: = [0/1] {60} - ¦ ¦--expr: [0/0] {62} + ¦ ¦--expr: FALSE [0/0] {62} ¦ ¦ °--NUM_CONST: FALSE [0/0] {61} ¦ ¦--',': , [0/31] {63} ¦ ¦--SYMBOL_FORMALS: reind [1/1] {64} ¦ ¦--EQ_FORMALS: = [0/1] {65} - ¦ ¦--expr: [0/0] {66} - ¦ ¦ ¦--expr: [0/0] {68} + ¦ ¦--expr: tidyv [0/0] {66} + ¦ ¦ ¦--expr: tidyv [0/0] {68} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: tidyv [0/0] {67} ¦ ¦ ¦--'(': ( [0/0] {69} ¦ ¦ °--')': ) [0/0] {70} ¦ ¦--')': ) [0/1] {71} - ¦ °--expr: [0/0] {72} + ¦ °--expr: { + l [0/0] {72} ¦ ¦--'{': { [0/2] {73} - ¦ ¦--expr: [1/0] {74} - ¦ ¦ ¦--expr: [0/1] {75} - ¦ ¦ ¦ ¦--expr: [0/0] {77} + ¦ ¦--expr: lst( + [1/0] {74} + ¦ ¦ ¦--expr: lst( + [0/1] {75} + ¦ ¦ ¦ ¦--expr: lst [0/0] {77} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: lst [0/0] {76} ¦ ¦ ¦ ¦--'(': ( [0/4] {78} ¦ ¦ ¦ ¦--COMMENT: # tra [1/4] {79} ¦ ¦ ¦ ¦--SYMBOL_SUB: initi [1/1] {80} ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {81} - ¦ ¦ ¦ ¦--expr: [0/0] {82} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {84} + ¦ ¦ ¦ ¦--expr: lst(i [0/0] {82} + ¦ ¦ ¦ ¦ ¦--expr: lst [0/0] {84} ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: lst [0/0] {83} ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {85} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {87} + ¦ ¦ ¦ ¦ ¦--expr: initi [0/0] {87} ¦ ¦ ¦ ¦ ¦ °--SYMBOL: initi [0/0] {86} ¦ ¦ ¦ ¦ °--')': ) [0/0] {88} ¦ ¦ ¦ ¦--',': , [0/4] {89} - ¦ ¦ ¦ ¦--expr: [1/0] {91} + ¦ ¦ ¦ ¦--expr: line_ [1/0] {91} ¦ ¦ ¦ ¦ °--SYMBOL: line_ [0/0] {90} ¦ ¦ ¦ ¦--',': , [0/4] {92} - ¦ ¦ ¦ ¦--expr: [1/0] {94} + ¦ ¦ ¦ ¦--expr: space [1/0] {94} ¦ ¦ ¦ ¦ °--SYMBOL: space [0/0] {93} ¦ ¦ ¦ ¦--',': , [0/4] {95} - ¦ ¦ ¦ ¦--expr: [1/0] {97} + ¦ ¦ ¦ ¦--expr: token [1/0] {97} ¦ ¦ ¦ ¦ °--SYMBOL: token [0/0] {96} ¦ ¦ ¦ ¦--',': , [0/4] {98} - ¦ ¦ ¦ ¦--expr: [1/0] {100} + ¦ ¦ ¦ ¦--expr: inden [1/0] {100} ¦ ¦ ¦ ¦ °--SYMBOL: inden [0/0] {99} ¦ ¦ ¦ ¦--',': , [0/4] {101} ¦ ¦ ¦ ¦--COMMENT: # tra [1/4] {102} - ¦ ¦ ¦ ¦--expr: [1/0] {104} + ¦ ¦ ¦ ¦--expr: use_r [1/0] {104} ¦ ¦ ¦ ¦ °--SYMBOL: use_r [0/0] {103} ¦ ¦ ¦ ¦--',': , [0/4] {105} - ¦ ¦ ¦ ¦--expr: [1/2] {107} + ¦ ¦ ¦ ¦--expr: reind [1/2] {107} ¦ ¦ ¦ ¦ °--SYMBOL: reind [0/0] {106} ¦ ¦ ¦ °--')': ) [1/0] {108} ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/4] {109} - ¦ ¦ °--expr: [1/0] {110} - ¦ ¦ ¦--expr: [0/0] {112} + ¦ ¦ °--expr: map(c [1/0] {110} + ¦ ¦ ¦--expr: map [0/0] {112} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: map [0/0] {111} ¦ ¦ ¦--'(': ( [0/0] {113} - ¦ ¦ ¦--expr: [0/0] {115} + ¦ ¦ ¦--expr: compa [0/0] {115} ¦ ¦ ¦ °--SYMBOL: compa [0/0] {114} ¦ ¦ °--')': ) [0/0] {116} ¦ °--'}': } [1/0] {117} @@ -140,94 +143,97 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--COMMENT: #' } [1/0] {139} ¦--COMMENT: #' @i [1/0] {140} ¦--COMMENT: #' @e [1/0] {141} - °--expr: [1/0] {142} - ¦--expr: [0/1] {144} + °--expr: creat [1/0] {142} + ¦--expr: creat [0/1] {144} ¦ °--SYMBOL: creat [0/0] {143} ¦--LEFT_ASSIGN: <- [0/1] {145} - °--expr: [0/0] {146} + °--expr: funct [0/0] {146} ¦--FUNCTION: funct [0/0] {147} ¦--'(': ( [0/0] {148} ¦--SYMBOL_FORMALS: initi [0/1] {149} ¦--EQ_FORMALS: = [0/1] {150} - ¦--expr: [0/0] {152} + ¦--expr: defau [0/0] {152} ¦ °--SYMBOL: defau [0/0] {151} ¦--',': , [0/31] {153} ¦--SYMBOL_FORMALS: line_ [1/1] {154} ¦--EQ_FORMALS: = [0/1] {155} - ¦--expr: [0/0] {157} + ¦--expr: NULL [0/0] {157} ¦ °--NULL_CONST: NULL [0/0] {156} ¦--',': , [0/31] {158} ¦--SYMBOL_FORMALS: space [1/1] {159} ¦--EQ_FORMALS: = [0/1] {160} - ¦--expr: [0/0] {162} + ¦--expr: NULL [0/0] {162} ¦ °--NULL_CONST: NULL [0/0] {161} ¦--',': , [0/31] {163} ¦--SYMBOL_FORMALS: token [1/1] {164} ¦--EQ_FORMALS: = [0/1] {165} - ¦--expr: [0/0] {167} + ¦--expr: NULL [0/0] {167} ¦ °--NULL_CONST: NULL [0/0] {166} ¦--',': , [0/31] {168} ¦--SYMBOL_FORMALS: inden [1/1] {169} ¦--EQ_FORMALS: = [0/1] {170} - ¦--expr: [0/0] {172} + ¦--expr: NULL [0/0] {172} ¦ °--NULL_CONST: NULL [0/0] {171} ¦--',': , [0/31] {173} ¦--SYMBOL_FORMALS: use_r [1/1] {174} ¦--EQ_FORMALS: = [0/1] {175} - ¦--expr: [0/0] {177} + ¦--expr: FALSE [0/0] {177} ¦ °--NUM_CONST: FALSE [0/0] {176} ¦--',': , [0/31] {178} ¦--SYMBOL_FORMALS: reind [1/1] {179} ¦--EQ_FORMALS: = [0/1] {180} - ¦--expr: [0/0] {181} - ¦ ¦--expr: [0/0] {183} + ¦--expr: tidyv [0/0] {181} + ¦ ¦--expr: tidyv [0/0] {183} ¦ ¦ °--SYMBOL_FUNCTION_CALL: tidyv [0/0] {182} ¦ ¦--'(': ( [0/0] {184} ¦ °--')': ) [0/0] {185} ¦--')': ) [0/1] {186} - °--expr: [0/0] {187} + °--expr: { + l [0/0] {187} ¦--'{': { [0/2] {188} - ¦--expr: [1/0] {189} - ¦ ¦--expr: [0/0] {190} - ¦ ¦ ¦--expr: [0/0] {192} + ¦--expr: lst( + [1/0] {189} + ¦ ¦--expr: lst( + [0/0] {190} + ¦ ¦ ¦--expr: lst [0/0] {192} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: lst [0/0] {191} ¦ ¦ ¦--'(': ( [0/4] {193} ¦ ¦ ¦--COMMENT: #tran [1/4] {194} ¦ ¦ ¦--SYMBOL_SUB: initi [1/1] {195} ¦ ¦ ¦--EQ_SUB: = [0/1] {196} - ¦ ¦ ¦--expr: [0/0] {197} - ¦ ¦ ¦ ¦--expr: [0/0] {199} + ¦ ¦ ¦--expr: lst(i [0/0] {197} + ¦ ¦ ¦ ¦--expr: lst [0/0] {199} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: lst [0/0] {198} ¦ ¦ ¦ ¦--'(': ( [0/0] {200} - ¦ ¦ ¦ ¦--expr: [0/0] {202} + ¦ ¦ ¦ ¦--expr: initi [0/0] {202} ¦ ¦ ¦ ¦ °--SYMBOL: initi [0/0] {201} ¦ ¦ ¦ °--')': ) [0/0] {203} ¦ ¦ ¦--',': , [0/4] {204} - ¦ ¦ ¦--expr: [1/0] {206} + ¦ ¦ ¦--expr: line_ [1/0] {206} ¦ ¦ ¦ °--SYMBOL: line_ [0/0] {205} ¦ ¦ ¦--',': , [0/4] {207} - ¦ ¦ ¦--expr: [1/0] {209} + ¦ ¦ ¦--expr: space [1/0] {209} ¦ ¦ ¦ °--SYMBOL: space [0/0] {208} ¦ ¦ ¦--',': , [0/4] {210} - ¦ ¦ ¦--expr: [1/0] {212} + ¦ ¦ ¦--expr: token [1/0] {212} ¦ ¦ ¦ °--SYMBOL: token [0/0] {211} ¦ ¦ ¦--',': , [0/4] {213} - ¦ ¦ ¦--expr: [1/0] {215} + ¦ ¦ ¦--expr: inden [1/0] {215} ¦ ¦ ¦ °--SYMBOL: inden [0/0] {214} ¦ ¦ ¦--',': , [0/4] {216} ¦ ¦ ¦--COMMENT: # tra [1/4] {217} - ¦ ¦ ¦--expr: [1/0] {219} + ¦ ¦ ¦--expr: use_r [1/0] {219} ¦ ¦ ¦ °--SYMBOL: use_r [0/0] {218} ¦ ¦ ¦--',': , [0/4] {220} - ¦ ¦ ¦--expr: [1/2] {222} + ¦ ¦ ¦--expr: reind [1/2] {222} ¦ ¦ ¦ °--SYMBOL: reind [0/0] {221} ¦ ¦ °--')': ) [1/0] {223} ¦ ¦--SPECIAL-PIPE: %>% [0/4] {224} - ¦ °--expr: [1/0] {225} - ¦ ¦--expr: [0/0] {227} + ¦ °--expr: map(c [1/0] {225} + ¦ ¦--expr: map [0/0] {227} ¦ ¦ °--SYMBOL_FUNCTION_CALL: map [0/0] {226} ¦ ¦--'(': ( [0/0] {228} - ¦ ¦--expr: [0/0] {230} + ¦ ¦--expr: compa [0/0] {230} ¦ ¦ °--SYMBOL: compa [0/0] {229} ¦ °--')': ) [0/0] {231} °--'}': } [1/0] {232} diff --git a/tests/testthat/roxygen-examples-complete/12-fun-decs-in-examples-in_tree b/tests/testthat/roxygen-examples-complete/12-fun-decs-in-examples-in_tree index 751bb092c..3ebad274b 100644 --- a/tests/testthat/roxygen-examples-complete/12-fun-decs-in-examples-in_tree +++ b/tests/testthat/roxygen-examples-complete/12-fun-decs-in-examples-in_tree @@ -16,94 +16,97 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--COMMENT: #' ", [1/0] {15} ¦--COMMENT: #' @i [1/0] {16} ¦--COMMENT: #' @e [1/0] {17} - °--expr: [1/0] {18} - ¦--expr: [0/1] {20} + °--expr: creat [1/0] {18} + ¦--expr: creat [0/1] {20} ¦ °--SYMBOL: creat [0/0] {19} ¦--LEFT_ASSIGN: <- [0/1] {21} - °--expr: [0/0] {22} + °--expr: funct [0/0] {22} ¦--FUNCTION: funct [0/0] {23} ¦--'(': ( [0/0] {24} ¦--SYMBOL_FORMALS: initi [0/1] {25} ¦--EQ_FORMALS: = [0/1] {26} - ¦--expr: [0/0] {28} + ¦--expr: defau [0/0] {28} ¦ °--SYMBOL: defau [0/0] {27} ¦--',': , [0/31] {29} ¦--SYMBOL_FORMALS: line_ [1/1] {30} ¦--EQ_FORMALS: = [0/1] {31} - ¦--expr: [0/0] {33} + ¦--expr: NULL [0/0] {33} ¦ °--NULL_CONST: NULL [0/0] {32} ¦--',': , [0/31] {34} ¦--SYMBOL_FORMALS: space [1/1] {35} ¦--EQ_FORMALS: = [0/1] {36} - ¦--expr: [0/0] {38} + ¦--expr: NULL [0/0] {38} ¦ °--NULL_CONST: NULL [0/0] {37} ¦--',': , [0/31] {39} ¦--SYMBOL_FORMALS: token [1/1] {40} ¦--EQ_FORMALS: = [0/1] {41} - ¦--expr: [0/0] {43} + ¦--expr: NULL [0/0] {43} ¦ °--NULL_CONST: NULL [0/0] {42} ¦--',': , [0/31] {44} ¦--SYMBOL_FORMALS: inden [1/1] {45} ¦--EQ_FORMALS: = [0/1] {46} - ¦--expr: [0/0] {48} + ¦--expr: NULL [0/0] {48} ¦ °--NULL_CONST: NULL [0/0] {47} ¦--',': , [0/31] {49} ¦--SYMBOL_FORMALS: use_r [1/1] {50} ¦--EQ_FORMALS: = [0/1] {51} - ¦--expr: [0/0] {53} + ¦--expr: FALSE [0/0] {53} ¦ °--NUM_CONST: FALSE [0/0] {52} ¦--',': , [0/31] {54} ¦--SYMBOL_FORMALS: reind [1/1] {55} ¦--EQ_FORMALS: = [0/1] {56} - ¦--expr: [0/0] {57} - ¦ ¦--expr: [0/0] {59} + ¦--expr: tidyv [0/0] {57} + ¦ ¦--expr: tidyv [0/0] {59} ¦ ¦ °--SYMBOL_FUNCTION_CALL: tidyv [0/0] {58} ¦ ¦--'(': ( [0/0] {60} ¦ °--')': ) [0/0] {61} ¦--')': ) [0/1] {62} - °--expr: [0/0] {63} + °--expr: { + l [0/0] {63} ¦--'{': { [0/2] {64} - ¦--expr: [1/0] {65} - ¦ ¦--expr: [0/1] {66} - ¦ ¦ ¦--expr: [0/0] {68} + ¦--expr: lst( + [1/0] {65} + ¦ ¦--expr: lst( + [0/1] {66} + ¦ ¦ ¦--expr: lst [0/0] {68} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: lst [0/0] {67} ¦ ¦ ¦--'(': ( [0/4] {69} ¦ ¦ ¦--COMMENT: # tra [1/4] {70} ¦ ¦ ¦--SYMBOL_SUB: initi [1/1] {71} ¦ ¦ ¦--EQ_SUB: = [0/1] {72} - ¦ ¦ ¦--expr: [0/0] {73} - ¦ ¦ ¦ ¦--expr: [0/0] {75} + ¦ ¦ ¦--expr: lst(i [0/0] {73} + ¦ ¦ ¦ ¦--expr: lst [0/0] {75} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: lst [0/0] {74} ¦ ¦ ¦ ¦--'(': ( [0/0] {76} - ¦ ¦ ¦ ¦--expr: [0/0] {78} + ¦ ¦ ¦ ¦--expr: initi [0/0] {78} ¦ ¦ ¦ ¦ °--SYMBOL: initi [0/0] {77} ¦ ¦ ¦ °--')': ) [0/0] {79} ¦ ¦ ¦--',': , [0/4] {80} - ¦ ¦ ¦--expr: [1/0] {82} + ¦ ¦ ¦--expr: line_ [1/0] {82} ¦ ¦ ¦ °--SYMBOL: line_ [0/0] {81} ¦ ¦ ¦--',': , [0/4] {83} - ¦ ¦ ¦--expr: [1/0] {85} + ¦ ¦ ¦--expr: space [1/0] {85} ¦ ¦ ¦ °--SYMBOL: space [0/0] {84} ¦ ¦ ¦--',': , [0/4] {86} - ¦ ¦ ¦--expr: [1/0] {88} + ¦ ¦ ¦--expr: token [1/0] {88} ¦ ¦ ¦ °--SYMBOL: token [0/0] {87} ¦ ¦ ¦--',': , [0/4] {89} - ¦ ¦ ¦--expr: [1/0] {91} + ¦ ¦ ¦--expr: inden [1/0] {91} ¦ ¦ ¦ °--SYMBOL: inden [0/0] {90} ¦ ¦ ¦--',': , [0/4] {92} ¦ ¦ ¦--COMMENT: # tra [1/4] {93} - ¦ ¦ ¦--expr: [1/0] {95} + ¦ ¦ ¦--expr: use_r [1/0] {95} ¦ ¦ ¦ °--SYMBOL: use_r [0/0] {94} ¦ ¦ ¦--',': , [0/4] {96} - ¦ ¦ ¦--expr: [1/2] {98} + ¦ ¦ ¦--expr: reind [1/2] {98} ¦ ¦ ¦ °--SYMBOL: reind [0/0] {97} ¦ ¦ °--')': ) [1/0] {99} ¦ ¦--SPECIAL-PIPE: %>% [0/4] {100} - ¦ °--expr: [1/0] {101} - ¦ ¦--expr: [0/0] {103} + ¦ °--expr: map(c [1/0] {101} + ¦ ¦--expr: map [0/0] {103} ¦ ¦ °--SYMBOL_FUNCTION_CALL: map [0/0] {102} ¦ ¦--'(': ( [0/0] {104} - ¦ ¦--expr: [0/0] {106} + ¦ ¦--expr: compa [0/0] {106} ¦ ¦ °--SYMBOL: compa [0/0] {105} ¦ °--')': ) [0/0] {107} °--'}': } [1/0] {108} diff --git a/tests/testthat/roxygen-examples-complete/13-empty-lines-in_tree b/tests/testthat/roxygen-examples-complete/13-empty-lines-in_tree index 1346e0f4d..5d58f178d 100644 --- a/tests/testthat/roxygen-examples-complete/13-empty-lines-in_tree +++ b/tests/testthat/roxygen-examples-complete/13-empty-lines-in_tree @@ -26,94 +26,97 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--COMMENT: #' } [1/0] {25} ¦--COMMENT: #' @i [1/0] {26} ¦--COMMENT: #' @e [1/0] {27} - °--expr: [1/0] {28} - ¦--expr: [0/1] {30} + °--expr: creat [1/0] {28} + ¦--expr: creat [0/1] {30} ¦ °--SYMBOL: creat [0/0] {29} ¦--LEFT_ASSIGN: <- [0/1] {31} - °--expr: [0/0] {32} + °--expr: funct [0/0] {32} ¦--FUNCTION: funct [0/0] {33} ¦--'(': ( [0/0] {34} ¦--SYMBOL_FORMALS: initi [0/1] {35} ¦--EQ_FORMALS: = [0/1] {36} - ¦--expr: [0/0] {38} + ¦--expr: defau [0/0] {38} ¦ °--SYMBOL: defau [0/0] {37} ¦--',': , [0/31] {39} ¦--SYMBOL_FORMALS: line_ [1/1] {40} ¦--EQ_FORMALS: = [0/1] {41} - ¦--expr: [0/0] {43} + ¦--expr: NULL [0/0] {43} ¦ °--NULL_CONST: NULL [0/0] {42} ¦--',': , [0/31] {44} ¦--SYMBOL_FORMALS: space [1/1] {45} ¦--EQ_FORMALS: = [0/1] {46} - ¦--expr: [0/0] {48} + ¦--expr: NULL [0/0] {48} ¦ °--NULL_CONST: NULL [0/0] {47} ¦--',': , [0/31] {49} ¦--SYMBOL_FORMALS: token [1/1] {50} ¦--EQ_FORMALS: = [0/1] {51} - ¦--expr: [0/0] {53} + ¦--expr: NULL [0/0] {53} ¦ °--NULL_CONST: NULL [0/0] {52} ¦--',': , [0/31] {54} ¦--SYMBOL_FORMALS: inden [1/1] {55} ¦--EQ_FORMALS: = [0/1] {56} - ¦--expr: [0/0] {58} + ¦--expr: NULL [0/0] {58} ¦ °--NULL_CONST: NULL [0/0] {57} ¦--',': , [0/31] {59} ¦--SYMBOL_FORMALS: use_r [1/1] {60} ¦--EQ_FORMALS: = [0/1] {61} - ¦--expr: [0/0] {63} + ¦--expr: FALSE [0/0] {63} ¦ °--NUM_CONST: FALSE [0/0] {62} ¦--',': , [0/31] {64} ¦--SYMBOL_FORMALS: reind [1/1] {65} ¦--EQ_FORMALS: = [0/1] {66} - ¦--expr: [0/0] {67} - ¦ ¦--expr: [0/0] {69} + ¦--expr: tidyv [0/0] {67} + ¦ ¦--expr: tidyv [0/0] {69} ¦ ¦ °--SYMBOL_FUNCTION_CALL: tidyv [0/0] {68} ¦ ¦--'(': ( [0/0] {70} ¦ °--')': ) [0/0] {71} ¦--')': ) [0/1] {72} - °--expr: [0/0] {73} + °--expr: { + l [0/0] {73} ¦--'{': { [0/2] {74} - ¦--expr: [1/0] {75} - ¦ ¦--expr: [0/1] {76} - ¦ ¦ ¦--expr: [0/0] {78} + ¦--expr: lst( + [1/0] {75} + ¦ ¦--expr: lst( + [0/1] {76} + ¦ ¦ ¦--expr: lst [0/0] {78} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: lst [0/0] {77} ¦ ¦ ¦--'(': ( [0/4] {79} ¦ ¦ ¦--COMMENT: # tra [1/4] {80} ¦ ¦ ¦--SYMBOL_SUB: initi [1/1] {81} ¦ ¦ ¦--EQ_SUB: = [0/1] {82} - ¦ ¦ ¦--expr: [0/0] {83} - ¦ ¦ ¦ ¦--expr: [0/0] {85} + ¦ ¦ ¦--expr: lst(i [0/0] {83} + ¦ ¦ ¦ ¦--expr: lst [0/0] {85} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: lst [0/0] {84} ¦ ¦ ¦ ¦--'(': ( [0/0] {86} - ¦ ¦ ¦ ¦--expr: [0/0] {88} + ¦ ¦ ¦ ¦--expr: initi [0/0] {88} ¦ ¦ ¦ ¦ °--SYMBOL: initi [0/0] {87} ¦ ¦ ¦ °--')': ) [0/0] {89} ¦ ¦ ¦--',': , [0/4] {90} - ¦ ¦ ¦--expr: [1/0] {92} + ¦ ¦ ¦--expr: line_ [1/0] {92} ¦ ¦ ¦ °--SYMBOL: line_ [0/0] {91} ¦ ¦ ¦--',': , [0/4] {93} - ¦ ¦ ¦--expr: [1/0] {95} + ¦ ¦ ¦--expr: space [1/0] {95} ¦ ¦ ¦ °--SYMBOL: space [0/0] {94} ¦ ¦ ¦--',': , [0/4] {96} - ¦ ¦ ¦--expr: [1/0] {98} + ¦ ¦ ¦--expr: token [1/0] {98} ¦ ¦ ¦ °--SYMBOL: token [0/0] {97} ¦ ¦ ¦--',': , [0/4] {99} - ¦ ¦ ¦--expr: [1/0] {101} + ¦ ¦ ¦--expr: inden [1/0] {101} ¦ ¦ ¦ °--SYMBOL: inden [0/0] {100} ¦ ¦ ¦--',': , [0/4] {102} ¦ ¦ ¦--COMMENT: # tra [1/4] {103} - ¦ ¦ ¦--expr: [1/0] {105} + ¦ ¦ ¦--expr: use_r [1/0] {105} ¦ ¦ ¦ °--SYMBOL: use_r [0/0] {104} ¦ ¦ ¦--',': , [0/4] {106} - ¦ ¦ ¦--expr: [1/2] {108} + ¦ ¦ ¦--expr: reind [1/2] {108} ¦ ¦ ¦ °--SYMBOL: reind [0/0] {107} ¦ ¦ °--')': ) [1/0] {109} ¦ ¦--SPECIAL-PIPE: %>% [0/4] {110} - ¦ °--expr: [1/0] {111} - ¦ ¦--expr: [0/0] {113} + ¦ °--expr: map(c [1/0] {111} + ¦ ¦--expr: map [0/0] {113} ¦ ¦ °--SYMBOL_FUNCTION_CALL: map [0/0] {112} ¦ ¦--'(': ( [0/0] {114} - ¦ ¦--expr: [0/0] {116} + ¦ ¦--expr: compa [0/0] {116} ¦ ¦ °--SYMBOL: compa [0/0] {115} ¦ °--')': ) [0/0] {117} °--'}': } [1/0] {118} diff --git a/tests/testthat/roxygen-examples-complete/14-pipe-dontrun-in_tree b/tests/testthat/roxygen-examples-complete/14-pipe-dontrun-in_tree index 0efe73062..6d03f57f6 100644 --- a/tests/testthat/roxygen-examples-complete/14-pipe-dontrun-in_tree +++ b/tests/testthat/roxygen-examples-complete/14-pipe-dontrun-in_tree @@ -15,5 +15,5 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--COMMENT: #' } [1/0] {14} ¦--COMMENT: #' ca [1/0] {15} ¦--COMMENT: #' @e [1/0] {16} - °--expr: [1/0] {18} + °--expr: NULL [1/0] {18} °--NULL_CONST: NULL [0/0] {17} diff --git a/tests/testthat/roxygen-examples-complete/15-roxygen-dontrun-indention-in_tree b/tests/testthat/roxygen-examples-complete/15-roxygen-dontrun-indention-in_tree index 6471d51dd..974a1e333 100644 --- a/tests/testthat/roxygen-examples-complete/15-roxygen-dontrun-indention-in_tree +++ b/tests/testthat/roxygen-examples-complete/15-roxygen-dontrun-indention-in_tree @@ -19,9 +19,9 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--COMMENT: #' re [1/0] {18} ¦--COMMENT: #'if [1/0] {19} ¦--COMMENT: #'ret [1/0] {20} - °--expr: [1/0] {21} - ¦--expr: [0/1] {23} + °--expr: x <- [1/0] {21} + ¦--expr: x [0/1] {23} ¦ °--SYMBOL: x [0/0] {22} ¦--LEFT_ASSIGN: <- [0/1] {24} - °--expr: [0/0] {26} + °--expr: y [0/0] {26} °--SYMBOL: y [0/0] {25} diff --git a/tests/testthat/roxygen-examples-complete/16-dont-warn-empty-in_tree b/tests/testthat/roxygen-examples-complete/16-dont-warn-empty-in_tree index 22e7823f3..22b238b62 100644 --- a/tests/testthat/roxygen-examples-complete/16-dont-warn-empty-in_tree +++ b/tests/testthat/roxygen-examples-complete/16-dont-warn-empty-in_tree @@ -9,8 +9,8 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--COMMENT: #' } [1/0] {8} ¦--COMMENT: #' [1/0] {9} ¦--COMMENT: #' @e [1/0] {10} - °--expr: [1/0] {11} - ¦--expr: [0/0] {13} + °--expr: g() [1/0] {11} + ¦--expr: g [0/0] {13} ¦ °--SYMBOL_FUNCTION_CALL: g [0/0] {12} ¦--'(': ( [0/0] {14} °--')': ) [0/0] {15} diff --git a/tests/testthat/roxygen-examples-complete/2-one-function-examples-last-proper-run-in_tree b/tests/testthat/roxygen-examples-complete/2-one-function-examples-last-proper-run-in_tree index 1d5b94938..4674a9625 100644 --- a/tests/testthat/roxygen-examples-complete/2-one-function-examples-last-proper-run-in_tree +++ b/tests/testthat/roxygen-examples-complete/2-one-function-examples-last-proper-run-in_tree @@ -10,9 +10,9 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--COMMENT: #' [1/0] {9} ¦--COMMENT: #' [1/0] {10} ¦--COMMENT: #' ) [1/0] {11} - °--equal_assign: [1/0] {12} - ¦--expr: [0/1] {14} + °--equal_assign: a = c [1/0] {12} + ¦--expr: a [0/1] {14} ¦ °--SYMBOL: a [0/0] {13} ¦--EQ_ASSIGN: = [0/1] {15} - °--expr: [0/0] {17} + °--expr: call [0/0] {17} °--SYMBOL: call [0/0] {16} diff --git a/tests/testthat/roxygen-examples-complete/3-one-function-example-not-last-proper-run-in_tree b/tests/testthat/roxygen-examples-complete/3-one-function-example-not-last-proper-run-in_tree index c32ba1bc4..c7da21279 100644 --- a/tests/testthat/roxygen-examples-complete/3-one-function-example-not-last-proper-run-in_tree +++ b/tests/testthat/roxygen-examples-complete/3-one-function-example-not-last-proper-run-in_tree @@ -5,9 +5,9 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--COMMENT: #' Ca [1/0] {4} ¦--COMMENT: #' @e [1/0] {5} ¦--COMMENT: #' @n [1/0] {6} - °--expr: [1/0] {7} - ¦--expr: [0/0] {9} + °--expr: a<- 2 [1/0] {7} + ¦--expr: a [0/0] {9} ¦ °--SYMBOL: a [0/0] {8} ¦--LEFT_ASSIGN: <- [0/1] {10} - °--expr: [0/0] {12} + °--expr: 2 [0/0] {12} °--NUM_CONST: 2 [0/0] {11} diff --git a/tests/testthat/roxygen-examples-complete/4-one-function-examples-not-last-proper-run-in_tree b/tests/testthat/roxygen-examples-complete/4-one-function-examples-not-last-proper-run-in_tree index 99d5e726e..d33a983ff 100644 --- a/tests/testthat/roxygen-examples-complete/4-one-function-examples-not-last-proper-run-in_tree +++ b/tests/testthat/roxygen-examples-complete/4-one-function-examples-not-last-proper-run-in_tree @@ -10,9 +10,9 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--COMMENT: #' st [1/0] {9} ¦--COMMENT: #' @i [1/0] {10} ¦--COMMENT: #' @e [1/0] {11} - °--expr: [1/0] {12} - ¦--expr: [0/0] {14} + °--expr: a<-ca [1/0] {12} + ¦--expr: a [0/0] {14} ¦ °--SYMBOL: a [0/0] {13} ¦--LEFT_ASSIGN: <- [0/0] {15} - °--expr: [0/0] {17} + °--expr: call [0/0] {17} °--SYMBOL: call [0/0] {16} diff --git a/tests/testthat/roxygen-examples-complete/5-multiple-function-examples-last-proper-run-in_tree b/tests/testthat/roxygen-examples-complete/5-multiple-function-examples-last-proper-run-in_tree index 9ca818289..a7eacdfce 100644 --- a/tests/testthat/roxygen-examples-complete/5-multiple-function-examples-last-proper-run-in_tree +++ b/tests/testthat/roxygen-examples-complete/5-multiple-function-examples-last-proper-run-in_tree @@ -8,11 +8,11 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--COMMENT: #' st [1/0] {7} ¦--COMMENT: #' st [1/0] {8} ¦--COMMENT: #' st [1/0] {9} - ¦--expr: [1/0] {10} - ¦ ¦--expr: [0/1] {12} + ¦--expr: a <- [1/0] {10} + ¦ ¦--expr: a [0/1] {12} ¦ ¦ °--SYMBOL: a [0/0] {11} ¦ ¦--LEFT_ASSIGN: <- [0/1] {13} - ¦ °--expr: [0/0] {15} + ¦ °--expr: call [0/0] {15} ¦ °--SYMBOL: call [0/0] {14} ¦--COMMENT: #' Pr [2/0] {16} ¦--COMMENT: #' [1/0] {17} @@ -20,9 +20,9 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--COMMENT: #' (c [1/0] {19} ¦--COMMENT: #' Ca [1/0] {20} ¦--COMMENT: #' @e [1/0] {21} - °--expr: [1/0] {22} - ¦--expr: [0/1] {24} + °--expr: a <- [1/0] {22} + ¦--expr: a [0/1] {24} ¦ °--SYMBOL: a [0/0] {23} ¦--LEFT_ASSIGN: <- [0/3] {25} - °--expr: [0/0] {27} + °--expr: 2 [0/0] {27} °--NUM_CONST: 2 [0/0] {26} diff --git a/tests/testthat/roxygen-examples-complete/6-multiple-function-examples-no-last-run-in_tree b/tests/testthat/roxygen-examples-complete/6-multiple-function-examples-no-last-run-in_tree index 6f9d083cf..a7dcea705 100644 --- a/tests/testthat/roxygen-examples-complete/6-multiple-function-examples-no-last-run-in_tree +++ b/tests/testthat/roxygen-examples-complete/6-multiple-function-examples-no-last-run-in_tree @@ -6,11 +6,11 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--COMMENT: #' @e [1/0] {5} ¦--COMMENT: #' ti [1/0] {6} ¦--COMMENT: #' @n [1/0] {7} - ¦--expr: [1/0] {8} - ¦ ¦--expr: [0/1] {10} + ¦--expr: a <- [1/0] {8} + ¦ ¦--expr: a [0/1] {10} ¦ ¦ °--SYMBOL: a [0/0] {9} ¦ ¦--LEFT_ASSIGN: <- [0/1] {11} - ¦ °--expr: [0/0] {13} + ¦ °--expr: 2 [0/0] {13} ¦ °--NUM_CONST: 2 [0/0] {12} ¦--COMMENT: #' Th [2/0] {14} ¦--COMMENT: #' [1/0] {15} @@ -24,10 +24,10 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--COMMENT: #' st [1/0] {23} ¦--COMMENT: #' @i [1/0] {24} ¦--COMMENT: #' @e [1/0] {25} - ¦--expr: [1/0] {26} - ¦ ¦--expr: [0/5] {28} + ¦--expr: a [1/0] {26} + ¦ ¦--expr: a [0/5] {28} ¦ ¦ °--SYMBOL: a [0/0] {27} ¦ ¦--LEFT_ASSIGN: <- [0/1] {29} - ¦ °--expr: [0/0] {31} + ¦ °--expr: call [0/0] {31} ¦ °--SYMBOL: call [0/0] {30} °--';': ; [0/0] {32} diff --git a/tests/testthat/roxygen-examples-complete/7-roxygen-no-dontrun-in_tree b/tests/testthat/roxygen-examples-complete/7-roxygen-no-dontrun-in_tree index b98b229c2..399feb009 100644 --- a/tests/testthat/roxygen-examples-complete/7-roxygen-no-dontrun-in_tree +++ b/tests/testthat/roxygen-examples-complete/7-roxygen-no-dontrun-in_tree @@ -20,11 +20,11 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--COMMENT: #' un [1/0] {19} ¦--COMMENT: #' @f [1/0] {20} ¦--COMMENT: #' @e [1/0] {21} - °--expr: [1/0] {22} - ¦--expr: [0/1] {24} + °--expr: style [1/0] {22} + ¦--expr: style [0/1] {24} ¦ °--SYMBOL: style [0/0] {23} ¦--LEFT_ASSIGN: <- [0/1] {25} - °--expr: [0/0] {26} + °--expr: funct [0/0] {26} ¦--FUNCTION: funct [0/0] {27} ¦--'(': ( [0/0] {28} ¦--SYMBOL_FORMALS: path [0/0] {29} @@ -33,65 +33,66 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--',': , [0/23] {32} ¦--SYMBOL_FORMALS: style [1/1] {33} ¦--EQ_FORMALS: = [0/1] {34} - ¦--expr: [0/0] {36} + ¦--expr: tidyv [0/0] {36} ¦ °--SYMBOL: tidyv [0/0] {35} ¦--',': , [0/23] {37} ¦--SYMBOL_FORMALS: trans [1/1] {38} ¦--EQ_FORMALS: = [0/1] {39} - ¦--expr: [0/0] {40} - ¦ ¦--expr: [0/0] {42} + ¦--expr: style [0/0] {40} + ¦ ¦--expr: style [0/0] {42} ¦ ¦ °--SYMBOL_FUNCTION_CALL: style [0/0] {41} ¦ ¦--'(': ( [0/0] {43} - ¦ ¦--expr: [0/0] {45} + ¦ ¦--expr: ... [0/0] {45} ¦ ¦ °--SYMBOL: ... [0/0] {44} ¦ °--')': ) [0/0] {46} ¦--',': , [0/23] {47} ¦--SYMBOL_FORMALS: inclu [1/1] {48} ¦--EQ_FORMALS: = [0/1] {49} - ¦--expr: [0/0] {51} + ¦--expr: TRUE [0/0] {51} ¦ °--NUM_CONST: TRUE [0/0] {50} ¦--')': ) [0/1] {52} - °--expr: [0/0] {53} + °--expr: { + c [0/0] {53} ¦--'{': { [0/2] {54} - ¦--expr: [1/2] {55} - ¦ ¦--expr: [0/0] {57} + ¦--expr: chang [1/2] {55} + ¦ ¦--expr: chang [0/0] {57} ¦ ¦ °--SYMBOL: chang [0/0] {56} ¦ ¦--LEFT_ASSIGN: <- [0/1] {58} - ¦ °--expr: [0/0] {59} - ¦ ¦--expr: [0/0] {60} + ¦ °--expr: withr [0/0] {59} + ¦ ¦--expr: withr [0/0] {60} ¦ ¦ ¦--SYMBOL_PACKAGE: withr [0/0] {61} ¦ ¦ ¦--NS_GET: :: [0/0] {62} ¦ ¦ °--SYMBOL_FUNCTION_CALL: with_ [0/0] {63} ¦ ¦--'(': ( [0/4] {64} - ¦ ¦--expr: [1/0] {65} - ¦ ¦ ¦--expr: [0/0] {67} + ¦ ¦--expr: dirna [1/0] {65} + ¦ ¦ ¦--expr: dirna [0/0] {67} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: dirna [0/0] {66} ¦ ¦ ¦--'(': ( [0/0] {68} - ¦ ¦ ¦--expr: [0/12] {70} + ¦ ¦ ¦--expr: path [0/12] {70} ¦ ¦ ¦ °--SYMBOL: path [0/0] {69} ¦ ¦ °--')': ) [1/0] {71} ¦ ¦--',': , [0/4] {72} - ¦ ¦--expr: [1/2] {73} - ¦ ¦ ¦--expr: [0/0] {75} + ¦ ¦--expr: trans [1/2] {73} + ¦ ¦ ¦--expr: trans [0/0] {75} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: trans [0/0] {74} ¦ ¦ ¦--'(': ( [0/0] {76} - ¦ ¦ ¦--expr: [0/0] {77} - ¦ ¦ ¦ ¦--expr: [0/0] {79} + ¦ ¦ ¦--expr: basen [0/0] {77} + ¦ ¦ ¦ ¦--expr: basen [0/0] {79} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: basen [0/0] {78} ¦ ¦ ¦ ¦--'(': ( [0/0] {80} - ¦ ¦ ¦ ¦--expr: [0/0] {82} + ¦ ¦ ¦ ¦--expr: path [0/0] {82} ¦ ¦ ¦ ¦ °--SYMBOL: path [0/0] {81} ¦ ¦ ¦ °--')': ) [0/0] {83} ¦ ¦ ¦--',': , [0/1] {84} - ¦ ¦ ¦--expr: [0/0] {86} + ¦ ¦ ¦--expr: trans [0/0] {86} ¦ ¦ ¦ °--SYMBOL: trans [0/0] {85} ¦ ¦ °--')': ) [0/0] {87} ¦ °--')': ) [1/0] {88} - ¦--expr: [1/0] {89} - ¦ ¦--expr: [0/0] {91} + ¦--expr: invis [1/0] {89} + ¦ ¦--expr: invis [0/0] {91} ¦ ¦ °--SYMBOL_FUNCTION_CALL: invis [0/0] {90} ¦ ¦--'(': ( [0/0] {92} - ¦ ¦--expr: [0/0] {94} + ¦ ¦--expr: chang [0/0] {94} ¦ ¦ °--SYMBOL: chang [0/0] {93} ¦ °--')': ) [0/0] {95} °--'}': } [1/0] {96} diff --git a/tests/testthat/roxygen-examples-complete/8-roxygen-dontrun-in_tree b/tests/testthat/roxygen-examples-complete/8-roxygen-dontrun-in_tree index 768c93c32..710728774 100644 --- a/tests/testthat/roxygen-examples-complete/8-roxygen-dontrun-in_tree +++ b/tests/testthat/roxygen-examples-complete/8-roxygen-dontrun-in_tree @@ -25,11 +25,11 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--COMMENT: #' } [1/0] {24} ¦--COMMENT: #' @f [1/0] {25} ¦--COMMENT: #' @e [1/0] {26} - °--expr: [1/0] {27} - ¦--expr: [0/1] {29} + °--expr: style [1/0] {27} + ¦--expr: style [0/1] {29} ¦ °--SYMBOL: style [0/0] {28} ¦--LEFT_ASSIGN: <- [0/1] {30} - °--expr: [0/0] {31} + °--expr: funct [0/0] {31} ¦--FUNCTION: funct [0/0] {32} ¦--'(': ( [0/0] {33} ¦--SYMBOL_FORMALS: path [0/0] {34} @@ -38,65 +38,66 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--',': , [0/23] {37} ¦--SYMBOL_FORMALS: style [1/1] {38} ¦--EQ_FORMALS: = [0/1] {39} - ¦--expr: [0/0] {41} + ¦--expr: tidyv [0/0] {41} ¦ °--SYMBOL: tidyv [0/0] {40} ¦--',': , [0/23] {42} ¦--SYMBOL_FORMALS: trans [1/1] {43} ¦--EQ_FORMALS: = [0/1] {44} - ¦--expr: [0/0] {45} - ¦ ¦--expr: [0/0] {47} + ¦--expr: style [0/0] {45} + ¦ ¦--expr: style [0/0] {47} ¦ ¦ °--SYMBOL_FUNCTION_CALL: style [0/0] {46} ¦ ¦--'(': ( [0/0] {48} - ¦ ¦--expr: [0/0] {50} + ¦ ¦--expr: ... [0/0] {50} ¦ ¦ °--SYMBOL: ... [0/0] {49} ¦ °--')': ) [0/0] {51} ¦--',': , [0/23] {52} ¦--SYMBOL_FORMALS: inclu [1/1] {53} ¦--EQ_FORMALS: = [0/1] {54} - ¦--expr: [0/0] {56} + ¦--expr: TRUE [0/0] {56} ¦ °--NUM_CONST: TRUE [0/0] {55} ¦--')': ) [0/1] {57} - °--expr: [0/0] {58} + °--expr: { + c [0/0] {58} ¦--'{': { [0/2] {59} - ¦--expr: [1/2] {60} - ¦ ¦--expr: [0/0] {62} + ¦--expr: chang [1/2] {60} + ¦ ¦--expr: chang [0/0] {62} ¦ ¦ °--SYMBOL: chang [0/0] {61} ¦ ¦--LEFT_ASSIGN: <- [0/1] {63} - ¦ °--expr: [0/0] {64} - ¦ ¦--expr: [0/0] {65} + ¦ °--expr: withr [0/0] {64} + ¦ ¦--expr: withr [0/0] {65} ¦ ¦ ¦--SYMBOL_PACKAGE: withr [0/0] {66} ¦ ¦ ¦--NS_GET: :: [0/0] {67} ¦ ¦ °--SYMBOL_FUNCTION_CALL: with_ [0/0] {68} ¦ ¦--'(': ( [0/4] {69} - ¦ ¦--expr: [1/0] {70} - ¦ ¦ ¦--expr: [0/0] {72} + ¦ ¦--expr: dirna [1/0] {70} + ¦ ¦ ¦--expr: dirna [0/0] {72} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: dirna [0/0] {71} ¦ ¦ ¦--'(': ( [0/0] {73} - ¦ ¦ ¦--expr: [0/12] {75} + ¦ ¦ ¦--expr: path [0/12] {75} ¦ ¦ ¦ °--SYMBOL: path [0/0] {74} ¦ ¦ °--')': ) [1/0] {76} ¦ ¦--',': , [0/4] {77} - ¦ ¦--expr: [1/2] {78} - ¦ ¦ ¦--expr: [0/0] {80} + ¦ ¦--expr: trans [1/2] {78} + ¦ ¦ ¦--expr: trans [0/0] {80} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: trans [0/0] {79} ¦ ¦ ¦--'(': ( [0/0] {81} - ¦ ¦ ¦--expr: [0/0] {82} - ¦ ¦ ¦ ¦--expr: [0/0] {84} + ¦ ¦ ¦--expr: basen [0/0] {82} + ¦ ¦ ¦ ¦--expr: basen [0/0] {84} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: basen [0/0] {83} ¦ ¦ ¦ ¦--'(': ( [0/0] {85} - ¦ ¦ ¦ ¦--expr: [0/0] {87} + ¦ ¦ ¦ ¦--expr: path [0/0] {87} ¦ ¦ ¦ ¦ °--SYMBOL: path [0/0] {86} ¦ ¦ ¦ °--')': ) [0/0] {88} ¦ ¦ ¦--',': , [0/1] {89} - ¦ ¦ ¦--expr: [0/0] {91} + ¦ ¦ ¦--expr: trans [0/0] {91} ¦ ¦ ¦ °--SYMBOL: trans [0/0] {90} ¦ ¦ °--')': ) [0/0] {92} ¦ °--')': ) [1/0] {93} - ¦--expr: [1/0] {94} - ¦ ¦--expr: [0/0] {96} + ¦--expr: invis [1/0] {94} + ¦ ¦--expr: invis [0/0] {96} ¦ ¦ °--SYMBOL_FUNCTION_CALL: invis [0/0] {95} ¦ ¦--'(': ( [0/0] {97} - ¦ ¦--expr: [0/0] {99} + ¦ ¦--expr: chang [0/0] {99} ¦ ¦ °--SYMBOL: chang [0/0] {98} ¦ °--')': ) [0/0] {100} °--'}': } [1/0] {101} diff --git a/tests/testthat/roxygen-examples-complete/9-styler-r-ui-style-string-multiple-in_tree b/tests/testthat/roxygen-examples-complete/9-styler-r-ui-style-string-multiple-in_tree index b880bd709..51af44dc6 100644 --- a/tests/testthat/roxygen-examples-complete/9-styler-r-ui-style-string-multiple-in_tree +++ b/tests/testthat/roxygen-examples-complete/9-styler-r-ui-style-string-multiple-in_tree @@ -17,11 +17,11 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--COMMENT: #' @e [1/0] {16} ¦--COMMENT: #' \d [1/0] {17} ¦--COMMENT: #' @e [1/0] {18} - °--expr: [1/0] {19} - ¦--expr: [0/1] {21} + °--expr: style [1/0] {19} + ¦--expr: style [0/1] {21} ¦ °--SYMBOL: style [0/0] {20} ¦--LEFT_ASSIGN: <- [0/1] {22} - °--expr: [0/0] {23} + °--expr: funct [0/0] {23} ¦--FUNCTION: funct [0/0] {24} ¦--'(': ( [0/0] {25} ¦--SYMBOL_FORMALS: text [0/0] {26} @@ -30,56 +30,57 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--',': , [0/23] {29} ¦--SYMBOL_FORMALS: style [1/1] {30} ¦--EQ_FORMALS: = [0/1] {31} - ¦--expr: [0/0] {33} + ¦--expr: tidyv [0/0] {33} ¦ °--SYMBOL: tidyv [0/0] {32} ¦--',': , [0/23] {34} ¦--SYMBOL_FORMALS: trans [1/1] {35} ¦--EQ_FORMALS: = [0/1] {36} - ¦--expr: [0/0] {37} - ¦ ¦--expr: [0/0] {39} + ¦--expr: style [0/0] {37} + ¦ ¦--expr: style [0/0] {39} ¦ ¦ °--SYMBOL_FUNCTION_CALL: style [0/0] {38} ¦ ¦--'(': ( [0/0] {40} - ¦ ¦--expr: [0/0] {42} + ¦ ¦--expr: ... [0/0] {42} ¦ ¦ °--SYMBOL: ... [0/0] {41} ¦ °--')': ) [0/0] {43} ¦--',': , [0/23] {44} ¦--SYMBOL_FORMALS: inclu [1/1] {45} ¦--EQ_FORMALS: = [0/1] {46} - ¦--expr: [0/0] {48} + ¦--expr: TRUE [0/0] {48} ¦ °--NUM_CONST: TRUE [0/0] {47} ¦--')': ) [0/1] {49} - °--expr: [0/0] {50} + °--expr: { + t [0/0] {50} ¦--'{': { [0/2] {51} - ¦--expr: [1/2] {52} - ¦ ¦--expr: [0/1] {54} + ¦--expr: trans [1/2] {52} + ¦ ¦--expr: trans [0/1] {54} ¦ ¦ °--SYMBOL: trans [0/0] {53} ¦ ¦--LEFT_ASSIGN: <- [0/1] {55} - ¦ °--expr: [0/0] {56} - ¦ ¦--expr: [0/0] {58} + ¦ °--expr: make_ [0/0] {56} + ¦ ¦--expr: make_ [0/0] {58} ¦ ¦ °--SYMBOL_FUNCTION_CALL: make_ [0/0] {57} ¦ ¦--'(': ( [0/0] {59} - ¦ ¦--expr: [0/0] {61} + ¦ ¦--expr: trans [0/0] {61} ¦ ¦ °--SYMBOL: trans [0/0] {60} ¦ ¦--',': , [0/1] {62} - ¦ ¦--expr: [0/0] {64} + ¦ ¦--expr: inclu [0/0] {64} ¦ ¦ °--SYMBOL: inclu [0/0] {63} ¦ °--')': ) [0/0] {65} - ¦--expr: [1/2] {66} - ¦ ¦--expr: [0/1] {68} + ¦--expr: style [1/2] {66} + ¦ ¦--expr: style [0/1] {68} ¦ ¦ °--SYMBOL: style [0/0] {67} ¦ ¦--LEFT_ASSIGN: <- [0/1] {69} - ¦ °--expr: [0/0] {70} - ¦ ¦--expr: [0/0] {72} + ¦ °--expr: trans [0/0] {70} + ¦ ¦--expr: trans [0/0] {72} ¦ ¦ °--SYMBOL_FUNCTION_CALL: trans [0/0] {71} ¦ ¦--'(': ( [0/0] {73} - ¦ ¦--expr: [0/0] {75} + ¦ ¦--expr: text [0/0] {75} ¦ ¦ °--SYMBOL: text [0/0] {74} ¦ °--')': ) [0/0] {76} - ¦--expr: [1/0] {77} - ¦ ¦--expr: [0/0] {79} + ¦--expr: const [1/0] {77} + ¦ ¦--expr: const [0/0] {79} ¦ ¦ °--SYMBOL_FUNCTION_CALL: const [0/0] {78} ¦ ¦--'(': ( [0/0] {80} - ¦ ¦--expr: [0/0] {82} + ¦ ¦--expr: style [0/0] {82} ¦ ¦ °--SYMBOL: style [0/0] {81} ¦ °--')': ) [0/0] {83} °--'}': } [1/0] {84} diff --git a/tests/testthat/scope_argument/scope_indention-in_tree b/tests/testthat/scope_argument/scope_indention-in_tree index 352a89b73..8a77d4400 100644 --- a/tests/testthat/scope_argument/scope_indention-in_tree +++ b/tests/testthat/scope_argument/scope_indention-in_tree @@ -1,96 +1,97 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--COMMENT: # not [0/0] {1} - ¦--expr: [1/0] {2} + ¦--expr: if (x [1/0] {2} ¦ ¦--IF: if [0/1] {3} ¦ ¦--'(': ( [0/0] {4} - ¦ ¦--expr: [0/0] {6} + ¦ ¦--expr: x [0/0] {6} ¦ ¦ °--SYMBOL: x [0/0] {5} ¦ ¦--')': ) [0/1] {7} - ¦ ¦--expr: [0/1] {8} + ¦ ¦--expr: {1+1+ [0/1] {8} ¦ ¦ ¦--'{': { [0/0] {9} - ¦ ¦ ¦--expr: [0/0] {10} - ¦ ¦ ¦ ¦--expr: [0/0] {13} + ¦ ¦ ¦--expr: 1+1++ [0/0] {10} + ¦ ¦ ¦ ¦--expr: 1 [0/0] {13} ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {12} ¦ ¦ ¦ ¦--'+': + [0/0] {14} - ¦ ¦ ¦ ¦--expr: [0/0] {16} + ¦ ¦ ¦ ¦--expr: 1 [0/0] {16} ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {15} ¦ ¦ ¦ ¦--'+': + [0/0] {17} - ¦ ¦ ¦ °--expr: [0/0] {18} + ¦ ¦ ¦ °--expr: +1 [0/0] {18} ¦ ¦ ¦ ¦--'+': + [0/0] {19} - ¦ ¦ ¦ °--expr: [0/0] {21} + ¦ ¦ ¦ °--expr: 1 [0/0] {21} ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {20} ¦ ¦ °--'}': } [0/0] {22} ¦ ¦--ELSE: else [0/0] {23} - ¦ °--expr: [0/0] {24} + ¦ °--expr: {3} [0/0] {24} ¦ ¦--'{': { [0/0] {25} - ¦ ¦--expr: [0/0] {27} + ¦ ¦--expr: 3 [0/0] {27} ¦ ¦ °--NUM_CONST: 3 [0/0] {26} ¦ °--'}': } [0/0] {28} ¦--COMMENT: # not [2/0] {29} ¦--COMMENT: # FIX [1/0] {30} - ¦--expr: [1/0] {31} - ¦ ¦--expr: [0/0] {33} + ¦--expr: test_ [1/0] {31} + ¦ ¦--expr: test_ [0/0] {33} ¦ ¦ °--SYMBOL_FUNCTION_CALL: test_ [0/0] {32} ¦ ¦--'(': ( [0/0] {34} - ¦ ¦--expr: [0/0] {36} + ¦ ¦--expr: "x" [0/0] {36} ¦ ¦ °--STR_CONST: "x" [0/0] {35} ¦ ¦--',': , [0/2] {37} - ¦ ¦--expr: [1/0] {38} + ¦ ¦--expr: { + [1/0] {38} ¦ ¦ ¦--'{': { [0/12] {39} - ¦ ¦ ¦--expr: [1/0] {40} - ¦ ¦ ¦ ¦--expr: [0/0] {42} + ¦ ¦ ¦--expr: my_te [1/0] {40} + ¦ ¦ ¦ ¦--expr: my_te [0/0] {42} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: my_te [0/0] {41} ¦ ¦ ¦ ¦--'(': ( [0/0] {43} - ¦ ¦ ¦ ¦--expr: [0/0] {45} + ¦ ¦ ¦ ¦--expr: call [0/0] {45} ¦ ¦ ¦ ¦ °--SYMBOL: call [0/0] {44} ¦ ¦ ¦ °--')': ) [0/0] {46} ¦ ¦ °--'}': } [1/0] {47} ¦ °--')': ) [0/0] {48} ¦--COMMENT: # do [2/0] {49} - ¦--equal_assign: [1/0] {50} - ¦ ¦--expr: [0/1] {52} + ¦--equal_assign: a = 3 [1/0] {50} + ¦ ¦--expr: a [0/1] {52} ¦ ¦ °--SYMBOL: a [0/0] {51} ¦ ¦--EQ_ASSIGN: = [0/1] {53} - ¦ °--expr: [0/0] {55} + ¦ °--expr: 3 [0/0] {55} ¦ °--NUM_CONST: 3 [0/0] {54} - ¦--expr: [1/0] {56} - ¦ ¦--expr: [0/0] {58} + ¦--expr: data_ [1/0] {56} + ¦ ¦--expr: data_ [0/0] {58} ¦ ¦ °--SYMBOL_FUNCTION_CALL: data_ [0/0] {57} ¦ ¦--'(': ( [0/0] {59} ¦ ¦--SYMBOL_SUB: a [0/1] {60} ¦ ¦--EQ_SUB: = [0/1] {61} - ¦ ¦--expr: [0/0] {63} + ¦ ¦--expr: 3 [0/0] {63} ¦ ¦ °--NUM_CONST: 3 [0/0] {62} ¦ °--')': ) [0/0] {64} ¦--COMMENT: # do [2/0] {65} - ¦--expr: [1/0] {66} - ¦ ¦--expr: [0/1] {68} + ¦--expr: a <- [1/0] {66} + ¦ ¦--expr: a [0/1] {68} ¦ ¦ °--SYMBOL: a [0/0] {67} ¦ ¦--LEFT_ASSIGN: <- [0/1] {69} - ¦ °--expr: [0/0] {70} + ¦ °--expr: funct [0/0] {70} ¦ ¦--FUNCTION: funct [0/0] {71} ¦ ¦--'(': ( [0/0] {72} ¦ ¦--SYMBOL_FORMALS: x [0/0] {73} ¦ ¦--')': ) [0/1] {74} - ¦ °--expr: [0/0] {75} - ¦ ¦--expr: [0/1] {77} + ¦ °--expr: x + 1 [0/0] {75} + ¦ ¦--expr: x [0/1] {77} ¦ ¦ °--SYMBOL: x [0/0] {76} ¦ ¦--'+': + [0/1] {78} - ¦ °--expr: [0/0] {80} + ¦ °--expr: 1 [0/0] {80} ¦ °--NUM_CONST: 1 [0/0] {79} ¦--';': ; [0/0] {81} - ¦--expr: [0/0] {83} + ¦--expr: b [0/0] {83} ¦ °--SYMBOL: b [0/0] {82} ¦--';': ; [0/0] {84} - ¦--expr: [0/0] {86} + ¦--expr: c [0/0] {86} ¦ °--SYMBOL: c [0/0] {85} ¦--COMMENT: # don [2/0] {87} - °--expr: [1/0] {88} - ¦--expr: [0/1] {91} + °--expr: a %>% [1/0] {88} + ¦--expr: a [0/1] {91} ¦ °--SYMBOL: a [0/0] {90} ¦--SPECIAL-PIPE: %>% [0/2] {92} - ¦--expr: [1/1] {94} + ¦--expr: b [1/1] {94} ¦ °--SYMBOL: b [0/0] {93} ¦--SPECIAL-PIPE: %>% [0/2] {95} - °--expr: [1/0] {97} + °--expr: c [1/0] {97} °--SYMBOL: c [0/0] {96} diff --git a/tests/testthat/scope_argument/scope_line_breaks-in_tree b/tests/testthat/scope_argument/scope_line_breaks-in_tree index 6672b318f..6ca9496a7 100644 --- a/tests/testthat/scope_argument/scope_line_breaks-in_tree +++ b/tests/testthat/scope_argument/scope_line_breaks-in_tree @@ -1,95 +1,96 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--COMMENT: # add [0/0] {1} - ¦--expr: [1/0] {2} + ¦--expr: if (x [1/0] {2} ¦ ¦--IF: if [0/1] {3} ¦ ¦--'(': ( [0/0] {4} - ¦ ¦--expr: [0/0] {6} + ¦ ¦--expr: x [0/0] {6} ¦ ¦ °--SYMBOL: x [0/0] {5} ¦ ¦--')': ) [0/1] {7} - ¦ ¦--expr: [0/1] {8} + ¦ ¦--expr: {1 + [0/1] {8} ¦ ¦ ¦--'{': { [0/0] {9} - ¦ ¦ ¦--expr: [0/0] {10} - ¦ ¦ ¦ ¦--expr: [0/1] {13} + ¦ ¦ ¦--expr: 1 + 1 [0/0] {10} + ¦ ¦ ¦ ¦--expr: 1 [0/1] {13} ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {12} ¦ ¦ ¦ ¦--'+': + [0/1] {14} - ¦ ¦ ¦ ¦--expr: [0/1] {16} + ¦ ¦ ¦ ¦--expr: 1 [0/1] {16} ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {15} ¦ ¦ ¦ ¦--'+': + [0/1] {17} - ¦ ¦ ¦ °--expr: [0/0] {18} + ¦ ¦ ¦ °--expr: +1 [0/0] {18} ¦ ¦ ¦ ¦--'+': + [0/0] {19} - ¦ ¦ ¦ °--expr: [0/0] {21} + ¦ ¦ ¦ °--expr: 1 [0/0] {21} ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {20} ¦ ¦ °--'}': } [0/0] {22} ¦ ¦--ELSE: else [0/1] {23} - ¦ °--expr: [0/0] {24} + ¦ °--expr: {3} [0/0] {24} ¦ ¦--'{': { [0/0] {25} - ¦ ¦--expr: [0/0] {27} + ¦ ¦--expr: 3 [0/0] {27} ¦ ¦ °--NUM_CONST: 3 [0/0] {26} ¦ °--'}': } [0/0] {28} ¦--COMMENT: # rem [2/0] {29} - ¦--expr: [1/0] {30} - ¦ ¦--expr: [0/0] {32} + ¦--expr: test_ [1/0] {30} + ¦ ¦--expr: test_ [0/0] {32} ¦ ¦ °--SYMBOL_FUNCTION_CALL: test_ [0/0] {31} ¦ ¦--'(': ( [0/0] {33} - ¦ ¦--expr: [0/0] {35} + ¦ ¦--expr: "x" [0/0] {35} ¦ ¦ °--STR_CONST: "x" [0/0] {34} ¦ ¦--',': , [0/10] {36} - ¦ ¦--expr: [1/0] {37} + ¦ ¦--expr: { + [1/0] {37} ¦ ¦ ¦--'{': { [0/12] {38} - ¦ ¦ ¦--expr: [1/10] {39} - ¦ ¦ ¦ ¦--expr: [0/0] {41} + ¦ ¦ ¦--expr: my_te [1/10] {39} + ¦ ¦ ¦ ¦--expr: my_te [0/0] {41} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: my_te [0/0] {40} ¦ ¦ ¦ ¦--'(': ( [0/0] {42} - ¦ ¦ ¦ ¦--expr: [0/0] {44} + ¦ ¦ ¦ ¦--expr: call [0/0] {44} ¦ ¦ ¦ ¦ °--SYMBOL: call [0/0] {43} ¦ ¦ ¦ °--')': ) [0/0] {45} ¦ ¦ °--'}': } [1/0] {46} ¦ °--')': ) [0/0] {47} ¦--COMMENT: # do [3/0] {48} - ¦--equal_assign: [1/0] {49} - ¦ ¦--expr: [0/1] {51} + ¦--equal_assign: a = 3 [1/0] {49} + ¦ ¦--expr: a [0/1] {51} ¦ ¦ °--SYMBOL: a [0/0] {50} ¦ ¦--EQ_ASSIGN: = [0/1] {52} - ¦ °--expr: [0/0] {54} + ¦ °--expr: 3 [0/0] {54} ¦ °--NUM_CONST: 3 [0/0] {53} - ¦--expr: [1/0] {55} - ¦ ¦--expr: [0/0] {57} + ¦--expr: data_ [1/0] {55} + ¦ ¦--expr: data_ [0/0] {57} ¦ ¦ °--SYMBOL_FUNCTION_CALL: data_ [0/0] {56} ¦ ¦--'(': ( [0/0] {58} ¦ ¦--SYMBOL_SUB: a [0/1] {59} ¦ ¦--EQ_SUB: = [0/1] {60} - ¦ ¦--expr: [0/0] {62} + ¦ ¦--expr: 3 [0/0] {62} ¦ ¦ °--NUM_CONST: 3 [0/0] {61} ¦ °--')': ) [0/0] {63} ¦--COMMENT: # do [2/0] {64} - ¦--expr: [1/0] {65} - ¦ ¦--expr: [0/1] {67} + ¦--expr: a <- [1/0] {65} + ¦ ¦--expr: a [0/1] {67} ¦ ¦ °--SYMBOL: a [0/0] {66} ¦ ¦--LEFT_ASSIGN: <- [0/1] {68} - ¦ °--expr: [0/0] {69} + ¦ °--expr: funct [0/0] {69} ¦ ¦--FUNCTION: funct [0/0] {70} ¦ ¦--'(': ( [0/0] {71} ¦ ¦--SYMBOL_FORMALS: x [0/0] {72} ¦ ¦--')': ) [0/1] {73} - ¦ °--expr: [0/0] {74} - ¦ ¦--expr: [0/1] {76} + ¦ °--expr: x + 1 [0/0] {74} + ¦ ¦--expr: x [0/1] {76} ¦ ¦ °--SYMBOL: x [0/0] {75} ¦ ¦--'+': + [0/1] {77} - ¦ °--expr: [0/0] {79} + ¦ °--expr: 1 [0/0] {79} ¦ °--NUM_CONST: 1 [0/0] {78} ¦--';': ; [0/0] {80} - ¦--expr: [0/0] {82} + ¦--expr: b [0/0] {82} ¦ °--SYMBOL: b [0/0] {81} ¦--';': ; [0/0] {83} - ¦--expr: [0/0] {85} + ¦--expr: c [0/0] {85} ¦ °--SYMBOL: c [0/0] {84} ¦--COMMENT: # don [2/0] {86} - °--expr: [1/0] {87} - ¦--expr: [0/1] {90} + °--expr: a %>% [1/0] {87} + ¦--expr: a [0/1] {90} ¦ °--SYMBOL: a [0/0] {89} ¦--SPECIAL-PIPE: %>% [0/2] {91} - ¦--expr: [1/1] {93} + ¦--expr: b [1/1] {93} ¦ °--SYMBOL: b [0/0] {92} ¦--SPECIAL-PIPE: %>% [0/2] {94} - °--expr: [1/0] {96} + °--expr: c [1/0] {96} °--SYMBOL: c [0/0] {95} diff --git a/tests/testthat/scope_argument/scope_none-in_tree b/tests/testthat/scope_argument/scope_none-in_tree index ceee8e4e9..3c65a9c14 100644 --- a/tests/testthat/scope_argument/scope_none-in_tree +++ b/tests/testthat/scope_argument/scope_none-in_tree @@ -3,78 +3,82 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--COMMENT: #' [1/0] {2} ¦--COMMENT: #' @p [1/0] {3} ¦--COMMENT: #' [1/0] {4} - ¦--expr: [1/0] {5} - ¦ ¦--expr: [0/0] {7} + ¦--expr: a<- f [1/0] {5} + ¦ ¦--expr: a [0/0] {7} ¦ ¦ °--SYMBOL: a [0/0] {6} ¦ ¦--LEFT_ASSIGN: <- [0/1] {8} - ¦ °--expr: [0/0] {9} + ¦ °--expr: funct [0/0] {9} ¦ ¦--FUNCTION: funct [0/0] {10} ¦ ¦--'(': ( [0/0] {11} ¦ ¦--SYMBOL_FORMALS: x [0/0] {12} ¦ ¦--')': ) [0/0] {13} - ¦ °--expr: [0/0] {14} + ¦ °--expr: { + t [0/0] {14} ¦ ¦--'{': { [0/2] {15} - ¦ ¦--expr: [1/2] {16} - ¦ ¦ ¦--expr: [0/0] {18} + ¦ ¦--expr: test_ [1/2] {16} + ¦ ¦ ¦--expr: test_ [0/0] {18} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: test_ [0/0] {17} ¦ ¦ ¦--'(': ( [0/0] {19} - ¦ ¦ ¦--expr: [0/0] {21} + ¦ ¦ ¦--expr: "I wa [0/0] {21} ¦ ¦ ¦ °--STR_CONST: "I wa [0/0] {20} ¦ ¦ ¦--',': , [0/0] {22} - ¦ ¦ ¦--expr: [0/5] {23} + ¦ ¦ ¦--expr: { + [0/5] {23} ¦ ¦ ¦ ¦--'{': { [0/4] {24} - ¦ ¦ ¦ ¦--expr: [1/4] {25} - ¦ ¦ ¦ ¦ ¦--expr: [0/1] {27} + ¦ ¦ ¦ ¦--expr: out < [1/4] {25} + ¦ ¦ ¦ ¦ ¦--expr: out [0/1] {27} ¦ ¦ ¦ ¦ ¦ °--SYMBOL: out [0/0] {26} ¦ ¦ ¦ ¦ ¦--LEFT_ASSIGN: <- [0/1] {28} - ¦ ¦ ¦ ¦ °--expr: [0/0] {29} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {31} + ¦ ¦ ¦ ¦ °--expr: c(1,c [0/0] {29} + ¦ ¦ ¦ ¦ ¦--expr: c [0/0] {31} ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {30} ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {32} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {34} + ¦ ¦ ¦ ¦ ¦--expr: 1 [0/0] {34} ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {33} ¦ ¦ ¦ ¦ ¦--',': , [0/0] {35} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {36} - ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/0] {38} + ¦ ¦ ¦ ¦ ¦--expr: c( + [0/0] {36} + ¦ ¦ ¦ ¦ ¦ ¦--expr: c [0/0] {38} ¦ ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {37} ¦ ¦ ¦ ¦ ¦ ¦--'(': ( [0/6] {39} - ¦ ¦ ¦ ¦ ¦ ¦--expr: [1/4] {40} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/1] {42} + ¦ ¦ ¦ ¦ ¦ ¦--expr: 22 +1 [1/4] {40} + ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: 22 [0/1] {42} ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 22 [0/0] {41} ¦ ¦ ¦ ¦ ¦ ¦ ¦--'+': + [0/0] {43} - ¦ ¦ ¦ ¦ ¦ ¦ °--expr: [0/0] {45} + ¦ ¦ ¦ ¦ ¦ ¦ °--expr: 1 [0/0] {45} ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {44} ¦ ¦ ¦ ¦ ¦ °--')': ) [1/0] {46} ¦ ¦ ¦ ¦ °--')': ) [0/0] {47} - ¦ ¦ ¦ ¦--expr: [1/2] {48} + ¦ ¦ ¦ ¦--expr: if (x [1/2] {48} ¦ ¦ ¦ ¦ ¦--IF: if [0/1] {49} ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {50} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {51} - ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/1] {53} + ¦ ¦ ¦ ¦ ¦--expr: x > 1 [0/0] {51} + ¦ ¦ ¦ ¦ ¦ ¦--expr: x [0/1] {53} ¦ ¦ ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {52} ¦ ¦ ¦ ¦ ¦ ¦--GT: > [0/1] {54} - ¦ ¦ ¦ ¦ ¦ °--expr: [0/0] {56} + ¦ ¦ ¦ ¦ ¦ °--expr: 10 [0/0] {56} ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 10 [0/0] {55} ¦ ¦ ¦ ¦ ¦--')': ) [0/1] {57} - ¦ ¦ ¦ ¦ °--expr: [0/0] {58} + ¦ ¦ ¦ ¦ °--expr: { + [0/0] {58} ¦ ¦ ¦ ¦ ¦--'{': { [0/6] {59} - ¦ ¦ ¦ ¦ ¦--expr: [1/4] {60} + ¦ ¦ ¦ ¦ ¦--expr: for ( [1/4] {60} ¦ ¦ ¦ ¦ ¦ ¦--FOR: for [0/1] {61} - ¦ ¦ ¦ ¦ ¦ ¦--forcond: [0/1] {62} + ¦ ¦ ¦ ¦ ¦ ¦--forcond: (x in [0/1] {62} ¦ ¦ ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {63} ¦ ¦ ¦ ¦ ¦ ¦ ¦--SYMBOL: x [0/1] {64} ¦ ¦ ¦ ¦ ¦ ¦ ¦--IN: in [0/1] {65} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/0] {67} + ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: 22 [0/0] {67} ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 22 [0/0] {66} ¦ ¦ ¦ ¦ ¦ ¦ °--')': ) [0/0] {68} - ¦ ¦ ¦ ¦ ¦ °--expr: [0/0] {69} + ¦ ¦ ¦ ¦ ¦ °--expr: { # F [0/0] {69} ¦ ¦ ¦ ¦ ¦ ¦--'{': { [0/1] {70} ¦ ¦ ¦ ¦ ¦ ¦--COMMENT: # FIX [0/8] {71} - ¦ ¦ ¦ ¦ ¦ ¦--expr: [1/6] {72} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/0] {74} + ¦ ¦ ¦ ¦ ¦ ¦--expr: prin( [1/6] {72} + ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: prin [0/0] {74} ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: prin [0/0] {73} ¦ ¦ ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {75} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/0] {77} + ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: x [0/0] {77} ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {76} ¦ ¦ ¦ ¦ ¦ ¦ °--')': ) [0/0] {78} ¦ ¦ ¦ ¦ ¦ °--'}': } [1/0] {79} @@ -82,71 +86,72 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦ ¦ ¦ °--'}': } [1/0] {81} ¦ ¦ °--')': ) [0/0] {82} ¦ ¦--COMMENT: #we l [1/2] {83} - ¦ ¦--expr: [1/2] {84} - ¦ ¦ ¦--expr: [0/0] {86} + ¦ ¦--expr: c(lis [1/2] {84} + ¦ ¦ ¦--expr: c [0/0] {86} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {85} ¦ ¦ ¦--'(': ( [0/0] {87} - ¦ ¦ ¦--expr: [0/0] {88} - ¦ ¦ ¦ ¦--expr: [0/0] {90} + ¦ ¦ ¦--expr: list( [0/0] {88} + ¦ ¦ ¦ ¦--expr: list [0/0] {90} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: list [0/0] {89} ¦ ¦ ¦ ¦--'(': ( [0/0] {91} - ¦ ¦ ¦ ¦--expr: [0/0] {92} - ¦ ¦ ¦ ¦ ¦--expr: [0/1] {94} + ¦ ¦ ¦ ¦--expr: x + 2 [0/0] {92} + ¦ ¦ ¦ ¦ ¦--expr: x [0/1] {94} ¦ ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {93} ¦ ¦ ¦ ¦ ¦--'+': + [0/1] {95} - ¦ ¦ ¦ ¦ °--expr: [0/0] {97} + ¦ ¦ ¦ ¦ °--expr: 2 [0/0] {97} ¦ ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {96} ¦ ¦ ¦ °--')': ) [0/0] {98} ¦ ¦ ¦--',': , [0/4] {99} - ¦ ¦ ¦--expr: [1/1] {100} - ¦ ¦ ¦ ¦--expr: [0/0] {102} + ¦ ¦ ¦--expr: c( [1/1] {100} + ¦ ¦ ¦ ¦--expr: c [0/0] {102} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {101} ¦ ¦ ¦ ¦--'(': ( [0/4] {103} - ¦ ¦ ¦ ¦--expr: [0/3] {104} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {106} + ¦ ¦ ¦ ¦--expr: c( + [0/3] {104} + ¦ ¦ ¦ ¦ ¦--expr: c [0/0] {106} ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {105} ¦ ¦ ¦ ¦ ¦--'(': ( [0/6] {107} - ¦ ¦ ¦ ¦ ¦--expr: [1/0] {108} - ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/1] {110} + ¦ ¦ ¦ ¦ ¦--expr: 26 ^ [1/0] {108} + ¦ ¦ ¦ ¦ ¦ ¦--expr: 26 [0/1] {110} ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 26 [0/0] {109} ¦ ¦ ¦ ¦ ¦ ¦--'^': ^ [0/1] {111} - ¦ ¦ ¦ ¦ ¦ °--expr: [0/0] {113} + ¦ ¦ ¦ ¦ ¦ °--expr: 2 [0/0] {113} ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {112} ¦ ¦ ¦ ¦ ¦--',': , [0/1] {114} ¦ ¦ ¦ ¦ ¦--COMMENT: # FIX [0/6] {115} - ¦ ¦ ¦ ¦ ¦--expr: [1/0] {117} + ¦ ¦ ¦ ¦ ¦--expr: 8 [1/0] {117} ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 8 [0/0] {116} ¦ ¦ ¦ ¦ ¦--',': , [0/6] {118} - ¦ ¦ ¦ ¦ ¦--expr: [1/4] {120} + ¦ ¦ ¦ ¦ ¦--expr: 7 [1/4] {120} ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 7 [0/0] {119} ¦ ¦ ¦ ¦ °--')': ) [1/0] {121} ¦ ¦ ¦ °--')': ) [0/0] {122} ¦ ¦ °--')': ) [0/0] {123} - ¦ ¦--expr: [2/0] {124} - ¦ ¦ ¦--expr: [0/0] {126} + ¦ ¦--expr: call( [2/0] {124} + ¦ ¦ ¦--expr: call [0/0] {126} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {125} ¦ ¦ ¦--'(': ( [0/4] {127} - ¦ ¦ ¦--expr: [1/0] {129} + ¦ ¦ ¦--expr: 1 [1/0] {129} ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {128} ¦ ¦ ¦--',': , [0/1] {130} - ¦ ¦ ¦--expr: [0/0] {132} + ¦ ¦ ¦--expr: 2 [0/0] {132} ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {131} ¦ ¦ ¦--',': , [0/4] {133} - ¦ ¦ ¦--expr: [1/0] {134} - ¦ ¦ ¦ ¦--expr: [0/0] {137} + ¦ ¦ ¦--expr: 23+In [1/0] {134} + ¦ ¦ ¦ ¦--expr: 23 [0/0] {137} ¦ ¦ ¦ ¦ °--NUM_CONST: 23 [0/0] {136} ¦ ¦ ¦ ¦--'+': + [0/0] {138} - ¦ ¦ ¦ ¦--expr: [0/1] {140} + ¦ ¦ ¦ ¦--expr: Inf [0/1] {140} ¦ ¦ ¦ ¦ °--NUM_CONST: Inf [0/0] {139} ¦ ¦ ¦ ¦--'-': - [0/1] {141} - ¦ ¦ ¦ °--expr: [0/0] {143} + ¦ ¦ ¦ °--expr: 99 [0/0] {143} ¦ ¦ ¦ °--NUM_CONST: 99 [0/0] {142} ¦ ¦ ¦--',': , [0/1] {144} - ¦ ¦ ¦--expr: [0/0] {145} - ¦ ¦ ¦ ¦--expr: [0/0] {147} + ¦ ¦ ¦--expr: call( [0/0] {145} + ¦ ¦ ¦ ¦--expr: call [0/0] {147} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {146} ¦ ¦ ¦ ¦--'(': ( [0/6] {148} - ¦ ¦ ¦ ¦--expr: [1/4] {150} + ¦ ¦ ¦ ¦--expr: 16 [1/4] {150} ¦ ¦ ¦ ¦ °--NUM_CONST: 16 [0/0] {149} ¦ ¦ ¦ °--')': ) [1/0] {151} ¦ ¦ °--')': ) [0/0] {152} diff --git a/tests/testthat/scope_argument/scope_spaces-in_tree b/tests/testthat/scope_argument/scope_spaces-in_tree index 676dbcaf3..c2f559a5a 100644 --- a/tests/testthat/scope_argument/scope_spaces-in_tree +++ b/tests/testthat/scope_argument/scope_spaces-in_tree @@ -1,24 +1,25 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: [0/0] {1} - ¦--expr: [0/0] {3} + °--expr: a<-fu [0/0] {1} + ¦--expr: a [0/0] {3} ¦ °--SYMBOL: a [0/0] {2} ¦--LEFT_ASSIGN: <- [0/0] {4} - °--expr: [0/0] {5} + °--expr: funct [0/0] {5} ¦--FUNCTION: funct [0/0] {6} ¦--'(': ( [0/0] {7} ¦--')': ) [0/0] {8} - °--expr: [0/0] {9} + °--expr: { + [0/0] {9} ¦--'{': { [0/20] {10} - ¦--expr: [1/0] {11} - ¦ ¦--expr: [0/0] {13} + ¦--expr: 1+1 [1/0] {11} + ¦ ¦--expr: 1 [0/0] {13} ¦ ¦ °--NUM_CONST: 1 [0/0] {12} ¦ ¦--'+': + [0/0] {14} - ¦ °--expr: [0/0] {16} + ¦ °--expr: 1 [0/0] {16} ¦ °--NUM_CONST: 1 [0/0] {15} - ¦--equal_assign: [1/4] {17} - ¦ ¦--expr: [0/0] {19} + ¦--equal_assign: d=3 [1/4] {17} + ¦ ¦--expr: d [0/0] {19} ¦ ¦ °--SYMBOL: d [0/0] {18} ¦ ¦--EQ_ASSIGN: = [0/0] {20} - ¦ °--expr: [0/0] {22} + ¦ °--expr: 3 [0/0] {22} ¦ °--NUM_CONST: 3 [0/0] {21} °--'}': } [1/0] {23} diff --git a/tests/testthat/scope_argument/scope_tokens-in_tree b/tests/testthat/scope_argument/scope_tokens-in_tree index 6672b318f..6ca9496a7 100644 --- a/tests/testthat/scope_argument/scope_tokens-in_tree +++ b/tests/testthat/scope_argument/scope_tokens-in_tree @@ -1,95 +1,96 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--COMMENT: # add [0/0] {1} - ¦--expr: [1/0] {2} + ¦--expr: if (x [1/0] {2} ¦ ¦--IF: if [0/1] {3} ¦ ¦--'(': ( [0/0] {4} - ¦ ¦--expr: [0/0] {6} + ¦ ¦--expr: x [0/0] {6} ¦ ¦ °--SYMBOL: x [0/0] {5} ¦ ¦--')': ) [0/1] {7} - ¦ ¦--expr: [0/1] {8} + ¦ ¦--expr: {1 + [0/1] {8} ¦ ¦ ¦--'{': { [0/0] {9} - ¦ ¦ ¦--expr: [0/0] {10} - ¦ ¦ ¦ ¦--expr: [0/1] {13} + ¦ ¦ ¦--expr: 1 + 1 [0/0] {10} + ¦ ¦ ¦ ¦--expr: 1 [0/1] {13} ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {12} ¦ ¦ ¦ ¦--'+': + [0/1] {14} - ¦ ¦ ¦ ¦--expr: [0/1] {16} + ¦ ¦ ¦ ¦--expr: 1 [0/1] {16} ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {15} ¦ ¦ ¦ ¦--'+': + [0/1] {17} - ¦ ¦ ¦ °--expr: [0/0] {18} + ¦ ¦ ¦ °--expr: +1 [0/0] {18} ¦ ¦ ¦ ¦--'+': + [0/0] {19} - ¦ ¦ ¦ °--expr: [0/0] {21} + ¦ ¦ ¦ °--expr: 1 [0/0] {21} ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {20} ¦ ¦ °--'}': } [0/0] {22} ¦ ¦--ELSE: else [0/1] {23} - ¦ °--expr: [0/0] {24} + ¦ °--expr: {3} [0/0] {24} ¦ ¦--'{': { [0/0] {25} - ¦ ¦--expr: [0/0] {27} + ¦ ¦--expr: 3 [0/0] {27} ¦ ¦ °--NUM_CONST: 3 [0/0] {26} ¦ °--'}': } [0/0] {28} ¦--COMMENT: # rem [2/0] {29} - ¦--expr: [1/0] {30} - ¦ ¦--expr: [0/0] {32} + ¦--expr: test_ [1/0] {30} + ¦ ¦--expr: test_ [0/0] {32} ¦ ¦ °--SYMBOL_FUNCTION_CALL: test_ [0/0] {31} ¦ ¦--'(': ( [0/0] {33} - ¦ ¦--expr: [0/0] {35} + ¦ ¦--expr: "x" [0/0] {35} ¦ ¦ °--STR_CONST: "x" [0/0] {34} ¦ ¦--',': , [0/10] {36} - ¦ ¦--expr: [1/0] {37} + ¦ ¦--expr: { + [1/0] {37} ¦ ¦ ¦--'{': { [0/12] {38} - ¦ ¦ ¦--expr: [1/10] {39} - ¦ ¦ ¦ ¦--expr: [0/0] {41} + ¦ ¦ ¦--expr: my_te [1/10] {39} + ¦ ¦ ¦ ¦--expr: my_te [0/0] {41} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: my_te [0/0] {40} ¦ ¦ ¦ ¦--'(': ( [0/0] {42} - ¦ ¦ ¦ ¦--expr: [0/0] {44} + ¦ ¦ ¦ ¦--expr: call [0/0] {44} ¦ ¦ ¦ ¦ °--SYMBOL: call [0/0] {43} ¦ ¦ ¦ °--')': ) [0/0] {45} ¦ ¦ °--'}': } [1/0] {46} ¦ °--')': ) [0/0] {47} ¦--COMMENT: # do [3/0] {48} - ¦--equal_assign: [1/0] {49} - ¦ ¦--expr: [0/1] {51} + ¦--equal_assign: a = 3 [1/0] {49} + ¦ ¦--expr: a [0/1] {51} ¦ ¦ °--SYMBOL: a [0/0] {50} ¦ ¦--EQ_ASSIGN: = [0/1] {52} - ¦ °--expr: [0/0] {54} + ¦ °--expr: 3 [0/0] {54} ¦ °--NUM_CONST: 3 [0/0] {53} - ¦--expr: [1/0] {55} - ¦ ¦--expr: [0/0] {57} + ¦--expr: data_ [1/0] {55} + ¦ ¦--expr: data_ [0/0] {57} ¦ ¦ °--SYMBOL_FUNCTION_CALL: data_ [0/0] {56} ¦ ¦--'(': ( [0/0] {58} ¦ ¦--SYMBOL_SUB: a [0/1] {59} ¦ ¦--EQ_SUB: = [0/1] {60} - ¦ ¦--expr: [0/0] {62} + ¦ ¦--expr: 3 [0/0] {62} ¦ ¦ °--NUM_CONST: 3 [0/0] {61} ¦ °--')': ) [0/0] {63} ¦--COMMENT: # do [2/0] {64} - ¦--expr: [1/0] {65} - ¦ ¦--expr: [0/1] {67} + ¦--expr: a <- [1/0] {65} + ¦ ¦--expr: a [0/1] {67} ¦ ¦ °--SYMBOL: a [0/0] {66} ¦ ¦--LEFT_ASSIGN: <- [0/1] {68} - ¦ °--expr: [0/0] {69} + ¦ °--expr: funct [0/0] {69} ¦ ¦--FUNCTION: funct [0/0] {70} ¦ ¦--'(': ( [0/0] {71} ¦ ¦--SYMBOL_FORMALS: x [0/0] {72} ¦ ¦--')': ) [0/1] {73} - ¦ °--expr: [0/0] {74} - ¦ ¦--expr: [0/1] {76} + ¦ °--expr: x + 1 [0/0] {74} + ¦ ¦--expr: x [0/1] {76} ¦ ¦ °--SYMBOL: x [0/0] {75} ¦ ¦--'+': + [0/1] {77} - ¦ °--expr: [0/0] {79} + ¦ °--expr: 1 [0/0] {79} ¦ °--NUM_CONST: 1 [0/0] {78} ¦--';': ; [0/0] {80} - ¦--expr: [0/0] {82} + ¦--expr: b [0/0] {82} ¦ °--SYMBOL: b [0/0] {81} ¦--';': ; [0/0] {83} - ¦--expr: [0/0] {85} + ¦--expr: c [0/0] {85} ¦ °--SYMBOL: c [0/0] {84} ¦--COMMENT: # don [2/0] {86} - °--expr: [1/0] {87} - ¦--expr: [0/1] {90} + °--expr: a %>% [1/0] {87} + ¦--expr: a [0/1] {90} ¦ °--SYMBOL: a [0/0] {89} ¦--SPECIAL-PIPE: %>% [0/2] {91} - ¦--expr: [1/1] {93} + ¦--expr: b [1/1] {93} ¦ °--SYMBOL: b [0/0] {92} ¦--SPECIAL-PIPE: %>% [0/2] {94} - °--expr: [1/0] {96} + °--expr: c [1/0] {96} °--SYMBOL: c [0/0] {95} diff --git a/tests/testthat/serialize_tests/correct-in_tree b/tests/testthat/serialize_tests/correct-in_tree index aeaab11cf..be3886955 100644 --- a/tests/testthat/serialize_tests/correct-in_tree +++ b/tests/testthat/serialize_tests/correct-in_tree @@ -1,7 +1,7 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {2} + ¦--expr: 1 [0/0] {2} ¦ °--NUM_CONST: 1 [0/0] {1} - ¦--expr: [1/0] {4} + ¦--expr: 2 [1/0] {4} ¦ °--NUM_CONST: 2 [0/0] {3} - °--expr: [1/0] {6} + °--expr: 3 [1/0] {6} °--NUM_CONST: 3 [0/0] {5} diff --git a/tests/testthat/serialize_tests/k3-in_tree b/tests/testthat/serialize_tests/k3-in_tree index cbb8dee2d..5f6cd8cf6 100644 --- a/tests/testthat/serialize_tests/k3-in_tree +++ b/tests/testthat/serialize_tests/k3-in_tree @@ -1,6 +1,6 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: [0/0] {1} - ¦--expr: [0/0] {3} + °--expr: call( [0/0] {1} + ¦--expr: call [0/0] {3} ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {2} ¦--'(': ( [0/0] {4} °--')': ) [0/0] {5} diff --git a/tests/testthat/spacing/bang_bang_spacing-in_tree b/tests/testthat/spacing/bang_bang_spacing-in_tree index 9d5e9d334..d7f85e501 100644 --- a/tests/testthat/spacing/bang_bang_spacing-in_tree +++ b/tests/testthat/spacing/bang_bang_spacing-in_tree @@ -1,60 +1,60 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} - ¦ ¦--expr: [0/0] {3} + ¦--expr: a(! ! [0/0] {1} + ¦ ¦--expr: a [0/0] {3} ¦ ¦ °--SYMBOL_FUNCTION_CALL: a [0/0] {2} ¦ ¦--'(': ( [0/0] {4} - ¦ ¦--expr: [0/0] {5} + ¦ ¦--expr: ! !!x [0/0] {5} ¦ ¦ ¦--'!': ! [0/1] {6} - ¦ ¦ °--expr: [0/0] {7} + ¦ ¦ °--expr: !!x [0/0] {7} ¦ ¦ ¦--'!': ! [0/0] {8} - ¦ ¦ °--expr: [0/0] {9} + ¦ ¦ °--expr: !x [0/0] {9} ¦ ¦ ¦--'!': ! [0/0] {10} - ¦ ¦ °--expr: [0/0] {12} + ¦ ¦ °--expr: x [0/0] {12} ¦ ¦ °--SYMBOL: x [0/0] {11} ¦ °--')': ) [0/0] {13} - ¦--expr: [1/0] {14} - ¦ ¦--expr: [0/0] {16} + ¦--expr: k(!!g [1/0] {14} + ¦ ¦--expr: k [0/0] {16} ¦ ¦ °--SYMBOL_FUNCTION_CALL: k [0/0] {15} ¦ ¦--'(': ( [0/0] {17} - ¦ ¦--expr: [0/0] {18} + ¦ ¦--expr: !!g [0/0] {18} ¦ ¦ ¦--'!': ! [0/0] {19} - ¦ ¦ °--expr: [0/0] {20} + ¦ ¦ °--expr: !g [0/0] {20} ¦ ¦ ¦--'!': ! [0/0] {21} - ¦ ¦ °--expr: [0/0] {23} + ¦ ¦ °--expr: g [0/0] {23} ¦ ¦ °--SYMBOL: g [0/0] {22} ¦ °--')': ) [0/0] {24} - ¦--expr: [1/0] {25} - ¦ ¦--expr: [0/0] {27} + ¦--expr: a(!!! [1/0] {25} + ¦ ¦--expr: a [0/0] {27} ¦ ¦ °--SYMBOL_FUNCTION_CALL: a [0/0] {26} ¦ ¦--'(': ( [0/0] {28} - ¦ ¦--expr: [0/0] {29} + ¦ ¦--expr: !!!x [0/0] {29} ¦ ¦ ¦--'!': ! [0/0] {30} - ¦ ¦ °--expr: [0/0] {31} + ¦ ¦ °--expr: !!x [0/0] {31} ¦ ¦ ¦--'!': ! [0/0] {32} - ¦ ¦ °--expr: [0/0] {33} + ¦ ¦ °--expr: !x [0/0] {33} ¦ ¦ ¦--'!': ! [0/0] {34} - ¦ ¦ °--expr: [0/0] {36} + ¦ ¦ °--expr: x [0/0] {36} ¦ ¦ °--SYMBOL: x [0/0] {35} ¦ °--')': ) [0/0] {37} - ¦--expr: [1/0] {38} - ¦ ¦--expr: [0/0] {40} + ¦--expr: a(!! [1/0] {38} + ¦ ¦--expr: a [0/0] {40} ¦ ¦ °--SYMBOL_FUNCTION_CALL: a [0/0] {39} ¦ ¦--'(': ( [0/0] {41} - ¦ ¦--expr: [0/0] {42} + ¦ ¦--expr: !! !x [0/0] {42} ¦ ¦ ¦--'!': ! [0/0] {43} - ¦ ¦ °--expr: [0/0] {44} + ¦ ¦ °--expr: ! !x [0/0] {44} ¦ ¦ ¦--'!': ! [0/1] {45} - ¦ ¦ °--expr: [0/0] {46} + ¦ ¦ °--expr: !x [0/0] {46} ¦ ¦ ¦--'!': ! [0/0] {47} - ¦ ¦ °--expr: [0/0] {49} + ¦ ¦ °--expr: x [0/0] {49} ¦ ¦ °--SYMBOL: x [0/0] {48} ¦ °--')': ) [0/0] {50} - °--expr: [1/0] {51} - ¦--expr: [0/0] {53} + °--expr: a(!b) [1/0] {51} + ¦--expr: a [0/0] {53} ¦ °--SYMBOL_FUNCTION_CALL: a [0/0] {52} ¦--'(': ( [0/0] {54} - ¦--expr: [0/0] {55} + ¦--expr: !b [0/0] {55} ¦ ¦--'!': ! [0/0] {56} - ¦ °--expr: [0/0] {58} + ¦ °--expr: b [0/0] {58} ¦ °--SYMBOL: b [0/0] {57} °--')': ) [0/0] {59} diff --git a/tests/testthat/spacing/colons-in_tree b/tests/testthat/spacing/colons-in_tree index e4fda2f6f..74758f9da 100644 --- a/tests/testthat/spacing/colons-in_tree +++ b/tests/testthat/spacing/colons-in_tree @@ -1,45 +1,45 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} - ¦ ¦--expr: [0/1] {3} + ¦--expr: 1 : [0/0] {1} + ¦ ¦--expr: 1 [0/1] {3} ¦ ¦ °--NUM_CONST: 1 [0/0] {2} ¦ ¦--':': : [0/2] {4} - ¦ °--expr: [0/0] {6} + ¦ °--expr: 4 [0/0] {6} ¦ °--NUM_CONST: 4 [0/0] {5} - ¦--expr: [2/0] {7} - ¦ ¦--expr: [0/0] {9} + ¦--expr: 1:4 [2/0] {7} + ¦ ¦--expr: 1 [0/0] {9} ¦ ¦ °--NUM_CONST: 1 [0/0] {8} ¦ ¦--':': : [0/0] {10} - ¦ °--expr: [0/0] {12} + ¦ °--expr: 4 [0/0] {12} ¦ °--NUM_CONST: 4 [0/0] {11} - ¦--expr: [2/0] {13} - ¦ ¦--expr: [0/0] {14} + ¦--expr: base [2/0] {13} + ¦ ¦--expr: base [0/0] {14} ¦ ¦ ¦--SYMBOL_PACKAGE: base [0/1] {15} ¦ ¦ ¦--NS_GET: :: [0/1] {16} ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {17} ¦ ¦--'(': ( [0/0] {18} ¦ °--')': ) [0/0] {19} - ¦--expr: [2/0] {20} - ¦ ¦--expr: [0/0] {21} + ¦--expr: base: [2/0] {20} + ¦ ¦--expr: base: [0/0] {21} ¦ ¦ ¦--SYMBOL_PACKAGE: base [0/0] {22} ¦ ¦ ¦--NS_GET: :: [0/0] {23} ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {24} ¦ ¦--'(': ( [0/0] {25} ¦ °--')': ) [0/0] {26} - ¦--expr: [2/0] {27} - ¦ ¦--expr: [0/0] {28} + ¦--expr: xyz:: [2/0] {27} + ¦ ¦--expr: xyz:: [0/0] {28} ¦ ¦ ¦--SYMBOL_PACKAGE: xyz [0/0] {29} ¦ ¦ ¦--NS_GET_INT: ::: [0/1] {30} ¦ ¦ °--SYMBOL_FUNCTION_CALL: xy [0/0] {31} ¦ ¦--'(': ( [0/0] {32} - ¦ ¦--expr: [0/0] {34} + ¦ ¦--expr: 3 [0/0] {34} ¦ ¦ °--NUM_CONST: 3 [0/0] {33} ¦ °--')': ) [0/0] {35} - °--expr: [2/0] {36} - ¦--expr: [0/0] {37} + °--expr: xyz:: [2/0] {36} + ¦--expr: xyz:: [0/0] {37} ¦ ¦--SYMBOL_PACKAGE: xyz [0/0] {38} ¦ ¦--NS_GET_INT: ::: [0/0] {39} ¦ °--SYMBOL_FUNCTION_CALL: xy [0/0] {40} ¦--'(': ( [0/0] {41} - ¦--expr: [0/0] {43} + ¦--expr: 3 [0/0] {43} ¦ °--NUM_CONST: 3 [0/0] {42} °--')': ) [0/0] {44} diff --git a/tests/testthat/spacing/comments-in_tree b/tests/testthat/spacing/comments-in_tree index 8aa8efeea..78c967bae 100644 --- a/tests/testthat/spacing/comments-in_tree +++ b/tests/testthat/spacing/comments-in_tree @@ -1,13 +1,13 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/1] {2} + ¦--expr: a [0/1] {2} ¦ °--SYMBOL: a [0/0] {1} ¦--COMMENT: # com [0/0] {3} - ¦--expr: [1/1] {5} + ¦--expr: b [1/1] {5} ¦ °--SYMBOL: b [0/0] {4} ¦--COMMENT: #comm [0/0] {6} - ¦--expr: [1/4] {8} + ¦--expr: c [1/4] {8} ¦ °--SYMBOL: c [0/0] {7} ¦--COMMENT: # com [0/0] {9} - ¦--expr: [1/1] {11} + ¦--expr: dejk [1/1] {11} ¦ °--SYMBOL: dejk [0/0] {10} °--COMMENT: #comm [0/0] {12} diff --git a/tests/testthat/spacing/round_curly-in_tree b/tests/testthat/spacing/round_curly-in_tree index 91be49e5b..a54f8736a 100644 --- a/tests/testthat/spacing/round_curly-in_tree +++ b/tests/testthat/spacing/round_curly-in_tree @@ -1,65 +1,71 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} - ¦ ¦--expr: [0/1] {3} + ¦--expr: a <- [0/0] {1} + ¦ ¦--expr: a [0/1] {3} ¦ ¦ °--SYMBOL: a [0/0] {2} ¦ ¦--LEFT_ASSIGN: <- [0/1] {4} - ¦ °--expr: [0/0] {5} + ¦ °--expr: funct [0/0] {5} ¦ ¦--FUNCTION: funct [0/0] {6} ¦ ¦--'(': ( [0/0] {7} ¦ ¦--SYMBOL_FORMALS: x [0/0] {8} ¦ ¦--')': ) [0/0] {9} - ¦ °--expr: [0/0] {10} + ¦ °--expr: { +} [0/0] {10} ¦ ¦--'{': { [0/0] {11} ¦ °--'}': } [1/0] {12} - ¦--expr: [2/0] {13} + ¦--expr: if(a) [2/0] {13} ¦ ¦--IF: if [0/0] {14} ¦ ¦--'(': ( [0/0] {15} - ¦ ¦--expr: [0/0] {17} + ¦ ¦--expr: a [0/0] {17} ¦ ¦ °--SYMBOL: a [0/0] {16} ¦ ¦--')': ) [0/0] {18} - ¦ °--expr: [0/0] {19} + ¦ °--expr: { + 3 [0/0] {19} ¦ ¦--'{': { [0/2] {20} - ¦ ¦--expr: [1/0] {22} + ¦ ¦--expr: 3 [1/0] {22} ¦ ¦ °--NUM_CONST: 3 [0/0] {21} ¦ °--'}': } [1/0] {23} - ¦--expr: [2/0] {24} + ¦--expr: for(i [2/0] {24} ¦ ¦--FOR: for [0/0] {25} - ¦ ¦--forcond: [0/0] {26} + ¦ ¦--forcond: (i in [0/0] {26} ¦ ¦ ¦--'(': ( [0/0] {27} ¦ ¦ ¦--SYMBOL: i [0/1] {28} ¦ ¦ ¦--IN: in [0/1] {29} - ¦ ¦ ¦--expr: [0/0] {31} + ¦ ¦ ¦--expr: 10 [0/0] {31} ¦ ¦ ¦ °--NUM_CONST: 10 [0/0] {30} ¦ ¦ °--')': ) [0/0] {32} - ¦ °--expr: [0/0] {33} + ¦ °--expr: { + i [0/0] {33} ¦ ¦--'{': { [0/2] {34} - ¦ ¦--expr: [1/0] {36} + ¦ ¦--expr: i [1/0] {36} ¦ ¦ °--SYMBOL: i [0/0] {35} ¦ °--'}': } [1/0] {37} - °--expr: [2/0] {38} + °--expr: if(x) [2/0] {38} ¦--IF: if [0/0] {39} ¦--'(': ( [0/0] {40} - ¦--expr: [0/0] {42} + ¦--expr: x [0/0] {42} ¦ °--SYMBOL: x [0/0] {41} ¦--')': ) [0/0] {43} - ¦--expr: [0/0] {44} + ¦--expr: { + y [0/0] {44} ¦ ¦--'{': { [0/2] {45} - ¦ ¦--expr: [1/0] {47} + ¦ ¦--expr: y [1/0] {47} ¦ ¦ °--SYMBOL: y [0/0] {46} ¦ °--'}': } [1/0] {48} ¦--ELSE: else [0/1] {49} - °--expr: [0/0] {50} + °--expr: if(x) [0/0] {50} ¦--IF: if [0/0] {51} ¦--'(': ( [0/0] {52} - ¦--expr: [0/0] {54} + ¦--expr: x [0/0] {54} ¦ °--SYMBOL: x [0/0] {53} ¦--')': ) [0/0] {55} - ¦--expr: [0/1] {56} + ¦--expr: { + x [0/1] {56} ¦ ¦--'{': { [0/2] {57} - ¦ ¦--expr: [1/0] {59} + ¦ ¦--expr: x [1/0] {59} ¦ ¦ °--SYMBOL: x [0/0] {58} ¦ °--'}': } [1/0] {60} ¦--ELSE: else [0/0] {61} - °--expr: [0/0] {62} + °--expr: { +} [0/0] {62} ¦--'{': { [0/0] {63} °--'}': } [1/0] {64} diff --git a/tests/testthat/spacing/spacing-tilde-in_tree b/tests/testthat/spacing/spacing-tilde-in_tree index 14f439e34..b8ac310af 100644 --- a/tests/testthat/spacing/spacing-tilde-in_tree +++ b/tests/testthat/spacing/spacing-tilde-in_tree @@ -1,57 +1,57 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} - ¦ ¦--expr: [0/0] {3} + ¦--expr: a~b [0/0] {1} + ¦ ¦--expr: a [0/0] {3} ¦ ¦ °--SYMBOL: a [0/0] {2} ¦ ¦--'~': ~ [0/0] {4} - ¦ °--expr: [0/0] {6} + ¦ °--expr: b [0/0] {6} ¦ °--SYMBOL: b [0/0] {5} - ¦--expr: [1/0] {7} + ¦--expr: ~b [1/0] {7} ¦ ¦--'~': ~ [0/0] {8} - ¦ °--expr: [0/0] {10} + ¦ °--expr: b [0/0] {10} ¦ °--SYMBOL: b [0/0] {9} - ¦--expr: [1/0] {11} + ¦--expr: ~b+ c [1/0] {11} ¦ ¦--'~': ~ [0/0] {12} - ¦ °--expr: [0/0] {13} - ¦ ¦--expr: [0/0] {15} + ¦ °--expr: b+ c [0/0] {13} + ¦ ¦--expr: b [0/0] {15} ¦ ¦ °--SYMBOL: b [0/0] {14} ¦ ¦--'+': + [0/1] {16} - ¦ °--expr: [0/0] {18} + ¦ °--expr: c [0/0] {18} ¦ °--SYMBOL: c [0/0] {17} - ¦--expr: [1/0] {19} - ¦ ¦--expr: [0/1] {20} - ¦ ¦ ¦--expr: [0/1] {22} + ¦--expr: a + b [1/0] {19} + ¦ ¦--expr: a + b [0/1] {20} + ¦ ¦ ¦--expr: a [0/1] {22} ¦ ¦ ¦ °--SYMBOL: a [0/0] {21} ¦ ¦ ¦--'+': + [0/1] {23} - ¦ ¦ °--expr: [0/0] {25} + ¦ ¦ °--expr: b [0/0] {25} ¦ ¦ °--SYMBOL: b [0/0] {24} ¦ ¦--'~': ~ [0/0] {26} - ¦ °--expr: [0/0] {28} + ¦ °--expr: c [0/0] {28} ¦ °--SYMBOL: c [0/0] {27} - ¦--expr: [2/1] {29} - ¦ ¦--expr: [0/2] {31} + ¦--expr: a ~b [2/1] {29} + ¦ ¦--expr: a [0/2] {31} ¦ ¦ °--SYMBOL: a [0/0] {30} ¦ ¦--'~': ~ [0/0] {32} - ¦ °--expr: [0/0] {34} + ¦ °--expr: b [0/0] {34} ¦ °--SYMBOL: b [0/0] {33} - ¦--expr: [1/0] {35} + ¦--expr: ~b [1/0] {35} ¦ ¦--'~': ~ [0/0] {36} - ¦ °--expr: [0/0] {38} + ¦ °--expr: b [0/0] {38} ¦ °--SYMBOL: b [0/0] {37} - ¦--expr: [1/0] {39} + ¦--expr: ~ b+ [1/0] {39} ¦ ¦--'~': ~ [0/2] {40} - ¦ °--expr: [0/0] {41} - ¦ ¦--expr: [0/0] {43} + ¦ °--expr: b+c [0/0] {41} + ¦ ¦--expr: b [0/0] {43} ¦ ¦ °--SYMBOL: b [0/0] {42} ¦ ¦--'+': + [0/0] {44} - ¦ °--expr: [0/0] {46} + ¦ °--expr: c [0/0] {46} ¦ °--SYMBOL: c [0/0] {45} - °--expr: [1/0] {47} - ¦--expr: [0/0] {48} - ¦ ¦--expr: [0/1] {50} + °--expr: a + b [1/0] {47} + ¦--expr: a + b [0/0] {48} + ¦ ¦--expr: a [0/1] {50} ¦ ¦ °--SYMBOL: a [0/0] {49} ¦ ¦--'+': + [0/1] {51} - ¦ °--expr: [0/0] {53} + ¦ °--expr: b [0/0] {53} ¦ °--SYMBOL: b [0/0] {52} ¦--'~': ~ [0/2] {54} - °--expr: [0/0] {56} + °--expr: c [0/0] {56} °--SYMBOL: c [0/0] {55} diff --git a/tests/testthat/spacing/spacing_comma-in_tree b/tests/testthat/spacing/spacing_comma-in_tree index 2fcee1a47..1276d7301 100644 --- a/tests/testthat/spacing/spacing_comma-in_tree +++ b/tests/testthat/spacing/spacing_comma-in_tree @@ -1,20 +1,20 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: [0/0] {1} - ¦--expr: [0/0] {3} + °--expr: c( [0/0] {1} + ¦--expr: c [0/0] {3} ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {2} ¦--'(': ( [0/4] {4} - ¦--expr: [0/0] {6} + ¦--expr: 1 [0/0] {6} ¦ °--NUM_CONST: 1 [0/0] {5} ¦--',': , [0/7] {7} - ¦--expr: [0/4] {9} + ¦--expr: 16 [0/4] {9} ¦ °--NUM_CONST: 16 [0/0] {8} ¦--',': , [0/1] {10} - ¦--expr: [0/1] {12} + ¦--expr: 333 [0/1] {12} ¦ °--NUM_CONST: 333 [0/0] {11} ¦--',': , [0/1] {13} - ¦--expr: [0/1] {15} + ¦--expr: 33 [0/1] {15} ¦ °--NUM_CONST: 33 [0/0] {14} ¦--',': , [0/2] {16} - ¦--expr: [0/0] {18} + ¦--expr: 1 [0/0] {18} ¦ °--NUM_CONST: 1 [0/0] {17} °--')': ) [0/0] {19} diff --git a/tests/testthat/spacing/spacing_comma2-in_tree b/tests/testthat/spacing/spacing_comma2-in_tree index f06d8a13d..1b7af56ef 100644 --- a/tests/testthat/spacing/spacing_comma2-in_tree +++ b/tests/testthat/spacing/spacing_comma2-in_tree @@ -1,23 +1,23 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} - ¦ ¦--expr: [0/0] {3} + ¦--expr: call( [0/0] {1} + ¦ ¦--expr: call [0/0] {3} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {2} ¦ ¦--'(': ( [0/0] {4} - ¦ ¦--expr: [0/1] {6} + ¦ ¦--expr: arg [0/1] {6} ¦ ¦ °--SYMBOL: arg [0/0] {5} ¦ ¦--',': , [0/0] {7} ¦ ¦--',': , [0/0] {8} - ¦ ¦--expr: [0/0] {10} + ¦ ¦--expr: more_ [0/0] {10} ¦ ¦ °--SYMBOL: more_ [0/0] {9} ¦ °--')': ) [0/0] {11} - °--expr: [1/0] {12} - ¦--expr: [0/0] {14} + °--expr: a[ , [1/0] {12} + ¦--expr: a [0/0] {14} ¦ °--SYMBOL: a [0/0] {13} ¦--'[': [ [0/1] {15} ¦--',': , [0/1] {16} ¦--',': , [0/1] {17} ¦--SYMBOL_SUB: drop [0/1] {18} ¦--EQ_SUB: = [0/1] {19} - ¦--expr: [0/0] {21} + ¦--expr: FALSE [0/0] {21} ¦ °--NUM_CONST: FALSE [0/0] {20} °--']': ] [0/0] {22} diff --git a/tests/testthat/spacing/spacing_function-in_tree b/tests/testthat/spacing/spacing_function-in_tree index 451713d0b..bebe6be90 100644 --- a/tests/testthat/spacing/spacing_function-in_tree +++ b/tests/testthat/spacing/spacing_function-in_tree @@ -1,5 +1,5 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: [0/0] {1} + °--expr: funct [0/0] {1} ¦--FUNCTION: funct [0/2] {2} ¦--'(': ( [0/0] {3} ¦--SYMBOL_FORMALS: x [0/0] {4} @@ -8,12 +8,13 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--',': , [0/1] {7} ¦--SYMBOL_FORMALS: z [0/0] {8} ¦--')': ) [0/1] {9} - °--expr: [0/0] {10} + °--expr: { + 3 [0/0] {10} ¦--'{': { [0/2] {11} - ¦--expr: [1/0] {12} - ¦ ¦--expr: [0/1] {14} + ¦--expr: 3 + 1 [1/0] {12} + ¦ ¦--expr: 3 [0/1] {14} ¦ ¦ °--NUM_CONST: 3 [0/0] {13} ¦ ¦--'+': + [0/1] {15} - ¦ °--expr: [0/0] {17} + ¦ °--expr: 1 [0/0] {17} ¦ °--NUM_CONST: 1 [0/0] {16} °--'}': } [1/0] {18} diff --git a/tests/testthat/spacing/spacing_if-in_tree b/tests/testthat/spacing/spacing_if-in_tree index db33c3464..4e4325d2e 100644 --- a/tests/testthat/spacing/spacing_if-in_tree +++ b/tests/testthat/spacing/spacing_if-in_tree @@ -1,12 +1,12 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: [0/0] {1} + °--expr: if(TR [0/0] {1} ¦--IF: if [0/0] {2} ¦--'(': ( [0/0] {3} - ¦--expr: [0/0] {5} + ¦--expr: TRUE [0/0] {5} ¦ °--NUM_CONST: TRUE [0/0] {4} ¦--')': ) [0/1] {6} - ¦--expr: [0/1] {8} + ¦--expr: x [0/1] {8} ¦ °--SYMBOL: x [0/0] {7} ¦--ELSE: else [0/1] {9} - °--expr: [0/0] {11} + °--expr: y [0/0] {11} °--SYMBOL: y [0/0] {10} diff --git a/tests/testthat/spacing/spacing_in-in_tree b/tests/testthat/spacing/spacing_in-in_tree index a3d8f1cfc..380ead73e 100644 --- a/tests/testthat/spacing/spacing_in-in_tree +++ b/tests/testthat/spacing/spacing_in-in_tree @@ -1,12 +1,12 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: [0/0] {1} + °--expr: for ( [0/0] {1} ¦--FOR: for [0/1] {2} - ¦--forcond: [0/1] {3} + ¦--forcond: (i [0/1] {3} ¦ ¦--'(': ( [0/0] {4} ¦ ¦--SYMBOL: i [0/5] {5} ¦ ¦--IN: in [0/5] {6} - ¦ ¦--expr: [0/0] {8} + ¦ ¦--expr: 3 [0/0] {8} ¦ ¦ °--NUM_CONST: 3 [0/0] {7} ¦ °--')': ) [0/0] {9} - °--expr: [0/0] {11} + °--expr: 3 [0/0] {11} °--NUM_CONST: 3 [0/0] {10} diff --git a/tests/testthat/start_line/comment-in_tree b/tests/testthat/start_line/comment-in_tree index ba6b6b8f4..32d1dfd9d 100644 --- a/tests/testthat/start_line/comment-in_tree +++ b/tests/testthat/start_line/comment-in_tree @@ -1,16 +1,17 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--COMMENT: # a c [0/0] {1} - °--expr: [1/0] {2} - ¦--expr: [0/1] {4} + °--expr: a <- [1/0] {2} + ¦--expr: a [0/1] {4} ¦ °--SYMBOL: a [0/0] {3} ¦--LEFT_ASSIGN: <- [0/1] {5} - °--expr: [0/0] {6} + °--expr: funct [0/0] {6} ¦--FUNCTION: funct [0/0] {7} ¦--'(': ( [0/0] {8} ¦--SYMBOL_FORMALS: x [0/0] {9} ¦--')': ) [0/1] {10} - °--expr: [0/0] {11} + °--expr: { + x [0/0] {11} ¦--'{': { [0/2] {12} - ¦--expr: [1/0] {14} + ¦--expr: x [1/0] {14} ¦ °--SYMBOL: x [0/0] {13} °--'}': } [1/0] {15} diff --git a/tests/testthat/start_line/no_comment-in_tree b/tests/testthat/start_line/no_comment-in_tree index 05348a46a..d10990f55 100644 --- a/tests/testthat/start_line/no_comment-in_tree +++ b/tests/testthat/start_line/no_comment-in_tree @@ -1,15 +1,16 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: [0/0] {1} - ¦--expr: [0/1] {3} + °--expr: a <- [0/0] {1} + ¦--expr: a [0/1] {3} ¦ °--SYMBOL: a [0/0] {2} ¦--LEFT_ASSIGN: <- [0/1] {4} - °--expr: [0/0] {5} + °--expr: funct [0/0] {5} ¦--FUNCTION: funct [0/0] {6} ¦--'(': ( [0/0] {7} ¦--SYMBOL_FORMALS: x [0/0] {8} ¦--')': ) [0/1] {9} - °--expr: [0/0] {10} + °--expr: { + x [0/0] {10} ¦--'{': { [0/2] {11} - ¦--expr: [1/0] {13} + ¦--expr: x [1/0] {13} ¦ °--SYMBOL: x [0/0] {12} °--'}': } [1/0] {14} diff --git a/tests/testthat/strict/eof-in_tree b/tests/testthat/strict/eof-in_tree index 6a99e26d0..a95a7929c 100644 --- a/tests/testthat/strict/eof-in_tree +++ b/tests/testthat/strict/eof-in_tree @@ -1,3 +1,3 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: [0/0] {2} + °--expr: blabl [0/0] {2} °--SYMBOL: blabl [0/0] {1} diff --git a/tests/testthat/strict/eol-in_tree b/tests/testthat/strict/eol-in_tree index 949dea22a..fd1fd103d 100644 --- a/tests/testthat/strict/eol-in_tree +++ b/tests/testthat/strict/eol-in_tree @@ -1,9 +1,9 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} - ¦ ¦--expr: [0/0] {3} + ¦--expr: a() [0/0] {1} + ¦ ¦--expr: a [0/0] {3} ¦ ¦ °--SYMBOL_FUNCTION_CALL: a [0/0] {2} ¦ ¦--'(': ( [0/0] {4} ¦ °--')': ) [0/0] {5} - ¦--expr: [1/1] {7} + ¦--expr: b [1/1] {7} ¦ °--SYMBOL: b [0/0] {6} °--COMMENT: # com [0/0] {8} diff --git a/tests/testthat/strict/non_strict-in_tree b/tests/testthat/strict/non_strict-in_tree index d5d324bd2..0b952034e 100644 --- a/tests/testthat/strict/non_strict-in_tree +++ b/tests/testthat/strict/non_strict-in_tree @@ -1,752 +1,765 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} - ¦ ¦--expr: [0/1] {3} + ¦--expr: test [0/0] {1} + ¦ ¦--expr: test [0/1] {3} ¦ ¦ °--SYMBOL: test [0/0] {2} ¦ ¦--LEFT_ASSIGN: <- [0/1] {4} - ¦ °--expr: [0/0] {5} + ¦ °--expr: funct [0/0] {5} ¦ ¦--FUNCTION: funct [0/0] {6} ¦ ¦--'(': ( [0/0] {7} ¦ ¦--')': ) [0/1] {8} - ¦ °--expr: [0/0] {9} + ¦ °--expr: { + " [0/0] {9} ¦ ¦--'{': { [0/2] {10} - ¦ ¦--expr: [1/2] {12} + ¦ ¦--expr: "Doub [1/2] {12} ¦ ¦ °--STR_CONST: "Doub [0/0] {11} - ¦ ¦--expr: [1/2] {14} + ¦ ¦--expr: 'Sing [1/2] {14} ¦ ¦ °--STR_CONST: 'Sing [0/0] {13} - ¦ ¦--expr: [1/2] {16} + ¦ ¦--expr: 'even [1/2] {16} ¦ ¦ °--STR_CONST: 'even [0/0] {15} - ¦ ¦--expr: [1/2] {18} + ¦ ¦--expr: 'but [1/2] {18} ¦ ¦ °--STR_CONST: 'but [0/0] {17} - ¦ ¦--expr: [2/2] {20} + ¦ ¦--expr: "mult [2/2] {20} ¦ ¦ °--STR_CONST: "mult [0/0] {19} - ¦ ¦--expr: [2/2] {22} + ¦ ¦--expr: 'That [2/2] {22} ¦ ¦ °--STR_CONST: 'That [0/0] {21} - ¦ ¦--expr: [2/2] {24} + ¦ ¦--expr: 'stri [2/2] {24} ¦ ¦ °--STR_CONST: 'stri [0/0] {23} - ¦ ¦--expr: [2/2] {26} + ¦ ¦--expr: '\\' [2/2] {26} ¦ ¦ °--STR_CONST: '\\' [0/0] {25} - ¦ ¦--expr: [1/2] {28} + ¦ ¦--expr: '\\\' [1/2] {28} ¦ ¦ °--STR_CONST: '\\\' [0/0] {27} - ¦ ¦--expr: [1/2] {30} + ¦ ¦--expr: '\\\\ [1/2] {30} ¦ ¦ °--STR_CONST: '\\\\ [0/0] {29} - ¦ ¦--expr: [1/2] {32} + ¦ ¦--expr: '\\\\ [1/2] {32} ¦ ¦ °--STR_CONST: '\\\\ [0/0] {31} - ¦ ¦--expr: [1/2] {34} + ¦ ¦--expr: '\'\\ [1/2] {34} ¦ ¦ °--STR_CONST: '\'\\ [0/0] {33} ¦ ¦--COMMENT: # Com [2/2] {35} - ¦ ¦--expr: [2/2] {36} - ¦ ¦ ¦--expr: [0/0] {38} + ¦ ¦--expr: funct [2/2] {36} + ¦ ¦ ¦--expr: funct [0/0] {38} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: funct [0/0] {37} ¦ ¦ ¦--'(': ( [0/0] {39} ¦ ¦ ¦--SYMBOL_SUB: get_s [0/0] {40} ¦ ¦ ¦--EQ_SUB: = [0/0] {41} - ¦ ¦ ¦--expr: [0/0] {43} + ¦ ¦ ¦--expr: aroun [0/0] {43} ¦ ¦ ¦ °--SYMBOL: aroun [0/0] {42} ¦ ¦ °--')': ) [0/0] {44} - ¦ ¦--expr: [2/2] {45} - ¦ ¦ ¦--expr: [0/0] {47} + ¦ ¦--expr: no_sp [2/2] {45} + ¦ ¦ ¦--expr: no_sp [0/0] {47} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: no_sp [0/0] {46} ¦ ¦ ¦--'(': ( [0/1] {48} - ¦ ¦ ¦--expr: [0/0] {49} - ¦ ¦ ¦ ¦--expr: [0/0] {51} + ¦ ¦ ¦--expr: after [0/0] {49} + ¦ ¦ ¦ ¦--expr: after [0/0] {51} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: after [0/0] {50} ¦ ¦ ¦ ¦--'(': ( [0/1] {52} ¦ ¦ ¦ °--')': ) [0/0] {53} ¦ ¦ ¦--',': , [0/1] {54} - ¦ ¦ ¦--expr: [0/0] {55} - ¦ ¦ ¦ ¦--expr: [0/0] {57} + ¦ ¦ ¦--expr: paren [0/0] {55} + ¦ ¦ ¦ ¦--expr: paren [0/0] {57} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: paren [0/0] {56} ¦ ¦ ¦ ¦--'(': ( [0/1] {58} - ¦ ¦ ¦ ¦--expr: [0/0] {59} + ¦ ¦ ¦ ¦--expr: (1 + [0/0] {59} ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {60} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {61} - ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/1] {63} + ¦ ¦ ¦ ¦ ¦--expr: 1 + 2 [0/0] {61} + ¦ ¦ ¦ ¦ ¦ ¦--expr: 1 [0/1] {63} ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {62} ¦ ¦ ¦ ¦ ¦ ¦--'+': + [0/1] {64} - ¦ ¦ ¦ ¦ ¦ °--expr: [0/0] {66} + ¦ ¦ ¦ ¦ ¦ °--expr: 2 [0/0] {66} ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {65} ¦ ¦ ¦ ¦ °--')': ) [0/0] {67} ¦ ¦ ¦ °--')': ) [0/0] {68} ¦ ¦ °--')': ) [0/0] {69} - ¦ ¦--expr: [1/2] {70} - ¦ ¦ ¦--expr: [0/1] {72} + ¦ ¦--expr: no_sp [1/2] {70} + ¦ ¦ ¦--expr: no_sp [0/1] {72} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: no_sp [0/0] {71} ¦ ¦ ¦--'(': ( [0/0] {73} - ¦ ¦ ¦--expr: [0/0] {74} - ¦ ¦ ¦ ¦--expr: [0/1] {76} + ¦ ¦ ¦--expr: befor [0/0] {74} + ¦ ¦ ¦ ¦--expr: befor [0/1] {76} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: befor [0/0] {75} ¦ ¦ ¦ ¦--'(': ( [0/0] {77} ¦ ¦ ¦ °--')': ) [0/0] {78} ¦ ¦ ¦--',': , [0/1] {79} - ¦ ¦ ¦--expr: [0/0] {80} - ¦ ¦ ¦ ¦--expr: [0/1] {82} + ¦ ¦ ¦--expr: paren [0/0] {80} + ¦ ¦ ¦ ¦--expr: paren [0/1] {82} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: paren [0/0] {81} ¦ ¦ ¦ ¦--'(': ( [0/1] {83} - ¦ ¦ ¦ ¦--expr: [0/0] {84} + ¦ ¦ ¦ ¦--expr: (1 + [0/0] {84} ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {85} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {86} - ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/1] {88} + ¦ ¦ ¦ ¦ ¦--expr: 1 + 2 [0/0] {86} + ¦ ¦ ¦ ¦ ¦ ¦--expr: 1 [0/1] {88} ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {87} ¦ ¦ ¦ ¦ ¦ ¦--'+': + [0/1] {89} - ¦ ¦ ¦ ¦ ¦ °--expr: [0/0] {91} + ¦ ¦ ¦ ¦ ¦ °--expr: 2 [0/0] {91} ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {90} ¦ ¦ ¦ ¦ °--')': ) [0/0] {92} ¦ ¦ ¦ °--')': ) [0/0] {93} ¦ ¦ °--')': ) [0/0] {94} - ¦ ¦--expr: [1/2] {95} - ¦ ¦ ¦--expr: [0/0] {97} + ¦ ¦--expr: no_sp [1/2] {95} + ¦ ¦ ¦--expr: no_sp [0/0] {97} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: no_sp [0/0] {96} ¦ ¦ ¦--'(': ( [0/0] {98} - ¦ ¦ ¦--expr: [0/0] {99} - ¦ ¦ ¦ ¦--expr: [0/0] {101} + ¦ ¦ ¦--expr: befor [0/0] {99} + ¦ ¦ ¦ ¦--expr: befor [0/0] {101} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: befor [0/0] {100} ¦ ¦ ¦ ¦--'(': ( [0/0] {102} - ¦ ¦ ¦ ¦--expr: [0/1] {104} + ¦ ¦ ¦ ¦--expr: closi [0/1] {104} ¦ ¦ ¦ ¦ °--SYMBOL: closi [0/0] {103} ¦ ¦ ¦ °--')': ) [0/0] {105} ¦ ¦ ¦--',': , [0/1] {106} - ¦ ¦ ¦--expr: [0/1] {107} - ¦ ¦ ¦ ¦--expr: [0/0] {109} + ¦ ¦ ¦--expr: paren [0/1] {107} + ¦ ¦ ¦ ¦--expr: paren [0/0] {109} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: paren [0/0] {108} ¦ ¦ ¦ ¦--'(': ( [0/0] {110} - ¦ ¦ ¦ ¦--expr: [0/1] {111} + ¦ ¦ ¦ ¦--expr: (1 + [0/1] {111} ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {112} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {113} - ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/1] {115} + ¦ ¦ ¦ ¦ ¦--expr: 1 + 2 [0/0] {113} + ¦ ¦ ¦ ¦ ¦ ¦--expr: 1 [0/1] {115} ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {114} ¦ ¦ ¦ ¦ ¦ ¦--'+': + [0/1] {116} - ¦ ¦ ¦ ¦ ¦ °--expr: [0/0] {118} + ¦ ¦ ¦ ¦ ¦ °--expr: 2 [0/0] {118} ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {117} ¦ ¦ ¦ ¦ °--')': ) [0/0] {119} ¦ ¦ ¦ °--')': ) [0/0] {120} ¦ ¦ °--')': ) [0/0] {121} - ¦ ¦--expr: [1/2] {122} - ¦ ¦ ¦--expr: [0/0] {124} + ¦ ¦--expr: multi [1/2] {122} + ¦ ¦ ¦--expr: multi [0/0] {124} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: multi [0/0] {123} ¦ ¦ ¦--'(': ( [0/4] {125} - ¦ ¦ ¦--expr: [1/0] {127} + ¦ ¦ ¦--expr: line [1/0] {127} ¦ ¦ ¦ °--SYMBOL: line [0/0] {126} ¦ ¦ ¦--',': , [0/4] {128} - ¦ ¦ ¦--expr: [1/2] {130} + ¦ ¦ ¦--expr: call [1/2] {130} ¦ ¦ ¦ °--SYMBOL: call [0/0] {129} ¦ ¦ °--')': ) [1/0] {131} - ¦ ¦--expr: [1/2] {132} - ¦ ¦ ¦--expr: [0/0] {134} + ¦ ¦--expr: multi [1/2] {132} + ¦ ¦ ¦--expr: multi [0/0] {134} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: multi [0/0] {133} ¦ ¦ ¦--'(': ( [0/2] {135} ¦ ¦ °--')': ) [1/0] {136} - ¦ ¦--expr: [2/2] {137} - ¦ ¦ ¦--expr: [0/0] {139} + ¦ ¦--expr: one_s [2/2] {137} + ¦ ¦ ¦--expr: one_s [0/0] {139} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: one_s [0/0] {138} ¦ ¦ ¦--'(': ( [0/0] {140} - ¦ ¦ ¦--expr: [0/0] {142} + ¦ ¦ ¦--expr: after [0/0] {142} ¦ ¦ ¦ °--SYMBOL: after [0/0] {141} ¦ ¦ ¦--',': , [0/0] {143} - ¦ ¦ ¦--expr: [0/0] {144} - ¦ ¦ ¦ ¦--expr: [0/0] {146} + ¦ ¦ ¦--expr: comma [0/0] {144} + ¦ ¦ ¦ ¦--expr: comma [0/0] {146} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: comma [0/0] {145} ¦ ¦ ¦ ¦--'(': ( [0/0] {147} - ¦ ¦ ¦ ¦--expr: [0/0] {149} + ¦ ¦ ¦ ¦--expr: "in" [0/0] {149} ¦ ¦ ¦ ¦ °--STR_CONST: "in" [0/0] {148} ¦ ¦ ¦ ¦--',': , [0/0] {150} - ¦ ¦ ¦ ¦--expr: [0/0] {152} + ¦ ¦ ¦ ¦--expr: "func [0/0] {152} ¦ ¦ ¦ ¦ °--STR_CONST: "func [0/0] {151} ¦ ¦ ¦ ¦--',': , [0/2] {153} - ¦ ¦ ¦ ¦--expr: [0/0] {155} + ¦ ¦ ¦ ¦--expr: args [0/0] {155} ¦ ¦ ¦ ¦ °--SYMBOL: args [0/0] {154} ¦ ¦ ¦ °--')': ) [0/0] {156} ¦ ¦ °--')': ) [0/0] {157} - ¦ ¦--expr: [2/2] {158} + ¦ ¦--expr: { + [2/2] {158} ¦ ¦ ¦--'{': { [0/4] {159} - ¦ ¦ ¦--expr: [1/4] {161} + ¦ ¦ ¦--expr: brace [1/4] {161} ¦ ¦ ¦ °--SYMBOL: brace [0/0] {160} - ¦ ¦ ¦--expr: [1/2] {163} + ¦ ¦ ¦--expr: expre [1/2] {163} ¦ ¦ ¦ °--SYMBOL: expre [0/0] {162} ¦ ¦ °--'}': } [1/0] {164} - ¦ ¦--expr: [2/2] {165} - ¦ ¦ ¦--expr: [0/0] {167} + ¦ ¦--expr: brace [2/2] {165} + ¦ ¦ ¦--expr: brace [0/0] {167} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: brace [0/0] {166} ¦ ¦ ¦--'(': ( [0/0] {168} - ¦ ¦ ¦--expr: [0/0] {170} + ¦ ¦ ¦--expr: "unna [0/0] {170} ¦ ¦ ¦ °--STR_CONST: "unna [0/0] {169} ¦ ¦ ¦--',': , [0/1] {171} - ¦ ¦ ¦--expr: [0/0] {172} + ¦ ¦ ¦--expr: { + [0/0] {172} ¦ ¦ ¦ ¦--'{': { [0/4] {173} - ¦ ¦ ¦ ¦--expr: [1/4] {175} + ¦ ¦ ¦ ¦--expr: "func [1/4] {175} ¦ ¦ ¦ ¦ °--STR_CONST: "func [0/0] {174} - ¦ ¦ ¦ ¦--expr: [1/2] {177} + ¦ ¦ ¦ ¦--expr: call [1/2] {177} ¦ ¦ ¦ ¦ °--SYMBOL: call [0/0] {176} ¦ ¦ ¦ °--'}': } [1/0] {178} ¦ ¦ °--')': ) [0/0] {179} - ¦ ¦--expr: [2/2] {180} - ¦ ¦ ¦--expr: [0/0] {182} + ¦ ¦--expr: brace [2/2] {180} + ¦ ¦ ¦--expr: brace [0/0] {182} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: brace [0/0] {181} ¦ ¦ ¦--'(': ( [0/0] {183} ¦ ¦ ¦--SYMBOL_SUB: named [0/1] {184} ¦ ¦ ¦--EQ_SUB: = [0/1] {185} - ¦ ¦ ¦--expr: [0/0] {186} + ¦ ¦ ¦--expr: { + [0/0] {186} ¦ ¦ ¦ ¦--'{': { [0/4] {187} - ¦ ¦ ¦ ¦--expr: [1/4] {189} + ¦ ¦ ¦ ¦--expr: "func [1/4] {189} ¦ ¦ ¦ ¦ °--STR_CONST: "func [0/0] {188} - ¦ ¦ ¦ ¦--expr: [1/2] {191} + ¦ ¦ ¦ ¦--expr: call [1/2] {191} ¦ ¦ ¦ ¦ °--SYMBOL: call [0/0] {190} ¦ ¦ ¦ °--'}': } [1/0] {192} ¦ ¦ °--')': ) [0/0] {193} - ¦ ¦--expr: [2/2] {194} - ¦ ¦ ¦--expr: [0/0] {196} + ¦ ¦--expr: brace [2/2] {194} + ¦ ¦ ¦--expr: brace [0/0] {196} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: brace [0/0] {195} ¦ ¦ ¦--'(': ( [0/0] {197} - ¦ ¦ ¦--expr: [0/0] {199} + ¦ ¦ ¦--expr: "unna [0/0] {199} ¦ ¦ ¦ °--STR_CONST: "unna [0/0] {198} ¦ ¦ ¦--',': , [0/4] {200} - ¦ ¦ ¦--expr: [0/0] {201} + ¦ ¦ ¦--expr: { + } [0/0] {201} ¦ ¦ ¦ ¦--'{': { [0/2] {202} ¦ ¦ ¦ °--'}': } [1/0] {203} ¦ ¦ °--')': ) [0/0] {204} - ¦ ¦--expr: [2/2] {205} - ¦ ¦ ¦--expr: [0/0] {207} + ¦ ¦--expr: brace [2/2] {205} + ¦ ¦ ¦--expr: brace [0/0] {207} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: brace [0/0] {206} ¦ ¦ ¦--'(': ( [0/0] {208} - ¦ ¦ ¦--expr: [0/0] {210} + ¦ ¦ ¦--expr: "unna [0/0] {210} ¦ ¦ ¦ °--STR_CONST: "unna [0/0] {209} ¦ ¦ ¦--',': , [0/0] {211} - ¦ ¦ ¦--expr: [0/0] {212} + ¦ ¦ ¦--expr: { + } [0/0] {212} ¦ ¦ ¦ ¦--'{': { [0/2] {213} ¦ ¦ ¦ °--'}': } [1/0] {214} ¦ ¦ °--')': ) [0/0] {215} - ¦ ¦--expr: [2/2] {216} - ¦ ¦ ¦--expr: [0/0] {218} + ¦ ¦--expr: brace [2/2] {216} + ¦ ¦ ¦--expr: brace [0/0] {218} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: brace [0/0] {217} ¦ ¦ ¦--'(': ( [0/0] {219} ¦ ¦ ¦--SYMBOL_SUB: named [0/1] {220} ¦ ¦ ¦--EQ_SUB: = [0/4] {221} - ¦ ¦ ¦--expr: [0/0] {222} + ¦ ¦ ¦--expr: { + } [0/0] {222} ¦ ¦ ¦ ¦--'{': { [0/2] {223} ¦ ¦ ¦ °--'}': } [1/0] {224} ¦ ¦ °--')': ) [0/0] {225} - ¦ ¦--expr: [2/2] {226} - ¦ ¦ ¦--expr: [0/0] {228} + ¦ ¦--expr: brace [2/2] {226} + ¦ ¦ ¦--expr: brace [0/0] {228} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: brace [0/0] {227} ¦ ¦ ¦--'(': ( [0/0] {229} ¦ ¦ ¦--SYMBOL_SUB: named [0/1] {230} ¦ ¦ ¦--EQ_SUB: = [0/4] {231} - ¦ ¦ ¦--expr: [0/0] {232} + ¦ ¦ ¦--expr: { + } [0/0] {232} ¦ ¦ ¦ ¦--'{': { [0/2] {233} ¦ ¦ ¦ °--'}': } [1/0] {234} ¦ ¦ °--')': ) [0/0] {235} - ¦ ¦--expr: [2/2] {236} - ¦ ¦ ¦--expr: [0/0] {238} + ¦ ¦--expr: brace [2/2] {236} + ¦ ¦ ¦--expr: brace [0/0] {238} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: brace [0/0] {237} ¦ ¦ ¦--'(': ( [0/2] {239} - ¦ ¦ ¦--expr: [0/0] {240} + ¦ ¦ ¦--expr: { + [0/0] {240} ¦ ¦ ¦ ¦--'{': { [0/4] {241} - ¦ ¦ ¦ ¦--expr: [1/2] {243} + ¦ ¦ ¦ ¦--expr: empty [1/2] {243} ¦ ¦ ¦ ¦ °--SYMBOL: empty [0/0] {242} ¦ ¦ ¦ °--'}': } [1/0] {244} ¦ ¦ °--')': ) [0/0] {245} - ¦ ¦--expr: [2/2] {246} - ¦ ¦ ¦--expr: [0/0] {248} + ¦ ¦--expr: a%/%b [2/2] {246} + ¦ ¦ ¦--expr: a [0/0] {248} ¦ ¦ ¦ °--SYMBOL: a [0/0] {247} ¦ ¦ ¦--SPECIAL-OTHER: %/% [0/0] {249} - ¦ ¦ °--expr: [0/0] {251} + ¦ ¦ °--expr: b [0/0] {251} ¦ ¦ °--SYMBOL: b [0/0] {250} - ¦ ¦--expr: [1/2] {252} - ¦ ¦ ¦--expr: [0/0] {254} + ¦ ¦--expr: a%%b [1/2] {252} + ¦ ¦ ¦--expr: a [0/0] {254} ¦ ¦ ¦ °--SYMBOL: a [0/0] {253} ¦ ¦ ¦--SPECIAL-OTHER: %% [0/0] {255} - ¦ ¦ °--expr: [0/0] {257} + ¦ ¦ °--expr: b [0/0] {257} ¦ ¦ °--SYMBOL: b [0/0] {256} - ¦ ¦--expr: [1/2] {258} - ¦ ¦ ¦--expr: [0/0] {260} + ¦ ¦--expr: a&&b [1/2] {258} + ¦ ¦ ¦--expr: a [0/0] {260} ¦ ¦ ¦ °--SYMBOL: a [0/0] {259} ¦ ¦ ¦--AND2: && [0/0] {261} - ¦ ¦ °--expr: [0/0] {263} + ¦ ¦ °--expr: b [0/0] {263} ¦ ¦ °--SYMBOL: b [0/0] {262} - ¦ ¦--expr: [1/2] {264} - ¦ ¦ ¦--expr: [0/0] {266} + ¦ ¦--expr: a||b [1/2] {264} + ¦ ¦ ¦--expr: a [0/0] {266} ¦ ¦ ¦ °--SYMBOL: a [0/0] {265} ¦ ¦ ¦--OR2: || [0/0] {267} - ¦ ¦ °--expr: [0/0] {269} + ¦ ¦ °--expr: b [0/0] {269} ¦ ¦ °--SYMBOL: b [0/0] {268} - ¦ ¦--expr: [1/2] {270} - ¦ ¦ ¦--expr: [0/0] {272} + ¦ ¦--expr: a==b [1/2] {270} + ¦ ¦ ¦--expr: a [0/0] {272} ¦ ¦ ¦ °--SYMBOL: a [0/0] {271} ¦ ¦ ¦--EQ: == [0/0] {273} - ¦ ¦ °--expr: [0/0] {275} + ¦ ¦ °--expr: b [0/0] {275} ¦ ¦ °--SYMBOL: b [0/0] {274} - ¦ ¦--expr: [1/2] {276} - ¦ ¦ ¦--expr: [0/0] {278} + ¦ ¦--expr: a!=b [1/2] {276} + ¦ ¦ ¦--expr: a [0/0] {278} ¦ ¦ ¦ °--SYMBOL: a [0/0] {277} ¦ ¦ ¦--NE: != [0/0] {279} - ¦ ¦ °--expr: [0/0] {281} + ¦ ¦ °--expr: b [0/0] {281} ¦ ¦ °--SYMBOL: b [0/0] {280} - ¦ ¦--expr: [1/2] {282} - ¦ ¦ ¦--expr: [0/0] {284} + ¦ ¦--expr: a<=b [1/2] {282} + ¦ ¦ ¦--expr: a [0/0] {284} ¦ ¦ ¦ °--SYMBOL: a [0/0] {283} ¦ ¦ ¦--LE: <= [0/0] {285} - ¦ ¦ °--expr: [0/0] {287} + ¦ ¦ °--expr: b [0/0] {287} ¦ ¦ °--SYMBOL: b [0/0] {286} - ¦ ¦--expr: [1/2] {288} - ¦ ¦ ¦--expr: [0/0] {290} + ¦ ¦--expr: a>=b [1/2] {288} + ¦ ¦ ¦--expr: a [0/0] {290} ¦ ¦ ¦ °--SYMBOL: a [0/0] {289} ¦ ¦ ¦--GE: >= [0/0] {291} - ¦ ¦ °--expr: [0/0] {293} + ¦ ¦ °--expr: b [0/0] {293} ¦ ¦ °--SYMBOL: b [0/0] {292} - ¦ ¦--expr: [1/2] {294} - ¦ ¦ ¦--expr: [0/0] {296} + ¦ ¦--expr: a<-b [1/2] {294} + ¦ ¦ ¦--expr: a [0/0] {296} ¦ ¦ ¦ °--SYMBOL: a [0/0] {295} ¦ ¦ ¦--LEFT_ASSIGN: <- [0/0] {297} - ¦ ¦ °--expr: [0/0] {299} + ¦ ¦ °--expr: b [0/0] {299} ¦ ¦ °--SYMBOL: b [0/0] {298} - ¦ ¦--expr: [1/2] {300} - ¦ ¦ ¦--expr: [0/0] {302} + ¦ ¦--expr: a->b [1/2] {300} + ¦ ¦ ¦--expr: a [0/0] {302} ¦ ¦ ¦ °--SYMBOL: a [0/0] {301} ¦ ¦ ¦--RIGHT_ASSIGN: -> [0/0] {303} - ¦ ¦ °--expr: [0/0] {305} + ¦ ¦ °--expr: b [0/0] {305} ¦ ¦ °--SYMBOL: b [0/0] {304} - ¦ ¦--equal_assign: [1/2] {306} - ¦ ¦ ¦--expr: [0/0] {308} + ¦ ¦--equal_assign: a=b [1/2] {306} + ¦ ¦ ¦--expr: a [0/0] {308} ¦ ¦ ¦ °--SYMBOL: a [0/0] {307} ¦ ¦ ¦--EQ_ASSIGN: = [0/0] {309} - ¦ ¦ °--expr: [0/0] {311} + ¦ ¦ °--expr: b [0/0] {311} ¦ ¦ °--SYMBOL: b [0/0] {310} - ¦ ¦--expr: [1/2] {312} - ¦ ¦ ¦--expr: [0/0] {314} + ¦ ¦--expr: ab [1/2] {318} + ¦ ¦ ¦--expr: a [0/0] {320} ¦ ¦ ¦ °--SYMBOL: a [0/0] {319} ¦ ¦ ¦--GT: > [0/0] {321} - ¦ ¦ °--expr: [0/0] {323} + ¦ ¦ °--expr: b [0/0] {323} ¦ ¦ °--SYMBOL: b [0/0] {322} - ¦ ¦--expr: [1/2] {324} - ¦ ¦ ¦--expr: [0/0] {326} + ¦ ¦--expr: a*b [1/2] {324} + ¦ ¦ ¦--expr: a [0/0] {326} ¦ ¦ ¦ °--SYMBOL: a [0/0] {325} ¦ ¦ ¦--'*': * [0/0] {327} - ¦ ¦ °--expr: [0/0] {329} + ¦ ¦ °--expr: b [0/0] {329} ¦ ¦ °--SYMBOL: b [0/0] {328} - ¦ ¦--expr: [1/2] {330} - ¦ ¦ ¦--expr: [0/0] {332} + ¦ ¦--expr: a/b [1/2] {330} + ¦ ¦ ¦--expr: a [0/0] {332} ¦ ¦ ¦ °--SYMBOL: a [0/0] {331} ¦ ¦ ¦--'/': / [0/0] {333} - ¦ ¦ °--expr: [0/0] {335} + ¦ ¦ °--expr: b [0/0] {335} ¦ ¦ °--SYMBOL: b [0/0] {334} - ¦ ¦--expr: [1/2] {336} - ¦ ¦ ¦--expr: [0/0] {338} + ¦ ¦--expr: a^b [1/2] {336} + ¦ ¦ ¦--expr: a [0/0] {338} ¦ ¦ ¦ °--SYMBOL: a [0/0] {337} ¦ ¦ ¦--'^': ^ [0/0] {339} - ¦ ¦ °--expr: [0/0] {341} + ¦ ¦ °--expr: b [0/0] {341} ¦ ¦ °--SYMBOL: b [0/0] {340} - ¦ ¦--expr: [1/2] {342} - ¦ ¦ ¦--expr: [0/0] {344} + ¦ ¦--expr: a&b [1/2] {342} + ¦ ¦ ¦--expr: a [0/0] {344} ¦ ¦ ¦ °--SYMBOL: a [0/0] {343} ¦ ¦ ¦--AND: & [0/0] {345} - ¦ ¦ °--expr: [0/0] {347} + ¦ ¦ °--expr: b [0/0] {347} ¦ ¦ °--SYMBOL: b [0/0] {346} - ¦ ¦--expr: [1/2] {348} - ¦ ¦ ¦--expr: [0/0] {350} + ¦ ¦--expr: a|b [1/2] {348} + ¦ ¦ ¦--expr: a [0/0] {350} ¦ ¦ ¦ °--SYMBOL: a [0/0] {349} ¦ ¦ ¦--OR: | [0/0] {351} - ¦ ¦ °--expr: [0/0] {353} + ¦ ¦ °--expr: b [0/0] {353} ¦ ¦ °--SYMBOL: b [0/0] {352} - ¦ ¦--expr: [1/2] {354} - ¦ ¦ ¦--expr: [0/0] {356} + ¦ ¦--expr: a:=b [1/2] {354} + ¦ ¦ ¦--expr: a [0/0] {356} ¦ ¦ ¦ °--SYMBOL: a [0/0] {355} ¦ ¦ ¦--LEFT_ASSIGN: := [0/0] {357} - ¦ ¦ °--expr: [0/0] {359} + ¦ ¦ °--expr: b [0/0] {359} ¦ ¦ °--SYMBOL: b [0/0] {358} - ¦ ¦--expr: [2/2] {360} - ¦ ¦ ¦--expr: [0/0] {362} + ¦ ¦--expr: a+b [2/2] {360} + ¦ ¦ ¦--expr: a [0/0] {362} ¦ ¦ ¦ °--SYMBOL: a [0/0] {361} ¦ ¦ ¦--'+': + [0/0] {363} - ¦ ¦ °--expr: [0/0] {365} + ¦ ¦ °--expr: b [0/0] {365} ¦ ¦ °--SYMBOL: b [0/0] {364} - ¦ ¦--expr: [1/2] {366} - ¦ ¦ ¦--expr: [0/0] {368} + ¦ ¦--expr: a-b [1/2] {366} + ¦ ¦ ¦--expr: a [0/0] {368} ¦ ¦ ¦ °--SYMBOL: a [0/0] {367} ¦ ¦ ¦--'-': - [0/0] {369} - ¦ ¦ °--expr: [0/0] {371} + ¦ ¦ °--expr: b [0/0] {371} ¦ ¦ °--SYMBOL: b [0/0] {370} - ¦ ¦--expr: [1/2] {372} - ¦ ¦ ¦--expr: [0/0] {374} + ¦ ¦--expr: a++b [1/2] {372} + ¦ ¦ ¦--expr: a [0/0] {374} ¦ ¦ ¦ °--SYMBOL: a [0/0] {373} ¦ ¦ ¦--'+': + [0/0] {375} - ¦ ¦ °--expr: [0/0] {376} + ¦ ¦ °--expr: +b [0/0] {376} ¦ ¦ ¦--'+': + [0/0] {377} - ¦ ¦ °--expr: [0/0] {379} + ¦ ¦ °--expr: b [0/0] {379} ¦ ¦ °--SYMBOL: b [0/0] {378} - ¦ ¦--expr: [1/2] {380} - ¦ ¦ ¦--expr: [0/0] {382} + ¦ ¦--expr: a+-b [1/2] {380} + ¦ ¦ ¦--expr: a [0/0] {382} ¦ ¦ ¦ °--SYMBOL: a [0/0] {381} ¦ ¦ ¦--'+': + [0/0] {383} - ¦ ¦ °--expr: [0/0] {384} + ¦ ¦ °--expr: -b [0/0] {384} ¦ ¦ ¦--'-': - [0/0] {385} - ¦ ¦ °--expr: [0/0] {387} + ¦ ¦ °--expr: b [0/0] {387} ¦ ¦ °--SYMBOL: b [0/0] {386} - ¦ ¦--expr: [1/2] {388} - ¦ ¦ ¦--expr: [0/0] {390} + ¦ ¦--expr: a++b [1/2] {388} + ¦ ¦ ¦--expr: a [0/0] {390} ¦ ¦ ¦ °--SYMBOL: a [0/0] {389} ¦ ¦ ¦--'+': + [0/0] {391} - ¦ ¦ °--expr: [0/0] {392} + ¦ ¦ °--expr: +b [0/0] {392} ¦ ¦ ¦--'+': + [0/0] {393} - ¦ ¦ °--expr: [0/0] {395} + ¦ ¦ °--expr: b [0/0] {395} ¦ ¦ °--SYMBOL: b [0/0] {394} - ¦ ¦--expr: [1/2] {396} - ¦ ¦ ¦--expr: [0/0] {398} + ¦ ¦--expr: a-+b [1/2] {396} + ¦ ¦ ¦--expr: a [0/0] {398} ¦ ¦ ¦ °--SYMBOL: a [0/0] {397} ¦ ¦ ¦--'-': - [0/0] {399} - ¦ ¦ °--expr: [0/0] {400} + ¦ ¦ °--expr: +b [0/0] {400} ¦ ¦ ¦--'+': + [0/0] {401} - ¦ ¦ °--expr: [0/0] {403} + ¦ ¦ °--expr: b [0/0] {403} ¦ ¦ °--SYMBOL: b [0/0] {402} - ¦ ¦--expr: [1/2] {404} - ¦ ¦ ¦--expr: [0/0] {406} + ¦ ¦--expr: a--b [1/2] {404} + ¦ ¦ ¦--expr: a [0/0] {406} ¦ ¦ ¦ °--SYMBOL: a [0/0] {405} ¦ ¦ ¦--'-': - [0/0] {407} - ¦ ¦ °--expr: [0/0] {408} + ¦ ¦ °--expr: -b [0/0] {408} ¦ ¦ ¦--'-': - [0/0] {409} - ¦ ¦ °--expr: [0/0] {411} + ¦ ¦ °--expr: b [0/0] {411} ¦ ¦ °--SYMBOL: b [0/0] {410} - ¦ ¦--expr: [1/2] {412} - ¦ ¦ ¦--expr: [0/0] {414} + ¦ ¦--expr: a+--b [1/2] {412} + ¦ ¦ ¦--expr: a [0/0] {414} ¦ ¦ ¦ °--SYMBOL: a [0/0] {413} ¦ ¦ ¦--'+': + [0/0] {415} - ¦ ¦ °--expr: [0/0] {416} + ¦ ¦ °--expr: --b [0/0] {416} ¦ ¦ ¦--'-': - [0/0] {417} - ¦ ¦ °--expr: [0/0] {418} + ¦ ¦ °--expr: -b [0/0] {418} ¦ ¦ ¦--'-': - [0/0] {419} - ¦ ¦ °--expr: [0/0] {421} + ¦ ¦ °--expr: b [0/0] {421} ¦ ¦ °--SYMBOL: b [0/0] {420} - ¦ ¦--expr: [1/2] {422} - ¦ ¦ ¦--expr: [0/0] {424} + ¦ ¦--expr: a--+b [1/2] {422} + ¦ ¦ ¦--expr: a [0/0] {424} ¦ ¦ ¦ °--SYMBOL: a [0/0] {423} ¦ ¦ ¦--'-': - [0/0] {425} - ¦ ¦ °--expr: [0/0] {426} + ¦ ¦ °--expr: -+b [0/0] {426} ¦ ¦ ¦--'-': - [0/0] {427} - ¦ ¦ °--expr: [0/0] {428} + ¦ ¦ °--expr: +b [0/0] {428} ¦ ¦ ¦--'+': + [0/0] {429} - ¦ ¦ °--expr: [0/0] {431} + ¦ ¦ °--expr: b [0/0] {431} ¦ ¦ °--SYMBOL: b [0/0] {430} - ¦ ¦--expr: [1/2] {432} - ¦ ¦ ¦--expr: [0/0] {434} + ¦ ¦--expr: call( [1/2] {432} + ¦ ¦ ¦--expr: call [0/0] {434} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {433} ¦ ¦ ¦--'(': ( [0/1] {435} - ¦ ¦ ¦--expr: [0/0] {436} + ¦ ¦ ¦--expr: + a [0/0] {436} ¦ ¦ ¦ ¦--'+': + [0/1] {437} - ¦ ¦ ¦ °--expr: [0/0] {439} + ¦ ¦ ¦ °--expr: a [0/0] {439} ¦ ¦ ¦ °--SYMBOL: a [0/0] {438} ¦ ¦ °--')': ) [0/0] {440} - ¦ ¦--expr: [1/2] {441} - ¦ ¦ ¦--expr: [0/0] {443} + ¦ ¦--expr: call( [1/2] {441} + ¦ ¦ ¦--expr: call [0/0] {443} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {442} ¦ ¦ ¦--'(': ( [0/1] {444} - ¦ ¦ ¦--expr: [0/0] {445} + ¦ ¦ ¦--expr: - a [0/0] {445} ¦ ¦ ¦ ¦--'-': - [0/1] {446} - ¦ ¦ ¦ °--expr: [0/0] {448} + ¦ ¦ ¦ °--expr: a [0/0] {448} ¦ ¦ ¦ °--SYMBOL: a [0/0] {447} ¦ ¦ °--')': ) [0/0] {449} - ¦ ¦--expr: [1/2] {450} - ¦ ¦ ¦--expr: [0/0] {452} + ¦ ¦--expr: call( [1/2] {450} + ¦ ¦ ¦--expr: call [0/0] {452} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {451} ¦ ¦ ¦--'(': ( [0/0] {453} - ¦ ¦ ¦--expr: [0/0] {455} + ¦ ¦ ¦--expr: 5 [0/0] {455} ¦ ¦ ¦ °--NUM_CONST: 5 [0/0] {454} ¦ ¦ ¦--',': , [0/1] {456} - ¦ ¦ ¦--expr: [0/0] {457} + ¦ ¦ ¦--expr: + a [0/0] {457} ¦ ¦ ¦ ¦--'+': + [0/1] {458} - ¦ ¦ ¦ °--expr: [0/0] {460} + ¦ ¦ ¦ °--expr: a [0/0] {460} ¦ ¦ ¦ °--SYMBOL: a [0/0] {459} ¦ ¦ °--')': ) [0/0] {461} - ¦ ¦--expr: [1/2] {462} - ¦ ¦ ¦--expr: [0/0] {464} + ¦ ¦--expr: call( [1/2] {462} + ¦ ¦ ¦--expr: call [0/0] {464} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {463} ¦ ¦ ¦--'(': ( [0/0] {465} - ¦ ¦ ¦--expr: [0/0] {467} + ¦ ¦ ¦--expr: 5 [0/0] {467} ¦ ¦ ¦ °--NUM_CONST: 5 [0/0] {466} ¦ ¦ ¦--',': , [0/1] {468} - ¦ ¦ ¦--expr: [0/0] {469} + ¦ ¦ ¦--expr: - a [0/0] {469} ¦ ¦ ¦ ¦--'-': - [0/1] {470} - ¦ ¦ ¦ °--expr: [0/0] {472} + ¦ ¦ ¦ °--expr: a [0/0] {472} ¦ ¦ ¦ °--SYMBOL: a [0/0] {471} ¦ ¦ °--')': ) [0/0] {473} ¦ ¦--COMMENT: # Onl [2/2] {474} - ¦ ¦--expr: [1/2] {475} - ¦ ¦ ¦--expr: [0/0] {477} + ¦ ¦--expr: call( [1/2] {475} + ¦ ¦ ¦--expr: call [0/0] {477} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {476} ¦ ¦ ¦--'(': ( [0/4] {478} - ¦ ¦ ¦--expr: [1/0] {480} + ¦ ¦ ¦--expr: prese [1/0] {480} ¦ ¦ ¦ °--SYMBOL: prese [0/0] {479} ¦ ¦ ¦--',': , [0/1] {481} - ¦ ¦ ¦--expr: [0/0] {483} + ¦ ¦ ¦--expr: dista [0/0] {483} ¦ ¦ ¦ °--SYMBOL: dista [0/0] {482} ¦ ¦ ¦--',': , [0/4] {484} - ¦ ¦ ¦--expr: [1/0] {486} + ¦ ¦ ¦--expr: after [1/0] {486} ¦ ¦ ¦ °--SYMBOL: after [0/0] {485} ¦ ¦ ¦--',': , [0/5] {487} - ¦ ¦ ¦--expr: [0/0] {489} + ¦ ¦ ¦--expr: comma [0/0] {489} ¦ ¦ ¦ °--SYMBOL: comma [0/0] {488} ¦ ¦ ¦--',': , [0/4] {490} - ¦ ¦ ¦--expr: [1/0] {492} + ¦ ¦ ¦--expr: given [1/0] {492} ¦ ¦ ¦ °--SYMBOL: given [0/0] {491} ¦ ¦ ¦--',': , [0/0] {493} - ¦ ¦ ¦--expr: [0/2] {495} + ¦ ¦ ¦--expr: one [0/2] {495} ¦ ¦ ¦ °--SYMBOL: one [0/0] {494} ¦ ¦ °--')': ) [1/0] {496} - ¦ ¦--expr: [2/2] {497} + ¦ ¦--expr: if(TR [2/2] {497} ¦ ¦ ¦--IF: if [0/0] {498} ¦ ¦ ¦--'(': ( [0/0] {499} - ¦ ¦ ¦--expr: [0/0] {501} + ¦ ¦ ¦--expr: TRUE [0/0] {501} ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {500} ¦ ¦ ¦--')': ) [0/0] {502} - ¦ ¦ °--expr: [0/0] {503} + ¦ ¦ °--expr: { + [0/0] {503} ¦ ¦ ¦--'{': { [0/4] {504} - ¦ ¦ ¦--expr: [1/2] {506} + ¦ ¦ ¦--expr: FALSE [1/2] {506} ¦ ¦ ¦ °--NUM_CONST: FALSE [0/0] {505} ¦ ¦ °--'}': } [1/0] {507} - ¦ ¦--expr: [2/2] {508} + ¦ ¦--expr: if(TR [2/2] {508} ¦ ¦ ¦--IF: if [0/0] {509} ¦ ¦ ¦--'(': ( [0/0] {510} - ¦ ¦ ¦--expr: [0/0] {512} + ¦ ¦ ¦--expr: TRUE [0/0] {512} ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {511} ¦ ¦ ¦--')': ) [0/0] {513} - ¦ ¦ ¦--expr: [0/0] {514} + ¦ ¦ ¦--expr: { + [0/0] {514} ¦ ¦ ¦ ¦--'{': { [0/4] {515} - ¦ ¦ ¦ ¦--expr: [1/2] {517} + ¦ ¦ ¦ ¦--expr: FALSE [1/2] {517} ¦ ¦ ¦ ¦ °--NUM_CONST: FALSE [0/0] {516} ¦ ¦ ¦ °--'}': } [1/0] {518} ¦ ¦ ¦--ELSE: else [0/0] {519} - ¦ ¦ °--expr: [0/0] {520} + ¦ ¦ °--expr: { + [0/0] {520} ¦ ¦ ¦--'{': { [0/4] {521} - ¦ ¦ ¦--expr: [1/2] {523} + ¦ ¦ ¦--expr: TRUE [1/2] {523} ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {522} ¦ ¦ °--'}': } [1/0] {524} - ¦ ¦--expr: [2/2] {525} + ¦ ¦--expr: while [2/2] {525} ¦ ¦ ¦--WHILE: while [0/0] {526} ¦ ¦ ¦--'(': ( [0/0] {527} - ¦ ¦ ¦--expr: [0/0] {529} + ¦ ¦ ¦--expr: TRUE [0/0] {529} ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {528} ¦ ¦ ¦--')': ) [0/0] {530} - ¦ ¦ °--expr: [0/0] {531} + ¦ ¦ °--expr: { + [0/0] {531} ¦ ¦ ¦--'{': { [0/4] {532} - ¦ ¦ ¦--expr: [1/2] {534} + ¦ ¦ ¦--expr: FALSE [1/2] {534} ¦ ¦ ¦ °--NUM_CONST: FALSE [0/0] {533} ¦ ¦ °--'}': } [1/0] {535} - ¦ ¦--expr: [2/2] {536} - ¦ ¦ ¦--expr: [0/1] {538} + ¦ ¦--expr: singl [2/2] {536} + ¦ ¦ ¦--expr: singl [0/1] {538} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: singl [0/0] {537} ¦ ¦ ¦--'(': ( [0/1] {539} - ¦ ¦ ¦--expr: [0/1] {541} + ¦ ¦ ¦--expr: "func [0/1] {541} ¦ ¦ ¦ °--STR_CONST: "func [0/0] {540} ¦ ¦ ¦--',': , [0/0] {542} - ¦ ¦ ¦--expr: [0/1] {544} + ¦ ¦ ¦--expr: call [0/1] {544} ¦ ¦ ¦ °--SYMBOL: call [0/0] {543} ¦ ¦ °--')': ) [0/0] {545} - ¦ ¦--expr: [2/2] {546} - ¦ ¦ ¦--expr: [0/1] {548} + ¦ ¦--expr: multi [2/2] {546} + ¦ ¦ ¦--expr: multi [0/1] {548} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: multi [0/0] {547} ¦ ¦ ¦--'(': ( [0/2] {549} - ¦ ¦ ¦--expr: [1/0] {551} + ¦ ¦ ¦--expr: "func [1/0] {551} ¦ ¦ ¦ °--STR_CONST: "func [0/0] {550} ¦ ¦ ¦--',': , [0/1] {552} - ¦ ¦ ¦--expr: [0/1] {554} + ¦ ¦ ¦--expr: call [0/1] {554} ¦ ¦ ¦ °--SYMBOL: call [0/0] {553} ¦ ¦ °--')': ) [0/0] {555} - ¦ ¦--expr: [2/2] {556} - ¦ ¦ ¦--expr: [0/1] {558} + ¦ ¦--expr: neste [2/2] {556} + ¦ ¦ ¦--expr: neste [0/1] {558} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: neste [0/0] {557} ¦ ¦ ¦--'(': ( [0/1] {559} - ¦ ¦ ¦--expr: [0/1] {560} - ¦ ¦ ¦ ¦--expr: [0/1] {562} + ¦ ¦ ¦--expr: funct [0/1] {560} + ¦ ¦ ¦ ¦--expr: funct [0/1] {562} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: funct [0/0] {561} ¦ ¦ ¦ ¦--'(': ( [0/1] {563} - ¦ ¦ ¦ ¦--expr: [0/1] {565} + ¦ ¦ ¦ ¦--expr: "in" [0/1] {565} ¦ ¦ ¦ ¦ °--STR_CONST: "in" [0/0] {564} ¦ ¦ ¦ ¦--',': , [0/0] {566} - ¦ ¦ ¦ ¦--expr: [0/1] {568} + ¦ ¦ ¦ ¦--expr: one [0/1] {568} ¦ ¦ ¦ ¦ °--SYMBOL: one [0/0] {567} ¦ ¦ ¦ ¦--',': , [0/0] {569} - ¦ ¦ ¦ ¦--expr: [0/1] {571} + ¦ ¦ ¦ ¦--expr: line [0/1] {571} ¦ ¦ ¦ ¦ °--SYMBOL: line [0/0] {570} ¦ ¦ ¦ °--')': ) [0/0] {572} ¦ ¦ °--')': ) [0/0] {573} - ¦ ¦--expr: [2/2] {574} - ¦ ¦ ¦--expr: [0/1] {576} + ¦ ¦--expr: neste [2/2] {574} + ¦ ¦ ¦--expr: neste [0/1] {576} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: neste [0/0] {575} ¦ ¦ ¦--'(': ( [0/1] {577} - ¦ ¦ ¦--expr: [0/1] {578} - ¦ ¦ ¦ ¦--expr: [0/1] {580} + ¦ ¦ ¦--expr: funct [0/1] {578} + ¦ ¦ ¦ ¦--expr: funct [0/1] {580} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: funct [0/0] {579} ¦ ¦ ¦ ¦--'(': ( [0/2] {581} - ¦ ¦ ¦ ¦--expr: [1/0] {583} + ¦ ¦ ¦ ¦--expr: "in" [1/0] {583} ¦ ¦ ¦ ¦ °--STR_CONST: "in" [0/0] {582} ¦ ¦ ¦ ¦--',': , [0/6] {584} - ¦ ¦ ¦ ¦--expr: [1/0] {586} + ¦ ¦ ¦ ¦--expr: multi [1/0] {586} ¦ ¦ ¦ ¦ °--SYMBOL: multi [0/0] {585} ¦ ¦ ¦ ¦--',': , [0/0] {587} - ¦ ¦ ¦ ¦--expr: [0/1] {589} + ¦ ¦ ¦ ¦--expr: lines [0/1] {589} ¦ ¦ ¦ ¦ °--SYMBOL: lines [0/0] {588} ¦ ¦ ¦ °--')': ) [0/0] {590} ¦ ¦ °--')': ) [0/0] {591} - ¦ ¦--expr: [2/2] {592} - ¦ ¦ ¦--expr: [0/0] {594} + ¦ ¦--expr: neste [2/2] {592} + ¦ ¦ ¦--expr: neste [0/0] {594} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: neste [0/0] {593} ¦ ¦ ¦--'(': ( [0/2] {595} - ¦ ¦ ¦--expr: [1/0] {596} - ¦ ¦ ¦ ¦--expr: [0/1] {598} + ¦ ¦ ¦--expr: funct [1/0] {596} + ¦ ¦ ¦ ¦--expr: funct [0/1] {598} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: funct [0/0] {597} ¦ ¦ ¦ ¦--'(': ( [0/1] {599} - ¦ ¦ ¦ ¦--expr: [0/1] {601} + ¦ ¦ ¦ ¦--expr: with [0/1] {601} ¦ ¦ ¦ ¦ °--SYMBOL: with [0/0] {600} ¦ ¦ ¦ °--')': ) [0/0] {602} ¦ ¦ ¦--',': , [0/6] {603} - ¦ ¦ ¦--expr: [1/2] {605} + ¦ ¦ ¦--expr: many [1/2] {605} ¦ ¦ ¦ °--SYMBOL: many [0/0] {604} ¦ ¦ ¦--',': , [1/5] {606} - ¦ ¦ ¦--expr: [0/2] {608} + ¦ ¦ ¦--expr: first [0/2] {608} ¦ ¦ ¦ °--SYMBOL: first [0/0] {607} ¦ ¦ °--')': ) [0/0] {609} - ¦ ¦--expr: [2/2] {610} - ¦ ¦ ¦--expr: [0/0] {612} + ¦ ¦--expr: neste [2/2] {610} + ¦ ¦ ¦--expr: neste [0/0] {612} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: neste [0/0] {611} ¦ ¦ ¦--'(': ( [0/4] {613} - ¦ ¦ ¦--expr: [1/0] {614} - ¦ ¦ ¦ ¦--expr: [0/1] {616} + ¦ ¦ ¦--expr: funct [1/0] {614} + ¦ ¦ ¦ ¦--expr: funct [0/1] {616} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: funct [0/0] {615} ¦ ¦ ¦ ¦--'(': ( [0/1] {617} - ¦ ¦ ¦ ¦--expr: [0/1] {619} + ¦ ¦ ¦ ¦--expr: with [0/1] {619} ¦ ¦ ¦ ¦ °--SYMBOL: with [0/0] {618} ¦ ¦ ¦ °--')': ) [0/0] {620} ¦ ¦ ¦--',': , [0/2] {621} ¦ ¦ ¦--COMMENT: # a c [0/4] {622} - ¦ ¦ ¦--expr: [1/1] {624} + ¦ ¦ ¦--expr: many [1/1] {624} ¦ ¦ ¦ °--SYMBOL: many [0/0] {623} ¦ ¦ ¦--COMMENT: #more [0/4] {625} ¦ ¦ ¦--',': , [1/5] {626} - ¦ ¦ ¦--expr: [0/2] {628} + ¦ ¦ ¦--expr: first [0/2] {628} ¦ ¦ ¦ °--SYMBOL: first [0/0] {627} ¦ ¦ °--')': ) [0/0] {629} - ¦ ¦--expr: [2/0] {630} - ¦ ¦ ¦--expr: [0/0] {632} + ¦ ¦--expr: diffi [2/0] {630} + ¦ ¦ ¦--expr: diffi [0/0] {632} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: diffi [0/0] {631} ¦ ¦ ¦--'(': ( [0/0] {633} - ¦ ¦ ¦--expr: [0/0] {634} - ¦ ¦ ¦ ¦--expr: [0/0] {636} + ¦ ¦ ¦--expr: neste [0/0] {634} + ¦ ¦ ¦ ¦--expr: neste [0/0] {636} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: neste [0/0] {635} ¦ ¦ ¦ ¦--'(': ( [0/4] {637} - ¦ ¦ ¦ ¦--expr: [1/0] {639} + ¦ ¦ ¦ ¦--expr: "func [1/0] {639} ¦ ¦ ¦ ¦ °--STR_CONST: "func [0/0] {638} ¦ ¦ ¦ ¦--',': , [0/1] {640} - ¦ ¦ ¦ ¦--expr: [0/2] {642} + ¦ ¦ ¦ ¦--expr: call [0/2] {642} ¦ ¦ ¦ ¦ °--SYMBOL: call [0/0] {641} ¦ ¦ ¦ °--')': ) [1/0] {643} ¦ ¦ ¦--',': , [0/4] {644} - ¦ ¦ ¦--expr: [1/0] {646} + ¦ ¦ ¦--expr: with [1/0] {646} ¦ ¦ ¦ °--SYMBOL: with [0/0] {645} ¦ ¦ ¦--',': , [0/1] {647} - ¦ ¦ ¦--expr: [0/0] {649} + ¦ ¦ ¦--expr: more [0/0] {649} ¦ ¦ ¦ °--SYMBOL: more [0/0] {648} ¦ ¦ ¦--',': , [0/1] {650} - ¦ ¦ ¦--expr: [0/2] {652} + ¦ ¦ ¦--expr: args [0/2] {652} ¦ ¦ ¦ °--SYMBOL: args [0/0] {651} ¦ ¦ °--')': ) [1/0] {653} ¦ °--'}': } [1/0] {654} ¦--COMMENT: # for [3/0] {655} - ¦--expr: [1/0] {656} - ¦ ¦--expr: [0/0] {658} + ¦--expr: lm(a~ [1/0] {656} + ¦ ¦--expr: lm [0/0] {658} ¦ ¦ °--SYMBOL_FUNCTION_CALL: lm [0/0] {657} ¦ ¦--'(': ( [0/0] {659} - ¦ ¦--expr: [0/0] {660} - ¦ ¦ ¦--expr: [0/0] {662} + ¦ ¦--expr: a~b+c [0/0] {660} + ¦ ¦ ¦--expr: a [0/0] {662} ¦ ¦ ¦ °--SYMBOL: a [0/0] {661} ¦ ¦ ¦--'~': ~ [0/0] {663} - ¦ ¦ °--expr: [0/0] {664} - ¦ ¦ ¦--expr: [0/0] {666} + ¦ ¦ °--expr: b+c [0/0] {664} + ¦ ¦ ¦--expr: b [0/0] {666} ¦ ¦ ¦ °--SYMBOL: b [0/0] {665} ¦ ¦ ¦--'+': + [0/0] {667} - ¦ ¦ °--expr: [0/0] {669} + ¦ ¦ °--expr: c [0/0] {669} ¦ ¦ °--SYMBOL: c [0/0] {668} ¦ ¦--',': , [0/0] {670} ¦ ¦--SYMBOL_SUB: data [0/0] {671} ¦ ¦--EQ_SUB: = [0/0] {672} - ¦ ¦--expr: [0/0] {674} + ¦ ¦--expr: NA [0/0] {674} ¦ ¦ °--NUM_CONST: NA [0/0] {673} ¦ °--')': ) [0/0] {675} - ¦--expr: [1/0] {676} - ¦ ¦--expr: [0/0] {678} + ¦--expr: lm(a~ [1/0] {676} + ¦ ¦--expr: lm [0/0] {678} ¦ ¦ °--SYMBOL_FUNCTION_CALL: lm [0/0] {677} ¦ ¦--'(': ( [0/0] {679} - ¦ ¦--expr: [0/0] {680} - ¦ ¦ ¦--expr: [0/0] {682} + ¦ ¦--expr: a~.-1 [0/0] {680} + ¦ ¦ ¦--expr: a [0/0] {682} ¦ ¦ ¦ °--SYMBOL: a [0/0] {681} ¦ ¦ ¦--'~': ~ [0/0] {683} - ¦ ¦ °--expr: [0/0] {684} - ¦ ¦ ¦--expr: [0/0] {686} + ¦ ¦ °--expr: .-1 [0/0] {684} + ¦ ¦ ¦--expr: . [0/0] {686} ¦ ¦ ¦ °--SYMBOL: . [0/0] {685} ¦ ¦ ¦--'-': - [0/0] {687} - ¦ ¦ °--expr: [0/0] {689} + ¦ ¦ °--expr: 1 [0/0] {689} ¦ ¦ °--NUM_CONST: 1 [0/0] {688} ¦ ¦--',': , [0/0] {690} ¦ ¦--SYMBOL_SUB: data [0/0] {691} ¦ ¦--EQ_SUB: = [0/0] {692} - ¦ ¦--expr: [0/0] {694} + ¦ ¦--expr: NA [0/0] {694} ¦ ¦ °--NUM_CONST: NA [0/0] {693} ¦ °--')': ) [0/0] {695} - ¦--expr: [1/0] {696} - ¦ ¦--expr: [0/0] {698} + ¦--expr: a~b:c [1/0] {696} + ¦ ¦--expr: a [0/0] {698} ¦ ¦ °--SYMBOL: a [0/0] {697} ¦ ¦--'~': ~ [0/0] {699} - ¦ °--expr: [0/0] {700} - ¦ ¦--expr: [0/0] {702} + ¦ °--expr: b:c [0/0] {700} + ¦ ¦--expr: b [0/0] {702} ¦ ¦ °--SYMBOL: b [0/0] {701} ¦ ¦--':': : [0/0] {703} - ¦ °--expr: [0/0] {705} + ¦ °--expr: c [0/0] {705} ¦ °--SYMBOL: c [0/0] {704} - ¦--expr: [1/0] {706} - ¦ ¦--expr: [0/0] {708} + ¦--expr: a~b : [1/0] {706} + ¦ ¦--expr: a [0/0] {708} ¦ ¦ °--SYMBOL: a [0/0] {707} ¦ ¦--'~': ~ [0/0] {709} - ¦ °--expr: [0/0] {710} - ¦ ¦--expr: [0/1] {712} + ¦ °--expr: b :c [0/0] {710} + ¦ ¦--expr: b [0/1] {712} ¦ ¦ °--SYMBOL: b [0/0] {711} ¦ ¦--':': : [0/0] {713} - ¦ °--expr: [0/0] {715} + ¦ °--expr: c [0/0] {715} ¦ °--SYMBOL: c [0/0] {714} - ¦--expr: [1/0] {716} - ¦ ¦--expr: [0/3] {718} + ¦--expr: a ~ [1/0] {716} + ¦ ¦--expr: a [0/3] {718} ¦ ¦ °--SYMBOL: a [0/0] {717} ¦ ¦--'~': ~ [0/3] {719} - ¦ °--expr: [0/0] {720} - ¦ ¦--expr: [0/2] {722} + ¦ °--expr: b : [0/0] {720} + ¦ ¦--expr: b [0/2] {722} ¦ ¦ °--SYMBOL: b [0/0] {721} ¦ ¦--':': : [0/1] {723} - ¦ °--expr: [0/0] {725} + ¦ °--expr: c [0/0] {725} ¦ °--SYMBOL: c [0/0] {724} - ¦--expr: [2/0] {726} + ¦--expr: ~ a [2/0] {726} ¦ ¦--'~': ~ [0/3] {727} - ¦ °--expr: [0/0] {729} + ¦ °--expr: a [0/0] {729} ¦ °--SYMBOL: a [0/0] {728} - ¦--expr: [1/0] {730} + ¦--expr: ~gg [1/0] {730} ¦ ¦--'~': ~ [0/0] {731} - ¦ °--expr: [0/0] {733} + ¦ °--expr: gg [0/0] {733} ¦ °--SYMBOL: gg [0/0] {732} - ¦--expr: [1/0] {734} - ¦ ¦--expr: [0/0] {736} + ¦--expr: b~ [1/0] {734} + ¦ ¦--expr: b [0/0] {736} ¦ ¦ °--SYMBOL: b [0/0] {735} ¦ ¦--'~': ~ [0/3] {737} - ¦ °--expr: [0/0] {739} + ¦ °--expr: k [0/0] {739} ¦ °--SYMBOL: k [0/0] {738} - °--expr: [1/0] {740} - ¦--expr: [0/0] {742} + °--expr: call( [1/0] {740} + ¦--expr: call [0/0] {742} ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {741} ¦--'(': ( [0/0] {743} - ¦--expr: [0/0] {745} + ¦--expr: 1 [0/0] {745} ¦ °--NUM_CONST: 1 [0/0] {744} ¦--',': , [0/0] {746} - ¦--expr: [0/0] {747} + ¦--expr: ~ qq [0/0] {747} ¦ ¦--'~': ~ [0/1] {748} - ¦ °--expr: [0/0] {750} + ¦ °--expr: qq [0/0] {750} ¦ °--SYMBOL: qq [0/0] {749} °--')': ) [0/0] {751} diff --git a/tests/testthat/strict/strict-in_tree b/tests/testthat/strict/strict-in_tree index a76ffbd44..a6f0c7299 100644 --- a/tests/testthat/strict/strict-in_tree +++ b/tests/testthat/strict/strict-in_tree @@ -1,736 +1,749 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} - ¦ ¦--expr: [0/1] {3} + ¦--expr: test [0/0] {1} + ¦ ¦--expr: test [0/1] {3} ¦ ¦ °--SYMBOL: test [0/0] {2} ¦ ¦--LEFT_ASSIGN: <- [0/1] {4} - ¦ °--expr: [0/0] {5} + ¦ °--expr: funct [0/0] {5} ¦ ¦--FUNCTION: funct [0/0] {6} ¦ ¦--'(': ( [0/0] {7} ¦ ¦--')': ) [0/1] {8} - ¦ °--expr: [0/0] {9} + ¦ °--expr: { + " [0/0] {9} ¦ ¦--'{': { [0/2] {10} - ¦ ¦--expr: [1/2] {12} + ¦ ¦--expr: "Doub [1/2] {12} ¦ ¦ °--STR_CONST: "Doub [0/0] {11} - ¦ ¦--expr: [1/2] {14} + ¦ ¦--expr: 'Sing [1/2] {14} ¦ ¦ °--STR_CONST: 'Sing [0/0] {13} - ¦ ¦--expr: [1/2] {16} + ¦ ¦--expr: 'even [1/2] {16} ¦ ¦ °--STR_CONST: 'even [0/0] {15} - ¦ ¦--expr: [1/2] {18} + ¦ ¦--expr: 'but [1/2] {18} ¦ ¦ °--STR_CONST: 'but [0/0] {17} ¦ ¦--COMMENT: # Com [2/2] {19} - ¦ ¦--expr: [2/2] {20} - ¦ ¦ ¦--expr: [0/0] {22} + ¦ ¦--expr: funct [2/2] {20} + ¦ ¦ ¦--expr: funct [0/0] {22} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: funct [0/0] {21} ¦ ¦ ¦--'(': ( [0/0] {23} ¦ ¦ ¦--SYMBOL_SUB: get_s [0/0] {24} ¦ ¦ ¦--EQ_SUB: = [0/0] {25} - ¦ ¦ ¦--expr: [0/0] {27} + ¦ ¦ ¦--expr: aroun [0/0] {27} ¦ ¦ ¦ °--SYMBOL: aroun [0/0] {26} ¦ ¦ °--')': ) [0/0] {28} - ¦ ¦--expr: [2/2] {29} - ¦ ¦ ¦--expr: [0/0] {31} + ¦ ¦--expr: no_sp [2/2] {29} + ¦ ¦ ¦--expr: no_sp [0/0] {31} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: no_sp [0/0] {30} ¦ ¦ ¦--'(': ( [0/1] {32} - ¦ ¦ ¦--expr: [0/0] {33} - ¦ ¦ ¦ ¦--expr: [0/0] {35} + ¦ ¦ ¦--expr: after [0/0] {33} + ¦ ¦ ¦ ¦--expr: after [0/0] {35} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: after [0/0] {34} ¦ ¦ ¦ ¦--'(': ( [0/1] {36} ¦ ¦ ¦ °--')': ) [0/0] {37} ¦ ¦ ¦--',': , [0/1] {38} - ¦ ¦ ¦--expr: [0/0] {39} - ¦ ¦ ¦ ¦--expr: [0/0] {41} + ¦ ¦ ¦--expr: paren [0/0] {39} + ¦ ¦ ¦ ¦--expr: paren [0/0] {41} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: paren [0/0] {40} ¦ ¦ ¦ ¦--'(': ( [0/1] {42} - ¦ ¦ ¦ ¦--expr: [0/0] {43} + ¦ ¦ ¦ ¦--expr: (1 + [0/0] {43} ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {44} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {45} - ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/1] {47} + ¦ ¦ ¦ ¦ ¦--expr: 1 + 2 [0/0] {45} + ¦ ¦ ¦ ¦ ¦ ¦--expr: 1 [0/1] {47} ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {46} ¦ ¦ ¦ ¦ ¦ ¦--'+': + [0/1] {48} - ¦ ¦ ¦ ¦ ¦ °--expr: [0/0] {50} + ¦ ¦ ¦ ¦ ¦ °--expr: 2 [0/0] {50} ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {49} ¦ ¦ ¦ ¦ °--')': ) [0/0] {51} ¦ ¦ ¦ °--')': ) [0/0] {52} ¦ ¦ °--')': ) [0/0] {53} - ¦ ¦--expr: [1/2] {54} - ¦ ¦ ¦--expr: [0/1] {56} + ¦ ¦--expr: no_sp [1/2] {54} + ¦ ¦ ¦--expr: no_sp [0/1] {56} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: no_sp [0/0] {55} ¦ ¦ ¦--'(': ( [0/0] {57} - ¦ ¦ ¦--expr: [0/0] {58} - ¦ ¦ ¦ ¦--expr: [0/1] {60} + ¦ ¦ ¦--expr: befor [0/0] {58} + ¦ ¦ ¦ ¦--expr: befor [0/1] {60} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: befor [0/0] {59} ¦ ¦ ¦ ¦--'(': ( [0/0] {61} ¦ ¦ ¦ °--')': ) [0/0] {62} ¦ ¦ ¦--',': , [0/1] {63} - ¦ ¦ ¦--expr: [0/0] {64} - ¦ ¦ ¦ ¦--expr: [0/1] {66} + ¦ ¦ ¦--expr: paren [0/0] {64} + ¦ ¦ ¦ ¦--expr: paren [0/1] {66} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: paren [0/0] {65} ¦ ¦ ¦ ¦--'(': ( [0/1] {67} - ¦ ¦ ¦ ¦--expr: [0/0] {68} + ¦ ¦ ¦ ¦--expr: (1 + [0/0] {68} ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {69} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {70} - ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/1] {72} + ¦ ¦ ¦ ¦ ¦--expr: 1 + 2 [0/0] {70} + ¦ ¦ ¦ ¦ ¦ ¦--expr: 1 [0/1] {72} ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {71} ¦ ¦ ¦ ¦ ¦ ¦--'+': + [0/1] {73} - ¦ ¦ ¦ ¦ ¦ °--expr: [0/0] {75} + ¦ ¦ ¦ ¦ ¦ °--expr: 2 [0/0] {75} ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {74} ¦ ¦ ¦ ¦ °--')': ) [0/0] {76} ¦ ¦ ¦ °--')': ) [0/0] {77} ¦ ¦ °--')': ) [0/0] {78} - ¦ ¦--expr: [1/2] {79} - ¦ ¦ ¦--expr: [0/0] {81} + ¦ ¦--expr: no_sp [1/2] {79} + ¦ ¦ ¦--expr: no_sp [0/0] {81} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: no_sp [0/0] {80} ¦ ¦ ¦--'(': ( [0/0] {82} - ¦ ¦ ¦--expr: [0/0] {83} - ¦ ¦ ¦ ¦--expr: [0/0] {85} + ¦ ¦ ¦--expr: befor [0/0] {83} + ¦ ¦ ¦ ¦--expr: befor [0/0] {85} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: befor [0/0] {84} ¦ ¦ ¦ ¦--'(': ( [0/0] {86} - ¦ ¦ ¦ ¦--expr: [0/1] {88} + ¦ ¦ ¦ ¦--expr: closi [0/1] {88} ¦ ¦ ¦ ¦ °--SYMBOL: closi [0/0] {87} ¦ ¦ ¦ °--')': ) [0/0] {89} ¦ ¦ ¦--',': , [0/1] {90} - ¦ ¦ ¦--expr: [0/1] {91} - ¦ ¦ ¦ ¦--expr: [0/0] {93} + ¦ ¦ ¦--expr: paren [0/1] {91} + ¦ ¦ ¦ ¦--expr: paren [0/0] {93} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: paren [0/0] {92} ¦ ¦ ¦ ¦--'(': ( [0/0] {94} - ¦ ¦ ¦ ¦--expr: [0/1] {95} + ¦ ¦ ¦ ¦--expr: (1 + [0/1] {95} ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {96} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {97} - ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/1] {99} + ¦ ¦ ¦ ¦ ¦--expr: 1 + 2 [0/0] {97} + ¦ ¦ ¦ ¦ ¦ ¦--expr: 1 [0/1] {99} ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {98} ¦ ¦ ¦ ¦ ¦ ¦--'+': + [0/1] {100} - ¦ ¦ ¦ ¦ ¦ °--expr: [0/0] {102} + ¦ ¦ ¦ ¦ ¦ °--expr: 2 [0/0] {102} ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {101} ¦ ¦ ¦ ¦ °--')': ) [0/0] {103} ¦ ¦ ¦ °--')': ) [0/0] {104} ¦ ¦ °--')': ) [0/0] {105} - ¦ ¦--expr: [1/2] {106} - ¦ ¦ ¦--expr: [0/0] {108} + ¦ ¦--expr: multi [1/2] {106} + ¦ ¦ ¦--expr: multi [0/0] {108} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: multi [0/0] {107} ¦ ¦ ¦--'(': ( [0/4] {109} - ¦ ¦ ¦--expr: [1/0] {111} + ¦ ¦ ¦--expr: line [1/0] {111} ¦ ¦ ¦ °--SYMBOL: line [0/0] {110} ¦ ¦ ¦--',': , [0/4] {112} - ¦ ¦ ¦--expr: [1/2] {114} + ¦ ¦ ¦--expr: call [1/2] {114} ¦ ¦ ¦ °--SYMBOL: call [0/0] {113} ¦ ¦ °--')': ) [1/0] {115} - ¦ ¦--expr: [1/2] {116} - ¦ ¦ ¦--expr: [0/0] {118} + ¦ ¦--expr: multi [1/2] {116} + ¦ ¦ ¦--expr: multi [0/0] {118} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: multi [0/0] {117} ¦ ¦ ¦--'(': ( [0/2] {119} ¦ ¦ °--')': ) [1/0] {120} - ¦ ¦--expr: [2/2] {121} - ¦ ¦ ¦--expr: [0/0] {123} + ¦ ¦--expr: one_s [2/2] {121} + ¦ ¦ ¦--expr: one_s [0/0] {123} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: one_s [0/0] {122} ¦ ¦ ¦--'(': ( [0/0] {124} - ¦ ¦ ¦--expr: [0/0] {126} + ¦ ¦ ¦--expr: after [0/0] {126} ¦ ¦ ¦ °--SYMBOL: after [0/0] {125} ¦ ¦ ¦--',': , [0/0] {127} - ¦ ¦ ¦--expr: [0/0] {128} - ¦ ¦ ¦ ¦--expr: [0/0] {130} + ¦ ¦ ¦--expr: comma [0/0] {128} + ¦ ¦ ¦ ¦--expr: comma [0/0] {130} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: comma [0/0] {129} ¦ ¦ ¦ ¦--'(': ( [0/0] {131} - ¦ ¦ ¦ ¦--expr: [0/0] {133} + ¦ ¦ ¦ ¦--expr: "in" [0/0] {133} ¦ ¦ ¦ ¦ °--STR_CONST: "in" [0/0] {132} ¦ ¦ ¦ ¦--',': , [0/0] {134} - ¦ ¦ ¦ ¦--expr: [0/0] {136} + ¦ ¦ ¦ ¦--expr: "func [0/0] {136} ¦ ¦ ¦ ¦ °--STR_CONST: "func [0/0] {135} ¦ ¦ ¦ ¦--',': , [0/2] {137} - ¦ ¦ ¦ ¦--expr: [0/0] {139} + ¦ ¦ ¦ ¦--expr: args [0/0] {139} ¦ ¦ ¦ ¦ °--SYMBOL: args [0/0] {138} ¦ ¦ ¦ °--')': ) [0/0] {140} ¦ ¦ °--')': ) [0/0] {141} - ¦ ¦--expr: [2/2] {142} + ¦ ¦--expr: { + [2/2] {142} ¦ ¦ ¦--'{': { [0/4] {143} - ¦ ¦ ¦--expr: [1/4] {145} + ¦ ¦ ¦--expr: brace [1/4] {145} ¦ ¦ ¦ °--SYMBOL: brace [0/0] {144} - ¦ ¦ ¦--expr: [1/2] {147} + ¦ ¦ ¦--expr: expre [1/2] {147} ¦ ¦ ¦ °--SYMBOL: expre [0/0] {146} ¦ ¦ °--'}': } [1/0] {148} - ¦ ¦--expr: [2/2] {149} - ¦ ¦ ¦--expr: [0/0] {151} + ¦ ¦--expr: brace [2/2] {149} + ¦ ¦ ¦--expr: brace [0/0] {151} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: brace [0/0] {150} ¦ ¦ ¦--'(': ( [0/0] {152} - ¦ ¦ ¦--expr: [0/0] {154} + ¦ ¦ ¦--expr: "unna [0/0] {154} ¦ ¦ ¦ °--STR_CONST: "unna [0/0] {153} ¦ ¦ ¦--',': , [0/1] {155} - ¦ ¦ ¦--expr: [0/0] {156} + ¦ ¦ ¦--expr: { + [0/0] {156} ¦ ¦ ¦ ¦--'{': { [0/4] {157} - ¦ ¦ ¦ ¦--expr: [1/4] {159} + ¦ ¦ ¦ ¦--expr: "func [1/4] {159} ¦ ¦ ¦ ¦ °--STR_CONST: "func [0/0] {158} - ¦ ¦ ¦ ¦--expr: [1/2] {161} + ¦ ¦ ¦ ¦--expr: call [1/2] {161} ¦ ¦ ¦ ¦ °--SYMBOL: call [0/0] {160} ¦ ¦ ¦ °--'}': } [1/0] {162} ¦ ¦ °--')': ) [0/0] {163} - ¦ ¦--expr: [2/2] {164} - ¦ ¦ ¦--expr: [0/0] {166} + ¦ ¦--expr: brace [2/2] {164} + ¦ ¦ ¦--expr: brace [0/0] {166} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: brace [0/0] {165} ¦ ¦ ¦--'(': ( [0/0] {167} ¦ ¦ ¦--SYMBOL_SUB: named [0/1] {168} ¦ ¦ ¦--EQ_SUB: = [0/1] {169} - ¦ ¦ ¦--expr: [0/0] {170} + ¦ ¦ ¦--expr: { + [0/0] {170} ¦ ¦ ¦ ¦--'{': { [0/4] {171} - ¦ ¦ ¦ ¦--expr: [1/4] {173} + ¦ ¦ ¦ ¦--expr: "func [1/4] {173} ¦ ¦ ¦ ¦ °--STR_CONST: "func [0/0] {172} - ¦ ¦ ¦ ¦--expr: [1/2] {175} + ¦ ¦ ¦ ¦--expr: call [1/2] {175} ¦ ¦ ¦ ¦ °--SYMBOL: call [0/0] {174} ¦ ¦ ¦ °--'}': } [1/0] {176} ¦ ¦ °--')': ) [0/0] {177} - ¦ ¦--expr: [2/2] {178} - ¦ ¦ ¦--expr: [0/0] {180} + ¦ ¦--expr: brace [2/2] {178} + ¦ ¦ ¦--expr: brace [0/0] {180} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: brace [0/0] {179} ¦ ¦ ¦--'(': ( [0/0] {181} - ¦ ¦ ¦--expr: [0/0] {183} + ¦ ¦ ¦--expr: "unna [0/0] {183} ¦ ¦ ¦ °--STR_CONST: "unna [0/0] {182} ¦ ¦ ¦--',': , [0/4] {184} - ¦ ¦ ¦--expr: [0/0] {185} + ¦ ¦ ¦--expr: { + } [0/0] {185} ¦ ¦ ¦ ¦--'{': { [0/2] {186} ¦ ¦ ¦ °--'}': } [1/0] {187} ¦ ¦ °--')': ) [0/0] {188} - ¦ ¦--expr: [2/2] {189} - ¦ ¦ ¦--expr: [0/0] {191} + ¦ ¦--expr: brace [2/2] {189} + ¦ ¦ ¦--expr: brace [0/0] {191} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: brace [0/0] {190} ¦ ¦ ¦--'(': ( [0/0] {192} - ¦ ¦ ¦--expr: [0/0] {194} + ¦ ¦ ¦--expr: "unna [0/0] {194} ¦ ¦ ¦ °--STR_CONST: "unna [0/0] {193} ¦ ¦ ¦--',': , [0/0] {195} - ¦ ¦ ¦--expr: [0/0] {196} + ¦ ¦ ¦--expr: { + } [0/0] {196} ¦ ¦ ¦ ¦--'{': { [0/2] {197} ¦ ¦ ¦ °--'}': } [1/0] {198} ¦ ¦ °--')': ) [0/0] {199} - ¦ ¦--expr: [2/2] {200} - ¦ ¦ ¦--expr: [0/0] {202} + ¦ ¦--expr: brace [2/2] {200} + ¦ ¦ ¦--expr: brace [0/0] {202} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: brace [0/0] {201} ¦ ¦ ¦--'(': ( [0/0] {203} ¦ ¦ ¦--SYMBOL_SUB: named [0/1] {204} ¦ ¦ ¦--EQ_SUB: = [0/4] {205} - ¦ ¦ ¦--expr: [0/0] {206} + ¦ ¦ ¦--expr: { + } [0/0] {206} ¦ ¦ ¦ ¦--'{': { [0/2] {207} ¦ ¦ ¦ °--'}': } [1/0] {208} ¦ ¦ °--')': ) [0/0] {209} - ¦ ¦--expr: [2/2] {210} - ¦ ¦ ¦--expr: [0/0] {212} + ¦ ¦--expr: brace [2/2] {210} + ¦ ¦ ¦--expr: brace [0/0] {212} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: brace [0/0] {211} ¦ ¦ ¦--'(': ( [0/0] {213} ¦ ¦ ¦--SYMBOL_SUB: named [0/1] {214} ¦ ¦ ¦--EQ_SUB: = [0/4] {215} - ¦ ¦ ¦--expr: [0/0] {216} + ¦ ¦ ¦--expr: { + } [0/0] {216} ¦ ¦ ¦ ¦--'{': { [0/2] {217} ¦ ¦ ¦ °--'}': } [1/0] {218} ¦ ¦ °--')': ) [0/0] {219} - ¦ ¦--expr: [2/2] {220} - ¦ ¦ ¦--expr: [0/0] {222} + ¦ ¦--expr: brace [2/2] {220} + ¦ ¦ ¦--expr: brace [0/0] {222} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: brace [0/0] {221} ¦ ¦ ¦--'(': ( [0/2] {223} - ¦ ¦ ¦--expr: [0/0] {224} + ¦ ¦ ¦--expr: { + [0/0] {224} ¦ ¦ ¦ ¦--'{': { [0/4] {225} - ¦ ¦ ¦ ¦--expr: [1/2] {227} + ¦ ¦ ¦ ¦--expr: empty [1/2] {227} ¦ ¦ ¦ ¦ °--SYMBOL: empty [0/0] {226} ¦ ¦ ¦ °--'}': } [1/0] {228} ¦ ¦ °--')': ) [0/0] {229} - ¦ ¦--expr: [2/2] {230} - ¦ ¦ ¦--expr: [0/0] {232} + ¦ ¦--expr: a%/%b [2/2] {230} + ¦ ¦ ¦--expr: a [0/0] {232} ¦ ¦ ¦ °--SYMBOL: a [0/0] {231} ¦ ¦ ¦--SPECIAL-OTHER: %/% [0/0] {233} - ¦ ¦ °--expr: [0/0] {235} + ¦ ¦ °--expr: b [0/0] {235} ¦ ¦ °--SYMBOL: b [0/0] {234} - ¦ ¦--expr: [1/2] {236} - ¦ ¦ ¦--expr: [0/0] {238} + ¦ ¦--expr: a%%b [1/2] {236} + ¦ ¦ ¦--expr: a [0/0] {238} ¦ ¦ ¦ °--SYMBOL: a [0/0] {237} ¦ ¦ ¦--SPECIAL-OTHER: %% [0/0] {239} - ¦ ¦ °--expr: [0/0] {241} + ¦ ¦ °--expr: b [0/0] {241} ¦ ¦ °--SYMBOL: b [0/0] {240} - ¦ ¦--expr: [1/2] {242} - ¦ ¦ ¦--expr: [0/0] {244} + ¦ ¦--expr: a&&b [1/2] {242} + ¦ ¦ ¦--expr: a [0/0] {244} ¦ ¦ ¦ °--SYMBOL: a [0/0] {243} ¦ ¦ ¦--AND2: && [0/0] {245} - ¦ ¦ °--expr: [0/0] {247} + ¦ ¦ °--expr: b [0/0] {247} ¦ ¦ °--SYMBOL: b [0/0] {246} - ¦ ¦--expr: [1/2] {248} - ¦ ¦ ¦--expr: [0/0] {250} + ¦ ¦--expr: a||b [1/2] {248} + ¦ ¦ ¦--expr: a [0/0] {250} ¦ ¦ ¦ °--SYMBOL: a [0/0] {249} ¦ ¦ ¦--OR2: || [0/0] {251} - ¦ ¦ °--expr: [0/0] {253} + ¦ ¦ °--expr: b [0/0] {253} ¦ ¦ °--SYMBOL: b [0/0] {252} - ¦ ¦--expr: [1/2] {254} - ¦ ¦ ¦--expr: [0/0] {256} + ¦ ¦--expr: a==b [1/2] {254} + ¦ ¦ ¦--expr: a [0/0] {256} ¦ ¦ ¦ °--SYMBOL: a [0/0] {255} ¦ ¦ ¦--EQ: == [0/0] {257} - ¦ ¦ °--expr: [0/0] {259} + ¦ ¦ °--expr: b [0/0] {259} ¦ ¦ °--SYMBOL: b [0/0] {258} - ¦ ¦--expr: [1/2] {260} - ¦ ¦ ¦--expr: [0/0] {262} + ¦ ¦--expr: a!=b [1/2] {260} + ¦ ¦ ¦--expr: a [0/0] {262} ¦ ¦ ¦ °--SYMBOL: a [0/0] {261} ¦ ¦ ¦--NE: != [0/0] {263} - ¦ ¦ °--expr: [0/0] {265} + ¦ ¦ °--expr: b [0/0] {265} ¦ ¦ °--SYMBOL: b [0/0] {264} - ¦ ¦--expr: [1/2] {266} - ¦ ¦ ¦--expr: [0/0] {268} + ¦ ¦--expr: a<=b [1/2] {266} + ¦ ¦ ¦--expr: a [0/0] {268} ¦ ¦ ¦ °--SYMBOL: a [0/0] {267} ¦ ¦ ¦--LE: <= [0/0] {269} - ¦ ¦ °--expr: [0/0] {271} + ¦ ¦ °--expr: b [0/0] {271} ¦ ¦ °--SYMBOL: b [0/0] {270} - ¦ ¦--expr: [1/2] {272} - ¦ ¦ ¦--expr: [0/0] {274} + ¦ ¦--expr: a>=b [1/2] {272} + ¦ ¦ ¦--expr: a [0/0] {274} ¦ ¦ ¦ °--SYMBOL: a [0/0] {273} ¦ ¦ ¦--GE: >= [0/0] {275} - ¦ ¦ °--expr: [0/0] {277} + ¦ ¦ °--expr: b [0/0] {277} ¦ ¦ °--SYMBOL: b [0/0] {276} - ¦ ¦--expr: [1/2] {278} - ¦ ¦ ¦--expr: [0/0] {280} + ¦ ¦--expr: a<-b [1/2] {278} + ¦ ¦ ¦--expr: a [0/0] {280} ¦ ¦ ¦ °--SYMBOL: a [0/0] {279} ¦ ¦ ¦--LEFT_ASSIGN: <- [0/0] {281} - ¦ ¦ °--expr: [0/0] {283} + ¦ ¦ °--expr: b [0/0] {283} ¦ ¦ °--SYMBOL: b [0/0] {282} - ¦ ¦--expr: [1/2] {284} - ¦ ¦ ¦--expr: [0/0] {286} + ¦ ¦--expr: a->b [1/2] {284} + ¦ ¦ ¦--expr: a [0/0] {286} ¦ ¦ ¦ °--SYMBOL: a [0/0] {285} ¦ ¦ ¦--RIGHT_ASSIGN: -> [0/0] {287} - ¦ ¦ °--expr: [0/0] {289} + ¦ ¦ °--expr: b [0/0] {289} ¦ ¦ °--SYMBOL: b [0/0] {288} - ¦ ¦--equal_assign: [1/2] {290} - ¦ ¦ ¦--expr: [0/0] {292} + ¦ ¦--equal_assign: a=b [1/2] {290} + ¦ ¦ ¦--expr: a [0/0] {292} ¦ ¦ ¦ °--SYMBOL: a [0/0] {291} ¦ ¦ ¦--EQ_ASSIGN: = [0/0] {293} - ¦ ¦ °--expr: [0/0] {295} + ¦ ¦ °--expr: b [0/0] {295} ¦ ¦ °--SYMBOL: b [0/0] {294} - ¦ ¦--expr: [1/2] {296} - ¦ ¦ ¦--expr: [0/0] {298} + ¦ ¦--expr: ab [1/2] {302} + ¦ ¦ ¦--expr: a [0/0] {304} ¦ ¦ ¦ °--SYMBOL: a [0/0] {303} ¦ ¦ ¦--GT: > [0/0] {305} - ¦ ¦ °--expr: [0/0] {307} + ¦ ¦ °--expr: b [0/0] {307} ¦ ¦ °--SYMBOL: b [0/0] {306} - ¦ ¦--expr: [1/2] {308} - ¦ ¦ ¦--expr: [0/0] {310} + ¦ ¦--expr: a*b [1/2] {308} + ¦ ¦ ¦--expr: a [0/0] {310} ¦ ¦ ¦ °--SYMBOL: a [0/0] {309} ¦ ¦ ¦--'*': * [0/0] {311} - ¦ ¦ °--expr: [0/0] {313} + ¦ ¦ °--expr: b [0/0] {313} ¦ ¦ °--SYMBOL: b [0/0] {312} - ¦ ¦--expr: [1/2] {314} - ¦ ¦ ¦--expr: [0/0] {316} + ¦ ¦--expr: a/b [1/2] {314} + ¦ ¦ ¦--expr: a [0/0] {316} ¦ ¦ ¦ °--SYMBOL: a [0/0] {315} ¦ ¦ ¦--'/': / [0/0] {317} - ¦ ¦ °--expr: [0/0] {319} + ¦ ¦ °--expr: b [0/0] {319} ¦ ¦ °--SYMBOL: b [0/0] {318} - ¦ ¦--expr: [1/2] {320} - ¦ ¦ ¦--expr: [0/0] {322} + ¦ ¦--expr: a^b [1/2] {320} + ¦ ¦ ¦--expr: a [0/0] {322} ¦ ¦ ¦ °--SYMBOL: a [0/0] {321} ¦ ¦ ¦--'^': ^ [0/0] {323} - ¦ ¦ °--expr: [0/0] {325} + ¦ ¦ °--expr: b [0/0] {325} ¦ ¦ °--SYMBOL: b [0/0] {324} - ¦ ¦--expr: [1/2] {326} - ¦ ¦ ¦--expr: [0/0] {328} + ¦ ¦--expr: a&b [1/2] {326} + ¦ ¦ ¦--expr: a [0/0] {328} ¦ ¦ ¦ °--SYMBOL: a [0/0] {327} ¦ ¦ ¦--AND: & [0/0] {329} - ¦ ¦ °--expr: [0/0] {331} + ¦ ¦ °--expr: b [0/0] {331} ¦ ¦ °--SYMBOL: b [0/0] {330} - ¦ ¦--expr: [1/2] {332} - ¦ ¦ ¦--expr: [0/0] {334} + ¦ ¦--expr: a|b [1/2] {332} + ¦ ¦ ¦--expr: a [0/0] {334} ¦ ¦ ¦ °--SYMBOL: a [0/0] {333} ¦ ¦ ¦--OR: | [0/0] {335} - ¦ ¦ °--expr: [0/0] {337} + ¦ ¦ °--expr: b [0/0] {337} ¦ ¦ °--SYMBOL: b [0/0] {336} - ¦ ¦--expr: [1/2] {338} - ¦ ¦ ¦--expr: [0/0] {340} + ¦ ¦--expr: a:=b [1/2] {338} + ¦ ¦ ¦--expr: a [0/0] {340} ¦ ¦ ¦ °--SYMBOL: a [0/0] {339} ¦ ¦ ¦--LEFT_ASSIGN: := [0/0] {341} - ¦ ¦ °--expr: [0/0] {343} + ¦ ¦ °--expr: b [0/0] {343} ¦ ¦ °--SYMBOL: b [0/0] {342} - ¦ ¦--expr: [2/2] {344} - ¦ ¦ ¦--expr: [0/0] {346} + ¦ ¦--expr: a+b [2/2] {344} + ¦ ¦ ¦--expr: a [0/0] {346} ¦ ¦ ¦ °--SYMBOL: a [0/0] {345} ¦ ¦ ¦--'+': + [0/0] {347} - ¦ ¦ °--expr: [0/0] {349} + ¦ ¦ °--expr: b [0/0] {349} ¦ ¦ °--SYMBOL: b [0/0] {348} - ¦ ¦--expr: [1/2] {350} - ¦ ¦ ¦--expr: [0/0] {352} + ¦ ¦--expr: a-b [1/2] {350} + ¦ ¦ ¦--expr: a [0/0] {352} ¦ ¦ ¦ °--SYMBOL: a [0/0] {351} ¦ ¦ ¦--'-': - [0/0] {353} - ¦ ¦ °--expr: [0/0] {355} + ¦ ¦ °--expr: b [0/0] {355} ¦ ¦ °--SYMBOL: b [0/0] {354} - ¦ ¦--expr: [1/2] {356} - ¦ ¦ ¦--expr: [0/0] {358} + ¦ ¦--expr: a++b [1/2] {356} + ¦ ¦ ¦--expr: a [0/0] {358} ¦ ¦ ¦ °--SYMBOL: a [0/0] {357} ¦ ¦ ¦--'+': + [0/0] {359} - ¦ ¦ °--expr: [0/0] {360} + ¦ ¦ °--expr: +b [0/0] {360} ¦ ¦ ¦--'+': + [0/0] {361} - ¦ ¦ °--expr: [0/0] {363} + ¦ ¦ °--expr: b [0/0] {363} ¦ ¦ °--SYMBOL: b [0/0] {362} - ¦ ¦--expr: [1/2] {364} - ¦ ¦ ¦--expr: [0/0] {366} + ¦ ¦--expr: a+-b [1/2] {364} + ¦ ¦ ¦--expr: a [0/0] {366} ¦ ¦ ¦ °--SYMBOL: a [0/0] {365} ¦ ¦ ¦--'+': + [0/0] {367} - ¦ ¦ °--expr: [0/0] {368} + ¦ ¦ °--expr: -b [0/0] {368} ¦ ¦ ¦--'-': - [0/0] {369} - ¦ ¦ °--expr: [0/0] {371} + ¦ ¦ °--expr: b [0/0] {371} ¦ ¦ °--SYMBOL: b [0/0] {370} - ¦ ¦--expr: [1/2] {372} - ¦ ¦ ¦--expr: [0/0] {374} + ¦ ¦--expr: a++b [1/2] {372} + ¦ ¦ ¦--expr: a [0/0] {374} ¦ ¦ ¦ °--SYMBOL: a [0/0] {373} ¦ ¦ ¦--'+': + [0/0] {375} - ¦ ¦ °--expr: [0/0] {376} + ¦ ¦ °--expr: +b [0/0] {376} ¦ ¦ ¦--'+': + [0/0] {377} - ¦ ¦ °--expr: [0/0] {379} + ¦ ¦ °--expr: b [0/0] {379} ¦ ¦ °--SYMBOL: b [0/0] {378} - ¦ ¦--expr: [1/2] {380} - ¦ ¦ ¦--expr: [0/0] {382} + ¦ ¦--expr: a-+b [1/2] {380} + ¦ ¦ ¦--expr: a [0/0] {382} ¦ ¦ ¦ °--SYMBOL: a [0/0] {381} ¦ ¦ ¦--'-': - [0/0] {383} - ¦ ¦ °--expr: [0/0] {384} + ¦ ¦ °--expr: +b [0/0] {384} ¦ ¦ ¦--'+': + [0/0] {385} - ¦ ¦ °--expr: [0/0] {387} + ¦ ¦ °--expr: b [0/0] {387} ¦ ¦ °--SYMBOL: b [0/0] {386} - ¦ ¦--expr: [1/2] {388} - ¦ ¦ ¦--expr: [0/0] {390} + ¦ ¦--expr: a--b [1/2] {388} + ¦ ¦ ¦--expr: a [0/0] {390} ¦ ¦ ¦ °--SYMBOL: a [0/0] {389} ¦ ¦ ¦--'-': - [0/0] {391} - ¦ ¦ °--expr: [0/0] {392} + ¦ ¦ °--expr: -b [0/0] {392} ¦ ¦ ¦--'-': - [0/0] {393} - ¦ ¦ °--expr: [0/0] {395} + ¦ ¦ °--expr: b [0/0] {395} ¦ ¦ °--SYMBOL: b [0/0] {394} - ¦ ¦--expr: [1/2] {396} - ¦ ¦ ¦--expr: [0/0] {398} + ¦ ¦--expr: a+--b [1/2] {396} + ¦ ¦ ¦--expr: a [0/0] {398} ¦ ¦ ¦ °--SYMBOL: a [0/0] {397} ¦ ¦ ¦--'+': + [0/0] {399} - ¦ ¦ °--expr: [0/0] {400} + ¦ ¦ °--expr: --b [0/0] {400} ¦ ¦ ¦--'-': - [0/0] {401} - ¦ ¦ °--expr: [0/0] {402} + ¦ ¦ °--expr: -b [0/0] {402} ¦ ¦ ¦--'-': - [0/0] {403} - ¦ ¦ °--expr: [0/0] {405} + ¦ ¦ °--expr: b [0/0] {405} ¦ ¦ °--SYMBOL: b [0/0] {404} - ¦ ¦--expr: [1/2] {406} - ¦ ¦ ¦--expr: [0/0] {408} + ¦ ¦--expr: a--+b [1/2] {406} + ¦ ¦ ¦--expr: a [0/0] {408} ¦ ¦ ¦ °--SYMBOL: a [0/0] {407} ¦ ¦ ¦--'-': - [0/0] {409} - ¦ ¦ °--expr: [0/0] {410} + ¦ ¦ °--expr: -+b [0/0] {410} ¦ ¦ ¦--'-': - [0/0] {411} - ¦ ¦ °--expr: [0/0] {412} + ¦ ¦ °--expr: +b [0/0] {412} ¦ ¦ ¦--'+': + [0/0] {413} - ¦ ¦ °--expr: [0/0] {415} + ¦ ¦ °--expr: b [0/0] {415} ¦ ¦ °--SYMBOL: b [0/0] {414} - ¦ ¦--expr: [1/2] {416} - ¦ ¦ ¦--expr: [0/0] {418} + ¦ ¦--expr: call( [1/2] {416} + ¦ ¦ ¦--expr: call [0/0] {418} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {417} ¦ ¦ ¦--'(': ( [0/1] {419} - ¦ ¦ ¦--expr: [0/0] {420} + ¦ ¦ ¦--expr: + a [0/0] {420} ¦ ¦ ¦ ¦--'+': + [0/1] {421} - ¦ ¦ ¦ °--expr: [0/0] {423} + ¦ ¦ ¦ °--expr: a [0/0] {423} ¦ ¦ ¦ °--SYMBOL: a [0/0] {422} ¦ ¦ °--')': ) [0/0] {424} - ¦ ¦--expr: [1/2] {425} - ¦ ¦ ¦--expr: [0/0] {427} + ¦ ¦--expr: call( [1/2] {425} + ¦ ¦ ¦--expr: call [0/0] {427} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {426} ¦ ¦ ¦--'(': ( [0/1] {428} - ¦ ¦ ¦--expr: [0/0] {429} + ¦ ¦ ¦--expr: - a [0/0] {429} ¦ ¦ ¦ ¦--'-': - [0/1] {430} - ¦ ¦ ¦ °--expr: [0/0] {432} + ¦ ¦ ¦ °--expr: a [0/0] {432} ¦ ¦ ¦ °--SYMBOL: a [0/0] {431} ¦ ¦ °--')': ) [0/0] {433} - ¦ ¦--expr: [1/2] {434} - ¦ ¦ ¦--expr: [0/0] {436} + ¦ ¦--expr: call( [1/2] {434} + ¦ ¦ ¦--expr: call [0/0] {436} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {435} ¦ ¦ ¦--'(': ( [0/0] {437} - ¦ ¦ ¦--expr: [0/0] {439} + ¦ ¦ ¦--expr: 5 [0/0] {439} ¦ ¦ ¦ °--NUM_CONST: 5 [0/0] {438} ¦ ¦ ¦--',': , [0/1] {440} - ¦ ¦ ¦--expr: [0/0] {441} + ¦ ¦ ¦--expr: + a [0/0] {441} ¦ ¦ ¦ ¦--'+': + [0/1] {442} - ¦ ¦ ¦ °--expr: [0/0] {444} + ¦ ¦ ¦ °--expr: a [0/0] {444} ¦ ¦ ¦ °--SYMBOL: a [0/0] {443} ¦ ¦ °--')': ) [0/0] {445} - ¦ ¦--expr: [1/2] {446} - ¦ ¦ ¦--expr: [0/0] {448} + ¦ ¦--expr: call( [1/2] {446} + ¦ ¦ ¦--expr: call [0/0] {448} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {447} ¦ ¦ ¦--'(': ( [0/0] {449} - ¦ ¦ ¦--expr: [0/0] {451} + ¦ ¦ ¦--expr: 5 [0/0] {451} ¦ ¦ ¦ °--NUM_CONST: 5 [0/0] {450} ¦ ¦ ¦--',': , [0/1] {452} - ¦ ¦ ¦--expr: [0/0] {453} + ¦ ¦ ¦--expr: - a [0/0] {453} ¦ ¦ ¦ ¦--'-': - [0/1] {454} - ¦ ¦ ¦ °--expr: [0/0] {456} + ¦ ¦ ¦ °--expr: a [0/0] {456} ¦ ¦ ¦ °--SYMBOL: a [0/0] {455} ¦ ¦ °--')': ) [0/0] {457} ¦ ¦--COMMENT: # Onl [2/2] {458} - ¦ ¦--expr: [1/2] {459} - ¦ ¦ ¦--expr: [0/0] {461} + ¦ ¦--expr: call( [1/2] {459} + ¦ ¦ ¦--expr: call [0/0] {461} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {460} ¦ ¦ ¦--'(': ( [0/4] {462} - ¦ ¦ ¦--expr: [1/0] {464} + ¦ ¦ ¦--expr: prese [1/0] {464} ¦ ¦ ¦ °--SYMBOL: prese [0/0] {463} ¦ ¦ ¦--',': , [0/1] {465} - ¦ ¦ ¦--expr: [0/0] {467} + ¦ ¦ ¦--expr: dista [0/0] {467} ¦ ¦ ¦ °--SYMBOL: dista [0/0] {466} ¦ ¦ ¦--',': , [0/4] {468} - ¦ ¦ ¦--expr: [1/0] {470} + ¦ ¦ ¦--expr: after [1/0] {470} ¦ ¦ ¦ °--SYMBOL: after [0/0] {469} ¦ ¦ ¦--',': , [0/5] {471} - ¦ ¦ ¦--expr: [0/0] {473} + ¦ ¦ ¦--expr: comma [0/0] {473} ¦ ¦ ¦ °--SYMBOL: comma [0/0] {472} ¦ ¦ ¦--',': , [0/4] {474} - ¦ ¦ ¦--expr: [1/0] {476} + ¦ ¦ ¦--expr: given [1/0] {476} ¦ ¦ ¦ °--SYMBOL: given [0/0] {475} ¦ ¦ ¦--',': , [0/0] {477} - ¦ ¦ ¦--expr: [0/2] {479} + ¦ ¦ ¦--expr: one [0/2] {479} ¦ ¦ ¦ °--SYMBOL: one [0/0] {478} ¦ ¦ °--')': ) [1/0] {480} - ¦ ¦--expr: [2/2] {481} + ¦ ¦--expr: if(TR [2/2] {481} ¦ ¦ ¦--IF: if [0/0] {482} ¦ ¦ ¦--'(': ( [0/0] {483} - ¦ ¦ ¦--expr: [0/0] {485} + ¦ ¦ ¦--expr: TRUE [0/0] {485} ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {484} ¦ ¦ ¦--')': ) [0/0] {486} - ¦ ¦ °--expr: [0/0] {487} + ¦ ¦ °--expr: { + [0/0] {487} ¦ ¦ ¦--'{': { [0/4] {488} - ¦ ¦ ¦--expr: [1/2] {490} + ¦ ¦ ¦--expr: FALSE [1/2] {490} ¦ ¦ ¦ °--NUM_CONST: FALSE [0/0] {489} ¦ ¦ °--'}': } [1/0] {491} - ¦ ¦--expr: [2/2] {492} + ¦ ¦--expr: if(TR [2/2] {492} ¦ ¦ ¦--IF: if [0/0] {493} ¦ ¦ ¦--'(': ( [0/0] {494} - ¦ ¦ ¦--expr: [0/0] {496} + ¦ ¦ ¦--expr: TRUE [0/0] {496} ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {495} ¦ ¦ ¦--')': ) [0/0] {497} - ¦ ¦ ¦--expr: [0/0] {498} + ¦ ¦ ¦--expr: { + [0/0] {498} ¦ ¦ ¦ ¦--'{': { [0/4] {499} - ¦ ¦ ¦ ¦--expr: [1/2] {501} + ¦ ¦ ¦ ¦--expr: FALSE [1/2] {501} ¦ ¦ ¦ ¦ °--NUM_CONST: FALSE [0/0] {500} ¦ ¦ ¦ °--'}': } [1/0] {502} ¦ ¦ ¦--ELSE: else [0/0] {503} - ¦ ¦ °--expr: [0/0] {504} + ¦ ¦ °--expr: { + [0/0] {504} ¦ ¦ ¦--'{': { [0/4] {505} - ¦ ¦ ¦--expr: [1/2] {507} + ¦ ¦ ¦--expr: TRUE [1/2] {507} ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {506} ¦ ¦ °--'}': } [1/0] {508} - ¦ ¦--expr: [2/2] {509} + ¦ ¦--expr: while [2/2] {509} ¦ ¦ ¦--WHILE: while [0/0] {510} ¦ ¦ ¦--'(': ( [0/0] {511} - ¦ ¦ ¦--expr: [0/0] {513} + ¦ ¦ ¦--expr: TRUE [0/0] {513} ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {512} ¦ ¦ ¦--')': ) [0/0] {514} - ¦ ¦ °--expr: [0/0] {515} + ¦ ¦ °--expr: { + [0/0] {515} ¦ ¦ ¦--'{': { [0/4] {516} - ¦ ¦ ¦--expr: [1/2] {518} + ¦ ¦ ¦--expr: FALSE [1/2] {518} ¦ ¦ ¦ °--NUM_CONST: FALSE [0/0] {517} ¦ ¦ °--'}': } [1/0] {519} - ¦ ¦--expr: [2/2] {520} - ¦ ¦ ¦--expr: [0/1] {522} + ¦ ¦--expr: singl [2/2] {520} + ¦ ¦ ¦--expr: singl [0/1] {522} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: singl [0/0] {521} ¦ ¦ ¦--'(': ( [0/1] {523} - ¦ ¦ ¦--expr: [0/1] {525} + ¦ ¦ ¦--expr: "func [0/1] {525} ¦ ¦ ¦ °--STR_CONST: "func [0/0] {524} ¦ ¦ ¦--',': , [0/0] {526} - ¦ ¦ ¦--expr: [0/1] {528} + ¦ ¦ ¦--expr: call [0/1] {528} ¦ ¦ ¦ °--SYMBOL: call [0/0] {527} ¦ ¦ °--')': ) [0/0] {529} - ¦ ¦--expr: [2/2] {530} - ¦ ¦ ¦--expr: [0/1] {532} + ¦ ¦--expr: multi [2/2] {530} + ¦ ¦ ¦--expr: multi [0/1] {532} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: multi [0/0] {531} ¦ ¦ ¦--'(': ( [0/2] {533} - ¦ ¦ ¦--expr: [1/0] {535} + ¦ ¦ ¦--expr: "func [1/0] {535} ¦ ¦ ¦ °--STR_CONST: "func [0/0] {534} ¦ ¦ ¦--',': , [0/1] {536} - ¦ ¦ ¦--expr: [0/1] {538} + ¦ ¦ ¦--expr: call [0/1] {538} ¦ ¦ ¦ °--SYMBOL: call [0/0] {537} ¦ ¦ °--')': ) [0/0] {539} - ¦ ¦--expr: [2/2] {540} - ¦ ¦ ¦--expr: [0/1] {542} + ¦ ¦--expr: neste [2/2] {540} + ¦ ¦ ¦--expr: neste [0/1] {542} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: neste [0/0] {541} ¦ ¦ ¦--'(': ( [0/1] {543} - ¦ ¦ ¦--expr: [0/1] {544} - ¦ ¦ ¦ ¦--expr: [0/1] {546} + ¦ ¦ ¦--expr: funct [0/1] {544} + ¦ ¦ ¦ ¦--expr: funct [0/1] {546} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: funct [0/0] {545} ¦ ¦ ¦ ¦--'(': ( [0/1] {547} - ¦ ¦ ¦ ¦--expr: [0/1] {549} + ¦ ¦ ¦ ¦--expr: "in" [0/1] {549} ¦ ¦ ¦ ¦ °--STR_CONST: "in" [0/0] {548} ¦ ¦ ¦ ¦--',': , [0/0] {550} - ¦ ¦ ¦ ¦--expr: [0/1] {552} + ¦ ¦ ¦ ¦--expr: one [0/1] {552} ¦ ¦ ¦ ¦ °--SYMBOL: one [0/0] {551} ¦ ¦ ¦ ¦--',': , [0/0] {553} - ¦ ¦ ¦ ¦--expr: [0/1] {555} + ¦ ¦ ¦ ¦--expr: line [0/1] {555} ¦ ¦ ¦ ¦ °--SYMBOL: line [0/0] {554} ¦ ¦ ¦ °--')': ) [0/0] {556} ¦ ¦ °--')': ) [0/0] {557} - ¦ ¦--expr: [2/2] {558} - ¦ ¦ ¦--expr: [0/1] {560} + ¦ ¦--expr: neste [2/2] {558} + ¦ ¦ ¦--expr: neste [0/1] {560} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: neste [0/0] {559} ¦ ¦ ¦--'(': ( [0/1] {561} - ¦ ¦ ¦--expr: [0/1] {562} - ¦ ¦ ¦ ¦--expr: [0/1] {564} + ¦ ¦ ¦--expr: funct [0/1] {562} + ¦ ¦ ¦ ¦--expr: funct [0/1] {564} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: funct [0/0] {563} ¦ ¦ ¦ ¦--'(': ( [0/2] {565} - ¦ ¦ ¦ ¦--expr: [1/0] {567} + ¦ ¦ ¦ ¦--expr: "in" [1/0] {567} ¦ ¦ ¦ ¦ °--STR_CONST: "in" [0/0] {566} ¦ ¦ ¦ ¦--',': , [0/6] {568} - ¦ ¦ ¦ ¦--expr: [1/0] {570} + ¦ ¦ ¦ ¦--expr: multi [1/0] {570} ¦ ¦ ¦ ¦ °--SYMBOL: multi [0/0] {569} ¦ ¦ ¦ ¦--',': , [0/0] {571} - ¦ ¦ ¦ ¦--expr: [0/1] {573} + ¦ ¦ ¦ ¦--expr: lines [0/1] {573} ¦ ¦ ¦ ¦ °--SYMBOL: lines [0/0] {572} ¦ ¦ ¦ °--')': ) [0/0] {574} ¦ ¦ °--')': ) [0/0] {575} - ¦ ¦--expr: [2/2] {576} - ¦ ¦ ¦--expr: [0/0] {578} + ¦ ¦--expr: neste [2/2] {576} + ¦ ¦ ¦--expr: neste [0/0] {578} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: neste [0/0] {577} ¦ ¦ ¦--'(': ( [0/2] {579} - ¦ ¦ ¦--expr: [1/0] {580} - ¦ ¦ ¦ ¦--expr: [0/1] {582} + ¦ ¦ ¦--expr: funct [1/0] {580} + ¦ ¦ ¦ ¦--expr: funct [0/1] {582} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: funct [0/0] {581} ¦ ¦ ¦ ¦--'(': ( [0/1] {583} - ¦ ¦ ¦ ¦--expr: [0/1] {585} + ¦ ¦ ¦ ¦--expr: with [0/1] {585} ¦ ¦ ¦ ¦ °--SYMBOL: with [0/0] {584} ¦ ¦ ¦ °--')': ) [0/0] {586} ¦ ¦ ¦--',': , [0/6] {587} - ¦ ¦ ¦--expr: [1/2] {589} + ¦ ¦ ¦--expr: many [1/2] {589} ¦ ¦ ¦ °--SYMBOL: many [0/0] {588} ¦ ¦ ¦--',': , [1/5] {590} - ¦ ¦ ¦--expr: [0/2] {592} + ¦ ¦ ¦--expr: first [0/2] {592} ¦ ¦ ¦ °--SYMBOL: first [0/0] {591} ¦ ¦ °--')': ) [0/0] {593} - ¦ ¦--expr: [2/2] {594} - ¦ ¦ ¦--expr: [0/0] {596} + ¦ ¦--expr: neste [2/2] {594} + ¦ ¦ ¦--expr: neste [0/0] {596} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: neste [0/0] {595} ¦ ¦ ¦--'(': ( [0/4] {597} - ¦ ¦ ¦--expr: [1/0] {598} - ¦ ¦ ¦ ¦--expr: [0/1] {600} + ¦ ¦ ¦--expr: funct [1/0] {598} + ¦ ¦ ¦ ¦--expr: funct [0/1] {600} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: funct [0/0] {599} ¦ ¦ ¦ ¦--'(': ( [0/1] {601} - ¦ ¦ ¦ ¦--expr: [0/1] {603} + ¦ ¦ ¦ ¦--expr: with [0/1] {603} ¦ ¦ ¦ ¦ °--SYMBOL: with [0/0] {602} ¦ ¦ ¦ °--')': ) [0/0] {604} ¦ ¦ ¦--',': , [0/2] {605} ¦ ¦ ¦--COMMENT: # a c [0/4] {606} - ¦ ¦ ¦--expr: [1/1] {608} + ¦ ¦ ¦--expr: many [1/1] {608} ¦ ¦ ¦ °--SYMBOL: many [0/0] {607} ¦ ¦ ¦--COMMENT: #more [0/4] {609} ¦ ¦ ¦--',': , [1/5] {610} - ¦ ¦ ¦--expr: [0/2] {612} + ¦ ¦ ¦--expr: first [0/2] {612} ¦ ¦ ¦ °--SYMBOL: first [0/0] {611} ¦ ¦ °--')': ) [0/0] {613} - ¦ ¦--expr: [2/0] {614} - ¦ ¦ ¦--expr: [0/0] {616} + ¦ ¦--expr: diffi [2/0] {614} + ¦ ¦ ¦--expr: diffi [0/0] {616} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: diffi [0/0] {615} ¦ ¦ ¦--'(': ( [0/0] {617} - ¦ ¦ ¦--expr: [0/0] {618} - ¦ ¦ ¦ ¦--expr: [0/0] {620} + ¦ ¦ ¦--expr: neste [0/0] {618} + ¦ ¦ ¦ ¦--expr: neste [0/0] {620} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: neste [0/0] {619} ¦ ¦ ¦ ¦--'(': ( [0/4] {621} - ¦ ¦ ¦ ¦--expr: [1/0] {623} + ¦ ¦ ¦ ¦--expr: "func [1/0] {623} ¦ ¦ ¦ ¦ °--STR_CONST: "func [0/0] {622} ¦ ¦ ¦ ¦--',': , [0/1] {624} - ¦ ¦ ¦ ¦--expr: [0/2] {626} + ¦ ¦ ¦ ¦--expr: call [0/2] {626} ¦ ¦ ¦ ¦ °--SYMBOL: call [0/0] {625} ¦ ¦ ¦ °--')': ) [1/0] {627} ¦ ¦ ¦--',': , [0/4] {628} - ¦ ¦ ¦--expr: [1/0] {630} + ¦ ¦ ¦--expr: with [1/0] {630} ¦ ¦ ¦ °--SYMBOL: with [0/0] {629} ¦ ¦ ¦--',': , [0/1] {631} - ¦ ¦ ¦--expr: [0/0] {633} + ¦ ¦ ¦--expr: more [0/0] {633} ¦ ¦ ¦ °--SYMBOL: more [0/0] {632} ¦ ¦ ¦--',': , [0/1] {634} - ¦ ¦ ¦--expr: [0/2] {636} + ¦ ¦ ¦--expr: args [0/2] {636} ¦ ¦ ¦ °--SYMBOL: args [0/0] {635} ¦ ¦ °--')': ) [1/0] {637} ¦ °--'}': } [1/0] {638} ¦--COMMENT: # for [3/0] {639} - ¦--expr: [1/0] {640} - ¦ ¦--expr: [0/0] {642} + ¦--expr: lm(a~ [1/0] {640} + ¦ ¦--expr: lm [0/0] {642} ¦ ¦ °--SYMBOL_FUNCTION_CALL: lm [0/0] {641} ¦ ¦--'(': ( [0/0] {643} - ¦ ¦--expr: [0/0] {644} - ¦ ¦ ¦--expr: [0/0] {646} + ¦ ¦--expr: a~b+c [0/0] {644} + ¦ ¦ ¦--expr: a [0/0] {646} ¦ ¦ ¦ °--SYMBOL: a [0/0] {645} ¦ ¦ ¦--'~': ~ [0/0] {647} - ¦ ¦ °--expr: [0/0] {648} - ¦ ¦ ¦--expr: [0/0] {650} + ¦ ¦ °--expr: b+c [0/0] {648} + ¦ ¦ ¦--expr: b [0/0] {650} ¦ ¦ ¦ °--SYMBOL: b [0/0] {649} ¦ ¦ ¦--'+': + [0/0] {651} - ¦ ¦ °--expr: [0/0] {653} + ¦ ¦ °--expr: c [0/0] {653} ¦ ¦ °--SYMBOL: c [0/0] {652} ¦ ¦--',': , [0/0] {654} ¦ ¦--SYMBOL_SUB: data [0/0] {655} ¦ ¦--EQ_SUB: = [0/0] {656} - ¦ ¦--expr: [0/0] {658} + ¦ ¦--expr: NA [0/0] {658} ¦ ¦ °--NUM_CONST: NA [0/0] {657} ¦ °--')': ) [0/0] {659} - ¦--expr: [1/0] {660} - ¦ ¦--expr: [0/0] {662} + ¦--expr: lm(a~ [1/0] {660} + ¦ ¦--expr: lm [0/0] {662} ¦ ¦ °--SYMBOL_FUNCTION_CALL: lm [0/0] {661} ¦ ¦--'(': ( [0/0] {663} - ¦ ¦--expr: [0/0] {664} - ¦ ¦ ¦--expr: [0/0] {666} + ¦ ¦--expr: a~.-1 [0/0] {664} + ¦ ¦ ¦--expr: a [0/0] {666} ¦ ¦ ¦ °--SYMBOL: a [0/0] {665} ¦ ¦ ¦--'~': ~ [0/0] {667} - ¦ ¦ °--expr: [0/0] {668} - ¦ ¦ ¦--expr: [0/0] {670} + ¦ ¦ °--expr: .-1 [0/0] {668} + ¦ ¦ ¦--expr: . [0/0] {670} ¦ ¦ ¦ °--SYMBOL: . [0/0] {669} ¦ ¦ ¦--'-': - [0/0] {671} - ¦ ¦ °--expr: [0/0] {673} + ¦ ¦ °--expr: 1 [0/0] {673} ¦ ¦ °--NUM_CONST: 1 [0/0] {672} ¦ ¦--',': , [0/0] {674} ¦ ¦--SYMBOL_SUB: data [0/0] {675} ¦ ¦--EQ_SUB: = [0/0] {676} - ¦ ¦--expr: [0/0] {678} + ¦ ¦--expr: NA [0/0] {678} ¦ ¦ °--NUM_CONST: NA [0/0] {677} ¦ °--')': ) [0/0] {679} - ¦--expr: [1/0] {680} - ¦ ¦--expr: [0/0] {682} + ¦--expr: a~b:c [1/0] {680} + ¦ ¦--expr: a [0/0] {682} ¦ ¦ °--SYMBOL: a [0/0] {681} ¦ ¦--'~': ~ [0/0] {683} - ¦ °--expr: [0/0] {684} - ¦ ¦--expr: [0/0] {686} + ¦ °--expr: b:c [0/0] {684} + ¦ ¦--expr: b [0/0] {686} ¦ ¦ °--SYMBOL: b [0/0] {685} ¦ ¦--':': : [0/0] {687} - ¦ °--expr: [0/0] {689} + ¦ °--expr: c [0/0] {689} ¦ °--SYMBOL: c [0/0] {688} - ¦--expr: [1/0] {690} - ¦ ¦--expr: [0/3] {692} + ¦--expr: a ~ [1/0] {690} + ¦ ¦--expr: a [0/3] {692} ¦ ¦ °--SYMBOL: a [0/0] {691} ¦ ¦--'~': ~ [0/3] {693} - ¦ °--expr: [0/0] {694} - ¦ ¦--expr: [0/2] {696} + ¦ °--expr: b : [0/0] {694} + ¦ ¦--expr: b [0/2] {696} ¦ ¦ °--SYMBOL: b [0/0] {695} ¦ ¦--':': : [0/1] {697} - ¦ °--expr: [0/0] {699} + ¦ °--expr: c [0/0] {699} ¦ °--SYMBOL: c [0/0] {698} - ¦--expr: [1/0] {700} - ¦ ¦--expr: [0/0] {702} + ¦--expr: a~b : [1/0] {700} + ¦ ¦--expr: a [0/0] {702} ¦ ¦ °--SYMBOL: a [0/0] {701} ¦ ¦--'~': ~ [0/0] {703} - ¦ °--expr: [0/0] {704} - ¦ ¦--expr: [0/1] {706} + ¦ °--expr: b :c [0/0] {704} + ¦ ¦--expr: b [0/1] {706} ¦ ¦ °--SYMBOL: b [0/0] {705} ¦ ¦--':': : [0/0] {707} - ¦ °--expr: [0/0] {709} + ¦ °--expr: c [0/0] {709} ¦ °--SYMBOL: c [0/0] {708} - ¦--expr: [1/0] {710} + ¦--expr: ~ [1/0] {710} ¦ ¦--'~': ~ [0/4] {711} - ¦ °--expr: [0/0] {713} + ¦ °--expr: a [0/0] {713} ¦ °--SYMBOL: a [0/0] {712} - ¦--expr: [1/0] {714} + ¦--expr: ~gg [1/0] {714} ¦ ¦--'~': ~ [0/0] {715} - ¦ °--expr: [0/0] {717} + ¦ °--expr: gg [0/0] {717} ¦ °--SYMBOL: gg [0/0] {716} - ¦--expr: [1/0] {718} - ¦ ¦--expr: [0/0] {720} + ¦--expr: b~k [1/0] {718} + ¦ ¦--expr: b [0/0] {720} ¦ ¦ °--SYMBOL: b [0/0] {719} ¦ ¦--'~': ~ [0/0] {721} - ¦ °--expr: [0/0] {723} + ¦ °--expr: k [0/0] {723} ¦ °--SYMBOL: k [0/0] {722} - °--expr: [1/0] {724} - ¦--expr: [0/0] {726} + °--expr: call( [1/0] {724} + ¦--expr: call [0/0] {726} ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {725} ¦--'(': ( [0/0] {727} - ¦--expr: [0/0] {729} + ¦--expr: 1 [0/0] {729} ¦ °--NUM_CONST: 1 [0/0] {728} ¦--',': , [0/1] {730} - ¦--expr: [0/0] {731} + ¦--expr: ~ qq [0/0] {731} ¦ ¦--'~': ~ [0/1] {732} - ¦ °--expr: [0/0] {734} + ¦ °--expr: qq [0/0] {734} ¦ °--SYMBOL: qq [0/0] {733} °--')': ) [0/0] {735} diff --git a/tests/testthat/stylerignore/simple-in_tree b/tests/testthat/stylerignore/simple-in_tree index 46bc5d802..a32256caa 100644 --- a/tests/testthat/stylerignore/simple-in_tree +++ b/tests/testthat/stylerignore/simple-in_tree @@ -1,113 +1,113 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/1] {1} - ¦ ¦--expr: [0/0] {3} + ¦--expr: call( [0/1] {1} + ¦ ¦--expr: call [0/0] {3} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {2} ¦ ¦--'(': ( [0/0] {4} - ¦ ¦--expr: [0/1] {6} + ¦ ¦--expr: 1 [0/1] {6} ¦ ¦ °--NUM_CONST: 1 [0/0] {5} ¦ °--')': ) [0/0] {7} ¦--COMMENT: # sty [0/0] {8} ¦--COMMENT: # sty [1/0] {9} ¦--COMMENT: # als [1/0] {10} - ¦--expr: [1/0] {11} - ¦ ¦--expr: [0/0] {13} + ¦--expr: test_ [1/0] {11} + ¦ ¦--expr: test_ [0/0] {13} ¦ ¦ °--SYMBOL_FUNCTION_CALL: test_ [0/0] {12} ¦ ¦--'(': ( [0/0] {14} - ¦ ¦--expr: [0/0] {16} + ¦ ¦--expr: "hier [0/0] {16} ¦ ¦ °--STR_CONST: "hier [0/0] {15} ¦ ¦--',': , [0/1] {17} ¦ ¦--SYMBOL_SUB: na.rm [0/1] {18} ¦ ¦--EQ_SUB: = [0/1] {19} - ¦ ¦--expr: [0/0] {21} + ¦ ¦--expr: 3 [0/0] {21} ¦ ¦ °--NUM_CONST: 3 [0/0] {20} ¦ ¦--',': , [0/1] {22} ¦ ¦--SYMBOL_SUB: py [0/1] {23} ¦ ¦--EQ_SUB: = [0/1] {24} - ¦ ¦--expr: [0/9] {26} + ¦ ¦--expr: 43 [0/9] {26} ¦ ¦ °--NUM_CONST: 43 [0/0] {25} ¦ °--')': ) [1/0] {27} - ¦--equal_assign: [3/1] {28} - ¦ ¦--expr: [0/0] {30} + ¦--equal_assign: x="ne [3/1] {28} + ¦ ¦--expr: x [0/0] {30} ¦ ¦ °--SYMBOL: x [0/0] {29} ¦ ¦--EQ_ASSIGN: = [0/0] {31} - ¦ °--expr: [0/0] {33} + ¦ °--expr: "new" [0/0] {33} ¦ °--STR_CONST: "new" [0/0] {32} ¦--COMMENT: # sty [0/0] {34} - ¦--equal_assign: [1/1] {35} - ¦ ¦--expr: [0/0] {37} + ¦--equal_assign: y=1 [1/1] {35} + ¦ ¦--expr: y [0/0] {37} ¦ ¦ °--SYMBOL: y [0/0] {36} ¦ ¦--EQ_ASSIGN: = [0/0] {38} - ¦ °--expr: [0/0] {40} + ¦ °--expr: 1 [0/0] {40} ¦ °--NUM_CONST: 1 [0/0] {39} ¦--COMMENT: # non [0/0] {41} - ¦--expr: [2/0] {42} - ¦ ¦--expr: [0/0] {44} + ¦--expr: more_ [2/0] {42} + ¦ ¦--expr: more_ [0/0] {44} ¦ ¦ °--SYMBOL_FUNCTION_CALL: more_ [0/0] {43} ¦ ¦--'(': ( [0/0] {45} - ¦ ¦--expr: [0/0] {46} - ¦ ¦ ¦--expr: [0/0] {48} + ¦ ¦--expr: with( [0/0] {46} + ¦ ¦ ¦--expr: with [0/0] {48} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: with [0/0] {47} ¦ ¦ ¦--'(': ( [0/0] {49} - ¦ ¦ ¦--expr: [0/0] {51} + ¦ ¦ ¦--expr: argum [0/0] {51} ¦ ¦ ¦ °--SYMBOL: argum [0/0] {50} ¦ ¦ °--')': ) [0/0] {52} ¦ °--')': ) [0/0] {53} ¦--COMMENT: # sty [1/0] {54} - ¦--expr: [1/0] {55} - ¦ ¦--expr: [0/1] {57} + ¦--expr: 1 + 1 [1/0] {55} + ¦ ¦--expr: 1 [0/1] {57} ¦ ¦ °--NUM_CONST: 1 [0/0] {56} ¦ ¦--'+': + [0/1] {58} - ¦ °--expr: [0/0] {60} + ¦ °--expr: 1 [0/0] {60} ¦ °--NUM_CONST: 1 [0/0] {59} - ¦--expr: [1/0] {61} - ¦ ¦--expr: [0/0] {63} + ¦--expr: a(!b) [1/0] {61} + ¦ ¦--expr: a [0/0] {63} ¦ ¦ °--SYMBOL_FUNCTION_CALL: a [0/0] {62} ¦ ¦--'(': ( [0/0] {64} - ¦ ¦--expr: [0/0] {65} + ¦ ¦--expr: !b [0/0] {65} ¦ ¦ ¦--'!': ! [0/0] {66} - ¦ ¦ °--expr: [0/0] {68} + ¦ ¦ °--expr: b [0/0] {68} ¦ ¦ °--SYMBOL: b [0/0] {67} ¦ °--')': ) [0/0] {69} ¦--COMMENT: # --- [3/0] {70} - ¦--equal_assign: [1/1] {71} - ¦ ¦--expr: [0/0] {73} + ¦--equal_assign: x="ne [1/1] {71} + ¦ ¦--expr: x [0/0] {73} ¦ ¦ °--SYMBOL: x [0/0] {72} ¦ ¦--EQ_ASSIGN: = [0/0] {74} - ¦ °--expr: [0/0] {76} + ¦ °--expr: "new" [0/0] {76} ¦ °--STR_CONST: "new" [0/0] {75} ¦--COMMENT: # sty [0/0] {77} - ¦--equal_assign: [1/1] {78} - ¦ ¦--expr: [0/0] {80} + ¦--equal_assign: y=1 [1/1] {78} + ¦ ¦--expr: y [0/0] {80} ¦ ¦ °--SYMBOL: y [0/0] {79} ¦ ¦--EQ_ASSIGN: = [0/0] {81} - ¦ °--expr: [0/0] {83} + ¦ °--expr: 1 [0/0] {83} ¦ °--NUM_CONST: 1 [0/0] {82} ¦--COMMENT: # non [0/0] {84} - ¦--expr: [2/0] {85} - ¦ ¦--expr: [0/0] {87} + ¦--expr: more_ [2/0] {85} + ¦ ¦--expr: more_ [0/0] {87} ¦ ¦ °--SYMBOL_FUNCTION_CALL: more_ [0/0] {86} ¦ ¦--'(': ( [0/0] {88} - ¦ ¦--expr: [0/0] {89} - ¦ ¦ ¦--expr: [0/0] {91} + ¦ ¦--expr: with( [0/0] {89} + ¦ ¦ ¦--expr: with [0/0] {91} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: with [0/0] {90} ¦ ¦ ¦--'(': ( [0/0] {92} - ¦ ¦ ¦--expr: [0/0] {94} + ¦ ¦ ¦--expr: argum [0/0] {94} ¦ ¦ ¦ °--SYMBOL: argum [0/0] {93} ¦ ¦ °--')': ) [0/0] {95} ¦ °--')': ) [0/0] {96} ¦--COMMENT: # sty [1/0] {97} - ¦--expr: [1/0] {98} - ¦ ¦--expr: [0/1] {100} + ¦--expr: 1 + 1 [1/0] {98} + ¦ ¦--expr: 1 [0/1] {100} ¦ ¦ °--NUM_CONST: 1 [0/0] {99} ¦ ¦--'+': + [0/1] {101} - ¦ °--expr: [0/0] {103} + ¦ °--expr: 1 [0/0] {103} ¦ °--NUM_CONST: 1 [0/0] {102} - °--expr: [1/0] {104} - ¦--expr: [0/0] {106} + °--expr: a(!b) [1/0] {104} + ¦--expr: a [0/0] {106} ¦ °--SYMBOL_FUNCTION_CALL: a [0/0] {105} ¦--'(': ( [0/0] {107} - ¦--expr: [0/0] {108} + ¦--expr: !b [0/0] {108} ¦ ¦--'!': ! [0/0] {109} - ¦ °--expr: [0/0] {111} + ¦ °--expr: b [0/0] {111} ¦ °--SYMBOL: b [0/0] {110} °--')': ) [0/0] {112} diff --git a/tests/testthat/stylerignore/simple-out.R b/tests/testthat/stylerignore/simple-out.R index a1986de7a..7f8229ebc 100644 --- a/tests/testthat/stylerignore/simple-out.R +++ b/tests/testthat/stylerignore/simple-out.R @@ -1,3 +1,4 @@ + call(1 ) # styler: off # styler: off # also if there are more comments diff --git a/tests/testthat/test-cache-high-level-api.R b/tests/testthat/test-cache-high-level-api.R new file mode 100644 index 000000000..3362703fc --- /dev/null +++ b/tests/testthat/test-cache-high-level-api.R @@ -0,0 +1,91 @@ +capture.output(test_that("activated cache brings speedup on style_file() API", { + skip_if_not_installed("R.cache") + on.exit(clear_testthat_cache()) + clear_testthat_cache() + activate_testthat_cache() + + first <- system.time(styler::style_file(test_path("reference-objects/caching.R"))) + second <- system.time(styler::style_file(test_path("reference-objects/caching.R"))) + expect_true(first["elapsed"] / 2 > second["elapsed"]) +})) + +text <- c( + "#' Roxygen", + "#' Comment", + "#' @examples", + "#' 1 + 1", + "k <- function() {", + " 1 + 1", + " if (x) {", + " k()", + " }", + "}", + "" +) %>% + rep(10) + +capture.output(test_that("activated cache brings speedup on style_text() API on character vector", { + skip_if_not_installed("R.cache") + activate_testthat_cache() + on.exit(clear_testthat_cache()) + clear_testthat_cache() + activate_testthat_cache() + + first <- system.time(styler::style_text(text)) + second <- system.time(styler::style_text(text)) + expect_true(first["elapsed"] / 2 > second["elapsed"]) +})) + +capture.output(test_that("activated cache brings speedup on style_text() API on character scalar", { + skip_if_not_installed("R.cache") + activate_testthat_cache() + on.exit(clear_testthat_cache()) + clear_testthat_cache() + activate_testthat_cache() + + first <- system.time(styler::style_text(paste0(text, collapse = "\n"))) + second <- system.time(styler::style_text(paste0(text, collapse = "\n"))) + expect_true(first["elapsed"] / 2 > second["elapsed"]) +})) + + +capture.output(test_that("no speedup when tranformer changes", { + skip_if_not_installed("R.cache") + activate_testthat_cache() + on.exit(clear_testthat_cache()) + clear_testthat_cache() + activate_testthat_cache() + t1 <- tidyverse_style() + first <- system.time(style_text(text, transformers = t1)) + t1$use_raw_indention <- !t1$use_raw_indention + second <- system.time(style_text(text, transformers = t1)) + expect_false(first["elapsed"] / 2 > second["elapsed"]) +})) + + +capture.output( + test_that(paste0( + "activated cache brings speedup on style_text() API on ", + "character scalar and character vector (mixed)" + ), { + skip_if_not_installed("R.cache") + activate_testthat_cache() + on.exit(clear_testthat_cache()) + clear_testthat_cache() + activate_testthat_cache() + + first <- system.time(styler::style_text(text)) + second <- system.time(styler::style_text(paste0(text, collapse = "\n"))) + expect_true(first["elapsed"] / 2 > second["elapsed"]) + })) + + +capture.output(test_that("unactivated cache does not bring speedup", { + skip_if_not_installed("R.cache") + on.exit(clear_testthat_cache) + clear_testthat_cache() + cache_deactivate() + first <- system.time(styler::style_file(test_path("reference-objects/caching.R"))) + second <- system.time(styler::style_file(test_path("reference-objects/caching.R"))) + expect_false(first["elapsed"] / 2 > second["elapsed"]) +})) diff --git a/tests/testthat/test-cache-low-level-api.R b/tests/testthat/test-cache-low-level-api.R new file mode 100644 index 000000000..c55328c49 --- /dev/null +++ b/tests/testthat/test-cache-low-level-api.R @@ -0,0 +1,88 @@ +test_that("caching utils make right blocks with semi-colon", { + + blocks_simple_uncached <- compute_parse_data_nested(c("1 + 1", "2; 1+1")) %>% + dplyr::mutate(is_cached = FALSE) %>% + cache_find_block() + expect_equal(blocks_simple_uncached, c(1, 1, 1, 1)) + + blocks_simple_cached <- compute_parse_data_nested(c("1 + 1", "2; 1+1")) %>% + dplyr::mutate(is_cached = TRUE) %>% + cache_find_block() + expect_equal(blocks_simple_cached, c(1, 1, 1, 1)) + + blocks_edge <- compute_parse_data_nested(c("1 + 1", "2; 1+1")) %>% + dplyr::mutate(is_cached = c(TRUE, TRUE, FALSE, FALSE)) %>% + cache_find_block() + expect_equal(blocks_edge, c(1, 2, 2, 2)) +}) + +test_that("blank lines are correctly identified", { + on.exit(clear_testthat_cache()) + clear_testthat_cache() + activate_testthat_cache() + text <- c( + "1 + 1", + "", + "", + "f(x)", + "", + "", + "", + "x < 3", + "function() NULL" + ) + # when not cached, all code in same block + pd_nested <- compute_parse_data_nested(text, tidyverse_style()) + cache_by_expression(text, tidyverse_style()) + expect_equal( + pd_nested$block, rep(1, 4) + ) + + expect_equal( + find_blank_lines_to_next_block(pd_nested), + 1 + ) + + # when partly cached, not all code in same block + text[4] <- "f (x)" + pd_nested <- compute_parse_data_nested(text, tidyverse_style()) + expect_equal( + pd_nested$block, c(1, 2, 3, 3) + ) + + expect_equal( + find_blank_lines_to_next_block(pd_nested), + c(1, 3, 4) + ) +}) + +test_that("caching utils make right blocks with comments", { + blocks_simple_uncached <- compute_parse_data_nested(c("1 + 1", "2 # comment")) %>% + dplyr::mutate(is_cached = FALSE) %>% + cache_find_block() + expect_equal(blocks_simple_uncached, c(1, 1, 1)) + + blocks_simple_cached <- compute_parse_data_nested(c("1 + 1", "2 # comment2")) %>% + dplyr::mutate(is_cached = TRUE) %>% + cache_find_block() + expect_equal(blocks_simple_cached, c(1, 1, 1)) + + blocks_edge <- compute_parse_data_nested(c("1 + 1", "2 # 1+1")) %>% + dplyr::mutate(is_cached = c(TRUE, TRUE, FALSE)) %>% + cache_find_block() + expect_equal(blocks_edge, c(1, 2, 2)) +}) + + +################################################################################ + +test_that("Individual comment expressions are not cached", { + on.exit(clear_testthat_cache()) + clear_testthat_cache() + cache_activate("testthat") + style_text(c("# g", "1")) + cache_info <- cache_info() + # because output text is cached as a whole, there should be 2 cached + # expressions now + expect_equal(cache_info$n, 2) +}) diff --git a/tests/testthat/test-cache-with-r-cache.R b/tests/testthat/test-cache-with-r-cache.R index f0a9ab347..aa359f259 100644 --- a/tests/testthat/test-cache-with-r-cache.R +++ b/tests/testthat/test-cache-with-r-cache.R @@ -1,5 +1,3 @@ -styler_version <- utils::packageDescription("styler", fields = "Version") -clear_testthat_cache <- purrr::partial(cache_clear, "testthat", ask = FALSE) capture.output(test_that("No warnings are issued when R.cache is installed", { skip_if_not_installed("R.cache") @@ -7,7 +5,7 @@ capture.output(test_that("No warnings are issued when R.cache is installed", { expect_silent(assert_R.cache_installation(installation_only = TRUE)) expect_silent(assert_R.cache_installation()) expect_warning(style_text("1+1"), NA) - expect_warning(cache_activate("testthat"), NA) + expect_warning(activate_testthat_cache(), NA) expect_warning(style_text("1+1"), NA) expect_silent(assert_R.cache_installation(installation_only = TRUE)) expect_silent(assert_R.cache_installation()) @@ -19,7 +17,7 @@ capture.output(test_that("Cache management works when R.cache is installed", { clear_testthat_cache() # clearing a cache inactivates the caching functionality. expect_false(cache_info(format = "tabular")$activated) - cache_activate("testthat") + activate_testthat_cache() # at fresh startup, with R.cache installed expect_s3_class(cache_info(format = "tabular"), "tbl_df") expect_error(cache_info(), NA) @@ -43,99 +41,26 @@ capture.output(test_that("Cache management works when R.cache is installed", { expect_error(cache_clear(ask = FALSE), NA) })) - - -capture.output(test_that("activated cache brings speedup on style_file() API", { - skip_if_not_installed("R.cache") - cache_activate("testthat") - on.exit(clear_testthat_cache()) - clear_testthat_cache() - cache_activate("testthat") - first <- system.time(styler::style_file(test_path("reference-objects/caching.R"))) - second <- system.time(styler::style_file(test_path("reference-objects/caching.R"))) - expect_true(first["elapsed"] / 2 > second["elapsed"]) -})) - -text <- c( - "#' Roxygen", - "#' Comment", - "#' @examples", - "#' 1 + 1", - "k <- function() {", - " 1 + 1", - " if (x) {", - " k()", - " }", - "}", - "" -) %>% - rep(10) - -capture.output(test_that("activated cache brings speedup on style_text() API on character vector", { - skip_if_not_installed("R.cache") - cache_activate("testthat") - on.exit(clear_testthat_cache()) - clear_testthat_cache() - cache_activate("testthat") - - first <- system.time(styler::style_text(text)) - second <- system.time(styler::style_text(text)) - expect_true(first["elapsed"] / 2 > second["elapsed"]) -})) - -capture.output(test_that("activated cache brings speedup on style_text() API on character scalar", { - skip_if_not_installed("R.cache") - cache_activate("testthat") +test_that("top-level test: Caches top-level expressions efficiently on style_text()", { on.exit(clear_testthat_cache()) clear_testthat_cache() - cache_activate("testthat") - - first <- system.time(styler::style_text(paste0(text, collapse = "\n"))) - second <- system.time(styler::style_text(paste0(text, collapse = "\n"))) - expect_true(first["elapsed"] / 2 > second["elapsed"]) -})) - - -capture.output(test_that("no speedup when tranformer changes", { - skip_if_not_installed("R.cache") - cache_activate("testthat") - on.exit(clear_testthat_cache()) - clear_testthat_cache() - cache_activate("testthat") - t1 <- tidyverse_style() - first <- system.time(style_text(text, transformers = t1)) - t1$use_raw_indention <- !t1$use_raw_indention - second <- system.time(style_text(text, transformers = t1)) - expect_false(first["elapsed"] / 2 > second["elapsed"]) -})) - - -capture.output( - test_that(paste0( - "activated cache brings speedup on style_text() API on ", - "character scalar and character vector (mixed)" - ), { - skip_if_not_installed("R.cache") - cache_activate("testthat") - on.exit(clear_testthat_cache()) - clear_testthat_cache() - cache_activate("testthat") - - first <- system.time(styler::style_text(text)) - second <- system.time(styler::style_text(paste0(text, collapse = "\n"))) - expect_true(first["elapsed"] / 2 > second["elapsed"]) -})) - - -capture.output(test_that("unactivated cache does not bring speedup", { - skip_if_not_installed("R.cache") - on.exit(clear_testthat_cache) - clear_testthat_cache() + text <- test_path("cache-with-r-cache/mlflow-1-in.R") %>% + readLines() + activate_testthat_cache() + benchmark <- system.time(text_styled <- style_text(text)) + full_cached_benchmark <- system.time(style_text(text_styled)) + expect_lt(full_cached_benchmark['elapsed'], .1) + # modify one function declaration + text_styled[2] <-gsub(")", " )", text_styled[2], fixed = TRUE) + partially_cached_benchmark <- system.time(style_text(text_styled)) cache_deactivate() - first <- system.time(styler::style_file(test_path("reference-objects/caching.R"))) - second <- system.time(styler::style_file(test_path("reference-objects/caching.R"))) - expect_false(first["elapsed"] / 2 > second["elapsed"]) -})) + not_cached_benchmark <- system.time(style_text(text_styled)) + expect_lt( + partially_cached_benchmark['elapsed'] * 5, + not_cached_benchmark['elapsed'] + ) +}) + capture.output(test_that("cached expressions are displayed propperly", { on.exit(clear_testthat_cache()) @@ -146,7 +71,7 @@ capture.output(test_that("cached expressions are displayed propperly", { file = test_path("reference-objects/cache-info-1") ) - cache_activate("testthat") + activate_testthat_cache() style_text("1+1") cache_info <- cache_info(format = "tabular") cache_info$size <- round(cache_info$size, -2) @@ -162,3 +87,38 @@ capture.output(test_that("cached expressions are displayed propperly", { file = test_path("reference-objects/cache-info-3") ) })) + + +test_that("When expressions are cached, number of newlines between them are preserved", { + on.exit(clear_testthat_cache()) + clear_testthat_cache() + activate_testthat_cache() + text <- c( + "1 + 1", + "", + "", + "f(x)", + "", + "", + "", + "x < 3", + "function() NULL" + ) + # add to cache + expect_equal( + text[1:4], + as.character(style_text(text[1:4])) + ) + # applied cache + expect_equal( + text[1:4], + as.character(style_text(text[1:4])) + ) + + expect_equal( + text, + as.character(style_text(text)) + ) +}) + + diff --git a/tests/testthat/test-create_token.R b/tests/testthat/test-create_token.R index ebaf66c87..d8af82f44 100644 --- a/tests/testthat/test-create_token.R +++ b/tests/testthat/test-create_token.R @@ -5,7 +5,7 @@ test_that("can create a token that has relevant columns", { "token", "text", "short", "lag_newlines", "newlines", "pos_id", "token_before", "token_after", "terminal", "internal", "spaces", "multi_line", "indention_ref_pos_id", "indent", "child", - "stylerignore" + "stylerignore", "block", "is_cached" ) expect_equal( diff --git a/tests/testthat/tidyeval/bang_bang-in_tree b/tests/testthat/tidyeval/bang_bang-in_tree index 2252b926f..5e03ff01a 100644 --- a/tests/testthat/tidyeval/bang_bang-in_tree +++ b/tests/testthat/tidyeval/bang_bang-in_tree @@ -1,165 +1,166 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} - ¦ ¦--expr: [0/1] {3} + ¦--expr: names [0/0] {1} + ¦ ¦--expr: names [0/1] {3} ¦ ¦ °--SYMBOL: names [0/0] {2} ¦ ¦--LEFT_ASSIGN: <- [0/1] {4} - ¦ °--expr: [0/0] {5} - ¦ ¦--expr: [0/0] {7} + ¦ °--expr: c(SL [0/0] {5} + ¦ ¦--expr: c [0/0] {7} ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {6} ¦ ¦--'(': ( [0/0] {8} ¦ ¦--SYMBOL_SUB: SL [0/1] {9} ¦ ¦--EQ_SUB: = [0/1] {10} - ¦ ¦--expr: [0/0] {12} + ¦ ¦--expr: 'Sepa [0/0] {12} ¦ ¦ °--STR_CONST: 'Sepa [0/0] {11} ¦ °--')': ) [0/0] {13} - ¦--expr: [1/0] {14} - ¦ ¦--expr: [0/0] {16} + ¦--expr: head( [1/0] {14} + ¦ ¦--expr: head [0/0] {16} ¦ ¦ °--SYMBOL_FUNCTION_CALL: head [0/0] {15} ¦ ¦--'(': ( [0/0] {17} - ¦ ¦--expr: [0/0] {18} - ¦ ¦ ¦--expr: [0/0] {19} + ¦ ¦--expr: dplyr [0/0] {18} + ¦ ¦ ¦--expr: dplyr [0/0] {19} ¦ ¦ ¦ ¦--SYMBOL_PACKAGE: dplyr [0/0] {20} ¦ ¦ ¦ ¦--NS_GET: :: [0/0] {21} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: renam [0/0] {22} ¦ ¦ ¦--'(': ( [0/0] {23} - ¦ ¦ ¦--expr: [0/0] {24} - ¦ ¦ ¦ ¦--expr: [0/0] {26} + ¦ ¦ ¦--expr: iris[ [0/0] {24} + ¦ ¦ ¦ ¦--expr: iris [0/0] {26} ¦ ¦ ¦ ¦ °--SYMBOL: iris [0/0] {25} ¦ ¦ ¦ ¦--'[': [ [0/0] {27} ¦ ¦ ¦ ¦--',': , [0/0] {28} - ¦ ¦ ¦ ¦--expr: [0/0] {29} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {31} + ¦ ¦ ¦ ¦--expr: 1:2 [0/0] {29} + ¦ ¦ ¦ ¦ ¦--expr: 1 [0/0] {31} ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {30} ¦ ¦ ¦ ¦ ¦--':': : [0/0] {32} - ¦ ¦ ¦ ¦ °--expr: [0/0] {34} + ¦ ¦ ¦ ¦ °--expr: 2 [0/0] {34} ¦ ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {33} ¦ ¦ ¦ °--']': ] [0/0] {35} ¦ ¦ ¦--',': , [0/1] {36} - ¦ ¦ ¦--expr: [0/0] {37} + ¦ ¦ ¦--expr: ! ! ! [0/0] {37} ¦ ¦ ¦ ¦--'!': ! [0/1] {38} - ¦ ¦ ¦ °--expr: [0/0] {39} + ¦ ¦ ¦ °--expr: ! ! n [0/0] {39} ¦ ¦ ¦ ¦--'!': ! [0/1] {40} - ¦ ¦ ¦ °--expr: [0/0] {41} + ¦ ¦ ¦ °--expr: ! nam [0/0] {41} ¦ ¦ ¦ ¦--'!': ! [0/1] {42} - ¦ ¦ ¦ °--expr: [0/0] {44} + ¦ ¦ ¦ °--expr: names [0/0] {44} ¦ ¦ ¦ °--SYMBOL: names [0/0] {43} ¦ ¦ °--')': ) [0/0] {45} ¦ ¦--',': , [0/1] {46} - ¦ ¦--expr: [0/0] {48} + ¦ ¦--expr: 3 [0/0] {48} ¦ ¦ °--NUM_CONST: 3 [0/0] {47} ¦ °--')': ) [0/0] {49} - ¦--expr: [1/0] {50} - ¦ ¦--expr: [0/0] {52} + ¦--expr: head( [1/0] {50} + ¦ ¦--expr: head [0/0] {52} ¦ ¦ °--SYMBOL_FUNCTION_CALL: head [0/0] {51} ¦ ¦--'(': ( [0/0] {53} - ¦ ¦--expr: [0/0] {54} - ¦ ¦ ¦--expr: [0/0] {55} + ¦ ¦--expr: dplyr [0/0] {54} + ¦ ¦ ¦--expr: dplyr [0/0] {55} ¦ ¦ ¦ ¦--SYMBOL_PACKAGE: dplyr [0/0] {56} ¦ ¦ ¦ ¦--NS_GET: :: [0/0] {57} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: renam [0/0] {58} ¦ ¦ ¦--'(': ( [0/0] {59} - ¦ ¦ ¦--expr: [0/0] {60} - ¦ ¦ ¦ ¦--expr: [0/0] {62} + ¦ ¦ ¦--expr: iris[ [0/0] {60} + ¦ ¦ ¦ ¦--expr: iris [0/0] {62} ¦ ¦ ¦ ¦ °--SYMBOL: iris [0/0] {61} ¦ ¦ ¦ ¦--'[': [ [0/0] {63} ¦ ¦ ¦ ¦--',': , [0/0] {64} - ¦ ¦ ¦ ¦--expr: [0/0] {65} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {67} + ¦ ¦ ¦ ¦--expr: 1:2 [0/0] {65} + ¦ ¦ ¦ ¦ ¦--expr: 1 [0/0] {67} ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {66} ¦ ¦ ¦ ¦ ¦--':': : [0/0] {68} - ¦ ¦ ¦ ¦ °--expr: [0/0] {70} + ¦ ¦ ¦ ¦ °--expr: 2 [0/0] {70} ¦ ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {69} ¦ ¦ ¦ °--']': ] [0/0] {71} ¦ ¦ ¦--',': , [0/0] {72} - ¦ ¦ ¦--expr: [0/0] {73} + ¦ ¦ ¦--expr: !! ! [0/0] {73} ¦ ¦ ¦ ¦--'!': ! [0/0] {74} - ¦ ¦ ¦ °--expr: [0/0] {75} + ¦ ¦ ¦ °--expr: ! ! n [0/0] {75} ¦ ¦ ¦ ¦--'!': ! [0/1] {76} - ¦ ¦ ¦ °--expr: [0/0] {77} + ¦ ¦ ¦ °--expr: ! nam [0/0] {77} ¦ ¦ ¦ ¦--'!': ! [0/1] {78} - ¦ ¦ ¦ °--expr: [0/0] {80} + ¦ ¦ ¦ °--expr: names [0/0] {80} ¦ ¦ ¦ °--SYMBOL: names [0/0] {79} ¦ ¦ °--')': ) [0/0] {81} ¦ ¦--',': , [0/1] {82} - ¦ ¦--expr: [0/0] {84} + ¦ ¦--expr: 3 [0/0] {84} ¦ ¦ °--NUM_CONST: 3 [0/0] {83} ¦ °--')': ) [0/0] {85} - ¦--expr: [1/0] {86} - ¦ ¦--expr: [0/0] {88} + ¦--expr: head( [1/0] {86} + ¦ ¦--expr: head [0/0] {88} ¦ ¦ °--SYMBOL_FUNCTION_CALL: head [0/0] {87} ¦ ¦--'(': ( [0/0] {89} - ¦ ¦--expr: [0/0] {90} - ¦ ¦ ¦--expr: [0/0] {91} + ¦ ¦--expr: dplyr [0/0] {90} + ¦ ¦ ¦--expr: dplyr [0/0] {91} ¦ ¦ ¦ ¦--SYMBOL_PACKAGE: dplyr [0/0] {92} ¦ ¦ ¦ ¦--NS_GET: :: [0/0] {93} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: renam [0/0] {94} ¦ ¦ ¦--'(': ( [0/0] {95} - ¦ ¦ ¦--expr: [0/0] {96} - ¦ ¦ ¦ ¦--expr: [0/0] {98} + ¦ ¦ ¦--expr: iris[ [0/0] {96} + ¦ ¦ ¦ ¦--expr: iris [0/0] {98} ¦ ¦ ¦ ¦ °--SYMBOL: iris [0/0] {97} ¦ ¦ ¦ ¦--'[': [ [0/0] {99} ¦ ¦ ¦ ¦--',': , [0/0] {100} - ¦ ¦ ¦ ¦--expr: [0/0] {101} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {103} + ¦ ¦ ¦ ¦--expr: 1:2 [0/0] {101} + ¦ ¦ ¦ ¦ ¦--expr: 1 [0/0] {103} ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {102} ¦ ¦ ¦ ¦ ¦--':': : [0/0] {104} - ¦ ¦ ¦ ¦ °--expr: [0/0] {106} + ¦ ¦ ¦ ¦ °--expr: 2 [0/0] {106} ¦ ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {105} ¦ ¦ ¦ °--']': ] [0/0] {107} ¦ ¦ ¦--',': , [0/1] {108} - ¦ ¦ ¦--expr: [0/0] {109} + ¦ ¦ ¦--expr: !!!na [0/0] {109} ¦ ¦ ¦ ¦--'!': ! [0/0] {110} - ¦ ¦ ¦ °--expr: [0/0] {111} + ¦ ¦ ¦ °--expr: !!nam [0/0] {111} ¦ ¦ ¦ ¦--'!': ! [0/0] {112} - ¦ ¦ ¦ °--expr: [0/0] {113} + ¦ ¦ ¦ °--expr: !name [0/0] {113} ¦ ¦ ¦ ¦--'!': ! [0/0] {114} - ¦ ¦ ¦ °--expr: [0/0] {116} + ¦ ¦ ¦ °--expr: names [0/0] {116} ¦ ¦ ¦ °--SYMBOL: names [0/0] {115} ¦ ¦ °--')': ) [0/0] {117} ¦ ¦--',': , [0/1] {118} - ¦ ¦--expr: [0/0] {120} + ¦ ¦--expr: 3 [0/0] {120} ¦ ¦ °--NUM_CONST: 3 [0/0] {119} ¦ °--')': ) [0/0] {121} - °--expr: [1/0] {122} - ¦--expr: [0/1] {124} + °--expr: my_su [1/0] {122} + ¦--expr: my_su [0/1] {124} ¦ °--SYMBOL: my_su [0/0] {123} ¦--LEFT_ASSIGN: <- [0/1] {125} - °--expr: [0/0] {126} + °--expr: funct [0/0] {126} ¦--FUNCTION: funct [0/0] {127} ¦--'(': ( [0/0] {128} ¦--SYMBOL_FORMALS: df [0/0] {129} ¦--',': , [0/1] {130} ¦--SYMBOL_FORMALS: group [0/0] {131} ¦--')': ) [0/1] {132} - °--expr: [0/0] {133} + °--expr: { + d [0/0] {133} ¦--'{': { [0/2] {134} - ¦--expr: [1/0] {135} - ¦ ¦--expr: [0/1] {138} + ¦--expr: df %> [1/0] {135} + ¦ ¦--expr: df [0/1] {138} ¦ ¦ °--SYMBOL: df [0/0] {137} ¦ ¦--SPECIAL-PIPE: %>% [0/4] {139} - ¦ ¦--expr: [1/1] {140} - ¦ ¦ ¦--expr: [0/0] {142} + ¦ ¦--expr: group [1/1] {140} + ¦ ¦ ¦--expr: group [0/0] {142} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: group [0/0] {141} ¦ ¦ ¦--'(': ( [0/1] {143} - ¦ ¦ ¦--expr: [0/0] {144} + ¦ ¦ ¦--expr: ! ! g [0/0] {144} ¦ ¦ ¦ ¦--'!': ! [0/1] {145} - ¦ ¦ ¦ °--expr: [0/0] {146} + ¦ ¦ ¦ °--expr: ! gro [0/0] {146} ¦ ¦ ¦ ¦--'!': ! [0/1] {147} - ¦ ¦ ¦ °--expr: [0/0] {149} + ¦ ¦ ¦ °--expr: group [0/0] {149} ¦ ¦ ¦ °--SYMBOL: group [0/0] {148} ¦ ¦ °--')': ) [0/0] {150} ¦ ¦--SPECIAL-PIPE: %>% [0/4] {151} - ¦ °--expr: [1/0] {152} - ¦ ¦--expr: [0/0] {154} + ¦ °--expr: summa [1/0] {152} + ¦ ¦--expr: summa [0/0] {154} ¦ ¦ °--SYMBOL_FUNCTION_CALL: summa [0/0] {153} ¦ ¦--'(': ( [0/0] {155} ¦ ¦--SYMBOL_SUB: a [0/1] {156} ¦ ¦--EQ_SUB: = [0/1] {157} - ¦ ¦--expr: [0/0] {158} - ¦ ¦ ¦--expr: [0/0] {160} + ¦ ¦--expr: mean( [0/0] {158} + ¦ ¦ ¦--expr: mean [0/0] {160} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: mean [0/0] {159} ¦ ¦ ¦--'(': ( [0/0] {161} - ¦ ¦ ¦--expr: [0/0] {163} + ¦ ¦ ¦--expr: a [0/0] {163} ¦ ¦ ¦ °--SYMBOL: a [0/0] {162} ¦ ¦ °--')': ) [0/0] {164} ¦ °--')': ) [0/0] {165} diff --git a/tests/testthat/tidyeval/eq_sub_and_comma-in_tree b/tests/testthat/tidyeval/eq_sub_and_comma-in_tree index af0da18b6..f707a6e07 100644 --- a/tests/testthat/tidyeval/eq_sub_and_comma-in_tree +++ b/tests/testthat/tidyeval/eq_sub_and_comma-in_tree @@ -1,16 +1,17 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: [0/0] {1} - ¦--expr: [0/1] {3} + °--expr: a <- [0/0] {1} + ¦--expr: a [0/1] {3} ¦ °--SYMBOL: a [0/0] {2} ¦--LEFT_ASSIGN: <- [0/1] {4} - °--expr: [0/0] {5} + °--expr: funct [0/0] {5} ¦--FUNCTION: funct [0/0] {6} ¦--'(': ( [0/0] {7} ¦--')': ) [0/1] {8} - °--expr: [0/0] {9} + °--expr: { + d [0/0] {9} ¦--'{': { [0/2] {10} - ¦--expr: [1/0] {11} - ¦ ¦--expr: [0/0] {13} + ¦--expr: data_ [1/0] {11} + ¦ ¦--expr: data_ [0/0] {13} ¦ ¦ °--SYMBOL_FUNCTION_CALL: data_ [0/0] {12} ¦ ¦--'(': ( [0/4] {14} ¦ ¦--SYMBOL_SUB: b [1/1] {15} diff --git a/tests/testthat/tidyeval/setting_var_names-in_tree b/tests/testthat/tidyeval/setting_var_names-in_tree index fe87157ae..32cc2cfda 100644 --- a/tests/testthat/tidyeval/setting_var_names-in_tree +++ b/tests/testthat/tidyeval/setting_var_names-in_tree @@ -1,46 +1,46 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: [0/0] {1} - ¦--expr: [0/1] {4} + °--expr: mtcar [0/0] {1} + ¦--expr: mtcar [0/1] {4} ¦ °--SYMBOL: mtcar [0/0] {3} ¦--SPECIAL-PIPE: %>% [0/2] {5} - ¦--expr: [1/1] {6} - ¦ ¦--expr: [0/0] {8} + ¦--expr: group [1/1] {6} + ¦ ¦--expr: group [0/0] {8} ¦ ¦ °--SYMBOL_FUNCTION_CALL: group [0/0] {7} ¦ ¦--'(': ( [0/0] {9} - ¦ ¦--expr: [0/0] {11} + ¦ ¦--expr: am [0/0] {11} ¦ ¦ °--SYMBOL: am [0/0] {10} ¦ °--')': ) [0/0] {12} ¦--SPECIAL-PIPE: %>% [0/2] {13} - °--expr: [1/0] {14} - ¦--expr: [0/0] {16} + °--expr: summa [1/0] {14} + ¦--expr: summa [0/0] {16} ¦ °--SYMBOL_FUNCTION_CALL: summa [0/0] {15} ¦--'(': ( [0/4] {17} - ¦--expr: [1/0] {18} - ¦ ¦--expr: [0/0] {19} + ¦--expr: !!mea [1/0] {18} + ¦ ¦--expr: !!mea [0/0] {19} ¦ ¦ ¦--'!': ! [0/0] {20} - ¦ ¦ °--expr: [0/0] {21} + ¦ ¦ °--expr: !mean [0/0] {21} ¦ ¦ ¦--'!': ! [0/0] {22} - ¦ ¦ °--expr: [0/0] {24} + ¦ ¦ °--expr: mean_ [0/0] {24} ¦ ¦ °--SYMBOL: mean_ [0/0] {23} ¦ ¦--LEFT_ASSIGN: := [0/0] {25} - ¦ °--expr: [0/0] {26} - ¦ ¦--expr: [0/0] {28} + ¦ °--expr: mean( [0/0] {26} + ¦ ¦--expr: mean [0/0] {28} ¦ ¦ °--SYMBOL_FUNCTION_CALL: mean [0/0] {27} ¦ ¦--'(': ( [0/0] {29} - ¦ ¦--expr: [0/0] {31} + ¦ ¦--expr: cyl [0/0] {31} ¦ ¦ °--SYMBOL: cyl [0/0] {30} ¦ °--')': ) [0/0] {32} ¦--',': , [0/4] {33} - ¦--expr: [1/2] {34} - ¦ ¦--expr: [0/4] {35} + ¦--expr: !!cou [1/2] {34} + ¦ ¦--expr: !!cou [0/4] {35} ¦ ¦ ¦--'!': ! [0/0] {36} - ¦ ¦ °--expr: [0/0] {37} + ¦ ¦ °--expr: !coun [0/0] {37} ¦ ¦ ¦--'!': ! [0/0] {38} - ¦ ¦ °--expr: [0/0] {40} + ¦ ¦ °--expr: count [0/0] {40} ¦ ¦ °--SYMBOL: count [0/0] {39} ¦ ¦--LEFT_ASSIGN: := [0/0] {41} - ¦ °--expr: [0/0] {42} - ¦ ¦--expr: [0/0] {44} + ¦ °--expr: n() [0/0] {42} + ¦ ¦--expr: n [0/0] {44} ¦ ¦ °--SYMBOL_FUNCTION_CALL: n [0/0] {43} ¦ ¦--'(': ( [0/0] {45} ¦ °--')': ) [0/0] {46} diff --git a/tests/testthat/token_adding_removing/add_brackets_in_pipe-in_tree b/tests/testthat/token_adding_removing/add_brackets_in_pipe-in_tree index 489f4a963..41937bcfc 100644 --- a/tests/testthat/token_adding_removing/add_brackets_in_pipe-in_tree +++ b/tests/testthat/token_adding_removing/add_brackets_in_pipe-in_tree @@ -1,31 +1,31 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} - ¦ ¦--expr: [0/1] {3} + ¦--expr: 1 %>% [0/0] {1} + ¦ ¦--expr: 1 [0/1] {3} ¦ ¦ °--NUM_CONST: 1 [0/0] {2} ¦ ¦--SPECIAL-PIPE: %>% [0/1] {4} - ¦ °--expr: [0/0] {6} + ¦ °--expr: 2 [0/0] {6} ¦ °--NUM_CONST: 2 [0/0] {5} - ¦--expr: [1/0] {7} - ¦ ¦--expr: [0/1] {9} + ¦--expr: 1 %x% [1/0] {7} + ¦ ¦--expr: 1 [0/1] {9} ¦ ¦ °--NUM_CONST: 1 [0/0] {8} ¦ ¦--SPECIAL-OTHER: %x% [0/1] {10} - ¦ °--expr: [0/0] {12} + ¦ °--expr: 1 [0/0] {12} ¦ °--NUM_CONST: 1 [0/0] {11} - ¦--expr: [1/0] {13} - ¦ ¦--expr: [0/1] {15} + ¦--expr: 1 %x% [1/0] {13} + ¦ ¦--expr: 1 [0/1] {15} ¦ ¦ °--NUM_CONST: 1 [0/0] {14} ¦ ¦--SPECIAL-OTHER: %x% [0/1] {16} - ¦ °--expr: [0/0] {18} + ¦ °--expr: y [0/0] {18} ¦ °--SYMBOL: y [0/0] {17} - ¦--expr: [1/0] {19} - ¦ ¦--expr: [0/1] {21} + ¦--expr: 1 %>% [1/0] {19} + ¦ ¦--expr: 1 [0/1] {21} ¦ ¦ °--NUM_CONST: 1 [0/0] {20} ¦ ¦--SPECIAL-PIPE: %>% [0/1] {22} - ¦ °--expr: [0/0] {24} + ¦ °--expr: x [0/0] {24} ¦ °--SYMBOL: x [0/0] {23} - °--expr: [1/0] {25} - ¦--expr: [0/1] {27} + °--expr: 1 %s% [1/0] {25} + ¦--expr: 1 [0/1] {27} ¦ °--NUM_CONST: 1 [0/0] {26} ¦--SPECIAL-OTHER: %s% [0/1] {28} - °--expr: [0/0] {30} + °--expr: 1 [0/0] {30} °--NUM_CONST: 1 [0/0] {29} diff --git a/tests/testthat/token_adding_removing/double_braces-in_tree b/tests/testthat/token_adding_removing/double_braces-in_tree index 901096bed..6ae6d16e2 100644 --- a/tests/testthat/token_adding_removing/double_braces-in_tree +++ b/tests/testthat/token_adding_removing/double_braces-in_tree @@ -1,27 +1,27 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} + ¦--expr: if (X [0/0] {1} ¦ ¦--IF: if [0/1] {2} ¦ ¦--'(': ( [0/0] {3} - ¦ ¦--expr: [0/0] {5} + ¦ ¦--expr: X [0/0] {5} ¦ ¦ °--SYMBOL: X [0/0] {4} ¦ ¦--')': ) [0/2] {6} - ¦ °--expr: [1/0] {7} - ¦ ¦--expr: [0/0] {9} + ¦ °--expr: retur [1/0] {7} + ¦ ¦--expr: retur [0/0] {9} ¦ ¦ °--SYMBOL_FUNCTION_CALL: retur [0/0] {8} ¦ ¦--'(': ( [0/0] {10} - ¦ ¦--expr: [0/0] {12} + ¦ ¦--expr: TRUE [0/0] {12} ¦ ¦ °--NUM_CONST: TRUE [0/0] {11} ¦ °--')': ) [0/0] {13} - °--expr: [2/0] {14} + °--expr: if (X [2/0] {14} ¦--IF: if [0/1] {15} ¦--'(': ( [0/0] {16} - ¦--expr: [0/0] {18} + ¦--expr: X [0/0] {18} ¦ °--SYMBOL: X [0/0] {17} ¦--')': ) [0/1] {19} - °--expr: [0/0] {20} - ¦--expr: [0/0] {22} + °--expr: retur [0/0] {20} + ¦--expr: retur [0/0] {22} ¦ °--SYMBOL_FUNCTION_CALL: retur [0/0] {21} ¦--'(': ( [0/0] {23} - ¦--expr: [0/0] {25} + ¦--expr: FALSE [0/0] {25} ¦ °--NUM_CONST: FALSE [0/0] {24} °--')': ) [0/0] {26} diff --git a/tests/testthat/token_adding_removing/if-else-comma-in_tree b/tests/testthat/token_adding_removing/if-else-comma-in_tree index 7036a3cff..00da35b6a 100644 --- a/tests/testthat/token_adding_removing/if-else-comma-in_tree +++ b/tests/testthat/token_adding_removing/if-else-comma-in_tree @@ -1,89 +1,89 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} - ¦ ¦--expr: [0/0] {3} + ¦--expr: call( [0/0] {1} + ¦ ¦--expr: call [0/0] {3} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {2} ¦ ¦--'(': ( [0/2] {4} - ¦ ¦--expr: [1/0] {5} + ¦ ¦--expr: if (x [1/0] {5} ¦ ¦ ¦--IF: if [0/1] {6} ¦ ¦ ¦--'(': ( [0/0] {7} - ¦ ¦ ¦--expr: [0/0] {9} + ¦ ¦ ¦--expr: x [0/0] {9} ¦ ¦ ¦ °--SYMBOL: x [0/0] {8} ¦ ¦ ¦--')': ) [0/4] {10} - ¦ ¦ °--expr: [1/0] {12} + ¦ ¦ °--expr: y [1/0] {12} ¦ ¦ °--SYMBOL: y [0/0] {11} ¦ ¦--',': , [0/2] {13} - ¦ ¦--expr: [1/0] {14} + ¦ ¦--expr: if(x) [1/0] {14} ¦ ¦ ¦--IF: if [0/0] {15} ¦ ¦ ¦--'(': ( [0/0] {16} - ¦ ¦ ¦--expr: [0/0] {18} + ¦ ¦ ¦--expr: x [0/0] {18} ¦ ¦ ¦ °--SYMBOL: x [0/0] {17} ¦ ¦ ¦--')': ) [0/4] {19} - ¦ ¦ °--expr: [1/0] {21} + ¦ ¦ °--expr: z [1/0] {21} ¦ ¦ °--SYMBOL: z [0/0] {20} ¦ °--')': ) [1/0] {22} - ¦--expr: [2/0] {23} - ¦ ¦--expr: [0/0] {25} + ¦--expr: call( [2/0] {23} + ¦ ¦--expr: call [0/0] {25} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {24} ¦ ¦--'(': ( [0/0] {26} - ¦ ¦--expr: [0/1] {27} + ¦ ¦--expr: if (x [0/1] {27} ¦ ¦ ¦--IF: if [0/1] {28} ¦ ¦ ¦--'(': ( [0/0] {29} - ¦ ¦ ¦--expr: [0/0] {31} + ¦ ¦ ¦--expr: x [0/0] {31} ¦ ¦ ¦ °--SYMBOL: x [0/0] {30} ¦ ¦ ¦--')': ) [0/1] {32} - ¦ ¦ °--expr: [0/0] {34} + ¦ ¦ °--expr: y [0/0] {34} ¦ ¦ °--SYMBOL: y [0/0] {33} ¦ ¦--',': , [0/5] {35} - ¦ ¦--expr: [1/1] {36} + ¦ ¦--expr: if(x) [1/1] {36} ¦ ¦ ¦--IF: if [0/0] {37} ¦ ¦ ¦--'(': ( [0/0] {38} - ¦ ¦ ¦--expr: [0/0] {40} + ¦ ¦ ¦--expr: x [0/0] {40} ¦ ¦ ¦ °--SYMBOL: x [0/0] {39} ¦ ¦ ¦--')': ) [0/1] {41} - ¦ ¦ °--expr: [0/0] {43} + ¦ ¦ °--expr: z [0/0] {43} ¦ ¦ °--SYMBOL: z [0/0] {42} ¦ °--')': ) [0/0] {44} - ¦--expr: [2/0] {45} - ¦ ¦--expr: [0/0] {47} + ¦--expr: call( [2/0] {45} + ¦ ¦--expr: call [0/0] {47} ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {46} ¦ ¦--'(': ( [0/0] {48} - ¦ ¦--expr: [0/0] {49} + ¦ ¦--expr: if (x [0/0] {49} ¦ ¦ ¦--IF: if [0/1] {50} ¦ ¦ ¦--'(': ( [0/0] {51} - ¦ ¦ ¦--expr: [0/0] {53} + ¦ ¦ ¦--expr: x [0/0] {53} ¦ ¦ ¦ °--SYMBOL: x [0/0] {52} ¦ ¦ ¦--')': ) [0/1] {54} - ¦ ¦ °--expr: [0/0] {56} + ¦ ¦ °--expr: y [0/0] {56} ¦ ¦ °--SYMBOL: y [0/0] {55} ¦ ¦--',': , [0/5] {57} - ¦ ¦--expr: [1/1] {58} + ¦ ¦--expr: if(x) [1/1] {58} ¦ ¦ ¦--IF: if [0/0] {59} ¦ ¦ ¦--'(': ( [0/0] {60} - ¦ ¦ ¦--expr: [0/0] {62} + ¦ ¦ ¦--expr: x [0/0] {62} ¦ ¦ ¦ °--SYMBOL: x [0/0] {61} ¦ ¦ ¦--')': ) [0/1] {63} - ¦ ¦ °--expr: [0/0] {65} + ¦ ¦ °--expr: z [0/0] {65} ¦ ¦ °--SYMBOL: z [0/0] {64} ¦ °--')': ) [0/0] {66} - °--expr: [2/0] {67} - ¦--expr: [0/0] {69} + °--expr: call( [2/0] {67} + ¦--expr: call [0/0] {69} ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {68} ¦--'(': ( [0/0] {70} - ¦--expr: [0/0] {71} + ¦--expr: if (x [0/0] {71} ¦ ¦--IF: if [0/1] {72} ¦ ¦--'(': ( [0/0] {73} - ¦ ¦--expr: [0/0] {75} + ¦ ¦--expr: x [0/0] {75} ¦ ¦ °--SYMBOL: x [0/0] {74} ¦ ¦--')': ) [0/1] {76} - ¦ °--expr: [0/0] {78} + ¦ °--expr: y [0/0] {78} ¦ °--SYMBOL: y [0/0] {77} ¦--',': , [0/5] {79} - ¦--expr: [1/0] {80} + ¦--expr: if(x) [1/0] {80} ¦ ¦--IF: if [0/0] {81} ¦ ¦--'(': ( [0/0] {82} - ¦ ¦--expr: [0/0] {84} + ¦ ¦--expr: x [0/0] {84} ¦ ¦ °--SYMBOL: x [0/0] {83} ¦ ¦--')': ) [0/1] {85} - ¦ °--expr: [0/0] {87} + ¦ °--expr: z [0/0] {87} ¦ °--SYMBOL: z [0/0] {86} °--')': ) [0/0] {88} diff --git a/tests/testthat/token_adding_removing/if_else_non_strict-in_tree b/tests/testthat/token_adding_removing/if_else_non_strict-in_tree index 785d5f6e4..ad8fd9ee7 100644 --- a/tests/testthat/token_adding_removing/if_else_non_strict-in_tree +++ b/tests/testthat/token_adding_removing/if_else_non_strict-in_tree @@ -1,165 +1,173 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} + ¦--expr: { + i [0/0] {1} ¦ ¦--'{': { [0/2] {2} - ¦ ¦--expr: [1/0] {3} + ¦ ¦--expr: if (T [1/0] {3} ¦ ¦ ¦--IF: if [0/1] {4} ¦ ¦ ¦--'(': ( [0/0] {5} - ¦ ¦ ¦--expr: [0/0] {7} + ¦ ¦ ¦--expr: TRUE [0/0] {7} ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {6} ¦ ¦ ¦--')': ) [0/4] {8} - ¦ ¦ ¦--expr: [1/0] {10} + ¦ ¦ ¦--expr: 3 [1/0] {10} ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {9} ¦ ¦ ¦--ELSE: else [1/0] {11} - ¦ ¦ °--expr: [1/0] {13} + ¦ ¦ °--expr: 5 [1/0] {13} ¦ ¦ °--NUM_CONST: 5 [0/0] {12} ¦ °--'}': } [1/0] {14} - ¦--expr: [3/0] {15} + ¦--expr: { + i [3/0] {15} ¦ ¦--'{': { [0/2] {16} - ¦ ¦--expr: [1/3] {17} + ¦ ¦--expr: if (T [1/3] {17} ¦ ¦ ¦--IF: if [0/1] {18} ¦ ¦ ¦--'(': ( [0/0] {19} - ¦ ¦ ¦--expr: [0/0] {21} + ¦ ¦ ¦--expr: TRUE [0/0] {21} ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {20} ¦ ¦ ¦--')': ) [0/1] {22} - ¦ ¦ ¦--expr: [0/0] {23} + ¦ ¦ ¦--expr: { + [0/0] {23} ¦ ¦ ¦ ¦--'{': { [0/4] {24} - ¦ ¦ ¦ ¦--expr: [1/4] {26} + ¦ ¦ ¦ ¦--expr: 3 [1/4] {26} ¦ ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {25} - ¦ ¦ ¦ ¦--expr: [1/3] {27} - ¦ ¦ ¦ ¦ ¦--expr: [0/1] {29} + ¦ ¦ ¦ ¦--expr: a + b [1/3] {27} + ¦ ¦ ¦ ¦ ¦--expr: a [0/1] {29} ¦ ¦ ¦ ¦ ¦ °--SYMBOL: a [0/0] {28} ¦ ¦ ¦ ¦ ¦--'+': + [0/1] {30} - ¦ ¦ ¦ ¦ °--expr: [0/0] {32} + ¦ ¦ ¦ ¦ °--expr: b [0/0] {32} ¦ ¦ ¦ ¦ °--SYMBOL: b [0/0] {31} ¦ ¦ ¦ °--'}': } [1/0] {33} ¦ ¦ ¦--ELSE: else [0/4] {34} - ¦ ¦ °--expr: [1/0] {36} + ¦ ¦ °--expr: 5 [1/0] {36} ¦ ¦ °--NUM_CONST: 5 [0/0] {35} - ¦ ¦--expr: [2/0] {37} - ¦ ¦ ¦--expr: [0/0] {39} + ¦ ¦--expr: c() [2/0] {37} + ¦ ¦ ¦--expr: c [0/0] {39} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {38} ¦ ¦ ¦--'(': ( [0/0] {40} ¦ ¦ °--')': ) [0/0] {41} ¦ °--'}': } [1/0] {42} - ¦--expr: [3/0] {43} + ¦--expr: { + i [3/0] {43} ¦ ¦--'{': { [0/2] {44} - ¦ ¦--expr: [1/0] {45} + ¦ ¦--expr: if (T [1/0] {45} ¦ ¦ ¦--IF: if [0/1] {46} ¦ ¦ ¦--'(': ( [0/0] {47} - ¦ ¦ ¦--expr: [0/0] {49} + ¦ ¦ ¦--expr: TRUE [0/0] {49} ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {48} ¦ ¦ ¦--')': ) [0/4] {50} - ¦ ¦ ¦--expr: [1/2] {52} + ¦ ¦ ¦--expr: 3 [1/2] {52} ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {51} ¦ ¦ ¦--ELSE: else [1/1] {53} - ¦ ¦ °--expr: [0/0] {54} + ¦ ¦ °--expr: { + [0/0] {54} ¦ ¦ ¦--'{': { [0/4] {55} - ¦ ¦ ¦--expr: [1/4] {56} - ¦ ¦ ¦ ¦--expr: [0/0] {58} + ¦ ¦ ¦--expr: h() [1/4] {56} + ¦ ¦ ¦ ¦--expr: h [0/0] {58} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: h [0/0] {57} ¦ ¦ ¦ ¦--'(': ( [0/0] {59} ¦ ¦ ¦ °--')': ) [0/0] {60} - ¦ ¦ ¦--expr: [1/1] {62} + ¦ ¦ ¦--expr: 5 [1/1] {62} ¦ ¦ ¦ °--NUM_CONST: 5 [0/0] {61} ¦ ¦ °--'}': } [0/0] {63} ¦ °--'}': } [1/0] {64} - ¦--expr: [3/0] {65} + ¦--expr: { + i [3/0] {65} ¦ ¦--'{': { [0/2] {66} - ¦ ¦--expr: [1/0] {67} + ¦ ¦--expr: if (T [1/0] {67} ¦ ¦ ¦--IF: if [0/1] {68} ¦ ¦ ¦--'(': ( [0/0] {69} - ¦ ¦ ¦--expr: [0/0] {71} + ¦ ¦ ¦--expr: TRUE [0/0] {71} ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {70} ¦ ¦ ¦--')': ) [0/1] {72} - ¦ ¦ ¦--expr: [0/0] {73} + ¦ ¦ ¦--expr: { + [0/0] {73} ¦ ¦ ¦ ¦--'{': { [0/4] {74} - ¦ ¦ ¦ ¦--expr: [1/2] {76} + ¦ ¦ ¦ ¦--expr: 3 [1/2] {76} ¦ ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {75} ¦ ¦ ¦ °--'}': } [1/0] {77} ¦ ¦ ¦--ELSE: else [0/1] {78} - ¦ ¦ °--expr: [0/0] {79} + ¦ ¦ °--expr: { + [0/0] {79} ¦ ¦ ¦--'{': { [0/4] {80} - ¦ ¦ ¦--expr: [1/4] {81} - ¦ ¦ ¦ ¦--expr: [0/0] {83} + ¦ ¦ ¦--expr: s() [1/4] {81} + ¦ ¦ ¦ ¦--expr: s [0/0] {83} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: s [0/0] {82} ¦ ¦ ¦ ¦--'(': ( [0/0] {84} ¦ ¦ ¦ °--')': ) [0/0] {85} - ¦ ¦ ¦--expr: [1/1] {87} + ¦ ¦ ¦--expr: 5 [1/1] {87} ¦ ¦ ¦ °--NUM_CONST: 5 [0/0] {86} ¦ ¦ °--'}': } [0/0] {88} ¦ °--'}': } [1/0] {89} - ¦--expr: [2/0] {90} + ¦--expr: if (T [2/0] {90} ¦ ¦--IF: if [0/1] {91} ¦ ¦--'(': ( [0/0] {92} - ¦ ¦--expr: [0/0] {94} + ¦ ¦--expr: TRUE [0/0] {94} ¦ ¦ °--NUM_CONST: TRUE [0/0] {93} ¦ ¦--')': ) [0/2] {95} - ¦ ¦--expr: [1/1] {97} + ¦ ¦--expr: 1 [1/1] {97} ¦ ¦ °--NUM_CONST: 1 [0/0] {96} ¦ ¦--ELSE: else [0/4] {98} - ¦ °--expr: [1/0] {100} + ¦ °--expr: 3 [1/0] {100} ¦ °--NUM_CONST: 3 [0/0] {99} - ¦--expr: [2/0] {101} + ¦--expr: if (F [2/0] {101} ¦ ¦--IF: if [0/1] {102} ¦ ¦--'(': ( [0/0] {103} - ¦ ¦--expr: [0/0] {105} + ¦ ¦--expr: FALSE [0/0] {105} ¦ ¦ °--NUM_CONST: FALSE [0/0] {104} ¦ ¦--')': ) [0/2] {106} - ¦ ¦--expr: [1/1] {107} - ¦ ¦ ¦--expr: [0/1] {109} + ¦ ¦--expr: 1 + a [1/1] {107} + ¦ ¦ ¦--expr: 1 [0/1] {109} ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {108} ¦ ¦ ¦--'+': + [0/1] {110} - ¦ ¦ °--expr: [0/0] {111} - ¦ ¦ ¦--expr: [0/1] {113} + ¦ ¦ °--expr: a * ( [0/0] {111} + ¦ ¦ ¦--expr: a [0/1] {113} ¦ ¦ ¦ °--SYMBOL: a [0/0] {112} ¦ ¦ ¦--'*': * [0/1] {114} - ¦ ¦ °--expr: [0/0] {115} + ¦ ¦ °--expr: ( 31/ [0/0] {115} ¦ ¦ ¦--'(': ( [0/1] {116} - ¦ ¦ ¦--expr: [0/0] {117} - ¦ ¦ ¦ ¦--expr: [0/0] {119} + ¦ ¦ ¦--expr: 31/2 [0/0] {117} + ¦ ¦ ¦ ¦--expr: 31 [0/0] {119} ¦ ¦ ¦ ¦ °--NUM_CONST: 31 [0/0] {118} ¦ ¦ ¦ ¦--'/': / [0/0] {120} - ¦ ¦ ¦ °--expr: [0/0] {122} + ¦ ¦ ¦ °--expr: 2 [0/0] {122} ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {121} ¦ ¦ °--')': ) [0/0] {123} ¦ ¦--ELSE: else [0/4] {124} - ¦ °--expr: [1/0] {125} - ¦ ¦--expr: [0/0] {127} + ¦ °--expr: 3^k [1/0] {125} + ¦ ¦--expr: 3 [0/0] {127} ¦ ¦ °--NUM_CONST: 3 [0/0] {126} ¦ ¦--'^': ^ [0/0] {128} - ¦ °--expr: [0/0] {130} + ¦ °--expr: k [0/0] {130} ¦ °--SYMBOL: k [0/0] {129} - ¦--expr: [3/0] {131} + ¦--expr: if (T [3/0] {131} ¦ ¦--IF: if [0/1] {132} ¦ ¦--'(': ( [0/0] {133} - ¦ ¦--expr: [0/0] {135} + ¦ ¦--expr: TRUE [0/0] {135} ¦ ¦ °--NUM_CONST: TRUE [0/0] {134} ¦ ¦--')': ) [0/2] {136} - ¦ ¦--expr: [1/1] {137} - ¦ ¦ ¦--expr: [0/0] {139} + ¦ ¦--expr: 1+1 [1/1] {137} + ¦ ¦ ¦--expr: 1 [0/0] {139} ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {138} ¦ ¦ ¦--'+': + [0/0] {140} - ¦ ¦ °--expr: [0/0] {142} + ¦ ¦ °--expr: 1 [0/0] {142} ¦ ¦ °--NUM_CONST: 1 [0/0] {141} ¦ ¦--ELSE: else [0/4] {143} - ¦ °--expr: [1/0] {145} + ¦ °--expr: 3 [1/0] {145} ¦ °--NUM_CONST: 3 [0/0] {144} - °--expr: [2/0] {146} + °--expr: if (T [2/0] {146} ¦--IF: if [0/1] {147} ¦--'(': ( [0/0] {148} - ¦--expr: [0/0] {150} + ¦--expr: TRUE [0/0] {150} ¦ °--NUM_CONST: TRUE [0/0] {149} ¦--')': ) [0/2] {151} - ¦--expr: [1/1] {152} - ¦ ¦--expr: [0/1] {154} + ¦--expr: 1 + 1 [1/1] {152} + ¦ ¦--expr: 1 [0/1] {154} ¦ ¦ °--NUM_CONST: 1 [0/0] {153} ¦ ¦--'+': + [0/1] {155} - ¦ °--expr: [0/0] {157} + ¦ °--expr: 1 [0/0] {157} ¦ °--NUM_CONST: 1 [0/0] {156} ¦--ELSE: else [0/1] {158} - °--expr: [0/0] {159} - ¦--expr: [0/1] {161} + °--expr: a +4 [0/0] {159} + ¦--expr: a [0/1] {161} ¦ °--SYMBOL: a [0/0] {160} ¦--'+': + [0/0] {162} - °--expr: [0/0] {164} + °--expr: 4 [0/0] {164} °--NUM_CONST: 4 [0/0] {163} diff --git a/tests/testthat/token_adding_removing/if_else_strict-in_tree b/tests/testthat/token_adding_removing/if_else_strict-in_tree index 700808bf1..e5d3a6155 100644 --- a/tests/testthat/token_adding_removing/if_else_strict-in_tree +++ b/tests/testthat/token_adding_removing/if_else_strict-in_tree @@ -1,165 +1,173 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} + ¦--expr: { + i [0/0] {1} ¦ ¦--'{': { [0/2] {2} - ¦ ¦--expr: [1/0] {3} + ¦ ¦--expr: if (T [1/0] {3} ¦ ¦ ¦--IF: if [0/1] {4} ¦ ¦ ¦--'(': ( [0/0] {5} - ¦ ¦ ¦--expr: [0/0] {7} + ¦ ¦ ¦--expr: TRUE [0/0] {7} ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {6} ¦ ¦ ¦--')': ) [0/4] {8} - ¦ ¦ ¦--expr: [1/0] {10} + ¦ ¦ ¦--expr: 3 [1/0] {10} ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {9} ¦ ¦ ¦--ELSE: else [1/0] {11} - ¦ ¦ °--expr: [1/0] {13} + ¦ ¦ °--expr: 5 [1/0] {13} ¦ ¦ °--NUM_CONST: 5 [0/0] {12} ¦ °--'}': } [1/0] {14} - ¦--expr: [3/0] {15} + ¦--expr: { + i [3/0] {15} ¦ ¦--'{': { [0/2] {16} - ¦ ¦--expr: [1/3] {17} + ¦ ¦--expr: if (T [1/3] {17} ¦ ¦ ¦--IF: if [0/1] {18} ¦ ¦ ¦--'(': ( [0/0] {19} - ¦ ¦ ¦--expr: [0/0] {21} + ¦ ¦ ¦--expr: TRUE [0/0] {21} ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {20} ¦ ¦ ¦--')': ) [0/1] {22} - ¦ ¦ ¦--expr: [0/0] {23} + ¦ ¦ ¦--expr: { + [0/0] {23} ¦ ¦ ¦ ¦--'{': { [0/4] {24} - ¦ ¦ ¦ ¦--expr: [1/4] {26} + ¦ ¦ ¦ ¦--expr: 3 [1/4] {26} ¦ ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {25} - ¦ ¦ ¦ ¦--expr: [1/3] {27} - ¦ ¦ ¦ ¦ ¦--expr: [0/1] {29} + ¦ ¦ ¦ ¦--expr: a + b [1/3] {27} + ¦ ¦ ¦ ¦ ¦--expr: a [0/1] {29} ¦ ¦ ¦ ¦ ¦ °--SYMBOL: a [0/0] {28} ¦ ¦ ¦ ¦ ¦--'+': + [0/1] {30} - ¦ ¦ ¦ ¦ °--expr: [0/0] {32} + ¦ ¦ ¦ ¦ °--expr: b [0/0] {32} ¦ ¦ ¦ ¦ °--SYMBOL: b [0/0] {31} ¦ ¦ ¦ °--'}': } [1/0] {33} ¦ ¦ ¦--ELSE: else [0/4] {34} - ¦ ¦ °--expr: [1/0] {36} + ¦ ¦ °--expr: 5 [1/0] {36} ¦ ¦ °--NUM_CONST: 5 [0/0] {35} - ¦ ¦--expr: [2/0] {37} - ¦ ¦ ¦--expr: [0/0] {39} + ¦ ¦--expr: c() [2/0] {37} + ¦ ¦ ¦--expr: c [0/0] {39} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {38} ¦ ¦ ¦--'(': ( [0/0] {40} ¦ ¦ °--')': ) [0/0] {41} ¦ °--'}': } [1/0] {42} - ¦--expr: [3/0] {43} + ¦--expr: { + i [3/0] {43} ¦ ¦--'{': { [0/2] {44} - ¦ ¦--expr: [1/0] {45} + ¦ ¦--expr: if (T [1/0] {45} ¦ ¦ ¦--IF: if [0/1] {46} ¦ ¦ ¦--'(': ( [0/0] {47} - ¦ ¦ ¦--expr: [0/0] {49} + ¦ ¦ ¦--expr: TRUE [0/0] {49} ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {48} ¦ ¦ ¦--')': ) [0/4] {50} - ¦ ¦ ¦--expr: [1/2] {52} + ¦ ¦ ¦--expr: 3 [1/2] {52} ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {51} ¦ ¦ ¦--ELSE: else [1/1] {53} - ¦ ¦ °--expr: [0/0] {54} + ¦ ¦ °--expr: { + [0/0] {54} ¦ ¦ ¦--'{': { [0/4] {55} - ¦ ¦ ¦--expr: [1/4] {56} - ¦ ¦ ¦ ¦--expr: [0/0] {58} + ¦ ¦ ¦--expr: h() [1/4] {56} + ¦ ¦ ¦ ¦--expr: h [0/0] {58} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: h [0/0] {57} ¦ ¦ ¦ ¦--'(': ( [0/0] {59} ¦ ¦ ¦ °--')': ) [0/0] {60} - ¦ ¦ ¦--expr: [1/1] {62} + ¦ ¦ ¦--expr: 5 [1/1] {62} ¦ ¦ ¦ °--NUM_CONST: 5 [0/0] {61} ¦ ¦ °--'}': } [0/0] {63} ¦ °--'}': } [1/0] {64} - ¦--expr: [3/0] {65} + ¦--expr: { + i [3/0] {65} ¦ ¦--'{': { [0/2] {66} - ¦ ¦--expr: [1/0] {67} + ¦ ¦--expr: if (T [1/0] {67} ¦ ¦ ¦--IF: if [0/1] {68} ¦ ¦ ¦--'(': ( [0/0] {69} - ¦ ¦ ¦--expr: [0/0] {71} + ¦ ¦ ¦--expr: TRUE [0/0] {71} ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {70} ¦ ¦ ¦--')': ) [0/1] {72} - ¦ ¦ ¦--expr: [0/0] {73} + ¦ ¦ ¦--expr: { + [0/0] {73} ¦ ¦ ¦ ¦--'{': { [0/4] {74} - ¦ ¦ ¦ ¦--expr: [1/2] {76} + ¦ ¦ ¦ ¦--expr: 3 [1/2] {76} ¦ ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {75} ¦ ¦ ¦ °--'}': } [1/0] {77} ¦ ¦ ¦--ELSE: else [0/1] {78} - ¦ ¦ °--expr: [0/0] {79} + ¦ ¦ °--expr: { + [0/0] {79} ¦ ¦ ¦--'{': { [0/4] {80} - ¦ ¦ ¦--expr: [1/4] {81} - ¦ ¦ ¦ ¦--expr: [0/0] {83} + ¦ ¦ ¦--expr: s() [1/4] {81} + ¦ ¦ ¦ ¦--expr: s [0/0] {83} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: s [0/0] {82} ¦ ¦ ¦ ¦--'(': ( [0/0] {84} ¦ ¦ ¦ °--')': ) [0/0] {85} - ¦ ¦ ¦--expr: [1/1] {87} + ¦ ¦ ¦--expr: 5 [1/1] {87} ¦ ¦ ¦ °--NUM_CONST: 5 [0/0] {86} ¦ ¦ °--'}': } [0/0] {88} ¦ °--'}': } [1/0] {89} - ¦--expr: [2/0] {90} + ¦--expr: if (T [2/0] {90} ¦ ¦--IF: if [0/1] {91} ¦ ¦--'(': ( [0/0] {92} - ¦ ¦--expr: [0/0] {94} + ¦ ¦--expr: TRUE [0/0] {94} ¦ ¦ °--NUM_CONST: TRUE [0/0] {93} ¦ ¦--')': ) [0/2] {95} - ¦ ¦--expr: [1/1] {97} + ¦ ¦--expr: 1 [1/1] {97} ¦ ¦ °--NUM_CONST: 1 [0/0] {96} ¦ ¦--ELSE: else [0/2] {98} - ¦ °--expr: [1/0] {100} + ¦ °--expr: 3 [1/0] {100} ¦ °--NUM_CONST: 3 [0/0] {99} - ¦--expr: [2/0] {101} + ¦--expr: if (F [2/0] {101} ¦ ¦--IF: if [0/1] {102} ¦ ¦--'(': ( [0/0] {103} - ¦ ¦--expr: [0/0] {105} + ¦ ¦--expr: FALSE [0/0] {105} ¦ ¦ °--NUM_CONST: FALSE [0/0] {104} ¦ ¦--')': ) [0/2] {106} - ¦ ¦--expr: [1/1] {107} - ¦ ¦ ¦--expr: [0/1] {109} + ¦ ¦--expr: 1 + a [1/1] {107} + ¦ ¦ ¦--expr: 1 [0/1] {109} ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {108} ¦ ¦ ¦--'+': + [0/1] {110} - ¦ ¦ °--expr: [0/0] {111} - ¦ ¦ ¦--expr: [0/1] {113} + ¦ ¦ °--expr: a * ( [0/0] {111} + ¦ ¦ ¦--expr: a [0/1] {113} ¦ ¦ ¦ °--SYMBOL: a [0/0] {112} ¦ ¦ ¦--'*': * [0/1] {114} - ¦ ¦ °--expr: [0/0] {115} + ¦ ¦ °--expr: ( 31/ [0/0] {115} ¦ ¦ ¦--'(': ( [0/1] {116} - ¦ ¦ ¦--expr: [0/0] {117} - ¦ ¦ ¦ ¦--expr: [0/0] {119} + ¦ ¦ ¦--expr: 31/2 [0/0] {117} + ¦ ¦ ¦ ¦--expr: 31 [0/0] {119} ¦ ¦ ¦ ¦ °--NUM_CONST: 31 [0/0] {118} ¦ ¦ ¦ ¦--'/': / [0/0] {120} - ¦ ¦ ¦ °--expr: [0/0] {122} + ¦ ¦ ¦ °--expr: 2 [0/0] {122} ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {121} ¦ ¦ °--')': ) [0/0] {123} ¦ ¦--ELSE: else [0/2] {124} - ¦ °--expr: [1/0] {125} - ¦ ¦--expr: [0/0] {127} + ¦ °--expr: 3^k [1/0] {125} + ¦ ¦--expr: 3 [0/0] {127} ¦ ¦ °--NUM_CONST: 3 [0/0] {126} ¦ ¦--'^': ^ [0/0] {128} - ¦ °--expr: [0/0] {130} + ¦ °--expr: k [0/0] {130} ¦ °--SYMBOL: k [0/0] {129} - ¦--expr: [3/0] {131} + ¦--expr: if (T [3/0] {131} ¦ ¦--IF: if [0/1] {132} ¦ ¦--'(': ( [0/0] {133} - ¦ ¦--expr: [0/0] {135} + ¦ ¦--expr: TRUE [0/0] {135} ¦ ¦ °--NUM_CONST: TRUE [0/0] {134} ¦ ¦--')': ) [0/2] {136} - ¦ ¦--expr: [1/1] {137} - ¦ ¦ ¦--expr: [0/0] {139} + ¦ ¦--expr: 1+1 [1/1] {137} + ¦ ¦ ¦--expr: 1 [0/0] {139} ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {138} ¦ ¦ ¦--'+': + [0/0] {140} - ¦ ¦ °--expr: [0/0] {142} + ¦ ¦ °--expr: 1 [0/0] {142} ¦ ¦ °--NUM_CONST: 1 [0/0] {141} ¦ ¦--ELSE: else [0/4] {143} - ¦ °--expr: [1/0] {145} + ¦ °--expr: 3 [1/0] {145} ¦ °--NUM_CONST: 3 [0/0] {144} - °--expr: [3/0] {146} + °--expr: if (T [3/0] {146} ¦--IF: if [0/1] {147} ¦--'(': ( [0/0] {148} - ¦--expr: [0/0] {150} + ¦--expr: TRUE [0/0] {150} ¦ °--NUM_CONST: TRUE [0/0] {149} ¦--')': ) [0/2] {151} - ¦--expr: [1/1] {152} - ¦ ¦--expr: [0/1] {154} + ¦--expr: 1 + 1 [1/1] {152} + ¦ ¦--expr: 1 [0/1] {154} ¦ ¦ °--NUM_CONST: 1 [0/0] {153} ¦ ¦--'+': + [0/1] {155} - ¦ °--expr: [0/0] {157} + ¦ °--expr: 1 [0/0] {157} ¦ °--NUM_CONST: 1 [0/0] {156} ¦--ELSE: else [0/1] {158} - °--expr: [0/0] {159} - ¦--expr: [0/1] {161} + °--expr: a +4 [0/0] {159} + ¦--expr: a [0/1] {161} ¦ °--SYMBOL: a [0/0] {160} ¦--'+': + [0/0] {162} - °--expr: [0/0] {164} + °--expr: 4 [0/0] {164} °--NUM_CONST: 4 [0/0] {163} diff --git a/tests/testthat/token_adding_removing/mixed_token-in_tree b/tests/testthat/token_adding_removing/mixed_token-in_tree index c83031c3d..e6989b1f0 100644 --- a/tests/testthat/token_adding_removing/mixed_token-in_tree +++ b/tests/testthat/token_adding_removing/mixed_token-in_tree @@ -1,54 +1,54 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--COMMENT: # = r [0/0] {1} - ¦--equal_assign: [1/0] {2} - ¦ ¦--expr: [0/1] {4} + ¦--equal_assign: a = 3 [1/0] {2} + ¦ ¦--expr: a [0/1] {4} ¦ ¦ °--SYMBOL: a [0/0] {3} ¦ ¦--EQ_ASSIGN: = [0/1] {5} - ¦ °--expr: [0/0] {7} + ¦ °--expr: 3 [0/0] {7} ¦ °--NUM_CONST: 3 [0/0] {6} - ¦--expr: [1/0] {8} - ¦ ¦--expr: [0/0] {10} + ¦--expr: data_ [1/0] {8} + ¦ ¦--expr: data_ [0/0] {10} ¦ ¦ °--SYMBOL_FUNCTION_CALL: data_ [0/0] {9} ¦ ¦--'(': ( [0/0] {11} ¦ ¦--SYMBOL_SUB: a [0/1] {12} ¦ ¦--EQ_SUB: = [0/1] {13} - ¦ ¦--expr: [0/0] {15} + ¦ ¦--expr: 3 [0/0] {15} ¦ ¦ °--NUM_CONST: 3 [0/0] {14} ¦ °--')': ) [0/0] {16} ¦--COMMENT: # sem [2/0] {17} - ¦--expr: [1/0] {19} + ¦--expr: a [1/0] {19} ¦ °--SYMBOL: a [0/0] {18} ¦--';': ; [0/1] {20} - ¦--expr: [0/1] {22} + ¦--expr: b [0/1] {22} ¦ °--SYMBOL: b [0/0] {21} ¦--';': ; [0/0] {23} - ¦--expr: [0/0] {25} + ¦--expr: c [0/0] {25} ¦ °--SYMBOL: c [0/0] {24} ¦--';': ; [0/0] {26} - ¦--expr: [0/0] {28} + ¦--expr: d [0/0] {28} ¦ °--SYMBOL: d [0/0] {27} ¦--COMMENT: # quo [3/0] {29} - ¦--expr: [1/0] {31} + ¦--expr: "text [1/0] {31} ¦ °--STR_CONST: "text [0/0] {30} - ¦--expr: [1/0] {33} + ¦--expr: 'text [1/0] {33} ¦ °--STR_CONST: 'text [0/0] {32} ¦--COMMENT: # add [4/0] {34} - ¦--expr: [1/0] {35} - ¦ ¦--expr: [0/1] {38} + ¦--expr: a %>% [1/0] {35} + ¦ ¦--expr: a [0/1] {38} ¦ ¦ °--SYMBOL: a [0/0] {37} ¦ ¦--SPECIAL-PIPE: %>% [0/2] {39} - ¦ ¦--expr: [1/1] {41} + ¦ ¦--expr: b [1/1] {41} ¦ ¦ °--SYMBOL: b [0/0] {40} ¦ ¦--SPECIAL-PIPE: %>% [0/2] {42} - ¦ °--expr: [1/0] {44} + ¦ °--expr: c [1/0] {44} ¦ °--SYMBOL: c [0/0] {43} ¦--COMMENT: # add [2/0] {45} - °--expr: [1/0] {46} - ¦--expr: [0/1] {49} + °--expr: a %>% [1/0] {46} + ¦--expr: a [0/1] {49} ¦ °--SYMBOL: a [0/0] {48} ¦--SPECIAL-PIPE: %>% [0/1] {50} - ¦--expr: [0/1] {52} + ¦--expr: b [0/1] {52} ¦ °--SYMBOL: b [0/0] {51} ¦--SPECIAL-PIPE: %>% [0/2] {53} - °--expr: [1/0] {55} + °--expr: c [1/0] {55} °--SYMBOL: c [0/0] {54} diff --git a/tests/testthat/token_adding_removing/token_creation_find_pos-in_tree b/tests/testthat/token_adding_removing/token_creation_find_pos-in_tree index 319ef5aee..d7851f86c 100644 --- a/tests/testthat/token_adding_removing/token_creation_find_pos-in_tree +++ b/tests/testthat/token_adding_removing/token_creation_find_pos-in_tree @@ -1,186 +1,189 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} - ¦ ¦--expr: [0/1] {3} + ¦--expr: print [0/0] {1} + ¦ ¦--expr: print [0/1] {3} ¦ ¦ °--SYMBOL: print [0/0] {2} ¦ ¦--LEFT_ASSIGN: <- [0/1] {4} - ¦ °--expr: [0/0] {5} + ¦ °--expr: funct [0/0] {5} ¦ ¦--FUNCTION: funct [0/0] {6} ¦ ¦--'(': ( [0/0] {7} ¦ ¦--SYMBOL_FORMALS: x [0/0] {8} ¦ ¦--',': , [0/1] {9} ¦ ¦--SYMBOL_FORMALS: ... [0/0] {10} ¦ ¦--')': ) [0/1] {11} - ¦ °--expr: [0/0] {12} + ¦ °--expr: { + l [0/0] {12} ¦ ¦--'{': { [0/2] {13} - ¦ ¦--expr: [1/2] {14} - ¦ ¦ ¦--expr: [0/1] {16} + ¦ ¦--expr: lines [1/2] {14} + ¦ ¦ ¦--expr: lines [0/1] {16} ¦ ¦ ¦ °--SYMBOL: lines [0/0] {15} ¦ ¦ ¦--LEFT_ASSIGN: <- [0/1] {17} - ¦ ¦ °--expr: [0/0] {18} - ¦ ¦ ¦--expr: [0/0] {20} + ¦ ¦ °--expr: m(y, [0/0] {18} + ¦ ¦ ¦--expr: m [0/0] {20} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: m [0/0] {19} ¦ ¦ ¦--'(': ( [0/0] {21} - ¦ ¦ ¦--expr: [0/0] {23} + ¦ ¦ ¦--expr: y [0/0] {23} ¦ ¦ ¦ °--SYMBOL: y [0/0] {22} ¦ ¦ ¦--',': , [0/1] {24} - ¦ ¦ ¦--expr: [0/0] {26} + ¦ ¦ ¦--expr: ... [0/0] {26} ¦ ¦ ¦ °--SYMBOL: ... [0/0] {25} ¦ ¦ ¦--',': , [0/1] {27} ¦ ¦ ¦--SYMBOL_SUB: print [0/1] {28} ¦ ¦ ¦--EQ_SUB: = [0/1] {29} - ¦ ¦ ¦--expr: [0/0] {31} + ¦ ¦ ¦--expr: TRUE [0/0] {31} ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {30} ¦ ¦ °--')': ) [0/0] {32} - ¦ ¦--expr: [1/0] {33} - ¦ ¦ ¦--expr: [0/0] {35} + ¦ ¦--expr: paste [1/0] {33} + ¦ ¦ ¦--expr: paste [0/0] {35} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: paste [0/0] {34} ¦ ¦ ¦--'(': ( [0/0] {36} - ¦ ¦ ¦--expr: [0/0] {38} + ¦ ¦ ¦--expr: lines [0/0] {38} ¦ ¦ ¦ °--SYMBOL: lines [0/0] {37} ¦ ¦ ¦--',': , [0/1] {39} ¦ ¦ ¦--SYMBOL_SUB: sep [0/1] {40} ¦ ¦ ¦--EQ_SUB: = [0/1] {41} - ¦ ¦ ¦--expr: [0/0] {43} + ¦ ¦ ¦--expr: "\n" [0/0] {43} ¦ ¦ ¦ °--STR_CONST: "\n" [0/0] {42} ¦ ¦ °--')': ) [0/0] {44} ¦ °--'}': } [1/0] {45} ¦--COMMENT: # No [2/0] {46} - ¦--expr: [2/0] {47} - ¦ ¦--expr: [0/1] {49} + ¦--expr: kng < [2/0] {47} + ¦ ¦--expr: kng [0/1] {49} ¦ ¦ °--SYMBOL: kng [0/0] {48} ¦ ¦--LEFT_ASSIGN: <- [0/1] {50} - ¦ °--expr: [0/0] {51} + ¦ °--expr: funct [0/0] {51} ¦ ¦--FUNCTION: funct [0/0] {52} ¦ ¦--'(': ( [0/0] {53} ¦ ¦--SYMBOL_FORMALS: x [0/0] {54} ¦ ¦--',': , [0/1] {55} ¦ ¦--SYMBOL_FORMALS: y [0/0] {56} ¦ ¦--')': ) [0/1] {57} - ¦ °--expr: [0/0] {58} - ¦ ¦--expr: [0/0] {60} + ¦ °--expr: spm(f [0/0] {58} + ¦ ¦--expr: spm [0/0] {60} ¦ ¦ °--SYMBOL_FUNCTION_CALL: spm [0/0] {59} ¦ ¦--'(': ( [0/0] {61} ¦ ¦--SYMBOL_SUB: fmt [0/1] {62} ¦ ¦--EQ_SUB: = [0/1] {63} - ¦ ¦--expr: [0/0] {65} + ¦ ¦--expr: "%i" [0/0] {65} ¦ ¦ °--STR_CONST: "%i" [0/0] {64} ¦ ¦--',': , [0/1] {66} - ¦ ¦--expr: [0/0] {67} - ¦ ¦ ¦--expr: [0/0] {69} + ¦ ¦--expr: lgd(x [0/0] {67} + ¦ ¦ ¦--expr: lgd [0/0] {69} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: lgd [0/0] {68} ¦ ¦ ¦--'(': ( [0/0] {70} - ¦ ¦ ¦--expr: [0/0] {72} + ¦ ¦ ¦--expr: x [0/0] {72} ¦ ¦ ¦ °--SYMBOL: x [0/0] {71} ¦ ¦ °--')': ) [0/0] {73} ¦ ¦--',': , [0/1] {74} - ¦ ¦--expr: [0/0] {75} - ¦ ¦ ¦--expr: [0/0] {77} + ¦ ¦--expr: tds(y [0/0] {75} + ¦ ¦ ¦--expr: tds [0/0] {77} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: tds [0/0] {76} ¦ ¦ ¦--'(': ( [0/0] {78} - ¦ ¦ ¦--expr: [0/0] {80} + ¦ ¦ ¦--expr: y [0/0] {80} ¦ ¦ ¦ °--SYMBOL: y [0/0] {79} ¦ ¦ °--')': ) [0/0] {81} ¦ °--')': ) [0/0] {82} - ¦--expr: [1/0] {83} - ¦ ¦--expr: [0/1] {85} + ¦--expr: tka < [1/0] {83} + ¦ ¦--expr: tka [0/1] {85} ¦ ¦ °--SYMBOL: tka [0/0] {84} ¦ ¦--LEFT_ASSIGN: <- [0/1] {86} - ¦ °--expr: [0/0] {87} + ¦ °--expr: funct [0/0] {87} ¦ ¦--FUNCTION: funct [0/0] {88} ¦ ¦--'(': ( [0/0] {89} ¦ ¦--SYMBOL_FORMALS: my [0/0] {90} ¦ ¦--',': , [0/1] {91} ¦ ¦--SYMBOL_FORMALS: y [0/0] {92} ¦ ¦--')': ) [0/1] {93} - ¦ °--expr: [0/0] {94} - ¦ ¦--expr: [0/0] {96} + ¦ °--expr: ttt(g [0/0] {94} + ¦ ¦--expr: ttt [0/0] {96} ¦ ¦ °--SYMBOL_FUNCTION_CALL: ttt [0/0] {95} ¦ ¦--'(': ( [0/0] {97} ¦ ¦--SYMBOL_SUB: gmks [0/1] {98} ¦ ¦--EQ_SUB: = [0/1] {99} - ¦ ¦--expr: [0/0] {101} + ¦ ¦--expr: "%s" [0/0] {101} ¦ ¦ °--STR_CONST: "%s" [0/0] {100} ¦ ¦--',': , [0/1] {102} - ¦ ¦--expr: [0/0] {103} - ¦ ¦ ¦--expr: [0/0] {105} + ¦ ¦--expr: slice [0/0] {103} + ¦ ¦ ¦--expr: slice [0/0] {105} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: slice [0/0] {104} ¦ ¦ ¦--'(': ( [0/0] {106} - ¦ ¦ ¦--expr: [0/0] {108} + ¦ ¦ ¦--expr: x [0/0] {108} ¦ ¦ ¦ °--SYMBOL: x [0/0] {107} ¦ ¦ °--')': ) [0/0] {109} ¦ ¦--',': , [0/1] {110} - ¦ ¦--expr: [0/0] {111} - ¦ ¦ ¦--expr: [0/0] {113} + ¦ ¦--expr: acast [0/0] {111} + ¦ ¦ ¦--expr: acast [0/0] {113} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: acast [0/0] {112} ¦ ¦ ¦--'(': ( [0/0] {114} - ¦ ¦ ¦--expr: [0/0] {116} + ¦ ¦ ¦--expr: d [0/0] {116} ¦ ¦ ¦ °--SYMBOL: d [0/0] {115} ¦ ¦ °--')': ) [0/0] {117} ¦ °--')': ) [0/0] {118} - °--expr: [2/0] {119} - ¦--expr: [0/1] {121} + °--expr: anoth [2/0] {119} + ¦--expr: anoth [0/1] {121} ¦ °--SYMBOL: anoth [0/0] {120} ¦--LEFT_ASSIGN: <- [0/1] {122} - °--expr: [0/0] {123} + °--expr: funct [0/0] {123} ¦--FUNCTION: funct [0/0] {124} ¦--'(': ( [0/0] {125} ¦--SYMBOL_FORMALS: x [0/0] {126} ¦--',': , [0/1] {127} ¦--SYMBOL_FORMALS: y [0/0] {128} ¦--')': ) [0/1] {129} - °--expr: [0/0] {130} + °--expr: { + i [0/0] {130} ¦--'{': { [0/2] {131} - ¦--expr: [1/2] {132} + ¦--expr: if (! [1/2] {132} ¦ ¦--IF: if [0/1] {133} ¦ ¦--'(': ( [0/0] {134} - ¦ ¦--expr: [0/0] {135} - ¦ ¦ ¦--expr: [0/1] {136} + ¦ ¦--expr: !fun( [0/0] {135} + ¦ ¦ ¦--expr: !fun( [0/1] {136} ¦ ¦ ¦ ¦--'!': ! [0/0] {137} - ¦ ¦ ¦ °--expr: [0/0] {138} - ¦ ¦ ¦ ¦--expr: [0/0] {140} + ¦ ¦ ¦ °--expr: fun(x [0/0] {138} + ¦ ¦ ¦ ¦--expr: fun [0/0] {140} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: fun [0/0] {139} ¦ ¦ ¦ ¦--'(': ( [0/0] {141} - ¦ ¦ ¦ ¦--expr: [0/0] {143} + ¦ ¦ ¦ ¦--expr: x [0/0] {143} ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {142} ¦ ¦ ¦ °--')': ) [0/0] {144} ¦ ¦ ¦--AND2: && [0/1] {145} - ¦ ¦ °--expr: [0/0] {146} + ¦ ¦ °--expr: !not_ [0/0] {146} ¦ ¦ ¦--'!': ! [0/0] {147} - ¦ ¦ °--expr: [0/0] {148} - ¦ ¦ ¦--expr: [0/0] {150} + ¦ ¦ °--expr: not_i [0/0] {148} + ¦ ¦ ¦--expr: not_i [0/0] {150} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: not_i [0/0] {149} ¦ ¦ ¦--'(': ( [0/0] {151} - ¦ ¦ ¦--expr: [0/0] {153} + ¦ ¦ ¦--expr: y [0/0] {153} ¦ ¦ ¦ °--SYMBOL: y [0/0] {152} ¦ ¦ °--')': ) [0/0] {154} ¦ ¦--')': ) [0/1] {155} - ¦ °--expr: [0/0] {156} + ¦ °--expr: { + [0/0] {156} ¦ ¦--'{': { [0/4] {157} - ¦ ¦--expr: [1/2] {158} - ¦ ¦ ¦--expr: [0/0] {160} + ¦ ¦--expr: retur [1/2] {158} + ¦ ¦ ¦--expr: retur [0/0] {160} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: retur [0/0] {159} ¦ ¦ ¦--'(': ( [0/0] {161} - ¦ ¦ ¦--expr: [0/0] {163} + ¦ ¦ ¦--expr: s [0/0] {163} ¦ ¦ ¦ °--SYMBOL: s [0/0] {162} ¦ ¦ °--')': ) [0/0] {164} ¦ °--'}': } [1/0] {165} - ¦--expr: [1/0] {166} - ¦ ¦--expr: [0/0] {168} + ¦--expr: ident [1/0] {166} + ¦ ¦--expr: ident [0/0] {168} ¦ ¦ °--SYMBOL_FUNCTION_CALL: ident [0/0] {167} ¦ ¦--'(': ( [0/0] {169} - ¦ ¦--expr: [0/0] {170} - ¦ ¦ ¦--expr: [0/0] {172} + ¦ ¦--expr: kss(n [0/0] {170} + ¦ ¦ ¦--expr: kss [0/0] {172} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: kss [0/0] {171} ¦ ¦ ¦--'(': ( [0/0] {173} - ¦ ¦ ¦--expr: [0/0] {175} + ¦ ¦ ¦--expr: nmp [0/0] {175} ¦ ¦ ¦ °--SYMBOL: nmp [0/0] {174} ¦ ¦ °--')': ) [0/0] {176} ¦ ¦--',': , [0/1] {177} - ¦ ¦--expr: [0/0] {178} - ¦ ¦ ¦--expr: [0/0] {180} + ¦ ¦--expr: gsk(r [0/0] {178} + ¦ ¦ ¦--expr: gsk [0/0] {180} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: gsk [0/0] {179} ¦ ¦ ¦--'(': ( [0/0] {181} - ¦ ¦ ¦--expr: [0/0] {183} + ¦ ¦ ¦--expr: rdm [0/0] {183} ¦ ¦ ¦ °--SYMBOL: rdm [0/0] {182} ¦ ¦ °--')': ) [0/0] {184} ¦ °--')': ) [0/0] {185} diff --git a/tests/testthat/unary_spacing/unary_complex-in_tree b/tests/testthat/unary_spacing/unary_complex-in_tree index d3ffb96be..42b3fce70 100644 --- a/tests/testthat/unary_spacing/unary_complex-in_tree +++ b/tests/testthat/unary_spacing/unary_complex-in_tree @@ -1,81 +1,81 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} - ¦ ¦--expr: [0/0] {4} + ¦--expr: 1+(1 [0/0] {1} + ¦ ¦--expr: 1 [0/0] {4} ¦ ¦ °--NUM_CONST: 1 [0/0] {3} ¦ ¦--'+': + [0/0] {5} - ¦ ¦--expr: [0/0] {6} + ¦ ¦--expr: (1 [0/0] {6} ¦ ¦ ¦--'(': ( [0/0] {7} - ¦ ¦ ¦--expr: [0/0] {8} - ¦ ¦ ¦ ¦--expr: [0/3] {11} + ¦ ¦ ¦--expr: 1 - [0/0] {8} + ¦ ¦ ¦ ¦--expr: 1 [0/3] {11} ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {10} ¦ ¦ ¦ ¦--'-': - [0/1] {12} - ¦ ¦ ¦ ¦--expr: [0/5] {13} + ¦ ¦ ¦ ¦--expr: (- (- [0/5] {13} ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {14} - ¦ ¦ ¦ ¦ ¦--expr: [0/3] {15} + ¦ ¦ ¦ ¦ ¦--expr: - (- [0/3] {15} ¦ ¦ ¦ ¦ ¦ ¦--'-': - [0/1] {16} - ¦ ¦ ¦ ¦ ¦ °--expr: [0/0] {17} + ¦ ¦ ¦ ¦ ¦ °--expr: (- 3 [0/0] {17} ¦ ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {18} - ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/0] {19} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/1] {21} + ¦ ¦ ¦ ¦ ¦ ¦--expr: - 3 + [0/0] {19} + ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: - 3 [0/1] {21} ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--'-': - [0/1] {22} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--expr: [0/0] {24} + ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--expr: 3 [0/0] {24} ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {23} ¦ ¦ ¦ ¦ ¦ ¦ ¦--'+': + [0/2] {25} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/0] {27} + ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: 11 [0/0] {27} ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 11 [0/0] {26} ¦ ¦ ¦ ¦ ¦ ¦ ¦--'+': + [0/0] {28} - ¦ ¦ ¦ ¦ ¦ ¦ °--expr: [0/0] {29} + ¦ ¦ ¦ ¦ ¦ ¦ °--expr: + 1 [0/0] {29} ¦ ¦ ¦ ¦ ¦ ¦ ¦--'+': + [0/3] {30} - ¦ ¦ ¦ ¦ ¦ ¦ °--expr: [0/0] {32} + ¦ ¦ ¦ ¦ ¦ ¦ °--expr: 1 [0/0] {32} ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {31} ¦ ¦ ¦ ¦ ¦ °--')': ) [0/0] {33} ¦ ¦ ¦ ¦ °--')': ) [0/0] {34} ¦ ¦ ¦ ¦--'-': - [0/0] {35} - ¦ ¦ ¦ °--expr: [0/0] {37} + ¦ ¦ ¦ °--expr: 4 [0/0] {37} ¦ ¦ ¦ °--NUM_CONST: 4 [0/0] {36} ¦ ¦ °--')': ) [0/0] {38} ¦ ¦--'-': - [0/0] {39} - ¦ °--expr: [0/0] {40} + ¦ °--expr: -40 [0/0] {40} ¦ ¦--'-': - [0/0] {41} - ¦ °--expr: [0/0] {43} + ¦ °--expr: 40 [0/0] {43} ¦ °--NUM_CONST: 40 [0/0] {42} - °--expr: [1/0] {44} - ¦--expr: [0/0] {47} + °--expr: 1+(1- [1/0] {44} + ¦--expr: 1 [0/0] {47} ¦ °--NUM_CONST: 1 [0/0] {46} ¦--'+': + [0/0] {48} - ¦--expr: [0/0] {49} + ¦--expr: (1-(- [0/0] {49} ¦ ¦--'(': ( [0/0] {50} - ¦ ¦--expr: [0/0] {51} - ¦ ¦ ¦--expr: [0/0] {54} + ¦ ¦--expr: 1-(-( [0/0] {51} + ¦ ¦ ¦--expr: 1 [0/0] {54} ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {53} ¦ ¦ ¦--'-': - [0/0] {55} - ¦ ¦ ¦--expr: [0/0] {56} + ¦ ¦ ¦--expr: (-(-3 [0/0] {56} ¦ ¦ ¦ ¦--'(': ( [0/0] {57} - ¦ ¦ ¦ ¦--expr: [0/0] {58} + ¦ ¦ ¦ ¦--expr: -(-3+ [0/0] {58} ¦ ¦ ¦ ¦ ¦--'-': - [0/0] {59} - ¦ ¦ ¦ ¦ °--expr: [0/0] {60} + ¦ ¦ ¦ ¦ °--expr: (-3+1 [0/0] {60} ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {61} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {62} - ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/0] {64} + ¦ ¦ ¦ ¦ ¦--expr: -3+11 [0/0] {62} + ¦ ¦ ¦ ¦ ¦ ¦--expr: -3 [0/0] {64} ¦ ¦ ¦ ¦ ¦ ¦ ¦--'-': - [0/0] {65} - ¦ ¦ ¦ ¦ ¦ ¦ °--expr: [0/0] {67} + ¦ ¦ ¦ ¦ ¦ ¦ °--expr: 3 [0/0] {67} ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {66} ¦ ¦ ¦ ¦ ¦ ¦--'+': + [0/0] {68} - ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/0] {70} + ¦ ¦ ¦ ¦ ¦ ¦--expr: 11 [0/0] {70} ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 11 [0/0] {69} ¦ ¦ ¦ ¦ ¦ ¦--'+': + [0/0] {71} - ¦ ¦ ¦ ¦ ¦ °--expr: [0/0] {72} + ¦ ¦ ¦ ¦ ¦ °--expr: +1 [0/0] {72} ¦ ¦ ¦ ¦ ¦ ¦--'+': + [0/0] {73} - ¦ ¦ ¦ ¦ ¦ °--expr: [0/0] {75} + ¦ ¦ ¦ ¦ ¦ °--expr: 1 [0/0] {75} ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {74} ¦ ¦ ¦ ¦ °--')': ) [0/0] {76} ¦ ¦ ¦ °--')': ) [0/0] {77} ¦ ¦ ¦--'-': - [0/0] {78} - ¦ ¦ °--expr: [0/0] {80} + ¦ ¦ °--expr: 4 [0/0] {80} ¦ ¦ °--NUM_CONST: 4 [0/0] {79} ¦ °--')': ) [0/0] {81} ¦--'-': - [0/0] {82} - °--expr: [0/0] {83} + °--expr: -40 [0/0] {83} ¦--'-': - [0/0] {84} - °--expr: [0/0] {86} + °--expr: 40 [0/0] {86} °--NUM_CONST: 40 [0/0] {85} diff --git a/tests/testthat/unary_spacing/unary_indention-in_tree b/tests/testthat/unary_spacing/unary_indention-in_tree index eedffd47f..a1d0470e5 100644 --- a/tests/testthat/unary_spacing/unary_indention-in_tree +++ b/tests/testthat/unary_spacing/unary_indention-in_tree @@ -1,52 +1,57 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} - ¦ ¦--expr: [0/1] {4} + ¦--expr: 1 + + [0/0] {1} + ¦ ¦--expr: 1 [0/1] {4} ¦ ¦ °--NUM_CONST: 1 [0/0] {3} ¦ ¦--'+': + [0/5] {5} - ¦ ¦--expr: [1/1] {6} - ¦ ¦ ¦--expr: [0/4] {9} + ¦ ¦--expr: 2 [1/1] {6} + ¦ ¦ ¦--expr: 2 [0/4] {9} ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {8} ¦ ¦ ¦--'/': / [0/2] {10} - ¦ ¦ ¦--expr: [1/0] {12} + ¦ ¦ ¦--expr: 8 [1/0] {12} ¦ ¦ ¦ °--NUM_CONST: 8 [0/0] {11} ¦ ¦ ¦--'/': / [0/5] {13} - ¦ ¦ °--expr: [1/0] {15} + ¦ ¦ °--expr: 5 [1/0] {15} ¦ ¦ °--NUM_CONST: 5 [0/0] {14} ¦ ¦--'+': + [0/0] {16} - ¦ °--expr: [1/0] {18} + ¦ °--expr: 13 [1/0] {18} ¦ °--NUM_CONST: 13 [0/0] {17} - ¦--expr: [3/0] {19} - ¦ ¦--expr: [0/1] {22} + ¦--expr: 1 + + [3/0] {19} + ¦ ¦--expr: 1 [0/1] {22} ¦ ¦ °--NUM_CONST: 1 [0/0] {21} ¦ ¦--'+': + [0/2] {23} - ¦ ¦--expr: [1/1] {24} + ¦ ¦--expr: + 1 [1/1] {24} ¦ ¦ ¦--'+': + [0/1] {25} - ¦ ¦ °--expr: [0/0] {27} + ¦ ¦ °--expr: 1 [0/0] {27} ¦ ¦ °--NUM_CONST: 1 [0/0] {26} ¦ ¦--'-': - [0/0] {28} - ¦ °--expr: [1/0] {29} - ¦ ¦--expr: [0/1] {31} + ¦ °--expr: -1 / + [1/0] {29} + ¦ ¦--expr: -1 [0/1] {31} ¦ ¦ ¦--'-': - [0/0] {32} - ¦ ¦ °--expr: [0/0] {34} + ¦ ¦ °--expr: 1 [0/0] {34} ¦ ¦ °--NUM_CONST: 1 [0/0] {33} ¦ ¦--'/': / [0/2] {35} - ¦ ¦--expr: [1/2] {37} + ¦ ¦--expr: 27 [1/2] {37} ¦ ¦ °--NUM_CONST: 27 [0/0] {36} ¦ ¦--'/': / [0/2] {38} - ¦ °--expr: [1/0] {39} + ¦ °--expr: - 3 [1/0] {39} ¦ ¦--'-': - [0/1] {40} - ¦ °--expr: [0/0] {42} + ¦ °--expr: 3 [0/0] {42} ¦ °--NUM_CONST: 3 [0/0] {41} - °--expr: [2/0] {43} - ¦--expr: [0/1] {46} + °--expr: 1 / + [2/0] {43} + ¦--expr: 1 [0/1] {46} ¦ °--NUM_CONST: 1 [0/0] {45} ¦--'/': / [0/2] {47} - ¦--expr: [1/1] {49} + ¦--expr: 2 [1/1] {49} ¦ °--NUM_CONST: 2 [0/0] {48} ¦--'+': + [0/2] {50} - °--expr: [1/0] {51} - ¦--expr: [0/1] {53} + °--expr: 33 * + [1/0] {51} + ¦--expr: 33 [0/1] {53} ¦ °--NUM_CONST: 33 [0/0] {52} ¦--'*': * [0/2] {54} - °--expr: [1/0] {56} + °--expr: 2 [1/0] {56} °--NUM_CONST: 2 [0/0] {55} diff --git a/tests/testthat/unary_spacing/unary_simple-in_tree b/tests/testthat/unary_spacing/unary_simple-in_tree index 23e2c2a95..bebf9c503 100644 --- a/tests/testthat/unary_spacing/unary_simple-in_tree +++ b/tests/testthat/unary_spacing/unary_simple-in_tree @@ -1,26 +1,26 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: [0/0] {1} - ¦--expr: [0/0] {6} + °--expr: 1+-1/ [0/0] {1} + ¦--expr: 1 [0/0] {6} ¦ °--NUM_CONST: 1 [0/0] {5} ¦--'+': + [0/0] {7} - ¦--expr: [0/0] {8} - ¦ ¦--expr: [0/0] {9} + ¦--expr: -1/2 [0/0] {8} + ¦ ¦--expr: -1 [0/0] {9} ¦ ¦ ¦--'-': - [0/0] {10} - ¦ ¦ °--expr: [0/0] {12} + ¦ ¦ °--expr: 1 [0/0] {12} ¦ ¦ °--NUM_CONST: 1 [0/0] {11} ¦ ¦--'/': / [0/0] {13} - ¦ °--expr: [0/0] {15} + ¦ °--expr: 2 [0/0] {15} ¦ °--NUM_CONST: 2 [0/0] {14} ¦--'-': - [0/0] {16} - ¦--expr: [0/0] {18} + ¦--expr: 3 [0/0] {18} ¦ °--NUM_CONST: 3 [0/0] {17} ¦--'-': - [0/0] {19} - ¦--expr: [0/0] {20} + ¦--expr: -3 [0/0] {20} ¦ ¦--'-': - [0/0] {21} - ¦ °--expr: [0/0] {23} + ¦ °--expr: 3 [0/0] {23} ¦ °--NUM_CONST: 3 [0/0] {22} ¦--'+': + [0/0] {24} - °--expr: [0/0] {25} + °--expr: +3 [0/0] {25} ¦--'+': + [0/0] {26} - °--expr: [0/0] {28} + °--expr: 3 [0/0] {28} °--NUM_CONST: 3 [0/0] {27} diff --git a/tests/testthat/unindention/mixed-in_tree b/tests/testthat/unindention/mixed-in_tree index b9ea9cb88..275bbebef 100644 --- a/tests/testthat/unindention/mixed-in_tree +++ b/tests/testthat/unindention/mixed-in_tree @@ -1,48 +1,57 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} + ¦--expr: { + ( [0/0] {1} ¦ ¦--'{': { [0/2] {2} - ¦ ¦--expr: [1/3] {3} + ¦ ¦--expr: ((( + [1/3] {3} ¦ ¦ ¦--'(': ( [0/0] {4} - ¦ ¦ ¦--expr: [0/0] {5} + ¦ ¦ ¦--expr: (( + 2 [0/0] {5} ¦ ¦ ¦ ¦--'(': ( [0/0] {6} - ¦ ¦ ¦ ¦--expr: [0/0] {7} + ¦ ¦ ¦ ¦--expr: ( + 2 + [0/0] {7} ¦ ¦ ¦ ¦ ¦--'(': ( [0/1] {8} - ¦ ¦ ¦ ¦ ¦--expr: [1/4] {10} + ¦ ¦ ¦ ¦ ¦--expr: 2 [1/4] {10} ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {9} ¦ ¦ ¦ ¦ °--')': ) [1/0] {11} ¦ ¦ ¦ °--')': ) [0/0] {12} ¦ ¦ °--')': ) [0/0] {13} ¦ °--'}': } [1/0] {14} - °--expr: [2/0] {15} + °--expr: { +{ + [2/0] {15} ¦--'{': { [0/0] {16} - ¦--expr: [1/0] {17} + ¦--expr: { + [1/0] {17} ¦ ¦--'{': { [0/8] {18} - ¦ ¦--expr: [1/5] {19} - ¦ ¦ ¦--expr: [0/0] {21} + ¦ ¦--expr: call( [1/5] {19} + ¦ ¦ ¦--expr: call [0/0] {21} ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {20} ¦ ¦ ¦--'(': ( [0/10] {22} - ¦ ¦ ¦--expr: [1/0] {23} - ¦ ¦ ¦ ¦--expr: [0/0] {25} + ¦ ¦ ¦--expr: call1 [1/0] {23} + ¦ ¦ ¦ ¦--expr: call1 [0/0] {25} ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call1 [0/0] {24} ¦ ¦ ¦ ¦--'(': ( [0/0] {26} - ¦ ¦ ¦ ¦--expr: [0/0] {28} + ¦ ¦ ¦ ¦--expr: 2 [0/0] {28} ¦ ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {27} ¦ ¦ ¦ ¦--',': , [0/1] {29} - ¦ ¦ ¦ ¦--expr: [0/0] {31} + ¦ ¦ ¦ ¦--expr: 3 [0/0] {31} ¦ ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {30} ¦ ¦ ¦ °--')': ) [0/0] {32} ¦ ¦ ¦--',': , [0/10] {33} - ¦ ¦ ¦--expr: [1/1] {34} + ¦ ¦ ¦--expr: { + [1/1] {34} ¦ ¦ ¦ ¦--'{': { [0/15] {35} - ¦ ¦ ¦ ¦--expr: [1/2] {36} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {38} + ¦ ¦ ¦ ¦--expr: sin(c [1/2] {36} + ¦ ¦ ¦ ¦ ¦--expr: sin [0/0] {38} ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: sin [0/0] {37} ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {39} - ¦ ¦ ¦ ¦ ¦--expr: [0/0] {40} - ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/0] {42} + ¦ ¦ ¦ ¦ ¦--expr: cos(p [0/0] {40} + ¦ ¦ ¦ ¦ ¦ ¦--expr: cos [0/0] {42} ¦ ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: cos [0/0] {41} ¦ ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {43} - ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/0] {45} + ¦ ¦ ¦ ¦ ¦ ¦--expr: pi [0/0] {45} ¦ ¦ ¦ ¦ ¦ ¦ °--SYMBOL: pi [0/0] {44} ¦ ¦ ¦ ¦ ¦ °--')': ) [0/0] {46} ¦ ¦ ¦ ¦ °--')': ) [0/0] {47} diff --git a/tests/testthat/unindention/vec_with_fun-in_tree b/tests/testthat/unindention/vec_with_fun-in_tree index b020c849e..d34be57bd 100644 --- a/tests/testthat/unindention/vec_with_fun-in_tree +++ b/tests/testthat/unindention/vec_with_fun-in_tree @@ -1,17 +1,18 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: [0/0] {1} - ¦--expr: [0/0] {3} + °--expr: c(a= [0/0] {1} + ¦--expr: c [0/0] {3} ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {2} ¦--'(': ( [0/0] {4} ¦--SYMBOL_SUB: a [0/0] {5} ¦--EQ_SUB: = [0/1] {6} - ¦--expr: [0/0] {7} + ¦--expr: funct [0/0] {7} ¦ ¦--FUNCTION: funct [0/0] {8} ¦ ¦--'(': ( [0/0] {9} ¦ ¦--')': ) [0/1] {10} - ¦ °--expr: [0/0] {11} + ¦ °--expr: { + [0/0] {11} ¦ ¦--'{': { [0/5] {12} - ¦ ¦--expr: [1/2] {14} + ¦ ¦--expr: 33 [1/2] {14} ¦ ¦ °--NUM_CONST: 33 [0/0] {13} ¦ °--'}': } [1/0] {15} °--')': ) [0/0] {16} diff --git a/tests/testthat/unindention_regex/random_non_comment_indention-in_tree b/tests/testthat/unindention_regex/random_non_comment_indention-in_tree index b68288ffe..68bd330dc 100644 --- a/tests/testthat/unindention_regex/random_non_comment_indention-in_tree +++ b/tests/testthat/unindention_regex/random_non_comment_indention-in_tree @@ -1,16 +1,17 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: [0/0] {1} - ¦--expr: [0/1] {3} + °--expr: a <- [0/0] {1} + ¦--expr: a [0/1] {3} ¦ °--SYMBOL: a [0/0] {2} ¦--LEFT_ASSIGN: <- [0/1] {4} - °--expr: [0/0] {5} + °--expr: funct [0/0] {5} ¦--FUNCTION: funct [0/0] {6} ¦--'(': ( [0/0] {7} ¦--')': ) [0/1] {8} - °--expr: [0/0] {9} + °--expr: { + bb [0/0] {9} ¦--'{': { [0/1] {10} - ¦--expr: [1/2] {12} + ¦--expr: bbx [1/2] {12} ¦ °--SYMBOL: bbx [0/0] {11} - ¦--expr: [1/2] {14} + ¦--expr: x [1/2] {14} ¦ °--SYMBOL: x [0/0] {13} °--'}': } [1/0] {15} diff --git a/tests/testthat/unindention_regex/regex_force_no_pattern-in_tree b/tests/testthat/unindention_regex/regex_force_no_pattern-in_tree index fb06e915c..80aec2371 100644 --- a/tests/testthat/unindention_regex/regex_force_no_pattern-in_tree +++ b/tests/testthat/unindention_regex/regex_force_no_pattern-in_tree @@ -1,20 +1,21 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--COMMENT: # _ [0/0] {1} ¦--COMMENT: # l [1/0] {2} - °--expr: [1/0] {3} - ¦--expr: [0/1] {5} + °--expr: a <- [1/0] {3} + ¦--expr: a [0/1] {5} ¦ °--SYMBOL: a [0/0] {4} ¦--LEFT_ASSIGN: <- [0/1] {6} - °--expr: [0/0] {7} + °--expr: funct [0/0] {7} ¦--FUNCTION: funct [0/0] {8} ¦--'(': ( [0/0] {9} ¦--')': ) [0/1] {10} - °--expr: [0/0] {11} + °--expr: { + # [0/0] {11} ¦--'{': { [0/2] {12} ¦--COMMENT: ### . [1/2] {13} ¦--COMMENT: ### i [1/2] {14} - ¦--expr: [1/2] {15} - ¦ ¦--expr: [0/0] {17} + ¦--expr: q() [1/2] {15} + ¦ ¦--expr: q [0/0] {17} ¦ ¦ °--SYMBOL_FUNCTION_CALL: q [0/0] {16} ¦ ¦--'(': ( [0/0] {18} ¦ °--')': ) [0/0] {19} diff --git a/tests/testthat/unindention_regex/regex_force_with_pattern-in_tree b/tests/testthat/unindention_regex/regex_force_with_pattern-in_tree index 1084a9b3f..66c1cda0a 100644 --- a/tests/testthat/unindention_regex/regex_force_with_pattern-in_tree +++ b/tests/testthat/unindention_regex/regex_force_with_pattern-in_tree @@ -1,20 +1,21 @@ ROOT (token: short_text [lag_newlines/spaces] {pos_id}) ¦--COMMENT: # _ [0/0] {1} ¦--COMMENT: # l [1/0] {2} - °--expr: [1/0] {3} - ¦--expr: [0/1] {5} + °--expr: a <- [1/0] {3} + ¦--expr: a [0/1] {5} ¦ °--SYMBOL: a [0/0] {4} ¦--LEFT_ASSIGN: <- [0/1] {6} - °--expr: [0/0] {7} + °--expr: funct [0/0] {7} ¦--FUNCTION: funct [0/0] {8} ¦--'(': ( [0/0] {9} ¦--')': ) [0/1] {10} - °--expr: [0/0] {11} + °--expr: { + ## [0/0] {11} ¦--'{': { [0/1] {12} ¦--COMMENT: ### . [1/5] {13} ¦--COMMENT: ### i [1/5] {14} - ¦--expr: [1/4] {15} - ¦ ¦--expr: [0/0] {17} + ¦--expr: q() [1/4] {15} + ¦ ¦--expr: q [0/0] {17} ¦ ¦ °--SYMBOL_FUNCTION_CALL: q [0/0] {16} ¦ ¦--'(': ( [0/0] {18} ¦ °--')': ) [0/0] {19} diff --git a/vignettes/caching.Rmd b/vignettes/caching.Rmd new file mode 100644 index 000000000..079ef994a --- /dev/null +++ b/vignettes/caching.Rmd @@ -0,0 +1,110 @@ +--- +title: "Caching" +output: rmarkdown::html_vignette +vignette: > + %\VignetteIndexEntry{caching} + %\VignetteEngine{knitr::rmarkdown} + %\VignetteEncoding{UTF-8} +--- + +```{r, include = FALSE} +knitr::opts_chunk$set( + collapse = TRUE, + comment = "#>" +) +``` + +```{r setup} +library(styler) +``` + +This is a developer vignette to explain how caching works and what we learned on +the way. To use the caching feature, please have a look at the README. + +The main caching features were implemented in the following two pull requests: + +- #538: Implemented simple caching and utilities for managing caches. Input text + is styled as a whole and added to the cache afterwards. This makes most sense + given that the very same expression will probably never be passed to styler, + unless it is already compliant with the style guide. Apart from the + (negligible) innode, caching text has a memory cost of 0. Speed boosts only + result if the whole text passed to styler is compliant to the style guide in + use. Changing one line in a file with hundreds of lines means each line will + be styled again. This is a major drawback and makes the cache only useful for + a use with a pre-commit framework (the initial motivation) or when functions + like `style_pkg()` are runn often and most files were not changed. + +- #578: Adds a second layer of caching by caching top-level expressions + individually. This will bring speed boosts to the situation where very little + is changed but there are many top-level expressions. Hence, changing one line + in a big file will invalidate the cache for the expression the line is part + of, i.e. when changing `x <- 2` to `x = 2` below, styler will have to restyle + the function definition, but not `another(call)` and all other expressions + that were not changed. + +```{r, eval = FALSE} +function() { + # a comment + x = 2 # <- change this line +} + +another(call) +``` + +While #538 also required a lot of thought, this is not necessarily visible in +the diff. The main challenge was to figure out how the caching should work +conceptually and where we best insert the functionality as well as how to make +caching work for edge cases like trailing blank lines etc. For details on the +conceptual side and requirements, see #538. + +In comparison, the diff in #578 is much larger. We can walk through the main +changes introduced here: + +- Each nest gained a column *is_cached* to indicate if an expression is cached. + It's only ever set for the top-level nest, but set to `NA` for all other + nests. Also, comments are not cached because they are essentially top level + terminals which are very cheap to style (also because hardly any rule concerns + them) and because each comment is a top-level expression, simply styling them + is cheaper than checking for each of them if it is in the cache. + +- Each nest also gained a column *block* to denote the block to which it belongs + for styling. Running each top-level expression through + `parse_transform_serialize_r()` separately is relatively expensive. We prefer + to put multiple top-level expressions into a block and process the block. This + is done with `parse_transform_serialize_r_block()`. Note that before we + implemented this PR, all top-level expressions were sent through + `parse_transform_serialize_r()` as one block. Leaving out some exceptions in + this explanation, we always put uncached top-level expressions in a block and + cached top-level expressions into a block and then style the uncached ones. + +- Apart from the actual styling, a very costly part of formatting code with + styler is to compute the nested parse data with `compute_parse_data_nested()`. + When caching top-level expressions, it is evident that building up the nested + structure for cached code is unnecessary because we don't actually style it, + but simply return `text`. For this reason, we introduce the concept of a + shallow nest. It can only occur at the top level. For the top-level + expressions we know that they are cached, we remove all children before + building up the nested parse table and let them act as `terminals` and will + later simply return their `text`. Hence, in the nested parse table, no cached + expressions have children. + +- Because we now style blocks of expressions and we want to preserve the line + breaks between them, we need to keep track of all blank lines between + expressions, which was not necessary previously because all expressions were + in a block and the blank lines separating them were stored in `newlines` and + `lag_newlines` except for all blank lines before the first expression. + +- Because we wanted to cache by expression, but process by block of expression, + we needed to decompose the block into individual expressions and add them to + the cache once we obtained the final text. We could probably also have added + expressions to the cache before we put the text together, but the problem is + that at some point we turn the nested structure into a flat structure and as + this must happen with a `post_visit()` approach, we'd have to implement a + complicated routine to check if we are now about to put together all top-level + expressions and then if yes write them to the cache. A simple (but maybe not + so elegant) parsing of the output as implemented in `cache_by_expression()` + seemed reasonable in terms of limiting complexity and keeping efficiency. + +For more detailed explanation and documentation, please consult the help files +of the internals. + diff --git a/vignettes/customizing_styler.Rmd b/vignettes/customizing_styler.Rmd index a689ec269..e76a14c45 100644 --- a/vignettes/customizing_styler.Rmd +++ b/vignettes/customizing_styler.Rmd @@ -48,6 +48,7 @@ look at what those are. ```{r, message = FALSE} library("styler") +cache_deactivate() library("dplyr") names(tidyverse_style()) str(tidyverse_style(), give.attr = FALSE, list.len = 3)