diff --git a/.Rbuildignore b/.Rbuildignore index 8f4e9970b..48239634b 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -7,6 +7,7 @@ ^README-.*\.png$ ^README\.Rmd$ ^\.Rproj\.user$ +^\.dev$ ^\.github$ ^\.gitsum$ ^\.lintr$ @@ -16,8 +17,11 @@ ^doc$ ^docs$ ^gitsum$ +^hextools ^inst/WORDLIST$ +^inst/hextools$ ^inst/hooks/.*$ +^pkgdown$ ^revdep$ ^tests/testmanual$ ^tic\.R$ diff --git a/.github/workflows/check-all-examples.yaml b/.github/workflows/check-all-examples.yaml deleted file mode 100644 index 7de30a17f..000000000 --- a/.github/workflows/check-all-examples.yaml +++ /dev/null @@ -1,42 +0,0 @@ -# Make sure all examples run successfully, even the ones that are not supposed -# to be run or tested on CRAN machines by default. -# -# The examples that fail should use -# - `if (FALSE) { ... }` (if example is included only for illustrative purposes) -# - `try({ ... })` (if the intent is to show the error) -# -# This workflow helps find such failing examples that need to be modified. - -on: - push: - branches: [main, master] - pull_request: - branches: [main, master] - -name: check-all-examples - -jobs: - check-all-examples: - runs-on: ubuntu-latest - env: - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - - steps: - - uses: actions/checkout@v3 - - - uses: r-lib/actions/setup-r@v2 - with: - use-public-rspm: true - - - uses: r-lib/actions/setup-r-dependencies@v2 - with: - pak-version: devel - extra-packages: | - any::devtools - local::. - - - name: Run examples - run: | - options(crayon.enabled = TRUE) - devtools::run_examples(fresh = TRUE, run_dontrun = TRUE, run_donttest = TRUE) - shell: Rscript {0} diff --git a/.github/workflows/check-full.yaml b/.github/workflows/check-full.yaml index 8f98653d0..ae20a0fbf 100644 --- a/.github/workflows/check-full.yaml +++ b/.github/workflows/check-full.yaml @@ -12,33 +12,45 @@ jobs: R-CMD-check: runs-on: ${{ matrix.config.os }} - name: ${{ matrix.config.os }} (${{ matrix.config.r }}) + name: ${{ matrix.config.os }} (${{ matrix.config.r }}) ${{ matrix.config.locale }} strategy: fail-fast: false matrix: config: - - {os: macos-latest, r: 'release'} + - { os: macos-latest, r: "release" } - - {os: windows-latest, r: 'release'} - # Use 3.6 to trigger usage of RTools35 - - {os: windows-latest, r: '3.6'} + - { os: windows-latest, r: "devel" } + - { os: windows-latest, r: "release" } # use 4.1 to check with rtools40's older compiler - - {os: windows-latest, r: '4.1'} + - { os: windows-latest, r: "4.1" } - - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'} - - {os: ubuntu-latest, r: 'release'} - - {os: ubuntu-latest, r: 'oldrel-1'} - - {os: ubuntu-latest, r: 'oldrel-2'} - - {os: ubuntu-latest, r: 'oldrel-3'} - - {os: ubuntu-latest, r: 'oldrel-4'} + - { os: ubuntu-latest, r: "devel", locale: "en_US", http-user-agent: "release" } + #- { os: ubuntu-latest, r: "release", locale: "zh_CN" } + - { os: ubuntu-latest, r: "release" } + - { os: ubuntu-latest, r: "oldrel-1" } + - { os: ubuntu-latest, r: "oldrel-2" } + - { os: ubuntu-latest, r: "oldrel-3" } + - { os: ubuntu-latest, r: "oldrel-4" } env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} R_KEEP_PKG_SOURCE: yes steps: - - uses: actions/checkout@v3 + - name: Set 'en_US' locale + if: matrix.config.locale == 'en_US' + run: | + sudo locale-gen en_US + echo "LC_ALL=en_US" >> $GITHUB_ENV + + - name: Set 'zh_CN' locale + if: matrix.config.locale == 'zh_CN' + run: | + sudo locale-gen zh_CN + echo "LC_ALL=zh_CN" >> $GITHUB_ENV + + - uses: actions/checkout@v4 - uses: r-lib/actions/setup-pandoc@v2 @@ -50,12 +62,15 @@ jobs: - uses: r-lib/actions/setup-r-dependencies@v2 with: + pak-version: devel + upgrade: "TRUE" extra-packages: any::rcmdcheck needs: check - uses: r-lib/actions/check-r-package@v2 with: upload-snapshots: true - error-on: 'ifelse(getRversion() > 3.6, "warning", "note")' + error-on: '"note"' env: _R_CHECK_FORCE_SUGGESTS_: false + _R_CHECK_STOP_ON_INVALID_NUMERIC_VERSION_INPUTS_: true diff --git a/.github/workflows/check-link-rot.yaml b/.github/workflows/check-link-rot.yaml deleted file mode 100644 index 666d27c86..000000000 --- a/.github/workflows/check-link-rot.yaml +++ /dev/null @@ -1,43 +0,0 @@ -on: - pull_request: - branches: [main, master] - schedule: - # * is a special character in YAML so you have to quote this string - # Trigger once a month at 00:00 on the 1st day of the month. - - cron: "0 0 1 * *" - -name: check-link-rot - -jobs: - check-link-rot: - runs-on: ubuntu-latest - env: - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - R_KEEP_PKG_SOURCE: yes - steps: - - uses: actions/checkout@v3 - - - uses: r-lib/actions/setup-pandoc@v2 - - - uses: r-lib/actions/setup-r@v2 - with: - r-version: "devel" - http-user-agent: "release" - use-public-rspm: true - - - uses: r-lib/actions/setup-r-dependencies@v2 - with: - pak-version: devel - extra-packages: | - any::rcmdcheck - any::urlchecker - - - name: Run URL checker - run: | - options(crayon.enabled = TRUE) - rotten_links <- urlchecker::url_check(progress = FALSE) - print(rotten_links) - if (length(rotten_links$URL) > 0L) { - stop("Some URLs are outdated and need to be updated.", call. = FALSE) - } - shell: Rscript {0} diff --git a/.github/workflows/check-no-warnings.yaml b/.github/workflows/check-no-warnings.yaml new file mode 100644 index 000000000..4b792a68d --- /dev/null +++ b/.github/workflows/check-no-warnings.yaml @@ -0,0 +1,48 @@ +# execute all examples and tests with warnings turned into errors to look for new warnings +on: + push: + branches: [main, master] + pull_request: + branches: [main, master] + +name: check-no-warnings + +jobs: + check-no-warnings: + runs-on: ubuntu-latest + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + + steps: + - uses: actions/checkout@v4 + + - uses: r-lib/actions/setup-r@v2 + with: + use-public-rspm: true + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + pak-version: devel + extra-packages: | + any::devtools + local::. + + - name: Run examples + run: | + options(crayon.enabled = TRUE, warn = 2L) + devtools::run_examples(fresh = TRUE, run_dontrun = TRUE, run_donttest = TRUE) + shell: Rscript {0} + + - name: Run Tests + run: | + options(crayon.enabled = TRUE) + pkgload::load_all() + # this workaround needed to play nicely with parallel testing + # see: https://github.com/r-lib/testthat/issues/1912 + test_script_paths <- testthat::find_test_scripts("tests/testthat") + test_with_warning_as_error <- function(path) { + withr::local_options(list(warn = 2L)) + testthat::test_file(path, stop_on_failure = TRUE, stop_on_warning = TRUE) + } + purrr::walk(test_script_paths, test_with_warning_as_error) + shell: Rscript {0} diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index d227c59cf..91711d445 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -20,7 +20,7 @@ jobs: env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: r-lib/actions/setup-pandoc@v2 @@ -39,7 +39,7 @@ jobs: - name: Deploy to GitHub pages 🚀 if: github.event_name != 'pull_request' - uses: JamesIves/github-pages-deploy-action@v4.4.2 + uses: JamesIves/github-pages-deploy-action@v4.7.2 with: clean: false branch: gh-pages diff --git a/.github/workflows/pre-commit.yaml b/.github/workflows/pre-commit.yaml index 0ab0603db..c049998ee 100644 --- a/.github/workflows/pre-commit.yaml +++ b/.github/workflows/pre-commit.yaml @@ -18,25 +18,20 @@ jobs: ) steps: - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@0.11.0 + uses: styfle/cancel-workflow-action@0.12.1 with: access_token: ${{ github.token }} - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Install system dependencies - if: runner.os == 'Linux' - run: | - # your system installation code here - # sudo apt-get install -y libcurl4-openssl-dev - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5.3.0 with: python-version: "3.9" architecture: "x64" - name: Run pre-commit - uses: pre-commit/action@v3.0.0 - env: + uses: pre-commit/action@v3.0.1 + env: SKIP: pkgdown - name: Commit files if: failure() && startsWith(github.ref, 'refs/heads') diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index fe87549b5..d9d5c3d89 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -15,7 +15,7 @@ jobs: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: r-lib/actions/setup-r@v2 with: diff --git a/.github/workflows/touchstone-receive.yaml b/.github/workflows/touchstone-receive.yaml index b1b462650..361368720 100644 --- a/.github/workflows/touchstone-receive.yaml +++ b/.github/workflows/touchstone-receive.yaml @@ -24,7 +24,7 @@ jobs: config: ${{ steps.read_touchstone_config.outputs.config }} steps: - name: Checkout repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 diff --git a/.gitignore b/.gitignore index 930a72e86..ee5c72f4a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,12 @@ +.DS_Store .RData .Rhistory .Rproj.user .gitsum +.vscode Meta R/scratch +README.html doc docs gitsum @@ -11,6 +14,7 @@ inst/doc revdep/ !revdep/*.md !revdep/problems.md +tests/testthat/*/*-in_tree touchstone/* !touchstone/config.json !touchstone/script.R diff --git a/.lintr b/.lintr index 8244162db..726a8b596 100644 --- a/.lintr +++ b/.lintr @@ -1,27 +1,27 @@ -linters: linters_with_defaults( - commented_code_linter = NULL, - cyclocomp_linter = cyclocomp_linter(40), - fixed_regex_linter = NULL, - function_argument_linter = NULL, - indentation_linter = NULL, - line_length_linter(120), - namespace_linter = NULL, - nested_ifelse_linter = NULL, - object_name_linter = NULL, - object_length_linter(70), - object_usage_linter = NULL, - todo_comment_linter = NULL, - extraction_operator_linter = NULL, - nonportable_path_linter = NULL, - string_boundary_linter = NULL, - undesirable_function_linter = NULL, - undesirable_operator_linter = NULL, - defaults = linters_with_tags(tags = NULL) - ) +linters: all_linters( + commented_code_linter = NULL, + cyclocomp_linter = cyclocomp_linter(40), + fixed_regex_linter = NULL, + function_argument_linter = NULL, + indentation_linter = NULL, + line_length_linter(120L), + namespace_linter = NULL, + nzchar_linter = NULL, + object_name_linter = NULL, + object_length_linter(70L), + object_overwrite_linter = NULL, + object_usage_linter = NULL, + todo_comment_linter = NULL, + nonportable_path_linter = NULL, + string_boundary_linter = NULL, + strings_as_factors_linter = NULL, # since we use R >= 4.0 + undesirable_function_linter = NULL, + undesirable_operator_linter = NULL + ) exclusions: list( - "inst", - "man", - "tests", - "touchstone", - "vignettes" - ) + "inst", + "man", + "tests", + "touchstone", + "vignettes" + ) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a45eaf64f..0ad306e94 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,12 +1,12 @@ # All available hooks: https://pre-commit.com/hooks.html # R specific hooks: https://github.com/lorenzwalthert/precommit -default_stages: [commit] +default_stages: [pre-commit] default_language_version: python: python3 repos: - repo: https://github.com/lorenzwalthert/precommit - rev: f3498c421d68a1db26de1a1fe3ecc91dd6f03b5e + rev: v0.4.3.9003 hooks: - id: style-files args: @@ -23,6 +23,7 @@ repos: - id: lintr additional_dependencies: - r-lib/lintr + - any::cyclocomp exclude: > (?x)^( inst/.*| @@ -33,9 +34,9 @@ repos: )$ - id: roxygenize additional_dependencies: - - r-lib/pkgapi - - dplyr@1.0.9 - - roxygen2@7.2.2 + - dplyr + - roxygen2 + - rlang - id: use-tidy-description - id: spell-check exclude: > @@ -61,6 +62,7 @@ repos: .*\.Rds| .*\.sh| .*\.RData| + .*\.png| .*-in_tree )$ - id: readme-rmd-rendered @@ -99,7 +101,7 @@ repos: )$ - id: pkgdown - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v5.0.0 hooks: - id: check-added-large-files args: ["--maxkb=200"] @@ -117,7 +119,7 @@ repos: tests/testthat/_snaps/.*| )$ - repo: https://github.com/lorenzwalthert/gitignore-tidy - rev: 475bf5d96927a1887ce2863ff3075b1d7240bc51 + rev: 0.1.2 hooks: - id: tidy-gitignore - repo: local diff --git a/API b/API index 46b34bbcd..e22a357e4 100644 --- a/API +++ b/API @@ -27,7 +27,7 @@ specify_reindention(regex_pattern = NULL, indention = 0L, comments_only = TRUE) specify_transformers_drop(spaces = NULL, indention = NULL, line_breaks = NULL, tokens = NULL) style_dir(path = ".", ..., style = tidyverse_style, transformers = style(...), filetype = c("R", "Rprofile", "Rmd", "Rmarkdown", "Rnw", "Qmd"), recursive = TRUE, exclude_files = NULL, exclude_dirs = c("packrat", "renv"), include_roxygen_examples = TRUE, base_indention = 0L, dry = "off") style_file(path, ..., style = tidyverse_style, transformers = style(...), include_roxygen_examples = TRUE, base_indention = 0L, dry = "off") -style_pkg(pkg = ".", ..., style = tidyverse_style, transformers = style(...), filetype = c("R", "Rprofile", "Rmd", "Rmarkdown", "Rnw", "Qmd"), exclude_files = c("R/RcppExports.R", "R/cpp11.R"), exclude_dirs = c("packrat", "renv"), include_roxygen_examples = TRUE, base_indention = 0L, dry = "off") +style_pkg(pkg = ".", ..., style = tidyverse_style, transformers = style(...), filetype = c("R", "Rprofile", "Rmd", "Rmarkdown", "Rnw", "qmd"), exclude_files = c("R/RcppExports\\.R", "R/cpp11\\.R", "R/import-standalone.*\\.R"), exclude_dirs = c("packrat", "renv"), include_roxygen_examples = TRUE, base_indention = 0L, dry = "off") style_text(text, ..., style = tidyverse_style, transformers = style(...), include_roxygen_examples = TRUE, base_indention = 0L) tidyverse_math_token_spacing() tidyverse_reindention() diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f9759dc00..665875467 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -98,7 +98,7 @@ The source code is organized as follows: | token-create.R | Utilities for creating tokens, mostly to insert braces around mutli-line if statements. | | token-define.R | Defines which tokens belong to which group. | | transform-code.R, transform-files.R | Transformation of code for APIs that manipulate files (e.g. `style_file()`). | -| ui.R | User interaces. Top-level functions for styling. | +| ui.R | User interfaces. Top-level functions for styling. | | unindent.R | Certain tokens cause unindention, e.g. closing braces. | | utils.R | low-level general purpose utilities. | | vertical.R | S3 class for pretty printing of styled code. | diff --git a/DESCRIPTION b/DESCRIPTION index 434ff833e..3418e39e5 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: styler Title: Non-Invasive Pretty Printing of R Code -Version: 1.10.1 +Version: 1.10.3.9000 Authors@R: c(person(given = "Kirill", family = "Müller", @@ -14,7 +14,7 @@ Authors@R: email = "lorenz.walthert@icloud.com"), person(given = "Indrajeet", family = "Patil", - role = "ctb", + role = "aut", email = "patilindrajeet.science@gmail.com", comment = c(ORCID = "0000-0003-1995-6531", Twitter = "@patilindrajeets"))) Description: Pretty-prints R code without changing the user's formatting @@ -23,11 +23,11 @@ License: MIT + file LICENSE URL: https://github.com/r-lib/styler, https://styler.r-lib.org BugReports: https://github.com/r-lib/styler/issues Depends: - R (>= 3.6.0) + R (>= 4.0.0) Imports: cli (>= 3.1.1), magrittr (>= 2.0.0), - purrr (>= 0.2.3), + purrr (>= 1.0.2), R.cache (>= 0.15.0), rlang (>= 1.0.0), rprojroot (>= 1.1), @@ -37,7 +37,6 @@ Imports: Suggests: data.tree (>= 0.1.6), digest, - dplyr, here, knitr, prettycode, @@ -45,7 +44,7 @@ Suggests: roxygen2, rstudioapi (>= 0.7), tibble (>= 1.4.2), - testthat (>= 3.0.0) + testthat (>= 3.2.1) VignetteBuilder: knitr Encoding: UTF-8 @@ -53,7 +52,8 @@ Roxygen: list(markdown = TRUE, roclets = c( "rd", "namespace", "collate", if (rlang::is_installed("pkgapi")) "pkgapi::api_roclet" else { warning("Please install r-lib/pkgapi to make sure the file API is kept up to date"); NULL})) -RoxygenNote: 7.2.3 +RoxygenNote: 7.3.2 +Language: en-US Config/testthat/edition: 3 Config/testthat/parallel: true Collate: @@ -70,6 +70,7 @@ Collate: 'io.R' 'nest.R' 'nested-to-tree.R' + 'options.R' 'parse.R' 'reindent.R' 'token-define.R' diff --git a/NEWS.md b/NEWS.md index 6dc69a941..62b3d4d5b 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,55 @@ + + +# styler 1.10.3 + +This release was requested by the CRAN team since parser error messages changed, +which were hard-coded in some unit tests (#1180). + +**Minor changes** + +- Add a package sticker (#1172, #1173). +- Improve error message for scope (#1176). +- Update lintr config and address newly found lints (#1158). +- Fix new lints about implicit return (#1166). +- Clean new lints (#1149). +- Clean up unnecessary YAML front matter in README (#1165). + +**CI** + +- Update pre-commit and GitHub Actions (#1177, #1175, #1171, #1171, #1164, #1152, #1148). +- Delete URL check workflow (#1160). + +**Testing** + +- Suppress warning in io tests (#1169). +- Ensure unit tests check for appropriate error messages in the R parser for + R > 4.3 (#1180). +- Remove outdated test about repeated parsing (#1163). +- Update roxygen test comments (#1162). +- Delete unused snapshot (#1159). + +We thank everyone who helped making this release possible. + +[@AshesITR](https://github.com/AshesITR), [@averissimo](https://github.com/averissimo), [@IndrajeetPatil](https://github.com/IndrajeetPatil), [@lorenzwalthert](https://github.com/lorenzwalthert), [@mcanouil](https://github.com/mcanouil), [@moodymudskipper](https://github.com/moodymudskipper), [@olivroy](https://github.com/olivroy), [@sbanville-delfi](https://github.com/sbanville-delfi), [@sorhawell](https://github.com/sorhawell), [@ssh352](https://github.com/ssh352), [@swo](https://github.com/swo), and [@vertesy](https://github.com/vertesy). + +# styler 1.10.2 + +This release was requested by the CRAN team to fix CRAN warning on invalid +numeric version inputs (#1143). + +**Minor changes** + +* Use cli messaging for cache (#1127). +* Use latest (and stable!) pre-commit (#1144). +* Fix CRAN warning on invalid numeric version inputs (#1143). +* Bump JamesIves/github-pages-deploy-action from 4.4.2 to 4.4.3 (#1139). +* fix pre-commit (#1132). +* Don't require dplyr anywhere (#1131). + +We thank everyone who helped making this release possible. + +[@krlmlr](https://github.com/krlmlr), [@lorenzwalthert](https://github.com/lorenzwalthert), [@MichaelChirico](https://github.com/MichaelChirico), [@olivroy](https://github.com/olivroy), [@rkrug](https://github.com/rkrug), and [@rossdrucker](https://github.com/rossdrucker). + # styler 1.10.1 This release was requested by CRAN due to accidentally populating a user cache while building vignettes for R >= 4.3.0. @@ -141,7 +193,7 @@ A big shout out to anyone who contributed to this release: This release was requested by CRAN to resolve an R CMD Check note (#1044). A big hand to everyone who made this release possible: -[@DaveJarvis](https://github.com/DaveJarvis), +Dave Jarvis, [@IndrajeetPatil](https://github.com/IndrajeetPatil), [@lorenzwalthert](https://github.com/lorenzwalthert), [@MichaelChirico](https://github.com/MichaelChirico), diff --git a/R/addins.R b/R/addins.R index 61dcb24e3..ab832ca52 100644 --- a/R/addins.R +++ b/R/addins.R @@ -68,11 +68,11 @@ style_active_file <- function() { } else if (is_r_file) { out <- try_transform_as_r_file(context, transformer) } else { - abort("Can only style .R, .Rmd and .Rnw files.") + abort("Can only style .qmd, .R, .Rmd, and .Rnw files.") } rstudioapi::modifyRange( c(1L, 1L, length(context$contents) + 1L, 1L), - paste0(ensure_last_n_empty(out), collapse = "\n"), + paste(ensure_last_n_empty(out), collapse = "\n"), id = context$id ) if (save_after_styling_is_active() && context$path != "") { @@ -97,11 +97,12 @@ save_after_styling_is_active <- function() { op_old <- as.logical(toupper(Sys.getenv("save_after_styling"))) op_new <- getOption("styler.save_after_styling", default = "") if (!is.na(op_old)) { - rlang::warn(paste( - "Using the environment variable save_after_styling is depreciated and", - "won't work in a future version of styler. Please use the R option", - "`styler.save_after_styling` to control the behavior. If both are set,", - "the R option is taken." + cli::cli_warn(c( + "Using the environment variable {.envvar save_after_styling} is \\ + deprecated and won't work in a future version of styler. ", + "!" = "Please use `options(styler.save_after_styling)` \\ + to control the behavior.", + i = "If both are set, the R option is used." )) } @@ -123,7 +124,7 @@ style_selection <- function() { communicate_addins_style_transformers() context <- get_rstudio_context() text <- context$selection[[1L]]$text - if (all(nchar(text) == 0L)) abort("No code selected") + if (!any(nzchar(text))) abort("No code selected") out <- style_text( text, transformers = get_addins_style_transformer(), @@ -131,7 +132,7 @@ style_selection <- function() { ) rstudioapi::modifyRange( context$selection[[1L]]$range, - paste0(c( + paste(c( out, if (context$selection[[1L]]$range$end[2L] == 1L) "" ), collapse = "\n"), @@ -212,9 +213,9 @@ try_transform_as_r_file <- function(context, transformer) { transformer(context$contents), error = function(e) { preamble_for_unsaved <- paste( - "Styling of unsaved files is only supported for R files with valid ", - "code. Please save the file (as .R or .Rmd) and make sure that the R ", - "code in it can be parsed. Then, try to style again." + "Styling of unsaved files is only supported for R files with valid", + "code. Please save the file (as .qmd, .R, or .Rmd) and make sure that", + "the R code in it can be parsed. Then, try to style again." ) if (context$path == "") { diff --git a/R/communicate.R b/R/communicate.R index 5b1ca30a0..6cd00d385 100644 --- a/R/communicate.R +++ b/R/communicate.R @@ -27,14 +27,17 @@ communicate_summary <- function(changed, ruler_width) { cat("Status\tCount\tLegend \n") cli::cat_bullet( "\t", sum(!changed, na.rm = TRUE), "\tFile unchanged.", - bullet = "tick" + bullet = "tick", + bullet_col = "green" ) cli::cat_bullet( "\t", sum(changed, na.rm = TRUE), "\tFile changed.", - bullet = "info" + bullet = "info", + bullet_col = "cyan" ) cli::cat_bullet( - bullet = "cross", "\t", sum(is.na(changed)), "\tStyling threw an error." + bullet = "cross", "\t", sum(is.na(changed)), "\tStyling threw an error.", + bullet_col = "red" ) cli::cat_rule(width = max(40L, ruler_width)) } diff --git a/R/compat-dplyr.R b/R/compat-dplyr.R index 340810003..1d8d6623e 100644 --- a/R/compat-dplyr.R +++ b/R/compat-dplyr.R @@ -10,12 +10,6 @@ lead <- function(x, n = 1L, default = NA) { c(x[-seq_len(n)], rep(default, n)) } - -arrange <- function(.data, ...) { - ord <- eval(substitute(order(...)), .data, parent.frame()) - vec_slice(.data, ord) -} - arrange_pos_id <- function(data) { pos_id <- data$pos_id if (is.unsorted(pos_id)) { @@ -51,9 +45,3 @@ left_join <- function(x, y, by) { last <- function(x) { x[[length(x)]] } - -map_dfr <- function(.x, .f, ...) { - .f <- purrr::as_mapper(.f, ...) - res <- map(.x, .f, ...) - vec_rbind(!!!res) -} diff --git a/R/detect-alignment-utils.R b/R/detect-alignment-utils.R index ead1d041e..8e7965c19 100644 --- a/R/detect-alignment-utils.R +++ b/R/detect-alignment-utils.R @@ -32,9 +32,8 @@ alignment_drop_comments <- function(pd_by_line) { out <- vec_slice(x, x$token != "COMMENT") if (nrow(out) < 1L) { return(NULL) - } else { - out } + out }) %>% compact() } @@ -82,22 +81,22 @@ alignment_ensure_trailing_comma <- function(pd_by_line) { last_pd$spaces[nrow(last_pd)] <- 0L if (last(last_pd$token) == "','") { return(pd_by_line) - } else { - tokens <- create_tokens( - tokens = "','", - texts = ",", - lag_newlines = 0L, - spaces = 0L, - pos_ids = NA, - stylerignore = last_pd$stylerignore[1L], - indents = last_pd$indent[1L] - ) - tokens$.lag_spaces <- 0L - - tokens$lag_newlines <- tokens$pos_id <- NULL - pd_by_line[[length(pd_by_line)]] <- rbind(last_pd, tokens) - pd_by_line } + + tokens <- create_tokens( + tokens = "','", + texts = ",", + lag_newlines = 0L, + spaces = 0L, + pos_ids = NA, + stylerignore = last_pd$stylerignore[1L], + indents = last_pd$indent[1L] + ) + tokens$.lag_spaces <- 0L + + tokens$lag_newlines <- tokens$pos_id <- NULL + pd_by_line[[length(pd_by_line)]] <- rbind(last_pd, tokens) + pd_by_line } #' Checks if all arguments of column 1 are named @@ -154,16 +153,15 @@ alignment_serialize_line <- function(relevant_pd_by_line, column) { alignment_serialize <- function(pd_sub) { out <- Map(function(terminal, text, child, spaces, newlines) { if (terminal) { - return(paste0(text, rep_char(" ", spaces))) + paste0(text, rep_char(" ", spaces)) } else { - return(paste0(alignment_serialize(child), rep_char(" ", spaces))) + paste0(alignment_serialize(child), rep_char(" ", spaces)) } }, pd_sub$terminal, pd_sub$text, pd_sub$child, pd_sub$spaces, pd_sub$newlines) if (anyNA(out)) { return(NA) - } else { - paste0(out, collapse = "") } + paste(out, collapse = "") } #' Check if spacing around comma is correct diff --git a/R/detect-alignment.R b/R/detect-alignment.R index 970ab6ffd..bf8ffbe7c 100644 --- a/R/detect-alignment.R +++ b/R/detect-alignment.R @@ -101,11 +101,11 @@ token_is_on_aligned_line <- function(pd_flat) { if (length(pd_by_line) < 1L) { return(TRUE) } - pd_by_line <- alignment_drop_last_expr(pd_by_line) %>% + pd_by_line <- pd_by_line %>% + alignment_drop_last_expr() %>% alignment_ensure_no_closing_brace(last_line_is_closing_brace_only) - pd_by_line <- pd_by_line %>% - alignment_ensure_trailing_comma() + pd_by_line <- alignment_ensure_trailing_comma(pd_by_line) # now, pd only contains arguments separated by values, ideal for iterating # over columns. n_cols <- map_int(pd_by_line, ~ sum(.x$token == "','")) diff --git a/R/environments.R b/R/environments.R index 83863ce31..e2a523905 100755 --- a/R/environments.R +++ b/R/environments.R @@ -26,8 +26,9 @@ #' * `parser_version_find()` determines the version of the parser from parse #' data. This does not necessarily mean that the version found is the #' actual version, but it *behaves* like it. For example, code that does not -#' contain `EQ_ASSIGN` is parsed the same way with version 1 and 2. If the -#' behavior is identical, the version is set to 1. +#' contain `EQ_ASSIGN` is parsed the same way with version `1` and `2`. If the +#' behavior is identical, the version is set to `1`. Since the package now +#' requires R >= 4.0, the version is always set to `3`. #' @param version The version of the parser to be used. #' @param pd A parse table such as the output from #' `utils::getParseData(parse(text = text))`. @@ -42,10 +43,7 @@ parser_version_get <- function() { } #' @rdname parser_version_set -parser_version_find <- function(pd) { - if (any(pd$token == "equal_assign")) 2L else 3L -} - +parser_version_find <- function(pd) 3L #' The elements that are added to this environment are: #' diff --git a/R/io.R b/R/io.R index 565afb400..a0d8c2168 100644 --- a/R/io.R +++ b/R/io.R @@ -19,7 +19,7 @@ transform_utf8 <- function(path, fun, dry) { #' styling are not identical. #' @keywords internal transform_utf8_one <- function(path, fun, dry) { - rlang::arg_match(dry, c("on", "off", "fail")) + rlang::arg_match0(dry, c("on", "off", "fail")) rlang::try_fetch( { file_with_info <- read_utf8(path) @@ -31,30 +31,34 @@ transform_utf8_one <- function(path, fun, dry) { identical_content <- identical(file_with_info$text, new) identical <- identical_content && !file_with_info$missing_EOF_line_break if (!identical) { - if (dry == "fail") { - rlang::abort( + switch(dry, + fail = rlang::abort( paste0( "File `", path, "` would be modified by styler and argument dry", " is set to 'fail'." ), class = "dryError" - ) - } else if (dry == "on") { - # don't do anything - } else if (dry == "off") { - write_utf8(new, path) - } else { - # not implemented - } + ), + on = { + # don't do anything + }, + off = write_utf8(new, path), + { + # not implemented + } + ) } !identical }, error = function(e) { if (inherits(e, "dryError")) { rlang::abort(conditionMessage(e)) - } else { - warn(paste0("When processing ", path, ": ", conditionMessage(e))) } + show_path <- cli::style_hyperlink( + cli::col_blue(basename(path)), + paste0("file://", path) + ) + cli::cli_warn("When processing {show_path}:", parent = e) NA } ) @@ -103,7 +107,8 @@ read_utf8_bare <- function(con, warn = TRUE) { "The file ", con, " is not encoded in UTF-8. ", "These lines contain invalid UTF-8 characters: " ), - toString(c(utils::head(i), if (n > 6L) "...")) + toString(c(utils::head(i), if (n > 6L) "...")), + call. = FALSE ) } x diff --git a/R/nest.R b/R/nest.R index f56cdc6e3..f6e26d210 100644 --- a/R/nest.R +++ b/R/nest.R @@ -343,7 +343,7 @@ nest_parse_data <- function(pd_flat) { rhs <- nest_(child, "child", setdiff(names(child), "parent_")) - nested <- left_join(internal, rhs, by = c("id" = "parent_")) + nested <- left_join(internal, rhs, by = c(id = "parent_")) children <- nested$child for (i in seq_along(children)) { diff --git a/R/nested-to-tree.R b/R/nested-to-tree.R index c51445140..90787fecd 100644 --- a/R/nested-to-tree.R +++ b/R/nested-to-tree.R @@ -66,13 +66,8 @@ create_node_from_nested <- function(pd_nested, parent, structure_only) { if (is.null(pd_nested)) { return() } - node_info <- create_node_info(pd_nested, structure_only) - - child_nodes <- - node_info %>% - map(parent$AddChild) - + child_nodes <- map(node_info, parent$AddChild) map2(pd_nested$child, child_nodes, create_node_from_nested, structure_only) } diff --git a/R/options.R b/R/options.R new file mode 100644 index 000000000..1625f5a1c --- /dev/null +++ b/R/options.R @@ -0,0 +1,56 @@ +#' Package options +#' +#' These options can be set via [options()] and queried via [getOption()]. +#' For this, add a `styler.` prefix (the package name and a dot) to the option name. +#' Example: for an option `foo`, use `options(styler.foo = value)` to set it +#' and `getOption("styler.foo")` to retrieve the current value. +#' An option value of `NULL` means that the default is used. +#' +#' @usage NULL +#' @format NULL +#' +#' @name styler_options +#' +#' @examplesIf FALSE +#' getOption("styler.ignore_alignment") +#' options( +#' styler.ignore_alignment = TRUE, +#' styler.quiet = TRUE +#' ) +#' getOption("styler.ignore_alignment") +#' +#' @section Options for the styler package: +#' +#' - `styler.addins_style_transformer`: character. +#' The name of the style transformer to use in the addins. +#' (default: `"styler::tidyverse_style()"`) +#' +#' - `styler.cache_name`: character. +#' The name of the styler cache to use. +#' (default: `r unlist(unname(read.dcf("DESCRIPTION")[, "Version"]), use.names = FALSE)`) +#' +#' - `styler.cache_root`: character. +#' The directory where the cache files are stored. For more, see `help("caching")`. +#' (default: `NULL`) +#' +#' - `styler.colored_print.vertical`: logical. +#' It decides whether or not the output should be colored with `prettycode::highlight()`. +#' (default: `TRUE`) +#' +#' - `styler.ignore_alignment`: logical. +#' If `TRUE`, alignment, when detected, is ignored. For more, see `vignette("detect-alignment")`. +#' (default: `FALSE`) +#' +#' - `styler.ignore_start`, `styler.ignore_stop`: character. +#' Regular expressions to ignore lines that match them. For more, see `help("stylerignore")`. +#' (default: `"styler: off"` and `"styler: on"`, respectively) +#' +#' - `styler.quiet`: logical. +#' It decides whether or not to print an informative message about what the function is doing. +#' If `TRUE`, no output is printed. +#' (default: `FALSE`) +#' +#' - `styler.test_dir_writable`: logical. +#' If `TRUE`, the package tests whether the directory is writable. +#' (default: `TRUE`) +NULL diff --git a/R/parse.R b/R/parse.R index 6beadd942..d4bacd1c4 100644 --- a/R/parse.R +++ b/R/parse.R @@ -15,25 +15,26 @@ #' #' styler:::parse_safely("a + 3 -4 -> \n glück + 1") parse_safely <- function(text, ...) { - tried_parsing <- rlang::try_fetch( + tried_parsing <- withCallingHandlers( parse(text = text, ...), - error = function(e) e, - warning = function(w) w - ) - if (inherits(tried_parsing, "error")) { - if (has_crlf_as_first_line_sep(tried_parsing$message, text)) { - abort(paste0( - "The code to style seems to use Windows style line endings (CRLF). ", - "styler currently only supports Unix style line endings (LF). ", - "Please change the EOL character in your editor to Unix style and try ", - "again.\nThe parsing error was:\n", tried_parsing$message - )) - } else { - abort(tried_parsing$message) + error = function(e) { + if (has_crlf_as_first_line_sep(e$message, text)) { + msg <- c( + x = "The code to style seems to use Windows style line endings (CRLF).", + `!` = "styler currently only supports Unix style line endings (LF). ", + i = "Please change the EOL character in your editor to Unix style + and try again." + ) + } else { + msg <- c(x = "Styling failed") + } + cli::cli_abort(msg, parent = e, call = NULL) + }, + warning = function(w) { + cli::cli_warn(w$message) + w } - } else if (inherits(tried_parsing, "warning")) { - warn(tried_parsing$message) - } + ) tried_parsing } @@ -87,23 +88,20 @@ tokenize <- function(text) { #' @param ... Other arguments passed to [utils::getParseData()]. #' @keywords internal get_parse_data <- function(text, include_text = TRUE, ...) { - # avoid https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=16041 - parse_safely(text, keep.source = TRUE) parsed <- parse_safely(text, keep.source = TRUE) pd <- utils::getParseData(parsed, includeText = include_text) %>% styler_df() if (getRversion() < "4.2") { is_unicode_parsing_error <- grepl("^\"\"$", pd$text) if (any(is_unicode_parsing_error)) { - rlang::abort(paste0( - "Can't parse input due to unicode restriction in base R. Please ", - "upgrade R to >= 4.2 to style this input. ", - "Context: https://github.com/r-lib/styler/issues/847" + cli::cli_abort(c( + "Can't parse input due to unicode restriction in base R.", + i = "Please upgrade R to >= 4.2 to style this input.", + "Context: {.url https://github.com/r-lib/styler/issues/847}" )) } } - pd <- pd %>% - add_id_and_short() + pd <- add_id_and_short(pd) pd } @@ -182,7 +180,6 @@ ensure_correct_txt <- function(pd, text) { #' changes from "all strings" to "all problematic strings", is partly #' misleading and this approach was chosen for performance reasons only. #' @param pd A parse table. -#' @param text The initial code to style. #' @keywords internal is_insufficiently_parsed_string <- function(pd) { grepl("^\\[", pd$text) & pd$token == "STR_CONST" diff --git a/R/roxygen-examples-parse.R b/R/roxygen-examples-parse.R index 6383fa337..a428acae4 100644 --- a/R/roxygen-examples-parse.R +++ b/R/roxygen-examples-parse.R @@ -68,7 +68,7 @@ parse_roxygen <- function(roxygen) { roxygen_remove_extra_brace <- function(parsed) { parsed <- rlang::try_fetch( { - parse(text = paste0(gsub("^\\\\[[:alpha:]]*", "", parsed), collapse = "")) + parse(text = paste(gsub("^\\\\[[:alpha:]]*", "", parsed), collapse = "")) parsed }, error = function(e) { @@ -179,6 +179,6 @@ needs_rd_emulation <- function(roxygen) { #' @keywords internal post_parse_roxygen <- function(raw) { raw %>% - paste0(collapse = "") %>% + paste(collapse = "") %>% convert_newlines_to_linebreaks() } diff --git a/R/roxygen-examples.R b/R/roxygen-examples.R index 242d422e1..588006df8 100644 --- a/R/roxygen-examples.R +++ b/R/roxygen-examples.R @@ -46,8 +46,7 @@ style_roxygen_code_example_one <- function(example_one, } ) } - unmasked %>% - add_roxygen_mask(example_one, bare$example_type) + add_roxygen_mask(unmasked, example_one, bare$example_type) } #' Style a roxygen code example segment @@ -118,8 +117,9 @@ style_roxygen_example_snippet <- function(code_snippet, ) ) if (!is_cached || !cache_is_active) { - code_snippet <- code_snippet %>% + code_snippet <- parse_transform_serialize_r( + code_snippet, transformers, base_indention = base_indention, warn_empty = FALSE, diff --git a/R/rules-indention.R b/R/rules-indention.R index 7019ef7e6..1439edb2a 100644 --- a/R/rules-indention.R +++ b/R/rules-indention.R @@ -15,15 +15,16 @@ indent_braces <- function(pd, indent_by) { #' #' Necessary for consistent indention of the function declaration header. #' @param pd A parse table. -#' @inheritParams is_double_indent_function_declaration -#' @seealso set_unindention_child update_indention_ref_fun_dec +#' @inheritParams is_single_indent_function_declaration +#' @seealso set_unindention_child update_indention_reference_function_declaration #' @keywords internal -unindent_fun_dec <- function(pd, indent_by = 2L) { +unindent_function_declaration <- function(pd, indent_by = 2L) { if (is_function_declaration(pd)) { - idx_closing_brace <- which(pd$token %in% "')'") + idx_closing_brace <- which(pd$token == "')'") fun_dec_head <- seq2(2L, idx_closing_brace) - if (is_double_indent_function_declaration(pd, indent_by = indent_by)) { - pd$indent[fun_dec_head] <- 2L * indent_by + if (is_single_indent_function_declaration(pd, indent_by = indent_by)) { + pd$indent[fun_dec_head] <- indent_by + pd$indent[idx_closing_brace] <- 0L } else { pd$indent[fun_dec_head] <- 0L } @@ -31,20 +32,21 @@ unindent_fun_dec <- function(pd, indent_by = 2L) { pd } -#' Is the function declaration double indented? +#' Is the function declaration single indented? #' #' Assumes you already checked if it's a function with -#' `is_function_declaration`. It is double indented if the first token +#' `is_function_declaration`. It is single indented if the first token #' after the first line break that is a `"SYMBOL_FORMALS"`. #' @param pd A parse table. #' @inheritParams tidyverse_style #' @keywords internal -is_double_indent_function_declaration <- function(pd, indent_by = 2L) { +is_single_indent_function_declaration <- function(pd, indent_by = 2L) { head_pd <- vec_slice(pd, -nrow(pd)) line_break_in_header <- which(head_pd$lag_newlines > 0L & head_pd$token == "SYMBOL_FORMALS") if (length(line_break_in_header) > 0L) { # indent results from applying the rules, spaces is the initial spaces # (which is indention if a newline is ahead) + # The 2L factor is kept to convert double indent to single indent pd$spaces[line_break_in_header[1L] - 1L] <= 2L * indent_by } else { FALSE @@ -131,8 +133,8 @@ NULL #' } #' #' @keywords internal -update_indention_ref_fun_dec <- function(pd_nested) { - if (is_function_declaration(pd_nested) && !is_double_indent_function_declaration(pd_nested)) { +update_indention_reference_function_declaration <- function(pd_nested) { + if (is_function_declaration(pd_nested) && !is_single_indent_function_declaration(pd_nested)) { seq <- seq2(3L, nrow(pd_nested) - 2L) pd_nested$indention_ref_pos_id[seq] <- pd_nested$pos_id[2L] } diff --git a/R/rules-line-breaks.R b/R/rules-line-breaks.R index badff81eb..b091d37de 100644 --- a/R/rules-line-breaks.R +++ b/R/rules-line-breaks.R @@ -149,16 +149,21 @@ set_line_break_around_comma_and_or <- function(pd, strict) { } style_line_break_around_curly <- function(strict, pd) { - if (is_curly_expr(pd) && nrow(pd) > 2L) { - closing_before <- pd$token == "'}'" - opening_before <- (pd$token == "'{'") - to_break <- lag(opening_before, default = FALSE) | closing_before - len_to_break <- sum(to_break) - pd$lag_newlines[to_break] <- ifelse( - pd$token[to_break] == "COMMENT", - pmin(1L, pd$lag_newlines[to_break]), - if (strict) 1L else pmax(1L, pd$lag_newlines[to_break]) - ) + if (is_curly_expr(pd)) { + n_row <- nrow(pd) + if (n_row > 2L) { + closing_before <- pd$token == "'}'" + opening_before <- (pd$token == "'{'") + to_break <- lag(opening_before, default = FALSE) | closing_before + pd$lag_newlines[to_break] <- ifelse( + pd$token[to_break] == "COMMENT", + pmin(1L, pd$lag_newlines[to_break]), + if (strict) 1L else pmax(1L, pd$lag_newlines[to_break]) + ) + } else if (n_row == 2L) { + # pd represents {} + pd$lag_newlines[2L] <- 0L + } } else { is_else <- pd$token == "ELSE" if (any(pd$token_before[is_else] == "'}'")) { @@ -229,23 +234,25 @@ remove_line_break_before_round_closing_after_curly <- function(pd) { pd } -remove_line_breaks_in_fun_dec <- function(pd) { +remove_line_breaks_in_function_declaration <- function(pd) { if (is_function_declaration(pd)) { - is_double_indention <- is_double_indent_function_declaration(pd) + is_single_indention <- is_single_indent_function_declaration(pd) round_after <- ( pd$token == "')'" | pd$token_before == "'('" ) & pd$token_before != "COMMENT" pd$lag_newlines[pd$lag_newlines > 1L] <- 1L - pd$lag_newlines[round_after] <- 0L - if (is_double_indention) { + if (is_single_indention) { pd$lag_newlines[lag(pd$token == "'('")] <- 1L + pd$lag_newlines[round_after] <- 1L + } else { + pd$lag_newlines[round_after] <- 0L } } pd } -#' + add_line_break_after_pipe <- function(pd) { is_pipe <- pd$token %in% c("SPECIAL-PIPE", "PIPE") pd$lag_newlines[lag(is_pipe) & pd$lag_newlines > 1L] <- 1L @@ -268,21 +275,20 @@ set_line_break_after_assignment <- function(pd) { #' Set line break for multi-line function calls #' @param pd A parse table. -#' @param except_token_after A character vector with tokens after "'('" that do -#' not cause a line break after "'('". -#' @param except_text_before A character vector with text before "'('" that do -#' not cause a line break after "'('". -#' @param except_token_before A character vector with text before "')'" that do -#' not cause a line break before "')'". -#' @param force_text_before A character vector with text before "'('" that -#' forces a line break after every argument in the call. +#' @param except_token_before A character vector with tokens that do +#' not cause a line break after them. #' @name set_line_break_if_call_is_multi_line #' #' @keywords internal NULL #' Sets line break after opening parenthesis -#' +#' @param pd The parse table. +#' @param except_token_after The tokens after the token that cause an exception. +#' @param except_text_before A character vector with text before a token that +#' does not cause a line break. +#' @param force_text_before A character vector with text before "'('" that +#' forces a line break after every argument in the call. #' @details #' In general, every call that is multi-line has a line break after the opening #' parenthesis. Exceptions: @@ -341,7 +347,7 @@ set_line_break_after_opening_if_call_is_multi_line <- function(pd, #' position of the first named argument and breaks returns the index of it. #' If there is no named argument, the line is broken right after the opening #' parenthesis. -#' @inheritParams set_line_break_if_call_is_multi_line +#' @param pd A parse table. #' @keywords internal find_line_break_position_in_multiline_call <- function(pd) { candidate <- (which(pd$token == "EQ_SUB") - 1L)[1L] @@ -377,7 +383,8 @@ set_line_break_before_closing_call <- function(pd, except_token_before) { } -#' @rdname set_line_break_if_call_is_multi_line +#' @describeIn set_line_break_if_call_is_multi_line Remove line breaks in +#' function calls. #' @keywords internal remove_line_break_in_fun_call <- function(pd, strict) { if (is_function_call(pd)) { @@ -418,3 +425,31 @@ set_line_break_after_ggplot2_plus <- function(pd) { } pd } + + +remove_empty_lines_after_opening_and_before_closing_braces <- function(pd) { + opening_braces <- c("'('", "'['", "LBB") + closing_braces <- c("')'", "']'") + + paren_after <- pd$token %in% opening_braces + if (any(paren_after)) { + pd$lag_newlines[ + lag(pd$token %in% opening_braces) & pd$lag_newlines > 1L + ] <- 1L + } + + paren_before <- pd$token %in% closing_braces + if (any(paren_before)) { + pd$lag_newlines[ + pd$token %in% closing_braces & pd$lag_newlines > 1L + ] <- 1L + } + + pd +} + + +set_line_breaks_between_top_level_exprs <- function(pd, allowed_blank_lines = 2L) { + pd$lag_newlines <- pmin(pd$lag_newlines, allowed_blank_lines + 1L) + pd +} diff --git a/R/rules-spaces.R b/R/rules-spaces.R index f9dbb293f..57cc8dfb8 100644 --- a/R/rules-spaces.R +++ b/R/rules-spaces.R @@ -4,7 +4,7 @@ #' @include token-define.R #' @keywords internal #' @include token-define.R -set_space_around_op <- function(pd_flat, strict) { +set_space_around_operator <- function(pd_flat, strict) { # spacing and operator in same function because alternative is # calling token_is_on_aligned_line() twice because comma and operator spacing # depends on it. @@ -58,14 +58,16 @@ style_space_around_math_token <- function(strict, zero, one, pd_flat) { # We remove spaces for zero (e.g., around ^ in the tidyverse style guide) # even for strict = FALSE to be consistent with the : operator if (any(pd_flat$token %in% zero)) { - pd_flat <- pd_flat %>% + pd_flat <- style_space_around_token( + pd_flat, strict = TRUE, tokens = zero, level_before = 0L, level_after = 0L ) } if (any(pd_flat$token %in% one)) { - pd_flat <- pd_flat %>% + pd_flat <- style_space_around_token( + pd_flat, strict = strict, tokens = one, level_before = 1L, level_after = 1L ) } @@ -120,7 +122,7 @@ style_space_around_tilde <- function(pd_flat, strict) { pd_flat } -remove_space_after_unary_pm_nested <- function(pd) { +remove_space_after_unary_plus_minus_nested <- function(pd) { if (any(pd$token[1L] %in% c("'+'", "'-'"))) { pd$spaces[1L] <- 0L } @@ -129,7 +131,8 @@ remove_space_after_unary_pm_nested <- function(pd) { } remove_space_before_opening_paren <- function(pd_flat) { - paren_after <- pd_flat$token %in% c("'('", "'['", "LBB") + opening_braces <- c("'('", "'['", "LBB") + paren_after <- pd_flat$token %in% opening_braces if (!any(paren_after)) { return(pd_flat) } @@ -139,7 +142,8 @@ remove_space_before_opening_paren <- function(pd_flat) { } remove_space_after_opening_paren <- function(pd_flat) { - paren_after <- pd_flat$token %in% c("'('", "'['", "LBB") + opening_braces <- c("'('", "'['", "LBB") + paren_after <- pd_flat$token %in% opening_braces if (!any(paren_after)) { return(pd_flat) } @@ -148,7 +152,8 @@ remove_space_after_opening_paren <- function(pd_flat) { } remove_space_before_closing_paren <- function(pd_flat) { - paren_after <- pd_flat$token %in% c("')'", "']'") + closing_braces <- c("')'", "']'") + paren_after <- pd_flat$token %in% closing_braces if (!any(paren_after)) { return(pd_flat) } @@ -169,8 +174,9 @@ add_space_after_for_if_while <- function(pd_flat) { #' @rdname set_line_break_around_curly_curly #' @keywords internal -set_space_in_curly_curly <- function(pd) { +set_space_in_curly <- function(pd) { if (is_curly_expr(pd)) { + # curly-curly after_inner_opening <- pd$token == "'{'" & pd$token_before == "'{'" before_inner_closing <- lead(pd$token == "'}'" & pd$token_after == "'}'") is_curly_curly_inner <- any(after_inner_opening, na.rm = TRUE) && @@ -188,6 +194,10 @@ set_space_in_curly_curly <- function(pd) { pd$spaces[after_outer_opening] <- 0L pd$spaces[before_outer_closing] <- 0L } + + # empty curly + after_is_empty_curly <- lead(pd$token == "'}'" & pd$token_before == "'{'") + pd$spaces[after_is_empty_curly] <- 0L } pd } @@ -331,14 +341,15 @@ set_space_after_bang_bang <- function(pd_flat) { pd_flat } -remove_space_before_dollar <- function(pd_flat) { +remove_space_around_dollar <- function(pd_flat) { dollar_after <- (pd_flat$token == "'$'") & (pd_flat$lag_newlines == 0L) dollar_before <- lead(dollar_after, default = FALSE) pd_flat$spaces[dollar_before] <- 0L + pd_flat$spaces[dollar_after] <- 0L pd_flat } -remove_space_after_fun_dec <- function(pd_flat) { +remove_space_after_function_declaration <- function(pd_flat) { fun_after <- (pd_flat$token == "FUNCTION") & (pd_flat$lag_newlines == 0L) pd_flat$spaces[fun_after] <- 0L pd_flat diff --git a/R/rules-tokens.R b/R/rules-tokens.R index f36ba289a..ed3d3b361 100644 --- a/R/rules-tokens.R +++ b/R/rules-tokens.R @@ -64,7 +64,7 @@ add_brackets_in_pipe_one <- function(pd, pos) { #' @param indent_by The amount of spaces used to indent an expression in curly #' braces. Used for unindention. #' @keywords internal -wrap_if_else_while_for_fun_multi_line_in_curly <- function(pd, indent_by = 2L) { +wrap_if_else_while_for_function_multi_line_in_curly <- function(pd, indent_by = 2L) { key_token <- NULL if (is_for_expr(pd)) { @@ -81,15 +81,14 @@ wrap_if_else_while_for_fun_multi_line_in_curly <- function(pd, indent_by = 2L) { ) } if (is_conditional_expr(pd)) { - pd <- pd %>% - wrap_else_multiline_curly(indent_by, space_after = 0L) + pd <- wrap_else_multiline_curly(pd, indent_by, space_after = 0L) } pd } #' Wrap a multi-line statement in curly braces #' -#' @inheritParams wrap_if_else_while_for_fun_multi_line_in_curly +#' @inheritParams wrap_if_else_while_for_function_multi_line_in_curly #' @inheritParams wrap_subexpr_in_curly #' @param key_token The token that comes right before the token that contains #' the expression to be wrapped (ignoring comments). For if and while loops, diff --git a/R/set-assert-args.R b/R/set-assert-args.R index db49c4097..374f49c94 100644 --- a/R/set-assert-args.R +++ b/R/set-assert-args.R @@ -1,19 +1,3 @@ -#' Set the write_tree argument -#' -#' Sets the argument `write_tree` in [test_collection()] to be `TRUE` for R -#' versions higher or equal to 3.2, and `FALSE` otherwise since the second-level -#' dependency `DiagrammeR` from `data.tree` is not available for R < 3.2. -#' @param write_tree Whether or not to write tree. -#' @keywords internal -set_arg_write_tree <- function(write_tree) { - if (is.na(write_tree)) { - write_tree <- is_installed("data.tree") - } else if (write_tree) { - check_installed("data.tree") - } - write_tree -} - #' Assert the transformers #' #' Actually only assert name and version of style guide in order to make sure @@ -21,7 +5,7 @@ set_arg_write_tree <- function(write_tree) { #' @inheritParams make_transformer #' @keywords internal assert_transformers <- function(transformers) { - version_cutoff <- 2.0 + version_cutoff <- "2.0" no_name <- is.null(transformers$style_guide_name) no_version <- is.null(transformers$style_guide_version) if (no_name || no_version) { @@ -73,8 +57,8 @@ assert_filetype <- function(lowercase_filetype) { allowed_types <- c("r", "rmd", "rmarkdown", "rnw", "rprofile", "qmd") if (!all(lowercase_filetype %in% allowed_types)) { abort(paste( - "filetype must not contain other values than 'R', 'Rprofile',", - "'Rmd', 'Rmarkdown', 'qmd' or 'Rnw' (case is ignored)." + "filetype must not contain other values than 'qmd', 'R',", + "'Rmarkdown', 'Rmd', 'Rnw', or 'Rprofile' (case is ignored)." )) } } diff --git a/R/style-guides.R b/R/style-guides.R index e6a68ae7d..6a5366c52 100644 --- a/R/style-guides.R +++ b/R/style-guides.R @@ -76,13 +76,13 @@ tidyverse_style <- function(scope = "tokens", indention_manipulators <- if ("indention" %in% scope) { list( indent_braces = partial(indent_braces, indent_by = indent_by), - unindent_fun_dec = unindent_fun_dec, + unindent_function_declaration = unindent_function_declaration, indent_op = partial(indent_op, indent_by = indent_by), indent_eq_sub = partial(indent_eq_sub, indent_by = indent_by), indent_without_paren = partial(indent_without_paren, indent_by = indent_by ), - update_indention_ref_fun_dec = update_indention_ref_fun_dec + update_indention_reference_function_declaration = update_indention_reference_function_declaration ) } space_manipulators <- if ("spaces" %in% scope) { @@ -102,19 +102,19 @@ tidyverse_style <- function(scope = "tokens", style_space_around_tilde, strict = strict ), - spacing_around_op = purrr::partial(set_space_around_op, + spacing_around_op = purrr::partial(set_space_around_operator, strict = strict ), remove_space_after_opening_paren = remove_space_after_opening_paren, remove_space_after_excl = remove_space_after_excl, set_space_after_bang_bang = set_space_after_bang_bang, - remove_space_before_dollar = remove_space_before_dollar, - remove_space_after_fun_dec = remove_space_after_fun_dec, + remove_space_around_dollar = remove_space_around_dollar, + remove_space_after_function_declaration = remove_space_after_function_declaration, remove_space_around_colons = remove_space_around_colons, start_comments_with_space = partial(start_comments_with_space, force_one = start_comments_with_one_space ), - remove_space_after_unary_pm_nested = remove_space_after_unary_pm_nested, + remove_space_after_unary_plus_minus_nested = remove_space_after_unary_plus_minus_nested, spacing_before_comments = if (strict) { set_space_before_comments } else { @@ -122,7 +122,7 @@ tidyverse_style <- function(scope = "tokens", }, set_space_between_levels = set_space_between_levels, set_space_between_eq_sub_and_comma = set_space_between_eq_sub_and_comma, - set_space_in_curly_curly = set_space_in_curly_curly + set_space_in_curly = set_space_in_curly ) } @@ -130,13 +130,17 @@ tidyverse_style <- function(scope = "tokens", line_break_manipulators <- if ("line_breaks" %in% scope) { list( + remove_empty_lines_after_opening_and_before_closing_braces = + remove_empty_lines_after_opening_and_before_closing_braces, set_line_break_around_comma_and_or = set_line_break_around_comma_and_or, set_line_break_after_assignment = set_line_break_after_assignment, set_line_break_before_curly_opening = set_line_break_before_curly_opening, remove_line_break_before_round_closing_after_curly = if (strict) remove_line_break_before_round_closing_after_curly, - remove_line_breaks_in_fun_dec = - if (strict) remove_line_breaks_in_fun_dec, + remove_line_breaks_in_function_declaration = + if (strict) remove_line_breaks_in_function_declaration, + set_line_breaks_between_top_level_exprs = + if (strict) set_line_breaks_between_top_level_exprs, style_line_break_around_curly = partial( style_line_break_around_curly, strict @@ -176,10 +180,10 @@ tidyverse_style <- function(scope = "tokens", force_assignment_op = force_assignment_op, resolve_semicolon = resolve_semicolon, add_brackets_in_pipe = add_brackets_in_pipe, - wrap_if_else_while_for_fun_multi_line_in_curly = + wrap_if_else_while_for_function_multi_line_in_curly = if (strict) { purrr::partial( - wrap_if_else_while_for_fun_multi_line_in_curly, + wrap_if_else_while_for_function_multi_line_in_curly, indent_by = indent_by ) } @@ -201,24 +205,24 @@ tidyverse_style <- function(scope = "tokens", # remove_space_after_opening_paren = c("'('", "'['", "LBB"), remove_space_after_excl = "'!'", set_space_after_bang_bang = "'!'", - remove_space_before_dollar = "'$'", - remove_space_after_fun_dec = "FUNCTION", + remove_space_around_dollar = "'$'", + remove_space_after_function_declaration = "FUNCTION", remove_space_around_colons = c("':'", "NS_GET_INT", "NS_GET"), start_comments_with_space = "COMMENT", - remove_space_after_unary_pm_nested = c("'+'", "'-'"), + remove_space_after_unary_plus_minus_nested = c("'+'", "'-'"), spacing_before_comments = "COMMENT", - set_space_in_curly_curly = c("'{'", "'}'") + set_space_in_curly = c("'{'", "'}'") ), indention = list( # indent_braces = c("'('", "'['", "'{'", "')'", "']'", "'}'"), - unindent_fun_dec = "FUNCTION", + unindent_function_declaration = "FUNCTION", indent_eq_sub = c("EQ_SUB", "EQ_FORMALS"), # TODO rename - update_indention_ref_fun_dec = "FUNCTION" + update_indention_reference_function_declaration = "FUNCTION" ), line_breaks = list( set_line_break_before_curly_opening = "'{'", remove_line_break_before_round_closing_after_curly = "'}'", - remove_line_breaks_in_fun_dec = "FUNCTION", + remove_line_breaks_in_function_declaration = "FUNCTION", set_line_break_around_curly_curly = "'{'", style_line_break_around_curly = "'{'", add_line_break_after_pipe = c("SPECIAL-PIPE", "PIPE") @@ -226,12 +230,8 @@ tidyverse_style <- function(scope = "tokens", tokens = list( resolve_semicolon = "';'", add_brackets_in_pipe = c("SPECIAL-PIPE", "PIPE"), - # before 3.6, these assignments are not wrapped into top-level expression - # and `text` supplied to transformers_drop() is "", so it appears to not - # contain EQ_ASSIGN, and the transformer is falsely removed. - # compute_parse_data_nested / text_to_flat_pd ('a = 4') force_assignment_op = "EQ_ASSIGN", - wrap_if_else_while_for_fun_multi_line_in_curly = c( + wrap_if_else_while_for_function_multi_line_in_curly = c( "IF", "WHILE", "FOR", "FUNCTION" ) ) @@ -471,7 +471,7 @@ tidyverse_reindention <- function() { #' @param scope A character vector of length one or a vector of class `AsIs`. #' @param name The name of the character vector to be displayed if the #' construction of the factor fails. - +#' #' @examples #' scope_normalize(I("tokens")) #' scope_normalize(I(c("indention", "tokens"))) @@ -479,12 +479,7 @@ tidyverse_reindention <- function() { #' @export scope_normalize <- function(scope, name = substitute(scope)) { levels <- c("none", "spaces", "indention", "line_breaks", "tokens") - if (!all((scope %in% levels))) { - abort(paste( - "all values in", name, "must be one of the following:", - toString(levels) - )) - } + rlang::arg_match(scope, values = levels, multiple = TRUE) if (inherits(scope, "AsIs")) { factor(as.character(scope), levels = levels, ordered = TRUE) diff --git a/R/styler-package.R b/R/styler-package.R index c1558ef4e..c307a9284 100644 --- a/R/styler-package.R +++ b/R/styler-package.R @@ -1,14 +1,13 @@ -#' Non-invasive pretty printing of R code -#' -#' styler allows you to format `.R`, `.Rmd`, `.Rmarkdown` and/or -#' `.qmd`, `.Rnw` files, R packages, or entire R source trees +#' @description +#' styler allows you to format `.qmd`, `.R`, `.Rmd`, `.Rmarkdown`, +#' `.Rnw`, and/or `.Rprofile` files, R packages, or entire R source trees #' according to a style guide. #' The following functions can be used for styling: #' * [style_text()] to style a character vector. #' * [style_file()] to style a single file. #' * [style_dir()] to style all files in a directory. #' * [style_pkg()] to style the source files of an R package. -#' * [styler_addins] (RStudio Addins) to style either selected code or the +#' * [RStudio Addins][styler_addins] to style either selected code or the #' active file. #' @examples #' style_text("call( 1)") @@ -18,14 +17,15 @@ #' style_text("a%>%b; a", scope = "tokens") "_PACKAGE" -## usethis namespace: start +## styler namespace: start #' -#' @importFrom magrittr "%>%" +#' @importFrom magrittr %>% #' @importFrom purrr compact partial flatten flatten_int flatten_chr #' @importFrom purrr map map_lgl map_int map_chr map2 map2_chr map_at pmap pwalk -#' @importFrom rlang abort warn seq2 check_installed is_installed "%||%" set_names +#' @importFrom rlang abort warn seq2 check_installed is_installed %||% set_names #' @importFrom vctrs vec_rbind vec_slice vec_split -## usethis namespace: end +#' +## styler namespace: end NULL diff --git a/R/stylerignore.R b/R/stylerignore.R index 4cf0b30bd..64fc05337 100644 --- a/R/stylerignore.R +++ b/R/stylerignore.R @@ -76,9 +76,10 @@ add_stylerignore <- function(pd_flat) { pd_flat$indicator_off <- cumsum_start + cumsum_stop is_invalid <- cumsum_start - cumsum_stop < 0L | cumsum_start - cumsum_stop > 1L if (any(is_invalid)) { - cli::cli_warn(paste0( - "Invalid stylerignore sequences found, potentially ignoring some of the ", - "markers set.\nSee {.help styler::stylerignore}." + cli::cli_warn(c( + "Invalid stylerignore sequences found, potentially ignoring some of the \\ + markers set.", + i = "See {.topic styler::stylerignore}." )) } diff --git a/R/testing.R b/R/testing.R index 5d48d6852..bce9f8b3c 100644 --- a/R/testing.R +++ b/R/testing.R @@ -19,7 +19,7 @@ #' @keywords internal test_collection <- function(test, sub_test = NULL, dry = "off", - write_tree = NA, + write_tree = FALSE, transformer, ...) { path <- rprojroot::find_testthat_root_file(test) @@ -93,9 +93,7 @@ construct_tree <- function(in_paths, suffix = "_tree") { #' @param out_name The label of the out_item, defaults to `out_item`. #' @param transformer A function to apply to the content of `in_item`. #' @param write_tree Whether or not the tree structure of the test should be -#' computed and written to a file. Note that this needs R >= 3.2 -#' (see [set_arg_write_tree()]). If the argument is set to `NA`, the function -#' determines whether R >= 3.2 is in use and if so, trees will be written. +#' computed and written to a files. #' @param ... Parameters passed to transformer function. #' @param out_tree Name of tree file if written out. #' @inheritParams transform_utf8 @@ -103,9 +101,9 @@ construct_tree <- function(in_paths, suffix = "_tree") { transform_and_check <- function(in_item, out_item, in_name = in_item, out_name = out_item, transformer, dry, - write_tree = NA, + write_tree = FALSE, out_tree = "_tree", ...) { - write_tree <- set_arg_write_tree(write_tree) + if (write_tree) check_installed("data.tree") read_in <- read_utf8_bare(in_item) if (write_tree) { create_tree(read_in) %>% @@ -119,7 +117,7 @@ transform_and_check <- function(in_item, out_item, unclass() if (!file.exists(out_item)) { warn(paste( - "File", out_item, "does not exist. Creating it from transormation." + "File", out_item, "does not exist. Creating it from transformation." )) file.create(out_item) } @@ -237,7 +235,7 @@ n_times_faster_with_cache <- function(x1, x2 = x1, ..., fun = styler::style_text, n = 3L, clear = "always") { - rlang::arg_match(clear, c("always", "final", "never", "all but last")) + rlang::arg_match0(clear, c("always", "final", "never", "all but last")) out <- purrr::map(1L:n, n_times_faster_bench, x1 = x1, x2 = x2, fun = fun, @@ -269,48 +267,6 @@ n_times_faster_bench <- function(i, x1, x2, fun, ..., n, clear) { ) } - -#' Generate a comprehensive collection test cases for comment / insertion -#' interaction -#' Test consist of if / if-else / if-else-if-else cases, paired with various -#' line-break and comment configurations. Used for internal testing. -#' @return -#' The function is called for its side effects, i.e. to write the -#' test cases to *-in.R files that can be tested with [test_collection()]. Note -#' that a few of the test cases are invalid and need to be removed / commented -#' out manually. -#' @keywords internal -generate_test_samples <- function() { - gen <- function(x) { - if (length(x) == 0L) { - "" - } else { - c( - paste0(x[1L], gen(x[-1L])), - paste0(x[1L], " # comment\n", paste(x[-1L], collapse = "")) - ) - } - } - - collapse <- function(x) paste(x, collapse = "\n\n") - - cat( - collapse(gen(c("if", "(", "TRUE", ")", "NULL"))), - file = "tests/testthat/insertion_comment_interaction/just_if-in.R" - ) - cat( - collapse(gen(c("if", "(", "TRUE", ")", "NULL", " else", " NULL"))), - file = "tests/testthat/insertion_comment_interaction/if_else-in.R" - ) - cat( - collapse(gen(c( - "if", "(", "TRUE", ")", "NULL", " else", " if", "(", "FALSE", ")", "NULL", - " else", " NULL" - ))), - file = "tests/testthat/insertion_comment_interaction/if_else_if_else-in.R" - ) -} - #' @include ui-caching.R clear_testthat_cache <- purrr::partial(cache_clear, "testthat", ask = FALSE) activate_testthat_cache <- purrr::partial(cache_activate, "testthat") @@ -327,7 +283,7 @@ local_test_setup <- function(cache = FALSE, .local_envir = parent.frame()) { current_cache <- cache_info(format = "tabular") withr::local_options( - list("styler.quiet" = TRUE, "R.cache.rootPath" = tempfile()), + list(styler.quiet = TRUE, R.cache.rootPath = tempfile()), .local_envir = .local_envir ) if (cache) { diff --git a/R/token-define.R b/R/token-define.R index 0954bcb80..64813fa1d 100644 --- a/R/token-define.R +++ b/R/token-define.R @@ -23,8 +23,7 @@ token <- rbind.data.frame( c("if", "cond", "IF"), c("else", "cond", "ELSE"), c("in", "loop_cond", "IN"), - c("while", "loop_cond", "WHILE"), - stringsAsFactors = FALSE + c("while", "loop_cond", "WHILE") ) # styler: on diff --git a/R/transform-code.R b/R/transform-code.R index 4f2b0337d..7e2cba4ff 100644 --- a/R/transform-code.R +++ b/R/transform-code.R @@ -22,7 +22,7 @@ transform_code <- function(path, fun, ..., dry) { ..., dry = dry ) } else { - abort(paste(path, "is not an R, Rmd, qmd, or Rnw file")) + cli::cli_abort("{.path {path}} is not a qmd, R, Rmd, or Rnw file.") } } @@ -100,8 +100,9 @@ identify_raw_chunks <- function(lines, if (filetype == "Rmd") { starts <- grep( - "^[\t >]*```+\\s*\\{([Rr]( *[ ,].*)?)\\}\\s*$", lines, - perl = TRUE + "^[\t >]*```+\\s*\\{((r|webr-r|webr)( *[ ,].*)?)\\}\\s*$", + lines, + perl = TRUE, ignore.case = TRUE ) ends <- grep("^[\t >]*```+\\s*$", lines, perl = TRUE) ends <- purrr::imap_int(starts, ~ ends[which(ends > .x)[1L]]) %>% diff --git a/R/transform-files.R b/R/transform-files.R index 3fb769fbc..28dc79c50 100644 --- a/R/transform-files.R +++ b/R/transform-files.R @@ -66,18 +66,18 @@ transform_file <- function(path, } changed <- transform_code(path, fun = fun, ..., dry = dry) - bullet <- if (is.na(changed)) { - "warning" - } else { - if (changed) { - "info" + if (!getOption("styler.quiet", FALSE)) { + if (is.na(changed)) { + bullet <- "warning" + color <- "red" + } else if (changed) { + bullet <- "info" + color <- "cyan" } else { - "tick" + bullet <- "tick" + color <- "green" } - } - - if (!getOption("styler.quiet", FALSE)) { - cli::cat_bullet(bullet = bullet) + cli::cat_bullet(bullet = bullet, bullet_col = color) } invisible(changed) } @@ -116,9 +116,13 @@ make_transformer <- function(transformers, use_cache <- FALSE } - if (!use_cache) { - transformed_code <- text %>% - parse_transform_serialize_r(transformers, + if (use_cache) { + text + } else { + transformed_code <- + parse_transform_serialize_r( + text, + transformers, base_indention = base_indention, warn_empty = warn_empty ) @@ -139,8 +143,6 @@ make_transformer <- function(transformers, } transformed_code - } else { - text } } } diff --git a/R/ui-caching.R b/R/ui-caching.R index 9aace1eb1..6713569e5 100644 --- a/R/ui-caching.R +++ b/R/ui-caching.R @@ -93,7 +93,7 @@ NULL #' @family cache managers #' @export cache_info <- function(cache_name = NULL, format = "both") { - rlang::arg_match(format, c("tabular", "lucid", "both")) + rlang::arg_match0(format, c("tabular", "lucid", "both")) path_cache <- cache_find_path(cache_name) files <- list.files(path_cache, full.names = TRUE) file_info <- file.info(files) @@ -104,8 +104,7 @@ cache_info <- function(cache_name = NULL, format = "both") { last_modified = suppressWarnings(max(file_info$mtime)), created = file.info(path_cache)$ctime, location = path_cache, - activated = cache_is_activated(cache_name), - stringsAsFactors = FALSE + activated = cache_is_activated(cache_name) ) if (any(c("lucid", "both") == format)) { @@ -138,7 +137,7 @@ cache_info <- function(cache_name = NULL, format = "both") { #' @export cache_activate <- function(cache_name = NULL, verbose = !getOption("styler.quiet", FALSE)) { - options("styler.cache_name" = cache_name %||% styler_version) + options(styler.cache_name = cache_name %||% styler_version) path <- cache_find_path(cache_name) if (verbose) { @@ -155,7 +154,7 @@ cache_activate <- function(cache_name = NULL, #' @rdname cache_activate #' @export cache_deactivate <- function(verbose = !getOption("styler.quiet", FALSE)) { - options("styler.cache_name" = NULL) + options(styler.cache_name = NULL) if (verbose) { cat("Deactivated cache.\n") diff --git a/R/ui-styling.R b/R/ui-styling.R index bb4cc136c..ac48da5eb 100644 --- a/R/ui-styling.R +++ b/R/ui-styling.R @@ -68,8 +68,8 @@ style_pkg <- function(pkg = ".", ..., style = tidyverse_style, transformers = style(...), - filetype = c("R", "Rprofile", "Rmd", "Rmarkdown", "Rnw", "Qmd"), - exclude_files = c("R/RcppExports.R", "R/cpp11.R"), + filetype = c("R", "Rprofile", "Rmd", "Rmarkdown", "Rnw", "qmd"), + exclude_files = c("R/RcppExports\\.R", "R/cpp11\\.R", "R/import-standalone.*\\.R"), exclude_dirs = c("packrat", "renv"), include_roxygen_examples = TRUE, base_indention = 0L, @@ -87,12 +87,12 @@ style_pkg <- function(pkg = ".", #' Prettify a package #' #' @param filetype Vector of file extensions indicating which file types should -#' be styled. Case is ignored, and the `.` is optional, e.g. `c(".R", -#' ".Rmd")`, or `c("r", "rmd")`. Supported values (after standardization) are: -#' "r", "rprofile", "rmd", "rmarkdown", "rnw", "qmd". Rmarkdown is treated as -#' Rmd. -#' @param exclude_files Character vector with paths to files that should be -#' excluded from styling. +#' be styled. Case is ignored, and the `.` is optional, e.g. `c(".R",".Rmd")`, +#' or `c("r", "rmd")`. Supported values (after standardization) are: +#' "qmd", "r", "rmd", "rmarkdown", "rnw", and "rprofile". +#' Rmarkdown is treated as Rmd. +#' @param exclude_files Character vector with regular expressions to files +#' that should be excluded from styling. #' @param exclude_dirs Character vector with directories to exclude #' (recursively). Note that the default values were set for consistency with #' [style_dir()] and as these directories are anyways not styled. @@ -107,8 +107,11 @@ prettify_pkg <- function(transformers, dry) { filetype_ <- set_and_assert_arg_filetype(filetype) r_files <- rprofile_files <- vignette_files <- readme <- NULL + all_files <- list.files(".", recursive = TRUE, all.files = TRUE) + exclude_files <- grep(paste(exclude_files, collapse = "|"), all_files, value = TRUE) + exclude_files <- set_arg_paths(exclude_files) exclude_files <- c( - set_arg_paths(exclude_files), + exclude_files, dir_without_.(exclude_dirs, pattern = map_filetype_to_pattern(filetype)) ) if ("\\.r" %in% filetype_) { diff --git a/R/utils-cache.R b/R/utils-cache.R index 2465a51a2..97108a63d 100644 --- a/R/utils-cache.R +++ b/R/utils-cache.R @@ -9,7 +9,7 @@ hash_standardize <- function(text) { text %>% convert_newlines_to_linebreaks() %>% enc2utf8() %>% - paste0(collapse = "\n") %>% + paste(collapse = "\n") %>% list() } @@ -54,7 +54,7 @@ is_cached <- function(text, #' a new cache. #' * transformers. Cannot easily hash them because two environments won't be #' identical even if they contain the same objects (see 'Experiments'). Simple -#' `as.character(transformers)` will not consider infinitively recursive +#' `as.character(transformers)` will not consider infinitely recursive #' code dependencies. #' To fix this, transformers must have names and version number as described #' in [create_style_guide()]. Now, the only way to fool the cache invalidation @@ -102,8 +102,10 @@ cache_make_key <- function(text, transformers, more_specs) { text = hash_standardize(text), style_guide_name = transformers$style_guide_name, style_guide_version = transformers$style_guide_version, - more_specs_style_guide = as.character(transformers$more_specs_style_guide) %>% - set_names(names(transformers$more_specs_style_guide)), + more_specs_style_guide = set_names( + as.character(transformers$more_specs_style_guide), + names(transformers$more_specs_style_guide) + ), more_specs = more_specs ) } @@ -157,20 +159,22 @@ cache_by_expression <- function(text, expressions <- parse(text = text, keep.source = TRUE) %>% utils::getParseData(includeText = TRUE) if (env_current$any_stylerignore) { - expressions <- expressions %>% - add_stylerignore() + expressions <- add_stylerignore(expressions) } else { expressions$stylerignore <- rep(FALSE, length(expressions$text)) } - # TODO base_indention should be set to 0 on write and on read for expressions + # TODO base_indention should be set to 0 on write and on read for expressions # (only) to make it possible to use the cache for expressions with different # indention. when not the whole input text is cached, we go trough all # expressions and check if they are cached, if yes, we take the input (from # which the indention # was removed via parse, same as it is in cache_by_expression) and add the # base indention. - expressions[expressions$parent == 0L & expressions$token != "COMMENT" & !expressions$stylerignore, "text"] %>% - map(cache_write, transformers = transformers, more_specs) + map( + expressions[expressions$parent == 0L & expressions$token != "COMMENT" & !expressions$stylerignore, "text"], + cache_write, + transformers = transformers, more_specs + ) } diff --git a/R/utils-navigate-nest.R b/R/utils-navigate-nest.R index 0ef6cf5da..9aeccf109 100644 --- a/R/utils-navigate-nest.R +++ b/R/utils-navigate-nest.R @@ -83,20 +83,3 @@ next_terminal <- function(pd, } } } - - -#' Find the index of the last comment in the sequence of comments-only tokens -#' after the token that has position `pos` in `pd`. -#' @param pd A parse table. -#' @param pos The position of the token to start the search from. -#' @keywords internal -extend_if_comment <- function(pd, pos) { - if (pos == nrow(pd)) { - return(pos) - } - if (pd$token[pos + 1L] == "COMMENT") { - extend_if_comment(pd, pos + 1L) - } else { - pos - } -} diff --git a/R/utils.R b/R/utils.R index e1a235469..4329915e0 100644 --- a/R/utils.R +++ b/R/utils.R @@ -44,7 +44,7 @@ re_match <- function(text, pattern) { end <- start + length - 1L matchstr <- substring(text, start, end) matchstr[start == -1L] <- NA_character_ - res <- data.frame(stringsAsFactors = FALSE, .text = text, .match = matchstr) + res <- data.frame(.text = text, .match = matchstr) gstart <- attr(match, "capture.start") glength <- attr(match, "capture.length") @@ -52,7 +52,7 @@ re_match <- function(text, pattern) { groupstr <- substring(text, gstart, gend) groupstr[gstart == -1L] <- NA_character_ dim(groupstr) <- dim(gstart) - res <- cbind(groupstr, res, stringsAsFactors = FALSE) + res <- cbind(groupstr, res) names(res) <- c(attr(match, "capture.names"), ".text", ".match") res @@ -93,22 +93,6 @@ is_windows <- function() { identical(.Platform$OS.type, "windows") } -#' Invoke a system command -#' -#' Wraps a system command into [shell()] or [system()], depending on the -#' operating system. -#' @param sys_call The call to be executed. -#' @param ... Arguments passed to [shell()] or [system()]. -#' @keywords internal -calls_sys <- function(sys_call, ...) { - if (is_windows()) { - error <- shell(sys_call, ...) - } else { - error <- system(sys_call, ...) - } - error -} - #' Get the value of an option #' #' Basically a `getOptions()` that fails fast by default. @@ -117,11 +101,10 @@ calls_sys <- function(sys_call, ...) { #' option was not set. #' @keywords internal option_read <- function(x, default = NULL, error_if_not_found = TRUE) { - if (x %in% names(options()) || !error_if_not_found) { - getOption(x, default) - } else { + if (!(x %in% names(options())) && error_if_not_found) { rlang::abort(paste("R option", x, "must be set.")) } + getOption(x, default) } #' @keywords internal diff --git a/R/visit.R b/R/visit.R index 1d048bbfa..6fd0d5a97 100644 --- a/R/visit.R +++ b/R/visit.R @@ -233,10 +233,11 @@ enrich_terminals <- function(flattened_pd, use_raw_indention = FALSE) { groups <- flattened_pd$line1 split_pd <- vec_split(flattened_pd, groups)[[2L]] flattened_pd <- split_pd %>% - map_dfr(function(.x) { + purrr::map(function(.x) { .x$col2 <- cumsum(.x$nchar + .x$lag_spaces) .x - }) + }) %>% + purrr::list_rbind() flattened_pd$col1 <- flattened_pd$col2 - flattened_pd$nchar flattened_pd } diff --git a/R/zzz.R b/R/zzz.R index 77b90ee17..65bfd3e16 100644 --- a/R/zzz.R +++ b/R/zzz.R @@ -6,8 +6,8 @@ op <- options() op.styler <- list( styler.addins_style_transformer = "styler::tidyverse_style()", - styler.cache_root = NULL, styler.cache_name = styler_version, + styler.cache_root = NULL, styler.colored_print.vertical = TRUE, styler.ignore_alignment = FALSE, styler.ignore_start = .default_ignore_start, @@ -17,9 +17,14 @@ ) toset <- !(names(op.styler) %in% names(op)) if (any(toset)) options(op.styler[toset]) - ask_to_switch_to_non_default_cache_root() - remove_cache_old_versions() - remove_old_cache_files() + rlang::try_fetch( + { + ask_to_switch_to_non_default_cache_root() + remove_cache_old_versions() + remove_old_cache_files() + }, + error = function(...) NULL + ) invisible() } @@ -36,7 +41,7 @@ delete_if_cache_directory <- function(path) { if (getRversion() < package_version("4.0.0")) { return(FALSE) } - designated_cache_path <- normalizePath(tools::R_user_dir("R.cache", which = "cache")) + designated_cache_path <- normalizePath(tools::R_user_dir("R.cache", which = "cache"), mustWork = FALSE) is_in_tools_cache <- startsWith(path, designated_cache_path) temp_dir <- normalizePath(dirname(tempdir())) is_in_generic_cache <- startsWith(path, temp_dir) @@ -66,7 +71,7 @@ ask_to_switch_to_non_default_cache_root <- function(ask = interactive()) { ask_to_switch_to_non_default_cache_root_impl <- function() { cli::cli_inform(paste0( "{{styler}} cache is cleared after 6 days. ", - "See {.help styler::caching} to configure differently or silence this message." + "See {.topic styler::caching} to configure differently or silence this message." )) } diff --git a/README.Rmd b/README.Rmd index 14fa12a86..1dabfaa36 100644 --- a/README.Rmd +++ b/README.Rmd @@ -1,7 +1,5 @@ --- -output: - github_document: - html_preview: true +output: github_document editor_options: markdown: wrap: 79 @@ -17,22 +15,18 @@ knitr::opts_chunk$set( ) ``` -# styler +# {styler}: Non-Invasive Pretty Printing of R Code -[![R build -status](https://github.com/r-lib/styler/workflows/R-CMD-check/badge.svg)](https://github.com/r-lib/styler/actions) -[![Life cycle: -stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html) -[![codecov test -coverage](https://app.codecov.io/gh/r-lib/styler/branch/main/graph/badge.svg)](https://app.codecov.io/gh/r-lib/styler) -[![CRAN -Status](https://www.r-pkg.org/badges/version/styler)](https://cran.r-project.org/package=styler) +[![R build status](https://github.com/r-lib/styler/workflows/R-CMD-check/badge.svg)](https://github.com/r-lib/styler/actions) +[![Lifecycle](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html) +[![Test coverage](https://codecov.io/gh/r-lib/styler/branch/main/graph/badge.svg)](https://app.codecov.io/gh/r-lib/styler?branch=main) +[![CRAN Status](https://www.r-pkg.org/badges/version/styler)](https://cran.r-project.org/package=styler) -# Overview +# Overview styler formats your code according to the [tidyverse style guide](https://style.tidyverse.org) (or your custom style guide) so you can @@ -70,3 +64,9 @@ The following online docs are available: - [latest CRAN release](https://styler.r-lib.org). - [GitHub development version](https://styler.r-lib.org/dev/). + +## Acknowledgments + +Hex sticker font is [Gayathri](https://fonts.google.com/specimen/Gayathri), and +the image is taken from icon made by [Freepik](https://www.freepik.com) and +available at [flaticon.com](https://www.flaticon.com/free-icon/suit). diff --git a/README.md b/README.md index 08213d935..d2b90ab80 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,21 @@ -# styler +# {styler}: Non-Invasive Pretty Printing of R Code [![R build status](https://github.com/r-lib/styler/workflows/R-CMD-check/badge.svg)](https://github.com/r-lib/styler/actions) -[![Life cycle: -stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html) -[![codecov test -coverage](https://app.codecov.io/gh/r-lib/styler/branch/main/graph/badge.svg)](https://app.codecov.io/gh/r-lib/styler) +[![Lifecycle](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html) +[![Test +coverage](https://codecov.io/gh/r-lib/styler/branch/main/graph/badge.svg)](https://app.codecov.io/gh/r-lib/styler?branch=main) [![CRAN Status](https://www.r-pkg.org/badges/version/styler)](https://cran.r-project.org/package=styler) -# Overview +# Overview styler formats your code according to the [tidyverse style guide](https://style.tidyverse.org) (or your custom style guide) so you @@ -24,10 +23,10 @@ can direct your attention to the content of your code. It helps to keep the coding style consistent across projects and facilitate collaboration. You can access styler through -- the RStudio Addin as demonstrated below -- R functions like `style_pkg()`, `style_file()` or `style_text()` -- various other tools described in - `vignette("third-party-integrations")` +- the RStudio Addin as demonstrated below +- R functions like `style_pkg()`, `style_file()` or `style_text()` +- various other tools described in + `vignette("third-party-integrations")` @@ -50,6 +49,13 @@ remotes::install_github("r-lib/styler") The following online docs are available: -- [latest CRAN release](https://styler.r-lib.org). +- [latest CRAN release](https://styler.r-lib.org). -- [GitHub development version](https://styler.r-lib.org/dev/). +- [GitHub development version](https://styler.r-lib.org/dev/). + +## Acknowledgments + +Hex sticker font is +[Gayathri](https://fonts.google.com/specimen/Gayathri), and the image is +taken from icon made by [Freepik](https://www.freepik.com) and available +at [flaticon.com](https://www.flaticon.com/free-icon/suit). diff --git a/_pkgdown.yaml b/_pkgdown.yaml index ed50bc3f2..012acf7e2 100644 --- a/_pkgdown.yaml +++ b/_pkgdown.yaml @@ -11,6 +11,7 @@ reference: - style_pkg - style_dir - styler_addins + - styler_options - title: "Fine-tune styling" desc: "Customize style guides" - contents: @@ -41,17 +42,17 @@ reference: - print.vertical template: + bootstrap: 5 params: bootswatch: flatly # https://bootswatch.com/flatly/ - docsearch: - api_key: 13580d327d8a7159f83a7cff178d2141 - index_name: r-lib_styler authors: Kirill Müller: href: https://krlmlr.info Lorenz Walthert: href: https://lorenzwalthert.com + Indrajeet Patil: + href: https://sites.google.com/site/indrajeetspatilmorality/ development: mode: auto diff --git a/cran-comments.md b/cran-comments.md index ed38adf29..51dc8188e 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -4,16 +4,14 @@ editor_options: wrap: 79 --- -This is a release requested by the CRAN team to delete the population of the -user's cache while building vignettes. +This is a release requested by the CRAN team to comply with new error messages +in the R parser that caused unit tests to fail. ## Test environments -- ubuntu 20.04 (on GitHub Actions): R devel, R 4.3.0, R 4.2.1, 4.1.2, R 4.0.5, - R 3.6 -- Windows Server 10 (on GitHub Actions): R devel, R 4.3.0, R 4.2.1, R 4.1.2, - R 3.6. +- ubuntu-latest (on GitHub Actions): R devel, R 4.4.0, R 4.3.0, R 4.2.1, 4.1.2, R 4.0.5 +- Windows Server 10 (on GitHub Actions): R devel, R 4.4.0, R 4.3.0, R 4.2.1, R 4.1.2, R 4.0.5 - win-builder: R devel ## R CMD check results @@ -36,7 +34,7 @@ compliant with the requirements of CRAN. ## Downstream Dependencies -I also ran R CMD check on all 39 downstream dependencies of styler using the +I also ran R CMD check on all 47 downstream dependencies of styler using the revdepcheck package. All of them finished R CMD CHECK with the same number of ERRORS, WARNINGS and diff --git a/inst/WORDLIST b/inst/WORDLIST index 1e14ad162..a6c3937ce 100644 --- a/inst/WORDLIST +++ b/inst/WORDLIST @@ -1,170 +1,136 @@ -addin Addin -addins +addin Addins +addins api AppVeyor -apriori arg -AsIs AST aut -autothresholdr backport +backports bdr benchmarking -biocthis bootswatch BugReports +bXj cancelling -cff -chnages ci cli CMD codebase -codecov codegrip coercible coercions compat config -CONST counterpair coventions -covr cpp -cran cre -ctb cyclocomp cynkra -datastructures dec dependabot -deps desc -dev devtools dir -docsearch dont dontrun dontshow -dontshowdontrun donttest dplyr DSLs emacs -emph -env EOF EOL EOLs -epigraphdb -eq EQ -eval examplesIf -exampletestr expr -expr EQ +eZm fansi -fileext +Fi filetype +Fjmav +flaticon forcond formatter -funct +Freepik gadenbuie -gcc -getChecksum +Gayathri getOption -getRversion ggplot -ghclass +Github github gitsum gmail grkstyle GSOC -hashFiles helpfiles href -http https icloud ifelse -impl Indrajeet -infinitively +indrajeetspatilmorality initializer inode integrations -interaces internal's +Invasiveness invasiveness -iNZightTools io ixmypi -ized JamesIves +JBP Jupyterlab -Kirill kirill +Kirill knitr krlmlr labelled -languageserver -LazyData learnr -levelName LF -LIBS +Lifecycle lifecycle -Ligges linter linters lintr -linux lorenz lorenzwalthert -lst -macOS magrittr +mav md MERCHANTABILITY mlr -Müller +mlr's mutli -na +Müller navbar +nbv netlify -netReg nocomments NONINFRINGEMENT nonportable -nph -NUM -oldrel +nzchar +ocx oneliner ORCID -os ourself -packagemanager packrat pandoc params -paren parsable parsesum Patil patilindrajeet patilindrajeets -pgkdown +pdy +PGW pkgapi pkgconfig pkgdown -pkgs pos pre precommit @@ -173,15 +139,11 @@ prettycode priori PRs purrr +qez qmd -Qmd -questionr -rcmdcheck RcppExports -rds -readline -readme README +readme rebased reindent reindented @@ -191,121 +153,86 @@ renv repo reprex revdepcheck -RHUB rlang rlang's -rmarkdown RMarkdown -rmd +Rmarkdown +rmarkdown Rmd -rnw +rmd Rnw +rnw roadmap +Robinlovelace roclet roclets -rootPath -ROOTPATH ropensci -roundtrip roxgen -roxygen Roxygen -roxygenise +roxygen RoxygenNote rplumber rprofile -Rprofile rprojroot -Rscript -rspm -RSPM -rstudio RStudio RStudio's rstudioapi saamwerk -saveRDS -seealso +Sd semicoloner -sep -sessioninfo -setCacheRootPath -setdiff -setenv Shallowify sharding -shinydashboardPlus -shinymeta -shinyMonacoEditor -shinyobjects -ShinyQuickStarter spaceout -sprintf -stackoverflow StackOverflow -startsWith -staticimports -STR styler stylerignore stylerignored stylers -subexpr +Stylers sublicense -sudo summarises -Sys -sysreq -sysreqs -systemPipeShiny -tempfile testthat +tg +th tibble tibbles -tidyeval -tidypaleo tidyr -tidyverse Tidyverse -Tierney +tidyverse todo -tokenized travis -tryCatch -tryGugus ubuntu +Uf ui uncached unexplainable unicode +Unindent unindent unindention unlink -unlinkunindention unnest -unparsable -unstyled -upsetjs -usethis utf -Uwe vctrs vec +Vh VignetteBuilder Visit'em walthert Walthert -wch winbuilder withr -writeLines +WN www xaringan -xenial xfun Xie -xyzpackage +xk +XN YAML yaml yihui +yl +YPa +zm zzz diff --git a/inst/hextools/hexsticker.R b/inst/hextools/hexsticker.R new file mode 100644 index 000000000..b91b34b0f --- /dev/null +++ b/inst/hextools/hexsticker.R @@ -0,0 +1,48 @@ +library(hexSticker) +library(magick) +library(showtext) +library(sysfonts) + +# Loading Google fonts (http://www.google.com/fonts) +google_font_name <- "Gayathri" +font_add_google(google_font_name) + +# Automatically use showtext to render text for future devices +showtext_auto() + +project_root <- here::here() + +# https://www.flaticon.com/free-icon/suit_1355137 +image <- image_read(file.path(project_root, "inst", "hextools", "suit.png")) +manual_logo_path <- file.path(project_root, "man", "figures", "logo.png") +color_font <- "#b3c9e5" + +sticker( + # image + subplot = image, + s_x = 1.1, + s_y = 1, + s_width = 1, + s_height = 1.2, + # package name + package = "styler", + p_color = color_font, + p_family = google_font_name, + p_size = 58, + p_x = 0.35, + p_y = 0.95, + angle = 90, + # image + h_color = "black", + h_fill = "#a18595", + # package URL + url = " https://styler.r-lib.org/", + u_size = 10, + u_color = color_font, + # saving sticker + filename = manual_logo_path, + dpi = 600, +) + + +rmarkdown::render("README.Rmd") diff --git a/inst/hextools/suit.png b/inst/hextools/suit.png new file mode 100644 index 000000000..cd8247998 Binary files /dev/null and b/inst/hextools/suit.png differ diff --git a/man/cache_make_key.Rd b/man/cache_make_key.Rd index ec1cdb9d8..b7468fcb3 100644 --- a/man/cache_make_key.Rd +++ b/man/cache_make_key.Rd @@ -29,7 +29,7 @@ We need to compare: a new cache. \item transformers. Cannot easily hash them because two environments won't be identical even if they contain the same objects (see 'Experiments'). Simple -\code{as.character(transformers)} will not consider infinitively recursive +\code{as.character(transformers)} will not consider infinitely recursive code dependencies. To fix this, transformers must have names and version number as described in \code{\link[=create_style_guide]{create_style_guide()}}. Now, the only way to fool the cache invalidation diff --git a/man/calls_sys.Rd b/man/calls_sys.Rd deleted file mode 100644 index 14899a3dc..000000000 --- a/man/calls_sys.Rd +++ /dev/null @@ -1,18 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/utils.R -\name{calls_sys} -\alias{calls_sys} -\title{Invoke a system command} -\usage{ -calls_sys(sys_call, ...) -} -\arguments{ -\item{sys_call}{The call to be executed.} - -\item{...}{Arguments passed to \code{\link[=shell]{shell()}} or \code{\link[=system]{system()}}.} -} -\description{ -Wraps a system command into \code{\link[=shell]{shell()}} or \code{\link[=system]{system()}}, depending on the -operating system. -} -\keyword{internal} diff --git a/man/extend_if_comment.Rd b/man/extend_if_comment.Rd deleted file mode 100644 index eeaee1f99..000000000 --- a/man/extend_if_comment.Rd +++ /dev/null @@ -1,19 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/utils-navigate-nest.R -\name{extend_if_comment} -\alias{extend_if_comment} -\title{Find the index of the last comment in the sequence of comments-only tokens -after the token that has position \code{pos} in \code{pd}.} -\usage{ -extend_if_comment(pd, pos) -} -\arguments{ -\item{pd}{A parse table.} - -\item{pos}{The position of the token to start the search from.} -} -\description{ -Find the index of the last comment in the sequence of comments-only tokens -after the token that has position \code{pos} in \code{pd}. -} -\keyword{internal} diff --git a/man/figures/logo.png b/man/figures/logo.png new file mode 100644 index 000000000..6fc364c18 Binary files /dev/null and b/man/figures/logo.png differ diff --git a/man/generate_test_samples.Rd b/man/generate_test_samples.Rd deleted file mode 100644 index 40177fc80..000000000 --- a/man/generate_test_samples.Rd +++ /dev/null @@ -1,24 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/testing.R -\name{generate_test_samples} -\alias{generate_test_samples} -\title{Generate a comprehensive collection test cases for comment / insertion -interaction -Test consist of if / if-else / if-else-if-else cases, paired with various -line-break and comment configurations. Used for internal testing.} -\usage{ -generate_test_samples() -} -\value{ -The function is called for its side effects, i.e. to write the -test cases to *-in.R files that can be tested with \code{\link[=test_collection]{test_collection()}}. Note -that a few of the test cases are invalid and need to be removed / commented -out manually. -} -\description{ -Generate a comprehensive collection test cases for comment / insertion -interaction -Test consist of if / if-else / if-else-if-else cases, paired with various -line-break and comment configurations. Used for internal testing. -} -\keyword{internal} diff --git a/man/is_insufficiently_parsed_string.Rd b/man/is_insufficiently_parsed_string.Rd index 83cdfb67a..0344443c4 100644 --- a/man/is_insufficiently_parsed_string.Rd +++ b/man/is_insufficiently_parsed_string.Rd @@ -8,8 +8,6 @@ is_insufficiently_parsed_string(pd) } \arguments{ \item{pd}{A parse table.} - -\item{text}{The initial code to style.} } \description{ Identifies strings that were not fully parsed due to their vast length. diff --git a/man/is_double_indent_function_declaration.Rd b/man/is_single_indent_function_declaration.Rd similarity index 60% rename from man/is_double_indent_function_declaration.Rd rename to man/is_single_indent_function_declaration.Rd index d9a36a367..b186ec201 100644 --- a/man/is_double_indent_function_declaration.Rd +++ b/man/is_single_indent_function_declaration.Rd @@ -1,10 +1,10 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/rules-indention.R -\name{is_double_indent_function_declaration} -\alias{is_double_indent_function_declaration} -\title{Is the function declaration double indented?} +\name{is_single_indent_function_declaration} +\alias{is_single_indent_function_declaration} +\title{Is the function declaration single indented?} \usage{ -is_double_indent_function_declaration(pd, indent_by = 2L) +is_single_indent_function_declaration(pd, indent_by = 2L) } \arguments{ \item{pd}{A parse table.} @@ -14,7 +14,7 @@ operators such as '('.} } \description{ Assumes you already checked if it's a function with -\code{is_function_declaration}. It is double indented if the first token +\code{is_function_declaration}. It is single indented if the first token after the first line break that is a \code{"SYMBOL_FORMALS"}. } \keyword{internal} diff --git a/man/parser_version_set.Rd b/man/parser_version_set.Rd index d740077a1..a0aed6176 100644 --- a/man/parser_version_set.Rd +++ b/man/parser_version_set.Rd @@ -47,8 +47,9 @@ environment \code{env_current}. \item \code{parser_version_find()} determines the version of the parser from parse data. This does not necessarily mean that the version found is the actual version, but it \emph{behaves} like it. For example, code that does not -contain \code{EQ_ASSIGN} is parsed the same way with version 1 and 2. If the -behavior is identical, the version is set to 1. +contain \code{EQ_ASSIGN} is parsed the same way with version \code{1} and \code{2}. If the +behavior is identical, the version is set to \code{1}. Since the package now +requires R >= 4.0, the version is always set to \code{3}. } } diff --git a/man/prettify_any.Rd b/man/prettify_any.Rd index c4b7fc5a1..89d8a72b2 100644 --- a/man/prettify_any.Rd +++ b/man/prettify_any.Rd @@ -21,15 +21,16 @@ conveniently constructed via the \code{style} argument and \code{...}. See 'Examples'.} \item{filetype}{Vector of file extensions indicating which file types should -be styled. Case is ignored, and the \code{.} is optional, e.g. \code{c(".R", ".Rmd")}, or \code{c("r", "rmd")}. Supported values (after standardization) are: -"r", "rprofile", "rmd", "rmarkdown", "rnw", "qmd". Rmarkdown is treated as -Rmd.} +be styled. Case is ignored, and the \code{.} is optional, e.g. \code{c(".R",".Rmd")}, +or \code{c("r", "rmd")}. Supported values (after standardization) are: +"qmd", "r", "rmd", "rmarkdown", "rnw", and "rprofile". +Rmarkdown is treated as Rmd.} \item{recursive}{A logical value indicating whether or not files in subdirectories should be styled as well.} -\item{exclude_files}{Character vector with paths to files that should be -excluded from styling.} +\item{exclude_files}{Character vector with regular expressions to files +that should be excluded from styling.} \item{exclude_dirs}{Character vector with directories to exclude (recursively). Note that the default values were set for consistency with diff --git a/man/prettify_pkg.Rd b/man/prettify_pkg.Rd index 4e9a40cb8..d973e8a90 100644 --- a/man/prettify_pkg.Rd +++ b/man/prettify_pkg.Rd @@ -19,12 +19,13 @@ prettify_pkg( parse tables.} \item{filetype}{Vector of file extensions indicating which file types should -be styled. Case is ignored, and the \code{.} is optional, e.g. \code{c(".R", ".Rmd")}, or \code{c("r", "rmd")}. Supported values (after standardization) are: -"r", "rprofile", "rmd", "rmarkdown", "rnw", "qmd". Rmarkdown is treated as -Rmd.} +be styled. Case is ignored, and the \code{.} is optional, e.g. \code{c(".R",".Rmd")}, +or \code{c("r", "rmd")}. Supported values (after standardization) are: +"qmd", "r", "rmd", "rmarkdown", "rnw", and "rprofile". +Rmarkdown is treated as Rmd.} -\item{exclude_files}{Character vector with paths to files that should be -excluded from styling.} +\item{exclude_files}{Character vector with regular expressions to files +that should be excluded from styling.} \item{exclude_dirs}{Character vector with directories to exclude (recursively). Note that the default values were set for consistency with diff --git a/man/set_arg_write_tree.Rd b/man/set_arg_write_tree.Rd deleted file mode 100644 index 9bea02feb..000000000 --- a/man/set_arg_write_tree.Rd +++ /dev/null @@ -1,17 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/set-assert-args.R -\name{set_arg_write_tree} -\alias{set_arg_write_tree} -\title{Set the write_tree argument} -\usage{ -set_arg_write_tree(write_tree) -} -\arguments{ -\item{write_tree}{Whether or not to write tree.} -} -\description{ -Sets the argument \code{write_tree} in \code{\link[=test_collection]{test_collection()}} to be \code{TRUE} for R -versions higher or equal to 3.2, and \code{FALSE} otherwise since the second-level -dependency \code{DiagrammeR} from \code{data.tree} is not available for R < 3.2. -} -\keyword{internal} diff --git a/man/set_line_break_after_opening_if_call_is_multi_line.Rd b/man/set_line_break_after_opening_if_call_is_multi_line.Rd index 417c04a1a..174bee142 100644 --- a/man/set_line_break_after_opening_if_call_is_multi_line.Rd +++ b/man/set_line_break_after_opening_if_call_is_multi_line.Rd @@ -11,6 +11,17 @@ set_line_break_after_opening_if_call_is_multi_line( force_text_before = NULL ) } +\arguments{ +\item{pd}{The parse table.} + +\item{except_token_after}{The tokens after the token that cause an exception.} + +\item{except_text_before}{A character vector with text before a token that +does not cause a line break.} + +\item{force_text_before}{A character vector with text before "'('" that +forces a line break after every argument in the call.} +} \description{ Sets line break after opening parenthesis } diff --git a/man/set_line_break_around_curly_curly.Rd b/man/set_line_break_around_curly_curly.Rd index 06fd2fa9e..1215ff6d4 100644 --- a/man/set_line_break_around_curly_curly.Rd +++ b/man/set_line_break_around_curly_curly.Rd @@ -2,12 +2,12 @@ % Please edit documentation in R/rules-line-breaks.R, R/rules-spaces.R \name{set_line_break_around_curly_curly} \alias{set_line_break_around_curly_curly} -\alias{set_space_in_curly_curly} +\alias{set_space_in_curly} \title{Styling around \verb{\\\{\\\{}} \usage{ set_line_break_around_curly_curly(pd) -set_space_in_curly_curly(pd) +set_space_in_curly(pd) } \arguments{ \item{pd}{A parse table.} diff --git a/man/set_line_break_if_call_is_multi_line.Rd b/man/set_line_break_if_call_is_multi_line.Rd index a8482a378..b7ad972eb 100644 --- a/man/set_line_break_if_call_is_multi_line.Rd +++ b/man/set_line_break_if_call_is_multi_line.Rd @@ -13,17 +13,8 @@ remove_line_break_in_fun_call(pd, strict) \arguments{ \item{pd}{A parse table.} -\item{except_token_before}{A character vector with text before "')'" that do -not cause a line break before "')'".} - -\item{except_token_after}{A character vector with tokens after "'('" that do -not cause a line break after "'('".} - -\item{except_text_before}{A character vector with text before "'('" that do -not cause a line break after "'('".} - -\item{force_text_before}{A character vector with text before "'('" that -forces a line break after every argument in the call.} +\item{except_token_before}{A character vector with tokens that do +not cause a line break after them.} } \description{ Set line break for multi-line function calls @@ -33,5 +24,8 @@ Set line break for multi-line function calls \item \code{set_line_break_before_closing_call()}: Sets line break before closing parenthesis. +\item \code{remove_line_break_in_fun_call()}: Remove line breaks in +function calls. + }} \keyword{internal} diff --git a/man/set_space_around_op.Rd b/man/set_space_around_operator.Rd similarity index 65% rename from man/set_space_around_op.Rd rename to man/set_space_around_operator.Rd index c3a4502e3..f30a8d850 100644 --- a/man/set_space_around_op.Rd +++ b/man/set_space_around_operator.Rd @@ -1,10 +1,10 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/rules-spaces.R -\name{set_space_around_op} -\alias{set_space_around_op} +\name{set_space_around_operator} +\alias{set_space_around_operator} \title{Set spaces around operators} \usage{ -set_space_around_op(pd_flat, strict) +set_space_around_operator(pd_flat, strict) } \description{ Alignment is kept, if detected. diff --git a/man/style_dir.Rd b/man/style_dir.Rd index 9f8294354..62c80e264 100644 --- a/man/style_dir.Rd +++ b/man/style_dir.Rd @@ -34,15 +34,16 @@ conveniently constructed via the \code{style} argument and \code{...}. See 'Examples'.} \item{filetype}{Vector of file extensions indicating which file types should -be styled. Case is ignored, and the \code{.} is optional, e.g. \code{c(".R", ".Rmd")}, or \code{c("r", "rmd")}. Supported values (after standardization) are: -"r", "rprofile", "rmd", "rmarkdown", "rnw", "qmd". Rmarkdown is treated as -Rmd.} +be styled. Case is ignored, and the \code{.} is optional, e.g. \code{c(".R",".Rmd")}, +or \code{c("r", "rmd")}. Supported values (after standardization) are: +"qmd", "r", "rmd", "rmarkdown", "rnw", and "rprofile". +Rmarkdown is treated as Rmd.} \item{recursive}{A logical value indicating whether or not files in sub directories of \code{path} should be styled as well.} -\item{exclude_files}{Character vector with paths to files that should be -excluded from styling.} +\item{exclude_files}{Character vector with regular expressions to files +that should be excluded from styling.} \item{exclude_dirs}{Character vector with directories to exclude (recursively).} diff --git a/man/style_pkg.Rd b/man/style_pkg.Rd index 303dc7693..637cbc9a7 100644 --- a/man/style_pkg.Rd +++ b/man/style_pkg.Rd @@ -9,8 +9,9 @@ style_pkg( ..., style = tidyverse_style, transformers = style(...), - filetype = c("R", "Rprofile", "Rmd", "Rmarkdown", "Rnw", "Qmd"), - exclude_files = c("R/RcppExports.R", "R/cpp11.R"), + filetype = c("R", "Rprofile", "Rmd", "Rmarkdown", "Rnw", "qmd"), + exclude_files = c("R/RcppExports\\\\.R", "R/cpp11\\\\.R", + "R/import-standalone.*\\\\.R"), exclude_dirs = c("packrat", "renv"), include_roxygen_examples = TRUE, base_indention = 0L, @@ -33,12 +34,13 @@ conveniently constructed via the \code{style} argument and \code{...}. See 'Examples'.} \item{filetype}{Vector of file extensions indicating which file types should -be styled. Case is ignored, and the \code{.} is optional, e.g. \code{c(".R", ".Rmd")}, or \code{c("r", "rmd")}. Supported values (after standardization) are: -"r", "rprofile", "rmd", "rmarkdown", "rnw", "qmd". Rmarkdown is treated as -Rmd.} +be styled. Case is ignored, and the \code{.} is optional, e.g. \code{c(".R",".Rmd")}, +or \code{c("r", "rmd")}. Supported values (after standardization) are: +"qmd", "r", "rmd", "rmarkdown", "rnw", and "rprofile". +Rmarkdown is treated as Rmd.} -\item{exclude_files}{Character vector with paths to files that should be -excluded from styling.} +\item{exclude_files}{Character vector with regular expressions to files +that should be excluded from styling.} \item{exclude_dirs}{Character vector with directories to exclude (recursively). Note that the default values were set for consistency with diff --git a/man/styler-package.Rd b/man/styler-package.Rd index 0995015ad..8774cdba7 100644 --- a/man/styler-package.Rd +++ b/man/styler-package.Rd @@ -4,10 +4,10 @@ \name{styler-package} \alias{styler} \alias{styler-package} -\title{Non-invasive pretty printing of R code} +\title{styler: Non-Invasive Pretty Printing of R Code} \description{ -styler allows you to format \code{.R}, \code{.Rmd}, \code{.Rmarkdown} and/or -\code{.qmd}, \code{.Rnw} files, R packages, or entire R source trees +styler allows you to format \code{.qmd}, \code{.R}, \code{.Rmd}, \code{.Rmarkdown}, +\code{.Rnw}, and/or \code{.Rprofile} files, R packages, or entire R source trees according to a style guide. The following functions can be used for styling: \itemize{ @@ -15,7 +15,7 @@ The following functions can be used for styling: \item \code{\link[=style_file]{style_file()}} to style a single file. \item \code{\link[=style_dir]{style_dir()}} to style all files in a directory. \item \code{\link[=style_pkg]{style_pkg()}} to style the source files of an R package. -\item \link{styler_addins} (RStudio Addins) to style either selected code or the +\item \link[=styler_addins]{RStudio Addins} to style either selected code or the active file. } } @@ -41,11 +41,7 @@ Useful links: Authors: \itemize{ \item Kirill Müller \email{kirill@cynkra.com} (\href{https://orcid.org/0000-0002-1416-3412}{ORCID}) -} - -Other contributors: -\itemize{ - \item Indrajeet Patil \email{patilindrajeet.science@gmail.com} (\href{https://orcid.org/0000-0003-1995-6531}{ORCID}) (@patilindrajeets) [contributor] + \item Indrajeet Patil \email{patilindrajeet.science@gmail.com} (\href{https://orcid.org/0000-0003-1995-6531}{ORCID}) (@patilindrajeets) } } diff --git a/man/styler_options.Rd b/man/styler_options.Rd new file mode 100644 index 000000000..add90dd39 --- /dev/null +++ b/man/styler_options.Rd @@ -0,0 +1,53 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/options.R +\name{styler_options} +\alias{styler_options} +\title{Package options} +\description{ +These options can be set via \code{\link[=options]{options()}} and queried via \code{\link[=getOption]{getOption()}}. +For this, add a \code{styler.} prefix (the package name and a dot) to the option name. +Example: for an option \code{foo}, use \code{options(styler.foo = value)} to set it +and \code{getOption("styler.foo")} to retrieve the current value. +An option value of \code{NULL} means that the default is used. +} +\section{Options for the styler package}{ + +\itemize{ +\item \code{styler.addins_style_transformer}: character. +The name of the style transformer to use in the addins. +(default: \code{"styler::tidyverse_style()"}) +\item \code{styler.cache_name}: character. +The name of the styler cache to use. +(default: 1.10.3.9000) +\item \code{styler.cache_root}: character. +The directory where the cache files are stored. For more, see \code{help("caching")}. +(default: \code{NULL}) +\item \code{styler.colored_print.vertical}: logical. +It decides whether or not the output should be colored with \code{prettycode::highlight()}. +(default: \code{TRUE}) +\item \code{styler.ignore_alignment}: logical. +If \code{TRUE}, alignment, when detected, is ignored. For more, see \code{vignette("detect-alignment")}. +(default: \code{FALSE}) +\item \code{styler.ignore_start}, \code{styler.ignore_stop}: character. +Regular expressions to ignore lines that match them. For more, see \code{help("stylerignore")}. +(default: \code{"styler: off"} and \code{"styler: on"}, respectively) +\item \code{styler.quiet}: logical. +It decides whether or not to print an informative message about what the function is doing. +If \code{TRUE}, no output is printed. +(default: \code{FALSE}) +\item \code{styler.test_dir_writable}: logical. +If \code{TRUE}, the package tests whether the directory is writable. +(default: \code{TRUE}) +} +} + +\examples{ +\dontshow{if (FALSE) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +getOption("styler.ignore_alignment") +options( + styler.ignore_alignment = TRUE, + styler.quiet = TRUE +) +getOption("styler.ignore_alignment") +\dontshow{\}) # examplesIf} +} diff --git a/man/test_collection.Rd b/man/test_collection.Rd index 25b545a20..0b102c4c9 100644 --- a/man/test_collection.Rd +++ b/man/test_collection.Rd @@ -8,7 +8,7 @@ test_collection( test, sub_test = NULL, dry = "off", - write_tree = NA, + write_tree = FALSE, transformer, ... ) @@ -28,9 +28,7 @@ of styling. "off", the default, writes back if the input and output of styling are not identical.} \item{write_tree}{Whether or not the tree structure of the test should be -computed and written to a file. Note that this needs R >= 3.2 -(see \code{\link[=set_arg_write_tree]{set_arg_write_tree()}}). If the argument is set to \code{NA}, the function -determines whether R >= 3.2 is in use and if so, trees will be written.} +computed and written to a files.} \item{transformer}{A function to apply to the content of \code{in_item}.} diff --git a/man/transform_and_check.Rd b/man/transform_and_check.Rd index 4c37376ac..8cdd477f0 100644 --- a/man/transform_and_check.Rd +++ b/man/transform_and_check.Rd @@ -11,7 +11,7 @@ transform_and_check( out_name = out_item, transformer, dry, - write_tree = NA, + write_tree = FALSE, out_tree = "_tree", ... ) @@ -34,9 +34,7 @@ of styling. "off", the default, writes back if the input and output of styling are not identical.} \item{write_tree}{Whether or not the tree structure of the test should be -computed and written to a file. Note that this needs R >= 3.2 -(see \code{\link[=set_arg_write_tree]{set_arg_write_tree()}}). If the argument is set to \code{NA}, the function -determines whether R >= 3.2 is in use and if so, trees will be written.} +computed and written to a files.} \item{out_tree}{Name of tree file if written out.} diff --git a/man/unindent_fun_dec.Rd b/man/unindent_function_declaration.Rd similarity index 68% rename from man/unindent_fun_dec.Rd rename to man/unindent_function_declaration.Rd index f0209be93..49f6fc5c1 100644 --- a/man/unindent_fun_dec.Rd +++ b/man/unindent_function_declaration.Rd @@ -1,10 +1,10 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/rules-indention.R -\name{unindent_fun_dec} -\alias{unindent_fun_dec} +\name{unindent_function_declaration} +\alias{unindent_function_declaration} \title{Revert the indention of function declaration header} \usage{ -unindent_fun_dec(pd, indent_by = 2L) +unindent_function_declaration(pd, indent_by = 2L) } \arguments{ \item{pd}{A parse table.} @@ -16,6 +16,6 @@ operators such as '('.} Necessary for consistent indention of the function declaration header. } \seealso{ -set_unindention_child update_indention_ref_fun_dec +set_unindention_child update_indention_reference_function_declaration } \keyword{internal} diff --git a/man/update_indention_ref.Rd b/man/update_indention_ref.Rd index a041faead..0e305ee9c 100644 --- a/man/update_indention_ref.Rd +++ b/man/update_indention_ref.Rd @@ -2,10 +2,10 @@ % Please edit documentation in R/rules-indention.R \name{update_indention_ref} \alias{update_indention_ref} -\alias{update_indention_ref_fun_dec} +\alias{update_indention_reference_function_declaration} \title{Update the indention reference} \usage{ -update_indention_ref_fun_dec(pd_nested) +update_indention_reference_function_declaration(pd_nested) } \arguments{ \item{pd_nested}{A nested parse table.} @@ -15,7 +15,7 @@ Update the indention reference } \section{Functions}{ \itemize{ -\item \code{update_indention_ref_fun_dec()}: Updates the reference pos_id for all +\item \code{update_indention_reference_function_declaration()}: Updates the reference pos_id for all tokens in \code{pd_nested} if \code{pd_nested} contains a function declaration. Tokens inside a function declaration are are re-indented, that is, they are indented up to the level at which the token FUNCTION diff --git a/man/wrap_if_else_while_for_fun_multi_line_in_curly.Rd b/man/wrap_if_else_while_for_function_multi_line_in_curly.Rd similarity index 68% rename from man/wrap_if_else_while_for_fun_multi_line_in_curly.Rd rename to man/wrap_if_else_while_for_function_multi_line_in_curly.Rd index 29b7c06e9..5b95b29d4 100644 --- a/man/wrap_if_else_while_for_fun_multi_line_in_curly.Rd +++ b/man/wrap_if_else_while_for_function_multi_line_in_curly.Rd @@ -1,10 +1,10 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/rules-tokens.R -\name{wrap_if_else_while_for_fun_multi_line_in_curly} -\alias{wrap_if_else_while_for_fun_multi_line_in_curly} +\name{wrap_if_else_while_for_function_multi_line_in_curly} +\alias{wrap_if_else_while_for_function_multi_line_in_curly} \title{Wrap if-else, while and for statements in curly braces} \usage{ -wrap_if_else_while_for_fun_multi_line_in_curly(pd, indent_by = 2L) +wrap_if_else_while_for_function_multi_line_in_curly(pd, indent_by = 2L) } \arguments{ \item{pd}{A parse table.} diff --git a/pkgdown/favicon/apple-touch-icon-120x120.png b/pkgdown/favicon/apple-touch-icon-120x120.png new file mode 100644 index 000000000..5782ba091 Binary files /dev/null and b/pkgdown/favicon/apple-touch-icon-120x120.png differ diff --git a/pkgdown/favicon/apple-touch-icon-152x152.png b/pkgdown/favicon/apple-touch-icon-152x152.png new file mode 100644 index 000000000..a6c8b9bf1 Binary files /dev/null and b/pkgdown/favicon/apple-touch-icon-152x152.png differ diff --git a/pkgdown/favicon/apple-touch-icon-180x180.png b/pkgdown/favicon/apple-touch-icon-180x180.png new file mode 100644 index 000000000..2eab20465 Binary files /dev/null and b/pkgdown/favicon/apple-touch-icon-180x180.png differ diff --git a/pkgdown/favicon/apple-touch-icon-60x60.png b/pkgdown/favicon/apple-touch-icon-60x60.png new file mode 100644 index 000000000..c8d3dcae2 Binary files /dev/null and b/pkgdown/favicon/apple-touch-icon-60x60.png differ diff --git a/pkgdown/favicon/apple-touch-icon-76x76.png b/pkgdown/favicon/apple-touch-icon-76x76.png new file mode 100644 index 000000000..74a370a6b Binary files /dev/null and b/pkgdown/favicon/apple-touch-icon-76x76.png differ diff --git a/pkgdown/favicon/apple-touch-icon.png b/pkgdown/favicon/apple-touch-icon.png new file mode 100644 index 000000000..f58f4c9dc Binary files /dev/null and b/pkgdown/favicon/apple-touch-icon.png differ diff --git a/pkgdown/favicon/favicon-16x16.png b/pkgdown/favicon/favicon-16x16.png new file mode 100644 index 000000000..76ed5d813 Binary files /dev/null and b/pkgdown/favicon/favicon-16x16.png differ diff --git a/pkgdown/favicon/favicon-32x32.png b/pkgdown/favicon/favicon-32x32.png new file mode 100644 index 000000000..129ac242c Binary files /dev/null and b/pkgdown/favicon/favicon-32x32.png differ diff --git a/pkgdown/favicon/favicon.ico b/pkgdown/favicon/favicon.ico new file mode 100644 index 000000000..702c207bc Binary files /dev/null and b/pkgdown/favicon/favicon.ico differ diff --git a/tests/dev/generate_roxygen_tests.R b/tests/dev/generate_roxygen_tests.R new file mode 100755 index 000000000..27a47e123 --- /dev/null +++ b/tests/dev/generate_roxygen_tests.R @@ -0,0 +1,28 @@ +#!/usr/bin/Rscript +# execute from: ./tests/dev/generate_roxygen_tests.R +roxygen_stub <- "roxygen-examples-complete" +all_examples <- list.files(file.path("tests", "testthat", roxygen_stub)) +unique_tests <- unique(sub("-.*", "", all_examples)) + +# tests using 'scope = "spaces"' in test_collection() +tests_scope_spaces <- "15" + +condition_map <- list(`23` = c("error", '"issues/1242"')) + +for (test in unique_tests) { + out_file <- file.path("tests", "testthat", paste0("test-", roxygen_stub, "-", test, ".R")) + extras <- if (test %in% tests_scope_spaces) ', scope = "spaces"' else "" + condition <- condition_map[[test]] + if (is.null(condition)) condition <- c("warning", "NA") + writeLines(con = out_file, c( + "# NB: DO NOT EDIT. Auto-generated by ./tests/dev/generate_roxygen_tests.R.", + "", + sprintf('test_that("analogous to test-%s: %s", {', roxygen_stub, test), + sprintf( + ' expect_%s(test_collection("%s", "^%s-", transformer = style_text%s), %s)', + condition[1L], roxygen_stub, test, extras, condition[2L] + ), + "})", + NULL + )) +} diff --git a/tests/testthat/_snaps/public_api.md b/tests/testthat/_snaps/public_api.md deleted file mode 100644 index b55a037eb..000000000 --- a/tests/testthat/_snaps/public_api.md +++ /dev/null @@ -1,54 +0,0 @@ -# messages (via cat()) of style_file are correct - - Code - cat(catch_style_file_output(file.path("public-api", "xyzdir-dirty", - "dirty-sample-with-scope-tokens.R")), sep = "\n") - Output - Styling 1 files: - dirty-sample-with-scope-tokens.R i - ---------------------------------------- - Status Count Legend - v 0 File unchanged. - i 1 File changed. - x 0 Styling threw an error. - ---------------------------------------- - Please review the changes carefully! - ---- - - Code - cat(catch_style_file_output(file.path("public-api", "xyzdir-dirty", - "clean-sample-with-scope-tokens.R")), sep = "\n") - Output - Styling 1 files: - clean-sample-with-scope-tokens.R v - ---------------------------------------- - Status Count Legend - v 1 File unchanged. - i 0 File changed. - x 0 Styling threw an error. - ---------------------------------------- - ---- - - Code - cat(catch_style_file_output(file.path("public-api", "xyzdir-dirty", - "dirty-sample-with-scope-spaces.R")), sep = "\n") - Output - Styling 1 files: - dirty-sample-with-scope-spaces.R i - ---------------------------------------- - Status Count Legend - v 0 File unchanged. - i 1 File changed. - x 0 Styling threw an error. - ---------------------------------------- - Please review the changes carefully! - -# No sensitive to decimal option - - Code - style_text("1") - Output - 1 - diff --git a/tests/testthat/alignment/cols-with-one-row-in_tree b/tests/testthat/alignment/cols-with-one-row-in_tree deleted file mode 100644 index f821af25e..000000000 --- a/tests/testthat/alignment/cols-with-one-row-in_tree +++ /dev/null @@ -1,73 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: c( - [0/0] {1} - ¦ ¦--expr: c [0/0] {3} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {2} - ¦ ¦--'(': ( [0/2] {4} - ¦ ¦--expr: "x" [1/0] {6} - ¦ ¦ °--STR_CONST: "x" [0/0] {5} - ¦ ¦--',': , [0/7] {7} - ¦ ¦--expr: "z" [0/0] {9} - ¦ ¦ °--STR_CONST: "z" [0/0] {8} - ¦ ¦--',': , [0/2] {10} - ¦ ¦--expr: "cgjh [1/0] {12} - ¦ ¦ °--STR_CONST: "cgjh [0/0] {11} - ¦ ¦--',': , [0/1] {13} - ¦ ¦--expr: "thi" [0/0] {15} - ¦ ¦ °--STR_CONST: "thi" [0/0] {14} - ¦ ¦--',': , [0/1] {16} - ¦ ¦--expr: "z" [0/0] {18} - ¦ ¦ °--STR_CONST: "z" [0/0] {17} - ¦ °--')': ) [1/0] {19} - ¦--expr: c( - [3/0] {20} - ¦ ¦--expr: c [0/0] {22} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {21} - ¦ ¦--'(': ( [0/2] {23} - ¦ ¦--expr: "x" [1/0] {25} - ¦ ¦ °--STR_CONST: "x" [0/0] {24} - ¦ ¦--',': , [0/7] {26} - ¦ ¦--expr: "z" [0/0] {28} - ¦ ¦ °--STR_CONST: "z" [0/0] {27} - ¦ ¦--',': , [0/2] {29} - ¦ ¦--expr: "cgjh [1/0] {31} - ¦ ¦ °--STR_CONST: "cgjh [0/0] {30} - ¦ ¦--',': , [0/2] {32} - ¦ ¦--expr: "thi" [0/0] {34} - ¦ ¦ °--STR_CONST: "thi" [0/0] {33} - ¦ ¦--',': , [0/1] {35} - ¦ ¦--expr: "z" [0/0] {37} - ¦ ¦ °--STR_CONST: "z" [0/0] {36} - ¦ °--')': ) [1/0] {38} - °--expr: c( - [3/0] {39} - ¦--expr: c [0/0] {41} - ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {40} - ¦--'(': ( [0/2] {42} - ¦--expr: "x" [1/0] {44} - ¦ °--STR_CONST: "x" [0/0] {43} - ¦--',': , [0/1] {45} - ¦--expr: "y" [0/0] {47} - ¦ °--STR_CONST: "y" [0/0] {46} - ¦--',': , [0/1] {48} - ¦--expr: "z" [0/0] {50} - ¦ °--STR_CONST: "z" [0/0] {49} - ¦--',': , [0/2] {51} - ¦--expr: "m" [0/0] {53} - ¦ °--STR_CONST: "m" [0/0] {52} - ¦--',': , [0/1] {54} - ¦--expr: "n" [0/0] {56} - ¦ °--STR_CONST: "n" [0/0] {55} - ¦--',': , [0/2] {57} - ¦--expr: "o" [0/0] {59} - ¦ °--STR_CONST: "o" [0/0] {58} - ¦--',': , [0/1] {60} - ¦--expr: "p" [0/0] {62} - ¦ °--STR_CONST: "p" [0/0] {61} - ¦--',': , [0/2] {63} - ¦--expr: "c" [1/0] {65} - ¦ °--STR_CONST: "c" [0/0] {64} - ¦--',': , [0/1] {66} - ¦--expr: "d" [0/0] {68} - ¦ °--STR_CONST: "d" [0/0] {67} - °--')': ) [1/0] {69} diff --git a/tests/testthat/alignment/fun-decs-in_tree b/tests/testthat/alignment/fun-decs-in_tree deleted file mode 100644 index 4ff6219f9..000000000 --- a/tests/testthat/alignment/fun-decs-in_tree +++ /dev/null @@ -1,224 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: # ali [0/0] {1} - ¦--expr: funct [1/0] {2} - ¦ ¦--FUNCTION: funct [0/0] {3} - ¦ ¦--'(': ( [0/0] {4} - ¦ ¦--SYMBOL_FORMALS: x [0/3] {5} - ¦ ¦--EQ_FORMALS: = [0/1] {6} - ¦ ¦--expr: NULL [0/0] {8} - ¦ ¦ °--NULL_CONST: NULL [0/0] {7} - ¦ ¦--',': , [0/9] {9} - ¦ ¦--SYMBOL_FORMALS: tt [1/2] {10} - ¦ ¦--EQ_FORMALS: = [0/1] {11} - ¦ ¦--expr: NULL [0/0] {13} - ¦ ¦ °--NULL_CONST: NULL [0/0] {12} - ¦ ¦--',': , [0/9] {14} - ¦ ¦--SYMBOL_FORMALS: ayz [1/1] {15} - ¦ ¦--EQ_FORMALS: = [0/1] {16} - ¦ ¦--expr: NULL [0/0] {18} - ¦ ¦ °--NULL_CONST: NULL [0/0] {17} - ¦ ¦--')': ) [0/1] {19} - ¦ °--expr: {} [0/0] {20} - ¦ ¦--'{': { [0/0] {21} - ¦ °--'}': } [0/0] {22} - ¦--COMMENT: # ali [3/0] {23} - ¦--expr: k <- [1/0] {24} - ¦ ¦--expr: k [0/1] {26} - ¦ ¦ °--SYMBOL: k [0/0] {25} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {27} - ¦ °--expr: funct [0/0] {28} - ¦ ¦--FUNCTION: funct [0/0] {29} - ¦ ¦--'(': ( [0/0] {30} - ¦ ¦--SYMBOL_FORMALS: x [0/3] {31} - ¦ ¦--EQ_FORMALS: = [0/1] {32} - ¦ ¦--expr: NULL [0/0] {34} - ¦ ¦ °--NULL_CONST: NULL [0/0] {33} - ¦ ¦--',': , [0/14] {35} - ¦ ¦--SYMBOL_FORMALS: aq [1/2] {36} - ¦ ¦--EQ_FORMALS: = [0/1] {37} - ¦ ¦--expr: NULL [0/0] {39} - ¦ ¦ °--NULL_CONST: NULL [0/0] {38} - ¦ ¦--',': , [0/14] {40} - ¦ ¦--SYMBOL_FORMALS: ayz [1/1] {41} - ¦ ¦--EQ_FORMALS: = [0/1] {42} - ¦ ¦--expr: NULL [0/0] {44} - ¦ ¦ °--NULL_CONST: NULL [0/0] {43} - ¦ ¦--')': ) [0/1] {45} - ¦ °--expr: {} [0/0] {46} - ¦ ¦--'{': { [0/0] {47} - ¦ °--'}': } [0/0] {48} - ¦--COMMENT: # ali [3/0] {49} - ¦--expr: funct [1/0] {50} - ¦ ¦--FUNCTION: funct [0/0] {51} - ¦ ¦--'(': ( [0/0] {52} - ¦ ¦--SYMBOL_FORMALS: x [0/3] {53} - ¦ ¦--EQ_FORMALS: = [0/2] {54} - ¦ ¦--expr: 2 [0/0] {56} - ¦ ¦ °--NUM_CONST: 2 [0/0] {55} - ¦ ¦--',': , [0/9] {57} - ¦ ¦--SYMBOL_FORMALS: tt [1/2] {58} - ¦ ¦--EQ_FORMALS: = [0/2] {59} - ¦ ¦--expr: 1 [0/0] {61} - ¦ ¦ °--NUM_CONST: 1 [0/0] {60} - ¦ ¦--',': , [0/9] {62} - ¦ ¦--SYMBOL_FORMALS: ayz [1/1] {63} - ¦ ¦--EQ_FORMALS: = [0/1] {64} - ¦ ¦--expr: 99 [0/0] {66} - ¦ ¦ °--NUM_CONST: 99 [0/0] {65} - ¦ ¦--')': ) [0/1] {67} - ¦ °--expr: {} [0/0] {68} - ¦ ¦--'{': { [0/0] {69} - ¦ °--'}': } [0/0] {70} - ¦--COMMENT: # ali [2/0] {71} - ¦--expr: funct [1/0] {72} - ¦ ¦--FUNCTION: funct [0/0] {73} - ¦ ¦--'(': ( [0/0] {74} - ¦ ¦--SYMBOL_FORMALS: x [0/1] {75} - ¦ ¦--EQ_FORMALS: = [0/4] {76} - ¦ ¦--expr: 2 [0/0] {78} - ¦ ¦ °--NUM_CONST: 2 [0/0] {77} - ¦ ¦--',': , [0/9] {79} - ¦ ¦--SYMBOL_FORMALS: tt [1/1] {80} - ¦ ¦--EQ_FORMALS: = [0/3] {81} - ¦ ¦--expr: 1 [0/0] {83} - ¦ ¦ °--NUM_CONST: 1 [0/0] {82} - ¦ ¦--',': , [0/9] {84} - ¦ ¦--SYMBOL_FORMALS: ayz [1/1] {85} - ¦ ¦--EQ_FORMALS: = [0/1] {86} - ¦ ¦--expr: 99 [0/0] {88} - ¦ ¦ °--NUM_CONST: 99 [0/0] {87} - ¦ ¦--')': ) [0/1] {89} - ¦ °--expr: {} [0/0] {90} - ¦ ¦--'{': { [0/0] {91} - ¦ °--'}': } [0/0] {92} - ¦--COMMENT: # not [3/0] {93} - ¦--expr: k <- [1/0] {94} - ¦ ¦--expr: k [0/1] {96} - ¦ ¦ °--SYMBOL: k [0/0] {95} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {97} - ¦ °--expr: funct [0/0] {98} - ¦ ¦--FUNCTION: funct [0/0] {99} - ¦ ¦--'(': ( [0/0] {100} - ¦ ¦--SYMBOL_FORMALS: x [0/1] {101} - ¦ ¦--EQ_FORMALS: = [0/3] {102} - ¦ ¦--expr: fish [0/0] {104} - ¦ ¦ °--SYMBOL: fish [0/0] {103} - ¦ ¦--',': , [0/14] {105} - ¦ ¦--SYMBOL_FORMALS: aq [1/1] {106} - ¦ ¦--EQ_FORMALS: = [0/5] {107} - ¦ ¦--expr: 21 [0/0] {109} - ¦ ¦ °--NUM_CONST: 21 [0/0] {108} - ¦ ¦--',': , [0/14] {110} - ¦ ¦--SYMBOL_FORMALS: ayz [1/1] {111} - ¦ ¦--EQ_FORMALS: = [0/1] {112} - ¦ ¦--expr: t(322 [0/0] {113} - ¦ ¦ ¦--expr: t [0/0] {115} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: t [0/0] {114} - ¦ ¦ ¦--'(': ( [0/0] {116} - ¦ ¦ ¦--expr: 322 [0/0] {118} - ¦ ¦ ¦ °--NUM_CONST: 322 [0/0] {117} - ¦ ¦ °--')': ) [0/0] {119} - ¦ ¦--')': ) [0/1] {120} - ¦ °--expr: {} [0/0] {121} - ¦ ¦--'{': { [0/0] {122} - ¦ °--'}': } [0/0] {123} - ¦--COMMENT: # ali [2/0] {124} - ¦--expr: k <- [1/0] {125} - ¦ ¦--expr: k [0/1] {127} - ¦ ¦ °--SYMBOL: k [0/0] {126} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {128} - ¦ °--expr: funct [0/0] {129} - ¦ ¦--FUNCTION: funct [0/0] {130} - ¦ ¦--'(': ( [0/0] {131} - ¦ ¦--SYMBOL_FORMALS: x [0/1] {132} - ¦ ¦--EQ_FORMALS: = [0/1] {133} - ¦ ¦--expr: flus( [0/0] {134} - ¦ ¦ ¦--expr: flus [0/0] {136} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: flus [0/0] {135} - ¦ ¦ ¦--'(': ( [0/0] {137} - ¦ ¦ ¦--expr: we [0/0] {139} - ¦ ¦ ¦ °--SYMBOL: we [0/0] {138} - ¦ ¦ °--')': ) [0/0] {140} - ¦ ¦--',': , [0/14] {141} - ¦ ¦--SYMBOL_FORMALS: aq [1/1] {142} - ¦ ¦--EQ_FORMALS: = [0/2] {143} - ¦ ¦--expr: x - 2 [0/0] {144} - ¦ ¦ ¦--expr: x [0/1] {146} - ¦ ¦ ¦ °--SYMBOL: x [0/0] {145} - ¦ ¦ ¦--'-': - [0/1] {147} - ¦ ¦ °--expr: 22 [0/0] {149} - ¦ ¦ °--NUM_CONST: 22 [0/0] {148} - ¦ ¦--',': , [0/1] {150} - ¦ ¦--SYMBOL_FORMALS: k [0/1] {151} - ¦ ¦--EQ_FORMALS: = [0/1] {152} - ¦ ¦--expr: 22 [0/0] {154} - ¦ ¦ °--NUM_CONST: 22 [0/0] {153} - ¦ ¦--',': , [0/14] {155} - ¦ ¦--SYMBOL_FORMALS: ayz [1/1] {156} - ¦ ¦--EQ_FORMALS: = [0/1] {157} - ¦ ¦--expr: m(jk5 [0/0] {158} - ¦ ¦ ¦--expr: m [0/0] {160} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: m [0/0] {159} - ¦ ¦ ¦--'(': ( [0/0] {161} - ¦ ¦ ¦--expr: jk5 [0/0] {163} - ¦ ¦ ¦ °--SYMBOL: jk5 [0/0] {162} - ¦ ¦ °--')': ) [0/0] {164} - ¦ ¦--',': , [0/1] {165} - ¦ ¦--SYMBOL_FORMALS: xfea [0/1] {166} - ¦ ¦--EQ_FORMALS: = [0/2] {167} - ¦ ¦--expr: 3 [0/0] {169} - ¦ ¦ °--NUM_CONST: 3 [0/0] {168} - ¦ ¦--')': ) [0/1] {170} - ¦ °--expr: {} [0/0] {171} - ¦ ¦--'{': { [0/0] {172} - ¦ °--'}': } [0/0] {173} - ¦--COMMENT: # ali [3/0] {174} - °--expr: k <- [1/0] {175} - ¦--expr: k [0/1] {177} - ¦ °--SYMBOL: k [0/0] {176} - ¦--LEFT_ASSIGN: <- [0/1] {178} - °--expr: funct [0/0] {179} - ¦--FUNCTION: funct [0/0] {180} - ¦--'(': ( [0/0] {181} - ¦--SYMBOL_FORMALS: x [0/1] {182} - ¦--EQ_FORMALS: = [0/1] {183} - ¦--expr: flus( [0/0] {184} - ¦ ¦--expr: flus [0/0] {186} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: flus [0/0] {185} - ¦ ¦--'(': ( [0/0] {187} - ¦ ¦--expr: we [0/0] {189} - ¦ ¦ °--SYMBOL: we [0/0] {188} - ¦ °--')': ) [0/0] {190} - ¦--',': , [0/14] {191} - ¦--SYMBOL_FORMALS: aq [1/1] {192} - ¦--EQ_FORMALS: = [0/2] {193} - ¦--expr: x - 2 [0/0] {194} - ¦ ¦--expr: x [0/1] {196} - ¦ ¦ °--SYMBOL: x [0/0] {195} - ¦ ¦--'-': - [0/1] {197} - ¦ °--expr: 22 [0/0] {199} - ¦ °--NUM_CONST: 22 [0/0] {198} - ¦--',': , [0/4] {200} - ¦--SYMBOL_FORMALS: k [0/1] {201} - ¦--EQ_FORMALS: = [0/1] {202} - ¦--expr: 22 [0/0] {204} - ¦ °--NUM_CONST: 22 [0/0] {203} - ¦--',': , [0/14] {205} - ¦--SYMBOL_FORMALS: ayz [1/1] {206} - ¦--EQ_FORMALS: = [0/1] {207} - ¦--expr: m(jk5 [0/0] {208} - ¦ ¦--expr: m [0/0] {210} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: m [0/0] {209} - ¦ ¦--'(': ( [0/0] {211} - ¦ ¦--expr: jk5 [0/0] {213} - ¦ ¦ °--SYMBOL: jk5 [0/0] {212} - ¦ °--')': ) [0/0] {214} - ¦--',': , [0/1] {215} - ¦--SYMBOL_FORMALS: xfea [0/1] {216} - ¦--EQ_FORMALS: = [0/2] {217} - ¦--expr: 3 [0/0] {219} - ¦ °--NUM_CONST: 3 [0/0] {218} - ¦--')': ) [0/1] {220} - °--expr: {} [0/0] {221} - ¦--'{': { [0/0] {222} - °--'}': } [0/0] {223} diff --git a/tests/testthat/alignment/named-in_tree b/tests/testthat/alignment/named-in_tree deleted file mode 100644 index 2a569ab09..000000000 --- a/tests/testthat/alignment/named-in_tree +++ /dev/null @@ -1,966 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: # alg [0/0] {1} - ¦--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: 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: 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: 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: 33 [0/0] {24} - ¦ ¦ °--NUM_CONST: 33 [0/0] {23} - ¦ ¦--',': , [0/0] {25} - ¦ °--')': ) [1/0] {26} - ¦--COMMENT: # wit [2/0] {27} - ¦--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: 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: 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: 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: 33 [0/0] {50} - ¦ ¦ °--NUM_CONST: 33 [0/0] {49} - ¦ °--')': ) [1/0] {51} - ¦--COMMENT: # alg [2/0] {52} - ¦--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: 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: 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: 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: 33 [0/0] {75} - ¦ ¦ °--NUM_CONST: 33 [0/0] {74} - ¦ ¦--',': , [0/0] {76} - ¦ °--')': ) [1/0] {77} - ¦--COMMENT: # alg [2/0] {78} - ¦--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: 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: 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: 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: 33 [0/0] {101} - ¦ ¦ °--NUM_CONST: 33 [0/0] {100} - ¦ ¦--',': , [0/0] {102} - ¦ °--')': ) [1/0] {103} - ¦--COMMENT: # alg [2/0] {104} - ¦--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: 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: 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: 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: 33 [0/0] {127} - ¦ ¦ °--NUM_CONST: 33 [0/0] {126} - ¦ ¦--',': , [0/0] {128} - ¦ °--')': ) [1/0] {129} - ¦--COMMENT: # alg [2/0] {130} - ¦--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: 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: 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: 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: 33 [0/0] {153} - ¦ ¦ °--NUM_CONST: 33 [0/0] {152} - ¦ ¦--',': , [0/0] {154} - ¦ °--')': ) [1/0] {155} - ¦--COMMENT: # alg [2/0] {156} - ¦--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: 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: 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: 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: 33 [0/0] {179} - ¦ ¦ °--NUM_CONST: 33 [0/0] {178} - ¦ ¦--',': , [0/0] {180} - ¦ °--')': ) [1/0] {181} - ¦--COMMENT: # alg [2/0] {182} - ¦--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: 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: 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: 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: 33 [0/0] {205} - ¦ ¦ °--NUM_CONST: 33 [0/0] {204} - ¦ ¦--',': , [0/0] {206} - ¦ °--')': ) [1/0] {207} - ¦--COMMENT: # alg [3/0] {208} - ¦--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: 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: 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: "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: 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: 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: "333" [0/0] {241} - ¦ ¦ °--STR_CONST: "333" [0/0] {240} - ¦ °--')': ) [1/0] {242} - ¦--COMMENT: # alg [3/0] {243} - ¦--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: 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: 2 [0/0] {256} - ¦ ¦ °--NUM_CONST: 2 [0/0] {255} - ¦ ¦--',': , [0/1] {257} - ¦ ¦--SYMBOL_SUB: n [0/1] {258} - ¦ ¦--EQ_SUB: = [0/1] {259} - ¦ ¦--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: "333" [0/0] {266} - ¦ ¦ °--STR_CONST: "333" [0/0] {265} - ¦ °--')': ) [1/0] {267} - ¦--COMMENT: # alg [2/0] {268} - ¦--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: 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: 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: "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: 2 [0/0] {291} - ¦ ¦ °--NUM_CONST: 2 [0/0] {290} - ¦ ¦--',': , [0/0] {292} - ¦ °--')': ) [1/0] {293} - ¦--COMMENT: # ali [2/0] {294} - ¦--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: ff("p [0/0] {301} - ¦ ¦ ¦--expr: ff [0/0] {303} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: ff [0/0] {302} - ¦ ¦ ¦--'(': ( [0/0] {304} - ¦ ¦ ¦--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: 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: f(-g) [0/0] {316} - ¦ ¦ ¦--expr: f [0/0] {318} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: f [0/0] {317} - ¦ ¦ ¦--'(': ( [0/0] {319} - ¦ ¦ ¦--expr: -g [0/0] {320} - ¦ ¦ ¦ ¦--'-': - [0/0] {321} - ¦ ¦ ¦ °--expr: g [0/0] {323} - ¦ ¦ ¦ °--SYMBOL: g [0/0] {322} - ¦ ¦ °--')': ) [0/0] {324} - ¦ ¦--',': , [0/5] {325} - ¦ ¦--expr: 22 + [0/0] {326} - ¦ ¦ ¦--expr: 22 [0/1] {328} - ¦ ¦ ¦ °--NUM_CONST: 22 [0/0] {327} - ¦ ¦ ¦--'+': + [0/1] {329} - ¦ ¦ °--expr: 1 [0/0] {331} - ¦ ¦ °--NUM_CONST: 1 [0/0] {330} - ¦ ¦--',': , [0/2] {332} - ¦ ¦--expr: 44 [1/0] {334} - ¦ ¦ °--NUM_CONST: 44 [0/0] {333} - ¦ ¦--',': , [0/15] {335} - ¦ ¦--expr: 323 [0/0] {337} - ¦ ¦ °--NUM_CONST: 323 [0/0] {336} - ¦ °--')': ) [1/0] {338} - ¦--COMMENT: # ali [2/0] {339} - ¦--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: ff("p [0/0] {346} - ¦ ¦ ¦--expr: ff [0/0] {348} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: ff [0/0] {347} - ¦ ¦ ¦--'(': ( [0/0] {349} - ¦ ¦ ¦--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: 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: f(-g) [0/0] {361} - ¦ ¦ ¦--expr: f [0/0] {363} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: f [0/0] {362} - ¦ ¦ ¦--'(': ( [0/0] {364} - ¦ ¦ ¦--expr: -g [0/0] {365} - ¦ ¦ ¦ ¦--'-': - [0/0] {366} - ¦ ¦ ¦ °--expr: g [0/0] {368} - ¦ ¦ ¦ °--SYMBOL: g [0/0] {367} - ¦ ¦ °--')': ) [0/0] {369} - ¦ ¦--',': , [0/5] {370} - ¦ ¦--expr: 22 + [0/0] {371} - ¦ ¦ ¦--expr: 22 [0/1] {373} - ¦ ¦ ¦ °--NUM_CONST: 22 [0/0] {372} - ¦ ¦ ¦--'+': + [0/1] {374} - ¦ ¦ °--expr: 1 [0/0] {376} - ¦ ¦ °--NUM_CONST: 1 [0/0] {375} - ¦ ¦--',': , [0/2] {377} - ¦ ¦--expr: 44 [1/0] {379} - ¦ ¦ °--NUM_CONST: 44 [0/0] {378} - ¦ ¦--',': , [0/15] {380} - ¦ ¦--expr: 323 [0/0] {382} - ¦ ¦ °--NUM_CONST: 323 [0/0] {381} - ¦ ¦--',': , [0/0] {383} - ¦ °--')': ) [1/0] {384} - ¦--COMMENT: # no [2/0] {385} - ¦--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: ff("p [0/0] {392} - ¦ ¦ ¦--expr: ff [0/0] {394} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: ff [0/0] {393} - ¦ ¦ ¦--'(': ( [0/0] {395} - ¦ ¦ ¦--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: 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: f(-g) [0/0] {407} - ¦ ¦ ¦--expr: f [0/0] {409} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: f [0/0] {408} - ¦ ¦ ¦--'(': ( [0/0] {410} - ¦ ¦ ¦--expr: -g [0/0] {411} - ¦ ¦ ¦ ¦--'-': - [0/0] {412} - ¦ ¦ ¦ °--expr: g [0/0] {414} - ¦ ¦ ¦ °--SYMBOL: g [0/0] {413} - ¦ ¦ °--')': ) [0/0] {415} - ¦ ¦--',': , [0/5] {416} - ¦ ¦--expr: 22 + [0/0] {417} - ¦ ¦ ¦--expr: 22 [0/1] {419} - ¦ ¦ ¦ °--NUM_CONST: 22 [0/0] {418} - ¦ ¦ ¦--'+': + [0/1] {420} - ¦ ¦ °--expr: 1 [0/0] {422} - ¦ ¦ °--NUM_CONST: 1 [0/0] {421} - ¦ ¦--',': , [0/2] {423} - ¦ ¦--expr: 44 [1/0] {425} - ¦ ¦ °--NUM_CONST: 44 [0/0] {424} - ¦ °--')': ) [1/0] {426} - ¦--COMMENT: # ali [2/0] {427} - ¦--expr: call( [1/0] {428} - ¦ ¦--expr: call [0/0] {430} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {429} - ¦ ¦--'(': ( [0/2] {431} - ¦ ¦--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: ff("p [0/0] {437} - ¦ ¦ ¦--expr: ff [0/0] {439} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: ff [0/0] {438} - ¦ ¦ ¦--'(': ( [0/0] {440} - ¦ ¦ ¦--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: 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: f(-g) [0/0] {452} - ¦ ¦ ¦--expr: f [0/0] {454} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: f [0/0] {453} - ¦ ¦ ¦--'(': ( [0/0] {455} - ¦ ¦ ¦--expr: -g [0/0] {456} - ¦ ¦ ¦ ¦--'-': - [0/0] {457} - ¦ ¦ ¦ °--expr: g [0/0] {459} - ¦ ¦ ¦ °--SYMBOL: g [0/0] {458} - ¦ ¦ °--')': ) [0/0] {460} - ¦ ¦--',': , [0/5] {461} - ¦ ¦--expr: 22 + [0/0] {462} - ¦ ¦ ¦--expr: 22 [0/1] {464} - ¦ ¦ ¦ °--NUM_CONST: 22 [0/0] {463} - ¦ ¦ ¦--'+': + [0/1] {465} - ¦ ¦ °--expr: 1 [0/0] {467} - ¦ ¦ °--NUM_CONST: 1 [0/0] {466} - ¦ ¦--',': , [0/0] {468} - ¦ °--')': ) [1/0] {469} - ¦--COMMENT: # ali [2/0] {470} - ¦--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: ff("p [0/0] {477} - ¦ ¦ ¦--expr: ff [0/0] {479} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: ff [0/0] {478} - ¦ ¦ ¦--'(': ( [0/0] {480} - ¦ ¦ ¦--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: 3 [0/0] {488} - ¦ ¦ °--NUM_CONST: 3 [0/0] {487} - ¦ ¦--',': , [0/2] {489} - ¦ ¦--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: f(-g) [0/0] {495} - ¦ ¦ ¦--expr: f [0/0] {497} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: f [0/0] {496} - ¦ ¦ ¦--'(': ( [0/0] {498} - ¦ ¦ ¦--expr: -g [0/0] {499} - ¦ ¦ ¦ ¦--'-': - [0/0] {500} - ¦ ¦ ¦ °--expr: g [0/0] {502} - ¦ ¦ ¦ °--SYMBOL: g [0/0] {501} - ¦ ¦ °--')': ) [0/0] {503} - ¦ ¦--',': , [0/5] {504} - ¦ ¦--expr: 22 + [0/0] {505} - ¦ ¦ ¦--expr: 22 [0/1] {507} - ¦ ¦ ¦ °--NUM_CONST: 22 [0/0] {506} - ¦ ¦ ¦--'+': + [0/1] {508} - ¦ ¦ °--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: 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: 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: 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: NULL [0/0] {532} - ¦ ¦ °--NULL_CONST: NULL [0/0] {531} - ¦ °--')': ) [1/0] {533} - ¦--COMMENT: # ali [2/0] {534} - ¦--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: 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: 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: NULL [0/0] {552} - ¦ ¦ °--NULL_CONST: NULL [0/0] {551} - ¦ °--')': ) [1/0] {553} - ¦--COMMENT: # ali [2/0] {554} - ¦--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: 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: 3 [0/0] {567} - ¦ ¦ °--NUM_CONST: 3 [0/0] {566} - ¦ ¦--',': , [1/0] {568} - ¦ °--')': ) [0/0] {569} - ¦--COMMENT: # ali [3/0] {570} - ¦--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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 3 [0/1] {657} - ¦ ¦ °--NUM_CONST: 3 [0/0] {656} - ¦ ¦--COMMENT: # hi [0/0] {658} - ¦ °--')': ) [1/0] {659} - ¦--COMMENT: # not [2/0] {660} - ¦--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: 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: 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: 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: 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: 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: 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: 3 [0/0] {701} - ¦ ¦ °--NUM_CONST: 3 [0/0] {700} - ¦ ¦--',': , [0/2] {702} - ¦ ¦--COMMENT: # hi [1/0] {703} - ¦ °--')': ) [1/0] {704} - ¦--COMMENT: # If [2/0] {705} - ¦--COMMENT: # not [1/0] {706} - ¦--COMMENT: # in [1/0] {707} - ¦--COMMENT: # the [1/0] {708} - ¦--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: 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: f( - [0/0] {720} - ¦ ¦ ¦--expr: f [0/0] {722} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: f [0/0] {721} - ¦ ¦ ¦--'(': ( [0/2] {723} - ¦ ¦ °--')': ) [1/0] {724} - ¦ ¦--',': , [0/0] {725} - ¦ °--')': ) [1/0] {726} - ¦--COMMENT: # ali [3/0] {727} - ¦--expr: ca( - [1/0] {728} - ¦ ¦--expr: ca [0/0] {730} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: ca [0/0] {729} - ¦ ¦--'(': ( [0/2] {731} - ¦ ¦--SYMBOL_SUB: x [1/2] {732} - ¦ ¦--EQ_SUB: = [0/1] {733} - ¦ ¦--expr: 23200 [0/0] {735} - ¦ ¦ °--NUM_CONST: 23200 [0/0] {734} - ¦ ¦--',': , [0/2] {736} - ¦ ¦--SYMBOL_SUB: y2 [1/1] {737} - ¦ ¦--EQ_SUB: = [0/1] {738} - ¦ ¦--expr: "hi" [0/0] {740} - ¦ ¦ °--STR_CONST: "hi" [0/0] {739} - ¦ ¦--',': , [0/2] {741} - ¦ ¦--SYMBOL_SUB: m [1/2] {742} - ¦ ¦--EQ_SUB: = [0/1] {743} - ¦ ¦--expr: c(rm. [0/0] {744} - ¦ ¦ ¦--expr: c [0/0] {746} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {745} - ¦ ¦ ¦--'(': ( [0/0] {747} - ¦ ¦ ¦--SYMBOL_SUB: rm.na [0/1] {748} - ¦ ¦ ¦--EQ_SUB: = [0/1] {749} - ¦ ¦ ¦--expr: 7 [0/0] {751} - ¦ ¦ ¦ °--NUM_CONST: 7 [0/0] {750} - ¦ ¦ °--')': ) [0/0] {752} - ¦ °--')': ) [1/0] {753} - ¦--COMMENT: # not [2/0] {754} - ¦--expr: ca( - [1/0] {755} - ¦ ¦--expr: ca [0/0] {757} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: ca [0/0] {756} - ¦ ¦--'(': ( [0/2] {758} - ¦ ¦--SYMBOL_SUB: x [1/2] {759} - ¦ ¦--EQ_SUB: = [0/1] {760} - ¦ ¦--expr: 23200 [0/0] {762} - ¦ ¦ °--NUM_CONST: 23200 [0/0] {761} - ¦ ¦--',': , [0/2] {763} - ¦ ¦--SYMBOL_SUB: y2 [1/1] {764} - ¦ ¦--EQ_SUB: = [0/1] {765} - ¦ ¦--expr: "hi" [0/0] {767} - ¦ ¦ °--STR_CONST: "hi" [0/0] {766} - ¦ ¦--',': , [0/2] {768} - ¦ ¦--SYMBOL_SUB: m [1/2] {769} - ¦ ¦--EQ_SUB: = [0/2] {770} - ¦ ¦--expr: c(rm. [0/0] {771} - ¦ ¦ ¦--expr: c [0/0] {773} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {772} - ¦ ¦ ¦--'(': ( [0/0] {774} - ¦ ¦ ¦--SYMBOL_SUB: rm.na [0/1] {775} - ¦ ¦ ¦--EQ_SUB: = [0/1] {776} - ¦ ¦ ¦--expr: 7 [0/0] {778} - ¦ ¦ ¦ °--NUM_CONST: 7 [0/0] {777} - ¦ ¦ °--')': ) [0/0] {779} - ¦ °--')': ) [1/0] {780} - ¦--COMMENT: # ali [2/0] {781} - ¦--expr: fell( [1/0] {782} - ¦ ¦--expr: fell [0/0] {784} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: fell [0/0] {783} - ¦ ¦--'(': ( [0/2] {785} - ¦ ¦--SYMBOL_SUB: x [1/2] {786} - ¦ ¦--EQ_SUB: = [0/1] {787} - ¦ ¦--expr: 8 [0/0] {789} - ¦ ¦ °--NUM_CONST: 8 [0/0] {788} - ¦ ¦--',': , [0/1] {790} - ¦ ¦--SYMBOL_SUB: annoy [0/3] {791} - ¦ ¦--EQ_SUB: = [0/1] {792} - ¦ ¦--expr: 3 [0/0] {794} - ¦ ¦ °--NUM_CONST: 3 [0/0] {793} - ¦ ¦--',': , [0/2] {795} - ¦ ¦--SYMBOL_SUB: y [1/2] {796} - ¦ ¦--EQ_SUB: = [0/1] {797} - ¦ ¦--expr: 23 [0/0] {799} - ¦ ¦ °--NUM_CONST: 23 [0/0] {798} - ¦ ¦--',': , [0/1] {800} - ¦ ¦--COMMENT: # not [0/2] {801} - ¦ ¦--SYMBOL_SUB: zz [1/1] {802} - ¦ ¦--EQ_SUB: = [0/1] {803} - ¦ ¦--expr: NULL [0/0] {805} - ¦ ¦ °--NULL_CONST: NULL [0/0] {804} - ¦ ¦--',': , [0/1] {806} - ¦ ¦--SYMBOL_SUB: final [0/1] {807} - ¦ ¦--EQ_SUB: = [0/1] {808} - ¦ ¦--expr: "stuf [0/0] {810} - ¦ ¦ °--STR_CONST: "stuf [0/0] {809} - ¦ °--')': ) [1/0] {811} - ¦--COMMENT: # ali [2/0] {812} - ¦--expr: gell( [1/0] {813} - ¦ ¦--expr: gell [0/0] {815} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: gell [0/0] {814} - ¦ ¦--'(': ( [0/2] {816} - ¦ ¦--SYMBOL_SUB: p [1/1] {817} - ¦ ¦--EQ_SUB: = [0/1] {818} - ¦ ¦--expr: 2 [0/0] {820} - ¦ ¦ °--NUM_CONST: 2 [0/0] {819} - ¦ ¦--',': , [0/3] {821} - ¦ ¦--SYMBOL_SUB: g [0/1] {822} - ¦ ¦--EQ_SUB: = [0/1] {823} - ¦ ¦--expr: gg(x) [0/0] {824} - ¦ ¦ ¦--expr: gg [0/0] {826} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: gg [0/0] {825} - ¦ ¦ ¦--'(': ( [0/0] {827} - ¦ ¦ ¦--expr: x [0/0] {829} - ¦ ¦ ¦ °--SYMBOL: x [0/0] {828} - ¦ ¦ °--')': ) [0/0] {830} - ¦ ¦--',': , [0/1] {831} - ¦ ¦--SYMBOL_SUB: n [0/1] {832} - ¦ ¦--EQ_SUB: = [0/1] {833} - ¦ ¦--expr: 3 * 3 [0/0] {834} - ¦ ¦ ¦--expr: 3 [0/1] {836} - ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {835} - ¦ ¦ ¦--'*': * [0/1] {837} - ¦ ¦ °--expr: 3 [0/0] {839} - ¦ ¦ °--NUM_CONST: 3 [0/0] {838} - ¦ ¦--',': , [0/1] {840} - ¦ ¦--COMMENT: # [0/2] {841} - ¦ ¦--expr: 31 [1/0] {843} - ¦ ¦ °--NUM_CONST: 31 [0/0] {842} - ¦ ¦--',': , [0/4] {844} - ¦ ¦--SYMBOL_SUB: fds [0/1] {845} - ¦ ¦--EQ_SUB: = [0/1] {846} - ¦ ¦--expr: -1 [0/0] {847} - ¦ ¦ ¦--'-': - [0/0] {848} - ¦ ¦ °--expr: 1 [0/0] {850} - ¦ ¦ °--NUM_CONST: 1 [0/0] {849} - ¦ ¦--',': , [0/1] {851} - ¦ ¦--SYMBOL_SUB: gz [0/3] {852} - ¦ ¦--EQ_SUB: = [0/1] {853} - ¦ ¦--expr: f / 3 [0/0] {854} - ¦ ¦ ¦--expr: f [0/1] {857} - ¦ ¦ ¦ °--SYMBOL: f [0/0] {856} - ¦ ¦ ¦--'/': / [0/1] {858} - ¦ ¦ ¦--expr: 3 [0/1] {860} - ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {859} - ¦ ¦ ¦--'+': + [0/1] {861} - ¦ ¦ °--expr: 1 [0/0] {863} - ¦ ¦ °--NUM_CONST: 1 [0/0] {862} - ¦ ¦--',': , [0/0] {864} - ¦ °--')': ) [1/0] {865} - ¦--expr: xgle( [2/0] {866} - ¦ ¦--expr: xgle [0/0] {868} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: xgle [0/0] {867} - ¦ ¦--'(': ( [0/2] {869} - ¦ ¦--expr: 1212 [1/0] {871} - ¦ ¦ °--NUM_CONST: 1212 [0/0] {870} - ¦ ¦--',': , [0/1] {872} - ¦ ¦--expr: 232 [0/0] {874} - ¦ ¦ °--NUM_CONST: 232 [0/0] {873} - ¦ ¦--',': , [0/1] {875} - ¦ ¦--expr: f(n = [0/0] {876} - ¦ ¦ ¦--expr: f [0/0] {878} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: f [0/0] {877} - ¦ ¦ ¦--'(': ( [0/0] {879} - ¦ ¦ ¦--SYMBOL_SUB: n [0/1] {880} - ¦ ¦ ¦--EQ_SUB: = [0/1] {881} - ¦ ¦ ¦--expr: 2 [0/0] {883} - ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {882} - ¦ ¦ °--')': ) [0/0] {884} - ¦ ¦--',': , [0/2] {885} - ¦ ¦--expr: 1 [1/0] {887} - ¦ ¦ °--NUM_CONST: 1 [0/0] {886} - ¦ ¦--',': , [0/6] {888} - ¦ ¦--expr: 2 [0/0] {890} - ¦ ¦ °--NUM_CONST: 2 [0/0] {889} - ¦ ¦--',': , [0/2] {891} - ¦ ¦--expr: "kFly [0/0] {893} - ¦ ¦ °--STR_CONST: "kFly [0/0] {892} - ¦ °--')': ) [1/0] {894} - ¦--COMMENT: # lef [2/0] {895} - ¦--expr: call( [1/0] {896} - ¦ ¦--expr: call [0/0] {898} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {897} - ¦ ¦--'(': ( [0/2] {899} - ¦ ¦--SYMBOL_SUB: x [1/1] {900} - ¦ ¦--EQ_SUB: = [0/1] {901} - ¦ ¦--expr: 2 [0/0] {903} - ¦ ¦ °--NUM_CONST: 2 [0/0] {902} - ¦ ¦--',': , [0/11] {904} - ¦ ¦--SYMBOL_SUB: y [0/1] {905} - ¦ ¦--EQ_SUB: = [0/1] {906} - ¦ ¦--expr: "anot [0/0] {908} - ¦ ¦ °--STR_CONST: "anot [0/0] {907} - ¦ ¦--',': , [0/2] {909} - ¦ ¦--SYMBOL_SUB: y [1/1] {910} - ¦ ¦--EQ_SUB: = [0/1] {911} - ¦ ¦--expr: "hhjk [0/0] {913} - ¦ ¦ °--STR_CONST: "hhjk [0/0] {912} - ¦ ¦--',': , [0/1] {914} - ¦ ¦--SYMBOL_SUB: x [0/1] {915} - ¦ ¦--EQ_SUB: = [0/1] {916} - ¦ ¦--expr: 3 [0/0] {918} - ¦ ¦ °--NUM_CONST: 3 [0/0] {917} - ¦ °--')': ) [1/0] {919} - °--expr: call( [2/0] {920} - ¦--expr: call [0/0] {922} - ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {921} - ¦--'(': ( [0/2] {923} - ¦--SYMBOL_SUB: k [1/1] {924} - ¦--EQ_SUB: = [0/1] {925} - ¦--expr: ff("p [0/0] {926} - ¦ ¦--expr: ff [0/0] {928} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: ff [0/0] {927} - ¦ ¦--'(': ( [0/0] {929} - ¦ ¦--expr: "pk" [0/0] {931} - ¦ ¦ °--STR_CONST: "pk" [0/0] {930} - ¦ °--')': ) [0/0] {932} - ¦--',': , [0/1] {933} - ¦--SYMBOL_SUB: k [0/1] {934} - ¦--EQ_SUB: = [0/1] {935} - ¦--expr: 3 [0/0] {937} - ¦ °--NUM_CONST: 3 [0/0] {936} - ¦--',': , [0/2] {938} - ¦--SYMBOL_SUB: b [1/1] {939} - ¦--EQ_SUB: = [0/1] {940} - ¦--expr: f(-g) [0/0] {941} - ¦ ¦--expr: f [0/0] {943} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: f [0/0] {942} - ¦ ¦--'(': ( [0/0] {944} - ¦ ¦--expr: -g [0/0] {945} - ¦ ¦ ¦--'-': - [0/0] {946} - ¦ ¦ °--expr: g [0/0] {948} - ¦ ¦ °--SYMBOL: g [0/0] {947} - ¦ °--')': ) [0/0] {949} - ¦--',': , [0/4] {950} - ¦--expr: 22 + [0/0] {951} - ¦ ¦--expr: 22 [0/1] {953} - ¦ ¦ °--NUM_CONST: 22 [0/0] {952} - ¦ ¦--'+': + [0/1] {954} - ¦ °--expr: 1 [0/0] {956} - ¦ °--NUM_CONST: 1 [0/0] {955} - ¦--',': , [0/2] {957} - ¦--expr: 44 [1/0] {959} - ¦ °--NUM_CONST: 44 [0/0] {958} - ¦--',': , [0/11] {960} - ¦--expr: 323 [0/0] {962} - ¦ °--NUM_CONST: 323 [0/0] {961} - °--')': ) [1/0] {963} diff --git a/tests/testthat/alignment/named-out.R b/tests/testthat/alignment/named-out.R index 5fd8e9507..35c3bb607 100644 --- a/tests/testthat/alignment/named-out.R +++ b/tests/testthat/alignment/named-out.R @@ -102,7 +102,6 @@ call( ) - # if all col1 arguments are named, col1 must also be aligned # not aligned fell( diff --git a/tests/testthat/alignment/one-col-some-named-in_tree b/tests/testthat/alignment/one-col-some-named-in_tree deleted file mode 100644 index 392910286..000000000 --- a/tests/testthat/alignment/one-col-some-named-in_tree +++ /dev/null @@ -1,48 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: foo( - [0/0] {1} - ¦ ¦--expr: foo [0/0] {3} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: foo [0/0] {2} - ¦ ¦--'(': ( [0/2] {4} - ¦ ¦--expr: img [1/0] {6} - ¦ ¦ °--SYMBOL: img [0/0] {5} - ¦ ¦--',': , [0/2] {7} - ¦ ¦--SYMBOL_SUB: pkg [1/1] {8} - ¦ ¦--EQ_SUB: = [0/1] {9} - ¦ ¦--expr: "abc" [0/0] {11} - ¦ ¦ °--STR_CONST: "abc" [0/0] {10} - ¦ ¦--',': , [0/2] {12} - ¦ ¦--SYMBOL_SUB: color [1/7] {13} - ¦ ¦--EQ_SUB: = [0/1] {14} - ¦ ¦--expr: "lmn" [0/0] {16} - ¦ ¦ °--STR_CONST: "lmn" [0/0] {15} - ¦ ¦--',': , [0/2] {17} - ¦ ¦--SYMBOL_SUB: font [1/2] {18} - ¦ ¦--EQ_SUB: = [0/1] {19} - ¦ ¦--expr: "xyz" [0/0] {21} - ¦ ¦ °--STR_CONST: "xyz" [0/0] {20} - ¦ °--')': ) [1/0] {22} - °--expr: foo( - [3/0] {23} - ¦--expr: foo [0/0] {25} - ¦ °--SYMBOL_FUNCTION_CALL: foo [0/0] {24} - ¦--'(': ( [0/2] {26} - ¦--expr: img [1/0] {28} - ¦ °--SYMBOL: img [0/0] {27} - ¦--',': , [0/1] {29} - ¦--COMMENT: # [0/2] {30} - ¦--SYMBOL_SUB: pkg [1/1] {31} - ¦--EQ_SUB: = [0/1] {32} - ¦--expr: "abc" [0/0] {34} - ¦ °--STR_CONST: "abc" [0/0] {33} - ¦--',': , [0/2] {35} - ¦--SYMBOL_SUB: color [1/7] {36} - ¦--EQ_SUB: = [0/1] {37} - ¦--expr: "lmn" [0/0] {39} - ¦ °--STR_CONST: "lmn" [0/0] {38} - ¦--',': , [0/2] {40} - ¦--SYMBOL_SUB: font [1/2] {41} - ¦--EQ_SUB: = [0/1] {42} - ¦--expr: "xyz" [0/0] {44} - ¦ °--STR_CONST: "xyz" [0/0] {43} - °--')': ) [1/0] {45} diff --git a/tests/testthat/alignment/quoted-names-in_tree b/tests/testthat/alignment/quoted-names-in_tree deleted file mode 100644 index 0ed87be9c..000000000 --- a/tests/testthat/alignment/quoted-names-in_tree +++ /dev/null @@ -1,39 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: df <- [0/0] {1} - ¦--expr: df [0/1] {3} - ¦ °--SYMBOL: df [0/0] {2} - ¦--LEFT_ASSIGN: <- [0/1] {4} - °--expr: dplyr [0/0] {5} - ¦--expr: dplyr [0/0] {6} - ¦ ¦--SYMBOL_PACKAGE: dplyr [0/0] {7} - ¦ ¦--NS_GET: :: [0/0] {8} - ¦ °--SYMBOL_FUNCTION_CALL: renam [0/0] {9} - ¦--'(': ( [0/0] {10} - ¦--expr: df [0/0] {12} - ¦ °--SYMBOL: df [0/0] {11} - ¦--',': , [0/2] {13} - ¦--STR_CONST: "xVal [1/1] {14} - ¦--EQ_SUB: = [0/3] {15} - ¦--expr: "Time [0/0] {17} - ¦ °--STR_CONST: "Time [0/0] {16} - ¦--',': , [0/2] {18} - ¦--STR_CONST: "xUni [1/1] {19} - ¦--EQ_SUB: = [0/1] {20} - ¦--expr: "Time [0/0] {22} - ¦ °--STR_CONST: "Time [0/0] {21} - ¦--',': , [0/2] {23} - ¦--STR_CONST: "yVal [1/3] {24} - ¦--EQ_SUB: = [0/1] {25} - ¦--expr: "simu [0/0] {27} - ¦ °--STR_CONST: "simu [0/0] {26} - ¦--',': , [0/2] {28} - ¦--STR_CONST: "yUni [1/1] {29} - ¦--EQ_SUB: = [0/1] {30} - ¦--expr: "unit [0/0] {32} - ¦ °--STR_CONST: "unit [0/0] {31} - ¦--',': , [0/2] {33} - ¦--STR_CONST: "yDim [1/2] {34} - ¦--EQ_SUB: = [0/1] {35} - ¦--expr: "dime [0/0] {37} - ¦ °--STR_CONST: "dime [0/0] {36} - °--')': ) [1/0] {38} diff --git a/tests/testthat/alignment/tribble-in_tree b/tests/testthat/alignment/tribble-in_tree deleted file mode 100644 index cb374e0bb..000000000 --- a/tests/testthat/alignment/tribble-in_tree +++ /dev/null @@ -1,165 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: tribb [0/0] {1} - ¦ ¦--expr: tribb [0/0] {3} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: tribb [0/0] {2} - ¦ ¦--'(': ( [0/2] {4} - ¦ ¦--expr: ~x [1/0] {5} - ¦ ¦ ¦--'~': ~ [0/0] {6} - ¦ ¦ °--expr: x [0/0] {8} - ¦ ¦ °--SYMBOL: x [0/0] {7} - ¦ ¦--',': , [0/7] {9} - ¦ ¦--expr: ~d [0/0] {10} - ¦ ¦ ¦--'~': ~ [0/0] {11} - ¦ ¦ °--expr: d [0/0] {13} - ¦ ¦ °--SYMBOL: d [0/0] {12} - ¦ ¦--',': , [0/2] {14} - ¦ ¦--expr: "axa' [1/0] {16} - ¦ ¦ °--STR_CONST: "axa' [0/0] {15} - ¦ ¦--',': , [0/1] {17} - ¦ ¦--expr: 1:6 [0/0] {18} - ¦ ¦ ¦--expr: 1 [0/0] {20} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {19} - ¦ ¦ ¦--':': : [0/0] {21} - ¦ ¦ °--expr: 6 [0/0] {23} - ¦ ¦ °--NUM_CONST: 6 [0/0] {22} - ¦ ¦--',': , [0/2] {24} - ¦ ¦--expr: "b" [1/0] {26} - ¦ ¦ °--STR_CONST: "b" [0/0] {25} - ¦ ¦--',': , [0/6] {27} - ¦ ¦--expr: 4:6 [0/0] {28} - ¦ ¦ ¦--expr: 4 [0/0] {30} - ¦ ¦ ¦ °--NUM_CONST: 4 [0/0] {29} - ¦ ¦ ¦--':': : [0/0] {31} - ¦ ¦ °--expr: 6 [0/0] {33} - ¦ ¦ °--NUM_CONST: 6 [0/0] {32} - ¦ °--')': ) [1/0] {34} - ¦--expr: tribb [2/0] {35} - ¦ ¦--expr: tribb [0/0] {37} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: tribb [0/0] {36} - ¦ ¦--'(': ( [0/2] {38} - ¦ ¦--expr: ~x [1/0] {39} - ¦ ¦ ¦--'~': ~ [0/0] {40} - ¦ ¦ °--expr: x [0/0] {42} - ¦ ¦ °--SYMBOL: x [0/0] {41} - ¦ ¦--',': , [0/7] {43} - ¦ ¦--expr: ~d [0/0] {44} - ¦ ¦ ¦--'~': ~ [0/0] {45} - ¦ ¦ °--expr: d [0/0] {47} - ¦ ¦ °--SYMBOL: d [0/0] {46} - ¦ ¦--',': , [0/2] {48} - ¦ ¦--expr: "axa' [1/0] {50} - ¦ ¦ °--STR_CONST: "axa' [0/0] {49} - ¦ ¦--',': , [0/1] {51} - ¦ ¦--expr: 1:6 [0/0] {52} - ¦ ¦ ¦--expr: 1 [0/0] {54} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {53} - ¦ ¦ ¦--':': : [0/0] {55} - ¦ ¦ °--expr: 6 [0/0] {57} - ¦ ¦ °--NUM_CONST: 6 [0/0] {56} - ¦ ¦--',': , [0/2] {58} - ¦ ¦--expr: "b" [1/0] {60} - ¦ ¦ °--STR_CONST: "b" [0/0] {59} - ¦ ¦--',': , [0/4] {61} - ¦ ¦--expr: 4:6 [0/0] {62} - ¦ ¦ ¦--expr: 4 [0/0] {64} - ¦ ¦ ¦ °--NUM_CONST: 4 [0/0] {63} - ¦ ¦ ¦--':': : [0/0] {65} - ¦ ¦ °--expr: 6 [0/0] {67} - ¦ ¦ °--NUM_CONST: 6 [0/0] {66} - ¦ °--')': ) [1/0] {68} - ¦--expr: tribb [3/0] {69} - ¦ ¦--expr: tribb [0/0] {71} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: tribb [0/0] {70} - ¦ ¦--'(': ( [0/2] {72} - ¦ ¦--expr: ~x [1/0] {73} - ¦ ¦ ¦--'~': ~ [0/0] {74} - ¦ ¦ °--expr: x [0/0] {76} - ¦ ¦ °--SYMBOL: x [0/0] {75} - ¦ ¦--',': , [0/7] {77} - ¦ ¦--expr: ~d [0/0] {78} - ¦ ¦ ¦--'~': ~ [0/0] {79} - ¦ ¦ °--expr: d [0/0] {81} - ¦ ¦ °--SYMBOL: d [0/0] {80} - ¦ ¦--',': , [0/2] {82} - ¦ ¦--expr: "axa' [1/0] {84} - ¦ ¦ °--STR_CONST: "axa' [0/0] {83} - ¦ ¦--',': , [0/1] {85} - ¦ ¦--expr: 1:6 [0/0] {86} - ¦ ¦ ¦--expr: 1 [0/0] {88} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {87} - ¦ ¦ ¦--':': : [0/0] {89} - ¦ ¦ °--expr: 6 [0/0] {91} - ¦ ¦ °--NUM_CONST: 6 [0/0] {90} - ¦ ¦--',': , [0/0] {92} - ¦ ¦--expr: "b" [1/0] {94} - ¦ ¦ °--STR_CONST: "b" [0/0] {93} - ¦ ¦--',': , [0/6] {95} - ¦ ¦--expr: 4:6 [0/0] {96} - ¦ ¦ ¦--expr: 4 [0/0] {98} - ¦ ¦ ¦ °--NUM_CONST: 4 [0/0] {97} - ¦ ¦ ¦--':': : [0/0] {99} - ¦ ¦ °--expr: 6 [0/0] {101} - ¦ ¦ °--NUM_CONST: 6 [0/0] {100} - ¦ °--')': ) [1/0] {102} - ¦--expr: tribb [2/0] {103} - ¦ ¦--expr: tribb [0/0] {105} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: tribb [0/0] {104} - ¦ ¦--'(': ( [0/2] {106} - ¦ ¦--expr: ~x [1/0] {107} - ¦ ¦ ¦--'~': ~ [0/0] {108} - ¦ ¦ °--expr: x [0/0] {110} - ¦ ¦ °--SYMBOL: x [0/0] {109} - ¦ ¦--',': , [0/7] {111} - ¦ ¦--expr: ~d [0/0] {112} - ¦ ¦ ¦--'~': ~ [0/0] {113} - ¦ ¦ °--expr: d [0/0] {115} - ¦ ¦ °--SYMBOL: d [0/0] {114} - ¦ ¦--',': , [0/0] {116} - ¦ ¦--expr: "axa' [1/0] {118} - ¦ ¦ °--STR_CONST: "axa' [0/0] {117} - ¦ ¦--',': , [0/2] {119} - ¦ ¦--expr: 1:6 [0/0] {120} - ¦ ¦ ¦--expr: 1 [0/0] {122} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {121} - ¦ ¦ ¦--':': : [0/0] {123} - ¦ ¦ °--expr: 6 [0/0] {125} - ¦ ¦ °--NUM_CONST: 6 [0/0] {124} - ¦ ¦--',': , [0/2] {126} - ¦ ¦--expr: "b" [1/0] {128} - ¦ ¦ °--STR_CONST: "b" [0/0] {127} - ¦ ¦--',': , [0/6] {129} - ¦ ¦--expr: 4:6 [0/0] {130} - ¦ ¦ ¦--expr: 4 [0/0] {132} - ¦ ¦ ¦ °--NUM_CONST: 4 [0/0] {131} - ¦ ¦ ¦--':': : [0/0] {133} - ¦ ¦ °--expr: 6 [0/0] {135} - ¦ ¦ °--NUM_CONST: 6 [0/0] {134} - ¦ °--')': ) [1/0] {136} - ¦--COMMENT: # has [2/0] {137} - °--expr: mlr3m [1/0] {138} - ¦--expr: mlr3m [0/0] {139} - ¦ ¦--SYMBOL_PACKAGE: mlr3m [0/0] {140} - ¦ ¦--NS_GET_INT: ::: [0/0] {141} - ¦ °--SYMBOL_FUNCTION_CALL: rowwi [0/0] {142} - ¦--'(': ( [0/2] {143} - ¦--SYMBOL_SUB: x [1/1] {144} - ¦--EQ_SUB: = [0/1] {145} - ¦--expr: 23 [0/0] {147} - ¦ °--NUM_CONST: 23 [0/0] {146} - ¦--',': , [0/1] {148} - ¦--SYMBOL_SUB: zy [0/1] {149} - ¦--EQ_SUB: = [0/1] {150} - ¦--expr: 3 [0/0] {152} - ¦ °--NUM_CONST: 3 [0/0] {151} - ¦--',': , [0/2] {153} - ¦--SYMBOL_SUB: y [1/1] {154} - ¦--EQ_SUB: = [0/1] {155} - ¦--expr: 1 [0/0] {157} - ¦ °--NUM_CONST: 1 [0/0] {156} - ¦--',': , [0/2] {158} - ¦--SYMBOL_SUB: k [0/1] {159} - ¦--EQ_SUB: = [0/1] {160} - ¦--expr: 1 [0/0] {162} - ¦ °--NUM_CONST: 1 [0/0] {161} - ¦--',': , [0/0] {163} - °--')': ) [1/0] {164} diff --git a/tests/testthat/alignment/tribble-three-cols-in_tree b/tests/testthat/alignment/tribble-three-cols-in_tree deleted file mode 100644 index aa7e8e833..000000000 --- a/tests/testthat/alignment/tribble-three-cols-in_tree +++ /dev/null @@ -1,38 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: tribb [0/0] {1} - ¦--expr: tribb [0/0] {3} - ¦ °--SYMBOL_FUNCTION_CALL: tribb [0/0] {2} - ¦--'(': ( [0/2] {4} - ¦--expr: ~x [1/0] {5} - ¦ ¦--'~': ~ [0/0] {6} - ¦ °--expr: x [0/0] {8} - ¦ °--SYMBOL: x [0/0] {7} - ¦--',': , [0/4] {9} - ¦--expr: ~y [0/0] {10} - ¦ ¦--'~': ~ [0/0] {11} - ¦ °--expr: y [0/0] {13} - ¦ °--SYMBOL: y [0/0] {12} - ¦--',': , [0/4] {14} - ¦--expr: ~z [0/0] {15} - ¦ ¦--'~': ~ [0/0] {16} - ¦ °--expr: z [0/0] {18} - ¦ °--SYMBOL: z [0/0] {17} - ¦--',': , [0/2] {19} - ¦--expr: "one" [1/0] {21} - ¦ °--STR_CONST: "one" [0/0] {20} - ¦--',': , [0/1] {22} - ¦--expr: TRUE [0/0] {24} - ¦ °--NUM_CONST: TRUE [0/0] {23} - ¦--',': , [0/2] {25} - ¦--expr: 1L [0/0] {27} - ¦ °--NUM_CONST: 1L [0/0] {26} - ¦--',': , [0/2] {28} - ¦--expr: "two" [1/0] {30} - ¦ °--STR_CONST: "two" [0/0] {29} - ¦--',': , [0/1] {31} - ¦--expr: FALSE [0/0] {33} - ¦ °--NUM_CONST: FALSE [0/0] {32} - ¦--',': , [0/1] {34} - ¦--expr: 2L [0/0] {36} - ¦ °--NUM_CONST: 2L [0/0] {35} - °--')': ) [1/0] {37} diff --git a/tests/testthat/curly-curly/mixed-in_tree b/tests/testthat/curly-curly/mixed-in_tree deleted file mode 100644 index b7ab6ef5a..000000000 --- a/tests/testthat/curly-curly/mixed-in_tree +++ /dev/null @@ -1,505 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: ## . [0/0] {1} - ¦--COMMENT: ## l [1/0] {2} - ¦--COMMENT: # not [1/0] {3} - ¦--expr: call( [1/0] {4} - ¦ ¦--expr: call [0/0] {6} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {5} - ¦ ¦--'(': ( [0/0] {7} - ¦ ¦--expr: {{ x [0/0] {8} - ¦ ¦ ¦--'{': { [0/0] {9} - ¦ ¦ ¦--expr: { x } [0/0] {10} - ¦ ¦ ¦ ¦--'{': { [0/1] {11} - ¦ ¦ ¦ ¦--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: call( [1/0] {18} - ¦ ¦--expr: call [0/0] {20} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {19} - ¦ ¦--'(': ( [0/0] {21} - ¦ ¦--expr: {{ - [0/0] {22} - ¦ ¦ ¦--'{': { [0/0] {23} - ¦ ¦ ¦--expr: { - x [0/0] {24} - ¦ ¦ ¦ ¦--'{': { [0/2] {25} - ¦ ¦ ¦ ¦--expr: x [1/0] {27} - ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {26} - ¦ ¦ ¦ °--'}': } [1/0] {28} - ¦ ¦ °--'}': } [0/0] {29} - ¦ °--')': ) [0/0] {30} - ¦--expr: call( [2/0] {31} - ¦ ¦--expr: call [0/0] {33} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {32} - ¦ ¦--'(': ( [0/0] {34} - ¦ ¦--expr: { - { [0/0] {35} - ¦ ¦ ¦--'{': { [0/2] {36} - ¦ ¦ ¦--expr: {x -} [1/0] {37} - ¦ ¦ ¦ ¦--'{': { [0/0] {38} - ¦ ¦ ¦ ¦--expr: x [0/0] {40} - ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {39} - ¦ ¦ ¦ °--'}': } [1/0] {41} - ¦ ¦ °--'}': } [0/0] {42} - ¦ °--')': ) [0/0] {43} - ¦--expr: call( [2/0] {44} - ¦ ¦--expr: call [0/0] {46} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {45} - ¦ ¦--'(': ( [0/0] {47} - ¦ ¦--expr: { - { [0/0] {48} - ¦ ¦ ¦--'{': { [0/2] {49} - ¦ ¦ ¦--expr: {x} [1/0] {50} - ¦ ¦ ¦ ¦--'{': { [0/0] {51} - ¦ ¦ ¦ ¦--expr: x [0/0] {53} - ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {52} - ¦ ¦ ¦ °--'}': } [0/0] {54} - ¦ ¦ °--'}': } [0/0] {55} - ¦ °--')': ) [1/0] {56} - ¦--expr: call( [2/0] {57} - ¦ ¦--expr: call [0/0] {59} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {58} - ¦ ¦--'(': ( [0/0] {60} - ¦ ¦--expr: { - { [0/0] {61} - ¦ ¦ ¦--'{': { [0/2] {62} - ¦ ¦ ¦--expr: {x} [1/2] {63} - ¦ ¦ ¦ ¦--'{': { [0/0] {64} - ¦ ¦ ¦ ¦--expr: x [0/0] {66} - ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {65} - ¦ ¦ ¦ °--'}': } [0/0] {67} - ¦ ¦ °--'}': } [1/0] {68} - ¦ °--')': ) [0/0] {69} - ¦--expr: call( [2/0] {70} - ¦ ¦--expr: call [0/0] {72} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {71} - ¦ ¦--'(': ( [0/2] {73} - ¦ ¦--expr: { - { [1/2] {74} - ¦ ¦ ¦--'{': { [0/2] {75} - ¦ ¦ ¦--expr: {x - [1/4] {76} - ¦ ¦ ¦ ¦--'{': { [0/0] {77} - ¦ ¦ ¦ ¦--expr: x [0/2] {79} - ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {78} - ¦ ¦ ¦ °--'}': } [1/0] {80} - ¦ ¦ °--'}': } [1/0] {81} - ¦ °--')': ) [1/0] {82} - ¦--COMMENT: ## . [2/0] {83} - ¦--COMMENT: ## s [1/0] {84} - ¦--COMMENT: # not [2/0] {85} - ¦--expr: call( [1/0] {86} - ¦ ¦--expr: call [0/0] {88} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {87} - ¦ ¦--'(': ( [0/0] {89} - ¦ ¦--expr: {{ x [0/0] {90} - ¦ ¦ ¦--'{': { [0/0] {91} - ¦ ¦ ¦--expr: { x } [0/0] {92} - ¦ ¦ ¦ ¦--'{': { [0/1] {93} - ¦ ¦ ¦ ¦--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: call( [1/0] {100} - ¦ ¦--expr: call [0/0] {102} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {101} - ¦ ¦--'(': ( [0/0] {103} - ¦ ¦--expr: { { x [0/0] {104} - ¦ ¦ ¦--'{': { [0/1] {105} - ¦ ¦ ¦--expr: { x } [0/0] {106} - ¦ ¦ ¦ ¦--'{': { [0/1] {107} - ¦ ¦ ¦ ¦--expr: x [0/1] {109} - ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {108} - ¦ ¦ ¦ °--'}': } [0/0] {110} - ¦ ¦ °--'}': } [0/0] {111} - ¦ °--')': ) [0/0] {112} - ¦--expr: call( [1/0] {113} - ¦ ¦--expr: call [0/0] {115} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {114} - ¦ ¦--'(': ( [0/0] {116} - ¦ ¦--expr: { { x [0/1] {117} - ¦ ¦ ¦--'{': { [0/1] {118} - ¦ ¦ ¦--expr: { x } [0/0] {119} - ¦ ¦ ¦ ¦--'{': { [0/1] {120} - ¦ ¦ ¦ ¦--expr: x [0/1] {122} - ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {121} - ¦ ¦ ¦ °--'}': } [0/0] {123} - ¦ ¦ °--'}': } [0/0] {124} - ¦ °--')': ) [0/0] {125} - ¦--expr: call( [1/0] {126} - ¦ ¦--expr: call [0/0] {128} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {127} - ¦ ¦--'(': ( [0/1] {129} - ¦ ¦--expr: { { x [0/0] {130} - ¦ ¦ ¦--'{': { [0/1] {131} - ¦ ¦ ¦--expr: { x } [0/0] {132} - ¦ ¦ ¦ ¦--'{': { [0/1] {133} - ¦ ¦ ¦ ¦--expr: x [0/1] {135} - ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {134} - ¦ ¦ ¦ °--'}': } [0/0] {136} - ¦ ¦ °--'}': } [0/0] {137} - ¦ °--')': ) [0/0] {138} - ¦--expr: call( [1/0] {139} - ¦ ¦--expr: call [0/0] {141} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {140} - ¦ ¦--'(': ( [0/1] {142} - ¦ ¦--expr: { { x [0/0] {143} - ¦ ¦ ¦--'{': { [0/1] {144} - ¦ ¦ ¦--expr: { x } [0/1] {145} - ¦ ¦ ¦ ¦--'{': { [0/1] {146} - ¦ ¦ ¦ ¦--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: call( [1/0] {153} - ¦ ¦--expr: call [0/0] {155} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {154} - ¦ ¦--'(': ( [0/0] {156} - ¦ ¦--expr: {{x } [0/0] {157} - ¦ ¦ ¦--'{': { [0/0] {158} - ¦ ¦ ¦--expr: {x } [0/0] {159} - ¦ ¦ ¦ ¦--'{': { [0/0] {160} - ¦ ¦ ¦ ¦--expr: x [0/1] {162} - ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {161} - ¦ ¦ ¦ °--'}': } [0/0] {163} - ¦ ¦ °--'}': } [0/0] {164} - ¦ °--')': ) [0/0] {165} - ¦--expr: call( [1/0] {166} - ¦ ¦--expr: call [0/0] {168} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {167} - ¦ ¦--'(': ( [0/0] {169} - ¦ ¦--expr: {{x}} [0/0] {170} - ¦ ¦ ¦--'{': { [0/0] {171} - ¦ ¦ ¦--expr: {x} [0/0] {172} - ¦ ¦ ¦ ¦--'{': { [0/0] {173} - ¦ ¦ ¦ ¦--expr: x [0/0] {175} - ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {174} - ¦ ¦ ¦ °--'}': } [0/0] {176} - ¦ ¦ °--'}': } [0/0] {177} - ¦ °--')': ) [0/0] {178} - ¦--expr: call( [1/0] {179} - ¦ ¦--expr: call [0/0] {181} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {180} - ¦ ¦--'(': ( [0/0] {182} - ¦ ¦--expr: {{ x} [0/0] {183} - ¦ ¦ ¦--'{': { [0/0] {184} - ¦ ¦ ¦--expr: { x} [0/0] {185} - ¦ ¦ ¦ ¦--'{': { [0/1] {186} - ¦ ¦ ¦ ¦--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: call( [1/0] {193} - ¦ ¦--expr: call [0/0] {195} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {194} - ¦ ¦--'(': ( [0/0] {196} - ¦ ¦--expr: {{ x [0/0] {197} - ¦ ¦ ¦--'{': { [0/0] {198} - ¦ ¦ ¦--expr: { x } [0/0] {199} - ¦ ¦ ¦ ¦--'{': { [0/1] {200} - ¦ ¦ ¦ ¦--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: call( [1/0] {207} - ¦ ¦--expr: call [0/0] {209} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {208} - ¦ ¦--'(': ( [0/0] {210} - ¦ ¦--expr: {{ x} [0/0] {211} - ¦ ¦ ¦--'{': { [0/0] {212} - ¦ ¦ ¦--expr: { x} [0/2] {213} - ¦ ¦ ¦ ¦--'{': { [0/1] {214} - ¦ ¦ ¦ ¦--expr: x [0/0] {216} - ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {215} - ¦ ¦ ¦ °--'}': } [0/0] {217} - ¦ ¦ °--'}': } [1/0] {218} - ¦ °--')': ) [0/0] {219} - ¦--expr: call( [2/0] {220} - ¦ ¦--expr: call [0/0] {222} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {221} - ¦ ¦--'(': ( [0/0] {223} - ¦ ¦--expr: { - { [0/0] {224} - ¦ ¦ ¦--'{': { [0/2] {225} - ¦ ¦ ¦--expr: { x} [1/0] {226} - ¦ ¦ ¦ ¦--'{': { [0/1] {227} - ¦ ¦ ¦ ¦--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: { - y [1/0] {234} - ¦ ¦--'{': { [0/2] {235} - ¦ ¦--expr: y [1/0] {237} - ¦ ¦ °--SYMBOL: y [0/0] {236} - ¦ °--'}': } [1/0] {238} - ¦--expr: { 1 + [1/0] {239} - ¦ ¦--'{': { [0/1] {240} - ¦ ¦--expr: 1 + 1 [0/0] {241} - ¦ ¦ ¦--expr: 1 [0/1] {243} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {242} - ¦ ¦ ¦--'+': + [0/1] {244} - ¦ ¦ °--expr: 1 [0/0] {246} - ¦ ¦ °--NUM_CONST: 1 [0/0] {245} - ¦ °--'}': } [0/0] {247} - ¦--expr: {{1 + [1/1] {248} - ¦ ¦--'{': { [0/0] {249} - ¦ ¦--expr: {1 + [0/0] {250} - ¦ ¦ ¦--expr: {1 + [0/1] {251} - ¦ ¦ ¦ ¦--'{': { [0/0] {252} - ¦ ¦ ¦ ¦--expr: 1 + a [0/0] {253} - ¦ ¦ ¦ ¦ ¦--expr: 1 [0/1] {255} - ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {254} - ¦ ¦ ¦ ¦ ¦--'+': + [0/1] {256} - ¦ ¦ ¦ ¦ °--expr: a [0/0] {258} - ¦ ¦ ¦ ¦ °--SYMBOL: a [0/0] {257} - ¦ ¦ ¦ °--'}': } [0/0] {259} - ¦ ¦ ¦--'+': + [0/1] {260} - ¦ ¦ °--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: call( [1/0] {267} - ¦ ¦--expr: call [0/0] {269} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {268} - ¦ ¦--'(': ( [0/0] {270} - ¦ ¦--expr: "test [0/0] {272} - ¦ ¦ °--STR_CONST: "test [0/0] {271} - ¦ ¦--',': , [0/1] {273} - ¦ ¦--expr: { - 1 [0/0] {274} - ¦ ¦ ¦--'{': { [0/2] {275} - ¦ ¦ ¦--expr: 1 [1/0] {277} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {276} - ¦ ¦ °--'}': } [1/0] {278} - ¦ °--')': ) [0/0] {279} - ¦--expr: call( [2/0] {280} - ¦ ¦--expr: call [0/0] {282} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {281} - ¦ ¦--'(': ( [0/2] {283} - ¦ ¦--expr: "test [1/0] {285} - ¦ ¦ °--STR_CONST: "test [0/0] {284} - ¦ ¦--',': , [0/1] {286} - ¦ ¦--expr: { - 1 [0/0] {287} - ¦ ¦ ¦--'{': { [0/2] {288} - ¦ ¦ ¦--expr: 1 [1/0] {290} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {289} - ¦ ¦ °--'}': } [1/0] {291} - ¦ °--')': ) [0/0] {292} - ¦--expr: call( [2/0] {293} - ¦ ¦--expr: call [0/0] {295} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {294} - ¦ ¦--'(': ( [0/0] {296} - ¦ ¦--expr: "test [0/0] {298} - ¦ ¦ °--STR_CONST: "test [0/0] {297} - ¦ ¦--',': , [0/5] {299} - ¦ ¦--expr: { - [1/0] {300} - ¦ ¦ ¦--'{': { [0/4] {301} - ¦ ¦ ¦--expr: 1 [1/2] {303} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {302} - ¦ ¦ °--'}': } [1/0] {304} - ¦ °--')': ) [0/0] {305} - ¦--expr: call( [2/0] {306} - ¦ ¦--expr: call [0/0] {308} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {307} - ¦ ¦--'(': ( [0/0] {309} - ¦ ¦--expr: "test [0/0] {311} - ¦ ¦ °--STR_CONST: "test [0/0] {310} - ¦ ¦--',': , [0/1] {312} - ¦ ¦--expr: { - 1 [0/0] {313} - ¦ ¦ ¦--'{': { [0/2] {314} - ¦ ¦ ¦--expr: 1 [1/1] {316} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {315} - ¦ ¦ °--'}': } [0/0] {317} - ¦ °--')': ) [1/0] {318} - ¦--expr: call( [2/0] {319} - ¦ ¦--expr: call [0/0] {321} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {320} - ¦ ¦--'(': ( [0/0] {322} - ¦ ¦--expr: { - 1 [0/0] {323} - ¦ ¦ ¦--'{': { [0/2] {324} - ¦ ¦ ¦--expr: 1 [1/0] {326} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {325} - ¦ ¦ °--'}': } [1/0] {327} - ¦ ¦--',': , [0/1] {328} - ¦ ¦--expr: a + b [0/0] {329} - ¦ ¦ ¦--expr: a [0/1] {331} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {330} - ¦ ¦ ¦--'+': + [0/1] {332} - ¦ ¦ °--expr: b [0/0] {334} - ¦ ¦ °--SYMBOL: b [0/0] {333} - ¦ ¦--',': , [0/1] {335} - ¦ ¦--expr: { 33 [0/0] {336} - ¦ ¦ ¦--'{': { [0/1] {337} - ¦ ¦ ¦--expr: 33 / [0/0] {338} - ¦ ¦ ¦ ¦--expr: 33 [0/1] {340} - ¦ ¦ ¦ ¦ °--NUM_CONST: 33 [0/0] {339} - ¦ ¦ ¦ ¦--'/': / [0/1] {341} - ¦ ¦ ¦ °--expr: f(c) [0/0] {342} - ¦ ¦ ¦ ¦--expr: f [0/0] {344} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: f [0/0] {343} - ¦ ¦ ¦ ¦--'(': ( [0/0] {345} - ¦ ¦ ¦ ¦--expr: c [0/0] {347} - ¦ ¦ ¦ ¦ °--SYMBOL: c [0/0] {346} - ¦ ¦ ¦ °--')': ) [0/0] {348} - ¦ ¦ °--'}': } [0/0] {349} - ¦ °--')': ) [0/0] {350} - ¦--expr: call( [2/0] {351} - ¦ ¦--expr: call [0/0] {353} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {352} - ¦ ¦--'(': ( [0/0] {354} - ¦ ¦--expr: {{ x [0/0] {355} - ¦ ¦ ¦--'{': { [0/0] {356} - ¦ ¦ ¦--expr: { x } [0/0] {357} - ¦ ¦ ¦ ¦--'{': { [0/1] {358} - ¦ ¦ ¦ ¦--expr: x [0/1] {360} - ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {359} - ¦ ¦ ¦ °--'}': } [0/0] {361} - ¦ ¦ °--'}': } [0/0] {362} - ¦ ¦--',': , [0/1] {363} - ¦ ¦--expr: {{ y} [0/0] {364} - ¦ ¦ ¦--'{': { [0/0] {365} - ¦ ¦ ¦--expr: { y} [0/0] {366} - ¦ ¦ ¦ ¦--'{': { [0/1] {367} - ¦ ¦ ¦ ¦--expr: y [0/0] {369} - ¦ ¦ ¦ ¦ °--SYMBOL: y [0/0] {368} - ¦ ¦ ¦ °--'}': } [0/0] {370} - ¦ ¦ °--'}': } [0/0] {371} - ¦ °--')': ) [0/0] {372} - ¦--expr: call( [1/0] {373} - ¦ ¦--expr: call [0/0] {375} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {374} - ¦ ¦--'(': ( [0/0] {376} - ¦ ¦--expr: {{ x [0/0] {377} - ¦ ¦ ¦--'{': { [0/0] {378} - ¦ ¦ ¦--expr: { x } [0/0] {379} - ¦ ¦ ¦ ¦--'{': { [0/1] {380} - ¦ ¦ ¦ ¦--expr: x [0/1] {382} - ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {381} - ¦ ¦ ¦ °--'}': } [0/0] {383} - ¦ ¦ °--'}': } [0/0] {384} - ¦ ¦--',': , [0/1] {385} - ¦ ¦--expr: {{ y} [0/0] {386} - ¦ ¦ ¦--'{': { [0/0] {387} - ¦ ¦ ¦--expr: { y} [0/2] {388} - ¦ ¦ ¦ ¦--'{': { [0/1] {389} - ¦ ¦ ¦ ¦--expr: y [0/0] {391} - ¦ ¦ ¦ ¦ °--SYMBOL: y [0/0] {390} - ¦ ¦ ¦ °--'}': } [0/0] {392} - ¦ ¦ °--'}': } [1/0] {393} - ¦ °--')': ) [0/0] {394} - ¦--expr: call( [1/0] {395} - ¦ ¦--expr: call [0/0] {397} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {396} - ¦ ¦--'(': ( [0/2] {398} - ¦ ¦--expr: {{ x [1/0] {399} - ¦ ¦ ¦--'{': { [0/0] {400} - ¦ ¦ ¦--expr: { x } [0/0] {401} - ¦ ¦ ¦ ¦--'{': { [0/1] {402} - ¦ ¦ ¦ ¦--expr: x [0/1] {404} - ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {403} - ¦ ¦ ¦ °--'}': } [0/0] {405} - ¦ ¦ °--'}': } [0/0] {406} - ¦ ¦--',': , [0/1] {407} - ¦ ¦--expr: {{ y} [0/0] {408} - ¦ ¦ ¦--'{': { [0/0] {409} - ¦ ¦ ¦--expr: { y} [0/0] {410} - ¦ ¦ ¦ ¦--'{': { [0/1] {411} - ¦ ¦ ¦ ¦--expr: y [0/0] {413} - ¦ ¦ ¦ ¦ °--SYMBOL: y [0/0] {412} - ¦ ¦ ¦ °--'}': } [0/0] {414} - ¦ ¦ °--'}': } [0/0] {415} - ¦ °--')': ) [0/0] {416} - ¦--expr: call( [2/0] {417} - ¦ ¦--expr: call [0/0] {419} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {418} - ¦ ¦--'(': ( [0/2] {420} - ¦ ¦--expr: {{ x [1/0] {421} - ¦ ¦ ¦--'{': { [0/0] {422} - ¦ ¦ ¦--expr: { x } [0/0] {423} - ¦ ¦ ¦ ¦--'{': { [0/1] {424} - ¦ ¦ ¦ ¦--expr: x [0/1] {426} - ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {425} - ¦ ¦ ¦ °--'}': } [0/0] {427} - ¦ ¦ °--'}': } [0/0] {428} - ¦ ¦--',': , [0/2] {429} - ¦ ¦--expr: {{ y} [1/0] {430} - ¦ ¦ ¦--expr: {{ y} [0/1] {431} - ¦ ¦ ¦ ¦--'{': { [0/0] {432} - ¦ ¦ ¦ ¦--expr: { y} [0/0] {433} - ¦ ¦ ¦ ¦ ¦--'{': { [0/1] {434} - ¦ ¦ ¦ ¦ ¦--expr: y [0/0] {436} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL: y [0/0] {435} - ¦ ¦ ¦ ¦ °--'}': } [0/0] {437} - ¦ ¦ ¦ °--'}': } [0/0] {438} - ¦ ¦ ¦--LEFT_ASSIGN: := [0/1] {439} - ¦ ¦ °--expr: 3 [0/0] {441} - ¦ ¦ °--NUM_CONST: 3 [0/0] {440} - ¦ ¦--',': , [0/1] {442} - ¦ ¦--expr: f(bk) [0/0] {443} - ¦ ¦ ¦--expr: f [0/0] {445} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: f [0/0] {444} - ¦ ¦ ¦--'(': ( [0/0] {446} - ¦ ¦ ¦--expr: bk [0/0] {448} - ¦ ¦ ¦ °--SYMBOL: bk [0/0] {447} - ¦ ¦ °--')': ) [0/0] {449} - ¦ °--')': ) [1/0] {450} - ¦--expr: call( [2/0] {451} - ¦ ¦--expr: call [0/0] {453} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {452} - ¦ ¦--'(': ( [0/0] {454} - ¦ ¦--expr: {{ - [0/0] {455} - ¦ ¦ ¦--'{': { [0/0] {456} - ¦ ¦ ¦--expr: { - # [0/0] {457} - ¦ ¦ ¦ ¦--'{': { [0/2] {458} - ¦ ¦ ¦ ¦--COMMENT: # [1/2] {459} - ¦ ¦ ¦ ¦--expr: 1 [1/0] {461} - ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {460} - ¦ ¦ ¦ °--'}': } [1/0] {462} - ¦ ¦ °--'}': } [0/0] {463} - ¦ °--')': ) [0/0] {464} - ¦--expr: call( [2/0] {465} - ¦ ¦--expr: call [0/0] {467} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {466} - ¦ ¦--'(': ( [0/0] {468} - ¦ ¦--expr: {{ - [0/0] {469} - ¦ ¦ ¦--'{': { [0/0] {470} - ¦ ¦ ¦--expr: { - # [0/0] {471} - ¦ ¦ ¦ ¦--'{': { [0/2] {472} - ¦ ¦ ¦ ¦--COMMENT: # [1/0] {473} - ¦ ¦ ¦ °--'}': } [1/0] {474} - ¦ ¦ °--'}': } [0/0] {475} - ¦ °--')': ) [0/0] {476} - °--expr: {{ - [3/0] {477} - ¦--'{': { [0/0] {478} - ¦--expr: { - # [0/0] {479} - ¦ ¦--'{': { [0/2] {480} - ¦ ¦--COMMENT: # [1/0] {481} - ¦ °--'}': } [1/0] {482} - °--'}': } [0/0] {483} diff --git a/tests/testthat/escaping/basic-escape-in_tree b/tests/testthat/escaping/basic-escape-in_tree deleted file mode 100644 index 8083077fa..000000000 --- a/tests/testthat/escaping/basic-escape-in_tree +++ /dev/null @@ -1,61 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: #' th [0/0] {1} - ¦--COMMENT: #' [1/0] {2} - ¦--COMMENT: #' @e [1/0] {3} - ¦--COMMENT: #' ca [1/0] {4} - ¦--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: 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: 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: NULL [1/0] {26} - ¦ °--NULL_CONST: NULL [0/0] {25} - ¦--expr: 'sing [2/0] {28} - ¦ °--STR_CONST: 'sing [0/0] {27} - ¦--expr: x <- [2/1] {29} - ¦ ¦--expr: x [0/1] {31} - ¦ ¦ °--SYMBOL: x [0/0] {30} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {32} - ¦ °--expr: ' 2' [0/0] {34} - ¦ °--STR_CONST: ' 2' [0/0] {33} - ¦--COMMENT: # the [0/0] {35} - ¦--expr: x <- [2/0] {36} - ¦ ¦--expr: x [0/1] {38} - ¦ ¦ °--SYMBOL: x [0/0] {37} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {39} - ¦ °--expr: '\001 [0/0] {41} - ¦ °--STR_CONST: '\001 [0/0] {40} - ¦--expr: '\x01 [1/0] {43} - ¦ °--STR_CONST: '\x01 [0/0] {42} - ¦--expr: "\001 [2/0] {45} - ¦ °--STR_CONST: "\001 [0/0] {44} - ¦--expr: '\001 [1/0] {47} - ¦ °--STR_CONST: '\001 [0/0] {46} - ¦--COMMENT: #' th [2/0] {48} - ¦--COMMENT: #' [1/0] {49} - ¦--COMMENT: #' @e [1/0] {50} - ¦--COMMENT: #' ca [1/0] {51} - ¦--COMMENT: #' an [1/0] {52} - ¦--expr: NULL [1/0] {54} - ¦ °--NULL_CONST: NULL [0/0] {53} - ¦--COMMENT: #' th [2/0] {55} - ¦--COMMENT: #' [1/0] {56} - ¦--COMMENT: #' @e [1/0] {57} - ¦--COMMENT: #' an [1/0] {58} - °--expr: NULL [1/0] {60} - °--NULL_CONST: NULL [0/0] {59} diff --git a/tests/testthat/escaping/fail-parsing-1-in_tree b/tests/testthat/escaping/fail-parsing-1-in_tree deleted file mode 100644 index 120f4b968..000000000 --- a/tests/testthat/escaping/fail-parsing-1-in_tree +++ /dev/null @@ -1,9 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: #' Ex [0/0] {1} - ¦--COMMENT: #' [1/0] {2} - ¦--COMMENT: #' @e [1/0] {3} - ¦--COMMENT: #' fu [1/0] {4} - ¦--COMMENT: #' [1/0] {5} - ¦--COMMENT: #' } [1/0] {6} - °--expr: NULL [1/0] {8} - °--NULL_CONST: NULL [0/0] {7} diff --git a/tests/testthat/escaping/fail-parsing-2-in_tree b/tests/testthat/escaping/fail-parsing-2-in_tree deleted file mode 100644 index 3ca043b45..000000000 --- a/tests/testthat/escaping/fail-parsing-2-in_tree +++ /dev/null @@ -1,7 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: #' Ex [0/0] {1} - ¦--COMMENT: #' [1/0] {2} - ¦--COMMENT: #' @e [1/0] {3} - ¦--COMMENT: #' x [1/0] {4} - °--expr: NULL [1/0] {6} - °--NULL_CONST: NULL [0/0] {5} diff --git a/tests/testthat/escaping/fail-parsing-3-in_tree b/tests/testthat/escaping/fail-parsing-3-in_tree deleted file mode 100644 index 3d33838b7..000000000 --- a/tests/testthat/escaping/fail-parsing-3-in_tree +++ /dev/null @@ -1,7 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: #' Ex [0/0] {1} - ¦--COMMENT: #' [1/0] {2} - ¦--COMMENT: #' @e [1/0] {3} - ¦--COMMENT: #' 1 [1/0] {4} - °--expr: NULL [1/0] {6} - °--NULL_CONST: NULL [0/0] {5} diff --git a/tests/testthat/escaping/fail-parsing-4-in_tree b/tests/testthat/escaping/fail-parsing-4-in_tree deleted file mode 100644 index 3d33838b7..000000000 --- a/tests/testthat/escaping/fail-parsing-4-in_tree +++ /dev/null @@ -1,7 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: #' Ex [0/0] {1} - ¦--COMMENT: #' [1/0] {2} - ¦--COMMENT: #' @e [1/0] {3} - ¦--COMMENT: #' 1 [1/0] {4} - °--expr: NULL [1/0] {6} - °--NULL_CONST: NULL [0/0] {5} diff --git a/tests/testthat/fun_dec/fun_dec_scope_spaces-in_tree b/tests/testthat/fun_dec/fun_dec_scope_spaces-in_tree deleted file mode 100644 index 4fad90015..000000000 --- a/tests/testthat/fun_dec/fun_dec_scope_spaces-in_tree +++ /dev/null @@ -1,83 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: a <- [0/0] {1} - ¦ ¦--expr: a [0/1] {3} - ¦ ¦ °--SYMBOL: a [0/0] {2} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {4} - ¦ °--expr: funct [0/0] {5} - ¦ ¦--FUNCTION: funct [0/0] {6} - ¦ ¦--'(': ( [0/0] {7} - ¦ ¦--SYMBOL_FORMALS: x [0/0] {8} - ¦ ¦--',': , [0/1] {9} - ¦ ¦--COMMENT: # [0/0] {10} - ¦ ¦--SYMBOL_FORMALS: y [1/0] {11} - ¦ ¦--')': ) [1/1] {12} - ¦ °--expr: { - x [0/0] {13} - ¦ ¦--'{': { [0/2] {14} - ¦ ¦--expr: x - 1 [1/0] {15} - ¦ ¦ ¦--expr: x [0/1] {17} - ¦ ¦ ¦ °--SYMBOL: x [0/0] {16} - ¦ ¦ ¦--'-': - [0/1] {18} - ¦ ¦ °--expr: 1 [0/0] {20} - ¦ ¦ °--NUM_CONST: 1 [0/0] {19} - ¦ °--'}': } [1/0] {21} - ¦--expr: a <- [3/0] {22} - ¦ ¦--expr: a [0/1] {24} - ¦ ¦ °--SYMBOL: a [0/0] {23} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {25} - ¦ °--expr: funct [0/0] {26} - ¦ ¦--FUNCTION: funct [0/0] {27} - ¦ ¦--'(': ( [0/0] {28} - ¦ ¦--SYMBOL_FORMALS: x [0/0] {29} - ¦ ¦--',': , [0/1] {30} - ¦ ¦--COMMENT: # [0/2] {31} - ¦ ¦--SYMBOL_FORMALS: y [1/0] {32} - ¦ ¦--')': ) [0/1] {33} - ¦ ¦--COMMENT: # [0/0] {34} - ¦ °--expr: { - x [1/0] {35} - ¦ ¦--'{': { [0/2] {36} - ¦ ¦--expr: x [1/0] {38} - ¦ ¦ °--SYMBOL: x [0/0] {37} - ¦ °--'}': } [1/0] {39} - ¦--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: 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} - ¦ ¦--'{': { [0/0] {51} - ¦ °--'}': } [0/0] {52} - ¦--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: 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} - ¦ ¦--'{': { [0/0] {64} - ¦ °--'}': } [2/0] {65} - °--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: 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} - ¦--'{': { [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 deleted file mode 100644 index 4c1378941..000000000 --- a/tests/testthat/fun_dec/line_break_fun_dec-in_tree +++ /dev/null @@ -1,168 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: a <- [0/0] {1} - ¦ ¦--expr: a [0/1] {3} - ¦ ¦ °--SYMBOL: a [0/0] {2} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {4} - ¦ °--expr: funct [0/0] {5} - ¦ ¦--FUNCTION: funct [0/0] {6} - ¦ ¦--'(': ( [0/0] {7} - ¦ ¦--SYMBOL_FORMALS: x [0/0] {8} - ¦ ¦--',': , [0/1] {9} - ¦ ¦--COMMENT: # [0/14] {10} - ¦ ¦--SYMBOL_FORMALS: y [1/0] {11} - ¦ ¦--')': ) [0/1] {12} - ¦ °--expr: { - x [0/0] {13} - ¦ ¦--'{': { [0/2] {14} - ¦ ¦--expr: x - 1 [1/0] {15} - ¦ ¦ ¦--expr: x [0/1] {17} - ¦ ¦ ¦ °--SYMBOL: x [0/0] {16} - ¦ ¦ ¦--'-': - [0/1] {18} - ¦ ¦ °--expr: 1 [0/0] {20} - ¦ ¦ °--NUM_CONST: 1 [0/0] {19} - ¦ °--'}': } [1/0] {21} - ¦--expr: a <- [3/0] {22} - ¦ ¦--expr: a [0/1] {24} - ¦ ¦ °--SYMBOL: a [0/0] {23} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {25} - ¦ °--expr: funct [0/0] {26} - ¦ ¦--FUNCTION: funct [0/0] {27} - ¦ ¦--'(': ( [0/0] {28} - ¦ ¦--SYMBOL_FORMALS: x [0/0] {29} - ¦ ¦--',': , [0/1] {30} - ¦ ¦--COMMENT: # [0/14] {31} - ¦ ¦--SYMBOL_FORMALS: y [1/0] {32} - ¦ ¦--')': ) [0/1] {33} - ¦ ¦--COMMENT: # [0/0] {34} - ¦ °--expr: { - x [1/0] {35} - ¦ ¦--'{': { [0/2] {36} - ¦ ¦--expr: x [1/0] {38} - ¦ ¦ °--SYMBOL: x [0/0] {37} - ¦ °--'}': } [1/0] {39} - ¦--expr: a <- [2/0] {40} - ¦ ¦--expr: a [0/1] {42} - ¦ ¦ °--SYMBOL: a [0/0] {41} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {43} - ¦ °--expr: funct [0/0] {44} - ¦ ¦--FUNCTION: funct [0/0] {45} - ¦ ¦--'(': ( [0/0] {46} - ¦ ¦--SYMBOL_FORMALS: x [0/0] {47} - ¦ ¦--',': , [0/1] {48} - ¦ ¦--COMMENT: # [0/14] {49} - ¦ ¦--SYMBOL_FORMALS: y [1/1] {50} - ¦ ¦--COMMENT: # [0/0] {51} - ¦ ¦--')': ) [1/1] {52} - ¦ °--expr: { - y [0/0] {53} - ¦ ¦--'{': { [0/2] {54} - ¦ ¦--expr: y [1/0] {56} - ¦ ¦ °--SYMBOL: y [0/0] {55} - ¦ °--'}': } [1/0] {57} - ¦--expr: a <- [3/0] {58} - ¦ ¦--expr: a [0/1] {60} - ¦ ¦ °--SYMBOL: a [0/0] {59} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {61} - ¦ °--expr: funct [0/0] {62} - ¦ ¦--FUNCTION: funct [0/0] {63} - ¦ ¦--'(': ( [0/0] {64} - ¦ ¦--SYMBOL_FORMALS: x [0/0] {65} - ¦ ¦--',': , [0/14] {66} - ¦ ¦--SYMBOL_FORMALS: y [1/0] {67} - ¦ ¦--')': ) [0/1] {68} - ¦ °--expr: { - x [0/0] {69} - ¦ ¦--'{': { [0/2] {70} - ¦ ¦--expr: x - 1 [1/0] {71} - ¦ ¦ ¦--expr: x [0/1] {73} - ¦ ¦ ¦ °--SYMBOL: x [0/0] {72} - ¦ ¦ ¦--'-': - [0/1] {74} - ¦ ¦ °--expr: 1 [0/0] {76} - ¦ ¦ °--NUM_CONST: 1 [0/0] {75} - ¦ °--'}': } [1/0] {77} - ¦--expr: a <- [2/0] {78} - ¦ ¦--expr: a [0/1] {80} - ¦ ¦ °--SYMBOL: a [0/0] {79} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {81} - ¦ °--expr: funct [0/0] {82} - ¦ ¦--FUNCTION: funct [0/0] {83} - ¦ ¦--'(': ( [0/0] {84} - ¦ ¦--SYMBOL_FORMALS: x [0/0] {85} - ¦ ¦--',': , [0/14] {86} - ¦ ¦--COMMENT: # [1/14] {87} - ¦ ¦--SYMBOL_FORMALS: y [1/0] {88} - ¦ ¦--')': ) [0/1] {89} - ¦ °--expr: { - x [0/0] {90} - ¦ ¦--'{': { [0/2] {91} - ¦ ¦--expr: x - 1 [1/0] {92} - ¦ ¦ ¦--expr: x [0/1] {94} - ¦ ¦ ¦ °--SYMBOL: x [0/0] {93} - ¦ ¦ ¦--'-': - [0/1] {95} - ¦ ¦ °--expr: 1 [0/0] {97} - ¦ ¦ °--NUM_CONST: 1 [0/0] {96} - ¦ °--'}': } [1/0] {98} - ¦--expr: a <- [2/0] {99} - ¦ ¦--expr: a [0/1] {101} - ¦ ¦ °--SYMBOL: a [0/0] {100} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {102} - ¦ °--expr: funct [0/0] {103} - ¦ ¦--FUNCTION: funct [0/0] {104} - ¦ ¦--'(': ( [0/0] {105} - ¦ ¦--SYMBOL_FORMALS: x [0/0] {106} - ¦ ¦--',': , [0/14] {107} - ¦ ¦--SYMBOL_FORMALS: y [2/0] {108} - ¦ ¦--')': ) [0/1] {109} - ¦ °--expr: { - x [0/0] {110} - ¦ ¦--'{': { [0/2] {111} - ¦ ¦--expr: x - 1 [1/0] {112} - ¦ ¦ ¦--expr: x [0/1] {114} - ¦ ¦ ¦ °--SYMBOL: x [0/0] {113} - ¦ ¦ ¦--'-': - [0/1] {115} - ¦ ¦ °--expr: 1 [0/0] {117} - ¦ ¦ °--NUM_CONST: 1 [0/0] {116} - ¦ °--'}': } [1/0] {118} - ¦--expr: a <- [3/0] {119} - ¦ ¦--expr: a [0/1] {121} - ¦ ¦ °--SYMBOL: a [0/0] {120} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {122} - ¦ °--expr: funct [0/0] {123} - ¦ ¦--FUNCTION: funct [0/0] {124} - ¦ ¦--'(': ( [0/14] {125} - ¦ ¦--SYMBOL_FORMALS: x [1/0] {126} - ¦ ¦--',': , [0/14] {127} - ¦ ¦--SYMBOL_FORMALS: y [1/0] {128} - ¦ ¦--')': ) [0/1] {129} - ¦ °--expr: { - x [0/0] {130} - ¦ ¦--'{': { [0/2] {131} - ¦ ¦--expr: x - 1 [1/0] {132} - ¦ ¦ ¦--expr: x [0/1] {134} - ¦ ¦ ¦ °--SYMBOL: x [0/0] {133} - ¦ ¦ ¦--'-': - [0/1] {135} - ¦ ¦ °--expr: 1 [0/0] {137} - ¦ ¦ °--NUM_CONST: 1 [0/0] {136} - ¦ °--'}': } [1/0] {138} - °--expr: a <- [2/0] {139} - ¦--expr: a [0/1] {141} - ¦ °--SYMBOL: a [0/0] {140} - ¦--LEFT_ASSIGN: <- [0/1] {142} - °--expr: funct [0/0] {143} - ¦--FUNCTION: funct [0/0] {144} - ¦--'(': ( [0/1] {145} - ¦--COMMENT: # [0/2] {146} - ¦--SYMBOL_FORMALS: x [1/0] {147} - ¦--',': , [0/2] {148} - ¦--SYMBOL_FORMALS: y [1/0] {149} - ¦--')': ) [0/1] {150} - °--expr: { - x [0/0] {151} - ¦--'{': { [0/2] {152} - ¦--expr: x - 1 [1/0] {153} - ¦ ¦--expr: x [0/1] {155} - ¦ ¦ °--SYMBOL: x [0/0] {154} - ¦ ¦--'-': - [0/1] {156} - ¦ °--expr: 1 [0/0] {158} - ¦ °--NUM_CONST: 1 [0/0] {157} - °--'}': } [1/0] {159} diff --git a/tests/testthat/fun_dec/line_break_fun_dec-out.R b/tests/testthat/fun_dec/line_break_fun_dec-out.R index f9d494561..f910b6b43 100644 --- a/tests/testthat/fun_dec/line_break_fun_dec-out.R +++ b/tests/testthat/fun_dec/line_break_fun_dec-out.R @@ -40,8 +40,9 @@ a <- function(x, } a <- function( - # - x, - y) { + # + x, + y +) { x - 1 } diff --git a/tests/testthat/indention_curly_brackets/custom-in_tree b/tests/testthat/indention_curly_brackets/custom-in_tree deleted file mode 100644 index 454cd1522..000000000 --- a/tests/testthat/indention_curly_brackets/custom-in_tree +++ /dev/null @@ -1,45 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: value [0/0] {1} - ¦ ¦--expr: value [0/1] {3} - ¦ ¦ °--SYMBOL: value [0/0] {2} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {4} - ¦ °--expr: 5 [0/0] {6} - ¦ °--NUM_CONST: 5 [0/0] {5} - ¦--expr: if (v [1/0] {7} - ¦ ¦--IF: if [0/1] {8} - ¦ ¦--'(': ( [0/0] {9} - ¦ ¦--expr: value [0/0] {10} - ¦ ¦ ¦--expr: value [0/1] {12} - ¦ ¦ ¦ °--SYMBOL: value [0/0] {11} - ¦ ¦ ¦--GT: > [0/1] {13} - ¦ ¦ °--expr: 0 [0/0] {15} - ¦ ¦ °--NUM_CONST: 0 [0/0] {14} - ¦ ¦--')': ) [0/4] {16} - ¦ °--expr: print [1/0] {17} - ¦ ¦--expr: print [0/0] {19} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: print [0/0] {18} - ¦ ¦--'(': ( [0/0] {20} - ¦ ¦--expr: value [0/0] {22} - ¦ ¦ °--SYMBOL: value [0/0] {21} - ¦ °--')': ) [0/0] {23} - °--expr: if (v [4/0] {24} - ¦--IF: if [0/1] {25} - ¦--'(': ( [0/0] {26} - ¦--expr: value [0/0] {27} - ¦ ¦--expr: value [0/1] {29} - ¦ ¦ °--SYMBOL: value [0/0] {28} - ¦ ¦--GT: > [0/1] {30} - ¦ °--expr: 0 [0/0] {32} - ¦ °--NUM_CONST: 0 [0/0] {31} - ¦--')': ) [0/1] {33} - °--expr: { -pri [0/0] {34} - ¦--'{': { [0/0] {35} - ¦--expr: print [1/0] {36} - ¦ ¦--expr: print [0/0] {38} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: print [0/0] {37} - ¦ ¦--'(': ( [0/0] {39} - ¦ ¦--expr: value [0/0] {41} - ¦ ¦ °--SYMBOL: value [0/0] {40} - ¦ °--')': ) [0/0] {42} - °--'}': } [1/0] {43} diff --git a/tests/testthat/indention_curly_brackets/custom-out.R b/tests/testthat/indention_curly_brackets/custom-out.R index f2612d575..f68775003 100644 --- a/tests/testthat/indention_curly_brackets/custom-out.R +++ b/tests/testthat/indention_curly_brackets/custom-out.R @@ -4,7 +4,6 @@ if (value > 0) { } - if (value > 0) { print(value) } diff --git a/tests/testthat/indention_curly_brackets/multi_line_curly_only-in.R b/tests/testthat/indention_curly_brackets/multi_line_curly_only-in.R index f06c54945..6f7e9c5b5 100644 --- a/tests/testthat/indention_curly_brackets/multi_line_curly_only-in.R +++ b/tests/testthat/indention_curly_brackets/multi_line_curly_only-in.R @@ -2,3 +2,13 @@ {1 + 3} {2 + sin(pi)} } + + { + + # some additions + {1 + 3} + {2 + sin(pi)} + + # nothing to see here + + } 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 deleted file mode 100644 index 1205a1a3f..000000000 --- a/tests/testthat/indention_curly_brackets/multi_line_curly_only-in_tree +++ /dev/null @@ -1,28 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: { - [0/0] {1} - ¦--'{': { [0/9] {2} - ¦--expr: {1 + [1/0] {3} - ¦ ¦--'{': { [0/0] {4} - ¦ ¦--expr: 1 + 3 [0/0] {5} - ¦ ¦ ¦--expr: 1 [0/1] {7} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {6} - ¦ ¦ ¦--'+': + [0/1] {8} - ¦ ¦ °--expr: 3 [0/0] {10} - ¦ ¦ °--NUM_CONST: 3 [0/0] {9} - ¦ °--'}': } [0/0] {11} - ¦--expr: {2 + [1/6] {12} - ¦ ¦--'{': { [0/0] {13} - ¦ ¦--expr: 2 + s [0/0] {14} - ¦ ¦ ¦--expr: 2 [0/1] {16} - ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {15} - ¦ ¦ ¦--'+': + [0/1] {17} - ¦ ¦ °--expr: sin(p [0/0] {18} - ¦ ¦ ¦--expr: sin [0/0] {20} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: sin [0/0] {19} - ¦ ¦ ¦--'(': ( [0/0] {21} - ¦ ¦ ¦--expr: pi [0/0] {23} - ¦ ¦ ¦ °--SYMBOL: pi [0/0] {22} - ¦ ¦ °--')': ) [0/0] {24} - ¦ °--'}': } [0/0] {25} - °--'}': } [1/0] {26} diff --git a/tests/testthat/indention_curly_brackets/multi_line_curly_only-out.R b/tests/testthat/indention_curly_brackets/multi_line_curly_only-out.R index b2db83528..9ad5a4c06 100644 --- a/tests/testthat/indention_curly_brackets/multi_line_curly_only-out.R +++ b/tests/testthat/indention_curly_brackets/multi_line_curly_only-out.R @@ -6,3 +6,15 @@ 2 + sin(pi) } } + +{ + # some additions + { + 1 + 3 + } + { + 2 + sin(pi) + } + + # nothing to see here +} 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 deleted file mode 100644 index 8c1eda02c..000000000 --- a/tests/testthat/indention_curly_brackets/multi_line_curly_round_only-in_tree +++ /dev/null @@ -1,62 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: a <- [0/0] {1} - ¦--expr: a [0/1] {3} - ¦ °--SYMBOL: a [0/0] {2} - ¦--LEFT_ASSIGN: <- [0/1] {4} - °--expr: funct [0/0] {5} - ¦--FUNCTION: funct [0/0] {6} - ¦--'(': ( [0/0] {7} - ¦--SYMBOL_FORMALS: x [0/0] {8} - ¦--')': ) [0/1] {9} - °--expr: { -x < [0/0] {10} - ¦--'{': { [0/0] {11} - ¦--expr: x <- [1/0] {12} - ¦ ¦--expr: x [0/1] {14} - ¦ ¦ °--SYMBOL: x [0/0] {13} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {15} - ¦ °--expr: c(1, - [0/0] {16} - ¦ ¦--expr: c [0/0] {18} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {17} - ¦ ¦--'(': ( [0/0] {19} - ¦ ¦--expr: 1 [0/0] {21} - ¦ ¦ °--NUM_CONST: 1 [0/0] {20} - ¦ ¦--',': , [0/7] {22} - ¦ ¦--expr: 2 + 3 [1/0] {23} - ¦ ¦ ¦--expr: 2 [0/1] {25} - ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {24} - ¦ ¦ ¦--'+': + [0/1] {26} - ¦ ¦ °--expr: 3 [0/0] {28} - ¦ ¦ °--NUM_CONST: 3 [0/0] {27} - ¦ ¦--',': , [0/0] {29} - ¦ ¦--expr: sin(p [1/0] {30} - ¦ ¦ ¦--expr: sin [0/0] {32} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: sin [0/0] {31} - ¦ ¦ ¦--'(': ( [0/0] {33} - ¦ ¦ ¦--expr: pi [0/0] {35} - ¦ ¦ ¦ °--SYMBOL: pi [0/0] {34} - ¦ ¦ °--')': ) [0/0] {36} - ¦ °--')': ) [0/0] {37} - ¦--expr: if(x [2/8] {38} - ¦ ¦--IF: if [0/0] {39} - ¦ ¦--'(': ( [0/0] {40} - ¦ ¦--expr: x > 1 [0/0] {41} - ¦ ¦ ¦--expr: x [0/1] {43} - ¦ ¦ ¦ °--SYMBOL: x [0/0] {42} - ¦ ¦ ¦--GT: > [0/1] {44} - ¦ ¦ °--expr: 10 [0/0] {46} - ¦ ¦ °--NUM_CONST: 10 [0/0] {45} - ¦ ¦--')': ) [0/1] {47} - ¦ °--expr: { - [0/0] {48} - ¦ ¦--'{': { [0/4] {49} - ¦ ¦--expr: retur [1/16] {50} - ¦ ¦ ¦--expr: retur [0/0] {52} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: retur [0/0] {51} - ¦ ¦ ¦--'(': ( [0/0] {53} - ¦ ¦ ¦--expr: "done [0/0] {55} - ¦ ¦ ¦ °--STR_CONST: "done [0/0] {54} - ¦ ¦ °--')': ) [0/0] {56} - ¦ °--'}': } [1/0] {57} - °--'}': } [1/0] {58} 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 deleted file mode 100644 index 67285abef..000000000 --- a/tests/testthat/indention_curly_brackets/multi_line_curly_round_spacing-in_tree +++ /dev/null @@ -1,62 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: b<-fu [0/0] {1} - ¦--expr: b [0/0] {3} - ¦ °--SYMBOL: b [0/0] {2} - ¦--LEFT_ASSIGN: <- [0/0] {4} - °--expr: funct [0/0] {5} - ¦--FUNCTION: funct [0/0] {6} - ¦--'(': ( [0/0] {7} - ¦--SYMBOL_FORMALS: x [0/3] {8} - ¦--')': ) [0/0] {9} - °--expr: { - x [0/0] {10} - ¦--'{': { [0/2] {11} - ¦--expr: x <- [1/2] {12} - ¦ ¦--expr: x [0/1] {14} - ¦ ¦ °--SYMBOL: x [0/0] {13} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {15} - ¦ °--expr: c(1, - [0/0] {16} - ¦ ¦--expr: c [0/0] {18} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {17} - ¦ ¦--'(': ( [0/0] {19} - ¦ ¦--expr: 1 [0/0] {21} - ¦ ¦ °--NUM_CONST: 1 [0/0] {20} - ¦ ¦--',': , [0/19] {22} - ¦ ¦--expr: 2+ [1/0] {23} - ¦ ¦ ¦--expr: 2 [0/0] {25} - ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {24} - ¦ ¦ ¦--'+': + [0/5] {26} - ¦ ¦ °--expr: 3 [0/0] {28} - ¦ ¦ °--NUM_CONST: 3 [0/0] {27} - ¦ ¦--',': , [0/9] {29} - ¦ ¦--expr: sin(p [1/1] {30} - ¦ ¦ ¦--expr: sin [0/0] {32} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: sin [0/0] {31} - ¦ ¦ ¦--'(': ( [0/0] {33} - ¦ ¦ ¦--expr: pi [0/0] {35} - ¦ ¦ ¦ °--SYMBOL: pi [0/0] {34} - ¦ ¦ °--')': ) [0/0] {36} - ¦ °--')': ) [0/0] {37} - ¦--expr: if(x [2/20] {38} - ¦ ¦--IF: if [0/0] {39} - ¦ ¦--'(': ( [0/0] {40} - ¦ ¦--expr: x > 1 [0/0] {41} - ¦ ¦ ¦--expr: x [0/1] {43} - ¦ ¦ ¦ °--SYMBOL: x [0/0] {42} - ¦ ¦ ¦--GT: > [0/1] {44} - ¦ ¦ °--expr: 10 [0/0] {46} - ¦ ¦ °--NUM_CONST: 10 [0/0] {45} - ¦ ¦--')': ) [0/0] {47} - ¦ °--expr: { -ret [0/0] {48} - ¦ ¦--'{': { [0/0] {49} - ¦ ¦--expr: retur [1/2] {50} - ¦ ¦ ¦--expr: retur [0/0] {52} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: retur [0/0] {51} - ¦ ¦ ¦--'(': ( [0/0] {53} - ¦ ¦ ¦--expr: "done [0/0] {55} - ¦ ¦ ¦ °--STR_CONST: "done [0/0] {54} - ¦ ¦ °--')': ) [0/0] {56} - ¦ °--'}': } [1/0] {57} - °--'}': } [1/0] {58} diff --git a/tests/testthat/indention_curly_brackets/multi_line_curly_while_for_if_fun-in.R b/tests/testthat/indention_curly_brackets/multi_line_curly_while_for_if_fun-in.R index 6c37fe95f..09e5bc827 100644 --- a/tests/testthat/indention_curly_brackets/multi_line_curly_while_for_if_fun-in.R +++ b/tests/testthat/indention_curly_brackets/multi_line_curly_while_for_if_fun-in.R @@ -8,3 +8,18 @@ a <- function(x, y, z) { x[i] +1 } } + + +if ( + + require("logspline") && + require("rstanarm") + + + +) { + + NULL + + + } 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 deleted file mode 100644 index 99ff47e9c..000000000 --- a/tests/testthat/indention_curly_brackets/multi_line_curly_while_for_if_fun-in_tree +++ /dev/null @@ -1,89 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: a <- [0/0] {1} - ¦--expr: a [0/1] {3} - ¦ °--SYMBOL: a [0/0] {2} - ¦--LEFT_ASSIGN: <- [0/1] {4} - °--expr: funct [0/0] {5} - ¦--FUNCTION: funct [0/0] {6} - ¦--'(': ( [0/0] {7} - ¦--SYMBOL_FORMALS: x [0/0] {8} - ¦--',': , [0/1] {9} - ¦--SYMBOL_FORMALS: y [0/0] {10} - ¦--',': , [0/1] {11} - ¦--SYMBOL_FORMALS: z [0/0] {12} - ¦--')': ) [0/12] {13} - °--expr: { - w [0/0] {14} - ¦--'{': { [0/2] {15} - ¦--expr: while [1/6] {16} - ¦ ¦--WHILE: while [0/0] {17} - ¦ ¦--'(': ( [0/0] {18} - ¦ ¦--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: 2 [0/0] {25} - ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {24} - ¦ ¦ ¦--GT: > [0/1] {26} - ¦ ¦ °--expr: call( [0/0] {27} - ¦ ¦ ¦--expr: call [0/0] {29} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {28} - ¦ ¦ ¦--'(': ( [0/0] {30} - ¦ ¦ ¦--expr: 3 [0/0] {32} - ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {31} - ¦ ¦ ¦--',': , [0/0] {33} - ¦ ¦ ¦--expr: 1 [0/0] {35} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {34} - ¦ ¦ °--')': ) [0/0] {36} - ¦ ¦--')': ) [0/1] {37} - ¦ °--expr: { - [0/0] {38} - ¦ ¦--'{': { [0/4] {39} - ¦ ¦--expr: if (i [1/4] {40} - ¦ ¦ ¦--IF: if [0/1] {41} - ¦ ¦ ¦--'(': ( [0/0] {42} - ¦ ¦ ¦--expr: isTRU [0/0] {43} - ¦ ¦ ¦ ¦--expr: isTRU [0/0] {45} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: isTRU [0/0] {44} - ¦ ¦ ¦ ¦--'(': ( [0/0] {46} - ¦ ¦ ¦ ¦--expr: x [0/0] {48} - ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {47} - ¦ ¦ ¦ °--')': ) [0/0] {49} - ¦ ¦ ¦--')': ) [0/1] {50} - ¦ ¦ °--expr: { - [0/0] {51} - ¦ ¦ ¦--'{': { [0/6] {52} - ¦ ¦ ¦--expr: b [1/0] {54} - ¦ ¦ ¦ °--SYMBOL: b [0/0] {53} - ¦ ¦ °--'}': } [1/0] {55} - ¦ °--'}': } [1/0] {56} - ¦--expr: for(a [1/0] {57} - ¦ ¦--FOR: for [0/0] {58} - ¦ ¦--forcond: (a in [0/0] {59} - ¦ ¦ ¦--'(': ( [0/0] {60} - ¦ ¦ ¦--SYMBOL: a [0/1] {61} - ¦ ¦ ¦--IN: in [0/1] {62} - ¦ ¦ ¦--expr: 1:19 [0/0] {63} - ¦ ¦ ¦ ¦--expr: 1 [0/0] {65} - ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {64} - ¦ ¦ ¦ ¦--':': : [0/0] {66} - ¦ ¦ ¦ °--expr: 19 [0/0] {68} - ¦ ¦ ¦ °--NUM_CONST: 19 [0/0] {67} - ¦ ¦ °--')': ) [0/0] {69} - ¦ °--expr: { - [0/0] {70} - ¦ ¦--'{': { [0/4] {71} - ¦ ¦--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: i [0/0] {78} - ¦ ¦ ¦ ¦ °--SYMBOL: i [0/0] {77} - ¦ ¦ ¦ °--']': ] [0/0] {79} - ¦ ¦ ¦--'+': + [0/0] {80} - ¦ ¦ °--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/multi_line_curly_while_for_if_fun-out.R b/tests/testthat/indention_curly_brackets/multi_line_curly_while_for_if_fun-out.R index babdc4a26..f80ed3c8b 100644 --- a/tests/testthat/indention_curly_brackets/multi_line_curly_while_for_if_fun-out.R +++ b/tests/testthat/indention_curly_brackets/multi_line_curly_while_for_if_fun-out.R @@ -8,3 +8,11 @@ a <- function(x, y, z) { x[i] + 1 } } + + +if ( + require("logspline") && + require("rstanarm") +) { + NULL +} diff --git a/tests/testthat/indention_curly_brackets/one_line_curly-in_tree b/tests/testthat/indention_curly_brackets/one_line_curly-in_tree deleted file mode 100644 index 20ecfb8ac..000000000 --- a/tests/testthat/indention_curly_brackets/one_line_curly-in_tree +++ /dev/null @@ -1,14 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: a <- [0/0] {1} - ¦--expr: a [0/1] {3} - ¦ °--SYMBOL: a [0/0] {2} - ¦--LEFT_ASSIGN: <- [0/1] {4} - °--expr: {1+1} [0/0] {5} - ¦--'{': { [0/0] {6} - ¦--expr: 1+1 [0/0] {7} - ¦ ¦--expr: 1 [0/0] {9} - ¦ ¦ °--NUM_CONST: 1 [0/0] {8} - ¦ ¦--'+': + [0/0] {10} - ¦ °--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 deleted file mode 100644 index 1d50cd650..000000000 --- a/tests/testthat/indention_fun_calls/non_strict_calls-in_tree +++ /dev/null @@ -1,121 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: call( [0/0] {1} - ¦ ¦--expr: call [0/0] {3} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {2} - ¦ ¦--'(': ( [0/0] {4} - ¦ ¦--expr: a [0/0] {6} - ¦ ¦ °--SYMBOL: a [0/0] {5} - ¦ ¦--',': , [0/5] {7} - ¦ ¦--expr: b [1/0] {9} - ¦ ¦ °--SYMBOL: b [0/0] {8} - ¦ °--')': ) [0/0] {10} - ¦--expr: call( [2/0] {11} - ¦ ¦--expr: call [0/0] {13} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {12} - ¦ ¦--'(': ( [0/0] {14} - ¦ ¦--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: 3 [0/0] {21} - ¦ ¦ °--NUM_CONST: 3 [0/0] {20} - ¦ °--')': ) [0/0] {22} - ¦--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: 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: 3 [1/0] {35} - ¦ ¦ °--NUM_CONST: 3 [0/0] {34} - ¦ °--')': ) [0/0] {36} - ¦--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 [1/0] {44} - ¦ ¦ °--NUM_CONST: 1 [0/0] {43} - ¦ ¦--',': , [0/1] {45} - ¦ ¦--SYMBOL_SUB: b [0/1] {46} - ¦ ¦--EQ_SUB: = [0/1] {47} - ¦ ¦--expr: 3 [0/0] {49} - ¦ ¦ °--NUM_CONST: 3 [0/0] {48} - ¦ °--')': ) [0/0] {50} - ¦--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: 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: 3 [0/0] {63} - ¦ ¦ °--NUM_CONST: 3 [0/0] {62} - ¦ °--')': ) [1/0] {64} - ¦--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: 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: 3 [0/0] {77} - ¦ ¦ °--NUM_CONST: 3 [0/0] {76} - ¦ °--')': ) [1/0] {78} - ¦--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 [1/0] {86} - ¦ ¦ °--NUM_CONST: 1 [0/0] {85} - ¦ ¦--',': , [0/2] {87} - ¦ ¦--SYMBOL_SUB: b [1/1] {88} - ¦ ¦--EQ_SUB: = [0/1] {89} - ¦ ¦--expr: 3 [0/0] {91} - ¦ ¦ °--NUM_CONST: 3 [0/0] {90} - ¦ °--')': ) [1/0] {92} - ¦--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 [1/0] {100} - ¦ ¦ °--NUM_CONST: 1 [0/0] {99} - ¦ ¦--',': , [0/1] {101} - ¦ ¦--SYMBOL_SUB: b [0/1] {102} - ¦ ¦--EQ_SUB: = [0/1] {103} - ¦ ¦--expr: 3 [0/0] {105} - ¦ ¦ °--NUM_CONST: 3 [0/0] {104} - ¦ °--')': ) [1/0] {106} - °--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 [1/0] {114} - ¦ °--NUM_CONST: 1 [0/0] {113} - ¦--',': , [0/1] {115} - ¦--SYMBOL_SUB: b [0/1] {116} - ¦--EQ_SUB: = [0/4] {117} - ¦--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 deleted file mode 100644 index 36a0c9a05..000000000 --- a/tests/testthat/indention_fun_calls/strict_calls-in_tree +++ /dev/null @@ -1,28 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: call( [0/0] {1} - ¦--expr: call [0/0] {3} - ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {2} - ¦--'(': ( [0/0] {4} - ¦--expr: call( [1/3] {5} - ¦ ¦--expr: call [0/0] {7} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {6} - ¦ ¦--'(': ( [0/3] {8} - ¦ ¦--expr: call( [1/0] {9} - ¦ ¦ ¦--expr: call [0/0] {11} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {10} - ¦ ¦ ¦--'(': ( [0/0] {12} - ¦ ¦ ¦--expr: call( [1/3] {13} - ¦ ¦ ¦ ¦--expr: call [0/0] {15} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {14} - ¦ ¦ ¦ ¦--'(': ( [0/10] {16} - ¦ ¦ ¦ ¦--expr: call( [1/0] {17} - ¦ ¦ ¦ ¦ ¦--expr: call [0/0] {19} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {18} - ¦ ¦ ¦ ¦ ¦--'(': ( [0/5] {20} - ¦ ¦ ¦ ¦ ¦--expr: 2 [1/3] {22} - ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {21} - ¦ ¦ ¦ ¦ °--')': ) [1/0] {23} - ¦ ¦ ¦ °--')': ) [1/0] {24} - ¦ ¦ °--')': ) [1/0] {25} - ¦ °--')': ) [1/0] {26} - °--')': ) [1/0] {27} diff --git a/tests/testthat/indention_multiple/curly_and_round-in_tree b/tests/testthat/indention_multiple/curly_and_round-in_tree deleted file mode 100644 index 48acfd1c0..000000000 --- a/tests/testthat/indention_multiple/curly_and_round-in_tree +++ /dev/null @@ -1,97 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: test_ [0/0] {1} - ¦ ¦--expr: test_ [0/0] {3} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: test_ [0/0] {2} - ¦ ¦--'(': ( [0/0] {4} - ¦ ¦--expr: "this [0/0] {6} - ¦ ¦ °--STR_CONST: "this [0/0] {5} - ¦ ¦--',': , [0/1] {7} - ¦ ¦--expr: { - t [0/0] {8} - ¦ ¦ ¦--'{': { [0/2] {9} - ¦ ¦ ¦--expr: test( [1/0] {10} - ¦ ¦ ¦ ¦--expr: test [0/0] {12} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: test [0/0] {11} - ¦ ¦ ¦ ¦--'(': ( [0/0] {13} - ¦ ¦ ¦ ¦--expr: x [0/0] {15} - ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {14} - ¦ ¦ ¦ ¦--',': , [0/1] {16} - ¦ ¦ ¦ ¦--expr: y [0/0] {18} - ¦ ¦ ¦ ¦ °--SYMBOL: y [0/0] {17} - ¦ ¦ ¦ ¦--',': , [0/1] {19} - ¦ ¦ ¦ ¦--expr: call( [0/0] {20} - ¦ ¦ ¦ ¦ ¦--expr: call [0/0] {22} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {21} - ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {23} - ¦ ¦ ¦ ¦ ¦--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} - ¦ ¦--'(': ( [0/0] {31} - ¦ ¦--expr: ({{ - [0/0] {32} - ¦ ¦ ¦--'(': ( [0/0] {33} - ¦ ¦ ¦--expr: {{ - [0/0] {34} - ¦ ¦ ¦ ¦--'{': { [0/0] {35} - ¦ ¦ ¦ ¦--expr: { - c [0/0] {36} - ¦ ¦ ¦ ¦ ¦--'{': { [0/2] {37} - ¦ ¦ ¦ ¦ ¦--expr: call( [1/0] {38} - ¦ ¦ ¦ ¦ ¦ ¦--expr: call [0/0] {40} - ¦ ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {39} - ¦ ¦ ¦ ¦ ¦ ¦--'(': ( [0/4] {41} - ¦ ¦ ¦ ¦ ¦ ¦--expr: 12 [1/0] {43} - ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 12 [0/0] {42} - ¦ ¦ ¦ ¦ ¦ ¦--',': , [0/1] {44} - ¦ ¦ ¦ ¦ ¦ ¦--expr: 1 + 1 [0/0] {45} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: 1 [0/1] {47} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {46} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--'+': + [0/1] {48} - ¦ ¦ ¦ ¦ ¦ ¦ °--expr: 1 [0/0] {50} - ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {49} - ¦ ¦ ¦ ¦ ¦ ¦--',': , [0/4] {51} - ¦ ¦ ¦ ¦ ¦ ¦--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} - ¦--'(': ( [0/0] {60} - ¦--expr: ({{ - [0/0] {61} - ¦ ¦--'(': ( [0/0] {62} - ¦ ¦--expr: {{ - [0/0] {63} - ¦ ¦ ¦--'{': { [0/0] {64} - ¦ ¦ ¦--expr: { - c [0/0] {65} - ¦ ¦ ¦ ¦--'{': { [0/2] {66} - ¦ ¦ ¦ ¦--expr: call( [1/0] {67} - ¦ ¦ ¦ ¦ ¦--expr: call [0/0] {69} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {68} - ¦ ¦ ¦ ¦ ¦--'(': ( [0/4] {70} - ¦ ¦ ¦ ¦ ¦--expr: 12 [1/0] {72} - ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 12 [0/0] {71} - ¦ ¦ ¦ ¦ ¦--',': , [0/1] {73} - ¦ ¦ ¦ ¦ ¦--expr: 1 + 1 [0/0] {74} - ¦ ¦ ¦ ¦ ¦ ¦--expr: 1 [0/1] {76} - ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {75} - ¦ ¦ ¦ ¦ ¦ ¦--'+': + [0/1] {77} - ¦ ¦ ¦ ¦ ¦ °--expr: 1 [0/0] {79} - ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {78} - ¦ ¦ ¦ ¦ ¦--',': , [0/4] {80} - ¦ ¦ ¦ ¦ ¦--expr: 26 [1/2] {82} - ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 26 [0/0] {81} - ¦ ¦ ¦ ¦ °--')': ) [1/0] {83} - ¦ ¦ ¦ °--'}': } [1/0] {84} - ¦ ¦ °--'}': } [0/0] {85} - ¦ °--')': ) [0/0] {86} - °--')': ) [0/0] {87} diff --git a/tests/testthat/indention_multiple/curly_and_round_in_tree b/tests/testthat/indention_multiple/curly_and_round_in_tree deleted file mode 100644 index 018fd320a..000000000 --- a/tests/testthat/indention_multiple/curly_and_round_in_tree +++ /dev/null @@ -1,61 +0,0 @@ -ROOT (token: short_text [newlines/spaces]) - ¦--expr: [2/8] - ¦ ¦--expr: [0/0] - ¦ ¦ ¦--'{': { [1/0] - ¦ ¦ ¦--expr: [1/3] - ¦ ¦ ¦ ¦--expr: [0/0] - ¦ ¦ ¦ ¦ ¦--expr: [0/0] - ¦ ¦ ¦ ¦ ¦ °--SYMBOL: z [0/0] - ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] - ¦ ¦ ¦ ¦ °--')': ) [0/0] - ¦ ¦ ¦ ¦--'(': ( [0/0] - ¦ ¦ ¦ ¦--',': , [0/1] - ¦ ¦ ¦ °--')': ) [0/0] - ¦ ¦ °--'}': } [0/0] - ¦ ¦--'(': ( [0/0] - ¦ ¦--',': , [0/1] - ¦ °--')': ) [0/0] - ¦--expr: [3/2] - ¦ ¦--'(': ( [0/0] - ¦ ¦--expr: [0/0] - ¦ ¦ ¦--'(': ( [0/0] - ¦ ¦ ¦--expr: [0/0] - ¦ ¦ ¦ ¦--'{': { [0/0] - ¦ ¦ ¦ ¦--expr: [0/0] - ¦ ¦ ¦ ¦ ¦--'{': { [1/2] - ¦ ¦ ¦ ¦ ¦--expr: [1/3] - ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/0] - ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 26 [0/0] - ¦ ¦ ¦ ¦ ¦ ¦--'(': ( [1/2] - ¦ ¦ ¦ ¦ ¦ ¦--',': , [0/1] - ¦ ¦ ¦ ¦ ¦ ¦--',': , [1/16] - ¦ ¦ ¦ ¦ ¦ °--')': ) [0/0] - ¦ ¦ ¦ ¦ °--'}': } [0/0] - ¦ ¦ ¦ °--'}': } [0/0] - ¦ ¦ °--')': ) [0/0] - ¦ °--')': ) [0/0] - °--expr: [0/0] - ¦--'(': ( [0/0] - ¦--expr: [0/0] - ¦ ¦--'(': ( [0/0] - ¦ ¦--expr: [0/0] - ¦ ¦ ¦--'{': { [0/0] - ¦ ¦ ¦--expr: [0/0] - ¦ ¦ ¦ ¦--'{': { [1/7] - ¦ ¦ ¦ ¦--expr: [1/2] - ¦ ¦ ¦ ¦ ¦--expr: [0/0] - ¦ ¦ ¦ ¦ ¦ ¦--expr: [0/1] - ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] - ¦ ¦ ¦ ¦ ¦ ¦--'+': + [0/1] - ¦ ¦ ¦ ¦ ¦ °--expr: [0/0] - ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] - ¦ ¦ ¦ ¦ ¦--'(': ( [1/9] - ¦ ¦ ¦ ¦ ¦--',': , [0/1] - ¦ ¦ ¦ ¦ ¦--',': , [1/0] - ¦ ¦ ¦ ¦ ¦--expr: [1/4] - ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 26 [0/0] - ¦ ¦ ¦ ¦ °--')': ) [0/0] - ¦ ¦ ¦ °--'}': } [0/0] - ¦ ¦ °--'}': } [0/0] - ¦ °--')': ) [0/0] - °--')': ) [0/0] diff --git a/tests/testthat/indention_multiple/curly_only-in_tree b/tests/testthat/indention_multiple/curly_only-in_tree deleted file mode 100644 index 3135ed9b6..000000000 --- a/tests/testthat/indention_multiple/curly_only-in_tree +++ /dev/null @@ -1,53 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: { - [0/7] {1} - ¦ ¦--'{': { [0/10] {2} - ¦ ¦--expr: 1 + 1 [1/1] {3} - ¦ ¦ ¦--expr: 1 [0/1] {5} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {4} - ¦ ¦ ¦--'+': + [0/1] {6} - ¦ ¦ °--expr: 1 [0/0] {8} - ¦ ¦ °--NUM_CONST: 1 [0/0] {7} - ¦ °--'}': } [1/0] {9} - ¦--expr: {{{ -2 [2/0] {10} - ¦ ¦--'{': { [0/0] {11} - ¦ ¦--expr: {{ -25 [0/0] {12} - ¦ ¦ ¦--'{': { [0/0] {13} - ¦ ¦ ¦--expr: { -25 [0/0] {14} - ¦ ¦ ¦ ¦--'{': { [0/0] {15} - ¦ ¦ ¦ ¦--expr: 25 * [1/7] {16} - ¦ ¦ ¦ ¦ ¦--expr: 25 [0/1] {18} - ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 25 [0/0] {17} - ¦ ¦ ¦ ¦ ¦--'*': * [0/1] {19} - ¦ ¦ ¦ ¦ °--expr: 4 [0/0] {21} - ¦ ¦ ¦ ¦ °--NUM_CONST: 4 [0/0] {20} - ¦ ¦ ¦ °--'}': } [1/0] {22} - ¦ ¦ °--'}': } [0/0] {23} - ¦ °--'}': } [0/0] {24} - °--expr: { -{ - [2/0] {25} - ¦--'{': { [0/0] {26} - ¦--expr: { - 1 [1/0] {27} - ¦ ¦--'{': { [0/2] {28} - ¦ ¦--expr: 1 + 1 [1/0] {29} - ¦ ¦ ¦--expr: 1 [0/1] {31} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {30} - ¦ ¦ ¦--'+': + [0/1] {32} - ¦ ¦ °--expr: 142 * [0/0] {33} - ¦ ¦ ¦--expr: 142 [0/1] {35} - ¦ ¦ ¦ °--NUM_CONST: 142 [0/0] {34} - ¦ ¦ ¦--'*': * [0/1] {36} - ¦ ¦ °--expr: sin(p [0/0] {37} - ¦ ¦ ¦--expr: sin [0/0] {39} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: sin [0/0] {38} - ¦ ¦ ¦--'(': ( [0/0] {40} - ¦ ¦ ¦--expr: pi [0/0] {42} - ¦ ¦ ¦ °--SYMBOL: pi [0/0] {41} - ¦ ¦ °--')': ) [0/0] {43} - ¦ °--'}': } [1/0] {44} - °--'}': } [1/0] {45} diff --git a/tests/testthat/indention_multiple/edge_strict_mixed-in_tree b/tests/testthat/indention_multiple/edge_strict_mixed-in_tree deleted file mode 100644 index a2a815bd7..000000000 --- a/tests/testthat/indention_multiple/edge_strict_mixed-in_tree +++ /dev/null @@ -1,95 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: { -( - [0/0] {1} - ¦ ¦--'{': { [0/0] {2} - ¦ ¦--expr: ( - [1/0] {3} - ¦ ¦ ¦--'(': ( [0/7] {4} - ¦ ¦ ¦--expr: (( -{{ [1/2] {5} - ¦ ¦ ¦ ¦--'(': ( [0/0] {6} - ¦ ¦ ¦ ¦--expr: ( -{{ - [0/0] {7} - ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {8} - ¦ ¦ ¦ ¦ ¦--expr: {{ - [1/0] {9} - ¦ ¦ ¦ ¦ ¦ ¦--'{': { [0/0] {10} - ¦ ¦ ¦ ¦ ¦ ¦--expr: { - [0/0] {11} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--'{': { [0/8] {12} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: { - [1/4] {13} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--'{': { [0/10] {14} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: c(99, [1/8] {15} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: c [0/0] {17} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {16} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {18} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: 99 [0/0] {20} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 99 [0/0] {19} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--',': , [0/9] {21} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: 1 + 1 [1/0] {22} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: 1 [0/1] {24} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {23} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--'+': + [0/1] {25} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--expr: 1 [0/0] {27} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {26} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--',': , [0/17] {28} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: { - [1/0] {29} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--'{': { [0/4] {30} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: "with [1/0] {32} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--STR_CONST: "with [0/0] {31} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--'}': } [1/0] {33} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--')': ) [0/0] {34} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--'}': } [1/0] {35} - ¦ ¦ ¦ ¦ ¦ ¦ °--'}': } [1/0] {36} - ¦ ¦ ¦ ¦ ¦ °--'}': } [0/0] {37} - ¦ ¦ ¦ ¦ °--')': ) [1/0] {38} - ¦ ¦ ¦ °--')': ) [0/0] {39} - ¦ ¦ °--')': ) [1/0] {40} - ¦ °--'}': } [1/0] {41} - ¦--expr: ((( - [3/0] {42} - ¦ ¦--'(': ( [0/0] {43} - ¦ ¦--expr: (( - [0/0] {44} - ¦ ¦ ¦--'(': ( [0/0] {45} - ¦ ¦ ¦--expr: ( - 1 [0/0] {46} - ¦ ¦ ¦ ¦--expr: ( - 1 [0/1] {47} - ¦ ¦ ¦ ¦ ¦--'(': ( [0/2] {48} - ¦ ¦ ¦ ¦ ¦--expr: 1 + 2 [1/0] {49} - ¦ ¦ ¦ ¦ ¦ ¦--expr: 1 [0/1] {51} - ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {50} - ¦ ¦ ¦ ¦ ¦ ¦--'+': + [0/1] {52} - ¦ ¦ ¦ ¦ ¦ °--expr: 2 [0/0] {54} - ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {53} - ¦ ¦ ¦ ¦ °--')': ) [0/0] {55} - ¦ ¦ ¦ ¦--'*': * [0/1] {56} - ¦ ¦ ¦ °--expr: (3 + [0/0] {57} - ¦ ¦ ¦ ¦--'(': ( [0/0] {58} - ¦ ¦ ¦ ¦--expr: 3 + 4 [0/0] {59} - ¦ ¦ ¦ ¦ ¦--expr: 3 [0/1] {61} - ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {60} - ¦ ¦ ¦ ¦ ¦--'+': + [0/1] {62} - ¦ ¦ ¦ ¦ °--expr: 4 [0/0] {64} - ¦ ¦ ¦ ¦ °--NUM_CONST: 4 [0/0] {63} - ¦ ¦ ¦ °--')': ) [1/0] {65} - ¦ ¦ °--')': ) [0/0] {66} - ¦ °--')': ) [0/0] {67} - °--expr: funct [3/0] {68} - ¦--FUNCTION: funct [0/0] {69} - ¦--'(': ( [0/0] {70} - ¦--SYMBOL_FORMALS: x [0/0] {71} - ¦--',': , [0/1] {72} - ¦--SYMBOL_FORMALS: y [0/0] {73} - ¦--',': , [0/1] {74} - ¦--SYMBOL_FORMALS: z [0/0] {75} - ¦--')': ) [0/1] {76} - °--expr: { -} [0/0] {77} - ¦--'{': { [0/0] {78} - °--'}': } [1/0] {79} diff --git a/tests/testthat/indention_multiple/edge_strict_mixed-out.R b/tests/testthat/indention_multiple/edge_strict_mixed-out.R index dcfe06a07..0d95d3468 100644 --- a/tests/testthat/indention_multiple/edge_strict_mixed-out.R +++ b/tests/testthat/indention_multiple/edge_strict_mixed-out.R @@ -23,5 +23,4 @@ ))) -function(x, y, z) { -} +function(x, y, z) {} diff --git a/tests/testthat/indention_multiple/edge_strict_random-in_tree b/tests/testthat/indention_multiple/edge_strict_random-in_tree deleted file mode 100644 index 1f6495ff9..000000000 --- a/tests/testthat/indention_multiple/edge_strict_random-in_tree +++ /dev/null @@ -1,84 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: {{( [0/3] {1} - ¦ ¦--'{': { [0/0] {2} - ¦ ¦--expr: {( [0/0] {3} - ¦ ¦ ¦--'{': { [0/0] {4} - ¦ ¦ ¦--expr: ( { [0/0] {5} - ¦ ¦ ¦ ¦--'(': ( [0/3] {6} - ¦ ¦ ¦ ¦--expr: {{{{ [0/0] {7} - ¦ ¦ ¦ ¦ ¦--'{': { [0/0] {8} - ¦ ¦ ¦ ¦ ¦--expr: {{{ [0/0] {9} - ¦ ¦ ¦ ¦ ¦ ¦--'{': { [0/0] {10} - ¦ ¦ ¦ ¦ ¦ ¦--expr: {{ { [0/0] {11} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--'{': { [0/0] {12} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: { {{ [0/0] {13} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--'{': { [0/2] {14} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: {{{{ [0/0] {15} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--'{': { [0/0] {16} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: {{{ [0/0] {17} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--'{': { [0/0] {18} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: {{ [0/0] {19} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--'{': { [0/0] {20} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: { ( [0/0] {21} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--'{': { [0/3] {22} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: (( - [0/0] {23} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {24} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: ( - 1 [0/0] {25} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--'(': ( [0/2] {26} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: 19 [1/0] {28} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 19 [0/0] {27} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--')': ) [1/0] {29} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--')': ) [0/0] {30} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--'}': } [0/0] {31} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--'}': } [0/0] {32} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--'}': } [0/0] {33} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--'}': } [0/0] {34} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--'}': } [0/0] {35} - ¦ ¦ ¦ ¦ ¦ ¦ °--'}': } [0/0] {36} - ¦ ¦ ¦ ¦ ¦ °--'}': } [0/0] {37} - ¦ ¦ ¦ ¦ °--'}': } [0/0] {38} - ¦ ¦ ¦ °--')': ) [0/0] {39} - ¦ ¦ °--'}': } [0/0] {40} - ¦ °--'}': } [0/0] {41} - ¦--expr: ( - c [3/3] {42} - ¦ ¦--'(': ( [0/2] {43} - ¦ ¦--expr: c("x" [1/3] {44} - ¦ ¦ ¦--expr: c [0/0] {46} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {45} - ¦ ¦ ¦--'(': ( [0/0] {47} - ¦ ¦ ¦--expr: "x" [0/0] {49} - ¦ ¦ ¦ °--STR_CONST: "x" [0/0] {48} - ¦ ¦ ¦--',': , [0/1] {50} - ¦ ¦ ¦--expr: "y" [0/0] {52} - ¦ ¦ ¦ °--STR_CONST: "y" [0/0] {51} - ¦ ¦ ¦--',': , [0/1] {53} - ¦ ¦ ¦--expr: "z" [0/0] {55} - ¦ ¦ ¦ °--STR_CONST: "z" [0/0] {54} - ¦ ¦ ¦--',': , [0/1] {56} - ¦ ¦ ¦--expr: "sin( [0/0] {58} - ¦ ¦ ¦ °--STR_CONST: "sin( [0/0] {57} - ¦ ¦ °--')': ) [0/0] {59} - ¦ °--')': ) [1/0] {60} - °--expr: { - c [3/0] {61} - ¦--'{': { [0/2] {62} - ¦--expr: c("x" [1/0] {63} - ¦ ¦--expr: c [0/0] {65} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {64} - ¦ ¦--'(': ( [0/0] {66} - ¦ ¦--expr: "x" [0/0] {68} - ¦ ¦ °--STR_CONST: "x" [0/0] {67} - ¦ ¦--',': , [0/1] {69} - ¦ ¦--expr: "y" [0/0] {71} - ¦ ¦ °--STR_CONST: "y" [0/0] {70} - ¦ ¦--',': , [0/1] {72} - ¦ ¦--expr: "z" [0/0] {74} - ¦ ¦ °--STR_CONST: "z" [0/0] {73} - ¦ ¦--',': , [0/1] {75} - ¦ ¦--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 deleted file mode 100644 index 8ec66a854..000000000 --- a/tests/testthat/indention_multiple/fun_for_new_line-in_tree +++ /dev/null @@ -1,27 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: funct [0/0] {1} - ¦ ¦--FUNCTION: funct [0/0] {2} - ¦ ¦--'(': ( [0/0] {3} - ¦ ¦--')': ) [0/0] {4} - ¦ °--expr: NULL [1/0] {6} - ¦ °--NULL_CONST: NULL [0/0] {5} - °--expr: for ( [2/0] {7} - ¦--FOR: for [0/1] {8} - ¦--forcond: (i in [0/1] {9} - ¦ ¦--'(': ( [0/0] {10} - ¦ ¦--SYMBOL: i [0/1] {11} - ¦ ¦--IN: in [0/1] {12} - ¦ ¦--expr: 1:3 [0/0] {13} - ¦ ¦ ¦--expr: 1 [0/0] {15} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {14} - ¦ ¦ ¦--':': : [0/0] {16} - ¦ ¦ °--expr: 3 [0/0] {18} - ¦ ¦ °--NUM_CONST: 3 [0/0] {17} - ¦ °--')': ) [0/0] {19} - °--expr: { -2 - [1/0] {20} - ¦--'{': { [0/0] {21} - ¦--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 deleted file mode 100644 index 36f58267d..000000000 --- a/tests/testthat/indention_multiple/if_else_curly-in_tree +++ /dev/null @@ -1,162 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: { - [0/0] {1} - ¦ ¦--'{': { [0/4] {2} - ¦ ¦--expr: if (T [1/0] {3} - ¦ ¦ ¦--IF: if [0/1] {4} - ¦ ¦ ¦--'(': ( [0/0] {5} - ¦ ¦ ¦--expr: TRUE [0/0] {7} - ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {6} - ¦ ¦ ¦--')': ) [0/0] {8} - ¦ ¦ ¦--expr: 3 [1/4] {10} - ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {9} - ¦ ¦ ¦--ELSE: else [1/0] {11} - ¦ ¦ °--expr: 4 [1/0] {13} - ¦ ¦ °--NUM_CONST: 4 [0/0] {12} - ¦ °--'}': } [1/0] {14} - ¦--expr: { -if [2/0] {15} - ¦ ¦--'{': { [0/0] {16} - ¦ ¦--expr: if (T [1/0] {17} - ¦ ¦ ¦--IF: if [0/1] {18} - ¦ ¦ ¦--'(': ( [0/0] {19} - ¦ ¦ ¦--expr: TRUE [0/0] {21} - ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {20} - ¦ ¦ ¦--')': ) [0/1] {22} - ¦ ¦ ¦--expr: { - [0/1] {23} - ¦ ¦ ¦ ¦--'{': { [0/3] {24} - ¦ ¦ ¦ ¦--expr: 3 [1/4] {26} - ¦ ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {25} - ¦ ¦ ¦ °--'}': } [1/0] {27} - ¦ ¦ ¦--ELSE: else [0/0] {28} - ¦ ¦ °--expr: 4 [1/0] {30} - ¦ ¦ °--NUM_CONST: 4 [0/0] {29} - ¦ °--'}': } [1/0] {31} - ¦--expr: { -if [2/0] {32} - ¦ ¦--'{': { [0/0] {33} - ¦ ¦--expr: if (T [1/0] {34} - ¦ ¦ ¦--IF: if [0/1] {35} - ¦ ¦ ¦--'(': ( [0/0] {36} - ¦ ¦ ¦--expr: TRUE [0/0] {38} - ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {37} - ¦ ¦ ¦--')': ) [0/4] {39} - ¦ ¦ ¦--expr: 3 [1/0] {41} - ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {40} - ¦ ¦ ¦--ELSE: else [1/1] {42} - ¦ ¦ °--expr: { - 4 [0/0] {43} - ¦ ¦ ¦--'{': { [0/2] {44} - ¦ ¦ ¦--expr: 4 [1/0] {46} - ¦ ¦ ¦ °--NUM_CONST: 4 [0/0] {45} - ¦ ¦ °--'}': } [1/0] {47} - ¦ °--'}': } [1/0] {48} - ¦--expr: { -if [2/0] {49} - ¦ ¦--'{': { [0/0] {50} - ¦ ¦--expr: if (T [1/0] {51} - ¦ ¦ ¦--IF: if [0/1] {52} - ¦ ¦ ¦--'(': ( [0/0] {53} - ¦ ¦ ¦--expr: TRUE [0/0] {55} - ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {54} - ¦ ¦ ¦--')': ) [0/1] {56} - ¦ ¦ ¦--expr: { - [0/1] {57} - ¦ ¦ ¦ ¦--'{': { [0/5] {58} - ¦ ¦ ¦ ¦--expr: 3 [1/4] {60} - ¦ ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {59} - ¦ ¦ ¦ °--'}': } [1/0] {61} - ¦ ¦ ¦--ELSE: else [0/1] {62} - ¦ ¦ °--expr: { -4 -} [0/0] {63} - ¦ ¦ ¦--'{': { [0/0] {64} - ¦ ¦ ¦--expr: 4 [1/0] {66} - ¦ ¦ ¦ °--NUM_CONST: 4 [0/0] {65} - ¦ ¦ °--'}': } [1/0] {67} - ¦ °--'}': } [1/0] {68} - ¦--COMMENT: # rat [2/0] {69} - ¦--expr: foo < [1/0] {70} - ¦ ¦--expr: foo [0/1] {72} - ¦ ¦ °--SYMBOL: foo [0/0] {71} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {73} - ¦ °--expr: funct [0/0] {74} - ¦ ¦--FUNCTION: funct [0/0] {75} - ¦ ¦--'(': ( [0/0] {76} - ¦ ¦--SYMBOL_FORMALS: x [0/0] {77} - ¦ ¦--')': ) [0/1] {78} - ¦ °--expr: { - i [0/0] {79} - ¦ ¦--'{': { [0/2] {80} - ¦ ¦--expr: if (T [1/0] {81} - ¦ ¦ ¦--IF: if [0/1] {82} - ¦ ¦ ¦--'(': ( [0/0] {83} - ¦ ¦ ¦--expr: TRUE [0/0] {85} - ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {84} - ¦ ¦ ¦--')': ) [0/1] {86} - ¦ ¦ ¦--expr: { - [0/2] {87} - ¦ ¦ ¦ ¦--'{': { [0/4] {88} - ¦ ¦ ¦ ¦--expr: 1 [1/2] {90} - ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {89} - ¦ ¦ ¦ °--'}': } [1/0] {91} - ¦ ¦ ¦--ELSE: else [1/1] {92} - ¦ ¦ °--expr: { - [0/0] {93} - ¦ ¦ ¦--'{': { [0/4] {94} - ¦ ¦ ¦--expr: 2 [1/2] {96} - ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {95} - ¦ ¦ °--'}': } [1/0] {97} - ¦ °--'}': } [1/0] {98} - ¦--expr: if (T [3/0] {99} - ¦ ¦--IF: if [0/1] {100} - ¦ ¦--'(': ( [0/0] {101} - ¦ ¦--expr: TRUE [0/0] {103} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {102} - ¦ ¦--')': ) [0/1] {104} - ¦ ¦--expr: { - 3 [0/1] {105} - ¦ ¦ ¦--'{': { [0/2] {106} - ¦ ¦ ¦--expr: 3 [1/0] {108} - ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {107} - ¦ ¦ °--'}': } [1/0] {109} - ¦ ¦--ELSE: else [0/2] {110} - ¦ °--expr: if (F [1/0] {111} - ¦ ¦--IF: if [0/1] {112} - ¦ ¦--'(': ( [0/0] {113} - ¦ ¦--expr: FALSE [0/0] {115} - ¦ ¦ °--NUM_CONST: FALSE [0/0] {114} - ¦ ¦--')': ) [0/1] {116} - ¦ °--expr: { - 4 [0/0] {117} - ¦ ¦--'{': { [0/2] {118} - ¦ ¦--expr: 4 [1/0] {120} - ¦ ¦ °--NUM_CONST: 4 [0/0] {119} - ¦ °--'}': } [1/0] {121} - °--expr: if (T [2/0] {122} - ¦--IF: if [0/1] {123} - ¦--'(': ( [0/0] {124} - ¦--expr: TRUE [0/0] {126} - ¦ °--NUM_CONST: TRUE [0/0] {125} - ¦--')': ) [0/1] {127} - ¦--expr: { - 3 [0/1] {128} - ¦ ¦--'{': { [0/2] {129} - ¦ ¦--expr: 3 [1/0] {131} - ¦ ¦ °--NUM_CONST: 3 [0/0] {130} - ¦ °--'}': } [1/0] {132} - ¦--ELSE: else [0/1] {133} - ¦--COMMENT: # com [0/2] {134} - °--expr: if (F [1/0] {135} - ¦--IF: if [0/1] {136} - ¦--'(': ( [0/0] {137} - ¦--expr: FALSE [0/0] {139} - ¦ °--NUM_CONST: FALSE [0/0] {138} - ¦--')': ) [0/1] {140} - °--expr: { - [0/0] {141} - ¦--'{': { [0/4] {142} - ¦--expr: 4 [1/2] {144} - ¦ °--NUM_CONST: 4 [0/0] {143} - °--'}': } [1/0] {145} diff --git a/tests/testthat/indention_multiple/overall-in_tree b/tests/testthat/indention_multiple/overall-in_tree deleted file mode 100644 index 93795a351..000000000 --- a/tests/testthat/indention_multiple/overall-in_tree +++ /dev/null @@ -1,160 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: #' th [0/0] {1} - ¦--COMMENT: #' [1/0] {2} - ¦--COMMENT: #' @p [1/0] {3} - ¦--COMMENT: #' [1/0] {4} - ¦--expr: a <- [1/0] {5} - ¦ ¦--expr: a [0/1] {7} - ¦ ¦ °--SYMBOL: a [0/0] {6} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {8} - ¦ °--expr: funct [0/0] {9} - ¦ ¦--FUNCTION: funct [0/0] {10} - ¦ ¦--'(': ( [0/0] {11} - ¦ ¦--SYMBOL_FORMALS: x [0/0] {12} - ¦ ¦--')': ) [0/1] {13} - ¦ °--expr: { - t [0/0] {14} - ¦ ¦--'{': { [0/2] {15} - ¦ ¦--expr: test_ [1/2] {16} - ¦ ¦ ¦--expr: test_ [0/0] {18} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: test_ [0/0] {17} - ¦ ¦ ¦--'(': ( [0/0] {19} - ¦ ¦ ¦--expr: "I wa [0/0] {21} - ¦ ¦ ¦ °--STR_CONST: "I wa [0/0] {20} - ¦ ¦ ¦--',': , [0/1] {22} - ¦ ¦ ¦--expr: { - [0/0] {23} - ¦ ¦ ¦ ¦--'{': { [0/4] {24} - ¦ ¦ ¦ ¦--expr: out < [1/4] {25} - ¦ ¦ ¦ ¦ ¦--expr: out [0/1] {27} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL: out [0/0] {26} - ¦ ¦ ¦ ¦ ¦--LEFT_ASSIGN: <- [0/1] {28} - ¦ ¦ ¦ ¦ °--expr: c(1, [0/0] {29} - ¦ ¦ ¦ ¦ ¦--expr: c [0/0] {31} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {30} - ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {32} - ¦ ¦ ¦ ¦ ¦--expr: 1 [0/0] {34} - ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {33} - ¦ ¦ ¦ ¦ ¦--',': , [0/1] {35} - ¦ ¦ ¦ ¦ ¦--expr: c( - [0/0] {36} - ¦ ¦ ¦ ¦ ¦ ¦--expr: c [0/0] {38} - ¦ ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {37} - ¦ ¦ ¦ ¦ ¦ ¦--'(': ( [0/6] {39} - ¦ ¦ ¦ ¦ ¦ ¦--expr: 22 + [1/4] {40} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: 22 [0/1] {42} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 22 [0/0] {41} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--'+': + [0/1] {43} - ¦ ¦ ¦ ¦ ¦ ¦ °--expr: 1 [0/0] {45} - ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {44} - ¦ ¦ ¦ ¦ ¦ °--')': ) [1/0] {46} - ¦ ¦ ¦ ¦ °--')': ) [0/0] {47} - ¦ ¦ ¦ ¦--expr: if (x [1/2] {48} - ¦ ¦ ¦ ¦ ¦--IF: if [0/1] {49} - ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {50} - ¦ ¦ ¦ ¦ ¦--expr: x > 1 [0/0] {51} - ¦ ¦ ¦ ¦ ¦ ¦--expr: x [0/1] {53} - ¦ ¦ ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {52} - ¦ ¦ ¦ ¦ ¦ ¦--GT: > [0/1] {54} - ¦ ¦ ¦ ¦ ¦ °--expr: 10 [0/0] {56} - ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 10 [0/0] {55} - ¦ ¦ ¦ ¦ ¦--')': ) [0/1] {57} - ¦ ¦ ¦ ¦ °--expr: { - [0/0] {58} - ¦ ¦ ¦ ¦ ¦--'{': { [0/6] {59} - ¦ ¦ ¦ ¦ ¦--expr: for ( [1/4] {60} - ¦ ¦ ¦ ¦ ¦ ¦--FOR: for [0/1] {61} - ¦ ¦ ¦ ¦ ¦ ¦--forcond: (x in [0/1] {62} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {63} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--SYMBOL: x [0/1] {64} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--IN: in [0/1] {65} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: 22 [0/0] {67} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 22 [0/0] {66} - ¦ ¦ ¦ ¦ ¦ ¦ °--')': ) [0/0] {68} - ¦ ¦ ¦ ¦ ¦ °--expr: { # F [0/0] {69} - ¦ ¦ ¦ ¦ ¦ ¦--'{': { [0/1] {70} - ¦ ¦ ¦ ¦ ¦ ¦--COMMENT: # FIX [0/8] {71} - ¦ ¦ ¦ ¦ ¦ ¦--expr: prin( [1/6] {72} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: prin [0/0] {74} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: prin [0/0] {73} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {75} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: x [0/0] {77} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {76} - ¦ ¦ ¦ ¦ ¦ ¦ °--')': ) [0/0] {78} - ¦ ¦ ¦ ¦ ¦ °--'}': } [1/0] {79} - ¦ ¦ ¦ ¦ °--'}': } [1/0] {80} - ¦ ¦ ¦ °--'}': } [1/0] {81} - ¦ ¦ °--')': ) [0/0] {82} - ¦ ¦--COMMENT: # we [1/2] {83} - ¦ ¦--expr: c( - [1/2] {84} - ¦ ¦ ¦--expr: c [0/0] {86} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {85} - ¦ ¦ ¦--'(': ( [0/4] {87} - ¦ ¦ ¦--expr: list( [1/0] {88} - ¦ ¦ ¦ ¦--expr: list [0/0] {90} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: list [0/0] {89} - ¦ ¦ ¦ ¦--'(': ( [0/0] {91} - ¦ ¦ ¦ ¦--expr: x + 2 [0/0] {92} - ¦ ¦ ¦ ¦ ¦--expr: x [0/1] {94} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {93} - ¦ ¦ ¦ ¦ ¦--'+': + [0/1] {95} - ¦ ¦ ¦ ¦ °--expr: 2 [0/0] {97} - ¦ ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {96} - ¦ ¦ ¦ °--')': ) [0/0] {98} - ¦ ¦ ¦--',': , [0/4] {99} - ¦ ¦ ¦--expr: c(c( - [1/0] {100} - ¦ ¦ ¦ ¦--expr: c [0/0] {102} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {101} - ¦ ¦ ¦ ¦--'(': ( [0/0] {103} - ¦ ¦ ¦ ¦--expr: c( - [0/0] {104} - ¦ ¦ ¦ ¦ ¦--expr: c [0/0] {106} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {105} - ¦ ¦ ¦ ¦ ¦--'(': ( [0/6] {107} - ¦ ¦ ¦ ¦ ¦--expr: 26 ^ [1/0] {108} - ¦ ¦ ¦ ¦ ¦ ¦--expr: 26 [0/1] {110} - ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 26 [0/0] {109} - ¦ ¦ ¦ ¦ ¦ ¦--'^': ^ [0/1] {111} - ¦ ¦ ¦ ¦ ¦ °--expr: 2 [0/0] {113} - ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {112} - ¦ ¦ ¦ ¦ ¦--',': , [0/6] {114} - ¦ ¦ ¦ ¦ ¦--expr: 8 [1/0] {116} - ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 8 [0/0] {115} - ¦ ¦ ¦ ¦ ¦--',': , [0/6] {117} - ¦ ¦ ¦ ¦ ¦--expr: 7 [1/2] {119} - ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 7 [0/0] {118} - ¦ ¦ ¦ ¦ °--')': ) [1/0] {120} - ¦ ¦ ¦ °--')': ) [0/0] {121} - ¦ ¦ °--')': ) [0/0] {122} - ¦ ¦--expr: call( [2/0] {123} - ¦ ¦ ¦--expr: call [0/0] {125} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {124} - ¦ ¦ ¦--'(': ( [0/4] {126} - ¦ ¦ ¦--expr: 1 [1/0] {128} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {127} - ¦ ¦ ¦--',': , [0/1] {129} - ¦ ¦ ¦--expr: 2 [0/0] {131} - ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {130} - ¦ ¦ ¦--',': , [0/4] {132} - ¦ ¦ ¦--expr: 23 + [1/0] {133} - ¦ ¦ ¦ ¦--expr: 23 [0/1] {136} - ¦ ¦ ¦ ¦ °--NUM_CONST: 23 [0/0] {135} - ¦ ¦ ¦ ¦--'+': + [0/1] {137} - ¦ ¦ ¦ ¦--expr: Inf [0/1] {139} - ¦ ¦ ¦ ¦ °--NUM_CONST: Inf [0/0] {138} - ¦ ¦ ¦ ¦--'-': - [0/1] {140} - ¦ ¦ ¦ °--expr: 99 [0/0] {142} - ¦ ¦ ¦ °--NUM_CONST: 99 [0/0] {141} - ¦ ¦ ¦--',': , [0/1] {143} - ¦ ¦ ¦--expr: call( [0/0] {144} - ¦ ¦ ¦ ¦--expr: call [0/0] {146} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {145} - ¦ ¦ ¦ ¦--'(': ( [0/6] {147} - ¦ ¦ ¦ ¦--expr: 16 [1/2] {149} - ¦ ¦ ¦ ¦ °--NUM_CONST: 16 [0/0] {148} - ¦ ¦ ¦ °--')': ) [1/0] {150} - ¦ ¦ °--')': ) [0/0] {151} - ¦ °--'}': } [1/0] {152} - °--COMMENT: # com [1/0] {153} 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 deleted file mode 100644 index 145b8bb50..000000000 --- a/tests/testthat/indention_multiple/round_closing_on_same_line-in_tree +++ /dev/null @@ -1,20 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: c(cal [0/0] {1} - ¦--expr: c [0/0] {3} - ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {2} - ¦--'(': ( [0/0] {4} - ¦--expr: call( [0/0] {5} - ¦ ¦--expr: call [0/0] {7} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {6} - ¦ ¦--'(': ( [0/0] {8} - ¦ ¦--expr: 2 [0/0] {10} - ¦ ¦ °--NUM_CONST: 2 [0/0] {9} - ¦ °--')': ) [0/0] {11} - ¦--',': , [0/1] {12} - ¦--expr: 1 [0/0] {14} - ¦ °--NUM_CONST: 1 [0/0] {13} - ¦--',': , [0/1] {15} - ¦--COMMENT: # com [0/0] {16} - ¦--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 deleted file mode 100644 index 70166c710..000000000 --- a/tests/testthat/indention_multiple/round_only-in_tree +++ /dev/null @@ -1,40 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: ((((( [0/3] {1} - ¦ ¦--'(': ( [0/0] {2} - ¦ ¦--expr: (((( - [0/0] {3} - ¦ ¦ ¦--'(': ( [0/0] {4} - ¦ ¦ ¦--expr: ((( -1 [0/0] {5} - ¦ ¦ ¦ ¦--'(': ( [0/0] {6} - ¦ ¦ ¦ ¦--expr: (( -1 - [0/0] {7} - ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {8} - ¦ ¦ ¦ ¦ ¦--expr: ( -1 - [0/0] {9} - ¦ ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {10} - ¦ ¦ ¦ ¦ ¦ ¦--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 [2/0] {18} - ¦--'(': ( [0/0] {19} - ¦--expr: (( -2 - [0/0] {20} - ¦ ¦--'(': ( [0/0] {21} - ¦ ¦--expr: ( -2 -) [0/0] {22} - ¦ ¦ ¦--'(': ( [0/0] {23} - ¦ ¦ ¦--expr: 2 [1/0] {25} - ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {24} - ¦ ¦ °--')': ) [1/0] {26} - ¦ °--')': ) [0/0] {27} - °--')': ) [0/0] {28} diff --git a/tests/testthat/indention_operators/base_pipe_and_assignment-in_tree b/tests/testthat/indention_operators/base_pipe_and_assignment-in_tree deleted file mode 100644 index 85acfef3b..000000000 --- a/tests/testthat/indention_operators/base_pipe_and_assignment-in_tree +++ /dev/null @@ -1,43 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: a [0/0] {1} - ¦ ¦--expr: a [0/4] {3} - ¦ ¦ °--SYMBOL: a [0/0] {2} - ¦ ¦--LEFT_ASSIGN: <- [0/0] {4} - ¦ ¦--expr: b() [1/1] {7} - ¦ ¦ ¦--expr: b [0/0] {9} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: b [0/0] {8} - ¦ ¦ ¦--'(': ( [0/0] {10} - ¦ ¦ °--')': ) [0/0] {11} - ¦ ¦--PIPE: |> [0/2] {12} - ¦ ¦--expr: q() [1/1] {13} - ¦ ¦ ¦--expr: q [0/0] {15} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: q [0/0] {14} - ¦ ¦ ¦--'(': ( [0/0] {16} - ¦ ¦ °--')': ) [0/0] {17} - ¦ ¦--PIPE: |> [0/5] {18} - ¦ °--expr: g() [1/0] {19} - ¦ ¦--expr: g [0/0] {21} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: g [0/0] {20} - ¦ ¦--'(': ( [0/0] {22} - ¦ °--')': ) [0/0] {23} - °--expr: a <- [2/0] {24} - ¦--expr: a [0/1] {26} - ¦ °--SYMBOL: a [0/0] {25} - ¦--LEFT_ASSIGN: <- [0/4] {27} - ¦--expr: b() [0/1] {30} - ¦ ¦--expr: b [0/0] {32} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: b [0/0] {31} - ¦ ¦--'(': ( [0/0] {33} - ¦ °--')': ) [0/0] {34} - ¦--PIPE: |> [0/2] {35} - ¦--expr: c() [1/0] {36} - ¦ ¦--expr: c [0/0] {38} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {37} - ¦ ¦--'(': ( [0/0] {39} - ¦ °--')': ) [0/0] {40} - ¦--PIPE: |> [0/0] {41} - °--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/base_pipe_and_assignment_and_comment-in_tree b/tests/testthat/indention_operators/base_pipe_and_assignment_and_comment-in_tree deleted file mode 100644 index baae8dbbf..000000000 --- a/tests/testthat/indention_operators/base_pipe_and_assignment_and_comment-in_tree +++ /dev/null @@ -1,115 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--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: b() [1/1] {8} - ¦ ¦ ¦--expr: b [0/0] {10} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: b [0/0] {9} - ¦ ¦ ¦--'(': ( [0/0] {11} - ¦ ¦ °--')': ) [0/0] {12} - ¦ ¦--PIPE: |> [0/2] {13} - ¦ ¦--expr: c() [1/1] {14} - ¦ ¦ ¦--expr: c [0/0] {16} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {15} - ¦ ¦ ¦--'(': ( [0/0] {17} - ¦ ¦ °--')': ) [0/0] {18} - ¦ ¦--PIPE: |> [0/2] {19} - ¦ °--expr: d() [1/0] {20} - ¦ ¦--expr: d [0/0] {22} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: d [0/0] {21} - ¦ ¦--'(': ( [0/0] {23} - ¦ °--')': ) [0/0] {24} - ¦--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: b() [1/1] {32} - ¦ ¦ ¦--expr: b [0/0] {34} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: b [0/0] {33} - ¦ ¦ ¦--'(': ( [0/0] {35} - ¦ ¦ °--')': ) [0/0] {36} - ¦ ¦--PIPE: |> [0/2] {37} - ¦ ¦--expr: c() [1/1] {38} - ¦ ¦ ¦--expr: c [0/0] {40} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {39} - ¦ ¦ ¦--'(': ( [0/0] {41} - ¦ ¦ °--')': ) [0/0] {42} - ¦ ¦--PIPE: |> [0/2] {43} - ¦ °--expr: d() [1/0] {44} - ¦ ¦--expr: d [0/0] {46} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: d [0/0] {45} - ¦ ¦--'(': ( [0/0] {47} - ¦ °--')': ) [0/0] {48} - ¦--expr: a <- - [3/0] {49} - ¦ ¦--expr: a [0/1] {51} - ¦ ¦ °--SYMBOL: a [0/0] {50} - ¦ ¦--LEFT_ASSIGN: <- [0/2] {52} - ¦ ¦--expr: b() [1/1] {55} - ¦ ¦ ¦--expr: b [0/0] {57} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: b [0/0] {56} - ¦ ¦ ¦--'(': ( [0/0] {58} - ¦ ¦ °--')': ) [0/0] {59} - ¦ ¦--PIPE: |> [0/2] {60} - ¦ ¦--expr: c() [1/1] {61} - ¦ ¦ ¦--expr: c [0/0] {63} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {62} - ¦ ¦ ¦--'(': ( [0/0] {64} - ¦ ¦ °--')': ) [0/0] {65} - ¦ ¦--PIPE: |> [0/2] {66} - ¦ °--expr: d() [1/0] {67} - ¦ ¦--expr: d [0/0] {69} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: d [0/0] {68} - ¦ ¦--'(': ( [0/0] {70} - ¦ °--')': ) [0/0] {71} - ¦--expr: a <- [2/0] {72} - ¦ ¦--expr: a [0/1] {74} - ¦ ¦ °--SYMBOL: a [0/0] {73} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {75} - ¦ ¦--expr: c [0/1] {80} - ¦ ¦ °--SYMBOL: c [0/0] {79} - ¦ ¦--PIPE: |> [0/2] {81} - ¦ ¦--expr: b() [1/0] {82} - ¦ ¦ ¦--expr: b [0/0] {84} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: b [0/0] {83} - ¦ ¦ ¦--'(': ( [0/0] {85} - ¦ ¦ °--')': ) [0/0] {86} - ¦ ¦--PIPE: |> [0/2] {87} - ¦ ¦--expr: c( ) [1/1] {88} - ¦ ¦ ¦--expr: c [0/0] {90} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {89} - ¦ ¦ ¦--'(': ( [0/1] {91} - ¦ ¦ °--')': ) [0/0] {92} - ¦ ¦--PIPE: |> [0/2] {93} - ¦ °--expr: d() [1/0] {94} - ¦ ¦--expr: d [0/0] {96} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: d [0/0] {95} - ¦ ¦--'(': ( [0/0] {97} - ¦ °--')': ) [0/0] {98} - ¦--expr: a <- - [2/0] {99} - ¦ ¦--expr: a [0/1] {101} - ¦ ¦ °--SYMBOL: a [0/0] {100} - ¦ ¦--LEFT_ASSIGN: <- [0/2] {102} - ¦ ¦--expr: b() [1/1] {105} - ¦ ¦ ¦--expr: b [0/0] {107} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: b [0/0] {106} - ¦ ¦ ¦--'(': ( [0/0] {108} - ¦ ¦ °--')': ) [0/0] {109} - ¦ ¦--PIPE: |> [0/1] {110} - ¦ ¦--COMMENT: # [0/2] {111} - ¦ ¦--expr: c() [1/1] {112} - ¦ ¦ ¦--expr: c [0/0] {114} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {113} - ¦ ¦ ¦--'(': ( [0/0] {115} - ¦ ¦ °--')': ) [0/0] {116} - ¦ ¦--PIPE: |> [0/2] {117} - ¦ °--expr: d() [1/0] {118} - ¦ ¦--expr: d [0/0] {120} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: d [0/0] {119} - ¦ ¦--'(': ( [0/0] {121} - ¦ °--')': ) [0/0] {122} - °--COMMENT: # d [0/0] {123} diff --git a/tests/testthat/indention_operators/base_pipe_and_assignment_and_math-in_tree b/tests/testthat/indention_operators/base_pipe_and_assignment_and_math-in_tree deleted file mode 100644 index 422b0c21e..000000000 --- a/tests/testthat/indention_operators/base_pipe_and_assignment_and_math-in_tree +++ /dev/null @@ -1,27 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: q <- [0/0] {1} - ¦--expr: q [0/1] {3} - ¦ °--SYMBOL: q [0/0] {2} - ¦--LEFT_ASSIGN: <- [0/2] {4} - ¦--expr: a [0/0] {9} - ¦ °--SYMBOL: a [0/0] {8} - ¦--'+': + [0/2] {10} - ¦--expr: - 3 [1/1] {11} - ¦ ¦--'-': - [0/1] {12} - ¦ °--expr: 3 [0/0] {14} - ¦ °--NUM_CONST: 3 [0/0] {13} - ¦--'+': + [0/0] {15} - ¦--expr: 2 [1/0] {17} - ¦ °--NUM_CONST: 2 [0/0] {16} - ¦--'+': + [0/0] {18} - ¦--expr: g() [1/0] {20} - ¦ ¦--expr: g [0/0] {22} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: g [0/0] {21} - ¦ ¦--'(': ( [0/0] {23} - ¦ °--')': ) [0/0] {24} - ¦--PIPE: |> [0/3] {25} - °--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/base_pipe_simple-in_tree b/tests/testthat/indention_operators/base_pipe_simple-in_tree deleted file mode 100644 index e30c30168..000000000 --- a/tests/testthat/indention_operators/base_pipe_simple-in_tree +++ /dev/null @@ -1,79 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: a |> - [0/0] {1} - ¦ ¦--expr: a [0/1] {6} - ¦ ¦ °--SYMBOL: a [0/0] {5} - ¦ ¦--PIPE: |> [0/0] {7} - ¦ ¦--expr: b() [1/1] {8} - ¦ ¦ ¦--expr: b [0/0] {10} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: b [0/0] {9} - ¦ ¦ ¦--'(': ( [0/0] {11} - ¦ ¦ °--')': ) [0/0] {12} - ¦ ¦--PIPE: |> [0/0] {13} - ¦ ¦--expr: c() [1/1] {14} - ¦ ¦ ¦--expr: c [0/0] {16} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {15} - ¦ ¦ ¦--'(': ( [0/0] {17} - ¦ ¦ °--')': ) [0/0] {18} - ¦ ¦--PIPE: |> [0/10] {19} - ¦ ¦--expr: d(1 + [1/1] {20} - ¦ ¦ ¦--expr: d [0/0] {22} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: d [0/0] {21} - ¦ ¦ ¦--'(': ( [0/0] {23} - ¦ ¦ ¦--expr: 1 + e [0/0] {24} - ¦ ¦ ¦ ¦--expr: 1 [0/1] {26} - ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {25} - ¦ ¦ ¦ ¦--'+': + [0/1] {27} - ¦ ¦ ¦ °--expr: e (si [0/0] {28} - ¦ ¦ ¦ ¦--expr: e [0/1] {30} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: e [0/0] {29} - ¦ ¦ ¦ ¦--'(': ( [0/0] {31} - ¦ ¦ ¦ ¦--expr: sin(f [0/0] {32} - ¦ ¦ ¦ ¦ ¦--expr: sin [0/0] {34} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: sin [0/0] {33} - ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {35} - ¦ ¦ ¦ ¦ ¦--expr: f [0/0] {37} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL: f [0/0] {36} - ¦ ¦ ¦ ¦ °--')': ) [0/0] {38} - ¦ ¦ ¦ °--')': ) [0/0] {39} - ¦ ¦ °--')': ) [0/0] {40} - ¦ ¦--PIPE: |> [0/33] {41} - ¦ °--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: a <- [2/0] {47} - ¦ ¦--expr: a [0/1] {49} - ¦ ¦ °--SYMBOL: a [0/0] {48} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {50} - ¦ °--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} - ¦ ¦--'{': { [0/0] {57} - ¦ °--'}': } [0/0] {58} - ¦--expr: x |> - [2/0] {59} - ¦ ¦--expr: x [0/1] {61} - ¦ ¦ °--SYMBOL: x [0/0] {60} - ¦ ¦--PIPE: |> [0/2] {62} - ¦ ¦--COMMENT: # bre [2/2] {63} - ¦ °--expr: call( [1/0] {64} - ¦ ¦--expr: call [0/0] {66} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {65} - ¦ ¦--'(': ( [0/0] {67} - ¦ °--')': ) [0/0] {68} - ¦--expr: y |> - [3/1] {69} - ¦ ¦--expr: y [0/1] {71} - ¦ ¦ °--SYMBOL: y [0/0] {70} - ¦ ¦--PIPE: |> [0/2] {72} - ¦ °--expr: call( [3/0] {73} - ¦ ¦--expr: call [0/0] {75} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {74} - ¦ ¦--'(': ( [0/0] {76} - ¦ °--')': ) [0/0] {77} - °--COMMENT: # mor [0/0] {78} diff --git a/tests/testthat/indention_operators/dollar_R6-in.R b/tests/testthat/indention_operators/dollar_R6-in.R index de575d6a5..a3bf2f591 100644 --- a/tests/testthat/indention_operators/dollar_R6-in.R +++ b/tests/testthat/indention_operators/dollar_R6-in.R @@ -1,4 +1,4 @@ - x$ - add(10) $ + x$ add(10)$ + add(10) $ add(10) $ add(10)$sum + 3 diff --git a/tests/testthat/indention_operators/dollar_R6-in_tree b/tests/testthat/indention_operators/dollar_R6-in_tree deleted file mode 100644 index 31105cc5a..000000000 --- a/tests/testthat/indention_operators/dollar_R6-in_tree +++ /dev/null @@ -1,30 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--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: 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: 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: 3 [1/0] {25} - °--NUM_CONST: 3 [0/0] {24} diff --git a/tests/testthat/indention_operators/dollar_R6-out.R b/tests/testthat/indention_operators/dollar_R6-out.R index e4cf03219..8111d3582 100644 --- a/tests/testthat/indention_operators/dollar_R6-out.R +++ b/tests/testthat/indention_operators/dollar_R6-out.R @@ -1,4 +1,4 @@ -x$ - add(10)$ +x$add(10)$ + add(10)$add(10)$ add(10)$sum + 3 diff --git a/tests/testthat/indention_operators/eq_assign-in_tree b/tests/testthat/indention_operators/eq_assign-in_tree deleted file mode 100644 index c11954b1d..000000000 --- a/tests/testthat/indention_operators/eq_assign-in_tree +++ /dev/null @@ -1,47 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: switc [0/0] {1} - ¦ ¦--expr: switc [0/0] {3} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: switc [0/0] {2} - ¦ ¦--'(': ( [0/0] {4} - ¦ ¦--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} - ¦ ¦ ¦--'{': { [0/5] {11} - ¦ ¦ ¦--expr: if (a [1/9] {12} - ¦ ¦ ¦ ¦--IF: if [0/1] {13} - ¦ ¦ ¦ ¦--'(': ( [0/0] {14} - ¦ ¦ ¦ ¦--expr: any [0/0] {16} - ¦ ¦ ¦ ¦ °--SYMBOL: any [0/0] {15} - ¦ ¦ ¦ ¦--')': ) [0/1] {17} - ¦ ¦ ¦ °--expr: { - [0/0] {18} - ¦ ¦ ¦ ¦--'{': { [0/14] {19} - ¦ ¦ ¦ ¦--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} - ¦ ¦ ¦--'(': ( [0/6] {28} - ¦ ¦ ¦--expr: 2 [1/7] {30} - ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {29} - ¦ ¦ °--')': ) [1/0] {31} - ¦ °--')': ) [0/0] {32} - °--expr: { - a [2/0] {33} - ¦--'{': { [0/2] {34} - ¦--expr: a <- - [1/0] {35} - ¦ ¦--expr: a [0/1] {37} - ¦ ¦ °--SYMBOL: a [0/0] {36} - ¦ ¦--LEFT_ASSIGN: <- [0/4] {38} - ¦ °--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 deleted file mode 100644 index ce4a97830..000000000 --- a/tests/testthat/indention_operators/eq_formal_simple-in_tree +++ /dev/null @@ -1,30 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: abbbb [0/0] {1} - ¦--expr: abbbb [0/1] {3} - ¦ °--SYMBOL: abbbb [0/0] {2} - ¦--LEFT_ASSIGN: <- [0/1] {4} - °--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: 22 [1/18] {11} - ¦ °--NUM_CONST: 22 [0/0] {10} - ¦--')': ) [1/1] {12} - °--expr: { - d [0/0] {13} - ¦--'{': { [0/2] {14} - ¦--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: long_ [1/2] {21} - ¦ ¦ ¦--expr: long_ [0/1] {23} - ¦ ¦ ¦ °--SYMBOL: long_ [0/0] {22} - ¦ ¦ ¦--'*': * [0/1] {24} - ¦ ¦ °--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 deleted file mode 100644 index 210e47a12..000000000 --- a/tests/testthat/indention_operators/eq_formals_complex_indention-in_tree +++ /dev/null @@ -1,166 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--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: 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} - ¦ ¦--'{': { [0/0] {12} - ¦ °--'}': } [0/0] {13} - ¦--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: 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} - ¦ ¦--'{': { [0/0] {25} - ¦ °--'}': } [0/0] {26} - ¦--expr: funct [2/0] {27} - ¦ ¦--FUNCTION: funct [0/0] {28} - ¦ ¦--'(': ( [0/0] {29} - ¦ ¦--SYMBOL_FORMALS: a [0/1] {30} - ¦ ¦--',': , [0/4] {31} - ¦ ¦--SYMBOL_FORMALS: b [1/0] {32} - ¦ ¦--',': , [0/0] {33} - ¦ ¦--SYMBOL_FORMALS: c [1/2] {34} - ¦ ¦--')': ) [1/1] {35} - ¦ °--expr: {} [0/0] {36} - ¦ ¦--'{': { [0/0] {37} - ¦ °--'}': } [0/0] {38} - ¦--expr: funct [2/0] {39} - ¦ ¦--FUNCTION: funct [0/0] {40} - ¦ ¦--'(': ( [0/0] {41} - ¦ ¦--SYMBOL_FORMALS: a [0/0] {42} - ¦ ¦--',': , [0/2] {43} - ¦ ¦--SYMBOL_FORMALS: b [1/0] {44} - ¦ ¦--',': , [0/0] {45} - ¦ ¦--SYMBOL_FORMALS: c [1/0] {46} - ¦ ¦--')': ) [0/1] {47} - ¦ °--expr: {} [0/0] {48} - ¦ ¦--'{': { [0/0] {49} - ¦ °--'}': } [0/0] {50} - ¦--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: 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: 4 [1/1] {64} - ¦ ¦ °--NUM_CONST: 4 [0/0] {63} - ¦ ¦--')': ) [1/1] {65} - ¦ °--expr: {} [0/0] {66} - ¦ ¦--'{': { [0/0] {67} - ¦ °--'}': } [0/0] {68} - ¦--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: b [1/0] {75} - ¦ ¦ °--SYMBOL: b [0/0] {74} - ¦ ¦--',': , [0/9] {76} - ¦ ¦--SYMBOL_FORMALS: f [1/1] {77} - ¦ ¦--EQ_FORMALS: = [0/11] {78} - ¦ ¦--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: 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: 4 [1/0] {90} - ¦ ¦ °--NUM_CONST: 4 [0/0] {89} - ¦ ¦--')': ) [0/1] {91} - ¦ °--expr: { - -} [0/0] {92} - ¦ ¦--'{': { [0/0] {93} - ¦ °--'}': } [2/0] {94} - ¦--COMMENT: # cla [3/0] {95} - ¦--expr: funct [1/0] {96} - ¦ ¦--FUNCTION: funct [0/0] {97} - ¦ ¦--'(': ( [0/0] {98} - ¦ ¦--SYMBOL_FORMALS: a [0/1] {99} - ¦ ¦--EQ_FORMALS: = [0/13] {100} - ¦ ¦--expr: 33 [1/0] {102} - ¦ ¦ °--NUM_CONST: 33 [0/0] {101} - ¦ ¦--',': , [0/9] {103} - ¦ ¦--SYMBOL_FORMALS: b [1/0] {104} - ¦ ¦--')': ) [1/1] {105} - ¦ °--expr: {} [0/0] {106} - ¦ ¦--'{': { [0/0] {107} - ¦ °--'}': } [0/0] {108} - ¦--expr: funct [2/0] {109} - ¦ ¦--FUNCTION: funct [0/0] {110} - ¦ ¦--'(': ( [0/0] {111} - ¦ ¦--SYMBOL_FORMALS: a [0/1] {112} - ¦ ¦--EQ_FORMALS: = [0/11] {113} - ¦ ¦--expr: 33 [1/0] {115} - ¦ ¦ °--NUM_CONST: 33 [0/0] {114} - ¦ ¦--',': , [0/12] {116} - ¦ ¦--SYMBOL_FORMALS: b [1/2] {117} - ¦ ¦--')': ) [0/1] {118} - ¦ °--expr: {} [0/0] {119} - ¦ ¦--'{': { [0/0] {120} - ¦ °--'}': } [0/0] {121} - ¦--expr: funct [2/0] {122} - ¦ ¦--FUNCTION: funct [0/0] {123} - ¦ ¦--'(': ( [0/0] {124} - ¦ ¦--SYMBOL_FORMALS: a [0/1] {125} - ¦ ¦--',': , [0/9] {126} - ¦ ¦--SYMBOL_FORMALS: b [1/0] {127} - ¦ ¦--',': , [0/0] {128} - ¦ ¦--SYMBOL_FORMALS: c [1/0] {129} - ¦ ¦--')': ) [1/1] {130} - ¦ °--expr: {} [0/0] {131} - ¦ ¦--'{': { [0/0] {132} - ¦ °--'}': } [0/0] {133} - ¦--expr: funct [2/0] {134} - ¦ ¦--FUNCTION: funct [0/0] {135} - ¦ ¦--'(': ( [0/0] {136} - ¦ ¦--SYMBOL_FORMALS: a [0/0] {137} - ¦ ¦--',': , [0/12] {138} - ¦ ¦--SYMBOL_FORMALS: b [1/0] {139} - ¦ ¦--',': , [0/9] {140} - ¦ ¦--SYMBOL_FORMALS: c [1/0] {141} - ¦ ¦--')': ) [0/1] {142} - ¦ °--expr: {} [0/0] {143} - ¦ ¦--'{': { [0/0] {144} - ¦ °--'}': } [0/0] {145} - °--expr: funct [2/0] {146} - ¦--FUNCTION: funct [0/0] {147} - ¦--'(': ( [0/0] {148} - ¦--SYMBOL_FORMALS: ss [0/0] {149} - ¦--',': , [0/11] {150} - ¦--SYMBOL_FORMALS: a [1/1] {151} - ¦--EQ_FORMALS: = [0/13] {152} - ¦--expr: 3 [1/0] {154} - ¦ °--NUM_CONST: 3 [0/0] {153} - ¦--',': , [0/9] {155} - ¦--SYMBOL_FORMALS: er [1/1] {156} - ¦--EQ_FORMALS: = [0/11] {157} - ¦--expr: 4 [1/0] {159} - ¦ °--NUM_CONST: 4 [0/0] {158} - ¦--')': ) [1/1] {160} - °--expr: {} [0/0] {161} - ¦--'{': { [0/0] {162} - °--'}': } [0/0] {163} diff --git a/tests/testthat/indention_operators/eq_formals_complex_indention-out.R b/tests/testthat/indention_operators/eq_formals_complex_indention-out.R index 305fe6e1c..a2e1d79b8 100644 --- a/tests/testthat/indention_operators/eq_formals_complex_indention-out.R +++ b/tests/testthat/indention_operators/eq_formals_complex_indention-out.R @@ -1,27 +1,27 @@ function(a = - 33, - b - ) {} + 33, + b +) {} function(a = - 33, - b) {} + 33, + b) {} function(a, - b, - c - ) {} + b, + c +) {} function(a, - b, - c) {} + b, + c) {} function(ss, - a = - 3, - er = - 4 - ) {} + a = + 3, + er = + 4 +) {} function(a = b, diff --git a/tests/testthat/indention_operators/eq_formals_complex_tokens-in_tree b/tests/testthat/indention_operators/eq_formals_complex_tokens-in_tree deleted file mode 100644 index dde5f33df..000000000 --- a/tests/testthat/indention_operators/eq_formals_complex_tokens-in_tree +++ /dev/null @@ -1,97 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--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: 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} - ¦ ¦--'{': { [0/0] {12} - ¦ °--'}': } [0/0] {13} - ¦--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: 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} - ¦ ¦--'{': { [0/0] {25} - ¦ °--'}': } [0/0] {26} - ¦--expr: funct [2/0] {27} - ¦ ¦--FUNCTION: funct [0/0] {28} - ¦ ¦--'(': ( [0/0] {29} - ¦ ¦--SYMBOL_FORMALS: a [0/1] {30} - ¦ ¦--',': , [0/4] {31} - ¦ ¦--SYMBOL_FORMALS: b [1/0] {32} - ¦ ¦--',': , [0/0] {33} - ¦ ¦--SYMBOL_FORMALS: c [1/2] {34} - ¦ ¦--')': ) [1/1] {35} - ¦ °--expr: {} [0/0] {36} - ¦ ¦--'{': { [0/0] {37} - ¦ °--'}': } [0/0] {38} - ¦--expr: funct [2/0] {39} - ¦ ¦--FUNCTION: funct [0/0] {40} - ¦ ¦--'(': ( [0/0] {41} - ¦ ¦--SYMBOL_FORMALS: a [0/0] {42} - ¦ ¦--',': , [0/2] {43} - ¦ ¦--SYMBOL_FORMALS: b [1/0] {44} - ¦ ¦--',': , [0/0] {45} - ¦ ¦--SYMBOL_FORMALS: c [1/0] {46} - ¦ ¦--')': ) [0/1] {47} - ¦ °--expr: {} [0/0] {48} - ¦ ¦--'{': { [0/0] {49} - ¦ °--'}': } [0/0] {50} - ¦--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: 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: 4 [1/1] {64} - ¦ ¦ °--NUM_CONST: 4 [0/0] {63} - ¦ ¦--')': ) [1/1] {65} - ¦ °--expr: {} [0/0] {66} - ¦ ¦--'{': { [0/0] {67} - ¦ °--'}': } [0/0] {68} - °--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: b [1/0] {75} - ¦ °--SYMBOL: b [0/0] {74} - ¦--',': , [0/9] {76} - ¦--SYMBOL_FORMALS: f [1/1] {77} - ¦--EQ_FORMALS: = [0/11] {78} - ¦--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: 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: 4 [1/0] {90} - ¦ °--NUM_CONST: 4 [0/0] {89} - ¦--')': ) [0/1] {91} - °--expr: { - -} [0/0] {92} - ¦--'{': { [0/0] {93} - °--'}': } [2/0] {94} diff --git a/tests/testthat/indention_operators/eq_formals_complex_tokens-out.R b/tests/testthat/indention_operators/eq_formals_complex_tokens-out.R index 612a4beed..9c001e666 100644 --- a/tests/testthat/indention_operators/eq_formals_complex_tokens-out.R +++ b/tests/testthat/indention_operators/eq_formals_complex_tokens-out.R @@ -1,35 +1,38 @@ function( - a = - 33, - b) {} + a = + 33, + b +) {} function( - a = - 33, - b) {} + a = + 33, + b +) {} function( - a, - b, - c) {} + a, + b, + c +) {} function( - a, - b, - c) {} + a, + b, + c +) {} function( - ss, - a = - 3, - er = - 4) {} + ss, + a = + 3, + er = + 4 +) {} function(a = b, f = d, c = 3, d = - 4) { - -} + 4) {} diff --git a/tests/testthat/indention_operators/eq_sub_complex_indention-in_tree b/tests/testthat/indention_operators/eq_sub_complex_indention-in_tree deleted file mode 100644 index 51e45b4fa..000000000 --- a/tests/testthat/indention_operators/eq_sub_complex_indention-in_tree +++ /dev/null @@ -1,118 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--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: 5 [1/0] {8} - ¦ ¦ °--NUM_CONST: 5 [0/0] {7} - ¦ ¦--',': , [0/5] {9} - ¦ ¦--expr: b [1/0] {11} - ¦ ¦ °--SYMBOL: b [0/0] {10} - ¦ °--')': ) [0/0] {12} - ¦--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: 5 [1/0] {20} - ¦ ¦ °--NUM_CONST: 5 [0/0] {19} - ¦ ¦--',': , [0/5] {21} - ¦ ¦--expr: b [1/5] {23} - ¦ ¦ °--SYMBOL: b [0/0] {22} - ¦ °--')': ) [1/0] {24} - ¦--COMMENT: # mul [2/0] {25} - ¦--expr: { - v [1/0] {26} - ¦ ¦--'{': { [0/2] {27} - ¦ ¦--expr: v <- [1/0] {28} - ¦ ¦ ¦--expr: v [0/1] {30} - ¦ ¦ ¦ °--SYMBOL: v [0/0] {29} - ¦ ¦ ¦--LEFT_ASSIGN: <- [0/1] {31} - ¦ ¦ °--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: 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} - ¦ ¦ ¦--'{': { [0/7] {43} - ¦ ¦ °--'}': } [1/0] {44} - ¦ °--'}': } [1/0] {45} - ¦--expr: { - [3/0] {46} - ¦ ¦--'{': { [0/8] {47} - ¦ ¦--expr: v <- [1/0] {48} - ¦ ¦ ¦--expr: v [0/1] {50} - ¦ ¦ ¦ °--SYMBOL: v [0/0] {49} - ¦ ¦ ¦--LEFT_ASSIGN: <- [0/1] {51} - ¦ ¦ °--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: 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} - ¦ ¦ ¦--'{': { [0/8] {63} - ¦ ¦ °--'}': } [1/0] {64} - ¦ °--'}': } [1/0] {65} - °--expr: MyCla [2/0] {66} - ¦--expr: MyCla [0/1] {68} - ¦ °--SYMBOL: MyCla [0/0] {67} - ¦--LEFT_ASSIGN: <- [0/1] {69} - °--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: "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: 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: 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: 1 [0/0] {95} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {94} - ¦ ¦ ¦--')': ) [0/1] {96} - ¦ ¦ °--expr: { - [0/0] {97} - ¦ ¦ ¦--'{': { [0/16] {98} - ¦ ¦ ¦--expr: retur [1/8] {99} - ¦ ¦ ¦ ¦--expr: retur [0/0] {101} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: retur [0/0] {100} - ¦ ¦ ¦ ¦--'(': ( [0/0] {102} - ¦ ¦ ¦ ¦--expr: invis [0/0] {103} - ¦ ¦ ¦ ¦ ¦--expr: invis [0/0] {105} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: invis [0/0] {104} - ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {106} - ¦ ¦ ¦ ¦ °--')': ) [0/0] {107} - ¦ ¦ ¦ °--')': ) [0/0] {108} - ¦ ¦ °--'}': } [1/0] {109} - ¦ °--')': ) [1/0] {110} - ¦--',': , [0/0] {111} - °--')': ) [1/0] {112} diff --git a/tests/testthat/indention_operators/eq_sub_complex_indention-out.R b/tests/testthat/indention_operators/eq_sub_complex_indention-out.R index 02b322973..03c121d81 100644 --- a/tests/testthat/indention_operators/eq_sub_complex_indention-out.R +++ b/tests/testthat/indention_operators/eq_sub_complex_indention-out.R @@ -10,8 +10,8 @@ b # multiple nested levels { v <- function(x = - 122, - y) { + 122, + y) { } } diff --git a/tests/testthat/indention_operators/eq_sub_complex_tokens-in_tree b/tests/testthat/indention_operators/eq_sub_complex_tokens-in_tree deleted file mode 100644 index f9605b5f9..000000000 --- a/tests/testthat/indention_operators/eq_sub_complex_tokens-in_tree +++ /dev/null @@ -1,41 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--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: 5 [1/0] {8} - ¦ ¦ °--NUM_CONST: 5 [0/0] {7} - ¦ ¦--',': , [0/5] {9} - ¦ ¦--expr: b [1/0] {11} - ¦ ¦ °--SYMBOL: b [0/0] {10} - ¦ °--')': ) [0/0] {12} - ¦--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: 5 [1/0] {20} - ¦ ¦ °--NUM_CONST: 5 [0/0] {19} - ¦ ¦--',': , [0/5] {21} - ¦ ¦--expr: b [1/5] {23} - ¦ ¦ °--SYMBOL: b [0/0] {22} - ¦ °--')': ) [1/0] {24} - °--expr: c( - [2/0] {25} - ¦--expr: c [0/0] {27} - ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {26} - ¦--'(': ( [0/8] {28} - ¦--SYMBOL_SUB: a [1/1] {29} - ¦--EQ_SUB: = [0/16] {30} - ¦--expr: 1 [1/0] {32} - ¦ °--NUM_CONST: 1 [0/0] {31} - ¦--',': , [0/8] {33} - ¦--SYMBOL_SUB: b [1/1] {34} - ¦--EQ_SUB: = [0/1] {35} - ¦--COMMENT: # com [0/16] {36} - ¦--expr: 2 [1/0] {38} - ¦ °--NUM_CONST: 2 [0/0] {37} - °--')': ) [1/0] {39} diff --git a/tests/testthat/indention_operators/function-multiline-no-braces-in_tree b/tests/testthat/indention_operators/function-multiline-no-braces-in_tree deleted file mode 100644 index 767984697..000000000 --- a/tests/testthat/indention_operators/function-multiline-no-braces-in_tree +++ /dev/null @@ -1,102 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: [0/0] {1} - ¦ ¦--expr: [0/1] {3} - ¦ ¦ °--SYMBOL: g [0/0] {2} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {4} - ¦ °--expr: [0/0] {5} - ¦ ¦--FUNCTION: funct [0/0] {6} - ¦ ¦--'(': ( [0/0] {7} - ¦ ¦--SYMBOL_FORMALS: k [0/0] {8} - ¦ ¦--')': ) [0/2] {9} - ¦ °--expr: [1/0] {11} - ¦ °--NULL_CONST: NULL [0/0] {10} - ¦--expr: [3/0] {12} - ¦ ¦--expr: [0/1] {14} - ¦ ¦ °--SYMBOL: g [0/0] {13} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {15} - ¦ °--expr: [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} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: h [0/0] {22} - ¦ ¦--'(': ( [0/2] {24} - ¦ ¦--expr: [1/0] {26} - ¦ ¦ °--NULL_CONST: NULL [0/0] {25} - ¦ °--')': ) [1/0] {27} - ¦--expr: [3/0] {28} - ¦ ¦--expr: [0/1] {30} - ¦ ¦ °--SYMBOL: g [0/0] {29} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {31} - ¦ °--expr: [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} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: h [0/0] {38} - ¦ ¦--'(': ( [0/1] {40} - ¦ ¦--COMMENT: # y [0/2] {41} - ¦ ¦--expr: [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} - ¦ ¦ °--SYMBOL: g [0/0] {47} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {49} - ¦ °--expr: [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} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: h [0/0] {56} - ¦ ¦--'(': ( [0/1] {58} - ¦ ¦--COMMENT: # y [0/2] {59} - ¦ ¦--expr: [1/0] {61} - ¦ ¦ °--NULL_CONST: NULL [0/0] {60} - ¦ °--')': ) [1/0] {62} - ¦--expr: [3/0] {63} - ¦ ¦--expr: [0/1] {65} - ¦ ¦ °--SYMBOL: g [0/0] {64} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {66} - ¦ °--expr: [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} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: h [0/0] {73} - ¦ ¦--'(': ( [0/2] {75} - ¦ ¦--expr: [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} - ¦ °--SYMBOL: g [0/0] {81} - ¦--LEFT_ASSIGN: <- [0/1] {83} - °--expr: [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} - ¦ °--SYMBOL_FUNCTION_CALL: h [0/0] {90} - ¦--'(': ( [0/2] {92} - ¦--expr: [1/0] {93} - ¦ ¦--IF: if [0/1] {94} - ¦ ¦--'(': ( [0/0] {95} - ¦ ¦--expr: [0/0] {97} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {96} - ¦ ¦--')': ) [0/4] {98} - ¦ °--expr: [1/0] {100} - ¦ °--SYMBOL: x [0/0] {99} - °--')': ) [1/0] {101} 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 deleted file mode 100644 index aa5df2234..000000000 --- a/tests/testthat/indention_operators/function-multiline-no-braces-non-strict-in_tree +++ /dev/null @@ -1,105 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: g <- [0/0] {1} - ¦ ¦--expr: g [0/1] {3} - ¦ ¦ °--SYMBOL: g [0/0] {2} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {4} - ¦ °--expr: funct [0/0] {5} - ¦ ¦--FUNCTION: funct [0/0] {6} - ¦ ¦--'(': ( [0/0] {7} - ¦ ¦--SYMBOL_FORMALS: k [0/0] {8} - ¦ ¦--')': ) [0/2] {9} - ¦ °--expr: NULL [1/0] {11} - ¦ °--NULL_CONST: NULL [0/0] {10} - ¦--expr: g <- [3/0] {12} - ¦ ¦--expr: g [0/1] {14} - ¦ ¦ °--SYMBOL: g [0/0] {13} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {15} - ¦ °--expr: funct [0/0] {16} - ¦ ¦--FUNCTION: funct [0/0] {17} - ¦ ¦--'(': ( [0/0] {18} - ¦ ¦--SYMBOL_FORMALS: k [0/0] {19} - ¦ ¦--')': ) [0/1] {20} - ¦ °--expr: h( - [0/0] {21} - ¦ ¦--expr: h [0/0] {23} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: h [0/0] {22} - ¦ ¦--'(': ( [0/2] {24} - ¦ ¦--expr: NULL [1/0] {26} - ¦ ¦ °--NULL_CONST: NULL [0/0] {25} - ¦ °--')': ) [1/0] {27} - ¦--expr: g <- [3/0] {28} - ¦ ¦--expr: g [0/1] {30} - ¦ ¦ °--SYMBOL: g [0/0] {29} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {31} - ¦ °--expr: funct [0/0] {32} - ¦ ¦--FUNCTION: funct [0/0] {33} - ¦ ¦--'(': ( [0/0] {34} - ¦ ¦--SYMBOL_FORMALS: k [0/0] {35} - ¦ ¦--')': ) [0/1] {36} - ¦ °--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: NULL [1/1] {43} - ¦ ¦ °--NULL_CONST: NULL [0/0] {42} - ¦ ¦--COMMENT: # x [0/0] {44} - ¦ °--')': ) [1/0] {45} - ¦--expr: g <- [2/0] {46} - ¦ ¦--expr: g [0/1] {48} - ¦ ¦ °--SYMBOL: g [0/0] {47} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {49} - ¦ °--expr: funct [0/0] {50} - ¦ ¦--FUNCTION: funct [0/0] {51} - ¦ ¦--'(': ( [0/0] {52} - ¦ ¦--SYMBOL_FORMALS: k [0/0] {53} - ¦ ¦--')': ) [0/1] {54} - ¦ °--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: NULL [1/0] {61} - ¦ ¦ °--NULL_CONST: NULL [0/0] {60} - ¦ °--')': ) [1/0] {62} - ¦--expr: g <- [3/0] {63} - ¦ ¦--expr: g [0/1] {65} - ¦ ¦ °--SYMBOL: g [0/0] {64} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {66} - ¦ °--expr: funct [0/0] {67} - ¦ ¦--FUNCTION: funct [0/0] {68} - ¦ ¦--'(': ( [0/0] {69} - ¦ ¦--SYMBOL_FORMALS: k [0/0] {70} - ¦ ¦--')': ) [0/1] {71} - ¦ °--expr: h( - [0/0] {72} - ¦ ¦--expr: h [0/0] {74} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: h [0/0] {73} - ¦ ¦--'(': ( [0/2] {75} - ¦ ¦--expr: NULL [1/1] {77} - ¦ ¦ °--NULL_CONST: NULL [0/0] {76} - ¦ ¦--COMMENT: # 3jk [0/0] {78} - ¦ °--')': ) [1/0] {79} - °--expr: g <- [2/0] {80} - ¦--expr: g [0/1] {82} - ¦ °--SYMBOL: g [0/0] {81} - ¦--LEFT_ASSIGN: <- [0/1] {83} - °--expr: funct [0/0] {84} - ¦--FUNCTION: funct [0/0] {85} - ¦--'(': ( [0/0] {86} - ¦--SYMBOL_FORMALS: k [0/0] {87} - ¦--')': ) [0/1] {88} - °--expr: h( - [0/0] {89} - ¦--expr: h [0/0] {91} - ¦ °--SYMBOL_FUNCTION_CALL: h [0/0] {90} - ¦--'(': ( [0/2] {92} - ¦--expr: if (T [1/0] {93} - ¦ ¦--IF: if [0/1] {94} - ¦ ¦--'(': ( [0/0] {95} - ¦ ¦--expr: TRUE [0/0] {97} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {96} - ¦ ¦--')': ) [0/4] {98} - ¦ °--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 deleted file mode 100644 index aa5df2234..000000000 --- a/tests/testthat/indention_operators/function-multiline-no-braces-strict-in_tree +++ /dev/null @@ -1,105 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: g <- [0/0] {1} - ¦ ¦--expr: g [0/1] {3} - ¦ ¦ °--SYMBOL: g [0/0] {2} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {4} - ¦ °--expr: funct [0/0] {5} - ¦ ¦--FUNCTION: funct [0/0] {6} - ¦ ¦--'(': ( [0/0] {7} - ¦ ¦--SYMBOL_FORMALS: k [0/0] {8} - ¦ ¦--')': ) [0/2] {9} - ¦ °--expr: NULL [1/0] {11} - ¦ °--NULL_CONST: NULL [0/0] {10} - ¦--expr: g <- [3/0] {12} - ¦ ¦--expr: g [0/1] {14} - ¦ ¦ °--SYMBOL: g [0/0] {13} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {15} - ¦ °--expr: funct [0/0] {16} - ¦ ¦--FUNCTION: funct [0/0] {17} - ¦ ¦--'(': ( [0/0] {18} - ¦ ¦--SYMBOL_FORMALS: k [0/0] {19} - ¦ ¦--')': ) [0/1] {20} - ¦ °--expr: h( - [0/0] {21} - ¦ ¦--expr: h [0/0] {23} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: h [0/0] {22} - ¦ ¦--'(': ( [0/2] {24} - ¦ ¦--expr: NULL [1/0] {26} - ¦ ¦ °--NULL_CONST: NULL [0/0] {25} - ¦ °--')': ) [1/0] {27} - ¦--expr: g <- [3/0] {28} - ¦ ¦--expr: g [0/1] {30} - ¦ ¦ °--SYMBOL: g [0/0] {29} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {31} - ¦ °--expr: funct [0/0] {32} - ¦ ¦--FUNCTION: funct [0/0] {33} - ¦ ¦--'(': ( [0/0] {34} - ¦ ¦--SYMBOL_FORMALS: k [0/0] {35} - ¦ ¦--')': ) [0/1] {36} - ¦ °--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: NULL [1/1] {43} - ¦ ¦ °--NULL_CONST: NULL [0/0] {42} - ¦ ¦--COMMENT: # x [0/0] {44} - ¦ °--')': ) [1/0] {45} - ¦--expr: g <- [2/0] {46} - ¦ ¦--expr: g [0/1] {48} - ¦ ¦ °--SYMBOL: g [0/0] {47} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {49} - ¦ °--expr: funct [0/0] {50} - ¦ ¦--FUNCTION: funct [0/0] {51} - ¦ ¦--'(': ( [0/0] {52} - ¦ ¦--SYMBOL_FORMALS: k [0/0] {53} - ¦ ¦--')': ) [0/1] {54} - ¦ °--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: NULL [1/0] {61} - ¦ ¦ °--NULL_CONST: NULL [0/0] {60} - ¦ °--')': ) [1/0] {62} - ¦--expr: g <- [3/0] {63} - ¦ ¦--expr: g [0/1] {65} - ¦ ¦ °--SYMBOL: g [0/0] {64} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {66} - ¦ °--expr: funct [0/0] {67} - ¦ ¦--FUNCTION: funct [0/0] {68} - ¦ ¦--'(': ( [0/0] {69} - ¦ ¦--SYMBOL_FORMALS: k [0/0] {70} - ¦ ¦--')': ) [0/1] {71} - ¦ °--expr: h( - [0/0] {72} - ¦ ¦--expr: h [0/0] {74} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: h [0/0] {73} - ¦ ¦--'(': ( [0/2] {75} - ¦ ¦--expr: NULL [1/1] {77} - ¦ ¦ °--NULL_CONST: NULL [0/0] {76} - ¦ ¦--COMMENT: # 3jk [0/0] {78} - ¦ °--')': ) [1/0] {79} - °--expr: g <- [2/0] {80} - ¦--expr: g [0/1] {82} - ¦ °--SYMBOL: g [0/0] {81} - ¦--LEFT_ASSIGN: <- [0/1] {83} - °--expr: funct [0/0] {84} - ¦--FUNCTION: funct [0/0] {85} - ¦--'(': ( [0/0] {86} - ¦--SYMBOL_FORMALS: k [0/0] {87} - ¦--')': ) [0/1] {88} - °--expr: h( - [0/0] {89} - ¦--expr: h [0/0] {91} - ¦ °--SYMBOL_FUNCTION_CALL: h [0/0] {90} - ¦--'(': ( [0/2] {92} - ¦--expr: if (T [1/0] {93} - ¦ ¦--IF: if [0/1] {94} - ¦ ¦--'(': ( [0/0] {95} - ¦ ¦--expr: TRUE [0/0] {97} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {96} - ¦ ¦--')': ) [0/4] {98} - ¦ °--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 deleted file mode 100644 index 450857878..000000000 --- a/tests/testthat/indention_operators/if-else-no-braces-not-strict-in_tree +++ /dev/null @@ -1,71 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: if (T [0/0] {1} - ¦ ¦--IF: if [0/1] {2} - ¦ ¦--'(': ( [0/0] {3} - ¦ ¦--expr: TRUE [0/0] {5} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {4} - ¦ ¦--')': ) [0/1] {6} - ¦ ¦--expr: c( - [0/1] {7} - ¦ ¦ ¦--expr: c [0/0] {9} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {8} - ¦ ¦ ¦--'(': ( [0/2] {10} - ¦ ¦ ¦--expr: 2 [1/0] {12} - ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {11} - ¦ ¦ °--')': ) [1/0] {13} - ¦ ¦--ELSE: else [0/1] {14} - ¦ °--expr: c( - [0/0] {15} - ¦ ¦--expr: c [0/0] {17} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {16} - ¦ ¦--'(': ( [0/2] {18} - ¦ ¦--expr: 1 [1/0] {20} - ¦ ¦ °--NUM_CONST: 1 [0/0] {19} - ¦ °--')': ) [1/0] {21} - ¦--expr: if (T [2/0] {22} - ¦ ¦--IF: if [0/1] {23} - ¦ ¦--'(': ( [0/0] {24} - ¦ ¦--expr: TRUE [0/0] {26} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {25} - ¦ ¦--')': ) [0/1] {27} - ¦ ¦--expr: c( - [0/1] {28} - ¦ ¦ ¦--expr: c [0/0] {30} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {29} - ¦ ¦ ¦--'(': ( [0/2] {31} - ¦ ¦ ¦--expr: 2 [1/0] {33} - ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {32} - ¦ ¦ °--')': ) [1/0] {34} - ¦ ¦--ELSE: else [0/1] {35} - ¦ °--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 [1/0] {42} - ¦ ¦ °--NUM_CONST: 1 [0/0] {41} - ¦ °--')': ) [1/0] {43} - °--expr: if (T [2/0] {44} - ¦--IF: if [0/1] {45} - ¦--'(': ( [0/0] {46} - ¦--expr: TRUE [0/0] {48} - ¦ °--NUM_CONST: TRUE [0/0] {47} - ¦--')': ) [0/1] {49} - ¦--expr: c( - [0/1] {50} - ¦ ¦--expr: c [0/0] {52} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {51} - ¦ ¦--'(': ( [0/2] {53} - ¦ ¦--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: c( - [0/0] {59} - ¦--expr: c [0/0] {61} - ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {60} - ¦--'(': ( [0/2] {62} - ¦--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 deleted file mode 100644 index 79e0333ae..000000000 --- a/tests/testthat/indention_operators/logical_special_eq_sub-in_tree +++ /dev/null @@ -1,47 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: a || - [0/2] {1} - ¦ ¦--expr: a [0/1] {3} - ¦ ¦ °--SYMBOL: a [0/0] {2} - ¦ ¦--OR2: || [0/0] {4} - ¦ °--expr: b [1/0] {6} - ¦ °--SYMBOL: b [0/0] {5} - ¦--expr: a > -4 [2/0] {7} - ¦ ¦--expr: a [0/1] {9} - ¦ ¦ °--SYMBOL: a [0/0] {8} - ¦ ¦--GT: > [0/0] {10} - ¦ °--expr: 4 [1/0] {12} - ¦ °--NUM_CONST: 4 [0/0] {11} - ¦--expr: a& -3 [2/0] {13} - ¦ ¦--expr: a [0/0] {15} - ¦ ¦ °--SYMBOL: a [0/0] {14} - ¦ ¦--AND: & [0/0] {16} - ¦ °--expr: 3 [1/0] {18} - ¦ °--NUM_CONST: 3 [0/0] {17} - ¦--expr: b %in [2/0] {19} - ¦ ¦--expr: b [0/1] {21} - ¦ ¦ °--SYMBOL: b [0/0] {20} - ¦ ¦--SPECIAL-IN: %in% [0/1] {22} - ¦ °--expr: c [1/0] {24} - ¦ °--SYMBOL: c [0/0] {23} - ¦--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: 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} - °--expr_or_assign_or_help: b = -3 [1/0] {37} - ¦--expr: b [0/1] {39} - ¦ °--SYMBOL: b [0/0] {38} - ¦--EQ_ASSIGN: = [0/0] {40} - °--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 deleted file mode 100644 index 22a0e338c..000000000 --- a/tests/testthat/indention_operators/multiply_divide-in_tree +++ /dev/null @@ -1,33 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: 1 / -2 [0/3] {1} - ¦ ¦--expr: 1 [0/1] {4} - ¦ ¦ °--NUM_CONST: 1 [0/0] {3} - ¦ ¦--'/': / [0/0] {5} - ¦ ¦--expr: 2 [1/1] {7} - ¦ ¦ °--NUM_CONST: 2 [0/0] {6} - ¦ ¦--'+': + [0/1] {8} - ¦ °--expr: 3 * -1 [0/0] {9} - ¦ ¦--expr: 3 [0/1] {14} - ¦ ¦ °--NUM_CONST: 3 [0/0] {13} - ¦ ¦--'*': * [0/0] {15} - ¦ ¦--expr: 17 [1/1] {17} - ¦ ¦ °--NUM_CONST: 17 [0/0] {16} - ¦ ¦--'*': * [0/0] {18} - ¦ ¦--expr: 22222 [1/1] {20} - ¦ ¦ °--NUM_CONST: 22222 [0/0] {19} - ¦ ¦--'/': / [0/6] {21} - ¦ ¦--expr: 19 [1/1] {23} - ¦ ¦ °--NUM_CONST: 19 [0/0] {22} - ¦ ¦--'*': * [0/6] {24} - ¦ °--expr: -1 [1/0] {25} - ¦ ¦--'-': - [0/0] {26} - ¦ °--expr: 1 [0/0] {28} - ¦ °--NUM_CONST: 1 [0/0] {27} - °--expr: 3 * 2 [2/0] {29} - ¦--expr: 3 [0/1] {31} - ¦ °--NUM_CONST: 3 [0/0] {30} - ¦--'*': * [0/1] {32} - °--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 deleted file mode 100644 index a6579de76..000000000 --- a/tests/testthat/indention_operators/nested-for-spacing-scope-indention-in_tree +++ /dev/null @@ -1,54 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: for ( [0/0] {1} - ¦ ¦--FOR: for [0/1] {2} - ¦ ¦--forcond: (x in [0/0] {3} - ¦ ¦ ¦--'(': ( [0/0] {4} - ¦ ¦ ¦--SYMBOL: x [0/1] {5} - ¦ ¦ ¦--IN: in [0/1] {6} - ¦ ¦ ¦--expr: 1 [0/0] {8} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {7} - ¦ ¦ °--')': ) [0/0] {9} - ¦ °--expr: { -x -f [0/0] {10} - ¦ ¦--'{': { [0/0] {11} - ¦ ¦--expr: x [1/0] {13} - ¦ ¦ °--SYMBOL: x [0/0] {12} - ¦ ¦--expr: for ( [1/0] {14} - ¦ ¦ ¦--FOR: for [0/1] {15} - ¦ ¦ ¦--forcond: (x in [0/0] {16} - ¦ ¦ ¦ ¦--'(': ( [0/0] {17} - ¦ ¦ ¦ ¦--SYMBOL: x [0/1] {18} - ¦ ¦ ¦ ¦--IN: in [0/1] {19} - ¦ ¦ ¦ ¦--expr: k [0/1] {21} - ¦ ¦ ¦ ¦ °--SYMBOL: k [0/0] {20} - ¦ ¦ ¦ °--')': ) [0/0] {22} - ¦ ¦ °--expr: 3 [1/0] {24} - ¦ ¦ °--NUM_CONST: 3 [0/0] {23} - ¦ °--'}': } [1/0] {25} - °--expr: for ( [2/0] {26} - ¦--FOR: for [0/1] {27} - ¦--forcond: (x in [0/1] {28} - ¦ ¦--'(': ( [0/0] {29} - ¦ ¦--SYMBOL: x [0/1] {30} - ¦ ¦--IN: in [0/1] {31} - ¦ ¦--expr: 1 [0/0] {33} - ¦ ¦ °--NUM_CONST: 1 [0/0] {32} - ¦ °--')': ) [0/0] {34} - °--expr: { - x [0/0] {35} - ¦--'{': { [0/2] {36} - ¦--expr: x [1/2] {38} - ¦ °--SYMBOL: x [0/0] {37} - ¦--expr: for ( [1/0] {39} - ¦ ¦--FOR: for [0/1] {40} - ¦ ¦--forcond: (x in [0/2] {41} - ¦ ¦ ¦--'(': ( [0/0] {42} - ¦ ¦ ¦--SYMBOL: x [0/1] {43} - ¦ ¦ ¦--IN: in [0/1] {44} - ¦ ¦ ¦--expr: k [0/1] {46} - ¦ ¦ ¦ °--SYMBOL: k [0/0] {45} - ¦ ¦ °--')': ) [0/0] {47} - ¦ °--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 deleted file mode 100644 index 2f0f75e20..000000000 --- a/tests/testthat/indention_operators/nested-for-spacing-scope-spaces-in_tree +++ /dev/null @@ -1,53 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: for ( [0/0] {1} - ¦ ¦--FOR: for [0/1] {2} - ¦ ¦--forcond: (x in [0/1] {3} - ¦ ¦ ¦--'(': ( [0/0] {4} - ¦ ¦ ¦--SYMBOL: x [0/1] {5} - ¦ ¦ ¦--IN: in [0/1] {6} - ¦ ¦ ¦--expr: 1 [0/0] {8} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {7} - ¦ ¦ °--')': ) [0/0] {9} - ¦ °--expr: { - x [0/0] {10} - ¦ ¦--'{': { [0/2] {11} - ¦ ¦--expr: x [1/2] {13} - ¦ ¦ °--SYMBOL: x [0/0] {12} - ¦ ¦--expr: for ( [1/0] {14} - ¦ ¦ ¦--FOR: for [0/1] {15} - ¦ ¦ ¦--forcond: (x in [0/4] {16} - ¦ ¦ ¦ ¦--'(': ( [0/0] {17} - ¦ ¦ ¦ ¦--SYMBOL: x [0/1] {18} - ¦ ¦ ¦ ¦--IN: in [0/1] {19} - ¦ ¦ ¦ ¦--expr: k [0/1] {21} - ¦ ¦ ¦ ¦ °--SYMBOL: k [0/0] {20} - ¦ ¦ ¦ °--')': ) [0/0] {22} - ¦ ¦ °--expr: 3 [1/0] {24} - ¦ ¦ °--NUM_CONST: 3 [0/0] {23} - ¦ °--'}': } [1/0] {25} - °--expr: for ( [2/0] {26} - ¦--FOR: for [0/1] {27} - ¦--forcond: (x in [0/1] {28} - ¦ ¦--'(': ( [0/0] {29} - ¦ ¦--SYMBOL: x [0/1] {30} - ¦ ¦--IN: in [0/1] {31} - ¦ ¦--expr: 1 [0/0] {33} - ¦ ¦ °--NUM_CONST: 1 [0/0] {32} - ¦ °--')': ) [0/0] {34} - °--expr: { - x [0/0] {35} - ¦--'{': { [0/2] {36} - ¦--expr: x [1/2] {38} - ¦ °--SYMBOL: x [0/0] {37} - ¦--expr: for ( [1/0] {39} - ¦ ¦--FOR: for [0/1] {40} - ¦ ¦--forcond: (x in [0/2] {41} - ¦ ¦ ¦--'(': ( [0/0] {42} - ¦ ¦ ¦--SYMBOL: x [0/1] {43} - ¦ ¦ ¦--IN: in [0/1] {44} - ¦ ¦ ¦--expr: k [0/1] {46} - ¦ ¦ ¦ °--SYMBOL: k [0/0] {45} - ¦ ¦ °--')': ) [0/0] {47} - ¦ °--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 deleted file mode 100644 index a25d4081f..000000000 --- a/tests/testthat/indention_operators/not_first_trigger-in_tree +++ /dev/null @@ -1,70 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: 1+ ( - [0/0] {1} - ¦ ¦--expr: 1 [0/0] {3} - ¦ ¦ °--NUM_CONST: 1 [0/0] {2} - ¦ ¦--'+': + [0/1] {4} - ¦ ¦--expr: ( - 3 [0/1] {6} - ¦ ¦ ¦--'(': ( [0/2] {7} - ¦ ¦ ¦--expr: 3 [1/0] {9} - ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {8} - ¦ ¦ °--')': ) [1/0] {10} - ¦ ¦--SPECIAL-PIPE: %>% [0/0] {11} - ¦ °--expr: j() [1/0] {12} - ¦ ¦--expr: j [0/0] {14} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: j [0/0] {13} - ¦ ¦--'(': ( [0/0] {15} - ¦ °--')': ) [0/0] {16} - ¦--expr: a <- [2/0] {17} - ¦ ¦--expr: a [0/1] {19} - ¦ ¦ °--SYMBOL: a [0/0] {18} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {20} - ¦ ¦--expr: c(x, [0/1] {22} - ¦ ¦ ¦--expr: c [0/0] {24} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {23} - ¦ ¦ ¦--'(': ( [0/0] {25} - ¦ ¦ ¦--expr: x [0/0] {27} - ¦ ¦ ¦ °--SYMBOL: x [0/0] {26} - ¦ ¦ ¦--',': , [0/1] {28} - ¦ ¦ ¦--expr: y [0/0] {30} - ¦ ¦ ¦ °--SYMBOL: y [0/0] {29} - ¦ ¦ ¦--',': , [0/7] {31} - ¦ ¦ ¦--expr: z [1/0] {33} - ¦ ¦ ¦ °--SYMBOL: z [0/0] {32} - ¦ ¦ °--')': ) [0/0] {34} - ¦ ¦--SPECIAL-PIPE: %>% [0/0] {35} - ¦ °--expr: k() [1/0] {36} - ¦ ¦--expr: k [0/0] {38} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: k [0/0] {37} - ¦ ¦--'(': ( [0/0] {39} - ¦ °--')': ) [0/0] {40} - °--expr: a + ( [2/0] {41} - ¦--expr: a [0/1] {44} - ¦ °--SYMBOL: a [0/0] {43} - ¦--'+': + [0/1] {45} - ¦--expr: ( - c [0/3] {46} - ¦ ¦--'(': ( [0/2] {47} - ¦ ¦--expr: c [1/0] {49} - ¦ ¦ °--SYMBOL: c [0/0] {48} - ¦ °--')': ) [1/0] {50} - ¦--'+': + [0/1] {51} - ¦--expr: ( - c( [0/0] {53} - ¦ ¦--'(': ( [0/1] {54} - ¦ ¦--expr: c( - [1/0] {55} - ¦ ¦ ¦--expr: c [0/0] {57} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {56} - ¦ ¦ ¦--'(': ( [0/2] {58} - ¦ ¦ ¦--expr: 2 [1/5] {60} - ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {59} - ¦ ¦ °--')': ) [1/0] {61} - ¦ °--')': ) [1/0] {62} - ¦--SPECIAL-PIPE: %>% [0/0] {63} - °--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 deleted file mode 100644 index 9f04d8e5d..000000000 --- a/tests/testthat/indention_operators/overall-in_tree +++ /dev/null @@ -1,186 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: pd%>% [0/0] {1} - ¦ ¦--expr: pd [0/0] {6} - ¦ ¦ °--SYMBOL: pd [0/0] {5} - ¦ ¦--SPECIAL-PIPE: %>% [0/0] {7} - ¦ ¦--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: devid [0/0] {14} - ¦ ¦ ¦ ¦--expr: devid [0/0] {16} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: devid [0/0] {15} - ¦ ¦ ¦ ¦--'(': ( [0/0] {17} - ¦ ¦ ¦ ¦--expr: call3 [0/0] {18} - ¦ ¦ ¦ ¦ ¦--expr: call3 [0/0] {20} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call3 [0/0] {19} - ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {21} - ¦ ¦ ¦ ¦ ¦--expr: a [0/0] {23} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL: a [0/0] {22} - ¦ ¦ ¦ ¦ ¦--',': , [0/1] {24} - ¦ ¦ ¦ ¦ ¦--expr: b [0/0] {26} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL: b [0/0] {25} - ¦ ¦ ¦ ¦ ¦--',': , [0/1] {27} - ¦ ¦ ¦ ¦ ¦--expr: 1 + q [0/0] {28} - ¦ ¦ ¦ ¦ ¦ ¦--expr: 1 [0/1] {30} - ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {29} - ¦ ¦ ¦ ¦ ¦ ¦--'+': + [0/1] {31} - ¦ ¦ ¦ ¦ ¦ °--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: filte [1/1] {38} - ¦ ¦ ¦--expr: filte [0/0] {40} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: filte [0/0] {39} - ¦ ¦ ¦--'(': ( [0/1] {41} - ¦ ¦ ¦--expr: !term [0/0] {42} - ¦ ¦ ¦ ¦--'!': ! [0/0] {43} - ¦ ¦ ¦ °--expr: termi [0/0] {45} - ¦ ¦ ¦ °--SYMBOL: termi [0/0] {44} - ¦ ¦ °--')': ) [0/0] {46} - ¦ ¦--SPECIAL-PIPE: %>% [0/2] {47} - ¦ ¦--expr: ggplo [1/0] {48} - ¦ ¦ ¦--expr: ggplo [0/0] {50} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: ggplo [0/0] {49} - ¦ ¦ ¦--'(': ( [0/0] {51} - ¦ ¦ ¦--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: new [0/0] {59} - ¦ ¦ ¦ ¦ °--SYMBOL: new [0/0] {58} - ¦ ¦ ¦ ¦--',': , [0/1] {60} - ¦ ¦ ¦ ¦--SYMBOL_SUB: y [0/1] {61} - ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {62} - ¦ ¦ ¦ ¦--expr: old [0/0] {64} - ¦ ¦ ¦ ¦ °--SYMBOL: old [0/0] {63} - ¦ ¦ ¦ °--')': ) [0/0] {65} - ¦ ¦ °--')': ) [0/0] {66} - ¦ ¦--'+': + [0/0] {67} - ¦ °--expr: geom_ [1/0] {68} - ¦ ¦--expr: geom_ [0/0] {70} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: geom_ [0/0] {69} - ¦ ¦--'(': ( [0/0] {71} - ¦ °--')': ) [0/0] {72} - ¦--expr: 1+( -2 [2/0] {73} - ¦ ¦--expr: 1 [0/0] {75} - ¦ ¦ °--NUM_CONST: 1 [0/0] {74} - ¦ ¦--'+': + [0/0] {76} - ¦ °--expr: ( -22- [0/0] {77} - ¦ ¦--'(': ( [0/0] {78} - ¦ ¦--expr: 22- ( [1/2] {79} - ¦ ¦ ¦--expr: 22 [0/0] {83} - ¦ ¦ ¦ °--NUM_CONST: 22 [0/0] {82} - ¦ ¦ ¦--'-': - [0/1] {84} - ¦ ¦ ¦--expr: (1/ - [0/1] {85} - ¦ ¦ ¦ ¦--'(': ( [0/0] {86} - ¦ ¦ ¦ ¦--expr: 1/ - [0/0] {87} - ¦ ¦ ¦ ¦ ¦--expr: 1 [0/0] {93} - ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {92} - ¦ ¦ ¦ ¦ ¦--'/': / [0/2] {94} - ¦ ¦ ¦ ¦ ¦--expr: 2718 [1/1] {96} - ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 2718 [0/0] {95} - ¦ ¦ ¦ ¦ ¦--'/': / [0/4] {97} - ¦ ¦ ¦ ¦ ¦--expr: 23 [1/0] {99} - ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 23 [0/0] {98} - ¦ ¦ ¦ ¦ ¦--'*': * [0/1] {100} - ¦ ¦ ¦ ¦ ¦--expr: 29 [0/1] {102} - ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 29 [0/0] {101} - ¦ ¦ ¦ ¦ ¦--'*': * [0/1] {103} - ¦ ¦ ¦ ¦ ¦--expr: ( - [0/5] {104} - ¦ ¦ ¦ ¦ ¦ ¦--'(': ( [0/12] {105} - ¦ ¦ ¦ ¦ ¦ ¦--expr: 2 [1/0] {106} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: 2 [0/5] {109} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {108} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--'*': * [0/1] {110} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: (22*- [0/1] {111} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {112} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: 22*-1 [0/0] {113} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: 22 [0/0] {115} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 22 [0/0] {114} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--'*': * [0/0] {116} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--expr: -1 [0/0] {117} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--'-': - [0/0] {118} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--expr: 1 [0/0] {120} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {119} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--')': ) [0/0] {121} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--'+': + [0/14] {122} - ¦ ¦ ¦ ¦ ¦ ¦ °--expr: 1 [1/0] {124} - ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {123} - ¦ ¦ ¦ ¦ ¦ °--')': ) [0/0] {125} - ¦ ¦ ¦ ¦ ¦--'-': - [0/10] {126} - ¦ ¦ ¦ ¦ °--expr: 18 [1/0] {128} - ¦ ¦ ¦ ¦ °--NUM_CONST: 18 [0/0] {127} - ¦ ¦ ¦ °--')': ) [0/0] {129} - ¦ ¦ ¦--'+': + [0/4] {130} - ¦ ¦ ¦--expr: sin( [1/1] {131} - ¦ ¦ ¦ ¦--expr: sin [0/0] {133} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: sin [0/0] {132} - ¦ ¦ ¦ ¦--'(': ( [0/4] {134} - ¦ ¦ ¦ ¦--expr: pi [0/0] {136} - ¦ ¦ ¦ ¦ °--SYMBOL: pi [0/0] {135} - ¦ ¦ ¦ °--')': ) [0/0] {137} - ¦ ¦ ¦--'-': - [0/0] {138} - ¦ ¦ °--expr: 2 [1/0] {140} - ¦ ¦ °--NUM_CONST: 2 [0/0] {139} - ¦ °--')': ) [1/0] {141} - ¦--expr: a <- [2/1] {142} - ¦ ¦--expr: a [0/1] {144} - ¦ ¦ °--SYMBOL: a [0/0] {143} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {145} - ¦ °--expr: funct [0/0] {146} - ¦ ¦--FUNCTION: funct [0/0] {147} - ¦ ¦--'(': ( [0/0] {148} - ¦ ¦--SYMBOL_FORMALS: z [0/0] {149} - ¦ ¦--')': ) [0/1] {150} - ¦ °--expr: { - a [0/0] {151} - ¦ ¦--'{': { [0/2] {152} - ¦ ¦--expr: a %>% [1/0] {153} - ¦ ¦ ¦--expr: a [0/1] {156} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {155} - ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/4] {157} - ¦ ¦ ¦--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: 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: a %>% [2/0] {170} - ¦--expr: a [0/1] {174} - ¦ °--SYMBOL: a [0/0] {173} - ¦--SPECIAL-PIPE: %>% [0/0] {175} - ¦--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: 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: 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 deleted file mode 100644 index f7586ded7..000000000 --- a/tests/testthat/indention_operators/pipe_and_assignment-in_tree +++ /dev/null @@ -1,43 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: a [0/0] {1} - ¦ ¦--expr: a [0/4] {3} - ¦ ¦ °--SYMBOL: a [0/0] {2} - ¦ ¦--LEFT_ASSIGN: <- [0/0] {4} - ¦ ¦--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: 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: g() [1/0] {19} - ¦ ¦--expr: g [0/0] {21} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: g [0/0] {20} - ¦ ¦--'(': ( [0/0] {22} - ¦ °--')': ) [0/0] {23} - °--expr: a <- [2/0] {24} - ¦--expr: a [0/1] {26} - ¦ °--SYMBOL: a [0/0] {25} - ¦--LEFT_ASSIGN: <- [0/4] {27} - ¦--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: 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: 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 deleted file mode 100644 index b88ba53ae..000000000 --- a/tests/testthat/indention_operators/pipe_and_assignment_and_comment-in_tree +++ /dev/null @@ -1,115 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--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: 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: 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: d() [1/0] {20} - ¦ ¦--expr: d [0/0] {22} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: d [0/0] {21} - ¦ ¦--'(': ( [0/0] {23} - ¦ °--')': ) [0/0] {24} - ¦--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: 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: 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: d() [1/0] {44} - ¦ ¦--expr: d [0/0] {46} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: d [0/0] {45} - ¦ ¦--'(': ( [0/0] {47} - ¦ °--')': ) [0/0] {48} - ¦--expr: a <- - [3/0] {49} - ¦ ¦--expr: a [0/1] {51} - ¦ ¦ °--SYMBOL: a [0/0] {50} - ¦ ¦--LEFT_ASSIGN: <- [0/2] {52} - ¦ ¦--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: 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: d() [1/0] {67} - ¦ ¦--expr: d [0/0] {69} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: d [0/0] {68} - ¦ ¦--'(': ( [0/0] {70} - ¦ °--')': ) [0/0] {71} - ¦--expr: a <- [2/0] {72} - ¦ ¦--expr: a [0/1] {74} - ¦ ¦ °--SYMBOL: a [0/0] {73} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {75} - ¦ ¦--expr: c [0/1] {80} - ¦ ¦ °--SYMBOL: c [0/0] {79} - ¦ ¦--SPECIAL-PIPE: %>% [0/2] {81} - ¦ ¦--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: 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: d() [1/0] {94} - ¦ ¦--expr: d [0/0] {96} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: d [0/0] {95} - ¦ ¦--'(': ( [0/0] {97} - ¦ °--')': ) [0/0] {98} - ¦--expr: a <- - [2/0] {99} - ¦ ¦--expr: a [0/1] {101} - ¦ ¦ °--SYMBOL: a [0/0] {100} - ¦ ¦--LEFT_ASSIGN: <- [0/2] {102} - ¦ ¦--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: 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: d() [1/0] {118} - ¦ ¦--expr: d [0/0] {120} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: d [0/0] {119} - ¦ ¦--'(': ( [0/0] {121} - ¦ °--')': ) [0/0] {122} - °--COMMENT: # d [0/0] {123} 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 deleted file mode 100644 index ecbf9d3ab..000000000 --- a/tests/testthat/indention_operators/pipe_and_assignment_and_math-in_tree +++ /dev/null @@ -1,27 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: q <- [0/0] {1} - ¦--expr: q [0/1] {3} - ¦ °--SYMBOL: q [0/0] {2} - ¦--LEFT_ASSIGN: <- [0/2] {4} - ¦--expr: a [0/0] {9} - ¦ °--SYMBOL: a [0/0] {8} - ¦--'+': + [0/2] {10} - ¦--expr: - 3 [1/1] {11} - ¦ ¦--'-': - [0/1] {12} - ¦ °--expr: 3 [0/0] {14} - ¦ °--NUM_CONST: 3 [0/0] {13} - ¦--'+': + [0/0] {15} - ¦--expr: 2 [1/0] {17} - ¦ °--NUM_CONST: 2 [0/0] {16} - ¦--'+': + [0/0] {18} - ¦--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: 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 deleted file mode 100644 index 9cd38e1cd..000000000 --- a/tests/testthat/indention_operators/pipe_simple-in_tree +++ /dev/null @@ -1,76 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: a %>% [0/0] {1} - ¦ ¦--expr: a [0/1] {6} - ¦ ¦ °--SYMBOL: a [0/0] {5} - ¦ ¦--SPECIAL-PIPE: %>% [0/0] {7} - ¦ ¦--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: 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: d(1 + [1/1] {20} - ¦ ¦ ¦--expr: d [0/0] {22} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: d [0/0] {21} - ¦ ¦ ¦--'(': ( [0/0] {23} - ¦ ¦ ¦--expr: 1 + e [0/0] {24} - ¦ ¦ ¦ ¦--expr: 1 [0/1] {26} - ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {25} - ¦ ¦ ¦ ¦--'+': + [0/1] {27} - ¦ ¦ ¦ °--expr: e (si [0/0] {28} - ¦ ¦ ¦ ¦--expr: e [0/1] {30} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: e [0/0] {29} - ¦ ¦ ¦ ¦--'(': ( [0/0] {31} - ¦ ¦ ¦ ¦--expr: sin(f [0/0] {32} - ¦ ¦ ¦ ¦ ¦--expr: sin [0/0] {34} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: sin [0/0] {33} - ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {35} - ¦ ¦ ¦ ¦ ¦--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: 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: a <- [2/0] {47} - ¦ ¦--expr: a [0/1] {49} - ¦ ¦ °--SYMBOL: a [0/0] {48} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {50} - ¦ °--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} - ¦ ¦--'{': { [0/0] {57} - ¦ °--'}': } [0/0] {58} - ¦--expr: x %>% [2/0] {59} - ¦ ¦--expr: x [0/1] {61} - ¦ ¦ °--SYMBOL: x [0/0] {60} - ¦ ¦--SPECIAL-PIPE: %>% [0/2] {62} - ¦ ¦--COMMENT: # bre [2/2] {63} - ¦ °--expr: call( [1/0] {64} - ¦ ¦--expr: call [0/0] {66} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {65} - ¦ ¦--'(': ( [0/0] {67} - ¦ °--')': ) [0/0] {68} - ¦--expr: y %>% [3/1] {69} - ¦ ¦--expr: y [0/1] {71} - ¦ ¦ °--SYMBOL: y [0/0] {70} - ¦ ¦--SPECIAL-PIPE: %>% [0/2] {72} - ¦ °--expr: call( [3/0] {73} - ¦ ¦--expr: call [0/0] {75} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {74} - ¦ ¦--'(': ( [0/0] {76} - ¦ °--')': ) [0/0] {77} - °--COMMENT: # mor [0/0] {78} diff --git a/tests/testthat/indention_operators/pipe_with_dot-in_tree b/tests/testthat/indention_operators/pipe_with_dot-in_tree deleted file mode 100644 index 61a900661..000000000 --- a/tests/testthat/indention_operators/pipe_with_dot-in_tree +++ /dev/null @@ -1,23 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--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: "\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: TRUE [0/0] {12} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {11} - ¦ °--')': ) [0/0] {13} - ¦--SPECIAL-PIPE: %>% [0/2] {14} - °--expr: .[[1L [1/0] {15} - ¦--expr: . [0/0] {17} - ¦ °--SYMBOL: . [0/0] {16} - ¦--LBB: [[ [0/0] {18} - ¦--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 deleted file mode 100644 index d805fc5a7..000000000 --- a/tests/testthat/indention_operators/plus_minus-in_tree +++ /dev/null @@ -1,23 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: 1 + - [0/0] {1} - ¦ ¦--expr: 1 [0/1] {6} - ¦ ¦ °--NUM_CONST: 1 [0/0] {5} - ¦ ¦--'+': + [0/7] {7} - ¦ ¦--expr: 2 [1/1] {9} - ¦ ¦ °--NUM_CONST: 2 [0/0] {8} - ¦ ¦--'+': + [0/0] {10} - ¦ ¦--expr: 3 [1/1] {12} - ¦ ¦ °--NUM_CONST: 3 [0/0] {11} - ¦ ¦--'+': + [0/7] {13} - ¦ ¦--expr: 4 [1/1] {15} - ¦ ¦ °--NUM_CONST: 4 [0/0] {14} - ¦ ¦--'-': - [0/2] {16} - ¦ °--expr: 5 [1/0] {18} - ¦ °--NUM_CONST: 5 [0/0] {17} - °--expr: 1 + 1 [2/0] {19} - ¦--expr: 1 [0/1] {21} - ¦ °--NUM_CONST: 1 [0/0] {20} - ¦--'+': + [0/1] {22} - °--expr: 1 [0/0] {24} - °--NUM_CONST: 1 [0/0] {23} diff --git a/tests/testthat/indention_operators/tilde-in_tree b/tests/testthat/indention_operators/tilde-in_tree deleted file mode 100644 index 7f3155dd1..000000000 --- a/tests/testthat/indention_operators/tilde-in_tree +++ /dev/null @@ -1,28 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: y ~ -x [0/0] {1} - ¦ ¦--expr: y [0/1] {3} - ¦ ¦ °--SYMBOL: y [0/0] {2} - ¦ ¦--'~': ~ [0/0] {4} - ¦ ¦--expr: x [1/0] {7} - ¦ ¦ °--SYMBOL: x [0/0] {6} - ¦ ¦--'+': + [0/0] {8} - ¦ °--expr: y [1/0] {10} - ¦ °--SYMBOL: y [0/0] {9} - °--expr: x ~ - [3/0] {11} - ¦--expr: x [0/1] {13} - ¦ °--SYMBOL: x [0/0] {12} - ¦--'~': ~ [0/2] {14} - ¦--expr: 1 [1/1] {17} - ¦ °--NUM_CONST: 1 [0/0] {16} - ¦--'+': + [0/1] {18} - °--expr: (x|b) [0/0] {19} - ¦--'(': ( [0/0] {20} - ¦--expr: x|b [0/0] {21} - ¦ ¦--expr: x [0/0] {23} - ¦ ¦ °--SYMBOL: x [0/0] {22} - ¦ ¦--OR: | [0/0] {24} - ¦ °--expr: b [0/0] {26} - ¦ °--SYMBOL: b [0/0] {25} - °--')': ) [0/0] {27} 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 deleted file mode 100644 index 375209df0..000000000 --- a/tests/testthat/indention_operators/while_for_if_without_curly_non_strict-in_tree +++ /dev/null @@ -1,253 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: while [0/0] {1} - ¦ ¦--WHILE: while [0/1] {2} - ¦ ¦--'(': ( [0/0] {3} - ¦ ¦--expr: x > 3 [0/0] {4} - ¦ ¦ ¦--expr: x [0/1] {6} - ¦ ¦ ¦ °--SYMBOL: x [0/0] {5} - ¦ ¦ ¦--GT: > [0/1] {7} - ¦ ¦ °--expr: 3 [0/0] {9} - ¦ ¦ °--NUM_CONST: 3 [0/0] {8} - ¦ ¦--')': ) [0/2] {10} - ¦ °--expr: retur [1/0] {11} - ¦ ¦--expr: retur [0/0] {13} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: retur [0/0] {12} - ¦ ¦--'(': ( [0/0] {14} - ¦ ¦--expr: FALSE [0/0] {16} - ¦ ¦ °--NUM_CONST: FALSE [0/0] {15} - ¦ °--')': ) [0/0] {17} - ¦--expr: for ( [2/0] {18} - ¦ ¦--FOR: for [0/1] {19} - ¦ ¦--forcond: (i in [0/2] {20} - ¦ ¦ ¦--'(': ( [0/0] {21} - ¦ ¦ ¦--SYMBOL: i [0/1] {22} - ¦ ¦ ¦--IN: in [0/1] {23} - ¦ ¦ ¦--expr: 1:3 [0/0] {24} - ¦ ¦ ¦ ¦--expr: 1 [0/0] {26} - ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {25} - ¦ ¦ ¦ ¦--':': : [0/0] {27} - ¦ ¦ ¦ °--expr: 3 [0/0] {29} - ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {28} - ¦ ¦ °--')': ) [0/0] {30} - ¦ °--expr: print [1/0] {31} - ¦ ¦--expr: print [0/0] {33} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: print [0/0] {32} - ¦ ¦--'(': ( [0/0] {34} - ¦ ¦--expr: i [0/0] {36} - ¦ ¦ °--SYMBOL: i [0/0] {35} - ¦ °--')': ) [0/0] {37} - ¦--expr: if (x [2/0] {38} - ¦ ¦--IF: if [0/1] {39} - ¦ ¦--'(': ( [0/0] {40} - ¦ ¦--expr: x [0/0] {42} - ¦ ¦ °--SYMBOL: x [0/0] {41} - ¦ ¦--')': ) [0/2] {43} - ¦ °--expr: call2 [1/0] {44} - ¦ ¦--expr: call2 [0/0] {46} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call2 [0/0] {45} - ¦ ¦--'(': ( [0/0] {47} - ¦ ¦--expr: 3 [0/0] {49} - ¦ ¦ °--NUM_CONST: 3 [0/0] {48} - ¦ °--')': ) [0/0] {50} - ¦--expr: for ( [2/0] {51} - ¦ ¦--FOR: for [0/1] {52} - ¦ ¦--forcond: (i in [0/1] {53} - ¦ ¦ ¦--'(': ( [0/0] {54} - ¦ ¦ ¦--SYMBOL: i [0/1] {55} - ¦ ¦ ¦--IN: in [0/1] {56} - ¦ ¦ ¦--expr: 1:3 [0/0] {57} - ¦ ¦ ¦ ¦--expr: 1 [0/0] {59} - ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {58} - ¦ ¦ ¦ ¦--':': : [0/0] {60} - ¦ ¦ ¦ °--expr: 3 [0/0] {62} - ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {61} - ¦ ¦ °--')': ) [0/0] {63} - ¦ ¦--COMMENT: # [0/2] {64} - ¦ °--expr: print [1/0] {65} - ¦ ¦--expr: print [0/0] {67} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: print [0/0] {66} - ¦ ¦--'(': ( [0/0] {68} - ¦ ¦--expr: i [0/0] {70} - ¦ ¦ °--SYMBOL: i [0/0] {69} - ¦ °--')': ) [0/0] {71} - ¦--expr: for ( [2/0] {72} - ¦ ¦--FOR: for [0/1] {73} - ¦ ¦--forcond: (i in [0/1] {74} - ¦ ¦ ¦--'(': ( [0/0] {75} - ¦ ¦ ¦--SYMBOL: i [0/1] {76} - ¦ ¦ ¦--IN: in [0/5] {77} - ¦ ¦ ¦--expr: 1:3 [1/0] {78} - ¦ ¦ ¦ ¦--expr: 1 [0/0] {80} - ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {79} - ¦ ¦ ¦ ¦--':': : [0/0] {81} - ¦ ¦ ¦ °--expr: 3 [0/0] {83} - ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {82} - ¦ ¦ °--')': ) [0/0] {84} - ¦ ¦--COMMENT: # [0/2] {85} - ¦ °--expr: print [1/0] {86} - ¦ ¦--expr: print [0/0] {88} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: print [0/0] {87} - ¦ ¦--'(': ( [0/0] {89} - ¦ ¦--expr: i [0/0] {91} - ¦ ¦ °--SYMBOL: i [0/0] {90} - ¦ °--')': ) [0/0] {92} - ¦--expr: for ( [2/0] {93} - ¦ ¦--FOR: for [0/1] {94} - ¦ ¦--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:3 [1/0] {100} - ¦ ¦ ¦ ¦--expr: 1 [0/0] {102} - ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {101} - ¦ ¦ ¦ ¦--':': : [0/0] {103} - ¦ ¦ ¦ °--expr: 3 [0/0] {105} - ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {104} - ¦ ¦ °--')': ) [0/0] {106} - ¦ ¦--COMMENT: # [0/2] {107} - ¦ °--expr: print [1/0] {108} - ¦ ¦--expr: print [0/0] {110} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: print [0/0] {109} - ¦ ¦--'(': ( [0/0] {111} - ¦ ¦--expr: i [0/0] {113} - ¦ ¦ °--SYMBOL: i [0/0] {112} - ¦ °--')': ) [0/0] {114} - ¦--expr: for ( [2/0] {115} - ¦ ¦--FOR: for [0/1] {116} - ¦ ¦--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:3 [1/0] {123} - ¦ ¦ ¦ ¦--expr: 1 [0/0] {125} - ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {124} - ¦ ¦ ¦ ¦--':': : [0/0] {126} - ¦ ¦ ¦ °--expr: 3 [0/0] {128} - ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {127} - ¦ ¦ ¦--COMMENT: # [0/0] {129} - ¦ ¦ °--')': ) [1/0] {130} - ¦ ¦--COMMENT: # [0/2] {131} - ¦ °--expr: print [1/0] {132} - ¦ ¦--expr: print [0/0] {134} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: print [0/0] {133} - ¦ ¦--'(': ( [0/0] {135} - ¦ ¦--expr: i [0/0] {137} - ¦ ¦ °--SYMBOL: i [0/0] {136} - ¦ °--')': ) [0/0] {138} - ¦--expr: while [3/0] {139} - ¦ ¦--WHILE: while [0/1] {140} - ¦ ¦--'(': ( [0/0] {141} - ¦ ¦--expr: x > 3 [0/0] {142} - ¦ ¦ ¦--expr: x [0/1] {144} - ¦ ¦ ¦ °--SYMBOL: x [0/0] {143} - ¦ ¦ ¦--GT: > [0/1] {145} - ¦ ¦ °--expr: 3 [0/0] {147} - ¦ ¦ °--NUM_CONST: 3 [0/0] {146} - ¦ ¦--')': ) [0/1] {148} - ¦ ¦--COMMENT: # [0/2] {149} - ¦ °--expr: retur [1/0] {150} - ¦ ¦--expr: retur [0/0] {152} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: retur [0/0] {151} - ¦ ¦--'(': ( [0/0] {153} - ¦ ¦--expr: FALSE [0/0] {155} - ¦ ¦ °--NUM_CONST: FALSE [0/0] {154} - ¦ °--')': ) [0/0] {156} - ¦--expr: while [2/0] {157} - ¦ ¦--WHILE: while [0/1] {158} - ¦ ¦--'(': ( [0/0] {159} - ¦ ¦--expr: x > 3 [0/1] {160} - ¦ ¦ ¦--expr: x [0/1] {162} - ¦ ¦ ¦ °--SYMBOL: x [0/0] {161} - ¦ ¦ ¦--GT: > [0/1] {163} - ¦ ¦ °--expr: 3 [0/0] {165} - ¦ ¦ °--NUM_CONST: 3 [0/0] {164} - ¦ ¦--COMMENT: # [0/0] {166} - ¦ ¦--')': ) [1/2] {167} - ¦ °--expr: retur [1/0] {168} - ¦ ¦--expr: retur [0/0] {170} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: retur [0/0] {169} - ¦ ¦--'(': ( [0/0] {171} - ¦ ¦--expr: FALSE [0/0] {173} - ¦ ¦ °--NUM_CONST: FALSE [0/0] {172} - ¦ °--')': ) [0/0] {174} - ¦--expr: while [2/0] {175} - ¦ ¦--WHILE: while [0/1] {176} - ¦ ¦--'(': ( [0/1] {177} - ¦ ¦--COMMENT: # tes [0/2] {178} - ¦ ¦--expr: x > 3 [1/0] {179} - ¦ ¦ ¦--expr: x [0/1] {181} - ¦ ¦ ¦ °--SYMBOL: x [0/0] {180} - ¦ ¦ ¦--GT: > [0/1] {182} - ¦ ¦ °--expr: 3 [0/0] {184} - ¦ ¦ °--NUM_CONST: 3 [0/0] {183} - ¦ ¦--')': ) [0/1] {185} - ¦ ¦--COMMENT: # ano [0/2] {186} - ¦ °--expr: retur [1/0] {187} - ¦ ¦--expr: retur [0/0] {189} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: retur [0/0] {188} - ¦ ¦--'(': ( [0/0] {190} - ¦ ¦--expr: FALSE [0/0] {192} - ¦ ¦ °--NUM_CONST: FALSE [0/0] {191} - ¦ °--')': ) [0/0] {193} - ¦--expr: while [2/0] {194} - ¦ ¦--WHILE: while [0/1] {195} - ¦ ¦--'(': ( [0/2] {196} - ¦ ¦--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: 3 [1/0] {203} - ¦ ¦ °--NUM_CONST: 3 [0/0] {202} - ¦ ¦--COMMENT: # [0/0] {204} - ¦ ¦--')': ) [1/1] {205} - ¦ ¦--COMMENT: # [0/2] {206} - ¦ °--expr: FALSE [1/0] {208} - ¦ °--NUM_CONST: FALSE [0/0] {207} - ¦--expr: while [2/0] {209} - ¦ ¦--WHILE: while [0/1] {210} - ¦ ¦--'(': ( [0/2] {211} - ¦ ¦--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: 3 [1/0] {218} - ¦ ¦ °--NUM_CONST: 3 [0/0] {217} - ¦ ¦--COMMENT: # [0/0] {219} - ¦ ¦--')': ) [1/2] {220} - ¦ °--expr: FALSE [1/0] {222} - ¦ °--NUM_CONST: FALSE [0/0] {221} - ¦--expr: while [2/0] {223} - ¦ ¦--WHILE: while [0/1] {224} - ¦ ¦--'(': ( [0/2] {225} - ¦ ¦--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: 3 [1/0] {232} - ¦ ¦ °--NUM_CONST: 3 [0/0] {231} - ¦ ¦--')': ) [1/1] {233} - ¦ ¦--COMMENT: # [0/2] {234} - ¦ °--expr: FALSE [1/0] {236} - ¦ °--NUM_CONST: FALSE [0/0] {235} - °--expr: while [2/0] {237} - ¦--WHILE: while [0/1] {238} - ¦--'(': ( [0/0] {239} - ¦--COMMENT: # [0/2] {240} - ¦--expr: 2 > - [1/0] {241} - ¦ ¦--expr: 2 [0/1] {243} - ¦ ¦ °--NUM_CONST: 2 [0/0] {242} - ¦ ¦--GT: > [0/2] {244} - ¦ °--expr: 3 [1/0] {246} - ¦ °--NUM_CONST: 3 [0/0] {245} - ¦--')': ) [1/1] {247} - ¦--COMMENT: # [0/2] {248} - °--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 deleted file mode 100644 index 3375e43cc..000000000 --- a/tests/testthat/indention_operators/while_for_if_without_curly_strict-in_tree +++ /dev/null @@ -1,253 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: while [0/0] {1} - ¦ ¦--WHILE: while [0/1] {2} - ¦ ¦--'(': ( [0/0] {3} - ¦ ¦--expr: x > 3 [0/0] {4} - ¦ ¦ ¦--expr: x [0/1] {6} - ¦ ¦ ¦ °--SYMBOL: x [0/0] {5} - ¦ ¦ ¦--GT: > [0/1] {7} - ¦ ¦ °--expr: 3 [0/0] {9} - ¦ ¦ °--NUM_CONST: 3 [0/0] {8} - ¦ ¦--')': ) [0/0] {10} - ¦ °--expr: retur [1/0] {11} - ¦ ¦--expr: retur [0/0] {13} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: retur [0/0] {12} - ¦ ¦--'(': ( [0/0] {14} - ¦ ¦--expr: FALSE [0/0] {16} - ¦ ¦ °--NUM_CONST: FALSE [0/0] {15} - ¦ °--')': ) [0/0] {17} - ¦--expr: for ( [2/0] {18} - ¦ ¦--FOR: for [0/1] {19} - ¦ ¦--forcond: (i in [0/0] {20} - ¦ ¦ ¦--'(': ( [0/0] {21} - ¦ ¦ ¦--SYMBOL: i [0/1] {22} - ¦ ¦ ¦--IN: in [0/1] {23} - ¦ ¦ ¦--expr: 1:3 [0/0] {24} - ¦ ¦ ¦ ¦--expr: 1 [0/0] {26} - ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {25} - ¦ ¦ ¦ ¦--':': : [0/0] {27} - ¦ ¦ ¦ °--expr: 3 [0/0] {29} - ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {28} - ¦ ¦ °--')': ) [0/0] {30} - ¦ °--expr: print [1/0] {31} - ¦ ¦--expr: print [0/0] {33} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: print [0/0] {32} - ¦ ¦--'(': ( [0/0] {34} - ¦ ¦--expr: i [0/0] {36} - ¦ ¦ °--SYMBOL: i [0/0] {35} - ¦ °--')': ) [0/0] {37} - ¦--expr: if (x [2/0] {38} - ¦ ¦--IF: if [0/1] {39} - ¦ ¦--'(': ( [0/0] {40} - ¦ ¦--expr: x [0/0] {42} - ¦ ¦ °--SYMBOL: x [0/0] {41} - ¦ ¦--')': ) [0/0] {43} - ¦ °--expr: call2 [1/0] {44} - ¦ ¦--expr: call2 [0/0] {46} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call2 [0/0] {45} - ¦ ¦--'(': ( [0/0] {47} - ¦ ¦--expr: 3 [0/0] {49} - ¦ ¦ °--NUM_CONST: 3 [0/0] {48} - ¦ °--')': ) [0/0] {50} - ¦--expr: for ( [2/0] {51} - ¦ ¦--FOR: for [0/1] {52} - ¦ ¦--forcond: (i in [0/1] {53} - ¦ ¦ ¦--'(': ( [0/0] {54} - ¦ ¦ ¦--SYMBOL: i [0/1] {55} - ¦ ¦ ¦--IN: in [0/1] {56} - ¦ ¦ ¦--expr: 1:3 [0/0] {57} - ¦ ¦ ¦ ¦--expr: 1 [0/0] {59} - ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {58} - ¦ ¦ ¦ ¦--':': : [0/0] {60} - ¦ ¦ ¦ °--expr: 3 [0/0] {62} - ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {61} - ¦ ¦ °--')': ) [0/0] {63} - ¦ ¦--COMMENT: # [0/2] {64} - ¦ °--expr: print [1/0] {65} - ¦ ¦--expr: print [0/0] {67} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: print [0/0] {66} - ¦ ¦--'(': ( [0/0] {68} - ¦ ¦--expr: i [0/0] {70} - ¦ ¦ °--SYMBOL: i [0/0] {69} - ¦ °--')': ) [0/0] {71} - ¦--expr: for ( [2/0] {72} - ¦ ¦--FOR: for [0/1] {73} - ¦ ¦--forcond: (i in [0/1] {74} - ¦ ¦ ¦--'(': ( [0/0] {75} - ¦ ¦ ¦--SYMBOL: i [0/1] {76} - ¦ ¦ ¦--IN: in [0/5] {77} - ¦ ¦ ¦--expr: 1:3 [1/0] {78} - ¦ ¦ ¦ ¦--expr: 1 [0/0] {80} - ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {79} - ¦ ¦ ¦ ¦--':': : [0/0] {81} - ¦ ¦ ¦ °--expr: 3 [0/0] {83} - ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {82} - ¦ ¦ °--')': ) [0/0] {84} - ¦ ¦--COMMENT: # [0/2] {85} - ¦ °--expr: print [1/0] {86} - ¦ ¦--expr: print [0/0] {88} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: print [0/0] {87} - ¦ ¦--'(': ( [0/0] {89} - ¦ ¦--expr: i [0/0] {91} - ¦ ¦ °--SYMBOL: i [0/0] {90} - ¦ °--')': ) [0/0] {92} - ¦--expr: for ( [2/0] {93} - ¦ ¦--FOR: for [0/1] {94} - ¦ ¦--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:3 [1/0] {100} - ¦ ¦ ¦ ¦--expr: 1 [0/0] {102} - ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {101} - ¦ ¦ ¦ ¦--':': : [0/0] {103} - ¦ ¦ ¦ °--expr: 3 [0/0] {105} - ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {104} - ¦ ¦ °--')': ) [0/0] {106} - ¦ ¦--COMMENT: # [0/2] {107} - ¦ °--expr: print [1/0] {108} - ¦ ¦--expr: print [0/0] {110} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: print [0/0] {109} - ¦ ¦--'(': ( [0/0] {111} - ¦ ¦--expr: i [0/0] {113} - ¦ ¦ °--SYMBOL: i [0/0] {112} - ¦ °--')': ) [0/0] {114} - ¦--expr: for ( [2/0] {115} - ¦ ¦--FOR: for [0/1] {116} - ¦ ¦--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:3 [1/0] {123} - ¦ ¦ ¦ ¦--expr: 1 [0/0] {125} - ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {124} - ¦ ¦ ¦ ¦--':': : [0/0] {126} - ¦ ¦ ¦ °--expr: 3 [0/0] {128} - ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {127} - ¦ ¦ ¦--COMMENT: # [0/2] {129} - ¦ ¦ °--')': ) [1/0] {130} - ¦ ¦--COMMENT: # [0/2] {131} - ¦ °--expr: print [1/0] {132} - ¦ ¦--expr: print [0/0] {134} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: print [0/0] {133} - ¦ ¦--'(': ( [0/0] {135} - ¦ ¦--expr: i [0/0] {137} - ¦ ¦ °--SYMBOL: i [0/0] {136} - ¦ °--')': ) [0/0] {138} - ¦--expr: while [3/0] {139} - ¦ ¦--WHILE: while [0/1] {140} - ¦ ¦--'(': ( [0/0] {141} - ¦ ¦--expr: x > 3 [0/0] {142} - ¦ ¦ ¦--expr: x [0/1] {144} - ¦ ¦ ¦ °--SYMBOL: x [0/0] {143} - ¦ ¦ ¦--GT: > [0/1] {145} - ¦ ¦ °--expr: 3 [0/0] {147} - ¦ ¦ °--NUM_CONST: 3 [0/0] {146} - ¦ ¦--')': ) [0/1] {148} - ¦ ¦--COMMENT: # [0/2] {149} - ¦ °--expr: retur [1/0] {150} - ¦ ¦--expr: retur [0/0] {152} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: retur [0/0] {151} - ¦ ¦--'(': ( [0/0] {153} - ¦ ¦--expr: FALSE [0/0] {155} - ¦ ¦ °--NUM_CONST: FALSE [0/0] {154} - ¦ °--')': ) [0/0] {156} - ¦--expr: while [2/0] {157} - ¦ ¦--WHILE: while [0/1] {158} - ¦ ¦--'(': ( [0/0] {159} - ¦ ¦--expr: x > 3 [0/1] {160} - ¦ ¦ ¦--expr: x [0/1] {162} - ¦ ¦ ¦ °--SYMBOL: x [0/0] {161} - ¦ ¦ ¦--GT: > [0/1] {163} - ¦ ¦ °--expr: 3 [0/0] {165} - ¦ ¦ °--NUM_CONST: 3 [0/0] {164} - ¦ ¦--COMMENT: # [0/7] {166} - ¦ ¦--')': ) [1/2] {167} - ¦ °--expr: retur [1/0] {168} - ¦ ¦--expr: retur [0/0] {170} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: retur [0/0] {169} - ¦ ¦--'(': ( [0/0] {171} - ¦ ¦--expr: FALSE [0/0] {173} - ¦ ¦ °--NUM_CONST: FALSE [0/0] {172} - ¦ °--')': ) [0/0] {174} - ¦--expr: while [2/0] {175} - ¦ ¦--WHILE: while [0/1] {176} - ¦ ¦--'(': ( [0/1] {177} - ¦ ¦--COMMENT: # tes [0/2] {178} - ¦ ¦--expr: x > 3 [1/0] {179} - ¦ ¦ ¦--expr: x [0/1] {181} - ¦ ¦ ¦ °--SYMBOL: x [0/0] {180} - ¦ ¦ ¦--GT: > [0/1] {182} - ¦ ¦ °--expr: 3 [0/0] {184} - ¦ ¦ °--NUM_CONST: 3 [0/0] {183} - ¦ ¦--')': ) [0/1] {185} - ¦ ¦--COMMENT: # ano [0/2] {186} - ¦ °--expr: retur [1/0] {187} - ¦ ¦--expr: retur [0/0] {189} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: retur [0/0] {188} - ¦ ¦--'(': ( [0/0] {190} - ¦ ¦--expr: FALSE [0/0] {192} - ¦ ¦ °--NUM_CONST: FALSE [0/0] {191} - ¦ °--')': ) [0/0] {193} - ¦--expr: while [2/0] {194} - ¦ ¦--WHILE: while [0/1] {195} - ¦ ¦--'(': ( [0/2] {196} - ¦ ¦--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: 3 [1/0] {203} - ¦ ¦ °--NUM_CONST: 3 [0/0] {202} - ¦ ¦--COMMENT: # [0/2] {204} - ¦ ¦--')': ) [1/1] {205} - ¦ ¦--COMMENT: # [0/2] {206} - ¦ °--expr: FALSE [1/0] {208} - ¦ °--NUM_CONST: FALSE [0/0] {207} - ¦--expr: while [2/0] {209} - ¦ ¦--WHILE: while [0/1] {210} - ¦ ¦--'(': ( [0/2] {211} - ¦ ¦--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: 3 [1/0] {218} - ¦ ¦ °--NUM_CONST: 3 [0/0] {217} - ¦ ¦--COMMENT: # [0/0] {219} - ¦ ¦--')': ) [1/2] {220} - ¦ °--expr: FALSE [1/0] {222} - ¦ °--NUM_CONST: FALSE [0/0] {221} - ¦--expr: while [2/0] {223} - ¦ ¦--WHILE: while [0/1] {224} - ¦ ¦--'(': ( [0/2] {225} - ¦ ¦--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: 3 [1/0] {232} - ¦ ¦ °--NUM_CONST: 3 [0/0] {231} - ¦ ¦--')': ) [1/1] {233} - ¦ ¦--COMMENT: # [0/2] {234} - ¦ °--expr: FALSE [1/0] {236} - ¦ °--NUM_CONST: FALSE [0/0] {235} - °--expr: while [2/0] {237} - ¦--WHILE: while [0/1] {238} - ¦--'(': ( [0/0] {239} - ¦--COMMENT: # [0/2] {240} - ¦--expr: 2 > - [1/0] {241} - ¦ ¦--expr: 2 [0/1] {243} - ¦ ¦ °--NUM_CONST: 2 [0/0] {242} - ¦ ¦--GT: > [0/2] {244} - ¦ °--expr: 3 [1/0] {246} - ¦ °--NUM_CONST: 3 [0/0] {245} - ¦--')': ) [1/1] {247} - ¦--COMMENT: # [0/2] {248} - °--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 deleted file mode 100644 index 95ae7014b..000000000 --- a/tests/testthat/indention_operators/while_for_without_curly_same_line_non_strict-in_tree +++ /dev/null @@ -1,163 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: while [0/0] {1} - ¦ ¦--WHILE: while [0/0] {2} - ¦ ¦--'(': ( [0/0] {3} - ¦ ¦--expr: x == [0/0] {4} - ¦ ¦ ¦--expr: x [0/1] {6} - ¦ ¦ ¦ °--SYMBOL: x [0/0] {5} - ¦ ¦ ¦--EQ: == [0/1] {7} - ¦ ¦ °--expr: 2 [0/0] {9} - ¦ ¦ °--NUM_CONST: 2 [0/0] {8} - ¦ ¦--')': ) [0/1] {10} - ¦ °--expr: h( - [0/0] {11} - ¦ ¦--expr: h [0/0] {13} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: h [0/0] {12} - ¦ ¦--'(': ( [0/2] {14} - ¦ ¦--expr: 2 [1/0] {16} - ¦ ¦ °--NUM_CONST: 2 [0/0] {15} - ¦ °--')': ) [1/0] {17} - ¦--expr: while [2/0] {18} - ¦ ¦--WHILE: while [0/0] {19} - ¦ ¦--'(': ( [0/0] {20} - ¦ ¦--expr: x == [0/0] {21} - ¦ ¦ ¦--expr: x [0/1] {23} - ¦ ¦ ¦ °--SYMBOL: x [0/0] {22} - ¦ ¦ ¦--EQ: == [0/1] {24} - ¦ ¦ °--expr: 2 [0/0] {26} - ¦ ¦ °--NUM_CONST: 2 [0/0] {25} - ¦ ¦--')': ) [0/1] {27} - ¦ °--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: 2 [1/0] {34} - ¦ ¦ °--NUM_CONST: 2 [0/0] {33} - ¦ °--')': ) [1/0] {35} - ¦--expr: while [2/0] {36} - ¦ ¦--WHILE: while [0/0] {37} - ¦ ¦--'(': ( [0/0] {38} - ¦ ¦--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: 2 [0/0] {45} - ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {44} - ¦ ¦ ¦--AND2: && [0/6] {46} - ¦ ¦ °--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: 2 [0/0] {53} - ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {52} - ¦ ¦ ¦--EQ: == [0/1] {54} - ¦ ¦ °--expr: 2 [0/0] {56} - ¦ ¦ °--NUM_CONST: 2 [0/0] {55} - ¦ ¦--')': ) [0/1] {57} - ¦ °--expr: h( - [0/0] {58} - ¦ ¦--expr: h [0/0] {60} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: h [0/0] {59} - ¦ ¦--'(': ( [0/2] {61} - ¦ ¦--expr: 2 [1/0] {63} - ¦ ¦ °--NUM_CONST: 2 [0/0] {62} - ¦ °--')': ) [1/0] {64} - ¦--expr: for(x [3/0] {65} - ¦ ¦--FOR: for [0/0] {66} - ¦ ¦--forcond: (x in [0/1] {67} - ¦ ¦ ¦--'(': ( [0/0] {68} - ¦ ¦ ¦--SYMBOL: x [0/1] {69} - ¦ ¦ ¦--IN: in [0/1] {70} - ¦ ¦ ¦--expr: 1:22 [0/0] {71} - ¦ ¦ ¦ ¦--expr: 1 [0/0] {73} - ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {72} - ¦ ¦ ¦ ¦--':': : [0/0] {74} - ¦ ¦ ¦ °--expr: 22 [0/0] {76} - ¦ ¦ ¦ °--NUM_CONST: 22 [0/0] {75} - ¦ ¦ °--')': ) [0/0] {77} - ¦ °--expr: h( - [0/0] {78} - ¦ ¦--expr: h [0/0] {80} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: h [0/0] {79} - ¦ ¦--'(': ( [0/2] {81} - ¦ ¦--expr: 2 [1/0] {83} - ¦ ¦ °--NUM_CONST: 2 [0/0] {82} - ¦ °--')': ) [1/0] {84} - ¦--expr: for(x [2/0] {85} - ¦ ¦--FOR: for [0/0] {86} - ¦ ¦--forcond: (x in [0/1] {87} - ¦ ¦ ¦--'(': ( [0/0] {88} - ¦ ¦ ¦--SYMBOL: x [0/1] {89} - ¦ ¦ ¦--IN: in [0/1] {90} - ¦ ¦ ¦--expr: 1:22 [0/0] {91} - ¦ ¦ ¦ ¦--expr: 1 [0/0] {93} - ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {92} - ¦ ¦ ¦ ¦--':': : [0/0] {94} - ¦ ¦ ¦ °--expr: 22 [0/0] {96} - ¦ ¦ ¦ °--NUM_CONST: 22 [0/0] {95} - ¦ ¦ °--')': ) [0/0] {97} - ¦ °--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: 2 [1/0] {104} - ¦ ¦ °--NUM_CONST: 2 [0/0] {103} - ¦ °--')': ) [1/0] {105} - ¦--expr: for(k [2/0] {106} - ¦ ¦--FOR: for [0/0] {107} - ¦ ¦--forcond: (k in [0/1] {108} - ¦ ¦ ¦--'(': ( [0/0] {109} - ¦ ¦ ¦--SYMBOL: k [0/1] {110} - ¦ ¦ ¦--IN: in [0/1] {111} - ¦ ¦ ¦--expr: f( - [0/0] {112} - ¦ ¦ ¦ ¦--expr: f [0/0] {114} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: f [0/0] {113} - ¦ ¦ ¦ ¦--'(': ( [0/2] {115} - ¦ ¦ ¦ ¦--expr: 2:22 [1/0] {116} - ¦ ¦ ¦ ¦ ¦--expr: 2 [0/0] {118} - ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {117} - ¦ ¦ ¦ ¦ ¦--':': : [0/0] {119} - ¦ ¦ ¦ ¦ °--expr: 22 [0/0] {121} - ¦ ¦ ¦ ¦ °--NUM_CONST: 22 [0/0] {120} - ¦ ¦ ¦ °--')': ) [1/0] {122} - ¦ ¦ °--')': ) [0/0] {123} - ¦ °--expr: h( - [0/0] {124} - ¦ ¦--expr: h [0/0] {126} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: h [0/0] {125} - ¦ ¦--'(': ( [0/8] {127} - ¦ ¦--expr: 2 [1/6] {129} - ¦ ¦ °--NUM_CONST: 2 [0/0] {128} - ¦ °--')': ) [1/0] {130} - °--expr: for(k [2/0] {131} - ¦--FOR: for [0/0] {132} - ¦--forcond: (k in [0/1] {133} - ¦ ¦--'(': ( [0/0] {134} - ¦ ¦--SYMBOL: k [0/1] {135} - ¦ ¦--IN: in [0/1] {136} - ¦ ¦--expr: f( - [0/0] {137} - ¦ ¦ ¦--expr: f [0/0] {139} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: f [0/0] {138} - ¦ ¦ ¦--'(': ( [0/2] {140} - ¦ ¦ ¦--expr: 2:22 [1/1] {141} - ¦ ¦ ¦ ¦--expr: 2 [0/0] {143} - ¦ ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {142} - ¦ ¦ ¦ ¦--':': : [0/0] {144} - ¦ ¦ ¦ °--expr: 22 [0/0] {146} - ¦ ¦ ¦ °--NUM_CONST: 22 [0/0] {145} - ¦ ¦ ¦--COMMENT: # com [0/0] {147} - ¦ ¦ °--')': ) [1/0] {148} - ¦ °--')': ) [0/0] {149} - °--expr: h(2) [0/0] {150} - ¦--expr: h [0/0] {152} - ¦ °--SYMBOL_FUNCTION_CALL: h [0/0] {151} - ¦--'(': ( [0/0] {153} - ¦--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 deleted file mode 100644 index 4f3aa7dc8..000000000 --- a/tests/testthat/indention_round_brackets/arithmetic_no_start-in_tree +++ /dev/null @@ -1,19 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: 1 + - [0/0] {1} - ¦--expr: 1 [0/1] {4} - ¦ °--NUM_CONST: 1 [0/0] {3} - ¦--'+': + [0/13] {5} - ¦--expr: 2 [1/1] {7} - ¦ °--NUM_CONST: 2 [0/0] {6} - ¦--'+': + [0/1] {8} - °--expr: ( -3 + [0/0] {9} - ¦--'(': ( [0/0] {10} - ¦--expr: 3 + 4 [1/0] {11} - ¦ ¦--expr: 3 [0/1] {13} - ¦ ¦ °--NUM_CONST: 3 [0/0] {12} - ¦ ¦--'+': + [0/1] {14} - ¦ °--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.R b/tests/testthat/indention_round_brackets/arithmetic_start-in.R index d8ef4066c..22e25bcbf 100644 --- a/tests/testthat/indention_round_brackets/arithmetic_start-in.R +++ b/tests/testthat/indention_round_brackets/arithmetic_start-in.R @@ -3,3 +3,16 @@ 3 + 4 ) ) + + ( + + 1 + + 2 + ( + # the space below is intentional + + 3 + 4 + # but the one here isn't + + + ) + ) diff --git a/tests/testthat/indention_round_brackets/arithmetic_start-in_tree b/tests/testthat/indention_round_brackets/arithmetic_start-in_tree deleted file mode 100644 index b4c868352..000000000 --- a/tests/testthat/indention_round_brackets/arithmetic_start-in_tree +++ /dev/null @@ -1,23 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: (1 + - [0/0] {1} - ¦--'(': ( [0/0] {2} - ¦--expr: 1 + -2 [0/0] {3} - ¦ ¦--expr: 1 [0/1] {6} - ¦ ¦ °--NUM_CONST: 1 [0/0] {5} - ¦ ¦--'+': + [0/0] {7} - ¦ ¦--expr: 2 [1/1] {9} - ¦ ¦ °--NUM_CONST: 2 [0/0] {8} - ¦ ¦--'+': + [0/1] {10} - ¦ °--expr: ( -3 + [0/0] {11} - ¦ ¦--'(': ( [0/0] {12} - ¦ ¦--expr: 3 + 4 [1/2] {13} - ¦ ¦ ¦--expr: 3 [0/1] {15} - ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {14} - ¦ ¦ ¦--'+': + [0/1] {16} - ¦ ¦ °--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/arithmetic_start-out.R b/tests/testthat/indention_round_brackets/arithmetic_start-out.R index ec2ff7135..efaf16e7b 100644 --- a/tests/testthat/indention_round_brackets/arithmetic_start-out.R +++ b/tests/testthat/indention_round_brackets/arithmetic_start-out.R @@ -3,3 +3,13 @@ 3 + 4 ) ) + +( + 1 + + 2 + ( + # the space below is intentional + + 3 + 4 + # but the one here isn't + ) +) 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 deleted file mode 100644 index cdf8dcd24..000000000 --- a/tests/testthat/indention_round_brackets/multi_line-no-indention-in_tree +++ /dev/null @@ -1,39 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: call( [0/0] {1} - ¦--expr: call [0/0] {3} - ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {2} - ¦--'(': ( [0/0] {4} - ¦--expr: 1 [1/0] {6} - ¦ °--NUM_CONST: 1 [0/0] {5} - ¦--',': , [0/0] {7} - ¦--expr: call2 [1/0] {8} - ¦ ¦--expr: call2 [0/0] {10} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call2 [0/0] {9} - ¦ ¦--'(': ( [0/0] {11} - ¦ ¦--expr: 2 [1/0] {13} - ¦ ¦ °--NUM_CONST: 2 [0/0] {12} - ¦ ¦--',': , [0/1] {14} - ¦ ¦--expr: 3 [0/0] {16} - ¦ ¦ °--NUM_CONST: 3 [0/0] {15} - ¦ ¦--',': , [0/0] {17} - ¦ ¦--expr: call3 [1/0] {18} - ¦ ¦ ¦--expr: call3 [0/0] {20} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call3 [0/0] {19} - ¦ ¦ ¦--'(': ( [0/0] {21} - ¦ ¦ ¦--expr: 1 [0/0] {23} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {22} - ¦ ¦ ¦--',': , [0/1] {24} - ¦ ¦ ¦--expr: 2 [0/0] {26} - ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {25} - ¦ ¦ ¦--',': , [0/1] {27} - ¦ ¦ ¦--expr: 22 [0/0] {29} - ¦ ¦ ¦ °--NUM_CONST: 22 [0/0] {28} - ¦ ¦ °--')': ) [0/0] {30} - ¦ ¦--',': , [0/0] {31} - ¦ ¦--expr: 5 [1/0] {33} - ¦ ¦ °--NUM_CONST: 5 [0/0] {32} - ¦ °--')': ) [1/0] {34} - ¦--',': , [0/0] {35} - ¦--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.R b/tests/testthat/indention_round_brackets/multi_line-random-in.R index 15c35f66c..43d3ef0e3 100644 --- a/tests/testthat/indention_round_brackets/multi_line-random-in.R +++ b/tests/testthat/indention_round_brackets/multi_line-random-in.R @@ -7,3 +7,16 @@ call3(1, 2, 22), ), 144 ) + +call( + + 1, + call2( + 2, 3, + call3(1, 2, 22), + 5 + + ), + 144 + +) diff --git a/tests/testthat/indention_round_brackets/multi_line-random-in_tree b/tests/testthat/indention_round_brackets/multi_line-random-in_tree deleted file mode 100644 index def8bc3ab..000000000 --- a/tests/testthat/indention_round_brackets/multi_line-random-in_tree +++ /dev/null @@ -1,39 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: call( [0/0] {1} - ¦--expr: call [0/0] {3} - ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {2} - ¦--'(': ( [0/0] {4} - ¦--expr: 1 [1/0] {6} - ¦ °--NUM_CONST: 1 [0/0] {5} - ¦--',': , [0/2] {7} - ¦--expr: call2 [1/0] {8} - ¦ ¦--expr: call2 [0/0] {10} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call2 [0/0] {9} - ¦ ¦--'(': ( [0/4] {11} - ¦ ¦--expr: 2 [1/0] {13} - ¦ ¦ °--NUM_CONST: 2 [0/0] {12} - ¦ ¦--',': , [0/1] {14} - ¦ ¦--expr: 3 [0/0] {16} - ¦ ¦ °--NUM_CONST: 3 [0/0] {15} - ¦ ¦--',': , [0/0] {17} - ¦ ¦--expr: call3 [1/0] {18} - ¦ ¦ ¦--expr: call3 [0/0] {20} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call3 [0/0] {19} - ¦ ¦ ¦--'(': ( [0/0] {21} - ¦ ¦ ¦--expr: 1 [0/0] {23} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {22} - ¦ ¦ ¦--',': , [0/1] {24} - ¦ ¦ ¦--expr: 2 [0/0] {26} - ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {25} - ¦ ¦ ¦--',': , [0/1] {27} - ¦ ¦ ¦--expr: 22 [0/0] {29} - ¦ ¦ ¦ °--NUM_CONST: 22 [0/0] {28} - ¦ ¦ °--')': ) [0/0] {30} - ¦ ¦--',': , [0/13] {31} - ¦ ¦--expr: 5 [1/2] {33} - ¦ ¦ °--NUM_CONST: 5 [0/0] {32} - ¦ °--')': ) [1/0] {34} - ¦--',': , [0/2] {35} - ¦--expr: 144 [1/12] {37} - ¦ °--NUM_CONST: 144 [0/0] {36} - °--')': ) [1/0] {38} diff --git a/tests/testthat/indention_round_brackets/multi_line-random-out.R b/tests/testthat/indention_round_brackets/multi_line-random-out.R index e960a3d0d..98b2950bd 100644 --- a/tests/testthat/indention_round_brackets/multi_line-random-out.R +++ b/tests/testthat/indention_round_brackets/multi_line-random-out.R @@ -7,3 +7,13 @@ call( ), 144 ) + +call( + 1, + call2( + 2, 3, + call3(1, 2, 22), + 5 + ), + 144 +) diff --git a/tests/testthat/indention_round_brackets/one_line-in_tree b/tests/testthat/indention_round_brackets/one_line-in_tree deleted file mode 100644 index 89d3695f6..000000000 --- a/tests/testthat/indention_round_brackets/one_line-in_tree +++ /dev/null @@ -1,31 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: a <- [0/0] {1} - ¦--expr: a [0/1] {3} - ¦ °--SYMBOL: a [0/0] {2} - ¦--LEFT_ASSIGN: <- [0/1] {4} - °--expr: xyz(x [0/0] {5} - ¦--expr: xyz [0/0] {7} - ¦ °--SYMBOL_FUNCTION_CALL: xyz [0/0] {6} - ¦--'(': ( [0/0] {8} - ¦--expr: x [0/0] {10} - ¦ °--SYMBOL: x [0/0] {9} - ¦--',': , [0/1] {11} - ¦--expr: 22 [0/0] {13} - ¦ °--NUM_CONST: 22 [0/0] {12} - ¦--',': , [0/1] {14} - ¦--expr: if(x [0/0] {15} - ¦ ¦--IF: if [0/0] {16} - ¦ ¦--'(': ( [0/0] {17} - ¦ ¦--expr: x > 1 [0/0] {18} - ¦ ¦ ¦--expr: x [0/1] {20} - ¦ ¦ ¦ °--SYMBOL: x [0/0] {19} - ¦ ¦ ¦--GT: > [0/1] {21} - ¦ ¦ °--expr: 1 [0/0] {23} - ¦ ¦ °--NUM_CONST: 1 [0/0] {22} - ¦ ¦--')': ) [0/1] {24} - ¦ ¦--expr: 33 [0/1] {26} - ¦ ¦ °--NUM_CONST: 33 [0/0] {25} - ¦ ¦--ELSE: else [0/1] {27} - ¦ °--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 deleted file mode 100644 index 89d3695f6..000000000 --- a/tests/testthat/indention_round_brackets/one_line-nested-in_tree +++ /dev/null @@ -1,31 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: a <- [0/0] {1} - ¦--expr: a [0/1] {3} - ¦ °--SYMBOL: a [0/0] {2} - ¦--LEFT_ASSIGN: <- [0/1] {4} - °--expr: xyz(x [0/0] {5} - ¦--expr: xyz [0/0] {7} - ¦ °--SYMBOL_FUNCTION_CALL: xyz [0/0] {6} - ¦--'(': ( [0/0] {8} - ¦--expr: x [0/0] {10} - ¦ °--SYMBOL: x [0/0] {9} - ¦--',': , [0/1] {11} - ¦--expr: 22 [0/0] {13} - ¦ °--NUM_CONST: 22 [0/0] {12} - ¦--',': , [0/1] {14} - ¦--expr: if(x [0/0] {15} - ¦ ¦--IF: if [0/0] {16} - ¦ ¦--'(': ( [0/0] {17} - ¦ ¦--expr: x > 1 [0/0] {18} - ¦ ¦ ¦--expr: x [0/1] {20} - ¦ ¦ ¦ °--SYMBOL: x [0/0] {19} - ¦ ¦ ¦--GT: > [0/1] {21} - ¦ ¦ °--expr: 1 [0/0] {23} - ¦ ¦ °--NUM_CONST: 1 [0/0] {22} - ¦ ¦--')': ) [0/1] {24} - ¦ ¦--expr: 33 [0/1] {26} - ¦ ¦ °--NUM_CONST: 33 [0/0] {25} - ¦ ¦--ELSE: else [0/1] {27} - ¦ °--expr: 4 [0/0] {29} - ¦ °--NUM_CONST: 4 [0/0] {28} - °--')': ) [0/0] {30} diff --git a/tests/testthat/indention_square_brackets/square_brackets_double_line_break-in.R b/tests/testthat/indention_square_brackets/square_brackets_double_line_break-in.R index f5a2fc449..322d25bf5 100644 --- a/tests/testthat/indention_square_brackets/square_brackets_double_line_break-in.R +++ b/tests/testthat/indention_square_brackets/square_brackets_double_line_break-in.R @@ -20,3 +20,26 @@ a[[ 2 ] # ] + + +a[[ + + 2 + + +]] + + +a[[ + + # this comment shouldn't mess + 1, c( + + 1, 2 + + # neither should this one + + ) + + +]] diff --git a/tests/testthat/indention_square_brackets/square_brackets_double_line_break-in_tree b/tests/testthat/indention_square_brackets/square_brackets_double_line_break-in_tree deleted file mode 100644 index f6ae4068d..000000000 --- a/tests/testthat/indention_square_brackets/square_brackets_double_line_break-in_tree +++ /dev/null @@ -1,46 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: a[[b] [0/0] {1} - ¦ ¦--expr: a [0/0] {3} - ¦ ¦ °--SYMBOL: a [0/0] {2} - ¦ ¦--LBB: [[ [0/0] {4} - ¦ ¦--expr: b [0/0] {6} - ¦ ¦ °--SYMBOL: b [0/0] {5} - ¦ ¦--']': ] [0/0] {7} - ¦ °--']': ] [0/0] {8} - ¦--expr: a[[ - [3/0] {9} - ¦ ¦--expr: a [0/0] {11} - ¦ ¦ °--SYMBOL: a [0/0] {10} - ¦ ¦--LBB: [[ [0/2] {12} - ¦ ¦--expr: 2 [1/0] {14} - ¦ ¦ °--NUM_CONST: 2 [0/0] {13} - ¦ ¦--']': ] [1/0] {15} - ¦ °--']': ] [1/0] {16} - ¦--expr: a[[ - [2/0] {17} - ¦ ¦--expr: a [0/0] {19} - ¦ ¦ °--SYMBOL: a [0/0] {18} - ¦ ¦--LBB: [[ [0/2] {20} - ¦ ¦--expr: 2 [1/0] {22} - ¦ ¦ °--NUM_CONST: 2 [0/0] {21} - ¦ ¦--']': ] [1/0] {23} - ¦ °--']': ] [0/0] {24} - ¦--expr: a[[ -2 [3/0] {25} - ¦ ¦--expr: a [0/0] {27} - ¦ ¦ °--SYMBOL: a [0/0] {26} - ¦ ¦--LBB: [[ [0/0] {28} - ¦ ¦--expr: 2 [1/2] {30} - ¦ ¦ °--NUM_CONST: 2 [0/0] {29} - ¦ ¦--']': ] [1/0] {31} - ¦ °--']': ] [0/0] {32} - °--expr: a[[ - [3/0] {33} - ¦--expr: a [0/0] {35} - ¦ °--SYMBOL: a [0/0] {34} - ¦--LBB: [[ [0/2] {36} - ¦--expr: 2 [1/0] {38} - ¦ °--NUM_CONST: 2 [0/0] {37} - ¦--']': ] [1/1] {39} - ¦--COMMENT: # [0/0] {40} - °--']': ] [1/0] {41} diff --git a/tests/testthat/indention_square_brackets/square_brackets_double_line_break-out.R b/tests/testthat/indention_square_brackets/square_brackets_double_line_break-out.R index 2b5225958..378cb936b 100644 --- a/tests/testthat/indention_square_brackets/square_brackets_double_line_break-out.R +++ b/tests/testthat/indention_square_brackets/square_brackets_double_line_break-out.R @@ -20,3 +20,18 @@ a[[ 2 ] # ] + + +a[[ + 2 +]] + + +a[[ + # this comment shouldn't mess + 1, c( + 1, 2 + + # neither should this one + ) +]] diff --git a/tests/testthat/indention_square_brackets/square_brackets_line_break-in.R b/tests/testthat/indention_square_brackets/square_brackets_line_break-in.R index 6dd33a894..4d42c1ec0 100644 --- a/tests/testthat/indention_square_brackets/square_brackets_line_break-in.R +++ b/tests/testthat/indention_square_brackets/square_brackets_line_break-in.R @@ -19,6 +19,14 @@ fac[ ] fac[, `:`(a = c) +] + +fac[ + + , `:`(a = c) + + + ] x[a ==3 | @@ -44,3 +52,36 @@ x[a ==3 && x[a ==3 & b == v,] + +x[ + + # comments above + a ==3 & + b == v, + # or below shouldn't be an issue + + + ] + + +x[ + + a, + b + + +] + +x[ + + # this comment shouldn't be an issue + 1, c( + + 1, 2 + + # neither should this one + + ) + + +] 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 deleted file mode 100644 index 834f2095e..000000000 --- a/tests/testthat/indention_square_brackets/square_brackets_line_break-in_tree +++ /dev/null @@ -1,280 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: range [0/0] {1} - ¦ ¦--expr: range [0/0] {3} - ¦ ¦ °--SYMBOL: range [0/0] {2} - ¦ ¦--'[': [ [0/0] {4} - ¦ ¦--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: "non_ [0/0] {11} - ¦ ¦ ¦ °--STR_CONST: "non_ [0/0] {10} - ¦ ¦ ¦--AND: & [0/1] {12} - ¦ ¦ °--expr: str_d [0/0] {13} - ¦ ¦ ¦--expr: str_d [0/0] {15} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: str_d [0/0] {14} - ¦ ¦ ¦--'(': ( [0/0] {16} - ¦ ¦ ¦--expr: text [0/0] {18} - ¦ ¦ ¦ °--SYMBOL: text [0/0] {17} - ¦ ¦ ¦--',': , [0/1] {19} - ¦ ¦ ¦--expr: ";" [0/0] {21} - ¦ ¦ ¦ °--STR_CONST: ";" [0/0] {20} - ¦ ¦ °--')': ) [0/0] {22} - ¦ ¦--',': , [0/0] {23} - ¦ ¦--expr: text [1/0] {24} - ¦ ¦ ¦--expr: text [0/1] {26} - ¦ ¦ ¦ °--SYMBOL: text [0/0] {25} - ¦ ¦ ¦--LEFT_ASSIGN: := [0/1] {27} - ¦ ¦ °--expr: str_r [0/0] {28} - ¦ ¦ ¦--expr: str_r [0/0] {30} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: str_r [0/0] {29} - ¦ ¦ ¦--'(': ( [0/0] {31} - ¦ ¦ ¦--expr: text [0/0] {33} - ¦ ¦ ¦ °--SYMBOL: text [0/0] {32} - ¦ ¦ ¦--',': , [0/1] {34} - ¦ ¦ ¦--expr: ";" [0/0] {36} - ¦ ¦ ¦ °--STR_CONST: ";" [0/0] {35} - ¦ ¦ ¦--',': , [0/1] {37} - ¦ ¦ ¦--expr: "\n" [0/0] {39} - ¦ ¦ ¦ °--STR_CONST: "\n" [0/0] {38} - ¦ ¦ °--')': ) [0/0] {40} - ¦ °--']': ] [0/0] {41} - ¦--expr: fak[a [2/0] {42} - ¦ ¦--expr: fak [0/0] {44} - ¦ ¦ °--SYMBOL: fak [0/0] {43} - ¦ ¦--'[': [ [0/0] {45} - ¦ ¦--expr: a [0/0] {47} - ¦ ¦ °--SYMBOL: a [0/0] {46} - ¦ ¦--',': , [0/1] {48} - ¦ ¦--expr: b [0/0] {50} - ¦ ¦ °--SYMBOL: b [0/0] {49} - ¦ °--']': ] [0/0] {51} - ¦--expr: fac[a [2/0] {52} - ¦ ¦--expr: fac [0/0] {54} - ¦ ¦ °--SYMBOL: fac [0/0] {53} - ¦ ¦--'[': [ [0/0] {55} - ¦ ¦--expr: a [0/0] {57} - ¦ ¦ °--SYMBOL: a [0/0] {56} - ¦ ¦--',': , [0/4] {58} - ¦ ¦--expr: b [1/0] {60} - ¦ ¦ °--SYMBOL: b [0/0] {59} - ¦ °--']': ] [0/0] {61} - ¦--expr: fac[ - [2/0] {62} - ¦ ¦--expr: fac [0/0] {64} - ¦ ¦ °--SYMBOL: fac [0/0] {63} - ¦ ¦--'[': [ [0/2] {65} - ¦ ¦--expr: a [1/0] {67} - ¦ ¦ °--SYMBOL: a [0/0] {66} - ¦ ¦--',': , [0/2] {68} - ¦ ¦--expr: b [1/2] {70} - ¦ ¦ °--SYMBOL: b [0/0] {69} - ¦ °--']': ] [1/0] {71} - ¦--expr: fac[ - [2/0] {72} - ¦ ¦--expr: fac [0/0] {74} - ¦ ¦ °--SYMBOL: fac [0/0] {73} - ¦ ¦--'[': [ [0/2] {75} - ¦ ¦--',': , [1/1] {76} - ¦ ¦--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: b [0/0] {84} - ¦ ¦ ¦ °--SYMBOL: b [0/0] {83} - ¦ ¦ °--')': ) [0/0] {85} - ¦ °--']': ] [0/0] {86} - ¦--expr: fac[ - [2/0] {87} - ¦ ¦--expr: fac [0/0] {89} - ¦ ¦ °--SYMBOL: fac [0/0] {88} - ¦ ¦--'[': [ [0/2] {90} - ¦ ¦--',': , [1/1] {91} - ¦ ¦--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: b [0/0] {99} - ¦ ¦ ¦ °--SYMBOL: b [0/0] {98} - ¦ ¦ °--')': ) [0/0] {100} - ¦ °--']': ] [1/0] {101} - ¦--expr: fac[, [2/0] {102} - ¦ ¦--expr: fac [0/0] {104} - ¦ ¦ °--SYMBOL: fac [0/0] {103} - ¦ ¦--'[': [ [0/0] {105} - ¦ ¦--',': , [0/1] {106} - ¦ ¦--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: c [0/0] {114} - ¦ ¦ ¦ °--SYMBOL: c [0/0] {113} - ¦ ¦ °--')': ) [0/0] {115} - ¦ °--']': ] [1/0] {116} - ¦--expr: x[a = [2/0] {117} - ¦ ¦--expr: x [0/0] {119} - ¦ ¦ °--SYMBOL: x [0/0] {118} - ¦ ¦--'[': [ [0/0] {120} - ¦ ¦--expr: a ==3 [0/0] {121} - ¦ ¦ ¦--expr: a ==3 [0/1] {122} - ¦ ¦ ¦ ¦--expr: a [0/1] {124} - ¦ ¦ ¦ ¦ °--SYMBOL: a [0/0] {123} - ¦ ¦ ¦ ¦--EQ: == [0/0] {125} - ¦ ¦ ¦ °--expr: 3 [0/0] {127} - ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {126} - ¦ ¦ ¦--OR: | [0/2] {128} - ¦ ¦ °--expr: b == [1/0] {129} - ¦ ¦ ¦--expr: b [0/1] {131} - ¦ ¦ ¦ °--SYMBOL: b [0/0] {130} - ¦ ¦ ¦--EQ: == [0/1] {132} - ¦ ¦ °--expr: v [0/0] {134} - ¦ ¦ °--SYMBOL: v [0/0] {133} - ¦ ¦--',': , [0/0] {135} - ¦ °--']': ] [0/0] {136} - ¦--expr: x[a = [2/0] {137} - ¦ ¦--expr: x [0/0] {139} - ¦ ¦ °--SYMBOL: x [0/0] {138} - ¦ ¦--'[': [ [0/0] {140} - ¦ ¦--expr: a ==3 [0/0] {141} - ¦ ¦ ¦--expr: a ==3 [0/2] {142} - ¦ ¦ ¦ ¦--expr: a [0/1] {144} - ¦ ¦ ¦ ¦ °--SYMBOL: a [0/0] {143} - ¦ ¦ ¦ ¦--EQ: == [0/0] {145} - ¦ ¦ ¦ °--expr: 3 [0/0] {147} - ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {146} - ¦ ¦ ¦--OR: | [1/2] {148} - ¦ ¦ °--expr: b == [0/0] {149} - ¦ ¦ ¦--expr: b [0/1] {151} - ¦ ¦ ¦ °--SYMBOL: b [0/0] {150} - ¦ ¦ ¦--EQ: == [0/1] {152} - ¦ ¦ °--expr: v [0/0] {154} - ¦ ¦ °--SYMBOL: v [0/0] {153} - ¦ ¦--',': , [0/0] {155} - ¦ °--']': ] [0/0] {156} - ¦--expr: x[a = [2/0] {157} - ¦ ¦--expr: x [0/0] {159} - ¦ ¦ °--SYMBOL: x [0/0] {158} - ¦ ¦--'[': [ [0/0] {160} - ¦ ¦--expr: a ==3 [0/0] {161} - ¦ ¦ ¦--expr: a ==3 [0/1] {162} - ¦ ¦ ¦ ¦--expr: a [0/1] {164} - ¦ ¦ ¦ ¦ °--SYMBOL: a [0/0] {163} - ¦ ¦ ¦ ¦--EQ: == [0/0] {165} - ¦ ¦ ¦ °--expr: 3 [0/0] {167} - ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {166} - ¦ ¦ ¦--OR2: || [0/4] {168} - ¦ ¦ °--expr: b == [1/0] {169} - ¦ ¦ ¦--expr: b [0/1] {171} - ¦ ¦ ¦ °--SYMBOL: b [0/0] {170} - ¦ ¦ ¦--EQ: == [0/1] {172} - ¦ ¦ °--expr: v [0/0] {174} - ¦ ¦ °--SYMBOL: v [0/0] {173} - ¦ ¦--',': , [0/0] {175} - ¦ °--']': ] [0/0] {176} - ¦--expr: x[a = [2/0] {177} - ¦ ¦--expr: x [0/0] {179} - ¦ ¦ °--SYMBOL: x [0/0] {178} - ¦ ¦--'[': [ [0/0] {180} - ¦ ¦--expr: a ==3 [0/0] {181} - ¦ ¦ ¦--expr: a ==3 [0/2] {182} - ¦ ¦ ¦ ¦--expr: a [0/1] {184} - ¦ ¦ ¦ ¦ °--SYMBOL: a [0/0] {183} - ¦ ¦ ¦ ¦--EQ: == [0/0] {185} - ¦ ¦ ¦ °--expr: 3 [0/0] {187} - ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {186} - ¦ ¦ ¦--OR2: || [1/2] {188} - ¦ ¦ °--expr: b == [0/0] {189} - ¦ ¦ ¦--expr: b [0/1] {191} - ¦ ¦ ¦ °--SYMBOL: b [0/0] {190} - ¦ ¦ ¦--EQ: == [0/1] {192} - ¦ ¦ °--expr: v [0/0] {194} - ¦ ¦ °--SYMBOL: v [0/0] {193} - ¦ ¦--',': , [0/0] {195} - ¦ °--']': ] [0/0] {196} - ¦--expr: x[a = [2/0] {197} - ¦ ¦--expr: x [0/0] {199} - ¦ ¦ °--SYMBOL: x [0/0] {198} - ¦ ¦--'[': [ [0/0] {200} - ¦ ¦--expr: a ==3 [0/0] {201} - ¦ ¦ ¦--expr: a ==3 [0/2] {202} - ¦ ¦ ¦ ¦--expr: a [0/1] {204} - ¦ ¦ ¦ ¦ °--SYMBOL: a [0/0] {203} - ¦ ¦ ¦ ¦--EQ: == [0/0] {205} - ¦ ¦ ¦ °--expr: 3 [0/0] {207} - ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {206} - ¦ ¦ ¦--AND2: && [1/2] {208} - ¦ ¦ °--expr: b == [0/0] {209} - ¦ ¦ ¦--expr: b [0/1] {211} - ¦ ¦ ¦ °--SYMBOL: b [0/0] {210} - ¦ ¦ ¦--EQ: == [0/1] {212} - ¦ ¦ °--expr: v [0/0] {214} - ¦ ¦ °--SYMBOL: v [0/0] {213} - ¦ ¦--',': , [0/0] {215} - ¦ °--']': ] [0/0] {216} - ¦--expr: x[a = [2/0] {217} - ¦ ¦--expr: x [0/0] {219} - ¦ ¦ °--SYMBOL: x [0/0] {218} - ¦ ¦--'[': [ [0/0] {220} - ¦ ¦--expr: a ==3 [0/0] {221} - ¦ ¦ ¦--expr: a ==3 [0/2] {222} - ¦ ¦ ¦ ¦--expr: a [0/1] {224} - ¦ ¦ ¦ ¦ °--SYMBOL: a [0/0] {223} - ¦ ¦ ¦ ¦--EQ: == [0/0] {225} - ¦ ¦ ¦ °--expr: 3 [0/0] {227} - ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {226} - ¦ ¦ ¦--AND: & [1/2] {228} - ¦ ¦ °--expr: b == [0/0] {229} - ¦ ¦ ¦--expr: b [0/1] {231} - ¦ ¦ ¦ °--SYMBOL: b [0/0] {230} - ¦ ¦ ¦--EQ: == [0/1] {232} - ¦ ¦ °--expr: v [0/0] {234} - ¦ ¦ °--SYMBOL: v [0/0] {233} - ¦ ¦--',': , [0/0] {235} - ¦ °--']': ] [0/0] {236} - ¦--expr: x[a = [2/0] {237} - ¦ ¦--expr: x [0/0] {239} - ¦ ¦ °--SYMBOL: x [0/0] {238} - ¦ ¦--'[': [ [0/0] {240} - ¦ ¦--expr: a ==3 [0/0] {241} - ¦ ¦ ¦--expr: a ==3 [0/1] {242} - ¦ ¦ ¦ ¦--expr: a [0/1] {244} - ¦ ¦ ¦ ¦ °--SYMBOL: a [0/0] {243} - ¦ ¦ ¦ ¦--EQ: == [0/0] {245} - ¦ ¦ ¦ °--expr: 3 [0/0] {247} - ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {246} - ¦ ¦ ¦--AND2: && [0/4] {248} - ¦ ¦ °--expr: b == [1/0] {249} - ¦ ¦ ¦--expr: b [0/1] {251} - ¦ ¦ ¦ °--SYMBOL: b [0/0] {250} - ¦ ¦ ¦--EQ: == [0/1] {252} - ¦ ¦ °--expr: v [0/0] {254} - ¦ ¦ °--SYMBOL: v [0/0] {253} - ¦ ¦--',': , [0/0] {255} - ¦ °--']': ] [0/0] {256} - °--expr: x[a = [2/0] {257} - ¦--expr: x [0/0] {259} - ¦ °--SYMBOL: x [0/0] {258} - ¦--'[': [ [0/0] {260} - ¦--expr: a ==3 [0/0] {261} - ¦ ¦--expr: a ==3 [0/1] {262} - ¦ ¦ ¦--expr: a [0/1] {264} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {263} - ¦ ¦ ¦--EQ: == [0/0] {265} - ¦ ¦ °--expr: 3 [0/0] {267} - ¦ ¦ °--NUM_CONST: 3 [0/0] {266} - ¦ ¦--AND: & [0/3] {268} - ¦ °--expr: b == [1/0] {269} - ¦ ¦--expr: b [0/1] {271} - ¦ ¦ °--SYMBOL: b [0/0] {270} - ¦ ¦--EQ: == [0/1] {272} - ¦ °--expr: v [0/0] {274} - ¦ °--SYMBOL: v [0/0] {273} - ¦--',': , [0/0] {275} - °--']': ] [0/0] {276} diff --git a/tests/testthat/indention_square_brackets/square_brackets_line_break-out.R b/tests/testthat/indention_square_brackets/square_brackets_line_break-out.R index ae6be434b..f888e3398 100644 --- a/tests/testthat/indention_square_brackets/square_brackets_line_break-out.R +++ b/tests/testthat/indention_square_brackets/square_brackets_line_break-out.R @@ -25,6 +25,10 @@ fac[ fac[, `:`(a = c)] +fac[ + , `:`(a = c) +] + x[a == 3 | b == v, ] @@ -48,3 +52,25 @@ x[a == 3 && x[a == 3 & b == v, ] + +x[ + # comments above + a == 3 & + b == v, + # or below shouldn't be an issue +] + + +x[ + a, + b +] + +x[ + # this comment shouldn't be an issue + 1, c( + 1, 2 + + # neither should this one + ) +] 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 deleted file mode 100644 index 8604c95f4..000000000 --- a/tests/testthat/insertion_comment_interaction/if_else_if_else_non_strict-in_tree +++ /dev/null @@ -1,256 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: if(TR [0/0] {1} - ¦ ¦--IF: if [0/0] {2} - ¦ ¦--'(': ( [0/0] {3} - ¦ ¦--expr: TRUE [0/0] {5} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {4} - ¦ ¦--')': ) [0/0] {6} - ¦ ¦--expr: NULL [0/1] {8} - ¦ ¦ °--NULL_CONST: NULL [0/0] {7} - ¦ ¦--ELSE: else [0/1] {9} - ¦ °--expr: if(FA [0/0] {10} - ¦ ¦--IF: if [0/0] {11} - ¦ ¦--'(': ( [0/0] {12} - ¦ ¦--expr: FALSE [0/0] {14} - ¦ ¦ °--NUM_CONST: FALSE [0/0] {13} - ¦ ¦--')': ) [0/0] {15} - ¦ ¦--expr: NULL [0/1] {17} - ¦ ¦ °--NULL_CONST: NULL [0/0] {16} - ¦ ¦--ELSE: else [0/1] {18} - ¦ °--expr: NULL [0/0] {20} - ¦ °--NULL_CONST: NULL [0/0] {19} - ¦--expr: if(TR [2/1] {21} - ¦ ¦--IF: if [0/0] {22} - ¦ ¦--'(': ( [0/0] {23} - ¦ ¦--expr: TRUE [0/0] {25} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {24} - ¦ ¦--')': ) [0/0] {26} - ¦ ¦--expr: NULL [0/1] {28} - ¦ ¦ °--NULL_CONST: NULL [0/0] {27} - ¦ ¦--ELSE: else [0/1] {29} - ¦ °--expr: if(FA [0/0] {30} - ¦ ¦--IF: if [0/0] {31} - ¦ ¦--'(': ( [0/0] {32} - ¦ ¦--expr: FALSE [0/0] {34} - ¦ ¦ °--NUM_CONST: FALSE [0/0] {33} - ¦ ¦--')': ) [0/0] {35} - ¦ ¦--expr: NULL [0/1] {37} - ¦ ¦ °--NULL_CONST: NULL [0/0] {36} - ¦ ¦--ELSE: else [0/1] {38} - ¦ °--expr: NULL [0/0] {40} - ¦ °--NULL_CONST: NULL [0/0] {39} - ¦--COMMENT: # com [0/0] {41} - ¦--expr: if(TR [3/0] {42} - ¦ ¦--IF: if [0/0] {43} - ¦ ¦--'(': ( [0/0] {44} - ¦ ¦--expr: TRUE [0/0] {46} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {45} - ¦ ¦--')': ) [0/0] {47} - ¦ ¦--expr: NULL [0/1] {49} - ¦ ¦ °--NULL_CONST: NULL [0/0] {48} - ¦ ¦--ELSE: else [0/1] {50} - ¦ °--expr: if(FA [0/0] {51} - ¦ ¦--IF: if [0/0] {52} - ¦ ¦--'(': ( [0/0] {53} - ¦ ¦--expr: FALSE [0/0] {55} - ¦ ¦ °--NUM_CONST: FALSE [0/0] {54} - ¦ ¦--')': ) [0/0] {56} - ¦ ¦--expr: NULL [0/1] {58} - ¦ ¦ °--NULL_CONST: NULL [0/0] {57} - ¦ ¦--ELSE: else [0/1] {59} - ¦ ¦--COMMENT: # com [0/1] {60} - ¦ °--expr: NULL [1/0] {62} - ¦ °--NULL_CONST: NULL [0/0] {61} - ¦--COMMENT: # if( [2/0] {63} - ¦--COMMENT: # el [1/0] {64} - ¦--expr: if(TR [2/0] {65} - ¦ ¦--IF: if [0/0] {66} - ¦ ¦--'(': ( [0/0] {67} - ¦ ¦--expr: TRUE [0/0] {69} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {68} - ¦ ¦--')': ) [0/0] {70} - ¦ ¦--expr: NULL [0/1] {72} - ¦ ¦ °--NULL_CONST: NULL [0/0] {71} - ¦ ¦--ELSE: else [0/1] {73} - ¦ °--expr: if(FA [0/0] {74} - ¦ ¦--IF: if [0/0] {75} - ¦ ¦--'(': ( [0/0] {76} - ¦ ¦--expr: FALSE [0/0] {78} - ¦ ¦ °--NUM_CONST: FALSE [0/0] {77} - ¦ ¦--')': ) [0/1] {79} - ¦ ¦--COMMENT: # com [0/0] {80} - ¦ ¦--expr: NULL [1/1] {82} - ¦ ¦ °--NULL_CONST: NULL [0/0] {81} - ¦ ¦--ELSE: else [0/1] {83} - ¦ °--expr: NULL [0/0] {85} - ¦ °--NULL_CONST: NULL [0/0] {84} - ¦--expr: if(TR [2/0] {86} - ¦ ¦--IF: if [0/0] {87} - ¦ ¦--'(': ( [0/0] {88} - ¦ ¦--expr: TRUE [0/0] {90} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {89} - ¦ ¦--')': ) [0/0] {91} - ¦ ¦--expr: NULL [0/1] {93} - ¦ ¦ °--NULL_CONST: NULL [0/0] {92} - ¦ ¦--ELSE: else [0/1] {94} - ¦ °--expr: if(FA [0/0] {95} - ¦ ¦--IF: if [0/0] {96} - ¦ ¦--'(': ( [0/0] {97} - ¦ ¦--expr: FALSE [0/1] {99} - ¦ ¦ °--NUM_CONST: FALSE [0/0] {98} - ¦ ¦--COMMENT: # com [0/0] {100} - ¦ ¦--')': ) [1/0] {101} - ¦ ¦--expr: NULL [0/1] {103} - ¦ ¦ °--NULL_CONST: NULL [0/0] {102} - ¦ ¦--ELSE: else [0/1] {104} - ¦ °--expr: NULL [0/0] {106} - ¦ °--NULL_CONST: NULL [0/0] {105} - ¦--expr: if(TR [2/0] {107} - ¦ ¦--IF: if [0/0] {108} - ¦ ¦--'(': ( [0/0] {109} - ¦ ¦--expr: TRUE [0/0] {111} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {110} - ¦ ¦--')': ) [0/0] {112} - ¦ ¦--expr: NULL [0/1] {114} - ¦ ¦ °--NULL_CONST: NULL [0/0] {113} - ¦ ¦--ELSE: else [0/1] {115} - ¦ °--expr: if( # [0/0] {116} - ¦ ¦--IF: if [0/0] {117} - ¦ ¦--'(': ( [0/1] {118} - ¦ ¦--COMMENT: # com [0/0] {119} - ¦ ¦--expr: FALSE [1/0] {121} - ¦ ¦ °--NUM_CONST: FALSE [0/0] {120} - ¦ ¦--')': ) [0/0] {122} - ¦ ¦--expr: NULL [0/1] {124} - ¦ ¦ °--NULL_CONST: NULL [0/0] {123} - ¦ ¦--ELSE: else [0/1] {125} - ¦ °--expr: NULL [0/0] {127} - ¦ °--NULL_CONST: NULL [0/0] {126} - ¦--expr: if(TR [2/0] {128} - ¦ ¦--IF: if [0/0] {129} - ¦ ¦--'(': ( [0/0] {130} - ¦ ¦--expr: TRUE [0/0] {132} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {131} - ¦ ¦--')': ) [0/0] {133} - ¦ ¦--expr: NULL [0/1] {135} - ¦ ¦ °--NULL_CONST: NULL [0/0] {134} - ¦ ¦--ELSE: else [0/1] {136} - ¦ °--expr: if # [0/0] {137} - ¦ ¦--IF: if [0/1] {138} - ¦ ¦--COMMENT: # com [0/0] {139} - ¦ ¦--'(': ( [1/0] {140} - ¦ ¦--expr: FALSE [0/0] {142} - ¦ ¦ °--NUM_CONST: FALSE [0/0] {141} - ¦ ¦--')': ) [0/0] {143} - ¦ ¦--expr: NULL [0/1] {145} - ¦ ¦ °--NULL_CONST: NULL [0/0] {144} - ¦ ¦--ELSE: else [0/1] {146} - ¦ °--expr: NULL [0/0] {148} - ¦ °--NULL_CONST: NULL [0/0] {147} - ¦--expr: if(TR [2/0] {149} - ¦ ¦--IF: if [0/0] {150} - ¦ ¦--'(': ( [0/0] {151} - ¦ ¦--expr: TRUE [0/0] {153} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {152} - ¦ ¦--')': ) [0/0] {154} - ¦ ¦--expr: NULL [0/1] {156} - ¦ ¦ °--NULL_CONST: NULL [0/0] {155} - ¦ ¦--ELSE: else [0/1] {157} - ¦ ¦--COMMENT: # com [0/1] {158} - ¦ °--expr: if(FA [1/0] {159} - ¦ ¦--IF: if [0/0] {160} - ¦ ¦--'(': ( [0/0] {161} - ¦ ¦--expr: FALSE [0/0] {163} - ¦ ¦ °--NUM_CONST: FALSE [0/0] {162} - ¦ ¦--')': ) [0/0] {164} - ¦ ¦--expr: NULL [0/1] {166} - ¦ ¦ °--NULL_CONST: NULL [0/0] {165} - ¦ ¦--ELSE: else [0/1] {167} - ¦ °--expr: NULL [0/0] {169} - ¦ °--NULL_CONST: NULL [0/0] {168} - ¦--COMMENT: # if( [2/0] {170} - ¦--COMMENT: # el [1/0] {171} - ¦--expr: if(TR [2/0] {172} - ¦ ¦--IF: if [0/0] {173} - ¦ ¦--'(': ( [0/0] {174} - ¦ ¦--expr: TRUE [0/0] {176} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {175} - ¦ ¦--')': ) [0/1] {177} - ¦ ¦--COMMENT: # com [0/0] {178} - ¦ ¦--expr: NULL [1/1] {180} - ¦ ¦ °--NULL_CONST: NULL [0/0] {179} - ¦ ¦--ELSE: else [0/1] {181} - ¦ °--expr: if(FA [0/0] {182} - ¦ ¦--IF: if [0/0] {183} - ¦ ¦--'(': ( [0/0] {184} - ¦ ¦--expr: FALSE [0/0] {186} - ¦ ¦ °--NUM_CONST: FALSE [0/0] {185} - ¦ ¦--')': ) [0/0] {187} - ¦ ¦--expr: NULL [0/1] {189} - ¦ ¦ °--NULL_CONST: NULL [0/0] {188} - ¦ ¦--ELSE: else [0/1] {190} - ¦ °--expr: NULL [0/0] {192} - ¦ °--NULL_CONST: NULL [0/0] {191} - ¦--expr: if(TR [2/0] {193} - ¦ ¦--IF: if [0/0] {194} - ¦ ¦--'(': ( [0/0] {195} - ¦ ¦--expr: TRUE [0/1] {197} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {196} - ¦ ¦--COMMENT: # com [0/0] {198} - ¦ ¦--')': ) [1/0] {199} - ¦ ¦--expr: NULL [0/1] {201} - ¦ ¦ °--NULL_CONST: NULL [0/0] {200} - ¦ ¦--ELSE: else [0/1] {202} - ¦ °--expr: if(FA [0/0] {203} - ¦ ¦--IF: if [0/0] {204} - ¦ ¦--'(': ( [0/0] {205} - ¦ ¦--expr: FALSE [0/0] {207} - ¦ ¦ °--NUM_CONST: FALSE [0/0] {206} - ¦ ¦--')': ) [0/0] {208} - ¦ ¦--expr: NULL [0/1] {210} - ¦ ¦ °--NULL_CONST: NULL [0/0] {209} - ¦ ¦--ELSE: else [0/1] {211} - ¦ °--expr: NULL [0/0] {213} - ¦ °--NULL_CONST: NULL [0/0] {212} - ¦--expr: if( # [2/0] {214} - ¦ ¦--IF: if [0/0] {215} - ¦ ¦--'(': ( [0/1] {216} - ¦ ¦--COMMENT: # com [0/0] {217} - ¦ ¦--expr: TRUE [1/0] {219} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {218} - ¦ ¦--')': ) [0/0] {220} - ¦ ¦--expr: NULL [0/1] {222} - ¦ ¦ °--NULL_CONST: NULL [0/0] {221} - ¦ ¦--ELSE: else [0/1] {223} - ¦ °--expr: if(FA [0/0] {224} - ¦ ¦--IF: if [0/0] {225} - ¦ ¦--'(': ( [0/0] {226} - ¦ ¦--expr: FALSE [0/0] {228} - ¦ ¦ °--NUM_CONST: FALSE [0/0] {227} - ¦ ¦--')': ) [0/0] {229} - ¦ ¦--expr: NULL [0/1] {231} - ¦ ¦ °--NULL_CONST: NULL [0/0] {230} - ¦ ¦--ELSE: else [0/1] {232} - ¦ °--expr: NULL [0/0] {234} - ¦ °--NULL_CONST: NULL [0/0] {233} - °--expr: if # [2/0] {235} - ¦--IF: if [0/1] {236} - ¦--COMMENT: # com [0/0] {237} - ¦--'(': ( [1/0] {238} - ¦--expr: TRUE [0/0] {240} - ¦ °--NUM_CONST: TRUE [0/0] {239} - ¦--')': ) [0/0] {241} - ¦--expr: NULL [0/1] {243} - ¦ °--NULL_CONST: NULL [0/0] {242} - ¦--ELSE: else [0/1] {244} - °--expr: if(FA [0/0] {245} - ¦--IF: if [0/0] {246} - ¦--'(': ( [0/0] {247} - ¦--expr: FALSE [0/0] {249} - ¦ °--NUM_CONST: FALSE [0/0] {248} - ¦--')': ) [0/0] {250} - ¦--expr: NULL [0/1] {252} - ¦ °--NULL_CONST: NULL [0/0] {251} - ¦--ELSE: else [0/1] {253} - °--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 deleted file mode 100644 index 8604c95f4..000000000 --- a/tests/testthat/insertion_comment_interaction/if_else_if_else_strict-in_tree +++ /dev/null @@ -1,256 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: if(TR [0/0] {1} - ¦ ¦--IF: if [0/0] {2} - ¦ ¦--'(': ( [0/0] {3} - ¦ ¦--expr: TRUE [0/0] {5} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {4} - ¦ ¦--')': ) [0/0] {6} - ¦ ¦--expr: NULL [0/1] {8} - ¦ ¦ °--NULL_CONST: NULL [0/0] {7} - ¦ ¦--ELSE: else [0/1] {9} - ¦ °--expr: if(FA [0/0] {10} - ¦ ¦--IF: if [0/0] {11} - ¦ ¦--'(': ( [0/0] {12} - ¦ ¦--expr: FALSE [0/0] {14} - ¦ ¦ °--NUM_CONST: FALSE [0/0] {13} - ¦ ¦--')': ) [0/0] {15} - ¦ ¦--expr: NULL [0/1] {17} - ¦ ¦ °--NULL_CONST: NULL [0/0] {16} - ¦ ¦--ELSE: else [0/1] {18} - ¦ °--expr: NULL [0/0] {20} - ¦ °--NULL_CONST: NULL [0/0] {19} - ¦--expr: if(TR [2/1] {21} - ¦ ¦--IF: if [0/0] {22} - ¦ ¦--'(': ( [0/0] {23} - ¦ ¦--expr: TRUE [0/0] {25} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {24} - ¦ ¦--')': ) [0/0] {26} - ¦ ¦--expr: NULL [0/1] {28} - ¦ ¦ °--NULL_CONST: NULL [0/0] {27} - ¦ ¦--ELSE: else [0/1] {29} - ¦ °--expr: if(FA [0/0] {30} - ¦ ¦--IF: if [0/0] {31} - ¦ ¦--'(': ( [0/0] {32} - ¦ ¦--expr: FALSE [0/0] {34} - ¦ ¦ °--NUM_CONST: FALSE [0/0] {33} - ¦ ¦--')': ) [0/0] {35} - ¦ ¦--expr: NULL [0/1] {37} - ¦ ¦ °--NULL_CONST: NULL [0/0] {36} - ¦ ¦--ELSE: else [0/1] {38} - ¦ °--expr: NULL [0/0] {40} - ¦ °--NULL_CONST: NULL [0/0] {39} - ¦--COMMENT: # com [0/0] {41} - ¦--expr: if(TR [3/0] {42} - ¦ ¦--IF: if [0/0] {43} - ¦ ¦--'(': ( [0/0] {44} - ¦ ¦--expr: TRUE [0/0] {46} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {45} - ¦ ¦--')': ) [0/0] {47} - ¦ ¦--expr: NULL [0/1] {49} - ¦ ¦ °--NULL_CONST: NULL [0/0] {48} - ¦ ¦--ELSE: else [0/1] {50} - ¦ °--expr: if(FA [0/0] {51} - ¦ ¦--IF: if [0/0] {52} - ¦ ¦--'(': ( [0/0] {53} - ¦ ¦--expr: FALSE [0/0] {55} - ¦ ¦ °--NUM_CONST: FALSE [0/0] {54} - ¦ ¦--')': ) [0/0] {56} - ¦ ¦--expr: NULL [0/1] {58} - ¦ ¦ °--NULL_CONST: NULL [0/0] {57} - ¦ ¦--ELSE: else [0/1] {59} - ¦ ¦--COMMENT: # com [0/1] {60} - ¦ °--expr: NULL [1/0] {62} - ¦ °--NULL_CONST: NULL [0/0] {61} - ¦--COMMENT: # if( [2/0] {63} - ¦--COMMENT: # el [1/0] {64} - ¦--expr: if(TR [2/0] {65} - ¦ ¦--IF: if [0/0] {66} - ¦ ¦--'(': ( [0/0] {67} - ¦ ¦--expr: TRUE [0/0] {69} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {68} - ¦ ¦--')': ) [0/0] {70} - ¦ ¦--expr: NULL [0/1] {72} - ¦ ¦ °--NULL_CONST: NULL [0/0] {71} - ¦ ¦--ELSE: else [0/1] {73} - ¦ °--expr: if(FA [0/0] {74} - ¦ ¦--IF: if [0/0] {75} - ¦ ¦--'(': ( [0/0] {76} - ¦ ¦--expr: FALSE [0/0] {78} - ¦ ¦ °--NUM_CONST: FALSE [0/0] {77} - ¦ ¦--')': ) [0/1] {79} - ¦ ¦--COMMENT: # com [0/0] {80} - ¦ ¦--expr: NULL [1/1] {82} - ¦ ¦ °--NULL_CONST: NULL [0/0] {81} - ¦ ¦--ELSE: else [0/1] {83} - ¦ °--expr: NULL [0/0] {85} - ¦ °--NULL_CONST: NULL [0/0] {84} - ¦--expr: if(TR [2/0] {86} - ¦ ¦--IF: if [0/0] {87} - ¦ ¦--'(': ( [0/0] {88} - ¦ ¦--expr: TRUE [0/0] {90} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {89} - ¦ ¦--')': ) [0/0] {91} - ¦ ¦--expr: NULL [0/1] {93} - ¦ ¦ °--NULL_CONST: NULL [0/0] {92} - ¦ ¦--ELSE: else [0/1] {94} - ¦ °--expr: if(FA [0/0] {95} - ¦ ¦--IF: if [0/0] {96} - ¦ ¦--'(': ( [0/0] {97} - ¦ ¦--expr: FALSE [0/1] {99} - ¦ ¦ °--NUM_CONST: FALSE [0/0] {98} - ¦ ¦--COMMENT: # com [0/0] {100} - ¦ ¦--')': ) [1/0] {101} - ¦ ¦--expr: NULL [0/1] {103} - ¦ ¦ °--NULL_CONST: NULL [0/0] {102} - ¦ ¦--ELSE: else [0/1] {104} - ¦ °--expr: NULL [0/0] {106} - ¦ °--NULL_CONST: NULL [0/0] {105} - ¦--expr: if(TR [2/0] {107} - ¦ ¦--IF: if [0/0] {108} - ¦ ¦--'(': ( [0/0] {109} - ¦ ¦--expr: TRUE [0/0] {111} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {110} - ¦ ¦--')': ) [0/0] {112} - ¦ ¦--expr: NULL [0/1] {114} - ¦ ¦ °--NULL_CONST: NULL [0/0] {113} - ¦ ¦--ELSE: else [0/1] {115} - ¦ °--expr: if( # [0/0] {116} - ¦ ¦--IF: if [0/0] {117} - ¦ ¦--'(': ( [0/1] {118} - ¦ ¦--COMMENT: # com [0/0] {119} - ¦ ¦--expr: FALSE [1/0] {121} - ¦ ¦ °--NUM_CONST: FALSE [0/0] {120} - ¦ ¦--')': ) [0/0] {122} - ¦ ¦--expr: NULL [0/1] {124} - ¦ ¦ °--NULL_CONST: NULL [0/0] {123} - ¦ ¦--ELSE: else [0/1] {125} - ¦ °--expr: NULL [0/0] {127} - ¦ °--NULL_CONST: NULL [0/0] {126} - ¦--expr: if(TR [2/0] {128} - ¦ ¦--IF: if [0/0] {129} - ¦ ¦--'(': ( [0/0] {130} - ¦ ¦--expr: TRUE [0/0] {132} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {131} - ¦ ¦--')': ) [0/0] {133} - ¦ ¦--expr: NULL [0/1] {135} - ¦ ¦ °--NULL_CONST: NULL [0/0] {134} - ¦ ¦--ELSE: else [0/1] {136} - ¦ °--expr: if # [0/0] {137} - ¦ ¦--IF: if [0/1] {138} - ¦ ¦--COMMENT: # com [0/0] {139} - ¦ ¦--'(': ( [1/0] {140} - ¦ ¦--expr: FALSE [0/0] {142} - ¦ ¦ °--NUM_CONST: FALSE [0/0] {141} - ¦ ¦--')': ) [0/0] {143} - ¦ ¦--expr: NULL [0/1] {145} - ¦ ¦ °--NULL_CONST: NULL [0/0] {144} - ¦ ¦--ELSE: else [0/1] {146} - ¦ °--expr: NULL [0/0] {148} - ¦ °--NULL_CONST: NULL [0/0] {147} - ¦--expr: if(TR [2/0] {149} - ¦ ¦--IF: if [0/0] {150} - ¦ ¦--'(': ( [0/0] {151} - ¦ ¦--expr: TRUE [0/0] {153} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {152} - ¦ ¦--')': ) [0/0] {154} - ¦ ¦--expr: NULL [0/1] {156} - ¦ ¦ °--NULL_CONST: NULL [0/0] {155} - ¦ ¦--ELSE: else [0/1] {157} - ¦ ¦--COMMENT: # com [0/1] {158} - ¦ °--expr: if(FA [1/0] {159} - ¦ ¦--IF: if [0/0] {160} - ¦ ¦--'(': ( [0/0] {161} - ¦ ¦--expr: FALSE [0/0] {163} - ¦ ¦ °--NUM_CONST: FALSE [0/0] {162} - ¦ ¦--')': ) [0/0] {164} - ¦ ¦--expr: NULL [0/1] {166} - ¦ ¦ °--NULL_CONST: NULL [0/0] {165} - ¦ ¦--ELSE: else [0/1] {167} - ¦ °--expr: NULL [0/0] {169} - ¦ °--NULL_CONST: NULL [0/0] {168} - ¦--COMMENT: # if( [2/0] {170} - ¦--COMMENT: # el [1/0] {171} - ¦--expr: if(TR [2/0] {172} - ¦ ¦--IF: if [0/0] {173} - ¦ ¦--'(': ( [0/0] {174} - ¦ ¦--expr: TRUE [0/0] {176} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {175} - ¦ ¦--')': ) [0/1] {177} - ¦ ¦--COMMENT: # com [0/0] {178} - ¦ ¦--expr: NULL [1/1] {180} - ¦ ¦ °--NULL_CONST: NULL [0/0] {179} - ¦ ¦--ELSE: else [0/1] {181} - ¦ °--expr: if(FA [0/0] {182} - ¦ ¦--IF: if [0/0] {183} - ¦ ¦--'(': ( [0/0] {184} - ¦ ¦--expr: FALSE [0/0] {186} - ¦ ¦ °--NUM_CONST: FALSE [0/0] {185} - ¦ ¦--')': ) [0/0] {187} - ¦ ¦--expr: NULL [0/1] {189} - ¦ ¦ °--NULL_CONST: NULL [0/0] {188} - ¦ ¦--ELSE: else [0/1] {190} - ¦ °--expr: NULL [0/0] {192} - ¦ °--NULL_CONST: NULL [0/0] {191} - ¦--expr: if(TR [2/0] {193} - ¦ ¦--IF: if [0/0] {194} - ¦ ¦--'(': ( [0/0] {195} - ¦ ¦--expr: TRUE [0/1] {197} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {196} - ¦ ¦--COMMENT: # com [0/0] {198} - ¦ ¦--')': ) [1/0] {199} - ¦ ¦--expr: NULL [0/1] {201} - ¦ ¦ °--NULL_CONST: NULL [0/0] {200} - ¦ ¦--ELSE: else [0/1] {202} - ¦ °--expr: if(FA [0/0] {203} - ¦ ¦--IF: if [0/0] {204} - ¦ ¦--'(': ( [0/0] {205} - ¦ ¦--expr: FALSE [0/0] {207} - ¦ ¦ °--NUM_CONST: FALSE [0/0] {206} - ¦ ¦--')': ) [0/0] {208} - ¦ ¦--expr: NULL [0/1] {210} - ¦ ¦ °--NULL_CONST: NULL [0/0] {209} - ¦ ¦--ELSE: else [0/1] {211} - ¦ °--expr: NULL [0/0] {213} - ¦ °--NULL_CONST: NULL [0/0] {212} - ¦--expr: if( # [2/0] {214} - ¦ ¦--IF: if [0/0] {215} - ¦ ¦--'(': ( [0/1] {216} - ¦ ¦--COMMENT: # com [0/0] {217} - ¦ ¦--expr: TRUE [1/0] {219} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {218} - ¦ ¦--')': ) [0/0] {220} - ¦ ¦--expr: NULL [0/1] {222} - ¦ ¦ °--NULL_CONST: NULL [0/0] {221} - ¦ ¦--ELSE: else [0/1] {223} - ¦ °--expr: if(FA [0/0] {224} - ¦ ¦--IF: if [0/0] {225} - ¦ ¦--'(': ( [0/0] {226} - ¦ ¦--expr: FALSE [0/0] {228} - ¦ ¦ °--NUM_CONST: FALSE [0/0] {227} - ¦ ¦--')': ) [0/0] {229} - ¦ ¦--expr: NULL [0/1] {231} - ¦ ¦ °--NULL_CONST: NULL [0/0] {230} - ¦ ¦--ELSE: else [0/1] {232} - ¦ °--expr: NULL [0/0] {234} - ¦ °--NULL_CONST: NULL [0/0] {233} - °--expr: if # [2/0] {235} - ¦--IF: if [0/1] {236} - ¦--COMMENT: # com [0/0] {237} - ¦--'(': ( [1/0] {238} - ¦--expr: TRUE [0/0] {240} - ¦ °--NUM_CONST: TRUE [0/0] {239} - ¦--')': ) [0/0] {241} - ¦--expr: NULL [0/1] {243} - ¦ °--NULL_CONST: NULL [0/0] {242} - ¦--ELSE: else [0/1] {244} - °--expr: if(FA [0/0] {245} - ¦--IF: if [0/0] {246} - ¦--'(': ( [0/0] {247} - ¦--expr: FALSE [0/0] {249} - ¦ °--NUM_CONST: FALSE [0/0] {248} - ¦--')': ) [0/0] {250} - ¦--expr: NULL [0/1] {252} - ¦ °--NULL_CONST: NULL [0/0] {251} - ¦--ELSE: else [0/1] {253} - °--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 deleted file mode 100644 index 7d277ba18..000000000 --- a/tests/testthat/insertion_comment_interaction/if_else_non_strict-in_tree +++ /dev/null @@ -1,86 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: if(TR [0/0] {1} - ¦ ¦--IF: if [0/0] {2} - ¦ ¦--'(': ( [0/0] {3} - ¦ ¦--expr: TRUE [0/0] {5} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {4} - ¦ ¦--')': ) [0/0] {6} - ¦ ¦--expr: NULL [0/1] {8} - ¦ ¦ °--NULL_CONST: NULL [0/0] {7} - ¦ ¦--ELSE: else [0/1] {9} - ¦ °--expr: NULL [0/0] {11} - ¦ °--NULL_CONST: NULL [0/0] {10} - ¦--expr: if(TR [2/1] {12} - ¦ ¦--IF: if [0/0] {13} - ¦ ¦--'(': ( [0/0] {14} - ¦ ¦--expr: TRUE [0/0] {16} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {15} - ¦ ¦--')': ) [0/0] {17} - ¦ ¦--expr: NULL [0/1] {19} - ¦ ¦ °--NULL_CONST: NULL [0/0] {18} - ¦ ¦--ELSE: else [0/1] {20} - ¦ °--expr: NULL [0/0] {22} - ¦ °--NULL_CONST: NULL [0/0] {21} - ¦--COMMENT: # com [0/0] {23} - ¦--expr: if(TR [3/0] {24} - ¦ ¦--IF: if [0/0] {25} - ¦ ¦--'(': ( [0/0] {26} - ¦ ¦--expr: TRUE [0/0] {28} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {27} - ¦ ¦--')': ) [0/0] {29} - ¦ ¦--expr: NULL [0/1] {31} - ¦ ¦ °--NULL_CONST: NULL [0/0] {30} - ¦ ¦--ELSE: else [0/1] {32} - ¦ ¦--COMMENT: # com [0/1] {33} - ¦ °--expr: NULL [1/0] {35} - ¦ °--NULL_CONST: NULL [0/0] {34} - ¦--COMMENT: # if( [2/0] {36} - ¦--COMMENT: # el [1/0] {37} - ¦--expr: if(TR [2/0] {38} - ¦ ¦--IF: if [0/0] {39} - ¦ ¦--'(': ( [0/0] {40} - ¦ ¦--expr: TRUE [0/0] {42} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {41} - ¦ ¦--')': ) [0/1] {43} - ¦ ¦--COMMENT: # com [0/0] {44} - ¦ ¦--expr: NULL [1/1] {46} - ¦ ¦ °--NULL_CONST: NULL [0/0] {45} - ¦ ¦--ELSE: else [0/1] {47} - ¦ °--expr: NULL [0/0] {49} - ¦ °--NULL_CONST: NULL [0/0] {48} - ¦--expr: if(TR [2/0] {50} - ¦ ¦--IF: if [0/0] {51} - ¦ ¦--'(': ( [0/0] {52} - ¦ ¦--expr: TRUE [0/1] {54} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {53} - ¦ ¦--COMMENT: # com [0/0] {55} - ¦ ¦--')': ) [1/0] {56} - ¦ ¦--expr: NULL [0/1] {58} - ¦ ¦ °--NULL_CONST: NULL [0/0] {57} - ¦ ¦--ELSE: else [0/1] {59} - ¦ °--expr: NULL [0/0] {61} - ¦ °--NULL_CONST: NULL [0/0] {60} - ¦--expr: if( # [2/0] {62} - ¦ ¦--IF: if [0/0] {63} - ¦ ¦--'(': ( [0/1] {64} - ¦ ¦--COMMENT: # com [0/0] {65} - ¦ ¦--expr: TRUE [1/0] {67} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {66} - ¦ ¦--')': ) [0/0] {68} - ¦ ¦--expr: NULL [0/1] {70} - ¦ ¦ °--NULL_CONST: NULL [0/0] {69} - ¦ ¦--ELSE: else [0/1] {71} - ¦ °--expr: NULL [0/0] {73} - ¦ °--NULL_CONST: NULL [0/0] {72} - °--expr: if # [2/0] {74} - ¦--IF: if [0/1] {75} - ¦--COMMENT: # com [0/0] {76} - ¦--'(': ( [1/0] {77} - ¦--expr: TRUE [0/0] {79} - ¦ °--NUM_CONST: TRUE [0/0] {78} - ¦--')': ) [0/0] {80} - ¦--expr: NULL [0/1] {82} - ¦ °--NULL_CONST: NULL [0/0] {81} - ¦--ELSE: else [0/1] {83} - °--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 deleted file mode 100644 index 7d277ba18..000000000 --- a/tests/testthat/insertion_comment_interaction/if_else_strict-in_tree +++ /dev/null @@ -1,86 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: if(TR [0/0] {1} - ¦ ¦--IF: if [0/0] {2} - ¦ ¦--'(': ( [0/0] {3} - ¦ ¦--expr: TRUE [0/0] {5} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {4} - ¦ ¦--')': ) [0/0] {6} - ¦ ¦--expr: NULL [0/1] {8} - ¦ ¦ °--NULL_CONST: NULL [0/0] {7} - ¦ ¦--ELSE: else [0/1] {9} - ¦ °--expr: NULL [0/0] {11} - ¦ °--NULL_CONST: NULL [0/0] {10} - ¦--expr: if(TR [2/1] {12} - ¦ ¦--IF: if [0/0] {13} - ¦ ¦--'(': ( [0/0] {14} - ¦ ¦--expr: TRUE [0/0] {16} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {15} - ¦ ¦--')': ) [0/0] {17} - ¦ ¦--expr: NULL [0/1] {19} - ¦ ¦ °--NULL_CONST: NULL [0/0] {18} - ¦ ¦--ELSE: else [0/1] {20} - ¦ °--expr: NULL [0/0] {22} - ¦ °--NULL_CONST: NULL [0/0] {21} - ¦--COMMENT: # com [0/0] {23} - ¦--expr: if(TR [3/0] {24} - ¦ ¦--IF: if [0/0] {25} - ¦ ¦--'(': ( [0/0] {26} - ¦ ¦--expr: TRUE [0/0] {28} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {27} - ¦ ¦--')': ) [0/0] {29} - ¦ ¦--expr: NULL [0/1] {31} - ¦ ¦ °--NULL_CONST: NULL [0/0] {30} - ¦ ¦--ELSE: else [0/1] {32} - ¦ ¦--COMMENT: # com [0/1] {33} - ¦ °--expr: NULL [1/0] {35} - ¦ °--NULL_CONST: NULL [0/0] {34} - ¦--COMMENT: # if( [2/0] {36} - ¦--COMMENT: # el [1/0] {37} - ¦--expr: if(TR [2/0] {38} - ¦ ¦--IF: if [0/0] {39} - ¦ ¦--'(': ( [0/0] {40} - ¦ ¦--expr: TRUE [0/0] {42} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {41} - ¦ ¦--')': ) [0/1] {43} - ¦ ¦--COMMENT: # com [0/0] {44} - ¦ ¦--expr: NULL [1/1] {46} - ¦ ¦ °--NULL_CONST: NULL [0/0] {45} - ¦ ¦--ELSE: else [0/1] {47} - ¦ °--expr: NULL [0/0] {49} - ¦ °--NULL_CONST: NULL [0/0] {48} - ¦--expr: if(TR [2/0] {50} - ¦ ¦--IF: if [0/0] {51} - ¦ ¦--'(': ( [0/0] {52} - ¦ ¦--expr: TRUE [0/1] {54} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {53} - ¦ ¦--COMMENT: # com [0/0] {55} - ¦ ¦--')': ) [1/0] {56} - ¦ ¦--expr: NULL [0/1] {58} - ¦ ¦ °--NULL_CONST: NULL [0/0] {57} - ¦ ¦--ELSE: else [0/1] {59} - ¦ °--expr: NULL [0/0] {61} - ¦ °--NULL_CONST: NULL [0/0] {60} - ¦--expr: if( # [2/0] {62} - ¦ ¦--IF: if [0/0] {63} - ¦ ¦--'(': ( [0/1] {64} - ¦ ¦--COMMENT: # com [0/0] {65} - ¦ ¦--expr: TRUE [1/0] {67} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {66} - ¦ ¦--')': ) [0/0] {68} - ¦ ¦--expr: NULL [0/1] {70} - ¦ ¦ °--NULL_CONST: NULL [0/0] {69} - ¦ ¦--ELSE: else [0/1] {71} - ¦ °--expr: NULL [0/0] {73} - ¦ °--NULL_CONST: NULL [0/0] {72} - °--expr: if # [2/0] {74} - ¦--IF: if [0/1] {75} - ¦--COMMENT: # com [0/0] {76} - ¦--'(': ( [1/0] {77} - ¦--expr: TRUE [0/0] {79} - ¦ °--NUM_CONST: TRUE [0/0] {78} - ¦--')': ) [0/0] {80} - ¦--expr: NULL [0/1] {82} - ¦ °--NULL_CONST: NULL [0/0] {81} - ¦--ELSE: else [0/1] {83} - °--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 deleted file mode 100644 index cc8154b6e..000000000 --- a/tests/testthat/insertion_comment_interaction/just_if_non_strict-in_tree +++ /dev/null @@ -1,54 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: if(TR [0/0] {1} - ¦ ¦--IF: if [0/0] {2} - ¦ ¦--'(': ( [0/0] {3} - ¦ ¦--expr: TRUE [0/0] {5} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {4} - ¦ ¦--')': ) [0/0] {6} - ¦ °--expr: NULL [0/0] {8} - ¦ °--NULL_CONST: NULL [0/0] {7} - ¦--expr: if(TR [2/1] {9} - ¦ ¦--IF: if [0/0] {10} - ¦ ¦--'(': ( [0/0] {11} - ¦ ¦--expr: TRUE [0/0] {13} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {12} - ¦ ¦--')': ) [0/0] {14} - ¦ °--expr: NULL [0/0] {16} - ¦ °--NULL_CONST: NULL [0/0] {15} - ¦--COMMENT: # com [0/0] {17} - ¦--expr: if(TR [3/0] {18} - ¦ ¦--IF: if [0/0] {19} - ¦ ¦--'(': ( [0/0] {20} - ¦ ¦--expr: TRUE [0/0] {22} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {21} - ¦ ¦--')': ) [0/1] {23} - ¦ ¦--COMMENT: # com [0/0] {24} - ¦ °--expr: NULL [1/0] {26} - ¦ °--NULL_CONST: NULL [0/0] {25} - ¦--expr: if(TR [2/0] {27} - ¦ ¦--IF: if [0/0] {28} - ¦ ¦--'(': ( [0/0] {29} - ¦ ¦--expr: TRUE [0/1] {31} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {30} - ¦ ¦--COMMENT: # com [0/0] {32} - ¦ ¦--')': ) [1/0] {33} - ¦ °--expr: NULL [0/0] {35} - ¦ °--NULL_CONST: NULL [0/0] {34} - ¦--expr: if( # [2/0] {36} - ¦ ¦--IF: if [0/0] {37} - ¦ ¦--'(': ( [0/1] {38} - ¦ ¦--COMMENT: # com [0/0] {39} - ¦ ¦--expr: TRUE [1/0] {41} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {40} - ¦ ¦--')': ) [0/0] {42} - ¦ °--expr: NULL [0/0] {44} - ¦ °--NULL_CONST: NULL [0/0] {43} - °--expr: if # [2/0] {45} - ¦--IF: if [0/1] {46} - ¦--COMMENT: # com [0/0] {47} - ¦--'(': ( [1/0] {48} - ¦--expr: TRUE [0/0] {50} - ¦ °--NUM_CONST: TRUE [0/0] {49} - ¦--')': ) [0/0] {51} - °--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 deleted file mode 100644 index cc8154b6e..000000000 --- a/tests/testthat/insertion_comment_interaction/just_if_strict-in_tree +++ /dev/null @@ -1,54 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: if(TR [0/0] {1} - ¦ ¦--IF: if [0/0] {2} - ¦ ¦--'(': ( [0/0] {3} - ¦ ¦--expr: TRUE [0/0] {5} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {4} - ¦ ¦--')': ) [0/0] {6} - ¦ °--expr: NULL [0/0] {8} - ¦ °--NULL_CONST: NULL [0/0] {7} - ¦--expr: if(TR [2/1] {9} - ¦ ¦--IF: if [0/0] {10} - ¦ ¦--'(': ( [0/0] {11} - ¦ ¦--expr: TRUE [0/0] {13} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {12} - ¦ ¦--')': ) [0/0] {14} - ¦ °--expr: NULL [0/0] {16} - ¦ °--NULL_CONST: NULL [0/0] {15} - ¦--COMMENT: # com [0/0] {17} - ¦--expr: if(TR [3/0] {18} - ¦ ¦--IF: if [0/0] {19} - ¦ ¦--'(': ( [0/0] {20} - ¦ ¦--expr: TRUE [0/0] {22} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {21} - ¦ ¦--')': ) [0/1] {23} - ¦ ¦--COMMENT: # com [0/0] {24} - ¦ °--expr: NULL [1/0] {26} - ¦ °--NULL_CONST: NULL [0/0] {25} - ¦--expr: if(TR [2/0] {27} - ¦ ¦--IF: if [0/0] {28} - ¦ ¦--'(': ( [0/0] {29} - ¦ ¦--expr: TRUE [0/1] {31} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {30} - ¦ ¦--COMMENT: # com [0/0] {32} - ¦ ¦--')': ) [1/0] {33} - ¦ °--expr: NULL [0/0] {35} - ¦ °--NULL_CONST: NULL [0/0] {34} - ¦--expr: if( # [2/0] {36} - ¦ ¦--IF: if [0/0] {37} - ¦ ¦--'(': ( [0/1] {38} - ¦ ¦--COMMENT: # com [0/0] {39} - ¦ ¦--expr: TRUE [1/0] {41} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {40} - ¦ ¦--')': ) [0/0] {42} - ¦ °--expr: NULL [0/0] {44} - ¦ °--NULL_CONST: NULL [0/0] {43} - °--expr: if # [2/0] {45} - ¦--IF: if [0/1] {46} - ¦--COMMENT: # com [0/0] {47} - ¦--'(': ( [1/0] {48} - ¦--expr: TRUE [0/0] {50} - ¦ °--NUM_CONST: TRUE [0/0] {49} - ¦--')': ) [0/0] {51} - °--expr: NULL [0/0] {53} - °--NULL_CONST: NULL [0/0] {52} diff --git a/tests/testthat/line_breaks_and_other/around-eq-sub-in_tree b/tests/testthat/line_breaks_and_other/around-eq-sub-in_tree deleted file mode 100644 index 095d86fc9..000000000 --- a/tests/testthat/line_breaks_and_other/around-eq-sub-in_tree +++ /dev/null @@ -1,96 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: c(x = [0/0] {1} - ¦ ¦--expr: c [0/0] {3} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {2} - ¦ ¦--'(': ( [0/0] {4} - ¦ ¦--SYMBOL_SUB: x [0/1] {5} - ¦ ¦--EQ_SUB: = [0/1] {6} - ¦ ¦--expr: 2 [0/0] {8} - ¦ ¦ °--NUM_CONST: 2 [0/0] {7} - ¦ °--')': ) [0/0] {9} - ¦--expr: c(x = [2/0] {10} - ¦ ¦--expr: c [0/0] {12} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {11} - ¦ ¦--'(': ( [0/0] {13} - ¦ ¦--SYMBOL_SUB: x [0/1] {14} - ¦ ¦--EQ_SUB: = [0/4] {15} - ¦ ¦--expr: 2 [1/0] {17} - ¦ ¦ °--NUM_CONST: 2 [0/0] {16} - ¦ °--')': ) [0/0] {18} - ¦--expr: c( - [2/0] {19} - ¦ ¦--expr: c [0/0] {21} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {20} - ¦ ¦--'(': ( [0/2] {22} - ¦ ¦--SYMBOL_SUB: x [1/1] {23} - ¦ ¦--EQ_SUB: = [0/1] {24} - ¦ ¦--expr: 2 [0/0] {26} - ¦ ¦ °--NUM_CONST: 2 [0/0] {25} - ¦ °--')': ) [0/0] {27} - ¦--expr: c(x - [2/0] {28} - ¦ ¦--expr: c [0/0] {30} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {29} - ¦ ¦--'(': ( [0/0] {31} - ¦ ¦--SYMBOL_SUB: x [0/2] {32} - ¦ ¦--EQ_SUB: = [1/1] {33} - ¦ ¦--expr: 2 [0/0] {35} - ¦ ¦ °--NUM_CONST: 2 [0/0] {34} - ¦ °--')': ) [0/0] {36} - ¦--expr: c(x = [2/0] {37} - ¦ ¦--expr: c [0/0] {39} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {38} - ¦ ¦--'(': ( [0/0] {40} - ¦ ¦--SYMBOL_SUB: x [0/1] {41} - ¦ ¦--EQ_SUB: = [0/1] {42} - ¦ ¦--expr: 2 [0/0] {44} - ¦ ¦ °--NUM_CONST: 2 [0/0] {43} - ¦ ¦--',': , [0/1] {45} - ¦ ¦--SYMBOL_SUB: a [0/2] {46} - ¦ ¦--EQ_SUB: = [1/4] {47} - ¦ ¦--expr: 1 [1/0] {49} - ¦ ¦ °--NUM_CONST: 1 [0/0] {48} - ¦ °--')': ) [0/0] {50} - ¦--expr: c(x = [3/0] {51} - ¦ ¦--expr: c [0/0] {53} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {52} - ¦ ¦--'(': ( [0/0] {54} - ¦ ¦--SYMBOL_SUB: x [0/1] {55} - ¦ ¦--EQ_SUB: = [0/1] {56} - ¦ ¦--expr: 2 [0/0] {58} - ¦ ¦ °--NUM_CONST: 2 [0/0] {57} - ¦ ¦--',': , [0/1] {59} - ¦ ¦--SYMBOL_SUB: a [0/2] {60} - ¦ ¦--EQ_SUB: = [1/1] {61} - ¦ ¦--COMMENT: # stu [0/4] {62} - ¦ ¦--expr: 1 [1/0] {64} - ¦ ¦ °--NUM_CONST: 1 [0/0] {63} - ¦ °--')': ) [0/0] {65} - ¦--expr: c(b=4 [3/0] {66} - ¦ ¦--expr: c [0/0] {68} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {67} - ¦ ¦--'(': ( [0/0] {69} - ¦ ¦--SYMBOL_SUB: b [0/0] {70} - ¦ ¦--EQ_SUB: = [0/0] {71} - ¦ ¦--expr: 4 [0/0] {73} - ¦ ¦ °--NUM_CONST: 4 [0/0] {72} - ¦ ¦--',': , [0/1] {74} - ¦ ¦--SYMBOL_SUB: x [0/1] {75} - ¦ ¦--COMMENT: # com [0/2] {76} - ¦ ¦--EQ_SUB: = [1/1] {77} - ¦ ¦--expr: 2 [0/0] {79} - ¦ ¦ °--NUM_CONST: 2 [0/0] {78} - ¦ °--')': ) [0/0] {80} - °--expr: c(x = [3/0] {81} - ¦--expr: c [0/0] {83} - ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {82} - ¦--'(': ( [0/0] {84} - ¦--SYMBOL_SUB: x [0/1] {85} - ¦--EQ_SUB: = [0/0] {86} - ¦--COMMENT: # com [0/2] {87} - ¦--expr: 2 [1/0] {89} - ¦ °--NUM_CONST: 2 [0/0] {88} - ¦--',': , [0/1] {90} - ¦--SYMBOL_SUB: c [0/0] {91} - ¦--EQ_SUB: = [0/0] {92} - °--')': ) [0/0] {93} diff --git a/tests/testthat/line_breaks_and_other/assignment-in.R b/tests/testthat/line_breaks_and_other/assignment-in.R index 00180be41..2108b816f 100644 --- a/tests/testthat/line_breaks_and_other/assignment-in.R +++ b/tests/testthat/line_breaks_and_other/assignment-in.R @@ -4,8 +4,7 @@ x <- x <- 3 -# FIXME: edge case not working for R < 3.6: Problem: most likely, comment is -# not moved to the right nest with relocate_eq_assign. + x <- # the culprit diff --git a/tests/testthat/line_breaks_and_other/assignment-in_tree b/tests/testthat/line_breaks_and_other/assignment-in_tree deleted file mode 100644 index 22eaa0017..000000000 --- a/tests/testthat/line_breaks_and_other/assignment-in_tree +++ /dev/null @@ -1,115 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: x <- - [0/0] {1} - ¦ ¦--expr: x [0/1] {3} - ¦ ¦ °--SYMBOL: x [0/0] {2} - ¦ ¦--LEFT_ASSIGN: <- [0/2] {4} - ¦ °--expr: 2 [1/0] {6} - ¦ °--NUM_CONST: 2 [0/0] {5} - ¦--expr: x <- [3/0] {7} - ¦ ¦--expr: x [0/1] {9} - ¦ ¦ °--SYMBOL: x [0/0] {8} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {10} - ¦ °--expr: 3 [0/0] {12} - ¦ °--NUM_CONST: 3 [0/0] {11} - ¦--COMMENT: # FIX [2/0] {13} - ¦--COMMENT: # not [1/0] {14} - ¦--expr: x <- - [1/0] {15} - ¦ ¦--expr: x [0/1] {17} - ¦ ¦ °--SYMBOL: x [0/0] {16} - ¦ ¦--LEFT_ASSIGN: <- [0/2] {18} - ¦ ¦--COMMENT: # the [1/2] {19} - ¦ °--expr: 3 [2/0] {21} - ¦ °--NUM_CONST: 3 [0/0] {20} - ¦--expr_or_assign_or_help: x = # [3/0] {22} - ¦ ¦--expr: x [0/1] {24} - ¦ ¦ °--SYMBOL: x [0/0] {23} - ¦ ¦--EQ_ASSIGN: = [0/1] {25} - ¦ ¦--COMMENT: # [0/2] {26} - ¦ °--expr: 2 [1/0] {28} - ¦ °--NUM_CONST: 2 [0/0] {27} - ¦--expr_or_assign_or_help: x = 3 [3/0] {29} - ¦ ¦--expr: x [0/1] {31} - ¦ ¦ °--SYMBOL: x [0/0] {30} - ¦ ¦--EQ_ASSIGN: = [0/1] {32} - ¦ °--expr: 3 [0/0] {34} - ¦ °--NUM_CONST: 3 [0/0] {33} - ¦--expr_or_assign_or_help: x = - - [2/0] {35} - ¦ ¦--expr: x [0/1] {37} - ¦ ¦ °--SYMBOL: x [0/0] {36} - ¦ ¦--EQ_ASSIGN: = [0/2] {38} - ¦ ¦--COMMENT: # com [2/2] {39} - ¦ °--expr: 3 [1/0] {41} - ¦ °--NUM_CONST: 3 [0/0] {40} - ¦--expr: Impor [4/0] {42} - ¦ ¦--expr: Impor [0/1] {43} - ¦ ¦ ¦--expr: Impor [0/0] {45} - ¦ ¦ ¦ °--SYMBOL: Impor [0/0] {44} - ¦ ¦ ¦--'$': $ [0/0] {46} - ¦ ¦ °--SYMBOL: Impor [0/0] {47} - ¦ ¦--LEFT_ASSIGN: <- [0/2] {48} - ¦ ¦--expr: Impor [1/1] {50} - ¦ ¦ ¦--expr: Impor [0/0] {52} - ¦ ¦ ¦ °--SYMBOL: Impor [0/0] {51} - ¦ ¦ ¦--'$': $ [0/0] {53} - ¦ ¦ °--SYMBOL: Impor [0/0] {54} - ¦ ¦--LEFT_ASSIGN: <- [0/2] {55} - ¦ °--expr: Compl [1/0] {56} - ¦ ¦--expr: Compl [0/0] {58} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: Compl [0/0] {57} - ¦ ¦--'(': ( [0/0] {59} - ¦ ¦--expr: Impor [0/0] {60} - ¦ ¦ ¦--expr: Impor [0/0] {62} - ¦ ¦ ¦ °--SYMBOL: Impor [0/0] {61} - ¦ ¦ ¦--'$': $ [0/0] {63} - ¦ ¦ °--SYMBOL: Input [0/0] {64} - ¦ °--')': ) [0/0] {65} - ¦--expr: Impor [3/0] {66} - ¦ ¦--expr: Impor [0/1] {67} - ¦ ¦ ¦--expr: Impor [0/0] {69} - ¦ ¦ ¦ °--SYMBOL: Impor [0/0] {68} - ¦ ¦ ¦--'$': $ [0/0] {70} - ¦ ¦ °--SYMBOL: Impor [0/0] {71} - ¦ ¦--LEFT_ASSIGN: <- [0/2] {72} - ¦ ¦--expr: Impor [1/1] {74} - ¦ ¦ ¦--expr: Impor [0/0] {76} - ¦ ¦ ¦ °--SYMBOL: Impor [0/0] {75} - ¦ ¦ ¦--'$': $ [0/0] {77} - ¦ ¦ °--SYMBOL: Impor [0/0] {78} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {79} - ¦ °--expr: Compl [0/0] {80} - ¦ ¦--expr: Compl [0/0] {82} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: Compl [0/0] {81} - ¦ ¦--'(': ( [0/0] {83} - ¦ ¦--expr: Impor [0/0] {84} - ¦ ¦ ¦--expr: Impor [0/0] {86} - ¦ ¦ ¦ °--SYMBOL: Impor [0/0] {85} - ¦ ¦ ¦--'$': $ [0/0] {87} - ¦ ¦ °--SYMBOL: Input [0/0] {88} - ¦ °--')': ) [0/0] {89} - °--expr: Impor [4/0] {90} - ¦--expr: Impor [0/1] {91} - ¦ ¦--expr: Impor [0/0] {93} - ¦ ¦ °--SYMBOL: Impor [0/0] {92} - ¦ ¦--'$': $ [0/0] {94} - ¦ °--SYMBOL: Impor [0/0] {95} - ¦--LEFT_ASSIGN: <- [0/2] {96} - ¦--expr: Impor [2/1] {98} - ¦ ¦--expr: Impor [0/0] {100} - ¦ ¦ °--SYMBOL: Impor [0/0] {99} - ¦ ¦--'$': $ [0/0] {101} - ¦ °--SYMBOL: Impor [0/0] {102} - ¦--LEFT_ASSIGN: <- [0/1] {103} - °--expr: Compl [0/0] {104} - ¦--expr: Compl [0/0] {106} - ¦ °--SYMBOL_FUNCTION_CALL: Compl [0/0] {105} - ¦--'(': ( [0/0] {107} - ¦--expr: Impor [0/0] {108} - ¦ ¦--expr: Impor [0/0] {110} - ¦ ¦ °--SYMBOL: Impor [0/0] {109} - ¦ ¦--'$': $ [0/0] {111} - ¦ °--SYMBOL: Input [0/0] {112} - °--')': ) [0/0] {113} diff --git a/tests/testthat/line_breaks_and_other/assignment-out.R b/tests/testthat/line_breaks_and_other/assignment-out.R index 681ded9e5..5c16559ed 100644 --- a/tests/testthat/line_breaks_and_other/assignment-out.R +++ b/tests/testthat/line_breaks_and_other/assignment-out.R @@ -4,8 +4,7 @@ x <- x <- 3 -# FIXME: edge case not working for R < 3.6: Problem: most likely, comment is -# not moved to the right nest with relocate_eq_assign. + x <- # the culprit @@ -23,7 +22,6 @@ x <- 3 - ImportantDataFrame$ImportantColumn1 <- ImportantDataFrame$ImportantColumn2 <- ComplicatedFunction(ImportantDataFrame$InputColumn) @@ -33,6 +31,5 @@ ImportantDataFrame$ImportantColumn1 <- ImportantDataFrame$ImportantColumn2 <- ComplicatedFunction(ImportantDataFrame$InputColumn) - ImportantDataFrame$ImportantColumn1 <- ImportantDataFrame$ImportantColumn2 <- ComplicatedFunction(ImportantDataFrame$InputColumn) diff --git a/tests/testthat/line_breaks_and_other/base-pipe-line-breaks-in.R b/tests/testthat/line_breaks_and_other/base-pipe-line-breaks-in.R index 880f22cf0..641e72d52 100644 --- a/tests/testthat/line_breaks_and_other/base-pipe-line-breaks-in.R +++ b/tests/testthat/line_breaks_and_other/base-pipe-line-breaks-in.R @@ -82,6 +82,18 @@ blew(y = 2, x |> {a |> c() +1} +{ + + ( + + # some comment + + a |> c() + 1 + + ) + +} + b |> f() |> # never move comment to next line as it can be styler: off or nolint k() |> diff --git a/tests/testthat/line_breaks_and_other/base-pipe-line-breaks-in_tree b/tests/testthat/line_breaks_and_other/base-pipe-line-breaks-in_tree deleted file mode 100644 index c685ecc97..000000000 --- a/tests/testthat/line_breaks_and_other/base-pipe-line-breaks-in_tree +++ /dev/null @@ -1,465 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: c(a | [0/0] {1} - ¦ ¦--expr: c [0/0] {3} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {2} - ¦ ¦--'(': ( [0/0] {4} - ¦ ¦--expr: a |> [0/0] {5} - ¦ ¦ ¦--expr: a [0/1] {7} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {6} - ¦ ¦ ¦--PIPE: |> [0/1] {8} - ¦ ¦ °--expr: b() [0/0] {9} - ¦ ¦ ¦--expr: b [0/0] {11} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: b [0/0] {10} - ¦ ¦ ¦--'(': ( [0/0] {12} - ¦ ¦ °--')': ) [0/0] {13} - ¦ °--')': ) [0/0] {14} - ¦--expr: c(a + [2/0] {15} - ¦ ¦--expr: c [0/0] {17} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {16} - ¦ ¦--'(': ( [0/0] {18} - ¦ ¦--expr: a + b [0/0] {19} - ¦ ¦ ¦--expr: a [0/1] {21} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {20} - ¦ ¦ ¦--'+': + [0/1] {22} - ¦ ¦ ¦--expr: b [0/1] {25} - ¦ ¦ ¦ °--SYMBOL: b [0/0] {24} - ¦ ¦ ¦--PIPE: |> [0/1] {26} - ¦ ¦ °--expr: c() [0/0] {27} - ¦ ¦ ¦--expr: c [0/0] {29} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {28} - ¦ ¦ ¦--'(': ( [0/0] {30} - ¦ ¦ °--')': ) [0/0] {31} - ¦ °--')': ) [0/0] {32} - ¦--expr: c(a | [3/0] {33} - ¦ ¦--expr: c [0/0] {35} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {34} - ¦ ¦--'(': ( [0/0] {36} - ¦ ¦--expr: a |> [0/0] {37} - ¦ ¦ ¦--expr: a [0/1] {39} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {38} - ¦ ¦ ¦--PIPE: |> [0/1] {40} - ¦ ¦ °--expr: b() [0/0] {41} - ¦ ¦ ¦--expr: b [0/0] {43} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: b [0/0] {42} - ¦ ¦ ¦--'(': ( [0/0] {44} - ¦ ¦ °--')': ) [0/0] {45} - ¦ °--')': ) [1/0] {46} - ¦--expr: c(a | [2/0] {47} - ¦ ¦--expr: c [0/0] {49} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {48} - ¦ ¦--'(': ( [0/0] {50} - ¦ ¦--expr: a |> [0/1] {51} - ¦ ¦ ¦--expr: a [0/1] {53} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {52} - ¦ ¦ ¦--PIPE: |> [0/1] {54} - ¦ ¦ °--expr: b() [0/0] {55} - ¦ ¦ ¦--expr: b [0/0] {57} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: b [0/0] {56} - ¦ ¦ ¦--'(': ( [0/0] {58} - ¦ ¦ °--')': ) [0/0] {59} - ¦ ¦--COMMENT: # 33 [0/0] {60} - ¦ °--')': ) [1/0] {61} - ¦--expr: c( - [2/0] {62} - ¦ ¦--expr: c [0/0] {64} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {63} - ¦ ¦--'(': ( [0/2] {65} - ¦ ¦--expr: a + b [1/2] {66} - ¦ ¦ ¦--expr: a [0/1] {68} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {67} - ¦ ¦ ¦--'+': + [0/1] {69} - ¦ ¦ ¦--expr: b [0/1] {72} - ¦ ¦ ¦ °--SYMBOL: b [0/0] {71} - ¦ ¦ ¦--PIPE: |> [0/1] {73} - ¦ ¦ °--expr: c() [0/0] {74} - ¦ ¦ ¦--expr: c [0/0] {76} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {75} - ¦ ¦ ¦--'(': ( [0/0] {77} - ¦ ¦ °--')': ) [0/0] {78} - ¦ °--')': ) [1/0] {79} - ¦--expr: c( - [2/0] {80} - ¦ ¦--expr: c [0/0] {82} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {81} - ¦ ¦--'(': ( [0/2] {83} - ¦ ¦--expr: a + b [1/0] {84} - ¦ ¦ ¦--expr: a [0/1] {86} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {85} - ¦ ¦ ¦--'+': + [0/1] {87} - ¦ ¦ ¦--expr: b [0/1] {90} - ¦ ¦ ¦ °--SYMBOL: b [0/0] {89} - ¦ ¦ ¦--PIPE: |> [0/4] {91} - ¦ ¦ °--expr: c() [1/0] {92} - ¦ ¦ ¦--expr: c [0/0] {94} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {93} - ¦ ¦ ¦--'(': ( [0/0] {95} - ¦ ¦ °--')': ) [0/0] {96} - ¦ °--')': ) [0/0] {97} - ¦--expr: c(a + [2/0] {98} - ¦ ¦--expr: c [0/0] {100} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {99} - ¦ ¦--'(': ( [0/0] {101} - ¦ ¦--expr: a + b [0/0] {102} - ¦ ¦ ¦--expr: a [0/1] {104} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {103} - ¦ ¦ ¦--'+': + [0/1] {105} - ¦ ¦ ¦--expr: b [0/1] {108} - ¦ ¦ ¦ °--SYMBOL: b [0/0] {107} - ¦ ¦ ¦--PIPE: |> [0/4] {109} - ¦ ¦ °--expr: c() [1/0] {110} - ¦ ¦ ¦--expr: c [0/0] {112} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {111} - ¦ ¦ ¦--'(': ( [0/0] {113} - ¦ ¦ °--')': ) [0/0] {114} - ¦ °--')': ) [1/0] {115} - ¦--expr: c( - [2/0] {116} - ¦ ¦--expr: c [0/0] {118} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {117} - ¦ ¦--'(': ( [0/2] {119} - ¦ ¦--expr: a + b [1/0] {120} - ¦ ¦ ¦--expr: a [0/1] {122} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {121} - ¦ ¦ ¦--'+': + [0/1] {123} - ¦ ¦ ¦--expr: b [0/1] {126} - ¦ ¦ ¦ °--SYMBOL: b [0/0] {125} - ¦ ¦ ¦--PIPE: |> [0/1] {127} - ¦ ¦ ¦--COMMENT: # 654 [0/4] {128} - ¦ ¦ °--expr: c() [1/0] {129} - ¦ ¦ ¦--expr: c [0/0] {131} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {130} - ¦ ¦ ¦--'(': ( [0/0] {132} - ¦ ¦ °--')': ) [0/0] {133} - ¦ °--')': ) [1/0] {134} - ¦--expr: c( # [2/0] {135} - ¦ ¦--expr: c [0/0] {137} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {136} - ¦ ¦--'(': ( [0/1] {138} - ¦ ¦--COMMENT: # rr [0/2] {139} - ¦ ¦--expr: a + b [1/0] {140} - ¦ ¦ ¦--expr: a [0/1] {142} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {141} - ¦ ¦ ¦--'+': + [0/1] {143} - ¦ ¦ ¦--expr: b [0/1] {146} - ¦ ¦ ¦ °--SYMBOL: b [0/0] {145} - ¦ ¦ ¦--PIPE: |> [0/4] {147} - ¦ ¦ °--expr: c() [1/0] {148} - ¦ ¦ ¦--expr: c [0/0] {150} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {149} - ¦ ¦ ¦--'(': ( [0/0] {151} - ¦ ¦ °--')': ) [0/0] {152} - ¦ °--')': ) [1/0] {153} - ¦--expr: c( - [2/0] {154} - ¦ ¦--expr: c [0/0] {156} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {155} - ¦ ¦--'(': ( [0/2] {157} - ¦ ¦--expr: a + - [1/0] {158} - ¦ ¦ ¦--expr: a [0/1] {160} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {159} - ¦ ¦ ¦--'+': + [0/4] {161} - ¦ ¦ ¦--expr: b [1/1] {164} - ¦ ¦ ¦ °--SYMBOL: b [0/0] {163} - ¦ ¦ ¦--PIPE: |> [0/1] {165} - ¦ ¦ °--expr: c() [0/0] {166} - ¦ ¦ ¦--expr: c [0/0] {168} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {167} - ¦ ¦ ¦--'(': ( [0/0] {169} - ¦ ¦ °--')': ) [0/0] {170} - ¦ °--')': ) [1/0] {171} - ¦--expr: c(a + [2/0] {172} - ¦ ¦--expr: c [0/0] {174} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {173} - ¦ ¦--'(': ( [0/0] {175} - ¦ ¦--expr: a + - [0/0] {176} - ¦ ¦ ¦--expr: a [0/1] {178} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {177} - ¦ ¦ ¦--'+': + [0/4] {179} - ¦ ¦ ¦--expr: b [1/1] {182} - ¦ ¦ ¦ °--SYMBOL: b [0/0] {181} - ¦ ¦ ¦--PIPE: |> [0/1] {183} - ¦ ¦ °--expr: c() [0/0] {184} - ¦ ¦ ¦--expr: c [0/0] {186} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {185} - ¦ ¦ ¦--'(': ( [0/0] {187} - ¦ ¦ °--')': ) [0/0] {188} - ¦ °--')': ) [1/0] {189} - ¦--expr: a |> [2/0] {190} - ¦ ¦--expr: a [0/1] {192} - ¦ ¦ °--SYMBOL: a [0/0] {191} - ¦ ¦--PIPE: |> [0/1] {193} - ¦ °--expr: b( -) [0/0] {194} - ¦ ¦--expr: b [0/0] {196} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: b [0/0] {195} - ¦ ¦--'(': ( [0/0] {197} - ¦ °--')': ) [1/0] {198} - ¦--expr: a |> [2/0] {199} - ¦ ¦--expr: a [0/1] {202} - ¦ ¦ °--SYMBOL: a [0/0] {201} - ¦ ¦--PIPE: |> [0/1] {203} - ¦ ¦--expr: b( -) [0/1] {204} - ¦ ¦ ¦--expr: b [0/0] {206} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: b [0/0] {205} - ¦ ¦ ¦--'(': ( [0/0] {207} - ¦ ¦ °--')': ) [1/0] {208} - ¦ ¦--PIPE: |> [0/1] {209} - ¦ °--expr: q() [0/0] {210} - ¦ ¦--expr: q [0/0] {212} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: q [0/0] {211} - ¦ ¦--'(': ( [0/0] {213} - ¦ °--')': ) [0/0] {214} - ¦--expr: a |> - [2/0] {215} - ¦ ¦--expr: a [0/1] {217} - ¦ ¦ °--SYMBOL: a [0/0] {216} - ¦ ¦--PIPE: |> [0/2] {218} - ¦ °--expr: b() [1/0] {219} - ¦ ¦--expr: b [0/0] {221} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: b [0/0] {220} - ¦ ¦--'(': ( [0/0] {222} - ¦ °--')': ) [0/0] {223} - ¦--expr: a |> [2/0] {224} - ¦ ¦--expr: a [0/1] {227} - ¦ ¦ °--SYMBOL: a [0/0] {226} - ¦ ¦--PIPE: |> [0/1] {228} - ¦ ¦--expr: b() [0/1] {229} - ¦ ¦ ¦--expr: b [0/0] {231} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: b [0/0] {230} - ¦ ¦ ¦--'(': ( [0/0] {232} - ¦ ¦ °--')': ) [0/0] {233} - ¦ ¦--PIPE: |> [0/1] {234} - ¦ °--expr: c() [0/0] {235} - ¦ ¦--expr: c [0/0] {237} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {236} - ¦ ¦--'(': ( [0/0] {238} - ¦ °--')': ) [0/0] {239} - ¦--COMMENT: # sho [2/0] {240} - ¦--expr: a |> [1/0] {241} - ¦ ¦--expr: a [0/1] {243} - ¦ ¦ °--SYMBOL: a [0/0] {242} - ¦ ¦--PIPE: |> [0/1] {244} - ¦ °--expr: b() [0/0] {245} - ¦ ¦--expr: b [0/0] {247} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: b [0/0] {246} - ¦ ¦--'(': ( [0/0] {248} - ¦ °--')': ) [0/0] {249} - ¦--expr: fun(x [2/0] {250} - ¦ ¦--expr: fun [0/0] {252} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: fun [0/0] {251} - ¦ ¦--'(': ( [0/0] {253} - ¦ ¦--expr: x [0/0] {255} - ¦ ¦ °--SYMBOL: x [0/0] {254} - ¦ ¦--',': , [0/2] {256} - ¦ ¦--expr: a |> [1/0] {257} - ¦ ¦ ¦--expr: a [0/1] {259} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {258} - ¦ ¦ ¦--PIPE: |> [0/1] {260} - ¦ ¦ °--expr: b() [0/0] {261} - ¦ ¦ ¦--expr: b [0/0] {263} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: b [0/0] {262} - ¦ ¦ ¦--'(': ( [0/0] {264} - ¦ ¦ °--')': ) [0/0] {265} - ¦ °--')': ) [0/0] {266} - ¦--expr: fun(x [2/0] {267} - ¦ ¦--expr: fun [0/0] {269} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: fun [0/0] {268} - ¦ ¦--'(': ( [0/0] {270} - ¦ ¦--expr: x [0/0] {272} - ¦ ¦ °--SYMBOL: x [0/0] {271} - ¦ ¦--',': , [0/4] {273} - ¦ ¦--SYMBOL_SUB: gg [1/1] {274} - ¦ ¦--EQ_SUB: = [0/1] {275} - ¦ ¦--expr: a |> [0/0] {276} - ¦ ¦ ¦--expr: a [0/1] {278} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {277} - ¦ ¦ ¦--PIPE: |> [0/1] {279} - ¦ ¦ °--expr: b() [0/0] {280} - ¦ ¦ ¦--expr: b [0/0] {282} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: b [0/0] {281} - ¦ ¦ ¦--'(': ( [0/0] {283} - ¦ ¦ °--')': ) [0/0] {284} - ¦ ¦--',': , [0/4] {285} - ¦ ¦--expr: tt |> [1/0] {286} - ¦ ¦ ¦--expr: tt [0/1] {288} - ¦ ¦ ¦ °--SYMBOL: tt [0/0] {287} - ¦ ¦ ¦--PIPE: |> [0/1] {289} - ¦ ¦ °--expr: q() [0/0] {290} - ¦ ¦ ¦--expr: q [0/0] {292} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: q [0/0] {291} - ¦ ¦ ¦--'(': ( [0/0] {293} - ¦ ¦ °--')': ) [0/0] {294} - ¦ °--')': ) [0/0] {295} - ¦--expr: fun(x [2/0] {296} - ¦ ¦--expr: fun [0/0] {298} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: fun [0/0] {297} - ¦ ¦--'(': ( [0/0] {299} - ¦ ¦--expr: x [0/0] {301} - ¦ ¦ °--SYMBOL: x [0/0] {300} - ¦ ¦--',': , [0/1] {302} - ¦ ¦--SYMBOL_SUB: gg [0/1] {303} - ¦ ¦--EQ_SUB: = [0/1] {304} - ¦ ¦--expr: a |> [0/0] {305} - ¦ ¦ ¦--expr: a [0/1] {307} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {306} - ¦ ¦ ¦--PIPE: |> [0/1] {308} - ¦ ¦ °--expr: b() [0/0] {309} - ¦ ¦ ¦--expr: b [0/0] {311} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: b [0/0] {310} - ¦ ¦ ¦--'(': ( [0/0] {312} - ¦ ¦ °--')': ) [0/0] {313} - ¦ ¦--',': , [0/1] {314} - ¦ ¦--expr: tt |> [0/0] {315} - ¦ ¦ ¦--expr: tt [0/1] {317} - ¦ ¦ ¦ °--SYMBOL: tt [0/0] {316} - ¦ ¦ ¦--PIPE: |> [0/1] {318} - ¦ ¦ °--expr: q() [0/0] {319} - ¦ ¦ ¦--expr: q [0/0] {321} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: q [0/0] {320} - ¦ ¦ ¦--'(': ( [0/0] {322} - ¦ ¦ °--')': ) [0/0] {323} - ¦ °--')': ) [0/0] {324} - ¦--expr_or_assign_or_help: z = a [2/0] {325} - ¦ ¦--expr: z [0/1] {327} - ¦ ¦ °--SYMBOL: z [0/0] {326} - ¦ ¦--EQ_ASSIGN: = [0/1] {328} - ¦ ¦--expr: a [0/1] {331} - ¦ ¦ °--SYMBOL: a [0/0] {330} - ¦ ¦--PIPE: |> [0/1] {332} - ¦ °--expr: b() [0/0] {333} - ¦ ¦--expr: b [0/0] {335} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: b [0/0] {334} - ¦ ¦--'(': ( [0/0] {336} - ¦ °--')': ) [0/0] {337} - ¦--expr: fun( [2/0] {338} - ¦ ¦--expr: fun [0/0] {340} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: fun [0/0] {339} - ¦ ¦--'(': ( [0/1] {341} - ¦ ¦--SYMBOL_SUB: s [0/1] {342} - ¦ ¦--EQ_SUB: = [0/1] {343} - ¦ ¦--expr: g(x) [0/0] {344} - ¦ ¦ ¦--expr: g [0/0] {346} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: g [0/0] {345} - ¦ ¦ ¦--'(': ( [0/0] {347} - ¦ ¦ ¦--expr: x [0/0] {349} - ¦ ¦ ¦ °--SYMBOL: x [0/0] {348} - ¦ ¦ °--')': ) [0/0] {350} - ¦ ¦--',': , [0/4] {351} - ¦ ¦--SYMBOL_SUB: gg [1/1] {352} - ¦ ¦--EQ_SUB: = [0/1] {353} - ¦ ¦--expr: a(n = [0/0] {354} - ¦ ¦ ¦--expr: a(n = [0/1] {355} - ¦ ¦ ¦ ¦--expr: a [0/0] {357} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: a [0/0] {356} - ¦ ¦ ¦ ¦--'(': ( [0/0] {358} - ¦ ¦ ¦ ¦--expr: n == [0/0] {359} - ¦ ¦ ¦ ¦ ¦--expr: n [0/1] {361} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL: n [0/0] {360} - ¦ ¦ ¦ ¦ ¦--EQ: == [0/1] {362} - ¦ ¦ ¦ ¦ °--expr: 2 [0/0] {364} - ¦ ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {363} - ¦ ¦ ¦ °--')': ) [0/0] {365} - ¦ ¦ ¦--PIPE: |> [0/1] {366} - ¦ ¦ °--expr: b() [0/0] {367} - ¦ ¦ ¦--expr: b [0/0] {369} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: b [0/0] {368} - ¦ ¦ ¦--'(': ( [0/0] {370} - ¦ ¦ °--')': ) [0/0] {371} - ¦ ¦--',': , [0/4] {372} - ¦ ¦--expr: tt |> [1/0] {373} - ¦ ¦ ¦--expr: tt [0/1] {375} - ¦ ¦ ¦ °--SYMBOL: tt [0/0] {374} - ¦ ¦ ¦--PIPE: |> [0/1] {376} - ¦ ¦ °--expr: q(r = [0/0] {377} - ¦ ¦ ¦--expr: q [0/0] {379} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: q [0/0] {378} - ¦ ¦ ¦--'(': ( [0/0] {380} - ¦ ¦ ¦--SYMBOL_SUB: r [0/1] {381} - ¦ ¦ ¦--EQ_SUB: = [0/1] {382} - ¦ ¦ ¦--expr: 3 [0/0] {384} - ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {383} - ¦ ¦ °--')': ) [0/0] {385} - ¦ °--')': ) [0/0] {386} - ¦--COMMENT: # FIX [2/0] {387} - ¦--expr: blew( [1/0] {388} - ¦ ¦--expr: blew [0/0] {390} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: blew [0/0] {389} - ¦ ¦--'(': ( [0/0] {391} - ¦ ¦--expr: x |> - [0/0] {392} - ¦ ¦ ¦--expr: x [0/1] {394} - ¦ ¦ ¦ °--SYMBOL: x [0/0] {393} - ¦ ¦ ¦--PIPE: |> [0/7] {395} - ¦ ¦ °--expr: c() [2/0] {396} - ¦ ¦ ¦--expr: c [0/0] {398} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {397} - ¦ ¦ ¦--'(': ( [0/0] {399} - ¦ ¦ °--')': ) [0/0] {400} - ¦ ¦--',': , [0/1] {401} - ¦ ¦--SYMBOL_SUB: y [0/1] {402} - ¦ ¦--EQ_SUB: = [0/1] {403} - ¦ ¦--expr: 2 [0/0] {405} - ¦ ¦ °--NUM_CONST: 2 [0/0] {404} - ¦ °--')': ) [0/0] {406} - ¦--COMMENT: # FIX [2/0] {407} - ¦--expr: blew( [1/0] {408} - ¦ ¦--expr: blew [0/0] {410} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: blew [0/0] {409} - ¦ ¦--'(': ( [0/0] {411} - ¦ ¦--SYMBOL_SUB: y [0/1] {412} - ¦ ¦--EQ_SUB: = [0/1] {413} - ¦ ¦--expr: 2 [0/0] {415} - ¦ ¦ °--NUM_CONST: 2 [0/0] {414} - ¦ ¦--',': , [0/1] {416} - ¦ ¦--expr: x |> - [0/0] {417} - ¦ ¦ ¦--expr: x [0/1] {419} - ¦ ¦ ¦ °--SYMBOL: x [0/0] {418} - ¦ ¦ ¦--PIPE: |> [0/7] {420} - ¦ ¦ °--expr: c() [1/0] {421} - ¦ ¦ ¦--expr: c [0/0] {423} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {422} - ¦ ¦ ¦--'(': ( [0/0] {424} - ¦ ¦ °--')': ) [0/0] {425} - ¦ °--')': ) [0/0] {426} - ¦--expr: {a |> [3/0] {427} - ¦ ¦--'{': { [0/0] {428} - ¦ ¦--expr: a |> [0/0] {429} - ¦ ¦ ¦--expr: a [0/1] {432} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {431} - ¦ ¦ ¦--PIPE: |> [0/1] {433} - ¦ ¦ ¦--expr: c() [0/1] {434} - ¦ ¦ ¦ ¦--expr: c [0/0] {436} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {435} - ¦ ¦ ¦ ¦--'(': ( [0/0] {437} - ¦ ¦ ¦ °--')': ) [0/0] {438} - ¦ ¦ ¦--'+': + [0/0] {439} - ¦ ¦ °--expr: 1 [0/0] {441} - ¦ ¦ °--NUM_CONST: 1 [0/0] {440} - ¦ °--'}': } [0/0] {442} - °--expr: b |> - [2/0] {443} - ¦--expr: b [0/1] {447} - ¦ °--SYMBOL: b [0/0] {446} - ¦--PIPE: |> [0/2] {448} - ¦--expr: f() [1/1] {449} - ¦ ¦--expr: f [0/0] {451} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: f [0/0] {450} - ¦ ¦--'(': ( [0/0] {452} - ¦ °--')': ) [0/0] {453} - ¦--PIPE: |> [0/1] {454} - ¦--COMMENT: # nev [0/2] {455} - ¦--expr: k() [1/1] {456} - ¦ ¦--expr: k [0/0] {458} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: k [0/0] {457} - ¦ ¦--'(': ( [0/0] {459} - ¦ °--')': ) [0/0] {460} - ¦--PIPE: |> [0/2] {461} - °--expr: x() [1/0] {462} - ¦--expr: x [0/0] {464} - ¦ °--SYMBOL_FUNCTION_CALL: x [0/0] {463} - ¦--'(': ( [0/0] {465} - °--')': ) [0/0] {466} diff --git a/tests/testthat/line_breaks_and_other/base-pipe-line-breaks-out.R b/tests/testthat/line_breaks_and_other/base-pipe-line-breaks-out.R index 0fd45f0b5..346e0303c 100644 --- a/tests/testthat/line_breaks_and_other/base-pipe-line-breaks-out.R +++ b/tests/testthat/line_breaks_and_other/base-pipe-line-breaks-out.R @@ -88,6 +88,14 @@ blew(y = 2, x |> a |> c() + 1 } +{ + ( + # some comment + + a |> c() + 1 + ) +} + b |> f() |> # never move comment to next line as it can be styler: off or nolint k() |> 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 deleted file mode 100644 index a62afee1c..000000000 --- a/tests/testthat/line_breaks_and_other/braces-fun-calls1-in_tree +++ /dev/null @@ -1,132 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: # the [0/0] {1} - ¦--expr: test_ [1/0] {2} - ¦ ¦--expr: test_ [0/0] {4} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: test_ [0/0] {3} - ¦ ¦--'(': ( [0/0] {5} - ¦ ¦--expr: x [0/0] {7} - ¦ ¦ °--SYMBOL: x [0/0] {6} - ¦ ¦--',': , [0/1] {8} - ¦ ¦--expr: { - h [0/0] {9} - ¦ ¦ ¦--'{': { [0/2] {10} - ¦ ¦ ¦--expr: hh [1/0] {12} - ¦ ¦ ¦ °--SYMBOL: hh [0/0] {11} - ¦ ¦ °--'}': } [1/0] {13} - ¦ °--')': ) [0/0] {14} - ¦--expr: test_ [2/0] {15} - ¦ ¦--expr: test_ [0/0] {17} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: test_ [0/0] {16} - ¦ ¦--'(': ( [0/0] {18} - ¦ ¦--expr: x [0/0] {20} - ¦ ¦ °--SYMBOL: x [0/0] {19} - ¦ ¦--',': , [0/2] {21} - ¦ ¦--expr: { - [1/0] {22} - ¦ ¦ ¦--'{': { [0/4] {23} - ¦ ¦ ¦--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: tryCa [1/0] {30} - ¦ ¦--expr: tryCa [0/0] {32} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: tryCa [0/0] {31} - ¦ ¦--'(': ( [0/0] {33} - ¦ ¦--expr: { - e [0/0] {34} - ¦ ¦ ¦--'{': { [0/2] {35} - ¦ ¦ ¦--expr: exp(x [1/0] {36} - ¦ ¦ ¦ ¦--expr: exp [0/0] {38} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: exp [0/0] {37} - ¦ ¦ ¦ ¦--'(': ( [0/0] {39} - ¦ ¦ ¦ ¦--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: funct [0/0] {47} - ¦ ¦ ¦--FUNCTION: funct [0/0] {48} - ¦ ¦ ¦--'(': ( [0/0] {49} - ¦ ¦ ¦--SYMBOL_FORMALS: x [0/0] {50} - ¦ ¦ ¦--')': ) [0/1] {51} - ¦ ¦ °--expr: x [0/0] {53} - ¦ ¦ °--SYMBOL: x [0/0] {52} - ¦ °--')': ) [0/0] {54} - ¦--expr: tryCa [2/0] {55} - ¦ ¦--expr: tryCa [0/0] {57} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: tryCa [0/0] {56} - ¦ ¦--'(': ( [0/2] {58} - ¦ ¦--expr: { - [1/0] {59} - ¦ ¦ ¦--'{': { [0/4] {60} - ¦ ¦ ¦--expr: exp(x [1/2] {61} - ¦ ¦ ¦ ¦--expr: exp [0/0] {63} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: exp [0/0] {62} - ¦ ¦ ¦ ¦--'(': ( [0/0] {64} - ¦ ¦ ¦ ¦--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: funct [0/0] {72} - ¦ ¦ ¦--FUNCTION: funct [0/0] {73} - ¦ ¦ ¦--'(': ( [0/0] {74} - ¦ ¦ ¦--SYMBOL_FORMALS: x [0/0] {75} - ¦ ¦ ¦--')': ) [0/1] {76} - ¦ ¦ °--expr: x [0/0] {78} - ¦ ¦ °--SYMBOL: x [0/0] {77} - ¦ °--')': ) [1/0] {79} - ¦--expr: call( [2/0] {80} - ¦ ¦--expr: call [0/0] {82} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {81} - ¦ ¦--'(': ( [0/0] {83} - ¦ ¦--expr: { - b [0/0] {84} - ¦ ¦ ¦--'{': { [0/2] {85} - ¦ ¦ ¦--expr: blibl [1/0] {87} - ¦ ¦ ¦ °--SYMBOL: blibl [0/0] {86} - ¦ ¦ °--'}': } [1/0] {88} - ¦ ¦--',': , [0/1] {89} - ¦ ¦--expr: { - b [0/0] {90} - ¦ ¦ ¦--'{': { [0/2] {91} - ¦ ¦ ¦--expr: blubl [1/0] {93} - ¦ ¦ ¦ °--SYMBOL: blubl [0/0] {92} - ¦ ¦ °--'}': } [1/0] {94} - ¦ °--')': ) [0/0] {95} - ¦--COMMENT: # cur [2/0] {96} - ¦--expr: fio({ [1/0] {97} - ¦ ¦--expr: fio [0/0] {99} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: fio [0/0] {98} - ¦ ¦--'(': ( [0/0] {100} - ¦ ¦--expr: {{x}} [0/0] {101} - ¦ ¦ ¦--'{': { [0/0] {102} - ¦ ¦ ¦--expr: {x} [0/0] {103} - ¦ ¦ ¦ ¦--'{': { [0/0] {104} - ¦ ¦ ¦ ¦--expr: x [0/0] {106} - ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {105} - ¦ ¦ ¦ °--'}': } [0/0] {107} - ¦ ¦ °--'}': } [0/0] {108} - ¦ °--')': ) [0/0] {109} - °--expr: test_ [2/0] {110} - ¦--expr: test_ [0/0] {112} - ¦ °--SYMBOL_FUNCTION_CALL: test_ [0/0] {111} - ¦--'(': ( [0/0] {113} - ¦--expr: "x" [0/0] {115} - ¦ °--STR_CONST: "x" [0/0] {114} - ¦--',': , [0/1] {116} - ¦--expr: {{ k [0/0] {117} - ¦ ¦--'{': { [0/0] {118} - ¦ ¦--expr: { k } [0/0] {119} - ¦ ¦ ¦--'{': { [0/1] {120} - ¦ ¦ ¦--expr: k [0/1] {122} - ¦ ¦ ¦ °--SYMBOL: k [0/0] {121} - ¦ ¦ °--'}': } [0/0] {123} - ¦ °--'}': } [0/0] {124} - °--')': ) [0/0] {125} 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 deleted file mode 100644 index 2a73d4886..000000000 --- a/tests/testthat/line_breaks_and_other/braces-fun-calls2-in_tree +++ /dev/null @@ -1,342 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: test( [0/0] {1} - ¦ ¦--expr: test [0/0] {3} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: test [0/0] {2} - ¦ ¦--'(': ( [0/2] {4} - ¦ ¦--expr: "x" [1/0] {6} - ¦ ¦ °--STR_CONST: "x" [0/0] {5} - ¦ ¦--',': , [0/2] {7} - ¦ ¦--expr: { - - [1/0] {8} - ¦ ¦ ¦--'{': { [0/2] {9} - ¦ ¦ °--'}': } [2/0] {10} - ¦ ¦--',': , [0/1] {11} - ¦ ¦--expr: a + b [0/0] {12} - ¦ ¦ ¦--expr: a [0/1] {14} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {13} - ¦ ¦ ¦--'+': + [0/1] {15} - ¦ ¦ °--expr: b [0/0] {17} - ¦ ¦ °--SYMBOL: b [0/0] {16} - ¦ ¦--',': , [0/1] {18} - ¦ ¦--expr: { - [0/0] {19} - ¦ ¦ ¦--'{': { [0/4] {20} - ¦ ¦ ¦--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: sd [0/0] {28} - ¦ ¦ ¦ ¦ °--SYMBOL: sd [0/0] {27} - ¦ ¦ ¦ °--')': ) [0/0] {29} - ¦ ¦ °--'}': } [1/0] {30} - ¦ °--')': ) [1/0] {31} - ¦--expr: test( [2/0] {32} - ¦ ¦--expr: test [0/0] {34} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: test [0/0] {33} - ¦ ¦--'(': ( [0/2] {35} - ¦ ¦--expr: "x" [1/0] {37} - ¦ ¦ °--STR_CONST: "x" [0/0] {36} - ¦ ¦--',': , [0/1] {38} - ¦ ¦--expr: { - - [0/0] {39} - ¦ ¦ ¦--'{': { [0/2] {40} - ¦ ¦ °--'}': } [2/0] {41} - ¦ ¦--',': , [0/1] {42} - ¦ ¦--expr: a + b [0/0] {43} - ¦ ¦ ¦--expr: a [0/1] {45} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {44} - ¦ ¦ ¦--'+': + [0/1] {46} - ¦ ¦ °--expr: b [0/0] {48} - ¦ ¦ °--SYMBOL: b [0/0] {47} - ¦ ¦--',': , [0/1] {49} - ¦ ¦--expr: { - [0/0] {50} - ¦ ¦ ¦--'{': { [0/4] {51} - ¦ ¦ ¦--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: sd [0/0] {59} - ¦ ¦ ¦ ¦ °--SYMBOL: sd [0/0] {58} - ¦ ¦ ¦ °--')': ) [0/0] {60} - ¦ ¦ °--'}': } [1/0] {61} - ¦ °--')': ) [1/0] {62} - ¦--expr: test( [2/0] {63} - ¦ ¦--expr: test [0/0] {65} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: test [0/0] {64} - ¦ ¦--'(': ( [0/2] {66} - ¦ ¦--expr: "x" [1/0] {68} - ¦ ¦ °--STR_CONST: "x" [0/0] {67} - ¦ ¦--',': , [0/2] {69} - ¦ ¦--expr: { - - [1/0] {70} - ¦ ¦ ¦--'{': { [0/2] {71} - ¦ ¦ °--'}': } [2/0] {72} - ¦ ¦--',': , [0/2] {73} - ¦ ¦--expr: a + b [1/0] {74} - ¦ ¦ ¦--expr: a [0/1] {76} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {75} - ¦ ¦ ¦--'+': + [0/1] {77} - ¦ ¦ °--expr: b [0/0] {79} - ¦ ¦ °--SYMBOL: b [0/0] {78} - ¦ ¦--',': , [0/1] {80} - ¦ ¦--expr: { - [0/0] {81} - ¦ ¦ ¦--'{': { [0/4] {82} - ¦ ¦ ¦--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: sd [0/0] {90} - ¦ ¦ ¦ ¦ °--SYMBOL: sd [0/0] {89} - ¦ ¦ ¦ °--')': ) [0/0] {91} - ¦ ¦ °--'}': } [1/0] {92} - ¦ °--')': ) [1/0] {93} - ¦--expr: test( [3/0] {94} - ¦ ¦--expr: test [0/0] {96} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: test [0/0] {95} - ¦ ¦--'(': ( [0/2] {97} - ¦ ¦--expr: "x" [1/0] {99} - ¦ ¦ °--STR_CONST: "x" [0/0] {98} - ¦ ¦--',': , [0/2] {100} - ¦ ¦--expr: { - - [1/0] {101} - ¦ ¦ ¦--'{': { [0/2] {102} - ¦ ¦ °--'}': } [2/0] {103} - ¦ ¦--',': , [0/2] {104} - ¦ ¦--expr: a + b [1/0] {105} - ¦ ¦ ¦--expr: a [0/1] {107} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {106} - ¦ ¦ ¦--'+': + [0/1] {108} - ¦ ¦ °--expr: b [0/0] {110} - ¦ ¦ °--SYMBOL: b [0/0] {109} - ¦ ¦--',': , [0/2] {111} - ¦ ¦--expr: { - [1/0] {112} - ¦ ¦ ¦--'{': { [0/4] {113} - ¦ ¦ ¦--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: sd [0/0] {121} - ¦ ¦ ¦ ¦ °--SYMBOL: sd [0/0] {120} - ¦ ¦ ¦ °--')': ) [0/0] {122} - ¦ ¦ °--'}': } [1/0] {123} - ¦ °--')': ) [1/0] {124} - ¦--expr: test( [2/0] {125} - ¦ ¦--expr: test [0/0] {127} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: test [0/0] {126} - ¦ ¦--'(': ( [0/2] {128} - ¦ ¦--expr: "x" [1/0] {130} - ¦ ¦ °--STR_CONST: "x" [0/0] {129} - ¦ ¦--',': , [0/2] {131} - ¦ ¦--expr: { - - [1/0] {132} - ¦ ¦ ¦--'{': { [0/2] {133} - ¦ ¦ °--'}': } [2/0] {134} - ¦ ¦--',': , [0/1] {135} - ¦ ¦--COMMENT: # h [0/2] {136} - ¦ ¦--expr: a + b [1/0] {137} - ¦ ¦ ¦--expr: a [0/1] {139} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {138} - ¦ ¦ ¦--'+': + [0/1] {140} - ¦ ¦ °--expr: b [0/0] {142} - ¦ ¦ °--SYMBOL: b [0/0] {141} - ¦ ¦--',': , [0/1] {143} - ¦ ¦--expr: { - [0/0] {144} - ¦ ¦ ¦--'{': { [0/4] {145} - ¦ ¦ ¦--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: sd [0/0] {153} - ¦ ¦ ¦ ¦ °--SYMBOL: sd [0/0] {152} - ¦ ¦ ¦ °--')': ) [0/0] {154} - ¦ ¦ °--'}': } [1/0] {155} - ¦ °--')': ) [1/0] {156} - ¦--expr: test( [2/0] {157} - ¦ ¦--expr: test [0/0] {159} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: test [0/0] {158} - ¦ ¦--'(': ( [0/2] {160} - ¦ ¦--expr: "x" [1/0] {162} - ¦ ¦ °--STR_CONST: "x" [0/0] {161} - ¦ ¦--',': , [0/2] {163} - ¦ ¦--expr: { - - [1/0] {164} - ¦ ¦ ¦--'{': { [0/2] {165} - ¦ ¦ °--'}': } [2/0] {166} - ¦ ¦--',': , [0/1] {167} - ¦ ¦--COMMENT: # h [0/2] {168} - ¦ ¦--expr: a + b [1/0] {169} - ¦ ¦ ¦--expr: a [0/1] {171} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {170} - ¦ ¦ ¦--'+': + [0/1] {172} - ¦ ¦ °--expr: b [0/0] {174} - ¦ ¦ °--SYMBOL: b [0/0] {173} - ¦ ¦--',': , [0/2] {175} - ¦ ¦--COMMENT: # k [1/2] {176} - ¦ ¦--expr: { - [1/0] {177} - ¦ ¦ ¦--'{': { [0/4] {178} - ¦ ¦ ¦--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: sd [0/0] {186} - ¦ ¦ ¦ ¦ °--SYMBOL: sd [0/0] {185} - ¦ ¦ ¦ °--')': ) [0/0] {187} - ¦ ¦ °--'}': } [1/0] {188} - ¦ °--')': ) [1/0] {189} - ¦--expr: test( [2/0] {190} - ¦ ¦--expr: test [0/0] {192} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: test [0/0] {191} - ¦ ¦--'(': ( [0/2] {193} - ¦ ¦--expr: "x" [1/0] {195} - ¦ ¦ °--STR_CONST: "x" [0/0] {194} - ¦ ¦--',': , [0/2] {196} - ¦ ¦--expr: { - - [1/0] {197} - ¦ ¦ ¦--'{': { [0/2] {198} - ¦ ¦ °--'}': } [2/0] {199} - ¦ ¦--',': , [0/2] {200} - ¦ ¦--expr: a + b [1/0] {201} - ¦ ¦ ¦--expr: a [0/1] {203} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {202} - ¦ ¦ ¦--'+': + [0/1] {204} - ¦ ¦ °--expr: b [0/0] {206} - ¦ ¦ °--SYMBOL: b [0/0] {205} - ¦ ¦--',': , [0/2] {207} - ¦ ¦--COMMENT: # k [0/2] {208} - ¦ ¦--expr: { - [1/0] {209} - ¦ ¦ ¦--'{': { [0/4] {210} - ¦ ¦ ¦--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: sd [0/0] {218} - ¦ ¦ ¦ ¦ °--SYMBOL: sd [0/0] {217} - ¦ ¦ ¦ °--')': ) [0/0] {219} - ¦ ¦ °--'}': } [1/0] {220} - ¦ °--')': ) [1/0] {221} - ¦--expr: tetst [2/0] {222} - ¦ ¦--expr: tetst [0/0] {224} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: tetst [0/0] {223} - ¦ ¦--'(': ( [0/2] {225} - ¦ ¦--expr: "x" [1/0] {227} - ¦ ¦ °--STR_CONST: "x" [0/0] {226} - ¦ ¦--',': , [0/2] {228} - ¦ ¦--expr: { - [1/0] {229} - ¦ ¦ ¦--'{': { [0/4] {230} - ¦ ¦ ¦--expr: x [1/2] {232} - ¦ ¦ ¦ °--SYMBOL: x [0/0] {231} - ¦ ¦ °--'}': } [1/0] {233} - ¦ ¦--',': , [0/1] {234} - ¦ ¦--expr: 1 + + [0/0] {235} - ¦ ¦ ¦--expr: 1 [0/1] {237} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {236} - ¦ ¦ ¦--'+': + [0/1] {238} - ¦ ¦ °--expr: +1 [0/0] {239} - ¦ ¦ ¦--'+': + [0/0] {240} - ¦ ¦ °--expr: 1 [0/0] {242} - ¦ ¦ °--NUM_CONST: 1 [0/0] {241} - ¦ °--')': ) [1/0] {243} - ¦--expr: while [2/0] {244} - ¦ ¦--WHILE: while [0/1] {245} - ¦ ¦--'(': ( [0/0] {246} - ¦ ¦--expr: { - x [0/0] {247} - ¦ ¦ ¦--'{': { [0/2] {248} - ¦ ¦ ¦--expr: x [1/0] {250} - ¦ ¦ ¦ °--SYMBOL: x [0/0] {249} - ¦ ¦ °--'}': } [1/0] {251} - ¦ ¦--')': ) [0/1] {252} - ¦ °--expr: { - f [0/0] {253} - ¦ ¦--'{': { [0/2] {254} - ¦ ¦--expr: f() [1/0] {255} - ¦ ¦ ¦--expr: f [0/0] {257} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: f [0/0] {256} - ¦ ¦ ¦--'(': ( [0/0] {258} - ¦ ¦ °--')': ) [0/0] {259} - ¦ °--'}': } [1/0] {260} - ¦--expr: while [2/0] {261} - ¦ ¦--WHILE: while [0/1] {262} - ¦ ¦--'(': ( [0/0] {263} - ¦ ¦--expr: { - x [0/0] {264} - ¦ ¦ ¦--'{': { [0/2] {265} - ¦ ¦ ¦--expr: x [1/0] {267} - ¦ ¦ ¦ °--SYMBOL: x [0/0] {266} - ¦ ¦ °--'}': } [1/0] {268} - ¦ ¦--')': ) [1/1] {269} - ¦ °--expr: { - f [0/0] {270} - ¦ ¦--'{': { [0/2] {271} - ¦ ¦--expr: f() [1/0] {272} - ¦ ¦ ¦--expr: f [0/0] {274} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: f [0/0] {273} - ¦ ¦ ¦--'(': ( [0/0] {275} - ¦ ¦ °--')': ) [0/0] {276} - ¦ °--'}': } [1/0] {277} - ¦--expr: while [2/0] {278} - ¦ ¦--WHILE: while [0/1] {279} - ¦ ¦--'(': ( [0/2] {280} - ¦ ¦--expr: { - x [1/0] {281} - ¦ ¦ ¦--'{': { [0/2] {282} - ¦ ¦ ¦--expr: x [1/0] {284} - ¦ ¦ ¦ °--SYMBOL: x [0/0] {283} - ¦ ¦ °--'}': } [1/0] {285} - ¦ ¦--')': ) [0/1] {286} - ¦ °--expr: { - f [0/0] {287} - ¦ ¦--'{': { [0/2] {288} - ¦ ¦--expr: f() [1/0] {289} - ¦ ¦ ¦--expr: f [0/0] {291} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: f [0/0] {290} - ¦ ¦ ¦--'(': ( [0/0] {292} - ¦ ¦ °--')': ) [0/0] {293} - ¦ °--'}': } [1/0] {294} - °--expr: while [2/0] {295} - ¦--WHILE: while [0/1] {296} - ¦--'(': ( [0/2] {297} - ¦--expr: {x -} [1/0] {298} - ¦ ¦--'{': { [0/0] {299} - ¦ ¦--expr: x [0/0] {301} - ¦ ¦ °--SYMBOL: x [0/0] {300} - ¦ °--'}': } [1/0] {302} - ¦--')': ) [0/1] {303} - °--expr: { - f [0/0] {304} - ¦--'{': { [0/2] {305} - ¦--expr: f() [1/0] {306} - ¦ ¦--expr: f [0/0] {308} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: f [0/0] {307} - ¦ ¦--'(': ( [0/0] {309} - ¦ °--')': ) [0/0] {310} - °--'}': } [1/0] {311} diff --git a/tests/testthat/line_breaks_and_other/braces-fun-calls2-out.R b/tests/testthat/line_breaks_and_other/braces-fun-calls2-out.R index 14e0fadc3..340e1eaf8 100644 --- a/tests/testthat/line_breaks_and_other/braces-fun-calls2-out.R +++ b/tests/testthat/line_breaks_and_other/braces-fun-calls2-out.R @@ -1,8 +1,6 @@ test( "x", - { - - }, + {}, a + b, { s(x = sd) @@ -11,9 +9,7 @@ test( test( "x", - { - - }, + {}, a + b, { s(x = sd) @@ -22,9 +18,7 @@ test( test( "x", - { - - }, + {}, a + b, { s(x = sd) @@ -34,9 +28,7 @@ test( test( "x", - { - - }, + {}, a + b, { s(x = sd) @@ -45,9 +37,7 @@ test( test( "x", - { - - }, # h + {}, # h a + b, { s(x = sd) @@ -56,9 +46,7 @@ test( test( "x", - { - - }, # h + {}, # h a + b, # k { @@ -68,9 +56,7 @@ test( test( "x", - { - - }, + {}, a + b, # k { s(x = sd) diff --git a/tests/testthat/line_breaks_and_other/comma-in.R b/tests/testthat/line_breaks_and_other/comma-in.R index dba179386..de95104b9 100644 --- a/tests/testthat/line_breaks_and_other/comma-in.R +++ b/tests/testthat/line_breaks_and_other/comma-in.R @@ -18,3 +18,14 @@ mpg %>% , avg_hwy = mean(hwy) , n = n() , n_class = n_distinct(class)) + + +1:4 %>% { + + + ( + + . + 1 + ) + +} diff --git a/tests/testthat/line_breaks_and_other/comma-in_tree b/tests/testthat/line_breaks_and_other/comma-in_tree deleted file mode 100644 index 92771fe7c..000000000 --- a/tests/testthat/line_breaks_and_other/comma-in_tree +++ /dev/null @@ -1,97 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: call( [0/0] {1} - ¦ ¦--expr: call [0/0] {3} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {2} - ¦ ¦--'(': ( [0/0] {4} - ¦ ¦--expr: a [0/0] {6} - ¦ ¦ °--SYMBOL: a [0/0] {5} - ¦ ¦--',': , [0/5] {7} - ¦ ¦--expr: b [1/5] {9} - ¦ ¦ °--SYMBOL: b [0/0] {8} - ¦ ¦--',': , [1/1] {10} - ¦ ¦--expr: c [0/0] {12} - ¦ ¦ °--SYMBOL: c [0/0] {11} - ¦ °--')': ) [0/0] {13} - ¦--expr: call( [2/0] {14} - ¦ ¦--expr: call [0/0] {16} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {15} - ¦ ¦--'(': ( [0/0] {17} - ¦ ¦--expr: a [0/0] {19} - ¦ ¦ °--SYMBOL: a [0/0] {18} - ¦ ¦--',': , [0/1] {20} - ¦ ¦--expr: b [0/5] {22} - ¦ ¦ °--SYMBOL: b [0/0] {21} - ¦ ¦--',': , [1/5] {23} - ¦ ¦--expr: c [1/0] {25} - ¦ ¦ °--SYMBOL: c [0/0] {24} - ¦ °--')': ) [0/0] {26} - ¦--expr: call( [2/0] {27} - ¦ ¦--expr: call [0/0] {29} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {28} - ¦ ¦--'(': ( [0/0] {30} - ¦ ¦--expr: a [0/0] {32} - ¦ ¦ °--SYMBOL: a [0/0] {31} - ¦ ¦--',': , [0/0] {33} - ¦ °--')': ) [0/0] {34} - ¦--expr: call( [1/0] {35} - ¦ ¦--expr: call [0/0] {37} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {36} - ¦ ¦--'(': ( [0/0] {38} - ¦ ¦--expr: a [0/0] {40} - ¦ ¦ °--SYMBOL: a [0/0] {39} - ¦ ¦--',': , [0/0] {41} - ¦ °--')': ) [1/0] {42} - ¦--expr: call( [2/0] {43} - ¦ ¦--expr: call [0/0] {45} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {44} - ¦ ¦--'(': ( [0/0] {46} - ¦ ¦--expr: a [0/5] {48} - ¦ ¦ °--SYMBOL: a [0/0] {47} - ¦ ¦--',': , [1/0] {49} - ¦ °--')': ) [0/0] {50} - °--expr: mpg % [2/0] {51} - ¦--expr: mpg [0/1] {53} - ¦ °--SYMBOL: mpg [0/0] {52} - ¦--SPECIAL-PIPE: %>% [0/4] {54} - °--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: mean( [0/0] {61} - ¦ ¦--expr: mean [0/0] {63} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: mean [0/0] {62} - ¦ ¦--'(': ( [0/0] {64} - ¦ ¦--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: mean( [0/0] {71} - ¦ ¦--expr: mean [0/0] {73} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: mean [0/0] {72} - ¦ ¦--'(': ( [0/0] {74} - ¦ ¦--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: 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: n_dis [0/0] {89} - ¦ ¦--expr: n_dis [0/0] {91} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: n_dis [0/0] {90} - ¦ ¦--'(': ( [0/0] {92} - ¦ ¦--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/comma-out.R b/tests/testthat/line_breaks_and_other/comma-out.R index 826ef5d41..14842c18e 100644 --- a/tests/testthat/line_breaks_and_other/comma-out.R +++ b/tests/testthat/line_breaks_and_other/comma-out.R @@ -21,3 +21,11 @@ mpg %>% n = n(), n_class = n_distinct(class) ) + + +1:4 %>% + { + ( + . + 1 + ) + } diff --git a/tests/testthat/line_breaks_and_other/comment-around-curly-in_tree b/tests/testthat/line_breaks_and_other/comment-around-curly-in_tree deleted file mode 100644 index 7da00a24f..000000000 --- a/tests/testthat/line_breaks_and_other/comment-around-curly-in_tree +++ /dev/null @@ -1,13 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: X_and [0/0] {1} - ¦--expr: X_and [0/1] {3} - ¦ °--SYMBOL: X_and [0/0] {2} - ¦--LEFT_ASSIGN: <- [0/1] {4} - °--expr: funct [0/0] {5} - ¦--FUNCTION: funct [0/0] {6} - ¦--'(': ( [0/0] {7} - ¦--')': ) [0/1] {8} - °--expr: { # n [0/0] {9} - ¦--'{': { [0/1] {10} - ¦--COMMENT: # nol [0/0] {11} - °--'}': } [1/0] {12} diff --git a/tests/testthat/line_breaks_and_other/curly-brace-edge-in_tree b/tests/testthat/line_breaks_and_other/curly-brace-edge-in_tree deleted file mode 100644 index a8086c1ab..000000000 --- a/tests/testthat/line_breaks_and_other/curly-brace-edge-in_tree +++ /dev/null @@ -1,92 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: funct [0/0] {1} - ¦ ¦--FUNCTION: funct [0/0] {2} - ¦ ¦--'(': ( [0/0] {3} - ¦ ¦--SYMBOL_FORMALS: y [0/1] {4} - ¦ ¦--EQ_FORMALS: = [0/1] {5} - ¦ ¦--expr: {} [0/0] {6} - ¦ ¦ ¦--'{': { [0/0] {7} - ¦ ¦ °--'}': } [0/0] {8} - ¦ ¦--')': ) [0/1] {9} - ¦ °--expr: NULL [0/0] {11} - ¦ °--NULL_CONST: NULL [0/0] {10} - ¦--expr: funct [2/0] {12} - ¦ ¦--FUNCTION: funct [0/0] {13} - ¦ ¦--'(': ( [0/0] {14} - ¦ ¦--SYMBOL_FORMALS: y [0/1] {15} - ¦ ¦--EQ_FORMALS: = [0/11] {16} - ¦ ¦--expr: {} [1/0] {17} - ¦ ¦ ¦--'{': { [0/0] {18} - ¦ ¦ °--'}': } [0/0] {19} - ¦ ¦--')': ) [0/1] {20} - ¦ °--expr: NULL [0/0] {22} - ¦ °--NULL_CONST: NULL [0/0] {21} - ¦--expr: funct [2/0] {23} - ¦ ¦--FUNCTION: funct [0/0] {24} - ¦ ¦--'(': ( [0/0] {25} - ¦ ¦--SYMBOL_FORMALS: yyy [0/0] {26} - ¦ ¦--EQ_FORMALS: = [0/1] {27} - ¦ ¦--expr: {1} [0/0] {28} - ¦ ¦ ¦--'{': { [0/0] {29} - ¦ ¦ ¦--expr: 1 [0/0] {31} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {30} - ¦ ¦ °--'}': } [0/0] {32} - ¦ ¦--')': ) [0/1] {33} - ¦ °--expr: { - 1 [0/0] {34} - ¦ ¦--'{': { [0/2] {35} - ¦ ¦--expr: 1 [1/0] {37} - ¦ ¦ °--NUM_CONST: 1 [0/0] {36} - ¦ °--'}': } [1/0] {38} - ¦--expr: funct [2/0] {39} - ¦ ¦--FUNCTION: funct [0/0] {40} - ¦ ¦--'(': ( [0/0] {41} - ¦ ¦--SYMBOL_FORMALS: yyy [0/0] {42} - ¦ ¦--EQ_FORMALS: = [0/1] {43} - ¦ ¦--expr: {1 - [0/0] {44} - ¦ ¦ ¦--'{': { [0/0] {45} - ¦ ¦ ¦--expr: 1 [0/2] {47} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {46} - ¦ ¦ °--'}': } [1/0] {48} - ¦ ¦--')': ) [0/1] {49} - ¦ °--expr: { - 1 [0/0] {50} - ¦ ¦--'{': { [0/2] {51} - ¦ ¦--expr: 1 [1/0] {53} - ¦ ¦ °--NUM_CONST: 1 [0/0] {52} - ¦ °--'}': } [1/0] {54} - °--expr: f1 <- [2/0] {55} - ¦--expr: f1 [0/1] {57} - ¦ °--SYMBOL: f1 [0/0] {56} - ¦--LEFT_ASSIGN: <- [0/1] {58} - °--expr: funct [0/0] {59} - ¦--FUNCTION: funct [0/0] {60} - ¦--'(': ( [0/0] {61} - ¦--SYMBOL_FORMALS: x [0/1] {62} - ¦--EQ_FORMALS: = [0/1] {63} - ¦--expr: {1} [0/0] {64} - ¦ ¦--'{': { [0/0] {65} - ¦ ¦--expr: 1 [0/0] {67} - ¦ ¦ °--NUM_CONST: 1 [0/0] {66} - ¦ °--'}': } [0/0] {68} - ¦--',': , [0/1] {69} - ¦--SYMBOL_FORMALS: y [0/1] {70} - ¦--EQ_FORMALS: = [0/1] {71} - ¦--expr: 0 [0/0] {73} - ¦ °--NUM_CONST: 0 [0/0] {72} - ¦--')': ) [0/1] {74} - °--expr: { - [0/0] {75} - ¦--'{': { [0/4] {76} - ¦--expr: c(x, [1/3] {77} - ¦ ¦--expr: c [0/0] {79} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {78} - ¦ ¦--'(': ( [0/0] {80} - ¦ ¦--expr: x [0/0] {82} - ¦ ¦ °--SYMBOL: x [0/0] {81} - ¦ ¦--',': , [0/1] {83} - ¦ ¦--expr: y [0/0] {85} - ¦ ¦ °--SYMBOL: y [0/0] {84} - ¦ °--')': ) [0/0] {86} - °--'}': } [1/0] {87} diff --git a/tests/testthat/line_breaks_and_other/curly-in.R b/tests/testthat/line_breaks_and_other/curly-in.R index 9f44b5716..8da4db732 100644 --- a/tests/testthat/line_breaks_and_other/curly-in.R +++ b/tests/testthat/line_breaks_and_other/curly-in.R @@ -41,3 +41,21 @@ test_that( # comment expect_equal(1 + 1, 2) }) + + +while (TRUE) { } + +while (TRUE) + { } + +while (TRUE){ + + } + +while (TRUE){ +# + } + + +while (TRUE){# + } diff --git a/tests/testthat/line_breaks_and_other/curly-in_tree b/tests/testthat/line_breaks_and_other/curly-in_tree deleted file mode 100644 index ca61fa15b..000000000 --- a/tests/testthat/line_breaks_and_other/curly-in_tree +++ /dev/null @@ -1,154 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: # { n [0/0] {1} - ¦--expr: if (y [1/0] {2} - ¦ ¦--IF: if [0/1] {3} - ¦ ¦--'(': ( [0/0] {4} - ¦ ¦--expr: y == [0/0] {5} - ¦ ¦ ¦--expr: y [0/1] {7} - ¦ ¦ ¦ °--SYMBOL: y [0/0] {6} - ¦ ¦ ¦--EQ: == [0/1] {8} - ¦ ¦ °--expr: 0 [0/0] {10} - ¦ ¦ °--NUM_CONST: 0 [0/0] {9} - ¦ ¦--')': ) [0/0] {11} - ¦ ¦--expr: { - 1 [1/1] {12} - ¦ ¦ ¦--'{': { [0/2] {13} - ¦ ¦ ¦--expr: 1 [1/0] {15} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {14} - ¦ ¦ °--'}': } [1/0] {16} - ¦ ¦--ELSE: else [0/1] {17} - ¦ °--expr: { - 2 [0/0] {18} - ¦ ¦--'{': { [0/2] {19} - ¦ ¦--expr: 2 [1/0] {21} - ¦ ¦ °--NUM_CONST: 2 [0/0] {20} - ¦ °--'}': } [1/0] {22} - ¦--expr: test_ [2/0] {23} - ¦ ¦--expr: test_ [0/0] {25} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: test_ [0/0] {24} - ¦ ¦--'(': ( [0/0] {26} - ¦ ¦--expr: "I am [0/0] {28} - ¦ ¦ °--STR_CONST: "I am [0/0] {27} - ¦ ¦--',': , [0/10] {29} - ¦ ¦--expr: { - [1/0] {30} - ¦ ¦ ¦--'{': { [0/12] {31} - ¦ ¦ ¦--expr: a_tes [1/10] {32} - ¦ ¦ ¦ ¦--expr: a_tes [0/0] {34} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: a_tes [0/0] {33} - ¦ ¦ ¦ ¦--'(': ( [0/0] {35} - ¦ ¦ ¦ ¦--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: if (x [1/0] {42} - ¦ ¦--IF: if [0/1] {43} - ¦ ¦--'(': ( [0/0] {44} - ¦ ¦--expr: x > 3 [0/0] {45} - ¦ ¦ ¦--expr: x [0/1] {47} - ¦ ¦ ¦ °--SYMBOL: x [0/0] {46} - ¦ ¦ ¦--GT: > [0/1] {48} - ¦ ¦ °--expr: 3 [0/0] {50} - ¦ ¦ °--NUM_CONST: 3 [0/0] {49} - ¦ ¦--')': ) [0/1] {51} - ¦ °--expr: { "x" [0/0] {52} - ¦ ¦--'{': { [0/1] {53} - ¦ ¦--expr: "x" [0/0] {55} - ¦ ¦ °--STR_CONST: "x" [0/0] {54} - ¦ °--'}': } [1/0] {56} - ¦--COMMENT: # A } [2/0] {57} - ¦--expr: if (x [1/0] {58} - ¦ ¦--IF: if [0/1] {59} - ¦ ¦--'(': ( [0/0] {60} - ¦ ¦--expr: x > 3 [0/0] {61} - ¦ ¦ ¦--expr: x [0/1] {63} - ¦ ¦ ¦ °--SYMBOL: x [0/0] {62} - ¦ ¦ ¦--GT: > [0/1] {64} - ¦ ¦ °--expr: 3 [0/0] {66} - ¦ ¦ °--NUM_CONST: 3 [0/0] {65} - ¦ ¦--')': ) [0/1] {67} - ¦ °--expr: { - " [0/0] {68} - ¦ ¦--'{': { [0/2] {69} - ¦ ¦--expr: "x" [1/0] {71} - ¦ ¦ °--STR_CONST: "x" [0/0] {70} - ¦ °--'}': } [0/0] {72} - ¦--COMMENT: # ELS [2/0] {73} - ¦--expr: if (1 [1/0] {74} - ¦ ¦--IF: if [0/1] {75} - ¦ ¦--'(': ( [0/0] {76} - ¦ ¦--expr: 1 > 3 [0/0] {77} - ¦ ¦ ¦--expr: 1 [0/1] {79} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {78} - ¦ ¦ ¦--GT: > [0/1] {80} - ¦ ¦ °--expr: 3 [0/0] {82} - ¦ ¦ °--NUM_CONST: 3 [0/0] {81} - ¦ ¦--')': ) [0/1] {83} - ¦ ¦--expr: { - " [0/1] {84} - ¦ ¦ ¦--'{': { [0/2] {85} - ¦ ¦ ¦--expr: "x" [1/0] {87} - ¦ ¦ ¦ °--STR_CONST: "x" [0/0] {86} - ¦ ¦ °--'}': } [1/0] {88} - ¦ ¦--ELSE: else [0/1] {89} - ¦ °--expr: { - " [0/0] {90} - ¦ ¦--'{': { [0/2] {91} - ¦ ¦--expr: "y" [1/0] {93} - ¦ ¦ °--STR_CONST: "y" [0/0] {92} - ¦ °--'}': } [1/0] {94} - ¦--expr: test_ [2/0] {95} - ¦ ¦--expr: test_ [0/0] {97} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: test_ [0/0] {96} - ¦ ¦--'(': ( [0/0] {98} - ¦ ¦--expr: "I am [0/0] {100} - ¦ ¦ °--STR_CONST: "I am [0/0] {99} - ¦ ¦--',': , [0/1] {101} - ¦ ¦--expr: { - a [0/0] {102} - ¦ ¦ ¦--'{': { [0/2] {103} - ¦ ¦ ¦--expr: a_tes [1/0] {104} - ¦ ¦ ¦ ¦--expr: a_tes [0/0] {106} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: a_tes [0/0] {105} - ¦ ¦ ¦ ¦--'(': ( [0/0] {107} - ¦ ¦ ¦ ¦--expr: x [0/0] {109} - ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {108} - ¦ ¦ ¦ °--')': ) [0/0] {110} - ¦ ¦ °--'}': } [1/0] {111} - ¦ °--')': ) [1/0] {112} - °--expr: test_ [2/0] {113} - ¦--expr: test_ [0/0] {115} - ¦ °--SYMBOL_FUNCTION_CALL: test_ [0/0] {114} - ¦--'(': ( [0/2] {116} - ¦--SYMBOL_SUB: desc [1/1] {117} - ¦--EQ_SUB: = [0/1] {118} - ¦--expr: "bla" [0/0] {120} - ¦ °--STR_CONST: "bla" [0/0] {119} - ¦--',': , [0/2] {121} - ¦--SYMBOL_SUB: code [1/1] {122} - ¦--EQ_SUB: = [0/1] {123} - ¦--expr: { - - - - [0/0] {124} - ¦ ¦--'{': { [0/4] {125} - ¦ ¦--COMMENT: # com [4/4] {126} - ¦ ¦--expr: expec [1/2] {127} - ¦ ¦ ¦--expr: expec [0/0] {129} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: expec [0/0] {128} - ¦ ¦ ¦--'(': ( [0/0] {130} - ¦ ¦ ¦--expr: 1 + 1 [0/0] {131} - ¦ ¦ ¦ ¦--expr: 1 [0/1] {133} - ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {132} - ¦ ¦ ¦ ¦--'+': + [0/1] {134} - ¦ ¦ ¦ °--expr: 1 [0/0] {136} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {135} - ¦ ¦ ¦--',': , [0/1] {137} - ¦ ¦ ¦--expr: 2 [0/0] {139} - ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {138} - ¦ ¦ °--')': ) [0/0] {140} - ¦ °--'}': } [1/0] {141} - °--')': ) [0/0] {142} diff --git a/tests/testthat/line_breaks_and_other/curly-out.R b/tests/testthat/line_breaks_and_other/curly-out.R index c55508290..22730a44b 100644 --- a/tests/testthat/line_breaks_and_other/curly-out.R +++ b/tests/testthat/line_breaks_and_other/curly-out.R @@ -38,3 +38,18 @@ test_that( expect_equal(1 + 1, 2) } ) + + +while (TRUE) {} + +while (TRUE) {} + +while (TRUE) {} + +while (TRUE) { + # +} + + +while (TRUE) { # +} 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 deleted file mode 100644 index 46de8acd2..000000000 --- a/tests/testthat/line_breaks_and_other/edge_comment_and_curly-in_tree +++ /dev/null @@ -1,17 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: a <- [0/0] {1} - ¦--expr: a [0/1] {3} - ¦ °--SYMBOL: a [0/0] {2} - ¦--LEFT_ASSIGN: <- [0/1] {4} - °--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: { - x [1/0] {11} - ¦--'{': { [0/2] {12} - ¦--expr: x [1/0] {14} - ¦ °--SYMBOL: x [0/0] {13} - °--'}': } [1/0] {15} diff --git a/tests/testthat/line_breaks_and_other/ggplot2-in.R b/tests/testthat/line_breaks_and_other/ggplot2-in.R index c767dca7a..c9c224cec 100644 --- a/tests/testthat/line_breaks_and_other/ggplot2-in.R +++ b/tests/testthat/line_breaks_and_other/ggplot2-in.R @@ -26,6 +26,7 @@ ggplot(data = mtcars, mapping = aes(x = mpg, y = vs)) + ggplot(data = mtcars, mapping = aes(x = mpg, y = vs)) + ggplot2::geom_point() + g() # comment + # add when comment ggplot(data = mtcars, mapping = aes(x = mpg, y = vs)) + ggplot2::geom_point() + g() + geom_oint() # comment diff --git a/tests/testthat/line_breaks_and_other/ggplot2-in_tree b/tests/testthat/line_breaks_and_other/ggplot2-in_tree deleted file mode 100644 index dd9f48f8a..000000000 --- a/tests/testthat/line_breaks_and_other/ggplot2-in_tree +++ /dev/null @@ -1,416 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: # don [0/0] {1} - ¦--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: mtcar [0/0] {10} - ¦ ¦ ¦ °--SYMBOL: mtcar [0/0] {9} - ¦ ¦ ¦--',': , [0/1] {11} - ¦ ¦ ¦--SYMBOL_SUB: mappi [0/1] {12} - ¦ ¦ ¦--EQ_SUB: = [0/1] {13} - ¦ ¦ ¦--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: mpg [0/0] {21} - ¦ ¦ ¦ ¦ °--SYMBOL: mpg [0/0] {20} - ¦ ¦ ¦ ¦--',': , [0/1] {22} - ¦ ¦ ¦ ¦--SYMBOL_SUB: y [0/1] {23} - ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {24} - ¦ ¦ ¦ ¦--expr: vs [0/0] {26} - ¦ ¦ ¦ ¦ °--SYMBOL: vs [0/0] {25} - ¦ ¦ ¦ °--')': ) [0/0] {27} - ¦ ¦ °--')': ) [0/0] {28} - ¦ ¦--'+': + [0/2] {29} - ¦ °--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: 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: mtcar [0/0] {44} - ¦ ¦ ¦ °--SYMBOL: mtcar [0/0] {43} - ¦ ¦ ¦--',': , [0/1] {45} - ¦ ¦ ¦--SYMBOL_SUB: mappi [0/1] {46} - ¦ ¦ ¦--EQ_SUB: = [0/1] {47} - ¦ ¦ ¦--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: mpg [0/0] {55} - ¦ ¦ ¦ ¦ °--SYMBOL: mpg [0/0] {54} - ¦ ¦ ¦ ¦--',': , [0/1] {56} - ¦ ¦ ¦ ¦--SYMBOL_SUB: y [0/1] {57} - ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {58} - ¦ ¦ ¦ ¦--expr: vs [0/0] {60} - ¦ ¦ ¦ ¦ °--SYMBOL: vs [0/0] {59} - ¦ ¦ ¦ °--')': ) [0/0] {61} - ¦ ¦ °--')': ) [0/0] {62} - ¦ ¦--'+': + [0/1] {63} - ¦ °--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: 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: mtcar [0/0] {80} - ¦ ¦ ¦ °--SYMBOL: mtcar [0/0] {79} - ¦ ¦ ¦--',': , [0/1] {81} - ¦ ¦ ¦--SYMBOL_SUB: mappi [0/1] {82} - ¦ ¦ ¦--EQ_SUB: = [0/1] {83} - ¦ ¦ ¦--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: mpg [0/0] {91} - ¦ ¦ ¦ ¦ °--SYMBOL: mpg [0/0] {90} - ¦ ¦ ¦ ¦--',': , [0/1] {92} - ¦ ¦ ¦ ¦--SYMBOL_SUB: y [0/1] {93} - ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {94} - ¦ ¦ ¦ ¦--expr: vs [0/0] {96} - ¦ ¦ ¦ ¦ °--SYMBOL: vs [0/0] {95} - ¦ ¦ ¦ °--')': ) [0/0] {97} - ¦ ¦ °--')': ) [0/0] {98} - ¦ ¦--'+': + [0/1] {99} - ¦ °--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: 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: mtcar [0/0] {114} - ¦ ¦ ¦ °--SYMBOL: mtcar [0/0] {113} - ¦ ¦ ¦--',': , [0/1] {115} - ¦ ¦ ¦--SYMBOL_SUB: mappi [0/1] {116} - ¦ ¦ ¦--EQ_SUB: = [0/1] {117} - ¦ ¦ ¦--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: mpg [0/0] {125} - ¦ ¦ ¦ ¦ °--SYMBOL: mpg [0/0] {124} - ¦ ¦ ¦ ¦--',': , [0/1] {126} - ¦ ¦ ¦ ¦--SYMBOL_SUB: y [0/1] {127} - ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {128} - ¦ ¦ ¦ ¦--expr: vs [0/0] {130} - ¦ ¦ ¦ ¦ °--SYMBOL: vs [0/0] {129} - ¦ ¦ ¦ °--')': ) [0/0] {131} - ¦ ¦ °--')': ) [0/0] {132} - ¦ ¦--'+': + [0/1] {133} - ¦ °--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: 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: mtcar [0/0] {151} - ¦ ¦ ¦ °--SYMBOL: mtcar [0/0] {150} - ¦ ¦ ¦--',': , [0/1] {152} - ¦ ¦ ¦--SYMBOL_SUB: mappi [0/1] {153} - ¦ ¦ ¦--EQ_SUB: = [0/1] {154} - ¦ ¦ ¦--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: mpg [0/0] {162} - ¦ ¦ ¦ ¦ °--SYMBOL: mpg [0/0] {161} - ¦ ¦ ¦ ¦--',': , [0/1] {163} - ¦ ¦ ¦ ¦--SYMBOL_SUB: y [0/1] {164} - ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {165} - ¦ ¦ ¦ ¦--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: 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: 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: 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: mtcar [0/0] {195} - ¦ ¦ ¦ °--SYMBOL: mtcar [0/0] {194} - ¦ ¦ ¦--',': , [0/1] {196} - ¦ ¦ ¦--SYMBOL_SUB: mappi [0/1] {197} - ¦ ¦ ¦--EQ_SUB: = [0/1] {198} - ¦ ¦ ¦--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: mpg [0/0] {206} - ¦ ¦ ¦ ¦ °--SYMBOL: mpg [0/0] {205} - ¦ ¦ ¦ ¦--',': , [0/1] {207} - ¦ ¦ ¦ ¦--SYMBOL_SUB: y [0/1] {208} - ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {209} - ¦ ¦ ¦ ¦--expr: vs [0/0] {211} - ¦ ¦ ¦ ¦ °--SYMBOL: vs [0/0] {210} - ¦ ¦ ¦ °--')': ) [0/0] {212} - ¦ ¦ °--')': ) [0/0] {213} - ¦ ¦--'+': + [0/2] {214} - ¦ ¦--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: 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: 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: mtcar [0/0] {239} - ¦ ¦ ¦ °--SYMBOL: mtcar [0/0] {238} - ¦ ¦ ¦--',': , [0/1] {240} - ¦ ¦ ¦--SYMBOL_SUB: mappi [0/1] {241} - ¦ ¦ ¦--EQ_SUB: = [0/1] {242} - ¦ ¦ ¦--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: mpg [0/0] {250} - ¦ ¦ ¦ ¦ °--SYMBOL: mpg [0/0] {249} - ¦ ¦ ¦ ¦--',': , [0/1] {251} - ¦ ¦ ¦ ¦--SYMBOL_SUB: y [0/1] {252} - ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {253} - ¦ ¦ ¦ ¦--expr: vs [0/0] {255} - ¦ ¦ ¦ ¦ °--SYMBOL: vs [0/0] {254} - ¦ ¦ ¦ °--')': ) [0/0] {256} - ¦ ¦ °--')': ) [0/0] {257} - ¦ ¦--'+': + [0/1] {258} - ¦ ¦--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: 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: 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: mtcar [0/0] {284} - ¦ ¦ ¦ °--SYMBOL: mtcar [0/0] {283} - ¦ ¦ ¦--',': , [0/1] {285} - ¦ ¦ ¦--SYMBOL_SUB: mappi [0/1] {286} - ¦ ¦ ¦--EQ_SUB: = [0/1] {287} - ¦ ¦ ¦--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: mpg [0/0] {295} - ¦ ¦ ¦ ¦ °--SYMBOL: mpg [0/0] {294} - ¦ ¦ ¦ ¦--',': , [0/1] {296} - ¦ ¦ ¦ ¦--SYMBOL_SUB: y [0/1] {297} - ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {298} - ¦ ¦ ¦ ¦--expr: vs [0/0] {300} - ¦ ¦ ¦ ¦ °--SYMBOL: vs [0/0] {299} - ¦ ¦ ¦ °--')': ) [0/0] {301} - ¦ ¦ °--')': ) [0/0] {302} - ¦ ¦--'+': + [0/2] {303} - ¦ ¦--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: 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: 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: 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: 1 [0/0] {331} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {330} - ¦ ¦ °--']': ] [0/0] {332} - ¦ ¦--'+': + [0/1] {333} - ¦ °--expr: c() [0/0] {334} - ¦ ¦--expr: c [0/0] {336} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {335} - ¦ ¦--'(': ( [0/0] {337} - ¦ °--')': ) [0/0] {338} - ¦--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: x[1] [0/0] {346} - ¦ ¦--expr: x [0/0] {348} - ¦ ¦ °--SYMBOL: x [0/0] {347} - ¦ ¦--'[': [ [0/0] {349} - ¦ ¦--expr: 1 [0/0] {351} - ¦ ¦ °--NUM_CONST: 1 [0/0] {350} - ¦ °--']': ] [0/0] {352} - ¦--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: 2 [0/0] {362} - ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {361} - ¦ ¦ °--']': ] [0/0] {363} - ¦ ¦--'+': + [0/1] {364} - ¦ °--expr: x[1] [0/0] {365} - ¦ ¦--expr: x [0/0] {367} - ¦ ¦ °--SYMBOL: x [0/0] {366} - ¦ ¦--'[': [ [0/0] {368} - ¦ ¦--expr: 1 [0/0] {370} - ¦ ¦ °--NUM_CONST: 1 [0/0] {369} - ¦ °--']': ] [0/0] {371} - ¦--COMMENT: # don [2/0] {372} - ¦--expr: +sin( [1/0] {373} - ¦ ¦--'+': + [0/0] {374} - ¦ °--expr: sin(x [0/0] {375} - ¦ ¦--expr: sin [0/0] {377} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: sin [0/0] {376} - ¦ ¦--'(': ( [0/0] {378} - ¦ ¦--expr: x [0/0] {380} - ¦ ¦ °--SYMBOL: x [0/0] {379} - ¦ °--')': ) [0/0] {381} - ¦--COMMENT: # wit [2/0] {382} - °--expr: qqjfl [1/0] {383} - ¦--expr: qqjfl [0/0] {385} - ¦ °--SYMBOL_FUNCTION_CALL: qqjfl [0/0] {384} - ¦--'(': ( [0/2] {386} - ¦--expr: log(y [1/0] {387} - ¦ ¦--expr: log(y [0/1] {390} - ¦ ¦ ¦--expr: log [0/0] {392} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: log [0/0] {391} - ¦ ¦ ¦--'(': ( [0/0] {393} - ¦ ¦ ¦--expr: y + 1 [0/0] {394} - ¦ ¦ ¦ ¦--expr: y [0/1] {396} - ¦ ¦ ¦ ¦ °--SYMBOL: y [0/0] {395} - ¦ ¦ ¦ ¦--'+': + [0/1] {397} - ¦ ¦ ¦ °--expr: 1 [0/0] {399} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {398} - ¦ ¦ °--')': ) [0/0] {400} - ¦ ¦--'+': + [0/4] {401} - ¦ ¦--COMMENT: # sqr [1/4] {402} - ¦ ¦--expr: sqrt( [1/1] {403} - ¦ ¦ ¦--expr: sqrt [0/0] {405} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: sqrt [0/0] {404} - ¦ ¦ ¦--'(': ( [0/0] {406} - ¦ ¦ ¦--expr: x2 [0/0] {408} - ¦ ¦ ¦ °--SYMBOL: x2 [0/0] {407} - ¦ ¦ °--')': ) [0/0] {409} - ¦ ¦--'+': + [0/4] {410} - ¦ ¦--COMMENT: # sqr [1/4] {411} - ¦ ¦--expr: x4 [1/1] {413} - ¦ ¦ °--SYMBOL: x4 [0/0] {412} - ¦ ¦--'+': + [0/4] {414} - ¦ °--expr: sqrt( [1/0] {415} - ¦ ¦--expr: sqrt [0/0] {417} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: sqrt [0/0] {416} - ¦ ¦--'(': ( [0/0] {418} - ¦ ¦--expr: x5 [0/0] {420} - ¦ ¦ °--SYMBOL: x5 [0/0] {419} - ¦ °--')': ) [0/0] {421} - °--')': ) [1/0] {422} 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 deleted file mode 100644 index 939eee536..000000000 --- a/tests/testthat/line_breaks_and_other/if_with_line_break_indention-in_tree +++ /dev/null @@ -1,48 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: # add [0/0] {1} - ¦--expr: if (x [1/0] {2} - ¦ ¦--IF: if [0/1] {3} - ¦ ¦--'(': ( [0/0] {4} - ¦ ¦--expr: x [0/0] {6} - ¦ ¦ °--SYMBOL: x [0/0] {5} - ¦ ¦--')': ) [0/1] {7} - ¦ ¦--expr: {1+1+ [0/1] {8} - ¦ ¦ ¦--'{': { [0/0] {9} - ¦ ¦ ¦--expr: 1+1++ [0/0] {10} - ¦ ¦ ¦ ¦--expr: 1 [0/0] {13} - ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {12} - ¦ ¦ ¦ ¦--'+': + [0/0] {14} - ¦ ¦ ¦ ¦--expr: 1 [0/0] {16} - ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {15} - ¦ ¦ ¦ ¦--'+': + [0/0] {17} - ¦ ¦ ¦ °--expr: +1 [0/0] {18} - ¦ ¦ ¦ ¦--'+': + [0/0] {19} - ¦ ¦ ¦ °--expr: 1 [0/0] {21} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {20} - ¦ ¦ °--'}': } [0/0] {22} - ¦ ¦--ELSE: else [0/0] {23} - ¦ °--expr: {3} [0/0] {24} - ¦ ¦--'{': { [0/0] {25} - ¦ ¦--expr: 3 [0/0] {27} - ¦ ¦ °--NUM_CONST: 3 [0/0] {26} - ¦ °--'}': } [0/0] {28} - ¦--COMMENT: # rem [2/0] {29} - °--expr: test_ [1/0] {30} - ¦--expr: test_ [0/0] {32} - ¦ °--SYMBOL_FUNCTION_CALL: test_ [0/0] {31} - ¦--'(': ( [0/0] {33} - ¦--expr: "x" [0/0] {35} - ¦ °--STR_CONST: "x" [0/0] {34} - ¦--',': , [0/0] {36} - ¦--expr: { - m [1/0] {37} - ¦ ¦--'{': { [0/2] {38} - ¦ ¦--expr: my_te [1/0] {39} - ¦ ¦ ¦--expr: my_te [0/0] {41} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: my_te [0/0] {40} - ¦ ¦ ¦--'(': ( [0/0] {42} - ¦ ¦ ¦--expr: call [0/0] {44} - ¦ ¦ ¦ °--SYMBOL: call [0/0] {43} - ¦ ¦ °--')': ) [0/0] {45} - ¦ °--'}': } [1/0] {46} - °--')': ) [0/0] {47} diff --git a/tests/testthat/line_breaks_and_other/non_strict-in_tree b/tests/testthat/line_breaks_and_other/non_strict-in_tree deleted file mode 100644 index eda50ae38..000000000 --- a/tests/testthat/line_breaks_and_other/non_strict-in_tree +++ /dev/null @@ -1,26 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {id}) - ¦--expr: a <- [0/0] {12} - ¦ ¦--expr: a [0/1] {3} - ¦ ¦ °--SYMBOL: a [0/0] {1} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {2} - ¦ °--expr: {3} [0/0] {10} - ¦ ¦--'{': { [0/0] {4} - ¦ ¦--expr: 3 [0/0] {6} - ¦ ¦ °--NUM_CONST: 3 [0/0] {5} - ¦ °--'}': } [0/0] {7} - °--expr: a <- [2/0] {45} - ¦--expr: a [0/1] {19} - ¦ °--SYMBOL: a [0/0] {17} - ¦--LEFT_ASSIGN: <- [0/1] {18} - °--expr: { - - - [0/0] {43} - ¦--'{': { [0/2] {20} - ¦--expr: 3+1 [3/0] {30} - ¦ ¦--expr: 3 [0/0] {25} - ¦ ¦ °--NUM_CONST: 3 [0/0] {24} - ¦ ¦--'+': + [0/0] {26} - ¦ °--expr: 1 [0/0] {28} - ¦ °--NUM_CONST: 1 [0/0] {27} - °--'}': } [5/0] {41} 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 deleted file mode 100644 index 9ed90d2f0..000000000 --- a/tests/testthat/line_breaks_and_other/pipe-line-breaks-in_tree +++ /dev/null @@ -1,759 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: c(a % [0/0] {1} - ¦ ¦--expr: c [0/0] {3} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {2} - ¦ ¦--'(': ( [0/0] {4} - ¦ ¦--expr: a %>% [0/0] {5} - ¦ ¦ ¦--expr: a [0/1] {7} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {6} - ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/1] {8} - ¦ ¦ °--expr: b [0/0] {10} - ¦ ¦ °--SYMBOL: b [0/0] {9} - ¦ °--')': ) [0/0] {11} - ¦--expr: c(a % [2/0] {12} - ¦ ¦--expr: c [0/0] {14} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {13} - ¦ ¦--'(': ( [0/0] {15} - ¦ ¦--expr: a %>% [0/0] {16} - ¦ ¦ ¦--expr: a [0/1] {18} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {17} - ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/1] {19} - ¦ ¦ °--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: c(a + [2/0] {26} - ¦ ¦--expr: c [0/0] {28} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {27} - ¦ ¦--'(': ( [0/0] {29} - ¦ ¦--expr: a + b [0/0] {30} - ¦ ¦ ¦--expr: a [0/1] {32} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {31} - ¦ ¦ ¦--'+': + [0/1] {33} - ¦ ¦ ¦--expr: b [0/1] {36} - ¦ ¦ ¦ °--SYMBOL: b [0/0] {35} - ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/1] {37} - ¦ ¦ °--expr: c [0/0] {39} - ¦ ¦ °--SYMBOL: c [0/0] {38} - ¦ °--')': ) [0/0] {40} - ¦--expr: c( - [2/0] {41} - ¦ ¦--expr: c [0/0] {43} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {42} - ¦ ¦--'(': ( [0/2] {44} - ¦ ¦--expr: a %>% [1/0] {45} - ¦ ¦ ¦--expr: a [0/1] {47} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {46} - ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/1] {48} - ¦ ¦ °--expr: b [0/0] {50} - ¦ ¦ °--SYMBOL: b [0/0] {49} - ¦ °--')': ) [0/0] {51} - ¦--expr: c(a % [2/0] {52} - ¦ ¦--expr: c [0/0] {54} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {53} - ¦ ¦--'(': ( [0/0] {55} - ¦ ¦--expr: a %>% [0/0] {56} - ¦ ¦ ¦--expr: a [0/1] {58} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {57} - ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/1] {59} - ¦ ¦ °--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: c(a % [2/0] {66} - ¦ ¦--expr: c [0/0] {68} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {67} - ¦ ¦--'(': ( [0/0] {69} - ¦ ¦--expr: a %>% [0/1] {70} - ¦ ¦ ¦--expr: a [0/1] {72} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {71} - ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/1] {73} - ¦ ¦ °--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: c( - [2/0] {81} - ¦ ¦--expr: c [0/0] {83} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {82} - ¦ ¦--'(': ( [0/2] {84} - ¦ ¦--expr: a + b [1/2] {85} - ¦ ¦ ¦--expr: a [0/1] {87} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {86} - ¦ ¦ ¦--'+': + [0/1] {88} - ¦ ¦ ¦--expr: b [0/1] {91} - ¦ ¦ ¦ °--SYMBOL: b [0/0] {90} - ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/1] {92} - ¦ ¦ °--expr: c [0/0] {94} - ¦ ¦ °--SYMBOL: c [0/0] {93} - ¦ °--')': ) [1/0] {95} - ¦--expr: c( - [2/0] {96} - ¦ ¦--expr: c [0/0] {98} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {97} - ¦ ¦--'(': ( [0/2] {99} - ¦ ¦--expr: a + b [1/0] {100} - ¦ ¦ ¦--expr: a [0/1] {102} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {101} - ¦ ¦ ¦--'+': + [0/1] {103} - ¦ ¦ ¦--expr: b [0/1] {106} - ¦ ¦ ¦ °--SYMBOL: b [0/0] {105} - ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/4] {107} - ¦ ¦ °--expr: c [1/0] {109} - ¦ ¦ °--SYMBOL: c [0/0] {108} - ¦ °--')': ) [0/0] {110} - ¦--expr: c(a + [2/0] {111} - ¦ ¦--expr: c [0/0] {113} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {112} - ¦ ¦--'(': ( [0/0] {114} - ¦ ¦--expr: a + b [0/0] {115} - ¦ ¦ ¦--expr: a [0/1] {117} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {116} - ¦ ¦ ¦--'+': + [0/1] {118} - ¦ ¦ ¦--expr: b [0/1] {121} - ¦ ¦ ¦ °--SYMBOL: b [0/0] {120} - ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/4] {122} - ¦ ¦ °--expr: c [1/0] {124} - ¦ ¦ °--SYMBOL: c [0/0] {123} - ¦ °--')': ) [0/0] {125} - ¦--expr: c( - [2/0] {126} - ¦ ¦--expr: c [0/0] {128} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {127} - ¦ ¦--'(': ( [0/2] {129} - ¦ ¦--expr: a + b [1/0] {130} - ¦ ¦ ¦--expr: a [0/1] {132} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {131} - ¦ ¦ ¦--'+': + [0/1] {133} - ¦ ¦ ¦--expr: b [0/1] {136} - ¦ ¦ ¦ °--SYMBOL: b [0/0] {135} - ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/1] {137} - ¦ ¦ ¦--COMMENT: # 654 [0/4] {138} - ¦ ¦ °--expr: c [1/0] {140} - ¦ ¦ °--SYMBOL: c [0/0] {139} - ¦ °--')': ) [1/0] {141} - ¦--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: a + b [1/0] {147} - ¦ ¦ ¦--expr: a [0/1] {149} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {148} - ¦ ¦ ¦--'+': + [0/1] {150} - ¦ ¦ ¦--expr: b [0/1] {153} - ¦ ¦ ¦ °--SYMBOL: b [0/0] {152} - ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/4] {154} - ¦ ¦ °--expr: c [1/0] {156} - ¦ ¦ °--SYMBOL: c [0/0] {155} - ¦ °--')': ) [1/0] {157} - ¦--expr: c( - [2/0] {158} - ¦ ¦--expr: c [0/0] {160} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {159} - ¦ ¦--'(': ( [0/2] {161} - ¦ ¦--expr: a + - [1/0] {162} - ¦ ¦ ¦--expr: a [0/1] {164} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {163} - ¦ ¦ ¦--'+': + [0/4] {165} - ¦ ¦ ¦--expr: b [1/1] {168} - ¦ ¦ ¦ °--SYMBOL: b [0/0] {167} - ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/1] {169} - ¦ ¦ °--expr: c [0/0] {171} - ¦ ¦ °--SYMBOL: c [0/0] {170} - ¦ °--')': ) [1/0] {172} - ¦--expr: c(a + [2/0] {173} - ¦ ¦--expr: c [0/0] {175} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {174} - ¦ ¦--'(': ( [0/0] {176} - ¦ ¦--expr: a + - [0/0] {177} - ¦ ¦ ¦--expr: a [0/1] {179} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {178} - ¦ ¦ ¦--'+': + [0/4] {180} - ¦ ¦ ¦--expr: b [1/1] {183} - ¦ ¦ ¦ °--SYMBOL: b [0/0] {182} - ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/1] {184} - ¦ ¦ °--expr: c [0/0] {186} - ¦ ¦ °--SYMBOL: c [0/0] {185} - ¦ °--')': ) [1/0] {187} - ¦--expr: a %>% [2/0] {188} - ¦ ¦--expr: a [0/1] {190} - ¦ ¦ °--SYMBOL: a [0/0] {189} - ¦ ¦--SPECIAL-PIPE: %>% [0/1] {191} - ¦ °--expr: b( -) [0/0] {192} - ¦ ¦--expr: b [0/0] {194} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: b [0/0] {193} - ¦ ¦--'(': ( [0/0] {195} - ¦ °--')': ) [1/0] {196} - ¦--expr: a %>% [2/0] {197} - ¦ ¦--expr: a [0/1] {200} - ¦ ¦ °--SYMBOL: a [0/0] {199} - ¦ ¦--SPECIAL-PIPE: %>% [0/1] {201} - ¦ ¦--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: q [0/0] {209} - ¦ °--SYMBOL: q [0/0] {208} - ¦--expr: a %>% [2/0] {210} - ¦ ¦--expr: a [0/1] {212} - ¦ ¦ °--SYMBOL: a [0/0] {211} - ¦ ¦--SPECIAL-PIPE: %>% [0/2] {213} - ¦ °--expr: b() [1/0] {214} - ¦ ¦--expr: b [0/0] {216} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: b [0/0] {215} - ¦ ¦--'(': ( [0/0] {217} - ¦ °--')': ) [0/0] {218} - ¦--expr: a %>% [2/0] {219} - ¦ ¦--expr: a [0/1] {222} - ¦ ¦ °--SYMBOL: a [0/0] {221} - ¦ ¦--SPECIAL-PIPE: %>% [0/1] {223} - ¦ ¦--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: c [0/0] {231} - ¦ °--SYMBOL: c [0/0] {230} - ¦--COMMENT: # sho [2/0] {232} - ¦--expr: a %>% [1/0] {233} - ¦ ¦--expr: a [0/1] {235} - ¦ ¦ °--SYMBOL: a [0/0] {234} - ¦ ¦--SPECIAL-PIPE: %>% [0/1] {236} - ¦ °--expr: b() [0/0] {237} - ¦ ¦--expr: b [0/0] {239} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: b [0/0] {238} - ¦ ¦--'(': ( [0/0] {240} - ¦ °--')': ) [0/0] {241} - ¦--expr: fun(x [2/0] {242} - ¦ ¦--expr: fun [0/0] {244} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: fun [0/0] {243} - ¦ ¦--'(': ( [0/0] {245} - ¦ ¦--expr: x [0/0] {247} - ¦ ¦ °--SYMBOL: x [0/0] {246} - ¦ ¦--',': , [0/2] {248} - ¦ ¦--expr: a %>% [1/0] {249} - ¦ ¦ ¦--expr: a [0/1] {251} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {250} - ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/1] {252} - ¦ ¦ °--expr: b [0/0] {254} - ¦ ¦ °--SYMBOL: b [0/0] {253} - ¦ °--')': ) [0/0] {255} - ¦--expr: fun(x [2/0] {256} - ¦ ¦--expr: fun [0/0] {258} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: fun [0/0] {257} - ¦ ¦--'(': ( [0/0] {259} - ¦ ¦--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: a %>% [0/0] {265} - ¦ ¦ ¦--expr: a [0/1] {267} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {266} - ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/1] {268} - ¦ ¦ °--expr: b [0/0] {270} - ¦ ¦ °--SYMBOL: b [0/0] {269} - ¦ ¦--',': , [0/4] {271} - ¦ ¦--expr: tt %> [1/0] {272} - ¦ ¦ ¦--expr: tt [0/1] {274} - ¦ ¦ ¦ °--SYMBOL: tt [0/0] {273} - ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/1] {275} - ¦ ¦ °--expr: q [0/0] {277} - ¦ ¦ °--SYMBOL: q [0/0] {276} - ¦ °--')': ) [0/0] {278} - ¦--expr: fun(x [2/0] {279} - ¦ ¦--expr: fun [0/0] {281} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: fun [0/0] {280} - ¦ ¦--'(': ( [0/0] {282} - ¦ ¦--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: a %>% [0/0] {288} - ¦ ¦ ¦--expr: a [0/1] {290} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {289} - ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/1] {291} - ¦ ¦ °--expr: b [0/0] {293} - ¦ ¦ °--SYMBOL: b [0/0] {292} - ¦ ¦--',': , [0/1] {294} - ¦ ¦--expr: tt %> [0/0] {295} - ¦ ¦ ¦--expr: tt [0/1] {297} - ¦ ¦ ¦ °--SYMBOL: tt [0/0] {296} - ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/1] {298} - ¦ ¦ °--expr: q [0/0] {300} - ¦ ¦ °--SYMBOL: q [0/0] {299} - ¦ °--')': ) [0/0] {301} - ¦--expr_or_assign_or_help: z = a [2/0] {302} - ¦ ¦--expr: z [0/1] {304} - ¦ ¦ °--SYMBOL: z [0/0] {303} - ¦ ¦--EQ_ASSIGN: = [0/1] {305} - ¦ ¦--expr: a [0/1] {308} - ¦ ¦ °--SYMBOL: a [0/0] {307} - ¦ ¦--SPECIAL-PIPE: %>% [0/1] {309} - ¦ °--expr: b() [0/0] {310} - ¦ ¦--expr: b [0/0] {312} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: b [0/0] {311} - ¦ ¦--'(': ( [0/0] {313} - ¦ °--')': ) [0/0] {314} - ¦--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: g(x) [0/0] {321} - ¦ ¦ ¦--expr: g [0/0] {323} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: g [0/0] {322} - ¦ ¦ ¦--'(': ( [0/0] {324} - ¦ ¦ ¦--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: 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: n == [0/0] {336} - ¦ ¦ ¦ ¦ ¦--expr: n [0/1] {338} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL: n [0/0] {337} - ¦ ¦ ¦ ¦ ¦--EQ: == [0/1] {339} - ¦ ¦ ¦ ¦ °--expr: 2 [0/0] {341} - ¦ ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {340} - ¦ ¦ ¦ °--')': ) [0/0] {342} - ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/1] {343} - ¦ ¦ °--expr: b [0/0] {345} - ¦ ¦ °--SYMBOL: b [0/0] {344} - ¦ ¦--',': , [0/4] {346} - ¦ ¦--expr: tt %> [1/0] {347} - ¦ ¦ ¦--expr: tt [0/1] {349} - ¦ ¦ ¦ °--SYMBOL: tt [0/0] {348} - ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/1] {350} - ¦ ¦ °--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: 3 [0/0] {358} - ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {357} - ¦ ¦ °--')': ) [0/0] {359} - ¦ °--')': ) [0/0] {360} - ¦--COMMENT: # FIX [2/0] {361} - ¦--expr: blew( [1/0] {362} - ¦ ¦--expr: blew [0/0] {364} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: blew [0/0] {363} - ¦ ¦--'(': ( [0/0] {365} - ¦ ¦--expr: x %>% [0/0] {366} - ¦ ¦ ¦--expr: x [0/1] {368} - ¦ ¦ ¦ °--SYMBOL: x [0/0] {367} - ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/7] {369} - ¦ ¦ °--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: 2 [0/0] {379} - ¦ ¦ °--NUM_CONST: 2 [0/0] {378} - ¦ °--')': ) [0/0] {380} - ¦--COMMENT: # FIX [2/0] {381} - ¦--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: 2 [0/0] {389} - ¦ ¦ °--NUM_CONST: 2 [0/0] {388} - ¦ ¦--',': , [0/1] {390} - ¦ ¦--expr: x %>% [0/0] {391} - ¦ ¦ ¦--expr: x [0/1] {393} - ¦ ¦ ¦ °--SYMBOL: x [0/0] {392} - ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/7] {394} - ¦ ¦ °--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: {a %> [3/0] {401} - ¦ ¦--'{': { [0/0] {402} - ¦ ¦--expr: a %>% [0/0] {403} - ¦ ¦ ¦--expr: a [0/1] {406} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {405} - ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/1] {407} - ¦ ¦ ¦--expr: c [0/1] {409} - ¦ ¦ ¦ °--SYMBOL: c [0/0] {408} - ¦ ¦ ¦--'+': + [0/0] {410} - ¦ ¦ °--expr: 1 [0/0] {412} - ¦ ¦ °--NUM_CONST: 1 [0/0] {411} - ¦ °--'}': } [0/0] {413} - ¦--expr: b %>% [3/0] {414} - ¦ ¦--expr: b [0/1] {418} - ¦ ¦ °--SYMBOL: b [0/0] {417} - ¦ ¦--SPECIAL-PIPE: %>% [0/2] {419} - ¦ ¦--expr: f() [1/1] {420} - ¦ ¦ ¦--expr: f [0/0] {422} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: f [0/0] {421} - ¦ ¦ ¦--'(': ( [0/0] {423} - ¦ ¦ °--')': ) [0/0] {424} - ¦ ¦--SPECIAL-PIPE: %>% [0/1] {425} - ¦ ¦--COMMENT: # nev [0/2] {426} - ¦ ¦--expr: k() [1/1] {427} - ¦ ¦ ¦--expr: k [0/0] {429} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: k [0/0] {428} - ¦ ¦ ¦--'(': ( [0/0] {430} - ¦ ¦ °--')': ) [0/0] {431} - ¦ ¦--SPECIAL-PIPE: %>% [0/2] {432} - ¦ °--expr: x() [1/0] {433} - ¦ ¦--expr: x [0/0] {435} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: x [0/0] {434} - ¦ ¦--'(': ( [0/0] {436} - ¦ °--')': ) [0/0] {437} - ¦--COMMENT: # lin [3/0] {438} - ¦--expr: c( -da [1/0] {439} - ¦ ¦--expr: c [0/0] {441} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {440} - ¦ ¦--'(': ( [0/0] {442} - ¦ ¦--expr: data [1/0] {443} - ¦ ¦ ¦--expr: data [0/1] {446} - ¦ ¦ ¦ °--SYMBOL: data [0/0] {445} - ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/2] {447} - ¦ ¦ ¦--expr: filte [1/1] {448} - ¦ ¦ ¦ ¦--expr: filte [0/0] {450} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: filte [0/0] {449} - ¦ ¦ ¦ ¦--'(': ( [0/0] {451} - ¦ ¦ ¦ ¦--expr: bar [0/0] {453} - ¦ ¦ ¦ ¦ °--SYMBOL: bar [0/0] {452} - ¦ ¦ ¦ °--')': ) [0/0] {454} - ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/1] {455} - ¦ ¦ °--expr: { - [0/0] {456} - ¦ ¦ ¦--'{': { [0/4] {457} - ¦ ¦ ¦--expr: cor(. [1/2] {458} - ¦ ¦ ¦ ¦--expr: cor [0/0] {460} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: cor [0/0] {459} - ¦ ¦ ¦ ¦--'(': ( [0/0] {461} - ¦ ¦ ¦ ¦--expr: .$col [0/0] {462} - ¦ ¦ ¦ ¦ ¦--expr: . [0/0] {464} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL: . [0/0] {463} - ¦ ¦ ¦ ¦ ¦--'$': $ [0/0] {465} - ¦ ¦ ¦ ¦ °--SYMBOL: col1 [0/0] {466} - ¦ ¦ ¦ ¦--',': , [0/1] {467} - ¦ ¦ ¦ ¦--expr: .$col [0/0] {468} - ¦ ¦ ¦ ¦ ¦--expr: . [0/0] {470} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL: . [0/0] {469} - ¦ ¦ ¦ ¦ ¦--'$': $ [0/0] {471} - ¦ ¦ ¦ ¦ °--SYMBOL: col2 [0/0] {472} - ¦ ¦ ¦ ¦--',': , [0/1] {473} - ¦ ¦ ¦ ¦--SYMBOL_SUB: use [0/1] {474} - ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {475} - ¦ ¦ ¦ ¦--expr: "comp [0/0] {477} - ¦ ¦ ¦ ¦ °--STR_CONST: "comp [0/0] {476} - ¦ ¦ ¦ °--')': ) [0/0] {478} - ¦ ¦ °--'}': } [1/0] {479} - ¦ °--')': ) [1/0] {480} - ¦--expr: data [2/0] {481} - ¦ ¦--expr: data [0/1] {484} - ¦ ¦ °--SYMBOL: data [0/0] {483} - ¦ ¦--SPECIAL-PIPE: %>% [0/2] {485} - ¦ ¦--expr: filte [1/1] {486} - ¦ ¦ ¦--expr: filte [0/0] {488} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: filte [0/0] {487} - ¦ ¦ ¦--'(': ( [0/0] {489} - ¦ ¦ ¦--expr: bar [0/0] {491} - ¦ ¦ ¦ °--SYMBOL: bar [0/0] {490} - ¦ ¦ °--')': ) [0/0] {492} - ¦ ¦--SPECIAL-PIPE: %>% [0/1] {493} - ¦ °--expr: { - [0/0] {494} - ¦ ¦--'{': { [0/4] {495} - ¦ ¦--expr: cor(. [1/2] {496} - ¦ ¦ ¦--expr: cor [0/0] {498} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: cor [0/0] {497} - ¦ ¦ ¦--'(': ( [0/0] {499} - ¦ ¦ ¦--expr: .$col [0/0] {500} - ¦ ¦ ¦ ¦--expr: . [0/0] {502} - ¦ ¦ ¦ ¦ °--SYMBOL: . [0/0] {501} - ¦ ¦ ¦ ¦--'$': $ [0/0] {503} - ¦ ¦ ¦ °--SYMBOL: col1 [0/0] {504} - ¦ ¦ ¦--',': , [0/1] {505} - ¦ ¦ ¦--expr: .$col [0/0] {506} - ¦ ¦ ¦ ¦--expr: . [0/0] {508} - ¦ ¦ ¦ ¦ °--SYMBOL: . [0/0] {507} - ¦ ¦ ¦ ¦--'$': $ [0/0] {509} - ¦ ¦ ¦ °--SYMBOL: col2 [0/0] {510} - ¦ ¦ ¦--',': , [0/1] {511} - ¦ ¦ ¦--SYMBOL_SUB: use [0/1] {512} - ¦ ¦ ¦--EQ_SUB: = [0/1] {513} - ¦ ¦ ¦--expr: "comp [0/0] {515} - ¦ ¦ ¦ °--STR_CONST: "comp [0/0] {514} - ¦ ¦ °--')': ) [0/0] {516} - ¦ °--'}': } [1/0] {517} - ¦--COMMENT: # lin [2/0] {518} - ¦--expr: c( - [1/0] {519} - ¦ ¦--expr: c [0/0] {521} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {520} - ¦ ¦--'(': ( [0/2] {522} - ¦ ¦--expr: data [1/0] {523} - ¦ ¦ ¦--expr: data [0/1] {526} - ¦ ¦ ¦ °--SYMBOL: data [0/0] {525} - ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/4] {527} - ¦ ¦ ¦--expr: filte [1/1] {528} - ¦ ¦ ¦ ¦--expr: filte [0/0] {530} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: filte [0/0] {529} - ¦ ¦ ¦ ¦--'(': ( [0/0] {531} - ¦ ¦ ¦ ¦--expr: bar [0/0] {533} - ¦ ¦ ¦ ¦ °--SYMBOL: bar [0/0] {532} - ¦ ¦ ¦ °--')': ) [0/0] {534} - ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/4] {535} - ¦ ¦ °--expr: { - [1/0] {536} - ¦ ¦ ¦--'{': { [0/6] {537} - ¦ ¦ ¦--expr: cor(. [1/4] {538} - ¦ ¦ ¦ ¦--expr: cor [0/0] {540} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: cor [0/0] {539} - ¦ ¦ ¦ ¦--'(': ( [0/0] {541} - ¦ ¦ ¦ ¦--expr: .$col [0/0] {542} - ¦ ¦ ¦ ¦ ¦--expr: . [0/0] {544} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL: . [0/0] {543} - ¦ ¦ ¦ ¦ ¦--'$': $ [0/0] {545} - ¦ ¦ ¦ ¦ °--SYMBOL: col1 [0/0] {546} - ¦ ¦ ¦ ¦--',': , [0/1] {547} - ¦ ¦ ¦ ¦--expr: .$col [0/0] {548} - ¦ ¦ ¦ ¦ ¦--expr: . [0/0] {550} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL: . [0/0] {549} - ¦ ¦ ¦ ¦ ¦--'$': $ [0/0] {551} - ¦ ¦ ¦ ¦ °--SYMBOL: col2 [0/0] {552} - ¦ ¦ ¦ ¦--',': , [0/1] {553} - ¦ ¦ ¦ ¦--SYMBOL_SUB: use [0/1] {554} - ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {555} - ¦ ¦ ¦ ¦--expr: "comp [0/0] {557} - ¦ ¦ ¦ ¦ °--STR_CONST: "comp [0/0] {556} - ¦ ¦ ¦ °--')': ) [0/0] {558} - ¦ ¦ °--'}': } [1/0] {559} - ¦ °--')': ) [1/0] {560} - ¦--expr: data [2/0] {561} - ¦ ¦--expr: data [0/1] {564} - ¦ ¦ °--SYMBOL: data [0/0] {563} - ¦ ¦--SPECIAL-PIPE: %>% [0/2] {565} - ¦ ¦--expr: filte [1/1] {566} - ¦ ¦ ¦--expr: filte [0/0] {568} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: filte [0/0] {567} - ¦ ¦ ¦--'(': ( [0/0] {569} - ¦ ¦ ¦--expr: bar [0/0] {571} - ¦ ¦ ¦ °--SYMBOL: bar [0/0] {570} - ¦ ¦ °--')': ) [0/0] {572} - ¦ ¦--SPECIAL-PIPE: %>% [0/2] {573} - ¦ °--expr: { - [1/0] {574} - ¦ ¦--'{': { [0/4] {575} - ¦ ¦--expr: cor(. [1/2] {576} - ¦ ¦ ¦--expr: cor [0/0] {578} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: cor [0/0] {577} - ¦ ¦ ¦--'(': ( [0/0] {579} - ¦ ¦ ¦--expr: .$col [0/0] {580} - ¦ ¦ ¦ ¦--expr: . [0/0] {582} - ¦ ¦ ¦ ¦ °--SYMBOL: . [0/0] {581} - ¦ ¦ ¦ ¦--'$': $ [0/0] {583} - ¦ ¦ ¦ °--SYMBOL: col1 [0/0] {584} - ¦ ¦ ¦--',': , [0/1] {585} - ¦ ¦ ¦--expr: .$col [0/0] {586} - ¦ ¦ ¦ ¦--expr: . [0/0] {588} - ¦ ¦ ¦ ¦ °--SYMBOL: . [0/0] {587} - ¦ ¦ ¦ ¦--'$': $ [0/0] {589} - ¦ ¦ ¦ °--SYMBOL: col2 [0/0] {590} - ¦ ¦ ¦--',': , [0/1] {591} - ¦ ¦ ¦--SYMBOL_SUB: use [0/1] {592} - ¦ ¦ ¦--EQ_SUB: = [0/1] {593} - ¦ ¦ ¦--expr: "comp [0/0] {595} - ¦ ¦ ¦ °--STR_CONST: "comp [0/0] {594} - ¦ ¦ °--')': ) [0/0] {596} - ¦ °--'}': } [1/0] {597} - ¦--COMMENT: # red [2/0] {598} - ¦--expr: c( - [1/0] {599} - ¦ ¦--expr: c [0/0] {601} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {600} - ¦ ¦--'(': ( [0/2] {602} - ¦ ¦--expr: data [1/0] {603} - ¦ ¦ ¦--expr: data [0/1] {606} - ¦ ¦ ¦ °--SYMBOL: data [0/0] {605} - ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/4] {607} - ¦ ¦ ¦--expr: filte [1/1] {608} - ¦ ¦ ¦ ¦--expr: filte [0/0] {610} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: filte [0/0] {609} - ¦ ¦ ¦ ¦--'(': ( [0/0] {611} - ¦ ¦ ¦ ¦--expr: bar [0/0] {613} - ¦ ¦ ¦ ¦ °--SYMBOL: bar [0/0] {612} - ¦ ¦ ¦ °--')': ) [0/0] {614} - ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/4] {615} - ¦ ¦ °--expr: { - [2/0] {616} - ¦ ¦ ¦--'{': { [0/6] {617} - ¦ ¦ ¦--expr: cor(. [1/4] {618} - ¦ ¦ ¦ ¦--expr: cor [0/0] {620} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: cor [0/0] {619} - ¦ ¦ ¦ ¦--'(': ( [0/0] {621} - ¦ ¦ ¦ ¦--expr: .$col [0/0] {622} - ¦ ¦ ¦ ¦ ¦--expr: . [0/0] {624} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL: . [0/0] {623} - ¦ ¦ ¦ ¦ ¦--'$': $ [0/0] {625} - ¦ ¦ ¦ ¦ °--SYMBOL: col1 [0/0] {626} - ¦ ¦ ¦ ¦--',': , [0/1] {627} - ¦ ¦ ¦ ¦--expr: .$col [0/0] {628} - ¦ ¦ ¦ ¦ ¦--expr: . [0/0] {630} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL: . [0/0] {629} - ¦ ¦ ¦ ¦ ¦--'$': $ [0/0] {631} - ¦ ¦ ¦ ¦ °--SYMBOL: col2 [0/0] {632} - ¦ ¦ ¦ ¦--',': , [0/1] {633} - ¦ ¦ ¦ ¦--SYMBOL_SUB: use [0/1] {634} - ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {635} - ¦ ¦ ¦ ¦--expr: "comp [0/0] {637} - ¦ ¦ ¦ ¦ °--STR_CONST: "comp [0/0] {636} - ¦ ¦ ¦ °--')': ) [0/0] {638} - ¦ ¦ °--'}': } [1/0] {639} - ¦ °--')': ) [1/0] {640} - ¦--expr: data [2/0] {641} - ¦ ¦--expr: data [0/1] {644} - ¦ ¦ °--SYMBOL: data [0/0] {643} - ¦ ¦--SPECIAL-PIPE: %>% [0/2] {645} - ¦ ¦--expr: filte [1/1] {646} - ¦ ¦ ¦--expr: filte [0/0] {648} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: filte [0/0] {647} - ¦ ¦ ¦--'(': ( [0/0] {649} - ¦ ¦ ¦--expr: bar [0/0] {651} - ¦ ¦ ¦ °--SYMBOL: bar [0/0] {650} - ¦ ¦ °--')': ) [0/0] {652} - ¦ ¦--SPECIAL-PIPE: %>% [0/2] {653} - ¦ °--expr: { - [2/0] {654} - ¦ ¦--'{': { [0/4] {655} - ¦ ¦--expr: cor(. [1/2] {656} - ¦ ¦ ¦--expr: cor [0/0] {658} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: cor [0/0] {657} - ¦ ¦ ¦--'(': ( [0/0] {659} - ¦ ¦ ¦--expr: .$col [0/0] {660} - ¦ ¦ ¦ ¦--expr: . [0/0] {662} - ¦ ¦ ¦ ¦ °--SYMBOL: . [0/0] {661} - ¦ ¦ ¦ ¦--'$': $ [0/0] {663} - ¦ ¦ ¦ °--SYMBOL: col1 [0/0] {664} - ¦ ¦ ¦--',': , [0/1] {665} - ¦ ¦ ¦--expr: .$col [0/0] {666} - ¦ ¦ ¦ ¦--expr: . [0/0] {668} - ¦ ¦ ¦ ¦ °--SYMBOL: . [0/0] {667} - ¦ ¦ ¦ ¦--'$': $ [0/0] {669} - ¦ ¦ ¦ °--SYMBOL: col2 [0/0] {670} - ¦ ¦ ¦--',': , [0/1] {671} - ¦ ¦ ¦--SYMBOL_SUB: use [0/1] {672} - ¦ ¦ ¦--EQ_SUB: = [0/1] {673} - ¦ ¦ ¦--expr: "comp [0/0] {675} - ¦ ¦ ¦ °--STR_CONST: "comp [0/0] {674} - ¦ ¦ °--')': ) [0/0] {676} - ¦ °--'}': } [1/0] {677} - ¦--COMMENT: # bla [2/0] {678} - ¦--expr: c( - [1/0] {679} - ¦ ¦--expr: c [0/0] {681} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {680} - ¦ ¦--'(': ( [0/2] {682} - ¦ ¦--expr: data [1/0] {683} - ¦ ¦ ¦--expr: data [0/1] {686} - ¦ ¦ ¦ °--SYMBOL: data [0/0] {685} - ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/4] {687} - ¦ ¦ ¦--expr: filte [1/1] {688} - ¦ ¦ ¦ ¦--expr: filte [0/0] {690} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: filte [0/0] {689} - ¦ ¦ ¦ ¦--'(': ( [0/0] {691} - ¦ ¦ ¦ ¦--expr: bar [0/0] {693} - ¦ ¦ ¦ ¦ °--SYMBOL: bar [0/0] {692} - ¦ ¦ ¦ °--')': ) [0/0] {694} - ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/4] {695} - ¦ ¦ ¦--COMMENT: # com [1/4] {696} - ¦ ¦ °--expr: { - [2/0] {697} - ¦ ¦ ¦--'{': { [0/6] {698} - ¦ ¦ ¦--expr: cor(. [1/4] {699} - ¦ ¦ ¦ ¦--expr: cor [0/0] {701} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: cor [0/0] {700} - ¦ ¦ ¦ ¦--'(': ( [0/0] {702} - ¦ ¦ ¦ ¦--expr: .$col [0/0] {703} - ¦ ¦ ¦ ¦ ¦--expr: . [0/0] {705} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL: . [0/0] {704} - ¦ ¦ ¦ ¦ ¦--'$': $ [0/0] {706} - ¦ ¦ ¦ ¦ °--SYMBOL: col1 [0/0] {707} - ¦ ¦ ¦ ¦--',': , [0/1] {708} - ¦ ¦ ¦ ¦--expr: .$col [0/0] {709} - ¦ ¦ ¦ ¦ ¦--expr: . [0/0] {711} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL: . [0/0] {710} - ¦ ¦ ¦ ¦ ¦--'$': $ [0/0] {712} - ¦ ¦ ¦ ¦ °--SYMBOL: col2 [0/0] {713} - ¦ ¦ ¦ ¦--',': , [0/1] {714} - ¦ ¦ ¦ ¦--SYMBOL_SUB: use [0/1] {715} - ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {716} - ¦ ¦ ¦ ¦--expr: "comp [0/0] {718} - ¦ ¦ ¦ ¦ °--STR_CONST: "comp [0/0] {717} - ¦ ¦ ¦ °--')': ) [0/0] {719} - ¦ ¦ °--'}': } [1/0] {720} - ¦ °--')': ) [1/0] {721} - °--expr: data [2/0] {722} - ¦--expr: data [0/1] {725} - ¦ °--SYMBOL: data [0/0] {724} - ¦--SPECIAL-PIPE: %>% [0/2] {726} - ¦--expr: filte [1/1] {727} - ¦ ¦--expr: filte [0/0] {729} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: filte [0/0] {728} - ¦ ¦--'(': ( [0/0] {730} - ¦ ¦--expr: bar [0/0] {732} - ¦ ¦ °--SYMBOL: bar [0/0] {731} - ¦ °--')': ) [0/0] {733} - ¦--SPECIAL-PIPE: %>% [0/2] {734} - ¦--COMMENT: # com [1/2] {735} - °--expr: { - [2/0] {736} - ¦--'{': { [0/4] {737} - ¦--expr: cor(. [1/2] {738} - ¦ ¦--expr: cor [0/0] {740} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: cor [0/0] {739} - ¦ ¦--'(': ( [0/0] {741} - ¦ ¦--expr: .$col [0/0] {742} - ¦ ¦ ¦--expr: . [0/0] {744} - ¦ ¦ ¦ °--SYMBOL: . [0/0] {743} - ¦ ¦ ¦--'$': $ [0/0] {745} - ¦ ¦ °--SYMBOL: col1 [0/0] {746} - ¦ ¦--',': , [0/1] {747} - ¦ ¦--expr: .$col [0/0] {748} - ¦ ¦ ¦--expr: . [0/0] {750} - ¦ ¦ ¦ °--SYMBOL: . [0/0] {749} - ¦ ¦ ¦--'$': $ [0/0] {751} - ¦ ¦ °--SYMBOL: col2 [0/0] {752} - ¦ ¦--',': , [0/1] {753} - ¦ ¦--SYMBOL_SUB: use [0/1] {754} - ¦ ¦--EQ_SUB: = [0/1] {755} - ¦ ¦--expr: "comp [0/0] {757} - ¦ ¦ °--STR_CONST: "comp [0/0] {756} - ¦ °--')': ) [0/0] {758} - °--'}': } [1/0] {759} 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 deleted file mode 100644 index f46b15c2a..000000000 --- a/tests/testthat/line_breaks_and_other/pipe_and_comment-in_tree +++ /dev/null @@ -1,15 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--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: 10 [0/0] {7} - ¦ °--NUM_CONST: 10 [0/0] {6} - ¦--SPECIAL-PIPE: %>% [0/1] {8} - ¦--COMMENT: # sum [0/2] {9} - °--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/blank-non-strict-in_tree b/tests/testthat/line_breaks_fun_call/blank-non-strict-in_tree deleted file mode 100644 index 9632f334c..000000000 --- a/tests/testthat/line_breaks_fun_call/blank-non-strict-in_tree +++ /dev/null @@ -1,31 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: call( [0/0] {1} - ¦ ¦--expr: call [0/0] {3} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {2} - ¦ ¦--'(': ( [0/2] {4} - ¦ ¦--expr: 1 [3/0] {6} - ¦ ¦ °--NUM_CONST: 1 [0/0] {5} - ¦ °--')': ) [1/0] {7} - ¦--expr: call( [2/0] {8} - ¦ ¦--expr: call [0/0] {10} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {9} - ¦ ¦--'(': ( [0/2] {11} - ¦ ¦--COMMENT: # com [1/2] {12} - ¦ ¦--expr: 1 [2/0] {14} - ¦ ¦ °--NUM_CONST: 1 [0/0] {13} - ¦ °--')': ) [1/0] {15} - °--expr: call( [2/0] {16} - ¦--expr: call [0/0] {18} - ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {17} - ¦--'(': ( [0/2] {19} - ¦--SYMBOL_SUB: x [1/1] {20} - ¦--EQ_SUB: = [0/1] {21} - ¦--expr: 2 [0/0] {23} - ¦ °--NUM_CONST: 2 [0/0] {22} - ¦--',': , [0/2] {24} - ¦--expr: 1 [1/0] {26} - ¦ °--NUM_CONST: 1 [0/0] {25} - ¦--',': , [0/2] {27} - ¦--expr: "w" [2/0] {29} - ¦ °--STR_CONST: "w" [0/0] {28} - °--')': ) [1/0] {30} diff --git a/tests/testthat/line_breaks_fun_call/blank-non-strict-out.R b/tests/testthat/line_breaks_fun_call/blank-non-strict-out.R index 21225f5f8..02330a9ec 100644 --- a/tests/testthat/line_breaks_fun_call/blank-non-strict-out.R +++ b/tests/testthat/line_breaks_fun_call/blank-non-strict-out.R @@ -1,6 +1,4 @@ call( - - 1 ) diff --git a/tests/testthat/line_breaks_fun_call/blank-strict-in_tree b/tests/testthat/line_breaks_fun_call/blank-strict-in_tree deleted file mode 100644 index 9f5ef0916..000000000 --- a/tests/testthat/line_breaks_fun_call/blank-strict-in_tree +++ /dev/null @@ -1,51 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: call( [0/0] {1} - ¦ ¦--expr: call [0/0] {3} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {2} - ¦ ¦--'(': ( [0/2] {4} - ¦ ¦--expr: 1 [3/0] {6} - ¦ ¦ °--NUM_CONST: 1 [0/0] {5} - ¦ °--')': ) [1/0] {7} - ¦--expr: call( [2/0] {8} - ¦ ¦--expr: call [0/0] {10} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {9} - ¦ ¦--'(': ( [0/2] {11} - ¦ ¦--COMMENT: # com [1/2] {12} - ¦ ¦--expr: 1 [2/0] {14} - ¦ ¦ °--NUM_CONST: 1 [0/0] {13} - ¦ °--')': ) [1/0] {15} - ¦--expr: call( [2/0] {16} - ¦ ¦--expr: call [0/0] {18} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {17} - ¦ ¦--'(': ( [0/2] {19} - ¦ ¦--SYMBOL_SUB: x [1/1] {20} - ¦ ¦--EQ_SUB: = [0/1] {21} - ¦ ¦--expr: 2 [0/0] {23} - ¦ ¦ °--NUM_CONST: 2 [0/0] {22} - ¦ ¦--',': , [0/2] {24} - ¦ ¦--expr: 1 [1/0] {26} - ¦ ¦ °--NUM_CONST: 1 [0/0] {25} - ¦ ¦--',': , [0/2] {27} - ¦ ¦--expr: "w" [2/0] {29} - ¦ ¦ °--STR_CONST: "w" [0/0] {28} - ¦ °--')': ) [1/0] {30} - °--expr: call( [2/0] {31} - ¦--expr: call [0/0] {33} - ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {32} - ¦--'(': ( [0/2] {34} - ¦--expr: 1 [1/0] {36} - ¦ °--NUM_CONST: 1 [0/0] {35} - ¦--',': , [0/2] {37} - ¦--expr: 2 [1/0] {39} - ¦ °--NUM_CONST: 2 [0/0] {38} - ¦--',': , [0/2] {40} - ¦--COMMENT: # com [4/2] {41} - ¦--expr: 1 [2/0] {43} - ¦ °--NUM_CONST: 1 [0/0] {42} - ¦--',': , [0/2] {44} - ¦--expr: 2 [1/0] {46} - ¦ °--NUM_CONST: 2 [0/0] {45} - ¦--',': , [0/2] {47} - ¦--expr: 3 [2/0] {49} - ¦ °--NUM_CONST: 3 [0/0] {48} - °--')': ) [1/0] {50} diff --git a/tests/testthat/line_breaks_fun_call/blank-strict-out.R b/tests/testthat/line_breaks_fun_call/blank-strict-out.R index cb9acea09..19232c9fa 100644 --- a/tests/testthat/line_breaks_fun_call/blank-strict-out.R +++ b/tests/testthat/line_breaks_fun_call/blank-strict-out.R @@ -19,7 +19,6 @@ call( 2, - # comment 1, 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 deleted file mode 100644 index 899d5d938..000000000 --- a/tests/testthat/line_breaks_fun_call/line_breaks_and_comments-in_tree +++ /dev/null @@ -1,80 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--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: am [1/0] {7} - ¦ ¦ °--SYMBOL: am [0/0] {6} - ¦ °--')': ) [1/0] {8} - ¦--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: am [1/0] {15} - ¦ ¦ °--SYMBOL: am [0/0] {14} - ¦ °--')': ) [1/0] {16} - ¦--expr: call( [2/0] {17} - ¦ ¦--expr: call [0/0] {19} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {18} - ¦ ¦--'(': ( [0/0] {20} - ¦ ¦--expr: am [0/1] {22} - ¦ ¦ °--SYMBOL: am [0/0] {21} - ¦ ¦--COMMENT: # com [0/0] {23} - ¦ °--')': ) [1/0] {24} - ¦--expr: call( [2/0] {25} - ¦ ¦--expr: call [0/0] {27} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {26} - ¦ ¦--'(': ( [0/0] {28} - ¦ ¦--expr: am [0/0] {30} - ¦ ¦ °--SYMBOL: am [0/0] {29} - ¦ ¦--',': , [0/1] {31} - ¦ ¦--COMMENT: # com [0/2] {32} - ¦ ¦--expr: pm [1/0] {34} - ¦ ¦ °--SYMBOL: pm [0/0] {33} - ¦ °--')': ) [1/0] {35} - ¦--expr: call( [3/0] {36} - ¦ ¦--expr: call [0/0] {38} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {37} - ¦ ¦--'(': ( [0/0] {39} - ¦ ¦--expr: b [0/0] {41} - ¦ ¦ °--SYMBOL: b [0/0] {40} - ¦ °--')': ) [1/0] {42} - ¦--expr: call( [2/0] {43} - ¦ ¦--expr: call [0/0] {45} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {44} - ¦ ¦--'(': ( [0/2] {46} - ¦ ¦--expr: a [1/0] {48} - ¦ ¦ °--SYMBOL: a [0/0] {47} - ¦ °--')': ) [1/0] {49} - ¦--expr: call( [2/0] {50} - ¦ ¦--expr: call [0/0] {52} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {51} - ¦ ¦--'(': ( [0/2] {53} - ¦ ¦--expr: a [1/1] {55} - ¦ ¦ °--SYMBOL: a [0/0] {54} - ¦ ¦--COMMENT: # b [0/0] {56} - ¦ °--')': ) [1/0] {57} - ¦--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: call( [2/0] {64} - ¦ ¦--expr: call [0/0] {66} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {65} - ¦ ¦--'(': ( [0/0] {67} - ¦ ¦--expr: a [0/1] {69} - ¦ ¦ °--SYMBOL: a [0/0] {68} - ¦ ¦--COMMENT: # b [0/0] {70} - ¦ °--')': ) [1/0] {71} - °--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: 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 deleted file mode 100644 index 0d1a9212a..000000000 --- a/tests/testthat/line_breaks_fun_call/named_arguments-in_tree +++ /dev/null @@ -1,114 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: call( [0/0] {1} - ¦ ¦--expr: call [0/0] {3} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {2} - ¦ ¦--'(': ( [0/0] {4} - ¦ ¦--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: 2 [0/0] {11} - ¦ ¦ °--NUM_CONST: 2 [0/0] {10} - ¦ ¦--',': , [0/1] {12} - ¦ ¦--expr: c [0/0] {14} - ¦ ¦ °--SYMBOL: c [0/0] {13} - ¦ °--')': ) [1/0] {15} - ¦--expr: gs(3, [2/0] {16} - ¦ ¦--expr: gs [0/0] {18} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: gs [0/0] {17} - ¦ ¦--'(': ( [0/0] {19} - ¦ ¦--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: 2 [0/0] {26} - ¦ ¦ °--NUM_CONST: 2 [0/0] {25} - ¦ ¦--',': , [0/3] {27} - ¦ ¦--expr: c [1/0] {29} - ¦ ¦ °--SYMBOL: c [0/0] {28} - ¦ °--')': ) [0/0] {30} - ¦--expr: call( [2/0] {31} - ¦ ¦--expr: call [0/0] {33} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {32} - ¦ ¦--'(': ( [0/0] {34} - ¦ ¦--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: 2 [0/0] {41} - ¦ ¦ °--NUM_CONST: 2 [0/0] {40} - ¦ ¦--',': , [0/1] {42} - ¦ ¦--expr: c [0/0] {44} - ¦ ¦ °--SYMBOL: c [0/0] {43} - ¦ °--')': ) [0/0] {45} - ¦--expr: map(d [2/0] {46} - ¦ ¦--expr: map [0/0] {48} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: map [0/0] {47} - ¦ ¦--'(': ( [0/0] {49} - ¦ ¦--expr: data [0/0] {51} - ¦ ¦ °--SYMBOL: data [0/0] {50} - ¦ ¦--',': , [0/1] {52} - ¦ ¦--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: 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: 33 [0/0] {64} - ¦ ¦ °--NUM_CONST: 33 [0/0] {63} - ¦ °--')': ) [0/0] {65} - ¦--expr: map2( [2/0] {66} - ¦ ¦--expr: map2 [0/0] {68} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: map2 [0/0] {67} - ¦ ¦--'(': ( [0/0] {69} - ¦ ¦--expr: dat1 [0/0] {71} - ¦ ¦ °--SYMBOL: dat1 [0/0] {70} - ¦ ¦--',': , [0/1] {72} - ¦ ¦--expr: data2 [0/0] {74} - ¦ ¦ °--SYMBOL: data2 [0/0] {73} - ¦ ¦--',': , [0/1] {75} - ¦ ¦--expr: fun [0/0] {77} - ¦ ¦ °--SYMBOL: fun [0/0] {76} - ¦ ¦--',': , [0/1] {78} - ¦ ¦--expr: x [0/0] {80} - ¦ ¦ °--SYMBOL: x [0/0] {79} - ¦ ¦--',': , [0/1] {81} - ¦ ¦--expr: y [0/0] {83} - ¦ ¦ °--SYMBOL: y [0/0] {82} - ¦ ¦--',': , [0/5] {84} - ¦ ¦--expr: z [1/0] {86} - ¦ ¦ °--SYMBOL: z [0/0] {85} - ¦ °--')': ) [0/0] {87} - °--expr: map2( [2/0] {88} - ¦--expr: map2 [0/0] {90} - ¦ °--SYMBOL_FUNCTION_CALL: map2 [0/0] {89} - ¦--'(': ( [0/0] {91} - ¦--expr: dat1 [0/0] {93} - ¦ °--SYMBOL: dat1 [0/0] {92} - ¦--',': , [0/1] {94} - ¦--expr: data2 [0/0] {96} - ¦ °--SYMBOL: data2 [0/0] {95} - ¦--',': , [0/1] {97} - ¦--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: 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: 2 [0/0] {109} - ¦ °--NUM_CONST: 2 [0/0] {108} - ¦--',': , [0/2] {110} - ¦--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 deleted file mode 100644 index 995abb3c5..000000000 --- a/tests/testthat/line_breaks_fun_call/switch_ifelse_etc_no_line_break-in_tree +++ /dev/null @@ -1,246 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: call( [0/0] {1} - ¦ ¦--expr: call [0/0] {3} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {2} - ¦ ¦--'(': ( [0/2] {4} - ¦ ¦--expr: 2 [1/0] {6} - ¦ ¦ °--NUM_CONST: 2 [0/0] {5} - ¦ ¦--',': , [0/2] {7} - ¦ ¦--expr: 3 [1/0] {9} - ¦ ¦ °--NUM_CONST: 3 [0/0] {8} - ¦ °--')': ) [1/0] {10} - ¦--expr: switc [2/0] {11} - ¦ ¦--expr: switc [0/0] {13} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: switc [0/0] {12} - ¦ ¦--'(': ( [0/2] {14} - ¦ ¦--expr: x [1/0] {16} - ¦ ¦ °--SYMBOL: x [0/0] {15} - ¦ ¦--',': , [0/2] {17} - ¦ ¦--SYMBOL_SUB: a [1/1] {18} - ¦ ¦--EQ_SUB: = [0/1] {19} - ¦ ¦--expr: 2 [0/0] {21} - ¦ ¦ °--NUM_CONST: 2 [0/0] {20} - ¦ ¦--',': , [0/2] {22} - ¦ ¦--SYMBOL_SUB: y [1/1] {23} - ¦ ¦--EQ_SUB: = [0/1] {24} - ¦ ¦--expr: 3 [0/0] {26} - ¦ ¦ °--NUM_CONST: 3 [0/0] {25} - ¦ °--')': ) [1/0] {27} - ¦--expr: switc [3/0] {28} - ¦ ¦--expr: switc [0/0] {30} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: switc [0/0] {29} - ¦ ¦--'(': ( [0/1] {31} - ¦ ¦--COMMENT: # [0/2] {32} - ¦ ¦--expr: x [1/0] {34} - ¦ ¦ °--SYMBOL: x [0/0] {33} - ¦ ¦--',': , [0/2] {35} - ¦ ¦--SYMBOL_SUB: a [1/1] {36} - ¦ ¦--EQ_SUB: = [0/1] {37} - ¦ ¦--expr: 2 [0/0] {39} - ¦ ¦ °--NUM_CONST: 2 [0/0] {38} - ¦ ¦--',': , [0/2] {40} - ¦ ¦--SYMBOL_SUB: y [1/1] {41} - ¦ ¦--EQ_SUB: = [0/1] {42} - ¦ ¦--expr: 3 [0/0] {44} - ¦ ¦ °--NUM_CONST: 3 [0/0] {43} - ¦ °--')': ) [1/0] {45} - ¦--expr: switc [4/0] {46} - ¦ ¦--expr: switc [0/0] {48} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: switc [0/0] {47} - ¦ ¦--'(': ( [0/2] {49} - ¦ ¦--expr: x [1/0] {51} - ¦ ¦ °--SYMBOL: x [0/0] {50} - ¦ ¦--',': , [0/2] {52} - ¦ ¦--SYMBOL_SUB: a [1/1] {53} - ¦ ¦--EQ_SUB: = [0/1] {54} - ¦ ¦--expr: 2 [0/0] {56} - ¦ ¦ °--NUM_CONST: 2 [0/0] {55} - ¦ ¦--',': , [0/1] {57} - ¦ ¦--COMMENT: # [0/2] {58} - ¦ ¦--SYMBOL_SUB: y [3/1] {59} - ¦ ¦--EQ_SUB: = [0/1] {60} - ¦ ¦--expr: 3 [0/0] {62} - ¦ ¦ °--NUM_CONST: 3 [0/0] {61} - ¦ °--')': ) [1/0] {63} - ¦--expr: switc [3/0] {64} - ¦ ¦--expr: switc [0/0] {66} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: switc [0/0] {65} - ¦ ¦--'(': ( [0/7] {67} - ¦ ¦--expr: x [1/0] {69} - ¦ ¦ °--SYMBOL: x [0/0] {68} - ¦ ¦--',': , [0/0] {70} - ¦ ¦--SYMBOL_SUB: a [0/1] {71} - ¦ ¦--EQ_SUB: = [0/1] {72} - ¦ ¦--expr: 2 [0/0] {74} - ¦ ¦ °--NUM_CONST: 2 [0/0] {73} - ¦ ¦--',': , [0/7] {75} - ¦ ¦--SYMBOL_SUB: y [1/1] {76} - ¦ ¦--EQ_SUB: = [0/1] {77} - ¦ ¦--expr: 3 [0/0] {79} - ¦ ¦ °--NUM_CONST: 3 [0/0] {78} - ¦ °--')': ) [1/0] {80} - ¦--expr: switc [2/0] {81} - ¦ ¦--expr: switc [0/0] {83} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: switc [0/0] {82} - ¦ ¦--'(': ( [0/0] {84} - ¦ ¦--expr: x [0/0] {86} - ¦ ¦ °--SYMBOL: x [0/0] {85} - ¦ ¦--',': , [0/0] {87} - ¦ ¦--SYMBOL_SUB: a [0/1] {88} - ¦ ¦--EQ_SUB: = [0/1] {89} - ¦ ¦--expr: 2 [0/0] {91} - ¦ ¦ °--NUM_CONST: 2 [0/0] {90} - ¦ ¦--',': , [0/2] {92} - ¦ ¦--SYMBOL_SUB: y [1/1] {93} - ¦ ¦--EQ_SUB: = [0/1] {94} - ¦ ¦--expr: 3 [0/0] {96} - ¦ ¦ °--NUM_CONST: 3 [0/0] {95} - ¦ °--')': ) [1/0] {97} - ¦--expr: switc [2/0] {98} - ¦ ¦--expr: switc [0/0] {100} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: switc [0/0] {99} - ¦ ¦--'(': ( [0/0] {101} - ¦ ¦--expr: x [0/0] {103} - ¦ ¦ °--SYMBOL: x [0/0] {102} - ¦ ¦--',': , [0/0] {104} - ¦ ¦--SYMBOL_SUB: a [0/1] {105} - ¦ ¦--EQ_SUB: = [0/1] {106} - ¦ ¦--expr: 2 [0/0] {108} - ¦ ¦ °--NUM_CONST: 2 [0/0] {107} - ¦ ¦--',': , [0/1] {109} - ¦ ¦--SYMBOL_SUB: y [0/1] {110} - ¦ ¦--EQ_SUB: = [0/1] {111} - ¦ ¦--expr: 3 [0/0] {113} - ¦ ¦ °--NUM_CONST: 3 [0/0] {112} - ¦ °--')': ) [0/0] {114} - ¦--expr: switc [2/1] {115} - ¦ ¦--expr: switc [0/0] {117} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: switc [0/0] {116} - ¦ ¦--'(': ( [0/0] {118} - ¦ ¦--expr: x [0/0] {120} - ¦ ¦ °--SYMBOL: x [0/0] {119} - ¦ ¦--',': , [0/0] {121} - ¦ ¦--SYMBOL_SUB: a [0/1] {122} - ¦ ¦--EQ_SUB: = [0/1] {123} - ¦ ¦--expr: 2 [0/0] {125} - ¦ ¦ °--NUM_CONST: 2 [0/0] {124} - ¦ ¦--',': , [0/1] {126} - ¦ ¦--SYMBOL_SUB: y [0/1] {127} - ¦ ¦--EQ_SUB: = [0/1] {128} - ¦ ¦--expr: 3 [0/0] {130} - ¦ ¦ °--NUM_CONST: 3 [0/0] {129} - ¦ °--')': ) [1/0] {131} - ¦--COMMENT: # [0/0] {132} - ¦--expr: switc [2/0] {133} - ¦ ¦--expr: switc [0/0] {135} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: switc [0/0] {134} - ¦ ¦--'(': ( [0/0] {136} - ¦ ¦--expr: x [0/0] {138} - ¦ ¦ °--SYMBOL: x [0/0] {137} - ¦ ¦--',': , [0/0] {139} - ¦ ¦--SYMBOL_SUB: a [0/1] {140} - ¦ ¦--EQ_SUB: = [0/1] {141} - ¦ ¦--expr: 2 [0/0] {143} - ¦ ¦ °--NUM_CONST: 2 [0/0] {142} - ¦ ¦--',': , [0/1] {144} - ¦ ¦--SYMBOL_SUB: y [0/1] {145} - ¦ ¦--EQ_SUB: = [0/1] {146} - ¦ ¦--expr: 3 [0/1] {148} - ¦ ¦ °--NUM_CONST: 3 [0/0] {147} - ¦ ¦--COMMENT: # [0/0] {149} - ¦ °--')': ) [1/0] {150} - ¦--expr: if_el [2/0] {151} - ¦ ¦--expr: if_el [0/0] {153} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: if_el [0/0] {152} - ¦ ¦--'(': ( [0/0] {154} - ¦ ¦--expr: a [0/0] {156} - ¦ ¦ °--SYMBOL: a [0/0] {155} - ¦ ¦--',': , [0/2] {157} - ¦ ¦--expr: c [1/0] {159} - ¦ ¦ °--SYMBOL: c [0/0] {158} - ¦ ¦--',': , [0/1] {160} - ¦ ¦--expr: v [0/0] {162} - ¦ ¦ °--SYMBOL: v [0/0] {161} - ¦ °--')': ) [1/0] {163} - ¦--expr: ifels [2/0] {164} - ¦ ¦--expr: ifels [0/0] {166} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: ifels [0/0] {165} - ¦ ¦--'(': ( [0/0] {167} - ¦ ¦--expr: x [0/0] {169} - ¦ ¦ °--SYMBOL: x [0/0] {168} - ¦ ¦--',': , [0/2] {170} - ¦ ¦--expr: y [1/0] {172} - ¦ ¦ °--SYMBOL: y [0/0] {171} - ¦ ¦--',': , [0/1] {173} - ¦ ¦--expr: z [0/0] {175} - ¦ ¦ °--SYMBOL: z [0/0] {174} - ¦ °--')': ) [1/0] {176} - ¦--COMMENT: # nam [3/0] {177} - ¦--expr: base: [1/0] {178} - ¦ ¦--expr: base: [0/0] {179} - ¦ ¦ ¦--SYMBOL_PACKAGE: base [0/0] {180} - ¦ ¦ ¦--NS_GET: :: [0/0] {181} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: switc [0/0] {182} - ¦ ¦--'(': ( [0/0] {183} - ¦ ¦--expr: f [0/0] {185} - ¦ ¦ °--SYMBOL: f [0/0] {184} - ¦ ¦--',': , [0/13] {186} - ¦ ¦--SYMBOL_SUB: x [1/1] {187} - ¦ ¦--EQ_SUB: = [0/1] {188} - ¦ ¦--expr: 2 [0/0] {190} - ¦ ¦ °--NUM_CONST: 2 [0/0] {189} - ¦ ¦--',': , [0/13] {191} - ¦ ¦--SYMBOL_SUB: y [1/1] {192} - ¦ ¦--EQ_SUB: = [0/1] {193} - ¦ ¦--expr: 3 [0/0] {195} - ¦ ¦ °--NUM_CONST: 3 [0/0] {194} - ¦ °--')': ) [1/0] {196} - ¦--expr: base: [2/0] {197} - ¦ ¦--expr: base: [0/0] {198} - ¦ ¦ ¦--SYMBOL_PACKAGE: base [0/0] {199} - ¦ ¦ ¦--NS_GET: :: [0/0] {200} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: switc [0/0] {201} - ¦ ¦--'(': ( [0/2] {202} - ¦ ¦--expr: f [1/0] {204} - ¦ ¦ °--SYMBOL: f [0/0] {203} - ¦ ¦--',': , [0/13] {205} - ¦ ¦--SYMBOL_SUB: x [1/1] {206} - ¦ ¦--EQ_SUB: = [0/1] {207} - ¦ ¦--expr: 2 [0/0] {209} - ¦ ¦ °--NUM_CONST: 2 [0/0] {208} - ¦ ¦--',': , [0/13] {210} - ¦ ¦--SYMBOL_SUB: y [1/1] {211} - ¦ ¦--EQ_SUB: = [0/1] {212} - ¦ ¦--expr: 3 [0/0] {214} - ¦ ¦ °--NUM_CONST: 3 [0/0] {213} - ¦ °--')': ) [1/0] {215} - ¦--expr: dplyr [2/0] {216} - ¦ ¦--expr: dplyr [0/0] {217} - ¦ ¦ ¦--SYMBOL_PACKAGE: dplyr [0/0] {218} - ¦ ¦ ¦--NS_GET: :: [0/0] {219} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: ifels [0/0] {220} - ¦ ¦--'(': ( [0/0] {221} - ¦ ¦--expr: x [0/0] {223} - ¦ ¦ °--SYMBOL: x [0/0] {222} - ¦ ¦--',': , [0/14] {224} - ¦ ¦--expr: 1 [1/0] {226} - ¦ ¦ °--NUM_CONST: 1 [0/0] {225} - ¦ ¦--',': , [0/1] {227} - ¦ ¦--expr: 32 [0/0] {229} - ¦ ¦ °--NUM_CONST: 32 [0/0] {228} - ¦ °--')': ) [1/0] {230} - °--expr: dplyr [2/0] {231} - ¦--expr: dplyr [0/0] {232} - ¦ ¦--SYMBOL_PACKAGE: dplyr [0/0] {233} - ¦ ¦--NS_GET: :: [0/0] {234} - ¦ °--SYMBOL_FUNCTION_CALL: ifels [0/0] {235} - ¦--'(': ( [0/2] {236} - ¦--expr: x [1/0] {238} - ¦ °--SYMBOL: x [0/0] {237} - ¦--',': , [0/14] {239} - ¦--expr: 1 [1/0] {241} - ¦ °--NUM_CONST: 1 [0/0] {240} - ¦--',': , [0/1] {242} - ¦--expr: 32 [0/0] {244} - ¦ °--NUM_CONST: 32 [0/0] {243} - °--')': ) [1/0] {245} diff --git a/tests/testthat/line_breaks_fun_call/switch_ifelse_etc_no_line_break-out.R b/tests/testthat/line_breaks_fun_call/switch_ifelse_etc_no_line_break-out.R index e6cfeee64..f43cd21f8 100644 --- a/tests/testthat/line_breaks_fun_call/switch_ifelse_etc_no_line_break-out.R +++ b/tests/testthat/line_breaks_fun_call/switch_ifelse_etc_no_line_break-out.R @@ -16,7 +16,6 @@ switch( # ) - switch(x, a = 2, # y = 3 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 deleted file mode 100644 index 519525676..000000000 --- a/tests/testthat/line_breaks_fun_call/token_dependent_comments-in_tree +++ /dev/null @@ -1,33 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: call( [0/0] {1} - ¦ ¦--expr: call [0/0] {3} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {2} - ¦ ¦--'(': ( [0/0] {4} - ¦ ¦--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: 3 [1/3] {11} - ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {10} - ¦ ¦ ¦--',': , [0/1] {12} - ¦ ¦ ¦--expr: 4 [0/2] {14} - ¦ ¦ ¦ °--NUM_CONST: 4 [0/0] {13} - ¦ ¦ °--')': ) [1/0] {15} - ¦ °--')': ) [0/0] {16} - °--expr: call( [2/0] {17} - ¦--expr: call [0/0] {19} - ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {18} - ¦--'(': ( [0/3] {20} - ¦--expr: call( [0/0] {21} - ¦ ¦--expr: call [0/0] {23} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {22} - ¦ ¦--'(': ( [0/0] {24} - ¦ ¦--expr: 1 [0/0] {26} - ¦ ¦ °--NUM_CONST: 1 [0/0] {25} - ¦ ¦--',': , [0/1] {27} - ¦ ¦--COMMENT: # com [0/4] {28} - ¦ ¦--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 deleted file mode 100644 index 40de220ba..000000000 --- a/tests/testthat/line_breaks_fun_call/token_dependent_complex_non_strict-in_tree +++ /dev/null @@ -1,169 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: call( [0/0] {1} - ¦ ¦--expr: call [0/0] {3} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {2} - ¦ ¦--'(': ( [0/0] {4} - ¦ ¦--expr: call( [0/0] {5} - ¦ ¦ ¦--expr: call [0/0] {7} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {6} - ¦ ¦ ¦--'(': ( [0/2] {8} - ¦ ¦ ¦--expr: 2 [1/0] {10} - ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {9} - ¦ ¦ °--')': ) [1/0] {11} - ¦ °--')': ) [0/0] {12} - ¦--expr: call( [2/0] {13} - ¦ ¦--expr: call [0/0] {15} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {14} - ¦ ¦--'(': ( [0/0] {16} - ¦ ¦--expr: call( [0/0] {17} - ¦ ¦ ¦--expr: call [0/0] {19} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {18} - ¦ ¦ ¦--'(': ( [0/0] {20} - ¦ ¦ ¦--expr: 1 [0/0] {22} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {21} - ¦ ¦ ¦--',': , [0/10] {23} - ¦ ¦ ¦--expr: 2 [1/0] {25} - ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {24} - ¦ ¦ °--')': ) [0/0] {26} - ¦ °--')': ) [0/0] {27} - ¦--COMMENT: # mul [1/0] {28} - ¦--expr: call( [1/0] {29} - ¦ ¦--expr: call [0/0] {31} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {30} - ¦ ¦--'(': ( [0/0] {32} - ¦ ¦--expr: a(b(c [0/0] {33} - ¦ ¦ ¦--expr: a [0/0] {35} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: a [0/0] {34} - ¦ ¦ ¦--'(': ( [0/0] {36} - ¦ ¦ ¦--expr: b(c({ [0/0] {37} - ¦ ¦ ¦ ¦--expr: b [0/0] {39} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: b [0/0] {38} - ¦ ¦ ¦ ¦--'(': ( [0/0] {40} - ¦ ¦ ¦ ¦--expr: c({ -} [0/0] {41} - ¦ ¦ ¦ ¦ ¦--expr: c [0/0] {43} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {42} - ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {44} - ¦ ¦ ¦ ¦ ¦--expr: { -} [0/0] {45} - ¦ ¦ ¦ ¦ ¦ ¦--'{': { [0/0] {46} - ¦ ¦ ¦ ¦ ¦ °--'}': } [1/0] {47} - ¦ ¦ ¦ ¦ °--')': ) [0/0] {48} - ¦ ¦ ¦ °--')': ) [0/0] {49} - ¦ ¦ °--')': ) [0/0] {50} - ¦ °--')': ) [0/0] {51} - ¦--expr: call( [2/0] {52} - ¦ ¦--expr: call [0/0] {54} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {53} - ¦ ¦--'(': ( [0/0] {55} - ¦ ¦--expr: call( [0/1] {56} - ¦ ¦ ¦--expr: call [0/0] {58} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {57} - ¦ ¦ ¦--'(': ( [0/2] {59} - ¦ ¦ ¦--expr: 2 [1/1] {61} - ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {60} - ¦ ¦ °--')': ) [0/0] {62} - ¦ ¦--',': , [0/2] {63} - ¦ ¦--expr: 5 [1/1] {65} - ¦ ¦ °--NUM_CONST: 5 [0/0] {64} - ¦ °--')': ) [0/0] {66} - ¦--expr: call( [3/0] {67} - ¦ ¦--expr: call [0/0] {69} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {68} - ¦ ¦--'(': ( [0/0] {70} - ¦ ¦--expr: call( [0/0] {71} - ¦ ¦ ¦--expr: call [0/0] {73} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {72} - ¦ ¦ ¦--'(': ( [0/0] {74} - ¦ ¦ ¦--expr: 1 [0/0] {76} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {75} - ¦ ¦ ¦--',': , [0/10] {77} - ¦ ¦ ¦--expr: 2 [1/0] {79} - ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {78} - ¦ ¦ ¦--',': , [0/1] {80} - ¦ ¦ ¦--expr: c( - [0/0] {81} - ¦ ¦ ¦ ¦--expr: c [0/0] {83} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {82} - ¦ ¦ ¦ ¦--'(': ( [0/12] {84} - ¦ ¦ ¦ ¦--expr: 3 [1/10] {86} - ¦ ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {85} - ¦ ¦ ¦ °--')': ) [1/0] {87} - ¦ ¦ °--')': ) [0/0] {88} - ¦ °--')': ) [0/0] {89} - ¦--expr: call( [2/0] {90} - ¦ ¦--expr: call [0/0] {92} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {91} - ¦ ¦--'(': ( [0/0] {93} - ¦ ¦--expr: 1 [0/0] {95} - ¦ ¦ °--NUM_CONST: 1 [0/0] {94} - ¦ ¦--',': , [0/5] {96} - ¦ ¦--expr: call2 [1/0] {97} - ¦ ¦ ¦--expr: call2 [0/0] {99} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call2 [0/0] {98} - ¦ ¦ ¦--'(': ( [0/0] {100} - ¦ ¦ ¦--expr: 3 [0/0] {102} - ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {101} - ¦ ¦ ¦--',': , [0/1] {103} - ¦ ¦ ¦--expr: 4 [0/0] {105} - ¦ ¦ ¦ °--NUM_CONST: 4 [0/0] {104} - ¦ ¦ ¦--',': , [0/1] {106} - ¦ ¦ ¦--expr: call( [0/5] {107} - ¦ ¦ ¦ ¦--expr: call [0/0] {109} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {108} - ¦ ¦ ¦ ¦--'(': ( [0/0] {110} - ¦ ¦ ¦ ¦--expr: 3 [0/0] {112} - ¦ ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {111} - ¦ ¦ ¦ ¦--',': , [0/22] {113} - ¦ ¦ ¦ ¦--expr: 4 [1/0] {115} - ¦ ¦ ¦ ¦ °--NUM_CONST: 4 [0/0] {114} - ¦ ¦ ¦ ¦--',': , [0/1] {116} - ¦ ¦ ¦ ¦--expr: call( [0/5] {117} - ¦ ¦ ¦ ¦ ¦--expr: call [0/0] {119} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {118} - ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {120} - ¦ ¦ ¦ ¦ ¦--expr: 5 [0/0] {122} - ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 5 [0/0] {121} - ¦ ¦ ¦ ¦ ¦--',': , [0/1] {123} - ¦ ¦ ¦ ¦ ¦--expr: 6 [0/0] {125} - ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 6 [0/0] {124} - ¦ ¦ ¦ ¦ ¦--',': , [0/1] {126} - ¦ ¦ ¦ ¦ ¦--expr: call( [0/22] {127} - ¦ ¦ ¦ ¦ ¦ ¦--expr: call [0/0] {129} - ¦ ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {128} - ¦ ¦ ¦ ¦ ¦ ¦--'(': ( [0/24] {130} - ¦ ¦ ¦ ¦ ¦ ¦--expr: 2 [1/22] {132} - ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {131} - ¦ ¦ ¦ ¦ ¦ °--')': ) [1/0] {133} - ¦ ¦ ¦ ¦ °--')': ) [1/0] {134} - ¦ ¦ ¦ °--')': ) [1/0] {135} - ¦ ¦ °--')': ) [1/0] {136} - ¦ °--')': ) [1/0] {137} - ¦--COMMENT: # com [2/0] {138} - ¦--expr: call( [2/0] {139} - ¦ ¦--expr: call [0/0] {141} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {140} - ¦ ¦--'(': ( [0/0] {142} - ¦ ¦--expr: call( [0/0] {143} - ¦ ¦ ¦--expr: call [0/0] {145} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {144} - ¦ ¦ ¦--'(': ( [0/2] {146} - ¦ ¦ ¦--expr: 2 [1/0] {148} - ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {147} - ¦ ¦ °--')': ) [1/0] {149} - ¦ °--')': ) [0/0] {150} - °--expr: call( [2/0] {151} - ¦--expr: call [0/0] {153} - ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {152} - ¦--'(': ( [0/0] {154} - ¦--expr: 1 [0/0] {156} - ¦ °--NUM_CONST: 1 [0/0] {155} - ¦--',': , [0/1] {157} - ¦--expr: call( [0/0] {158} - ¦ ¦--expr: call [0/0] {160} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {159} - ¦ ¦--'(': ( [0/2] {161} - ¦ ¦--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_non_strict-out.R b/tests/testthat/line_breaks_fun_call/token_dependent_complex_non_strict-out.R index 8ef14cf81..c4783fb6c 100644 --- a/tests/testthat/line_breaks_fun_call/token_dependent_complex_non_strict-out.R +++ b/tests/testthat/line_breaks_fun_call/token_dependent_complex_non_strict-out.R @@ -5,8 +5,7 @@ call(call( call(call(1, 2)) # multi-line: no indention based on first vall -call(a(b(c({ -})))) +call(a(b(c({})))) call(call( 2), 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 deleted file mode 100644 index 427acba96..000000000 --- a/tests/testthat/line_breaks_fun_call/token_dependent_complex_strict-in_tree +++ /dev/null @@ -1,169 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: call( [0/0] {1} - ¦ ¦--expr: call [0/0] {3} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {2} - ¦ ¦--'(': ( [0/0] {4} - ¦ ¦--expr: call( [0/0] {5} - ¦ ¦ ¦--expr: call [0/0] {7} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {6} - ¦ ¦ ¦--'(': ( [0/0] {8} - ¦ ¦ ¦--expr: 2 [1/2] {10} - ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {9} - ¦ ¦ °--')': ) [1/0] {11} - ¦ °--')': ) [0/0] {12} - ¦--expr: call( [2/0] {13} - ¦ ¦--expr: call [0/0] {15} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {14} - ¦ ¦--'(': ( [0/2] {16} - ¦ ¦--expr: call( [0/2] {17} - ¦ ¦ ¦--expr: call [0/0] {19} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {18} - ¦ ¦ ¦--'(': ( [0/0] {20} - ¦ ¦ ¦--expr: 1 [0/0] {22} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {21} - ¦ ¦ ¦--',': , [0/6] {23} - ¦ ¦ ¦--expr: 2 [1/0] {25} - ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {24} - ¦ ¦ °--')': ) [0/0] {26} - ¦ °--')': ) [0/0] {27} - ¦--COMMENT: # mul [1/0] {28} - ¦--expr: call( [1/3] {29} - ¦ ¦--expr: call [0/0] {31} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {30} - ¦ ¦--'(': ( [0/0] {32} - ¦ ¦--expr: a(b( [0/0] {33} - ¦ ¦ ¦--expr: a [0/0] {35} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: a [0/0] {34} - ¦ ¦ ¦--'(': ( [0/0] {36} - ¦ ¦ ¦--expr: b( c [0/0] {37} - ¦ ¦ ¦ ¦--expr: b [0/0] {39} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: b [0/0] {38} - ¦ ¦ ¦ ¦--'(': ( [0/2] {40} - ¦ ¦ ¦ ¦--expr: c({ - [0/0] {41} - ¦ ¦ ¦ ¦ ¦--expr: c [0/0] {43} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {42} - ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {44} - ¦ ¦ ¦ ¦ ¦--expr: { - [0/0] {45} - ¦ ¦ ¦ ¦ ¦ ¦--'{': { [0/3] {46} - ¦ ¦ ¦ ¦ ¦ °--'}': } [1/0] {47} - ¦ ¦ ¦ ¦ °--')': ) [0/0] {48} - ¦ ¦ ¦ °--')': ) [0/0] {49} - ¦ ¦ °--')': ) [0/0] {50} - ¦ °--')': ) [0/0] {51} - ¦--expr: call( [2/2] {52} - ¦ ¦--expr: call [0/0] {54} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {53} - ¦ ¦--'(': ( [0/0] {55} - ¦ ¦--expr: call( [0/1] {56} - ¦ ¦ ¦--expr: call [0/0] {58} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {57} - ¦ ¦ ¦--'(': ( [0/5] {59} - ¦ ¦ ¦--expr: 2 [1/1] {61} - ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {60} - ¦ ¦ °--')': ) [0/0] {62} - ¦ ¦--',': , [0/0] {63} - ¦ ¦--expr: 5 [1/1] {65} - ¦ ¦ °--NUM_CONST: 5 [0/0] {64} - ¦ °--')': ) [0/0] {66} - ¦--expr: call( [3/0] {67} - ¦ ¦--expr: call [0/0] {69} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {68} - ¦ ¦--'(': ( [0/0] {70} - ¦ ¦--expr: call( [0/0] {71} - ¦ ¦ ¦--expr: call [0/0] {73} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {72} - ¦ ¦ ¦--'(': ( [0/0] {74} - ¦ ¦ ¦--expr: 1 [0/0] {76} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {75} - ¦ ¦ ¦--',': , [0/14] {77} - ¦ ¦ ¦--expr: 2 [1/0] {79} - ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {78} - ¦ ¦ ¦--',': , [0/1] {80} - ¦ ¦ ¦--expr: c( - [0/0] {81} - ¦ ¦ ¦ ¦--expr: c [0/0] {83} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {82} - ¦ ¦ ¦ ¦--'(': ( [0/15] {84} - ¦ ¦ ¦ ¦--expr: 3 [1/11] {86} - ¦ ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {85} - ¦ ¦ ¦ °--')': ) [1/0] {87} - ¦ ¦ °--')': ) [0/0] {88} - ¦ °--')': ) [0/0] {89} - ¦--expr: call( [2/0] {90} - ¦ ¦--expr: call [0/0] {92} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {91} - ¦ ¦--'(': ( [0/0] {93} - ¦ ¦--expr: 1 [0/0] {95} - ¦ ¦ °--NUM_CONST: 1 [0/0] {94} - ¦ ¦--',': , [0/3] {96} - ¦ ¦--expr: call2 [1/0] {97} - ¦ ¦ ¦--expr: call2 [0/0] {99} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call2 [0/0] {98} - ¦ ¦ ¦--'(': ( [0/0] {100} - ¦ ¦ ¦--expr: 3 [0/0] {102} - ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {101} - ¦ ¦ ¦--',': , [0/1] {103} - ¦ ¦ ¦--expr: 4 [0/0] {105} - ¦ ¦ ¦ °--NUM_CONST: 4 [0/0] {104} - ¦ ¦ ¦--',': , [0/1] {106} - ¦ ¦ ¦--expr: call( [0/0] {107} - ¦ ¦ ¦ ¦--expr: call [0/0] {109} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {108} - ¦ ¦ ¦ ¦--'(': ( [0/0] {110} - ¦ ¦ ¦ ¦--expr: 3 [0/0] {112} - ¦ ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {111} - ¦ ¦ ¦ ¦--',': , [0/0] {113} - ¦ ¦ ¦ ¦--expr: 4 [1/0] {115} - ¦ ¦ ¦ ¦ °--NUM_CONST: 4 [0/0] {114} - ¦ ¦ ¦ ¦--',': , [0/1] {116} - ¦ ¦ ¦ ¦--expr: call( [0/0] {117} - ¦ ¦ ¦ ¦ ¦--expr: call [0/0] {119} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {118} - ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {120} - ¦ ¦ ¦ ¦ ¦--expr: 5 [0/0] {122} - ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 5 [0/0] {121} - ¦ ¦ ¦ ¦ ¦--',': , [0/1] {123} - ¦ ¦ ¦ ¦ ¦--expr: 6 [0/0] {125} - ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 6 [0/0] {124} - ¦ ¦ ¦ ¦ ¦--',': , [0/1] {126} - ¦ ¦ ¦ ¦ ¦--expr: call( [0/0] {127} - ¦ ¦ ¦ ¦ ¦ ¦--expr: call [0/0] {129} - ¦ ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {128} - ¦ ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {130} - ¦ ¦ ¦ ¦ ¦ ¦--expr: 2 [1/0] {132} - ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {131} - ¦ ¦ ¦ ¦ ¦ °--')': ) [1/0] {133} - ¦ ¦ ¦ ¦ °--')': ) [1/0] {134} - ¦ ¦ ¦ °--')': ) [1/0] {135} - ¦ ¦ °--')': ) [1/0] {136} - ¦ °--')': ) [1/0] {137} - ¦--COMMENT: # com [2/0] {138} - ¦--expr: call( [2/2] {139} - ¦ ¦--expr: call [0/0] {141} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {140} - ¦ ¦--'(': ( [0/0] {142} - ¦ ¦--expr: call( [0/0] {143} - ¦ ¦ ¦--expr: call [0/0] {145} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {144} - ¦ ¦ ¦--'(': ( [0/0] {146} - ¦ ¦ ¦--expr: 2 [1/0] {148} - ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {147} - ¦ ¦ °--')': ) [1/0] {149} - ¦ °--')': ) [0/0] {150} - °--expr: call( [2/0] {151} - ¦--expr: call [0/0] {153} - ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {152} - ¦--'(': ( [0/0] {154} - ¦--expr: 1 [0/0] {156} - ¦ °--NUM_CONST: 1 [0/0] {155} - ¦--',': , [0/1] {157} - ¦--expr: call( [0/0] {158} - ¦ ¦--expr: call [0/0] {160} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {159} - ¦ ¦--'(': ( [0/2] {161} - ¦ ¦--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-out.R b/tests/testthat/line_breaks_fun_call/token_dependent_complex_strict-out.R index 093fd65cf..8e0309e98 100644 --- a/tests/testthat/line_breaks_fun_call/token_dependent_complex_strict-out.R +++ b/tests/testthat/line_breaks_fun_call/token_dependent_complex_strict-out.R @@ -7,8 +7,7 @@ call(call( 2 )) # multi-line: no indention based on first vall -call(a(b(c({ -})))) +call(a(b(c({})))) call( call( 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 deleted file mode 100644 index c9c77f628..000000000 --- a/tests/testthat/line_breaks_fun_call/token_dependent_mixed-in_tree +++ /dev/null @@ -1,238 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: call( [0/0] {1} - ¦ ¦--expr: call [0/0] {3} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {2} - ¦ ¦--'(': ( [0/0] {4} - ¦ ¦--expr: call( [0/0] {5} - ¦ ¦ ¦--expr: call [0/0] {7} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {6} - ¦ ¦ ¦--'(': ( [0/0] {8} - ¦ ¦ ¦--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: call [0/0] {16} - ¦ ¦ ¦ °--SYMBOL: call [0/0] {15} - ¦ ¦ ¦--',': , [0/6] {17} - ¦ ¦ ¦--expr: 4433 [1/0] {19} - ¦ ¦ ¦ °--NUM_CONST: 4433 [0/0] {18} - ¦ ¦ ¦--',': , [0/8] {20} - ¦ ¦ ¦--expr: 55 [1/0] {22} - ¦ ¦ ¦ °--NUM_CONST: 55 [0/0] {21} - ¦ ¦ °--')': ) [0/0] {23} - ¦ °--')': ) [0/0] {24} - ¦--expr: call( [2/0] {25} - ¦ ¦--expr: call [0/0] {27} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {26} - ¦ ¦--'(': ( [0/0] {28} - ¦ ¦--expr: call( [0/0] {29} - ¦ ¦ ¦--expr: call [0/0] {31} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {30} - ¦ ¦ ¦--'(': ( [0/0] {32} - ¦ ¦ ¦--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: call [0/0] {40} - ¦ ¦ ¦ °--SYMBOL: call [0/0] {39} - ¦ ¦ ¦--',': , [0/4] {41} - ¦ ¦ ¦--expr: 4433 [1/0] {43} - ¦ ¦ ¦ °--NUM_CONST: 4433 [0/0] {42} - ¦ ¦ ¦--',': , [0/10] {44} - ¦ ¦ ¦--expr: 55 [1/0] {46} - ¦ ¦ ¦ °--NUM_CONST: 55 [0/0] {45} - ¦ ¦ °--')': ) [1/0] {47} - ¦ °--')': ) [0/0] {48} - ¦--expr: call( [1/0] {49} - ¦ ¦--expr: call [0/0] {51} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {50} - ¦ ¦--'(': ( [0/0] {52} - ¦ ¦--expr: call( [0/0] {53} - ¦ ¦ ¦--expr: call [0/0] {55} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {54} - ¦ ¦ ¦--'(': ( [0/0] {56} - ¦ ¦ ¦--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: call [0/0] {64} - ¦ ¦ ¦ °--SYMBOL: call [0/0] {63} - ¦ ¦ ¦--',': , [0/13] {65} - ¦ ¦ ¦--expr: 4433 [1/0] {67} - ¦ ¦ ¦ °--NUM_CONST: 4433 [0/0] {66} - ¦ ¦ ¦--',': , [0/10] {68} - ¦ ¦ ¦--expr: 55 [1/0] {70} - ¦ ¦ ¦ °--NUM_CONST: 55 [0/0] {69} - ¦ ¦ °--')': ) [0/0] {71} - ¦ °--')': ) [1/0] {72} - ¦--COMMENT: # no [4/0] {73} - ¦--expr: call( [1/0] {74} - ¦ ¦--expr: call [0/0] {76} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {75} - ¦ ¦--'(': ( [0/0] {77} - ¦ ¦--expr: call( [0/0] {78} - ¦ ¦ ¦--expr: call [0/0] {80} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {79} - ¦ ¦ ¦--'(': ( [0/2] {81} - ¦ ¦ ¦--expr: 3 [1/0] {83} - ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {82} - ¦ ¦ ¦--',': , [0/1] {84} - ¦ ¦ ¦--expr: 4 [0/0] {86} - ¦ ¦ ¦ °--NUM_CONST: 4 [0/0] {85} - ¦ ¦ °--')': ) [1/0] {87} - ¦ °--')': ) [0/0] {88} - ¦--expr: call( [3/0] {89} - ¦ ¦--expr: call [0/0] {91} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {90} - ¦ ¦--'(': ( [0/0] {92} - ¦ ¦--expr: 3 [0/4] {94} - ¦ ¦ °--NUM_CONST: 3 [0/0] {93} - ¦ ¦--',': , [0/5] {95} - ¦ ¦--expr: 3 [1/0] {97} - ¦ ¦ °--NUM_CONST: 3 [0/0] {96} - ¦ °--')': ) [1/0] {98} - ¦--expr: call( [3/0] {99} - ¦ ¦--expr: call [0/0] {101} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {100} - ¦ ¦--'(': ( [0/0] {102} - ¦ ¦--expr: call( [0/0] {103} - ¦ ¦ ¦--expr: call [0/0] {105} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {104} - ¦ ¦ ¦--'(': ( [0/0] {106} - ¦ ¦ ¦--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: call [0/0] {114} - ¦ ¦ ¦ °--SYMBOL: call [0/0] {113} - ¦ ¦ ¦--',': , [0/4] {115} - ¦ ¦ ¦--expr: 44 [1/0] {117} - ¦ ¦ ¦ °--NUM_CONST: 44 [0/0] {116} - ¦ ¦ ¦--',': , [0/4] {118} - ¦ ¦ ¦--expr: 55 [1/0] {120} - ¦ ¦ ¦ °--NUM_CONST: 55 [0/0] {119} - ¦ ¦ °--')': ) [1/0] {121} - ¦ °--')': ) [0/0] {122} - ¦--COMMENT: # [2/0] {123} - ¦--expr: call( [2/0] {124} - ¦ ¦--expr: call [0/0] {126} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {125} - ¦ ¦--'(': ( [0/0] {127} - ¦ ¦--expr: call [0/0] {129} - ¦ ¦ °--SYMBOL: call [0/0] {128} - ¦ ¦--',': , [0/0] {130} - ¦ ¦--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: 3 [1/0] {138} - ¦ ¦ °--NUM_CONST: 3 [0/0] {137} - ¦ ¦--',': , [0/5] {139} - ¦ ¦--expr: 4 [1/0] {141} - ¦ ¦ °--NUM_CONST: 4 [0/0] {140} - ¦ °--')': ) [1/0] {142} - ¦--expr: call( [2/0] {143} - ¦ ¦--expr: call [0/0] {145} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {144} - ¦ ¦--'(': ( [0/0] {146} - ¦ ¦--expr: call( [0/0] {147} - ¦ ¦ ¦--expr: call [0/0] {149} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {148} - ¦ ¦ ¦--'(': ( [0/3] {150} - ¦ ¦ ¦--expr: 3 [1/3] {152} - ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {151} - ¦ ¦ ¦--',': , [0/1] {153} - ¦ ¦ ¦--expr: 4 [0/0] {155} - ¦ ¦ ¦ °--NUM_CONST: 4 [0/0] {154} - ¦ ¦ °--')': ) [1/0] {156} - ¦ °--')': ) [0/0] {157} - ¦--expr: call( [2/0] {158} - ¦ ¦--expr: call [0/0] {160} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {159} - ¦ ¦--'(': ( [0/0] {161} - ¦ ¦--expr: call( [0/0] {162} - ¦ ¦ ¦--expr: call [0/0] {164} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {163} - ¦ ¦ ¦--'(': ( [0/0] {165} - ¦ ¦ ¦--expr: 1 [0/0] {167} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {166} - ¦ ¦ ¦--',': , [0/6] {168} - ¦ ¦ ¦--expr: 3 [1/0] {170} - ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {169} - ¦ ¦ °--')': ) [1/0] {171} - ¦ °--')': ) [0/0] {172} - ¦--COMMENT: # if [2/2] {173} - ¦--expr: call( [3/0] {174} - ¦ ¦--expr: call [0/0] {176} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {175} - ¦ ¦--'(': ( [0/0] {177} - ¦ ¦--expr: 2 [1/2] {179} - ¦ ¦ °--NUM_CONST: 2 [0/0] {178} - ¦ °--')': ) [1/0] {180} - ¦--expr: cjald [1/0] {181} - ¦ ¦--expr: cjald [0/0] {183} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: cjald [0/0] {182} - ¦ ¦--'(': ( [0/0] {184} - ¦ ¦--expr: 1 [0/0] {186} - ¦ ¦ °--NUM_CONST: 1 [0/0] {185} - ¦ ¦--',': , [0/11] {187} - ¦ ¦--expr: 3 [1/0] {189} - ¦ ¦ °--NUM_CONST: 3 [0/0] {188} - ¦ °--')': ) [0/0] {190} - ¦--expr: jclak [2/2] {191} - ¦ ¦--expr: jclak [0/0] {193} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: jclak [0/0] {192} - ¦ ¦--'(': ( [0/2] {194} - ¦ ¦--expr: call( [0/0] {195} - ¦ ¦ ¦--expr: call [0/0] {197} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {196} - ¦ ¦ ¦--'(': ( [0/0] {198} - ¦ ¦ ¦--expr: call( [0/0] {199} - ¦ ¦ ¦ ¦--expr: call [0/0] {201} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {200} - ¦ ¦ ¦ ¦--'(': ( [0/0] {202} - ¦ ¦ ¦ ¦--expr: 2 [0/2] {204} - ¦ ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {203} - ¦ ¦ ¦ ¦--',': , [0/15] {205} - ¦ ¦ ¦ ¦--expr: 4 [1/0] {207} - ¦ ¦ ¦ ¦ °--NUM_CONST: 4 [0/0] {206} - ¦ ¦ ¦ °--')': ) [0/0] {208} - ¦ ¦ °--')': ) [0/0] {209} - ¦ °--')': ) [0/0] {210} - ¦--expr: fjadl [1/0] {211} - ¦ ¦--expr: fjadl [0/0] {213} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: fjadl [0/0] {212} - ¦ ¦--'(': ( [0/0] {214} - ¦ ¦--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 [1/0] {222} - ¦ ¦ °--NUM_CONST: 1 [0/0] {221} - ¦ °--')': ) [0/0] {223} - °--expr: test_ [3/0] {224} - ¦--expr: test_ [0/0] {226} - ¦ °--SYMBOL_FUNCTION_CALL: test_ [0/0] {225} - ¦--'(': ( [0/0] {227} - ¦--expr: "hi" [0/0] {229} - ¦ °--STR_CONST: "hi" [0/0] {228} - ¦--',': , [0/1] {230} - ¦--expr: { -"th [0/0] {231} - ¦ ¦--'{': { [0/0] {232} - ¦ ¦--expr: "ther [1/2] {234} - ¦ ¦ °--STR_CONST: "ther [0/0] {233} - ¦ °--'}': } [1/0] {235} - °--')': ) [0/0] {236} diff --git a/tests/testthat/line_breaks_fun_call/token_dependent_mixed-out.R b/tests/testthat/line_breaks_fun_call/token_dependent_mixed-out.R index d588f1ff0..1bd68278f 100644 --- a/tests/testthat/line_breaks_fun_call/token_dependent_mixed-out.R +++ b/tests/testthat/line_breaks_fun_call/token_dependent_mixed-out.R @@ -16,7 +16,6 @@ call(call( )) - # no more barcket on same line -> call(call( 3, 4 diff --git a/tests/testthat/line_breaks_fun_call/unindent-in_tree b/tests/testthat/line_breaks_fun_call/unindent-in_tree deleted file mode 100644 index 70fd2a441..000000000 --- a/tests/testthat/line_breaks_fun_call/unindent-in_tree +++ /dev/null @@ -1,72 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: test_ [0/0] {1} - ¦ ¦--expr: test_ [0/0] {3} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: test_ [0/0] {2} - ¦ ¦--'(': ( [0/0] {4} - ¦ ¦--expr: key( - [0/0] {5} - ¦ ¦ ¦--expr: key [0/0] {7} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: key [0/0] {6} - ¦ ¦ ¦--'(': ( [0/2] {8} - ¦ ¦ ¦--expr: s [1/0] {10} - ¦ ¦ ¦ °--SYMBOL: s [0/0] {9} - ¦ ¦ °--')': ) [0/0] {11} - ¦ ¦--',': , [0/0] {12} - ¦ ¦--SYMBOL_SUB: x [0/1] {13} - ¦ ¦--EQ_SUB: = [0/1] {14} - ¦ ¦--expr: 1 [0/0] {16} - ¦ ¦ °--NUM_CONST: 1 [0/0] {15} - ¦ °--')': ) [0/0] {17} - ¦--expr: test_ [2/0] {18} - ¦ ¦--expr: test_ [0/0] {20} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: test_ [0/0] {19} - ¦ ¦--'(': ( [0/0] {21} - ¦ ¦--expr: key( - [0/0] {22} - ¦ ¦ ¦--expr: key [0/0] {24} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: key [0/0] {23} - ¦ ¦ ¦--'(': ( [0/2] {25} - ¦ ¦ ¦--expr: s [1/0] {27} - ¦ ¦ ¦ °--SYMBOL: s [0/0] {26} - ¦ ¦ °--')': ) [0/0] {28} - ¦ ¦--',': , [0/2] {29} - ¦ ¦--SYMBOL_SUB: x [1/1] {30} - ¦ ¦--EQ_SUB: = [0/1] {31} - ¦ ¦--expr: 1 [0/0] {33} - ¦ ¦ °--NUM_CONST: 1 [0/0] {32} - ¦ °--')': ) [1/0] {34} - ¦--expr: test_ [3/0] {35} - ¦ ¦--expr: test_ [0/0] {37} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: test_ [0/0] {36} - ¦ ¦--'(': ( [0/0] {38} - ¦ ¦--expr: key( - [0/0] {39} - ¦ ¦ ¦--expr: key [0/0] {41} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: key [0/0] {40} - ¦ ¦ ¦--'(': ( [0/2] {42} - ¦ ¦ ¦--expr: s [1/0] {44} - ¦ ¦ ¦ °--SYMBOL: s [0/0] {43} - ¦ ¦ °--')': ) [0/0] {45} - ¦ ¦--',': , [0/0] {46} - ¦ ¦--SYMBOL_SUB: x [0/1] {47} - ¦ ¦--EQ_SUB: = [0/1] {48} - ¦ ¦--expr: 1 [0/0] {50} - ¦ ¦ °--NUM_CONST: 1 [0/0] {49} - ¦ °--')': ) [1/0] {51} - °--expr: test_ [3/0] {52} - ¦--expr: test_ [0/0] {54} - ¦ °--SYMBOL_FUNCTION_CALL: test_ [0/0] {53} - ¦--'(': ( [0/2] {55} - ¦--expr: key(s [1/0] {56} - ¦ ¦--expr: key [0/0] {58} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: key [0/0] {57} - ¦ ¦--'(': ( [0/0] {59} - ¦ ¦--expr: s [0/0] {61} - ¦ ¦ °--SYMBOL: s [0/0] {60} - ¦ °--')': ) [0/0] {62} - ¦--',': , [0/0] {63} - ¦--SYMBOL_SUB: x [0/1] {64} - ¦--EQ_SUB: = [0/1] {65} - ¦--expr: 1 [0/0] {67} - ¦ °--NUM_CONST: 1 [0/0] {66} - °--')': ) [0/0] {68} diff --git a/tests/testthat/line_breaks_top_level_exprs/braces-in.R b/tests/testthat/line_breaks_top_level_exprs/braces-in.R new file mode 100644 index 000000000..d504e6413 --- /dev/null +++ b/tests/testthat/line_breaks_top_level_exprs/braces-in.R @@ -0,0 +1,16 @@ +{ + 1 + 1 +} + + + + + +### some comment + + + + +{ + NULL +} diff --git a/tests/testthat/line_breaks_top_level_exprs/braces-out.R b/tests/testthat/line_breaks_top_level_exprs/braces-out.R new file mode 100644 index 000000000..9fd7a480d --- /dev/null +++ b/tests/testthat/line_breaks_top_level_exprs/braces-out.R @@ -0,0 +1,11 @@ +{ + 1 + 1 +} + + +### some comment + + +{ + NULL +} diff --git a/tests/testthat/line_breaks_top_level_exprs/conditionals-in.R b/tests/testthat/line_breaks_top_level_exprs/conditionals-in.R new file mode 100644 index 000000000..37e07e57f --- /dev/null +++ b/tests/testthat/line_breaks_top_level_exprs/conditionals-in.R @@ -0,0 +1,20 @@ +for (i in 1:10) {} + + + + + + +# some comment + + + + + +while (TRUE) {} + + + + +# some comment +if (TRUE) NULL diff --git a/tests/testthat/line_breaks_top_level_exprs/conditionals-out.R b/tests/testthat/line_breaks_top_level_exprs/conditionals-out.R new file mode 100644 index 000000000..54104e290 --- /dev/null +++ b/tests/testthat/line_breaks_top_level_exprs/conditionals-out.R @@ -0,0 +1,11 @@ +for (i in 1:10) {} + + +# some comment + + +while (TRUE) {} + + +# some comment +if (TRUE) NULL diff --git a/tests/testthat/line_breaks_top_level_exprs/function_defs_and_calls-in.R b/tests/testthat/line_breaks_top_level_exprs/function_defs_and_calls-in.R new file mode 100644 index 000000000..4a18af903 --- /dev/null +++ b/tests/testthat/line_breaks_top_level_exprs/function_defs_and_calls-in.R @@ -0,0 +1,23 @@ +f <- function() NULL + + + + + + + + +g <- function() NULL + + + + +f() + +# comment + + + + + +g() diff --git a/tests/testthat/line_breaks_top_level_exprs/function_defs_and_calls-out.R b/tests/testthat/line_breaks_top_level_exprs/function_defs_and_calls-out.R new file mode 100644 index 000000000..741c47309 --- /dev/null +++ b/tests/testthat/line_breaks_top_level_exprs/function_defs_and_calls-out.R @@ -0,0 +1,12 @@ +f <- function() NULL + + +g <- function() NULL + + +f() + +# comment + + +g() diff --git a/tests/testthat/line_breaks_top_level_exprs/non_strict-in.R b/tests/testthat/line_breaks_top_level_exprs/non_strict-in.R new file mode 100644 index 000000000..4a18af903 --- /dev/null +++ b/tests/testthat/line_breaks_top_level_exprs/non_strict-in.R @@ -0,0 +1,23 @@ +f <- function() NULL + + + + + + + + +g <- function() NULL + + + + +f() + +# comment + + + + + +g() diff --git a/tests/testthat/line_breaks_top_level_exprs/non_strict-out.R b/tests/testthat/line_breaks_top_level_exprs/non_strict-out.R new file mode 100644 index 000000000..4a18af903 --- /dev/null +++ b/tests/testthat/line_breaks_top_level_exprs/non_strict-out.R @@ -0,0 +1,23 @@ +f <- function() NULL + + + + + + + + +g <- function() NULL + + + + +f() + +# comment + + + + + +g() diff --git a/tests/testthat/line_breaks_top_level_exprs/piped_chains-in.R b/tests/testthat/line_breaks_top_level_exprs/piped_chains-in.R new file mode 100644 index 000000000..75a3abee2 --- /dev/null +++ b/tests/testthat/line_breaks_top_level_exprs/piped_chains-in.R @@ -0,0 +1,21 @@ + + +f %>% g() + + + + + + +h %>% i() + + + + + +# some comment + + + + +j %>% k() diff --git a/tests/testthat/line_breaks_top_level_exprs/piped_chains-out.R b/tests/testthat/line_breaks_top_level_exprs/piped_chains-out.R new file mode 100644 index 000000000..b424cbba1 --- /dev/null +++ b/tests/testthat/line_breaks_top_level_exprs/piped_chains-out.R @@ -0,0 +1,10 @@ +f %>% g() + + +h %>% i() + + +# some comment + + +j %>% k() 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 deleted file mode 100644 index 306fef807..000000000 --- a/tests/testthat/math_token_spacing/non_strict_math_spacing_all-in_tree +++ /dev/null @@ -1,23 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: 1++1 [0/0] {1} - ¦--expr: 1 [0/0] {4} - ¦ °--NUM_CONST: 1 [0/0] {3} - ¦--'+': + [0/0] {5} - ¦--expr: +1 [0/3] {6} - ¦ ¦--'+': + [0/0] {7} - ¦ °--expr: 1 [0/0] {9} - ¦ °--NUM_CONST: 1 [0/0] {8} - ¦--'-': - [0/7] {10} - °--expr: 3 / 2 [0/0] {11} - ¦--expr: 3 [0/1] {14} - ¦ °--NUM_CONST: 3 [0/0] {13} - ¦--'/': / [0/1] {15} - ¦--expr: 23 [0/1] {17} - ¦ °--NUM_CONST: 23 [0/0] {16} - ¦--'*': * [0/1] {18} - °--expr: 3 ^4 [0/0] {19} - ¦--expr: 3 [0/1] {21} - ¦ °--NUM_CONST: 3 [0/0] {20} - ¦--'^': ^ [0/0] {22} - °--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 deleted file mode 100644 index 1925476a7..000000000 --- a/tests/testthat/math_token_spacing/strict_math_spacing_all-in_tree +++ /dev/null @@ -1,23 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: 1 ++ [0/0] {1} - ¦--expr: 1 [0/1] {4} - ¦ °--NUM_CONST: 1 [0/0] {3} - ¦--'+': + [0/0] {5} - ¦--expr: + 1 [0/1] {6} - ¦ ¦--'+': + [0/1] {7} - ¦ °--expr: 1 [0/0] {9} - ¦ °--NUM_CONST: 1 [0/0] {8} - ¦--'-': - [0/1] {10} - °--expr: 3 / [0/0] {11} - ¦--expr: 3 [0/1] {14} - ¦ °--NUM_CONST: 3 [0/0] {13} - ¦--'/': / [0/7] {15} - ¦--expr: 23 [0/0] {17} - ¦ °--NUM_CONST: 23 [0/0] {16} - ¦--'*': * [0/1] {18} - °--expr: 3^ 4 [0/0] {19} - ¦--expr: 3 [0/0] {21} - ¦ °--NUM_CONST: 3 [0/0] {20} - ¦--'^': ^ [0/1] {22} - °--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 deleted file mode 100644 index d82f157ca..000000000 --- a/tests/testthat/math_token_spacing/strict_math_spacing_zero_all_but_power-in_tree +++ /dev/null @@ -1,23 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: 1++1- [0/0] {1} - ¦--expr: 1 [0/0] {4} - ¦ °--NUM_CONST: 1 [0/0] {3} - ¦--'+': + [0/0] {5} - ¦--expr: +1 [0/0] {6} - ¦ ¦--'+': + [0/0] {7} - ¦ °--expr: 1 [0/0] {9} - ¦ °--NUM_CONST: 1 [0/0] {8} - ¦--'-': - [0/0] {10} - °--expr: 3/23* [0/0] {11} - ¦--expr: 3 [0/0] {14} - ¦ °--NUM_CONST: 3 [0/0] {13} - ¦--'/': / [0/0] {15} - ¦--expr: 23 [0/0] {17} - ¦ °--NUM_CONST: 23 [0/0] {16} - ¦--'*': * [0/0] {18} - °--expr: 3^4 [0/0] {19} - ¦--expr: 3 [0/0] {21} - ¦ °--NUM_CONST: 3 [0/0] {20} - ¦--'^': ^ [0/0] {22} - °--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 deleted file mode 100644 index c9e38aa79..000000000 --- a/tests/testthat/math_token_spacing/strict_math_spacing_zero_plus-in_tree +++ /dev/null @@ -1,23 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: 1+ + [0/0] {1} - ¦--expr: 1 [0/0] {4} - ¦ °--NUM_CONST: 1 [0/0] {3} - ¦--'+': + [0/2] {5} - ¦--expr: +1 [0/0] {6} - ¦ ¦--'+': + [0/0] {7} - ¦ °--expr: 1 [0/0] {9} - ¦ °--NUM_CONST: 1 [0/0] {8} - ¦--'-': - [0/1] {10} - °--expr: 3 / [0/0] {11} - ¦--expr: 3 [0/3] {14} - ¦ °--NUM_CONST: 3 [0/0] {13} - ¦--'/': / [0/0] {15} - ¦--expr: 23 [0/0] {17} - ¦ °--NUM_CONST: 23 [0/0] {16} - ¦--'*': * [0/1] {18} - °--expr: 3^ 4 [0/0] {19} - ¦--expr: 3 [0/0] {21} - ¦ °--NUM_CONST: 3 [0/0] {20} - ¦--'^': ^ [0/1] {22} - °--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 deleted file mode 100644 index 4f556c36b..000000000 --- a/tests/testthat/multiple_expressions/three_complex_expr-in_tree +++ /dev/null @@ -1,23 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: x [0/0] {2} - ¦ °--SYMBOL: x [0/0] {1} - ¦--expr: 1+1 [1/0] {3} - ¦ ¦--expr: 1 [0/0] {5} - ¦ ¦ °--NUM_CONST: 1 [0/0] {4} - ¦ ¦--'+': + [0/0] {6} - ¦ °--expr: 1 [0/0] {8} - ¦ °--NUM_CONST: 1 [0/0] {7} - °--expr: y + ( [1/0] {9} - ¦--expr: y [0/1] {11} - ¦ °--SYMBOL: y [0/0] {10} - ¦--'+': + [0/1] {12} - °--expr: ( -2* [0/0] {13} - ¦--'(': ( [0/0] {14} - ¦--expr: 2* z [1/0] {15} - ¦ ¦--expr: 2 [0/0] {17} - ¦ ¦ °--NUM_CONST: 2 [0/0] {16} - ¦ ¦--'*': * [0/1] {18} - ¦ °--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 deleted file mode 100644 index 57159da53..000000000 --- a/tests/testthat/multiple_expressions/two_simple_expr-in_tree +++ /dev/null @@ -1,5 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: a [0/0] {2} - ¦ °--SYMBOL: a [0/0] {1} - °--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 deleted file mode 100644 index 4e6dc6302..000000000 --- a/tests/testthat/parse_comments/eol_eof_spaces-in_tree +++ /dev/null @@ -1,5 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: # com [0/0] {1} - ¦--COMMENT: #' sp [1/0] {2} - °--expr: a [1/0] {4} - °--SYMBOL: a [0/0] {3} diff --git a/tests/testthat/parse_comments/just_comments-in_tree b/tests/testthat/parse_comments/just_comments-in_tree deleted file mode 100644 index f33f18c62..000000000 --- a/tests/testthat/parse_comments/just_comments-in_tree +++ /dev/null @@ -1,5 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: # A c [0/0] {1} - ¦--COMMENT: #' A [1/0] {2} - ¦--COMMENT: #' [1/0] {3} - °--COMMENT: # som [3/0] {4} diff --git a/tests/testthat/parse_comments/mixed-in_tree b/tests/testthat/parse_comments/mixed-in_tree deleted file mode 100644 index 5168b8f66..000000000 --- a/tests/testthat/parse_comments/mixed-in_tree +++ /dev/null @@ -1,35 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: # A f [0/0] {1} - °--expr: a <- [1/0] {2} - ¦--expr: a [0/1] {4} - ¦ °--SYMBOL: a [0/0] {3} - ¦--LEFT_ASSIGN: <- [0/1] {5} - °--expr: funct [0/0] {6} - ¦--FUNCTION: funct [0/0] {7} - ¦--'(': ( [0/0] {8} - ¦--SYMBOL_FORMALS: x [0/0] {9} - ¦--',': , [0/1] {10} - ¦--SYMBOL_FORMALS: y [0/0] {11} - ¦--',': , [0/1] {12} - ¦--SYMBOL_FORMALS: z [0/0] {13} - ¦--')': ) [0/1] {14} - °--expr: { -if [0/0] {15} - ¦--'{': { [0/0] {16} - ¦--expr: if (1 [1/0] {17} - ¦ ¦--IF: if [0/1] {18} - ¦ ¦--'(': ( [0/0] {19} - ¦ ¦--expr: 1>10 [0/0] {20} - ¦ ¦ ¦--expr: 1 [0/0] {22} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {21} - ¦ ¦ ¦--GT: > [0/0] {23} - ¦ ¦ °--expr: 10 [0/0] {25} - ¦ ¦ °--NUM_CONST: 10 [0/0] {24} - ¦ ¦--')': ) [0/1] {26} - ¦ °--expr: { -# t [0/0] {27} - ¦ ¦--'{': { [0/0] {28} - ¦ ¦--COMMENT: # thi [1/0] {29} - ¦ °--'}': } [1/0] {30} - ¦--COMMENT: #' an [1/0] {31} - °--'}': } [1/0] {32} diff --git a/tests/testthat/parse_comments/output-prefix-in_tree b/tests/testthat/parse_comments/output-prefix-in_tree deleted file mode 100644 index a6c124e96..000000000 --- a/tests/testthat/parse_comments/output-prefix-in_tree +++ /dev/null @@ -1,19 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: this( [0/0] {1} - ¦ ¦--expr: this [0/0] {3} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: this [0/0] {2} - ¦ ¦--'(': ( [0/0] {4} - ¦ °--')': ) [0/0] {5} - ¦--COMMENT: #> is [1/0] {6} - ¦--expr: this( [3/1] {7} - ¦ ¦--expr: this [0/0] {9} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: this [0/0] {8} - ¦ ¦--'(': ( [0/0] {10} - ¦ °--')': ) [0/0] {11} - ¦--COMMENT: #> is [0/0] {12} - ¦--expr: this( [2/0] {13} - ¦ ¦--expr: this [0/0] {15} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: this [0/0] {14} - ¦ ¦--'(': ( [0/0] {16} - ¦ °--')': ) [0/0] {17} - °--COMMENT: # > n [1/0] {18} diff --git a/tests/testthat/parse_comments/rplumber-in_tree b/tests/testthat/parse_comments/rplumber-in_tree deleted file mode 100644 index 8faf0b7a9..000000000 --- a/tests/testthat/parse_comments/rplumber-in_tree +++ /dev/null @@ -1,69 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: # myf [0/0] {1} - ¦--COMMENT: #* @g [2/0] {2} - ¦--expr: norma [1/0] {3} - ¦ ¦--expr: norma [0/1] {5} - ¦ ¦ °--SYMBOL: norma [0/0] {4} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {6} - ¦ °--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: 10 [0/0] {13} - ¦ ¦ °--NUM_CONST: 10 [0/0] {12} - ¦ ¦--')': ) [0/1] {14} - ¦ °--expr: { - d [0/0] {15} - ¦ ¦--'{': { [0/2] {16} - ¦ ¦--expr: data [1/2] {17} - ¦ ¦ ¦--expr: data [0/1] {19} - ¦ ¦ ¦ °--SYMBOL: data [0/0] {18} - ¦ ¦ ¦--LEFT_ASSIGN: <- [0/1] {20} - ¦ ¦ °--expr: rnorm [0/0] {21} - ¦ ¦ ¦--expr: rnorm [0/0] {23} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: rnorm [0/0] {22} - ¦ ¦ ¦--'(': ( [0/0] {24} - ¦ ¦ ¦--expr: sampl [0/0] {26} - ¦ ¦ ¦ °--SYMBOL: sampl [0/0] {25} - ¦ ¦ °--')': ) [0/0] {27} - ¦ ¦--expr: mean( [1/0] {28} - ¦ ¦ ¦--expr: mean [0/0] {30} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: mean [0/0] {29} - ¦ ¦ ¦--'(': ( [0/0] {31} - ¦ ¦ ¦--expr: data [0/0] {33} - ¦ ¦ ¦ °--SYMBOL: data [0/0] {32} - ¦ ¦ °--')': ) [0/0] {34} - ¦ °--'}': } [1/0] {35} - ¦--COMMENT: #* @p [2/0] {36} - °--expr: addTw [1/0] {37} - ¦--expr: addTw [0/1] {39} - ¦ °--SYMBOL: addTw [0/0] {38} - ¦--LEFT_ASSIGN: <- [0/1] {40} - °--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: { - a [0/0] {48} - ¦--'{': { [0/2] {49} - ¦--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: a [0/0] {56} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {55} - ¦ ¦ °--')': ) [0/0] {57} - ¦ ¦--'+': + [0/1] {58} - ¦ °--expr: as.nu [0/0] {59} - ¦ ¦--expr: as.nu [0/0] {61} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: as.nu [0/0] {60} - ¦ ¦--'(': ( [0/0] {62} - ¦ ¦--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 deleted file mode 100644 index 39bb6c0ca..000000000 --- a/tests/testthat/parse_comments/shebang_1-in_tree +++ /dev/null @@ -1,24 +0,0 @@ -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: a <- [1/0] {4} - ¦ ¦--expr: a [0/1] {6} - ¦ ¦ °--SYMBOL: a [0/0] {5} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {7} - ¦ °--expr: 3 [0/0] {9} - ¦ °--NUM_CONST: 3 [0/0] {8} - ¦--COMMENT: #!/us [2/0] {10} - ¦--expr: dd <- [1/0] {11} - ¦ ¦--expr: dd [0/1] {13} - ¦ ¦ °--SYMBOL: dd [0/0] {12} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {14} - ¦ °--expr: 33 [0/0] {16} - ¦ °--NUM_CONST: 33 [0/0] {15} - ¦--COMMENT: #!/us [1/0] {17} - ¦--expr: c() [1/0] {18} - ¦ ¦--expr: c [0/0] {20} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {19} - ¦ ¦--'(': ( [0/0] {21} - ¦ °--')': ) [0/0] {22} - °--COMMENT: #!NEE [1/0] {23} diff --git a/tests/testthat/parse_comments/shebang_2-in_tree b/tests/testthat/parse_comments/shebang_2-in_tree deleted file mode 100644 index dafbcf6ac..000000000 --- a/tests/testthat/parse_comments/shebang_2-in_tree +++ /dev/null @@ -1,23 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: #!/us [0/0] {1} - ¦--COMMENT: #!/us [1/0] {2} - ¦--expr: a <- [1/0] {3} - ¦ ¦--expr: a [0/1] {5} - ¦ ¦ °--SYMBOL: a [0/0] {4} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {6} - ¦ °--expr: 3 [0/0] {8} - ¦ °--NUM_CONST: 3 [0/0] {7} - ¦--COMMENT: #!/us [2/0] {9} - ¦--expr: dd <- [1/0] {10} - ¦ ¦--expr: dd [0/1] {12} - ¦ ¦ °--SYMBOL: dd [0/0] {11} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {13} - ¦ °--expr: 33 [0/0] {15} - ¦ °--NUM_CONST: 33 [0/0] {14} - ¦--COMMENT: #!/us [1/0] {16} - ¦--expr: c() [1/0] {17} - ¦ ¦--expr: c [0/0] {19} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {18} - ¦ ¦--'(': ( [0/0] {20} - ¦ °--')': ) [0/0] {21} - °--COMMENT: #!NEE [1/0] {22} diff --git a/tests/testthat/parse_comments/spinning_code_chunk_headers-in_tree b/tests/testthat/parse_comments/spinning_code_chunk_headers-in_tree deleted file mode 100644 index 82e47c6a4..000000000 --- a/tests/testthat/parse_comments/spinning_code_chunk_headers-in_tree +++ /dev/null @@ -1,30 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: #A co [0/0] {1} - ¦--expr: a <- [1/0] {2} - ¦ ¦--expr: a [0/1] {4} - ¦ ¦ °--SYMBOL: a [0/0] {3} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {5} - ¦ °--expr: funct [0/0] {6} - ¦ ¦--FUNCTION: funct [0/0] {7} - ¦ ¦--'(': ( [0/0] {8} - ¦ ¦--')': ) [0/1] {9} - ¦ °--expr: { - -} [0/0] {10} - ¦ ¦--'{': { [0/0] {11} - ¦ °--'}': } [2/0] {12} - ¦--COMMENT: #+ ch [2/0] {13} - ¦--expr: "chun [1/0] {15} - ¦ °--STR_CONST: "chun [0/0] {14} - ¦--COMMENT: #- ch [2/0] {16} - ¦--expr: call( [1/0] {17} - ¦ ¦--expr: call [0/0] {19} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {18} - ¦ ¦--'(': ( [0/0] {20} - ¦ ¦--expr: 2 [0/0] {22} - ¦ ¦ °--NUM_CONST: 2 [0/0] {21} - ¦ ¦--',': , [0/1] {23} - ¦ ¦--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/spinning_code_chunk_headers-out.R b/tests/testthat/parse_comments/spinning_code_chunk_headers-out.R index 88ab28999..743269425 100644 --- a/tests/testthat/parse_comments/spinning_code_chunk_headers-out.R +++ b/tests/testthat/parse_comments/spinning_code_chunk_headers-out.R @@ -1,7 +1,5 @@ # A comment -a <- function() { - -} +a <- function() {} #+ chunk-label, opt1=value1 "chunk-content" diff --git a/tests/testthat/parse_comments/with_indention-in_tree b/tests/testthat/parse_comments/with_indention-in_tree deleted file mode 100644 index ee1218f53..000000000 --- a/tests/testthat/parse_comments/with_indention-in_tree +++ /dev/null @@ -1,71 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: # a c [0/0] {1} - ¦--expr: call( [1/0] {2} - ¦ ¦--expr: call [0/0] {4} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {3} - ¦ ¦--'(': ( [0/0] {5} - ¦ ¦--expr: 1 [1/0] {7} - ¦ ¦ °--NUM_CONST: 1 [0/0] {6} - ¦ ¦--',': , [0/0] {8} - ¦ ¦--expr: call2 [1/0] {9} - ¦ ¦ ¦--expr: call2 [0/0] {11} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call2 [0/0] {10} - ¦ ¦ ¦--'(': ( [0/0] {12} - ¦ ¦ ¦--expr: 2 [1/0] {14} - ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {13} - ¦ ¦ ¦--',': , [0/1] {15} - ¦ ¦ ¦--expr: 3 [0/0] {17} - ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {16} - ¦ ¦ ¦--',': , [0/0] {18} - ¦ ¦ ¦--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 [1/0] {27} - ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {26} - ¦ ¦ ¦ ¦--',': , [0/1] {28} - ¦ ¦ ¦ ¦--expr: 2 [0/1] {30} - ¦ ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {29} - ¦ ¦ ¦ ¦--COMMENT: # two [0/6] {31} - ¦ ¦ ¦ ¦--',': , [1/1] {32} - ¦ ¦ ¦ ¦--expr: 22 [0/1] {34} - ¦ ¦ ¦ ¦ °--NUM_CONST: 22 [0/0] {33} - ¦ ¦ ¦ ¦--COMMENT: # com [0/6] {35} - ¦ ¦ ¦ °--')': ) [1/0] {36} - ¦ ¦ ¦--',': , [0/4] {37} - ¦ ¦ ¦--expr: 5 [1/2] {39} - ¦ ¦ ¦ °--NUM_CONST: 5 [0/0] {38} - ¦ ¦ °--')': ) [1/0] {40} - ¦ ¦--',': , [0/1] {41} - ¦ ¦--COMMENT: #' A [0/17] {42} - ¦ ¦--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: 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: b(x, [1/2] {55} - ¦ ¦--expr: b [0/0] {57} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: b [0/0] {56} - ¦ ¦--'(': ( [0/0] {58} - ¦ ¦--expr: x [0/0] {60} - ¦ ¦ °--SYMBOL: x [0/0] {59} - ¦ ¦--',': , [0/1] {61} - ¦ ¦--expr: y [0/0] {63} - ¦ ¦ °--SYMBOL: y [0/0] {62} - ¦ ¦--',': , [0/1] {64} - ¦ ¦--expr: 7 [0/0] {66} - ¦ ¦ °--NUM_CONST: 7 [0/0] {65} - ¦ °--')': ) [0/0] {67} - ¦--COMMENT: # hid [0/0] {68} - ¦--COMMENT: # com [1/0] {69} - °--COMMENT: # las [3/0] {70} diff --git a/tests/testthat/parse_comments/with_indention-out.R b/tests/testthat/parse_comments/with_indention-out.R index 5854b9515..526802374 100644 --- a/tests/testthat/parse_comments/with_indention-out.R +++ b/tests/testthat/parse_comments/with_indention-out.R @@ -18,8 +18,6 @@ call( # new comment - - a() # I think it gets boring # new_line here diff --git a/tests/testthat/parse_comments/within_spacing_with_force-in_tree b/tests/testthat/parse_comments/within_spacing_with_force-in_tree deleted file mode 100644 index 559601eed..000000000 --- a/tests/testthat/parse_comments/within_spacing_with_force-in_tree +++ /dev/null @@ -1,5 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: ##### [0/0] {1} - ¦--COMMENT: #'rox [1/0] {2} - ¦--COMMENT: #rox [2/0] {3} - °--COMMENT: # a # [2/0] {4} diff --git a/tests/testthat/parse_comments/within_spacing_without_force-in_tree b/tests/testthat/parse_comments/within_spacing_without_force-in_tree deleted file mode 100644 index 559601eed..000000000 --- a/tests/testthat/parse_comments/within_spacing_without_force-in_tree +++ /dev/null @@ -1,5 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: ##### [0/0] {1} - ¦--COMMENT: #'rox [1/0] {2} - ¦--COMMENT: #rox [2/0] {3} - °--COMMENT: # a # [2/0] {4} diff --git a/tests/testthat/parse_comments/xaringan-in_tree b/tests/testthat/parse_comments/xaringan-in_tree deleted file mode 100644 index 65e144b39..000000000 --- a/tests/testthat/parse_comments/xaringan-in_tree +++ /dev/null @@ -1,62 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: foo( - [0/0] {1} - ¦ ¦--expr: foo [0/0] {3} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: foo [0/0] {2} - ¦ ¦--'(': ( [0/2] {4} - ¦ ¦--SYMBOL_SUB: data [1/1] {5} - ¦ ¦--EQ_SUB: = [0/1] {6} - ¦ ¦--expr: mtcar [0/0] {8} - ¦ ¦ °--SYMBOL: mtcar [0/0] {7} - ¦ ¦--',': , [0/2] {9} - ¦ ¦--SYMBOL_SUB: x [1/1] {10} - ¦ ¦--EQ_SUB: = [0/1] {11} - ¦ ¦--expr: cyl [0/0] {13} - ¦ ¦ °--SYMBOL: cyl [0/0] {12} - ¦ ¦--',': , [0/2] {14} - ¦ ¦--SYMBOL_SUB: y [1/1] {15} - ¦ ¦--EQ_SUB: = [0/1] {16} - ¦ ¦--expr: wt [0/1] {18} - ¦ ¦ °--SYMBOL: wt [0/0] {17} - ¦ ¦--COMMENT: #<< [0/0] {19} - ¦ °--')': ) [1/0] {20} - ¦--expr: libra [3/0] {21} - ¦ ¦--expr: libra [0/0] {23} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: libra [0/0] {22} - ¦ ¦--'(': ( [0/0] {24} - ¦ ¦--expr: ggplo [0/0] {26} - ¦ ¦ °--SYMBOL: ggplo [0/0] {25} - ¦ °--')': ) [0/0] {27} - ¦--expr: ggplo [2/1] {28} - ¦ ¦--expr: ggplo [0/1] {30} - ¦ ¦ ¦--expr: ggplo [0/0] {32} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: ggplo [0/0] {31} - ¦ ¦ ¦--'(': ( [0/0] {33} - ¦ ¦ ¦--expr: aes(x [0/0] {34} - ¦ ¦ ¦ ¦--expr: aes [0/0] {36} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: aes [0/0] {35} - ¦ ¦ ¦ ¦--'(': ( [0/0] {37} - ¦ ¦ ¦ ¦--expr: x [0/0] {39} - ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {38} - ¦ ¦ ¦ ¦--',': , [0/1] {40} - ¦ ¦ ¦ ¦--expr: y [0/0] {42} - ¦ ¦ ¦ ¦ °--SYMBOL: y [0/0] {41} - ¦ ¦ ¦ °--')': ) [0/0] {43} - ¦ ¦ ¦--',': , [0/1] {44} - ¦ ¦ ¦--expr: data [0/0] {46} - ¦ ¦ ¦ °--SYMBOL: data [0/0] {45} - ¦ ¦ °--')': ) [0/0] {47} - ¦ ¦--'+': + [0/2] {48} - ¦ ¦--expr: geom_ [1/1] {49} - ¦ ¦ ¦--expr: geom_ [0/0] {51} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: geom_ [0/0] {50} - ¦ ¦ ¦--'(': ( [0/0] {52} - ¦ ¦ °--')': ) [0/0] {53} - ¦ ¦--'+': + [0/1] {54} - ¦ ¦--COMMENT: #<< [0/2] {55} - ¦ °--expr: scale [1/0] {56} - ¦ ¦--expr: scale [0/0] {58} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: scale [0/0] {57} - ¦ ¦--'(': ( [0/0] {59} - ¦ °--')': ) [0/0] {60} - °--COMMENT: #<< [0/0] {61} diff --git a/tests/testthat/parsing/long_strings-in_tree b/tests/testthat/parsing/long_strings-in_tree deleted file mode 100644 index a8a743040..000000000 --- a/tests/testthat/parsing/long_strings-in_tree +++ /dev/null @@ -1,39 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: b <- - [0/0] {1} - ¦ ¦--expr: b [0/1] {3} - ¦ ¦ °--SYMBOL: b [0/0] {2} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {4} - ¦ °--expr: 3 [1/0] {6} - ¦ °--NUM_CONST: 3 [0/0] {5} - ¦--expr: g <- - [1/0] {7} - ¦ ¦--expr: g [0/1] {9} - ¦ ¦ °--SYMBOL: g [0/0] {8} - ¦ ¦--LEFT_ASSIGN: <- [0/0] {10} - ¦ °--expr: "v x [1/0] {12} - ¦ °--STR_CONST: "v x [0/0] {11} - ¦--expr: "'tes [2/0] {14} - ¦ °--STR_CONST: "'tes [0/0] {13} - ¦--expr: 99 + [1/0] {15} - ¦ ¦--expr: 99 [0/1] {17} - ¦ ¦ °--NUM_CONST: 99 [0/0] {16} - ¦ ¦--'+': + [0/1] {18} - ¦ °--expr: 1 [0/0] {20} - ¦ °--NUM_CONST: 1 [0/0] {19} - ¦--expr: 'test [1/0] {22} - ¦ °--STR_CONST: 'test [0/0] {21} - ¦--expr: 'test [1/1] {24} - ¦ °--STR_CONST: 'test [0/0] {23} - ¦--COMMENT: # com [0/0] {25} - ¦--expr: 1 [1/0] {27} - ¦ °--NUM_CONST: 1 [0/0] {26} - °--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: 2 [0/0] {35} - ¦ °--NUM_CONST: 2 [0/0] {34} - °--')': ) [0/0] {36} diff --git a/tests/testthat/parsing/repeated_parsing-in.R b/tests/testthat/parsing/repeated_parsing-in.R deleted file mode 100644 index 28d1e49c0..000000000 --- a/tests/testthat/parsing/repeated_parsing-in.R +++ /dev/null @@ -1,21 +0,0 @@ -# -# -# -r <- function(y, s, g = 10) { - b("", "") - - # - q <- g(d(i), function(i) { - d(op(t[[p]]), n(i = i)) - }) - f(calls) <- f(g) - - mb <- j(c( - q(a::b), r, - y(u = 1) - )) - k(b) -} - -# -# diff --git a/tests/testthat/parsing/repeated_parsing-in_tree b/tests/testthat/parsing/repeated_parsing-in_tree deleted file mode 100644 index c43c3b88e..000000000 --- a/tests/testthat/parsing/repeated_parsing-in_tree +++ /dev/null @@ -1,152 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: # [0/0] {1} - ¦--COMMENT: # [1/0] {2} - ¦--COMMENT: # [1/0] {3} - ¦--expr: r <- [1/0] {4} - ¦ ¦--expr: r [0/1] {6} - ¦ ¦ °--SYMBOL: r [0/0] {5} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {7} - ¦ °--expr: funct [0/0] {8} - ¦ ¦--FUNCTION: funct [0/0] {9} - ¦ ¦--'(': ( [0/0] {10} - ¦ ¦--SYMBOL_FORMALS: y [0/0] {11} - ¦ ¦--',': , [0/1] {12} - ¦ ¦--SYMBOL_FORMALS: s [0/0] {13} - ¦ ¦--',': , [0/1] {14} - ¦ ¦--SYMBOL_FORMALS: g [0/1] {15} - ¦ ¦--EQ_FORMALS: = [0/1] {16} - ¦ ¦--expr: 10 [0/0] {18} - ¦ ¦ °--NUM_CONST: 10 [0/0] {17} - ¦ ¦--')': ) [0/1] {19} - ¦ °--expr: { - b [0/0] {20} - ¦ ¦--'{': { [0/2] {21} - ¦ ¦--expr: b("", [1/2] {22} - ¦ ¦ ¦--expr: b [0/0] {24} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: b [0/0] {23} - ¦ ¦ ¦--'(': ( [0/0] {25} - ¦ ¦ ¦--expr: "" [0/0] {27} - ¦ ¦ ¦ °--STR_CONST: "" [0/0] {26} - ¦ ¦ ¦--',': , [0/1] {28} - ¦ ¦ ¦--expr: "" [0/0] {30} - ¦ ¦ ¦ °--STR_CONST: "" [0/0] {29} - ¦ ¦ °--')': ) [0/0] {31} - ¦ ¦--COMMENT: # [2/2] {32} - ¦ ¦--expr: q <- [1/2] {33} - ¦ ¦ ¦--expr: q [0/1] {35} - ¦ ¦ ¦ °--SYMBOL: q [0/0] {34} - ¦ ¦ ¦--LEFT_ASSIGN: <- [0/1] {36} - ¦ ¦ °--expr: g(d(i [0/0] {37} - ¦ ¦ ¦--expr: g [0/0] {39} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: g [0/0] {38} - ¦ ¦ ¦--'(': ( [0/0] {40} - ¦ ¦ ¦--expr: d(i) [0/0] {41} - ¦ ¦ ¦ ¦--expr: d [0/0] {43} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: d [0/0] {42} - ¦ ¦ ¦ ¦--'(': ( [0/0] {44} - ¦ ¦ ¦ ¦--expr: i [0/0] {46} - ¦ ¦ ¦ ¦ °--SYMBOL: i [0/0] {45} - ¦ ¦ ¦ °--')': ) [0/0] {47} - ¦ ¦ ¦--',': , [0/1] {48} - ¦ ¦ ¦--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} - ¦ ¦ ¦ ¦--'{': { [0/4] {55} - ¦ ¦ ¦ ¦--expr: d(op( [1/2] {56} - ¦ ¦ ¦ ¦ ¦--expr: d [0/0] {58} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: d [0/0] {57} - ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {59} - ¦ ¦ ¦ ¦ ¦--expr: op(t[ [0/0] {60} - ¦ ¦ ¦ ¦ ¦ ¦--expr: op [0/0] {62} - ¦ ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: op [0/0] {61} - ¦ ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {63} - ¦ ¦ ¦ ¦ ¦ ¦--expr: t[[p] [0/0] {64} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: t [0/0] {66} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--SYMBOL: t [0/0] {65} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--LBB: [[ [0/0] {67} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: p [0/0] {69} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--SYMBOL: p [0/0] {68} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--']': ] [0/0] {70} - ¦ ¦ ¦ ¦ ¦ ¦ °--']': ] [0/0] {71} - ¦ ¦ ¦ ¦ ¦ °--')': ) [0/0] {72} - ¦ ¦ ¦ ¦ ¦--',': , [0/1] {73} - ¦ ¦ ¦ ¦ ¦--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: i [0/0] {81} - ¦ ¦ ¦ ¦ ¦ ¦ °--SYMBOL: i [0/0] {80} - ¦ ¦ ¦ ¦ ¦ °--')': ) [0/0] {82} - ¦ ¦ ¦ ¦ °--')': ) [0/0] {83} - ¦ ¦ ¦ °--'}': } [1/0] {84} - ¦ ¦ °--')': ) [0/0] {85} - ¦ ¦--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: calls [0/0] {92} - ¦ ¦ ¦ ¦ °--SYMBOL: calls [0/0] {91} - ¦ ¦ ¦ °--')': ) [0/0] {93} - ¦ ¦ ¦--LEFT_ASSIGN: <- [0/1] {94} - ¦ ¦ °--expr: f(g) [0/0] {95} - ¦ ¦ ¦--expr: f [0/0] {97} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: f [0/0] {96} - ¦ ¦ ¦--'(': ( [0/0] {98} - ¦ ¦ ¦--expr: g [0/0] {100} - ¦ ¦ ¦ °--SYMBOL: g [0/0] {99} - ¦ ¦ °--')': ) [0/0] {101} - ¦ ¦--expr: mb <- [2/2] {102} - ¦ ¦ ¦--expr: mb [0/1] {104} - ¦ ¦ ¦ °--SYMBOL: mb [0/0] {103} - ¦ ¦ ¦--LEFT_ASSIGN: <- [0/1] {105} - ¦ ¦ °--expr: j(c( - [0/0] {106} - ¦ ¦ ¦--expr: j [0/0] {108} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: j [0/0] {107} - ¦ ¦ ¦--'(': ( [0/0] {109} - ¦ ¦ ¦--expr: c( - [0/0] {110} - ¦ ¦ ¦ ¦--expr: c [0/0] {112} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {111} - ¦ ¦ ¦ ¦--'(': ( [0/4] {113} - ¦ ¦ ¦ ¦--expr: q(a:: [1/0] {114} - ¦ ¦ ¦ ¦ ¦--expr: q [0/0] {116} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: q [0/0] {115} - ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {117} - ¦ ¦ ¦ ¦ ¦--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: r [0/0] {125} - ¦ ¦ ¦ ¦ °--SYMBOL: r [0/0] {124} - ¦ ¦ ¦ ¦--',': , [0/4] {126} - ¦ ¦ ¦ ¦--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: 1 [0/0] {134} - ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {133} - ¦ ¦ ¦ ¦ °--')': ) [0/0] {135} - ¦ ¦ ¦ °--')': ) [1/0] {136} - ¦ ¦ °--')': ) [0/0] {137} - ¦ ¦--expr: k(b) [1/0] {138} - ¦ ¦ ¦--expr: k [0/0] {140} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: k [0/0] {139} - ¦ ¦ ¦--'(': ( [0/0] {141} - ¦ ¦ ¦--expr: b [0/0] {143} - ¦ ¦ ¦ °--SYMBOL: b [0/0] {142} - ¦ ¦ °--')': ) [0/0] {144} - ¦ °--'}': } [1/0] {145} - ¦--COMMENT: # [2/0] {146} - °--COMMENT: # [1/0] {147} diff --git a/tests/testthat/parsing/repeated_parsing-out.R b/tests/testthat/parsing/repeated_parsing-out.R deleted file mode 100644 index 28d1e49c0..000000000 --- a/tests/testthat/parsing/repeated_parsing-out.R +++ /dev/null @@ -1,21 +0,0 @@ -# -# -# -r <- function(y, s, g = 10) { - b("", "") - - # - q <- g(d(i), function(i) { - d(op(t[[p]]), n(i = i)) - }) - f(calls) <- f(g) - - mb <- j(c( - q(a::b), r, - y(u = 1) - )) - k(b) -} - -# -# diff --git a/tests/testthat/public-api/xyz-r-and-rmd-dir/subdir/random-script-in-sub-dir.R b/tests/testthat/public-api/xyz-r-and-rmd-dir/subdir/random-script-in-sub-dir.R index 1337474bf..4b6e446d9 100644 --- a/tests/testthat/public-api/xyz-r-and-rmd-dir/subdir/random-script-in-sub-dir.R +++ b/tests/testthat/public-api/xyz-r-and-rmd-dir/subdir/random-script-in-sub-dir.R @@ -1,4 +1,3 @@ # random this(is_a_call(x)) -if (x) { -} +if (x) {} diff --git a/tests/testthat/public-api/xyzdir/subdir/random-script-in-sub-dir.R b/tests/testthat/public-api/xyzdir/subdir/random-script-in-sub-dir.R index 1337474bf..4b6e446d9 100644 --- a/tests/testthat/public-api/xyzdir/subdir/random-script-in-sub-dir.R +++ b/tests/testthat/public-api/xyzdir/subdir/random-script-in-sub-dir.R @@ -1,4 +1,3 @@ # random this(is_a_call(x)) -if (x) { -} +if (x) {} 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 deleted file mode 100644 index 82ec3ce94..000000000 --- a/tests/testthat/relocate_eq_assign/eq_assign_ifelse_scope_line_breaks-in_tree +++ /dev/null @@ -1,30 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr_or_assign_or_help: x = 5 [0/0] {1} - ¦ ¦--expr: x [0/1] {3} - ¦ ¦ °--SYMBOL: x [0/0] {2} - ¦ ¦--EQ_ASSIGN: = [0/1] {4} - ¦ °--expr: 5 [0/0] {6} - ¦ °--NUM_CONST: 5 [0/0] {5} - °--expr: if(x [2/0] {7} - ¦--IF: if [0/0] {8} - ¦--'(': ( [0/0] {9} - ¦--expr: x >= [0/0] {10} - ¦ ¦--expr: x [0/1] {12} - ¦ ¦ °--SYMBOL: x [0/0] {11} - ¦ ¦--GE: >= [0/1] {13} - ¦ °--expr: 5 [0/0] {15} - ¦ °--NUM_CONST: 5 [0/0] {14} - ¦--')': ) [0/2] {16} - ¦--expr_or_assign_or_help: y = T [1/1] {17} - ¦ ¦--expr: y [0/1] {19} - ¦ ¦ °--SYMBOL: y [0/0] {18} - ¦ ¦--EQ_ASSIGN: = [0/1] {20} - ¦ °--expr: TRUE [0/0] {22} - ¦ °--NUM_CONST: TRUE [0/0] {21} - ¦--ELSE: else [0/4] {23} - °--expr_or_assign_or_help: y = F [1/0] {24} - ¦--expr: y [0/1] {26} - ¦ °--SYMBOL: y [0/0] {25} - ¦--EQ_ASSIGN: = [0/1] {27} - °--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 deleted file mode 100644 index 82ec3ce94..000000000 --- a/tests/testthat/relocate_eq_assign/eq_assign_ifelse_scope_tokens-in_tree +++ /dev/null @@ -1,30 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr_or_assign_or_help: x = 5 [0/0] {1} - ¦ ¦--expr: x [0/1] {3} - ¦ ¦ °--SYMBOL: x [0/0] {2} - ¦ ¦--EQ_ASSIGN: = [0/1] {4} - ¦ °--expr: 5 [0/0] {6} - ¦ °--NUM_CONST: 5 [0/0] {5} - °--expr: if(x [2/0] {7} - ¦--IF: if [0/0] {8} - ¦--'(': ( [0/0] {9} - ¦--expr: x >= [0/0] {10} - ¦ ¦--expr: x [0/1] {12} - ¦ ¦ °--SYMBOL: x [0/0] {11} - ¦ ¦--GE: >= [0/1] {13} - ¦ °--expr: 5 [0/0] {15} - ¦ °--NUM_CONST: 5 [0/0] {14} - ¦--')': ) [0/2] {16} - ¦--expr_or_assign_or_help: y = T [1/1] {17} - ¦ ¦--expr: y [0/1] {19} - ¦ ¦ °--SYMBOL: y [0/0] {18} - ¦ ¦--EQ_ASSIGN: = [0/1] {20} - ¦ °--expr: TRUE [0/0] {22} - ¦ °--NUM_CONST: TRUE [0/0] {21} - ¦--ELSE: else [0/4] {23} - °--expr_or_assign_or_help: y = F [1/0] {24} - ¦--expr: y [0/1] {26} - ¦ °--SYMBOL: y [0/0] {25} - ¦--EQ_ASSIGN: = [0/1] {27} - °--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 deleted file mode 100644 index 636622233..000000000 --- a/tests/testthat/relocate_eq_assign/eq_assign_multiple_tokens_eq_only-in_tree +++ /dev/null @@ -1,103 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr_or_assign_or_help: a = b [0/0] {1} - ¦ ¦--expr: a [0/1] {3} - ¦ ¦ °--SYMBOL: a [0/0] {2} - ¦ ¦--EQ_ASSIGN: = [0/1] {4} - ¦ ¦--expr: b [0/1] {7} - ¦ ¦ °--SYMBOL: b [0/0] {6} - ¦ ¦--EQ_ASSIGN: = [0/1] {8} - ¦ ¦--expr: c [0/1] {11} - ¦ ¦ °--SYMBOL: c [0/0] {10} - ¦ ¦--EQ_ASSIGN: = [0/1] {12} - ¦ ¦--expr: d [0/1] {15} - ¦ ¦ °--SYMBOL: d [0/0] {14} - ¦ ¦--EQ_ASSIGN: = [0/1] {16} - ¦ ¦--expr: e [0/1] {19} - ¦ ¦ °--SYMBOL: e [0/0] {18} - ¦ ¦--EQ_ASSIGN: = [0/1] {20} - ¦ ¦--expr: f [0/7] {23} - ¦ ¦ °--SYMBOL: f [0/0] {22} - ¦ ¦--EQ_ASSIGN: = [0/1] {24} - ¦ ¦--expr: g [0/1] {27} - ¦ ¦ °--SYMBOL: g [0/0] {26} - ¦ ¦--EQ_ASSIGN: = [0/1] {28} - ¦ °--expr: 4 [0/0] {30} - ¦ °--NUM_CONST: 4 [0/0] {29} - ¦--expr: a <- [1/0] {31} - ¦ ¦--expr: a [0/1] {33} - ¦ ¦ °--SYMBOL: a [0/0] {32} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {34} - ¦ °--expr: 3 [0/0] {36} - ¦ °--NUM_CONST: 3 [0/0] {35} - ¦--';': ; [0/1] {37} - ¦--expr_or_assign_or_help: b = c [0/0] {38} - ¦ ¦--expr: b [0/1] {40} - ¦ ¦ °--SYMBOL: b [0/0] {39} - ¦ ¦--EQ_ASSIGN: = [0/1] {41} - ¦ ¦--expr: c [0/1] {44} - ¦ ¦ °--SYMBOL: c [0/0] {43} - ¦ ¦--EQ_ASSIGN: = [0/1] {45} - ¦ ¦--expr: d [0/1] {48} - ¦ ¦ °--SYMBOL: d [0/0] {47} - ¦ ¦--EQ_ASSIGN: = [0/1] {49} - ¦ ¦--expr: ey [0/1] {52} - ¦ ¦ °--SYMBOL: ey [0/0] {51} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {53} - ¦ °--expr: 4 [0/0] {55} - ¦ °--NUM_CONST: 4 [0/0] {54} - ¦--expr: a <- [1/0] {56} - ¦ ¦--expr: a [0/1] {58} - ¦ ¦ °--SYMBOL: a [0/0] {57} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {59} - ¦ °--expr: 3 [0/0] {61} - ¦ °--NUM_CONST: 3 [0/0] {60} - ¦--';': ; [0/1] {62} - ¦--expr_or_assign_or_help: b = c [0/0] {63} - ¦ ¦--expr: b [0/1] {65} - ¦ ¦ °--SYMBOL: b [0/0] {64} - ¦ ¦--EQ_ASSIGN: = [0/1] {66} - ¦ ¦--expr: c [0/1] {69} - ¦ ¦ °--SYMBOL: c [0/0] {68} - ¦ ¦--EQ_ASSIGN: = [0/1] {70} - ¦ ¦--expr: d <- [0/1] {72} - ¦ ¦ ¦--expr: d [0/1] {74} - ¦ ¦ ¦ °--SYMBOL: d [0/0] {73} - ¦ ¦ ¦--LEFT_ASSIGN: <- [0/1] {75} - ¦ ¦ °--expr: ey [0/0] {77} - ¦ ¦ °--SYMBOL: ey [0/0] {76} - ¦ ¦--EQ_ASSIGN: = [0/1] {78} - ¦ °--expr: 4 [0/0] {80} - ¦ °--NUM_CONST: 4 [0/0] {79} - ¦--expr_or_assign_or_help: ff = [1/0] {81} - ¦ ¦--expr: ff [0/1] {83} - ¦ ¦ °--SYMBOL: ff [0/0] {82} - ¦ ¦--EQ_ASSIGN: = [0/1] {84} - ¦ °--expr: 3 [0/0] {86} - ¦ °--NUM_CONST: 3 [0/0] {85} - ¦--';': ; [0/1] {87} - ¦--expr_or_assign_or_help: b = c [0/1] {88} - ¦ ¦--expr: b [0/1] {90} - ¦ ¦ °--SYMBOL: b [0/0] {89} - ¦ ¦--EQ_ASSIGN: = [0/1] {91} - ¦ ¦--expr: c [0/1] {94} - ¦ ¦ °--SYMBOL: c [0/0] {93} - ¦ ¦--EQ_ASSIGN: = [0/1] {95} - ¦ ¦--expr: d [0/1] {98} - ¦ ¦ °--SYMBOL: d [0/0] {97} - ¦ ¦--EQ_ASSIGN: = [0/1] {99} - ¦ °--expr: 3 [0/0] {101} - ¦ °--NUM_CONST: 3 [0/0] {100} - ¦--';': ; [0/1] {102} - ¦--expr_or_assign_or_help: g = 4 [0/0] {103} - ¦ ¦--expr: g [0/1] {105} - ¦ ¦ °--SYMBOL: g [0/0] {104} - ¦ ¦--EQ_ASSIGN: = [0/1] {106} - ¦ °--expr: 4 [0/0] {108} - ¦ °--NUM_CONST: 4 [0/0] {107} - ¦--';': ; [0/1] {109} - °--expr_or_assign_or_help: ge = [0/0] {110} - ¦--expr: ge [0/1] {112} - ¦ °--SYMBOL: ge [0/0] {111} - ¦--EQ_ASSIGN: = [0/1] {113} - °--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 deleted file mode 100644 index 12616957c..000000000 --- a/tests/testthat/relocate_eq_assign/eq_assign_multiple_tokens_mixed-in_tree +++ /dev/null @@ -1,25 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr_or_assign_or_help: a = b [0/0] {1} - ¦--expr: a [0/1] {3} - ¦ °--SYMBOL: a [0/0] {2} - ¦--EQ_ASSIGN: = [0/1] {4} - ¦--expr: b [0/1] {7} - ¦ °--SYMBOL: b [0/0] {6} - ¦--EQ_ASSIGN: = [0/1] {8} - ¦--expr: c [0/1] {11} - ¦ °--SYMBOL: c [0/0] {10} - ¦--EQ_ASSIGN: = [0/1] {12} - ¦--expr: d [0/1] {15} - ¦ °--SYMBOL: d [0/0] {14} - ¦--EQ_ASSIGN: = [0/1] {16} - ¦--expr: e [0/1] {19} - ¦ °--SYMBOL: e [0/0] {18} - ¦--EQ_ASSIGN: = [0/1] {20} - ¦--expr: f [0/7] {23} - ¦ °--SYMBOL: f [0/0] {22} - ¦--EQ_ASSIGN: = [0/1] {24} - ¦--expr: g [0/1] {27} - ¦ °--SYMBOL: g [0/0] {26} - ¦--LEFT_ASSIGN: <- [0/1] {28} - °--expr: 4 [0/0] {30} - °--NUM_CONST: 4 [0/0] {29} diff --git a/tests/testthat/rmd/r_and_non_r_code_chunks-in.Rmd b/tests/testthat/rmd/r_and_non_r_code_chunks-in.Rmd index 8360de933..02dabe478 100644 --- a/tests/testthat/rmd/r_and_non_r_code_chunks-in.Rmd +++ b/tests/testthat/rmd/r_and_non_r_code_chunks-in.Rmd @@ -18,6 +18,14 @@ Some text. 1+1 ``` +```{webr} +1+1 +``` + +```{webr-r} +1+1 +``` + More text. ```{nonR} diff --git a/tests/testthat/rmd/r_and_non_r_code_chunks-out.Rmd b/tests/testthat/rmd/r_and_non_r_code_chunks-out.Rmd index 0e76de3f2..8188c5385 100644 --- a/tests/testthat/rmd/r_and_non_r_code_chunks-out.Rmd +++ b/tests/testthat/rmd/r_and_non_r_code_chunks-out.Rmd @@ -18,6 +18,14 @@ Some text. 1+1 ``` +```{webr} +1 + 1 +``` + +```{webr-r} +1 + 1 +``` + More text. ```{nonR} diff --git a/tests/testthat/roxygen-examples-complete/01-one-function-example-last-proper-run-in_tree b/tests/testthat/roxygen-examples-complete/01-one-function-example-last-proper-run-in_tree deleted file mode 100644 index 2cb3e2b3d..000000000 --- a/tests/testthat/roxygen-examples-complete/01-one-function-example-last-proper-run-in_tree +++ /dev/null @@ -1,13 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: #' Pr [0/0] {1} - ¦--COMMENT: #' [1/0] {2} - ¦--COMMENT: #' Pe [1/0] {3} - ¦--COMMENT: #' (c [1/0] {4} - ¦--COMMENT: #' Ca [1/0] {5} - ¦--COMMENT: #'@ex [1/0] {6} - °--expr: a <- [1/0] {7} - ¦--expr: a [0/1] {9} - ¦ °--SYMBOL: a [0/0] {8} - ¦--LEFT_ASSIGN: <- [0/1] {10} - °--expr: 2 [0/0] {12} - °--NUM_CONST: 2 [0/0] {11} diff --git a/tests/testthat/roxygen-examples-complete/02-one-function-examples-last-proper-run-in_tree b/tests/testthat/roxygen-examples-complete/02-one-function-examples-last-proper-run-in_tree deleted file mode 100644 index 93f13fecb..000000000 --- a/tests/testthat/roxygen-examples-complete/02-one-function-examples-last-proper-run-in_tree +++ /dev/null @@ -1,18 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: #' Pr [0/0] {1} - ¦--COMMENT: #' [1/0] {2} - ¦--COMMENT: #' Pe [1/0] {3} - ¦--COMMENT: #' (c [1/0] {4} - ¦--COMMENT: #' Ca [1/0] {5} - ¦--COMMENT: #' @e [1/0] {6} - ¦--COMMENT: #' st [1/0] {7} - ¦--COMMENT: #' st [1/0] {8} - ¦--COMMENT: #' [1/0] {9} - ¦--COMMENT: #' [1/0] {10} - ¦--COMMENT: #' ) [1/0] {11} - °--expr_or_assign_or_help: a = c [1/0] {12} - ¦--expr: a [0/1] {14} - ¦ °--SYMBOL: a [0/0] {13} - ¦--EQ_ASSIGN: = [0/1] {15} - °--expr: call [0/0] {17} - °--SYMBOL: call [0/0] {16} diff --git a/tests/testthat/roxygen-examples-complete/03-one-function-example-not-last-proper-run-in_tree b/tests/testthat/roxygen-examples-complete/03-one-function-example-not-last-proper-run-in_tree deleted file mode 100644 index c7da21279..000000000 --- a/tests/testthat/roxygen-examples-complete/03-one-function-example-not-last-proper-run-in_tree +++ /dev/null @@ -1,13 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: #' Pr [0/0] {1} - ¦--COMMENT: #' [1/0] {2} - ¦--COMMENT: #' Pe [1/0] {3} - ¦--COMMENT: #' Ca [1/0] {4} - ¦--COMMENT: #' @e [1/0] {5} - ¦--COMMENT: #' @n [1/0] {6} - °--expr: a<- 2 [1/0] {7} - ¦--expr: a [0/0] {9} - ¦ °--SYMBOL: a [0/0] {8} - ¦--LEFT_ASSIGN: <- [0/1] {10} - °--expr: 2 [0/0] {12} - °--NUM_CONST: 2 [0/0] {11} diff --git a/tests/testthat/roxygen-examples-complete/04-one-function-examples-not-last-proper-run-in_tree b/tests/testthat/roxygen-examples-complete/04-one-function-examples-not-last-proper-run-in_tree deleted file mode 100644 index d33a983ff..000000000 --- a/tests/testthat/roxygen-examples-complete/04-one-function-examples-not-last-proper-run-in_tree +++ /dev/null @@ -1,18 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: #' Th [0/0] {1} - ¦--COMMENT: #' [1/0] {2} - ¦--COMMENT: #' St [1/0] {3} - ¦--COMMENT: #' @f [1/0] {4} - ¦--COMMENT: #' @e [1/0] {5} - ¦--COMMENT: #' st [1/0] {6} - ¦--COMMENT: #' st [1/0] {7} - ¦--COMMENT: #' st [1/0] {8} - ¦--COMMENT: #' st [1/0] {9} - ¦--COMMENT: #' @i [1/0] {10} - ¦--COMMENT: #' @e [1/0] {11} - °--expr: a<-ca [1/0] {12} - ¦--expr: a [0/0] {14} - ¦ °--SYMBOL: a [0/0] {13} - ¦--LEFT_ASSIGN: <- [0/0] {15} - °--expr: call [0/0] {17} - °--SYMBOL: call [0/0] {16} diff --git a/tests/testthat/roxygen-examples-complete/05-multiple-function-examples-last-proper-run-in_tree b/tests/testthat/roxygen-examples-complete/05-multiple-function-examples-last-proper-run-in_tree deleted file mode 100644 index a7eacdfce..000000000 --- a/tests/testthat/roxygen-examples-complete/05-multiple-function-examples-last-proper-run-in_tree +++ /dev/null @@ -1,28 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: #' Th [0/0] {1} - ¦--COMMENT: #' [1/0] {2} - ¦--COMMENT: #' St [1/0] {3} - ¦--COMMENT: #' @f [1/0] {4} - ¦--COMMENT: #' @e [1/0] {5} - ¦--COMMENT: #' st [1/0] {6} - ¦--COMMENT: #' st [1/0] {7} - ¦--COMMENT: #' st [1/0] {8} - ¦--COMMENT: #' st [1/0] {9} - ¦--expr: a <- [1/0] {10} - ¦ ¦--expr: a [0/1] {12} - ¦ ¦ °--SYMBOL: a [0/0] {11} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {13} - ¦ °--expr: call [0/0] {15} - ¦ °--SYMBOL: call [0/0] {14} - ¦--COMMENT: #' Pr [2/0] {16} - ¦--COMMENT: #' [1/0] {17} - ¦--COMMENT: #' Pe [1/0] {18} - ¦--COMMENT: #' (c [1/0] {19} - ¦--COMMENT: #' Ca [1/0] {20} - ¦--COMMENT: #' @e [1/0] {21} - °--expr: a <- [1/0] {22} - ¦--expr: a [0/1] {24} - ¦ °--SYMBOL: a [0/0] {23} - ¦--LEFT_ASSIGN: <- [0/3] {25} - °--expr: 2 [0/0] {27} - °--NUM_CONST: 2 [0/0] {26} diff --git a/tests/testthat/roxygen-examples-complete/06-multiple-function-examples-no-last-run-in_tree b/tests/testthat/roxygen-examples-complete/06-multiple-function-examples-no-last-run-in_tree deleted file mode 100644 index a7dcea705..000000000 --- a/tests/testthat/roxygen-examples-complete/06-multiple-function-examples-no-last-run-in_tree +++ /dev/null @@ -1,33 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: #' Pr [0/0] {1} - ¦--COMMENT: #' [1/0] {2} - ¦--COMMENT: #' Pe [1/0] {3} - ¦--COMMENT: #' Ca [1/0] {4} - ¦--COMMENT: #' @e [1/0] {5} - ¦--COMMENT: #' ti [1/0] {6} - ¦--COMMENT: #' @n [1/0] {7} - ¦--expr: a <- [1/0] {8} - ¦ ¦--expr: a [0/1] {10} - ¦ ¦ °--SYMBOL: a [0/0] {9} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {11} - ¦ °--expr: 2 [0/0] {13} - ¦ °--NUM_CONST: 2 [0/0] {12} - ¦--COMMENT: #' Th [2/0] {14} - ¦--COMMENT: #' [1/0] {15} - ¦--COMMENT: #' St [1/0] {16} - ¦--COMMENT: #' @f [1/0] {17} - ¦--COMMENT: #' @e [1/0] {18} - ¦--COMMENT: #' st [1/0] {19} - ¦--COMMENT: #' st [1/0] {20} - ¦--COMMENT: #' st [1/0] {21} - ¦--COMMENT: #' c( [1/0] {22} - ¦--COMMENT: #' st [1/0] {23} - ¦--COMMENT: #' @i [1/0] {24} - ¦--COMMENT: #' @e [1/0] {25} - ¦--expr: a [1/0] {26} - ¦ ¦--expr: a [0/5] {28} - ¦ ¦ °--SYMBOL: a [0/0] {27} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {29} - ¦ °--expr: call [0/0] {31} - ¦ °--SYMBOL: call [0/0] {30} - °--';': ; [0/0] {32} diff --git a/tests/testthat/roxygen-examples-complete/07-roxygen-no-dontrun-in_tree b/tests/testthat/roxygen-examples-complete/07-roxygen-no-dontrun-in_tree deleted file mode 100644 index 399feb009..000000000 --- a/tests/testthat/roxygen-examples-complete/07-roxygen-no-dontrun-in_tree +++ /dev/null @@ -1,98 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: #' St [0/0] {1} - ¦--COMMENT: #' [1/0] {2} - ¦--COMMENT: #' Pe [1/0] {3} - ¦--COMMENT: #' [1/0] {4} - ¦--COMMENT: #' @p [1/0] {5} - ¦--COMMENT: #' @i [1/0] {6} - ¦--COMMENT: #' @i [1/0] {7} - ¦--COMMENT: #' @i [1/0] {8} - ¦--COMMENT: #' @i [1/0] {9} - ¦--COMMENT: #' @e [1/0] {10} - ¦--COMMENT: #' # [1/0] {11} - ¦--COMMENT: #' fi [1/0] {12} - ¦--COMMENT: #' fi [1/0] {13} - ¦--COMMENT: #' xf [1/0] {14} - ¦--COMMENT: #' st [1/0] {15} - ¦--COMMENT: #' fi [1/0] {16} - ¦--COMMENT: #' st [1/0] {17} - ¦--COMMENT: #' xf [1/0] {18} - ¦--COMMENT: #' un [1/0] {19} - ¦--COMMENT: #' @f [1/0] {20} - ¦--COMMENT: #' @e [1/0] {21} - °--expr: style [1/0] {22} - ¦--expr: style [0/1] {24} - ¦ °--SYMBOL: style [0/0] {23} - ¦--LEFT_ASSIGN: <- [0/1] {25} - °--expr: funct [0/0] {26} - ¦--FUNCTION: funct [0/0] {27} - ¦--'(': ( [0/0] {28} - ¦--SYMBOL_FORMALS: path [0/0] {29} - ¦--',': , [0/23] {30} - ¦--SYMBOL_FORMALS: ... [1/1] {31} - ¦--',': , [0/23] {32} - ¦--SYMBOL_FORMALS: style [1/1] {33} - ¦--EQ_FORMALS: = [0/1] {34} - ¦--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: style [0/0] {40} - ¦ ¦--expr: style [0/0] {42} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: style [0/0] {41} - ¦ ¦--'(': ( [0/0] {43} - ¦ ¦--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: TRUE [0/0] {51} - ¦ °--NUM_CONST: TRUE [0/0] {50} - ¦--')': ) [0/1] {52} - °--expr: { - c [0/0] {53} - ¦--'{': { [0/2] {54} - ¦--expr: chang [1/2] {55} - ¦ ¦--expr: chang [0/0] {57} - ¦ ¦ °--SYMBOL: chang [0/0] {56} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {58} - ¦ °--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: dirna [1/0] {65} - ¦ ¦ ¦--expr: dirna [0/0] {67} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: dirna [0/0] {66} - ¦ ¦ ¦--'(': ( [0/0] {68} - ¦ ¦ ¦--expr: path [0/12] {70} - ¦ ¦ ¦ °--SYMBOL: path [0/0] {69} - ¦ ¦ °--')': ) [1/0] {71} - ¦ ¦--',': , [0/4] {72} - ¦ ¦--expr: trans [1/2] {73} - ¦ ¦ ¦--expr: trans [0/0] {75} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: trans [0/0] {74} - ¦ ¦ ¦--'(': ( [0/0] {76} - ¦ ¦ ¦--expr: basen [0/0] {77} - ¦ ¦ ¦ ¦--expr: basen [0/0] {79} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: basen [0/0] {78} - ¦ ¦ ¦ ¦--'(': ( [0/0] {80} - ¦ ¦ ¦ ¦--expr: path [0/0] {82} - ¦ ¦ ¦ ¦ °--SYMBOL: path [0/0] {81} - ¦ ¦ ¦ °--')': ) [0/0] {83} - ¦ ¦ ¦--',': , [0/1] {84} - ¦ ¦ ¦--expr: trans [0/0] {86} - ¦ ¦ ¦ °--SYMBOL: trans [0/0] {85} - ¦ ¦ °--')': ) [0/0] {87} - ¦ °--')': ) [1/0] {88} - ¦--expr: invis [1/0] {89} - ¦ ¦--expr: invis [0/0] {91} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: invis [0/0] {90} - ¦ ¦--'(': ( [0/0] {92} - ¦ ¦--expr: chang [0/0] {94} - ¦ ¦ °--SYMBOL: chang [0/0] {93} - ¦ °--')': ) [0/0] {95} - °--'}': } [1/0] {96} diff --git a/tests/testthat/roxygen-examples-complete/08-roxygen-dontrun-in_tree b/tests/testthat/roxygen-examples-complete/08-roxygen-dontrun-in_tree deleted file mode 100644 index 710728774..000000000 --- a/tests/testthat/roxygen-examples-complete/08-roxygen-dontrun-in_tree +++ /dev/null @@ -1,103 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: #' St [0/0] {1} - ¦--COMMENT: #' [1/0] {2} - ¦--COMMENT: #' Pe [1/0] {3} - ¦--COMMENT: #' [1/0] {4} - ¦--COMMENT: #' @p [1/0] {5} - ¦--COMMENT: #' @i [1/0] {6} - ¦--COMMENT: #' @i [1/0] {7} - ¦--COMMENT: #' @i [1/0] {8} - ¦--COMMENT: #' @i [1/0] {9} - ¦--COMMENT: #' @e [1/0] {10} - ¦--COMMENT: #' # [1/0] {11} - ¦--COMMENT: #' fi [1/0] {12} - ¦--COMMENT: #' fi [1/0] {13} - ¦--COMMENT: #' \d [1/0] {14} - ¦--COMMENT: #' st [1/0] {15} - ¦--COMMENT: #' fi [1/0] {16} - ¦--COMMENT: #' st [1/0] {17} - ¦--COMMENT: #' xf [1/0] {18} - ¦--COMMENT: #' \d [1/0] {19} - ¦--COMMENT: #' \d [1/0] {20} - ¦--COMMENT: #' { [1/0] {21} - ¦--COMMENT: #' } [1/0] {22} - ¦--COMMENT: #' un [1/0] {23} - ¦--COMMENT: #' } [1/0] {24} - ¦--COMMENT: #' @f [1/0] {25} - ¦--COMMENT: #' @e [1/0] {26} - °--expr: style [1/0] {27} - ¦--expr: style [0/1] {29} - ¦ °--SYMBOL: style [0/0] {28} - ¦--LEFT_ASSIGN: <- [0/1] {30} - °--expr: funct [0/0] {31} - ¦--FUNCTION: funct [0/0] {32} - ¦--'(': ( [0/0] {33} - ¦--SYMBOL_FORMALS: path [0/0] {34} - ¦--',': , [0/23] {35} - ¦--SYMBOL_FORMALS: ... [1/1] {36} - ¦--',': , [0/23] {37} - ¦--SYMBOL_FORMALS: style [1/1] {38} - ¦--EQ_FORMALS: = [0/1] {39} - ¦--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: style [0/0] {45} - ¦ ¦--expr: style [0/0] {47} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: style [0/0] {46} - ¦ ¦--'(': ( [0/0] {48} - ¦ ¦--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: TRUE [0/0] {56} - ¦ °--NUM_CONST: TRUE [0/0] {55} - ¦--')': ) [0/1] {57} - °--expr: { - c [0/0] {58} - ¦--'{': { [0/2] {59} - ¦--expr: chang [1/2] {60} - ¦ ¦--expr: chang [0/0] {62} - ¦ ¦ °--SYMBOL: chang [0/0] {61} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {63} - ¦ °--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: dirna [1/0] {70} - ¦ ¦ ¦--expr: dirna [0/0] {72} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: dirna [0/0] {71} - ¦ ¦ ¦--'(': ( [0/0] {73} - ¦ ¦ ¦--expr: path [0/12] {75} - ¦ ¦ ¦ °--SYMBOL: path [0/0] {74} - ¦ ¦ °--')': ) [1/0] {76} - ¦ ¦--',': , [0/4] {77} - ¦ ¦--expr: trans [1/2] {78} - ¦ ¦ ¦--expr: trans [0/0] {80} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: trans [0/0] {79} - ¦ ¦ ¦--'(': ( [0/0] {81} - ¦ ¦ ¦--expr: basen [0/0] {82} - ¦ ¦ ¦ ¦--expr: basen [0/0] {84} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: basen [0/0] {83} - ¦ ¦ ¦ ¦--'(': ( [0/0] {85} - ¦ ¦ ¦ ¦--expr: path [0/0] {87} - ¦ ¦ ¦ ¦ °--SYMBOL: path [0/0] {86} - ¦ ¦ ¦ °--')': ) [0/0] {88} - ¦ ¦ ¦--',': , [0/1] {89} - ¦ ¦ ¦--expr: trans [0/0] {91} - ¦ ¦ ¦ °--SYMBOL: trans [0/0] {90} - ¦ ¦ °--')': ) [0/0] {92} - ¦ °--')': ) [1/0] {93} - ¦--expr: invis [1/0] {94} - ¦ ¦--expr: invis [0/0] {96} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: invis [0/0] {95} - ¦ ¦--'(': ( [0/0] {97} - ¦ ¦--expr: chang [0/0] {99} - ¦ ¦ °--SYMBOL: chang [0/0] {98} - ¦ °--')': ) [0/0] {100} - °--'}': } [1/0] {101} diff --git a/tests/testthat/roxygen-examples-complete/09-styler-r-ui-style-string-multiple-in_tree b/tests/testthat/roxygen-examples-complete/09-styler-r-ui-style-string-multiple-in_tree deleted file mode 100644 index 51af44dc6..000000000 --- a/tests/testthat/roxygen-examples-complete/09-styler-r-ui-style-string-multiple-in_tree +++ /dev/null @@ -1,86 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: #' St [0/0] {1} - ¦--COMMENT: #' [1/0] {2} - ¦--COMMENT: #' St [1/0] {3} - ¦--COMMENT: #' to [1/0] {4} - ¦--COMMENT: #' @p [1/0] {5} - ¦--COMMENT: #' @i [1/0] {6} - ¦--COMMENT: #' @f [1/0] {7} - ¦--COMMENT: #' @e [1/0] {8} - ¦--COMMENT: #' st [1/0] {9} - ¦--COMMENT: #' st [1/0] {10} - ¦--COMMENT: #' st [1/0] {11} - ¦--COMMENT: #' st [1/0] {12} - ¦--COMMENT: #' st [1/0] {13} - ¦--COMMENT: #' # [1/0] {14} - ¦--COMMENT: #' st [1/0] {15} - ¦--COMMENT: #' @e [1/0] {16} - ¦--COMMENT: #' \d [1/0] {17} - ¦--COMMENT: #' @e [1/0] {18} - °--expr: style [1/0] {19} - ¦--expr: style [0/1] {21} - ¦ °--SYMBOL: style [0/0] {20} - ¦--LEFT_ASSIGN: <- [0/1] {22} - °--expr: funct [0/0] {23} - ¦--FUNCTION: funct [0/0] {24} - ¦--'(': ( [0/0] {25} - ¦--SYMBOL_FORMALS: text [0/0] {26} - ¦--',': , [0/23] {27} - ¦--SYMBOL_FORMALS: ... [1/0] {28} - ¦--',': , [0/23] {29} - ¦--SYMBOL_FORMALS: style [1/1] {30} - ¦--EQ_FORMALS: = [0/1] {31} - ¦--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: style [0/0] {37} - ¦ ¦--expr: style [0/0] {39} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: style [0/0] {38} - ¦ ¦--'(': ( [0/0] {40} - ¦ ¦--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: TRUE [0/0] {48} - ¦ °--NUM_CONST: TRUE [0/0] {47} - ¦--')': ) [0/1] {49} - °--expr: { - t [0/0] {50} - ¦--'{': { [0/2] {51} - ¦--expr: trans [1/2] {52} - ¦ ¦--expr: trans [0/1] {54} - ¦ ¦ °--SYMBOL: trans [0/0] {53} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {55} - ¦ °--expr: make_ [0/0] {56} - ¦ ¦--expr: make_ [0/0] {58} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: make_ [0/0] {57} - ¦ ¦--'(': ( [0/0] {59} - ¦ ¦--expr: trans [0/0] {61} - ¦ ¦ °--SYMBOL: trans [0/0] {60} - ¦ ¦--',': , [0/1] {62} - ¦ ¦--expr: inclu [0/0] {64} - ¦ ¦ °--SYMBOL: inclu [0/0] {63} - ¦ °--')': ) [0/0] {65} - ¦--expr: style [1/2] {66} - ¦ ¦--expr: style [0/1] {68} - ¦ ¦ °--SYMBOL: style [0/0] {67} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {69} - ¦ °--expr: trans [0/0] {70} - ¦ ¦--expr: trans [0/0] {72} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: trans [0/0] {71} - ¦ ¦--'(': ( [0/0] {73} - ¦ ¦--expr: text [0/0] {75} - ¦ ¦ °--SYMBOL: text [0/0] {74} - ¦ °--')': ) [0/0] {76} - ¦--expr: const [1/0] {77} - ¦ ¦--expr: const [0/0] {79} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: const [0/0] {78} - ¦ ¦--'(': ( [0/0] {80} - ¦ ¦--expr: style [0/0] {82} - ¦ ¦ °--SYMBOL: style [0/0] {81} - ¦ °--')': ) [0/0] {83} - °--'}': } [1/0] {84} 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 deleted file mode 100644 index 070451e6e..000000000 --- a/tests/testthat/roxygen-examples-complete/10-styler-r-ui-in_tree +++ /dev/null @@ -1,756 +0,0 @@ -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: NULL [1/0] {5} - ¦ °--NULL_CONST: NULL [0/0] {4} - ¦--COMMENT: #' Pr [2/0] {6} - ¦--COMMENT: #' [1/0] {7} - ¦--COMMENT: #' Pe [1/0] {8} - ¦--COMMENT: #' (c [1/0] {9} - ¦--COMMENT: #' Ca [1/0] {10} - ¦--COMMENT: #' [1/0] {11} - ¦--COMMENT: #' @p [1/0] {12} - ¦--COMMENT: #' @p [1/0] {13} - ¦--COMMENT: #' @p [1/0] {14} - ¦--COMMENT: #' [1/0] {15} - ¦--COMMENT: #' [1/0] {16} - ¦--COMMENT: #' [1/0] {17} - ¦--COMMENT: #' @p [1/0] {18} - ¦--COMMENT: #' [1/0] {19} - ¦--COMMENT: #' [1/0] {20} - ¦--COMMENT: #' @p [1/0] {21} - ¦--COMMENT: #' [1/0] {22} - ¦--COMMENT: #' [1/0] {23} - ¦--COMMENT: #' @p [1/0] {24} - ¦--COMMENT: #' [1/0] {25} - ¦--COMMENT: #' @p [1/0] {26} - ¦--COMMENT: #' [1/0] {27} - ¦--COMMENT: #' @s [1/0] {28} - ¦--COMMENT: #' Th [1/0] {29} - ¦--COMMENT: #' co [1/0] {30} - ¦--COMMENT: #' th [1/0] {31} - ¦--COMMENT: #' [1/0] {32} - ¦--COMMENT: #' We [1/0] {33} - ¦--COMMENT: #' ch [1/0] {34} - ¦--COMMENT: #' tr [1/0] {35} - ¦--COMMENT: #' [1/0] {36} - ¦--COMMENT: #' Th [1/0] {37} - ¦--COMMENT: #' in [1/0] {38} - ¦--COMMENT: #' th [1/0] {39} - ¦--COMMENT: #' @s [1/0] {40} - ¦--COMMENT: #' Th [1/0] {41} - ¦--COMMENT: #' yi [1/0] {42} - ¦--COMMENT: #' [1/0] {43} - ¦--COMMENT: #' If [1/0] {44} - ¦--COMMENT: #' ab [1/0] {45} - ¦--COMMENT: #' He [1/0] {46} - ¦--COMMENT: #' ex [1/0] {47} - ¦--COMMENT: #' Th [1/0] {48} - ¦--COMMENT: #' er [1/0] {49} - ¦--COMMENT: #' [1/0] {50} - ¦--COMMENT: #' No [1/0] {51} - ¦--COMMENT: #' th [1/0] {52} - ¦--COMMENT: #' st [1/0] {53} - ¦--COMMENT: #' in [1/0] {54} - ¦--COMMENT: #' [1/0] {55} - ¦--COMMENT: #' Se [1/0] {56} - ¦--COMMENT: #' @i [1/0] {57} - ¦--COMMENT: #' @f [1/0] {58} - ¦--COMMENT: #' @e [1/0] {59} - ¦--COMMENT: #' \d [1/0] {60} - ¦--COMMENT: #' st [1/0] {61} - ¦--COMMENT: #' st [1/0] {62} - ¦--COMMENT: #' [1/0] {63} - ¦--COMMENT: #' [1/0] {64} - ¦--COMMENT: #' ) [1/0] {65} - ¦--COMMENT: #' } [1/0] {66} - ¦--COMMENT: #' @e [1/0] {67} - ¦--expr: style [1/0] {68} - ¦ ¦--expr: style [0/1] {70} - ¦ ¦ °--SYMBOL: style [0/0] {69} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {71} - ¦ °--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} - ¦ ¦ °--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: tidyv [0/0] {85} - ¦ ¦ °--SYMBOL: tidyv [0/0] {84} - ¦ ¦--',': , [0/22] {86} - ¦ ¦--SYMBOL_FORMALS: trans [1/1] {87} - ¦ ¦--EQ_FORMALS: = [0/1] {88} - ¦ ¦--expr: style [0/0] {89} - ¦ ¦ ¦--expr: style [0/0] {91} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: style [0/0] {90} - ¦ ¦ ¦--'(': ( [0/0] {92} - ¦ ¦ ¦--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: "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: "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: TRUE [0/0] {110} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {109} - ¦ ¦--')': ) [0/1] {111} - ¦ °--expr: { - p [0/0] {112} - ¦ ¦--'{': { [0/2] {113} - ¦ ¦--expr: pkg_r [1/2] {114} - ¦ ¦ ¦--expr: pkg_r [0/1] {116} - ¦ ¦ ¦ °--SYMBOL: pkg_r [0/0] {115} - ¦ ¦ ¦--LEFT_ASSIGN: <- [0/1] {117} - ¦ ¦ °--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: pkg [0/0] {127} - ¦ ¦ ¦ °--SYMBOL: pkg [0/0] {126} - ¦ ¦ °--')': ) [0/0] {128} - ¦ ¦--expr: chang [1/2] {129} - ¦ ¦ ¦--expr: chang [0/1] {131} - ¦ ¦ ¦ °--SYMBOL: chang [0/0] {130} - ¦ ¦ ¦--LEFT_ASSIGN: <- [0/1] {132} - ¦ ¦ °--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: pkg_r [0/0] {140} - ¦ ¦ ¦ °--SYMBOL: pkg_r [0/0] {139} - ¦ ¦ ¦--',': , [0/1] {141} - ¦ ¦ ¦--expr: prett [0/0] {142} - ¦ ¦ ¦ ¦--expr: prett [0/0] {144} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: prett [0/0] {143} - ¦ ¦ ¦ ¦--'(': ( [0/4] {145} - ¦ ¦ ¦ ¦--expr: trans [1/0] {147} - ¦ ¦ ¦ ¦ °--SYMBOL: trans [0/0] {146} - ¦ ¦ ¦ ¦--',': , [0/1] {148} - ¦ ¦ ¦ ¦--expr: filet [0/0] {150} - ¦ ¦ ¦ ¦ °--SYMBOL: filet [0/0] {149} - ¦ ¦ ¦ ¦--',': , [0/1] {151} - ¦ ¦ ¦ ¦--expr: exclu [0/0] {153} - ¦ ¦ ¦ ¦ °--SYMBOL: exclu [0/0] {152} - ¦ ¦ ¦ ¦--',': , [0/1] {154} - ¦ ¦ ¦ ¦--expr: inclu [0/2] {156} - ¦ ¦ ¦ ¦ °--SYMBOL: inclu [0/0] {155} - ¦ ¦ ¦ °--')': ) [1/0] {157} - ¦ ¦ °--')': ) [0/0] {158} - ¦ ¦--expr: invis [1/0] {159} - ¦ ¦ ¦--expr: invis [0/0] {161} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: invis [0/0] {160} - ¦ ¦ ¦--'(': ( [0/0] {162} - ¦ ¦ ¦--expr: chang [0/0] {164} - ¦ ¦ ¦ °--SYMBOL: chang [0/0] {163} - ¦ ¦ °--')': ) [0/0] {165} - ¦ °--'}': } [1/0] {166} - ¦--expr: prett [2/0] {167} - ¦ ¦--expr: prett [0/1] {169} - ¦ ¦ °--SYMBOL: prett [0/0] {168} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {170} - ¦ °--expr: funct [0/0] {171} - ¦ ¦--FUNCTION: funct [0/0] {172} - ¦ ¦--'(': ( [0/0] {173} - ¦ ¦--SYMBOL_FORMALS: trans [0/0] {174} - ¦ ¦--',': , [0/25] {175} - ¦ ¦--SYMBOL_FORMALS: filet [1/0] {176} - ¦ ¦--',': , [0/25] {177} - ¦ ¦--SYMBOL_FORMALS: exclu [1/0] {178} - ¦ ¦--',': , [0/25] {179} - ¦ ¦--SYMBOL_FORMALS: inclu [1/0] {180} - ¦ ¦--')': ) [0/1] {181} - ¦ °--expr: { - f [0/0] {182} - ¦ ¦--'{': { [0/2] {183} - ¦ ¦--expr: filet [1/2] {184} - ¦ ¦ ¦--expr: filet [0/1] {186} - ¦ ¦ ¦ °--SYMBOL: filet [0/0] {185} - ¦ ¦ ¦--LEFT_ASSIGN: <- [0/1] {187} - ¦ ¦ °--expr: set_a [0/0] {188} - ¦ ¦ ¦--expr: set_a [0/0] {190} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: set_a [0/0] {189} - ¦ ¦ ¦--'(': ( [0/0] {191} - ¦ ¦ ¦--expr: filet [0/0] {193} - ¦ ¦ ¦ °--SYMBOL: filet [0/0] {192} - ¦ ¦ °--')': ) [0/0] {194} - ¦ ¦--expr: r_fil [1/2] {195} - ¦ ¦ ¦--expr: r_fil [0/1] {197} - ¦ ¦ ¦ °--SYMBOL: r_fil [0/0] {196} - ¦ ¦ ¦--LEFT_ASSIGN: <- [0/1] {198} - ¦ ¦ ¦--expr: vigne [0/1] {201} - ¦ ¦ ¦ °--SYMBOL: vigne [0/0] {200} - ¦ ¦ ¦--LEFT_ASSIGN: <- [0/1] {202} - ¦ ¦ ¦--expr: readm [0/1] {205} - ¦ ¦ ¦ °--SYMBOL: readm [0/0] {204} - ¦ ¦ ¦--LEFT_ASSIGN: <- [0/1] {206} - ¦ ¦ °--expr: NULL [0/0] {208} - ¦ ¦ °--NULL_CONST: NULL [0/0] {207} - ¦ ¦--expr: if (" [2/2] {209} - ¦ ¦ ¦--IF: if [0/1] {210} - ¦ ¦ ¦--'(': ( [0/0] {211} - ¦ ¦ ¦--expr: "\\.r [0/0] {212} - ¦ ¦ ¦ ¦--expr: "\\.r [0/1] {214} - ¦ ¦ ¦ ¦ °--STR_CONST: "\\.r [0/0] {213} - ¦ ¦ ¦ ¦--SPECIAL-IN: %in% [0/1] {215} - ¦ ¦ ¦ °--expr: filet [0/0] {217} - ¦ ¦ ¦ °--SYMBOL: filet [0/0] {216} - ¦ ¦ ¦--')': ) [0/1] {218} - ¦ ¦ °--expr: { - [0/0] {219} - ¦ ¦ ¦--'{': { [0/4] {220} - ¦ ¦ ¦--expr: r_fil [1/2] {221} - ¦ ¦ ¦ ¦--expr: r_fil [0/1] {223} - ¦ ¦ ¦ ¦ °--SYMBOL: r_fil [0/0] {222} - ¦ ¦ ¦ ¦--LEFT_ASSIGN: <- [0/1] {224} - ¦ ¦ ¦ °--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: c("R" [0/0] {231} - ¦ ¦ ¦ ¦ ¦--expr: c [0/0] {233} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {232} - ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {234} - ¦ ¦ ¦ ¦ ¦--expr: "R" [0/0] {236} - ¦ ¦ ¦ ¦ ¦ °--STR_CONST: "R" [0/0] {235} - ¦ ¦ ¦ ¦ ¦--',': , [0/1] {237} - ¦ ¦ ¦ ¦ ¦--expr: "test [0/0] {239} - ¦ ¦ ¦ ¦ ¦ °--STR_CONST: "test [0/0] {238} - ¦ ¦ ¦ ¦ ¦--',': , [0/1] {240} - ¦ ¦ ¦ ¦ ¦--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: "\\.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: 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: 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: TRUE [0/4] {263} - ¦ ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {262} - ¦ ¦ ¦ °--')': ) [1/0] {264} - ¦ ¦ °--'}': } [1/0] {265} - ¦ ¦--expr: if (" [2/2] {266} - ¦ ¦ ¦--IF: if [0/1] {267} - ¦ ¦ ¦--'(': ( [0/0] {268} - ¦ ¦ ¦--expr: "\\.r [0/0] {269} - ¦ ¦ ¦ ¦--expr: "\\.r [0/1] {271} - ¦ ¦ ¦ ¦ °--STR_CONST: "\\.r [0/0] {270} - ¦ ¦ ¦ ¦--SPECIAL-IN: %in% [0/1] {272} - ¦ ¦ ¦ °--expr: filet [0/0] {274} - ¦ ¦ ¦ °--SYMBOL: filet [0/0] {273} - ¦ ¦ ¦--')': ) [0/1] {275} - ¦ ¦ °--expr: { - [0/0] {276} - ¦ ¦ ¦--'{': { [0/4] {277} - ¦ ¦ ¦--expr: vigne [1/4] {278} - ¦ ¦ ¦ ¦--expr: vigne [0/1] {280} - ¦ ¦ ¦ ¦ °--SYMBOL: vigne [0/0] {279} - ¦ ¦ ¦ ¦--LEFT_ASSIGN: <- [0/1] {281} - ¦ ¦ ¦ °--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: "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: "\\.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: 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: 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: TRUE [0/4] {309} - ¦ ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {308} - ¦ ¦ ¦ °--')': ) [1/0] {310} - ¦ ¦ ¦--expr: readm [1/2] {311} - ¦ ¦ ¦ ¦--expr: readm [0/1] {313} - ¦ ¦ ¦ ¦ °--SYMBOL: readm [0/0] {312} - ¦ ¦ ¦ ¦--LEFT_ASSIGN: <- [0/1] {314} - ¦ ¦ ¦ °--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: "^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: TRUE [0/0] {327} - ¦ ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {326} - ¦ ¦ ¦ °--')': ) [0/0] {328} - ¦ ¦ °--'}': } [1/0] {329} - ¦ ¦--expr: files [2/2] {330} - ¦ ¦ ¦--expr: files [0/1] {332} - ¦ ¦ ¦ °--SYMBOL: files [0/0] {331} - ¦ ¦ ¦--LEFT_ASSIGN: <- [0/1] {333} - ¦ ¦ °--expr: setdi [0/0] {334} - ¦ ¦ ¦--expr: setdi [0/0] {336} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: setdi [0/0] {335} - ¦ ¦ ¦--'(': ( [0/0] {337} - ¦ ¦ ¦--expr: c(r_f [0/0] {338} - ¦ ¦ ¦ ¦--expr: c [0/0] {340} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {339} - ¦ ¦ ¦ ¦--'(': ( [0/0] {341} - ¦ ¦ ¦ ¦--expr: r_fil [0/0] {343} - ¦ ¦ ¦ ¦ °--SYMBOL: r_fil [0/0] {342} - ¦ ¦ ¦ ¦--',': , [0/1] {344} - ¦ ¦ ¦ ¦--expr: vigne [0/0] {346} - ¦ ¦ ¦ ¦ °--SYMBOL: vigne [0/0] {345} - ¦ ¦ ¦ ¦--',': , [0/1] {347} - ¦ ¦ ¦ ¦--expr: readm [0/0] {349} - ¦ ¦ ¦ ¦ °--SYMBOL: readm [0/0] {348} - ¦ ¦ ¦ °--')': ) [0/0] {350} - ¦ ¦ ¦--',': , [0/1] {351} - ¦ ¦ ¦--expr: exclu [0/0] {353} - ¦ ¦ ¦ °--SYMBOL: exclu [0/0] {352} - ¦ ¦ °--')': ) [0/0] {354} - ¦ ¦--expr: trans [1/0] {355} - ¦ ¦ ¦--expr: trans [0/0] {357} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: trans [0/0] {356} - ¦ ¦ ¦--'(': ( [0/0] {358} - ¦ ¦ ¦--expr: files [0/0] {360} - ¦ ¦ ¦ °--SYMBOL: files [0/0] {359} - ¦ ¦ ¦--',': , [0/1] {361} - ¦ ¦ ¦--expr: trans [0/0] {363} - ¦ ¦ ¦ °--SYMBOL: trans [0/0] {362} - ¦ ¦ ¦--',': , [0/1] {364} - ¦ ¦ ¦--expr: inclu [0/0] {366} - ¦ ¦ ¦ °--SYMBOL: inclu [0/0] {365} - ¦ ¦ °--')': ) [0/0] {367} - ¦ °--'}': } [1/0] {368} - ¦--COMMENT: #' St [3/0] {369} - ¦--COMMENT: #' [1/0] {370} - ¦--COMMENT: #' St [1/0] {371} - ¦--COMMENT: #' to [1/0] {372} - ¦--COMMENT: #' @p [1/0] {373} - ¦--COMMENT: #' @i [1/0] {374} - ¦--COMMENT: #' @f [1/0] {375} - ¦--COMMENT: #' @e [1/0] {376} - ¦--COMMENT: #' st [1/0] {377} - ¦--COMMENT: #' st [1/0] {378} - ¦--COMMENT: #' st [1/0] {379} - ¦--COMMENT: #' st [1/0] {380} - ¦--COMMENT: #' st [1/0] {381} - ¦--COMMENT: #' # [1/0] {382} - ¦--COMMENT: #' st [1/0] {383} - ¦--COMMENT: #' st [1/0] {384} - ¦--COMMENT: #' @e [1/0] {385} - ¦--expr: style [1/0] {386} - ¦ ¦--expr: style [0/1] {388} - ¦ ¦ °--SYMBOL: style [0/0] {387} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {389} - ¦ °--expr: funct [0/0] {390} - ¦ ¦--FUNCTION: funct [0/0] {391} - ¦ ¦--'(': ( [0/0] {392} - ¦ ¦--SYMBOL_FORMALS: text [0/0] {393} - ¦ ¦--',': , [0/23] {394} - ¦ ¦--SYMBOL_FORMALS: ... [1/0] {395} - ¦ ¦--',': , [0/23] {396} - ¦ ¦--SYMBOL_FORMALS: style [1/1] {397} - ¦ ¦--EQ_FORMALS: = [0/1] {398} - ¦ ¦--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: style [0/0] {404} - ¦ ¦ ¦--expr: style [0/0] {406} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: style [0/0] {405} - ¦ ¦ ¦--'(': ( [0/0] {407} - ¦ ¦ ¦--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: TRUE [0/0] {415} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {414} - ¦ ¦--')': ) [0/1] {416} - ¦ °--expr: { - t [0/0] {417} - ¦ ¦--'{': { [0/2] {418} - ¦ ¦--expr: trans [1/2] {419} - ¦ ¦ ¦--expr: trans [0/1] {421} - ¦ ¦ ¦ °--SYMBOL: trans [0/0] {420} - ¦ ¦ ¦--LEFT_ASSIGN: <- [0/1] {422} - ¦ ¦ °--expr: make_ [0/0] {423} - ¦ ¦ ¦--expr: make_ [0/0] {425} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: make_ [0/0] {424} - ¦ ¦ ¦--'(': ( [0/0] {426} - ¦ ¦ ¦--expr: trans [0/0] {428} - ¦ ¦ ¦ °--SYMBOL: trans [0/0] {427} - ¦ ¦ ¦--',': , [0/1] {429} - ¦ ¦ ¦--expr: inclu [0/0] {431} - ¦ ¦ ¦ °--SYMBOL: inclu [0/0] {430} - ¦ ¦ °--')': ) [0/0] {432} - ¦ ¦--expr: style [1/2] {433} - ¦ ¦ ¦--expr: style [0/1] {435} - ¦ ¦ ¦ °--SYMBOL: style [0/0] {434} - ¦ ¦ ¦--LEFT_ASSIGN: <- [0/1] {436} - ¦ ¦ °--expr: trans [0/0] {437} - ¦ ¦ ¦--expr: trans [0/0] {439} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: trans [0/0] {438} - ¦ ¦ ¦--'(': ( [0/0] {440} - ¦ ¦ ¦--expr: text [0/0] {442} - ¦ ¦ ¦ °--SYMBOL: text [0/0] {441} - ¦ ¦ °--')': ) [0/0] {443} - ¦ ¦--expr: const [1/0] {444} - ¦ ¦ ¦--expr: const [0/0] {446} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: const [0/0] {445} - ¦ ¦ ¦--'(': ( [0/0] {447} - ¦ ¦ ¦--expr: style [0/0] {449} - ¦ ¦ ¦ °--SYMBOL: style [0/0] {448} - ¦ ¦ °--')': ) [0/0] {450} - ¦ °--'}': } [1/0] {451} - ¦--COMMENT: #' Pr [2/0] {452} - ¦--COMMENT: #' [1/0] {453} - ¦--COMMENT: #' Pe [1/0] {454} - ¦--COMMENT: #' Ca [1/0] {455} - ¦--COMMENT: #' @p [1/0] {456} - ¦--COMMENT: #' @p [1/0] {457} - ¦--COMMENT: #' [1/0] {458} - ¦--COMMENT: #' @i [1/0] {459} - ¦--COMMENT: #' @i [1/0] {460} - ¦--COMMENT: #' @i [1/0] {461} - ¦--COMMENT: #' @i [1/0] {462} - ¦--COMMENT: #' @f [1/0] {463} - ¦--COMMENT: #' @e [1/0] {464} - ¦--COMMENT: #' \d [1/0] {465} - ¦--COMMENT: #' st [1/0] {466} - ¦--COMMENT: #' } [1/0] {467} - ¦--COMMENT: #' @e [1/0] {468} - ¦--expr: style [1/0] {469} - ¦ ¦--expr: style [0/1] {471} - ¦ ¦ °--SYMBOL: style [0/0] {470} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {472} - ¦ °--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} - ¦ ¦ °--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: tidyv [0/0] {486} - ¦ ¦ °--SYMBOL: tidyv [0/0] {485} - ¦ ¦--',': , [0/22] {487} - ¦ ¦--SYMBOL_FORMALS: trans [1/1] {488} - ¦ ¦--EQ_FORMALS: = [0/1] {489} - ¦ ¦--expr: style [0/0] {490} - ¦ ¦ ¦--expr: style [0/0] {492} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: style [0/0] {491} - ¦ ¦ ¦--'(': ( [0/0] {493} - ¦ ¦ ¦--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: "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: 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: 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: TRUE [0/0] {516} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {515} - ¦ ¦--')': ) [0/1] {517} - ¦ °--expr: { - c [0/0] {518} - ¦ ¦--'{': { [0/2] {519} - ¦ ¦--expr: chang [1/2] {520} - ¦ ¦ ¦--expr: chang [0/1] {522} - ¦ ¦ ¦ °--SYMBOL: chang [0/0] {521} - ¦ ¦ ¦--LEFT_ASSIGN: <- [0/1] {523} - ¦ ¦ °--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: path [1/0] {531} - ¦ ¦ ¦ °--SYMBOL: path [0/0] {530} - ¦ ¦ ¦--',': , [0/1] {532} - ¦ ¦ ¦--expr: prett [0/2] {533} - ¦ ¦ ¦ ¦--expr: prett [0/0] {535} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: prett [0/0] {534} - ¦ ¦ ¦ ¦--'(': ( [0/6] {536} - ¦ ¦ ¦ ¦--expr: trans [1/0] {538} - ¦ ¦ ¦ ¦ °--SYMBOL: trans [0/0] {537} - ¦ ¦ ¦ ¦--',': , [0/1] {539} - ¦ ¦ ¦ ¦--expr: filet [0/0] {541} - ¦ ¦ ¦ ¦ °--SYMBOL: filet [0/0] {540} - ¦ ¦ ¦ ¦--',': , [0/1] {542} - ¦ ¦ ¦ ¦--expr: recur [0/0] {544} - ¦ ¦ ¦ ¦ °--SYMBOL: recur [0/0] {543} - ¦ ¦ ¦ ¦--',': , [0/1] {545} - ¦ ¦ ¦ ¦--expr: exclu [0/0] {547} - ¦ ¦ ¦ ¦ °--SYMBOL: exclu [0/0] {546} - ¦ ¦ ¦ ¦--',': , [0/1] {548} - ¦ ¦ ¦ ¦--expr: inclu [0/4] {550} - ¦ ¦ ¦ ¦ °--SYMBOL: inclu [0/0] {549} - ¦ ¦ ¦ °--')': ) [1/0] {551} - ¦ ¦ °--')': ) [1/0] {552} - ¦ ¦--expr: invis [1/0] {553} - ¦ ¦ ¦--expr: invis [0/0] {555} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: invis [0/0] {554} - ¦ ¦ ¦--'(': ( [0/0] {556} - ¦ ¦ ¦--expr: chang [0/0] {558} - ¦ ¦ ¦ °--SYMBOL: chang [0/0] {557} - ¦ ¦ °--')': ) [0/0] {559} - ¦ °--'}': } [1/0] {560} - ¦--COMMENT: #' Pr [2/0] {561} - ¦--COMMENT: #' [1/0] {562} - ¦--COMMENT: #' Th [1/0] {563} - ¦--COMMENT: #' @i [1/0] {564} - ¦--COMMENT: #' @p [1/0] {565} - ¦--COMMENT: #' [1/0] {566} - ¦--COMMENT: #' @k [1/0] {567} - ¦--expr: prett [1/0] {568} - ¦ ¦--expr: prett [0/1] {570} - ¦ ¦ °--SYMBOL: prett [0/0] {569} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {571} - ¦ °--expr: funct [0/0] {572} - ¦ ¦--FUNCTION: funct [0/0] {573} - ¦ ¦--'(': ( [0/0] {574} - ¦ ¦--SYMBOL_FORMALS: trans [0/0] {575} - ¦ ¦--',': , [0/25] {576} - ¦ ¦--SYMBOL_FORMALS: filet [1/0] {577} - ¦ ¦--',': , [0/25] {578} - ¦ ¦--SYMBOL_FORMALS: recur [1/0] {579} - ¦ ¦--',': , [0/25] {580} - ¦ ¦--SYMBOL_FORMALS: exclu [1/0] {581} - ¦ ¦--',': , [0/25] {582} - ¦ ¦--SYMBOL_FORMALS: inclu [1/0] {583} - ¦ ¦--')': ) [0/1] {584} - ¦ °--expr: { - f [0/0] {585} - ¦ ¦--'{': { [0/2] {586} - ¦ ¦--expr: files [1/2] {587} - ¦ ¦ ¦--expr: files [0/1] {589} - ¦ ¦ ¦ °--SYMBOL: files [0/0] {588} - ¦ ¦ ¦--LEFT_ASSIGN: <- [0/1] {590} - ¦ ¦ °--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} - ¦ ¦ ¦ °--STR_CONST: "." [0/0] {597} - ¦ ¦ ¦--',': , [0/1] {599} - ¦ ¦ ¦--SYMBOL_SUB: patte [0/1] {600} - ¦ ¦ ¦--EQ_SUB: = [0/1] {601} - ¦ ¦ ¦--expr: map_f [0/0] {602} - ¦ ¦ ¦ ¦--expr: map_f [0/0] {604} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: map_f [0/0] {603} - ¦ ¦ ¦ ¦--'(': ( [0/0] {605} - ¦ ¦ ¦ ¦--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: 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: recur [0/0] {618} - ¦ ¦ ¦ °--SYMBOL: recur [0/0] {617} - ¦ ¦ ¦--',': , [0/1] {619} - ¦ ¦ ¦--SYMBOL_SUB: full. [0/1] {620} - ¦ ¦ ¦--EQ_SUB: = [0/1] {621} - ¦ ¦ ¦--expr: TRUE [0/2] {623} - ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {622} - ¦ ¦ °--')': ) [1/0] {624} - ¦ ¦--expr: trans [1/0] {625} - ¦ ¦ ¦--expr: trans [0/0] {627} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: trans [0/0] {626} - ¦ ¦ ¦--'(': ( [0/4] {628} - ¦ ¦ ¦--expr: setdi [1/0] {629} - ¦ ¦ ¦ ¦--expr: setdi [0/0] {631} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: setdi [0/0] {630} - ¦ ¦ ¦ ¦--'(': ( [0/0] {632} - ¦ ¦ ¦ ¦--expr: files [0/0] {634} - ¦ ¦ ¦ ¦ °--SYMBOL: files [0/0] {633} - ¦ ¦ ¦ ¦--',': , [0/1] {635} - ¦ ¦ ¦ ¦--expr: exclu [0/0] {637} - ¦ ¦ ¦ ¦ °--SYMBOL: exclu [0/0] {636} - ¦ ¦ ¦ °--')': ) [0/0] {638} - ¦ ¦ ¦--',': , [0/1] {639} - ¦ ¦ ¦--expr: trans [0/0] {641} - ¦ ¦ ¦ °--SYMBOL: trans [0/0] {640} - ¦ ¦ ¦--',': , [0/1] {642} - ¦ ¦ ¦--expr: inclu [0/2] {644} - ¦ ¦ ¦ °--SYMBOL: inclu [0/0] {643} - ¦ ¦ °--')': ) [1/0] {645} - ¦ °--'}': } [1/0] {646} - ¦--COMMENT: #' St [2/0] {647} - ¦--COMMENT: #' [1/0] {648} - ¦--COMMENT: #' Pe [1/0] {649} - ¦--COMMENT: #' Ca [1/0] {650} - ¦--COMMENT: #' @s [1/0] {651} - ¦--COMMENT: #' UT [1/0] {652} - ¦--COMMENT: #' be [1/0] {653} - ¦--COMMENT: #' @p [1/0] {654} - ¦--COMMENT: #' @i [1/0] {655} - ¦--COMMENT: #' @i [1/0] {656} - ¦--COMMENT: #' @i [1/0] {657} - ¦--COMMENT: #' @i [1/0] {658} - ¦--COMMENT: #' @e [1/0] {659} - ¦--COMMENT: #' # [1/0] {660} - ¦--COMMENT: #' fi [1/0] {661} - ¦--COMMENT: #' xf [1/0] {662} - ¦--COMMENT: #' st [1/0] {663} - ¦--COMMENT: #' st [1/0] {664} - ¦--COMMENT: #' xf [1/0] {665} - ¦--COMMENT: #' un [1/0] {666} - ¦--COMMENT: #' @f [1/0] {667} - ¦--COMMENT: #' @e [1/0] {668} - °--expr: style [1/0] {669} - ¦--expr: style [0/1] {671} - ¦ °--SYMBOL: style [0/0] {670} - ¦--LEFT_ASSIGN: <- [0/1] {672} - °--expr: funct [0/0] {673} - ¦--FUNCTION: funct [0/0] {674} - ¦--'(': ( [0/0] {675} - ¦--SYMBOL_FORMALS: path [0/0] {676} - ¦--',': , [0/23] {677} - ¦--SYMBOL_FORMALS: ... [1/0] {678} - ¦--',': , [0/23] {679} - ¦--SYMBOL_FORMALS: style [1/1] {680} - ¦--EQ_FORMALS: = [0/1] {681} - ¦--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: style [0/0] {687} - ¦ ¦--expr: style [0/0] {689} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: style [0/0] {688} - ¦ ¦--'(': ( [0/0] {690} - ¦ ¦--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: TRUE [0/0] {698} - ¦ °--NUM_CONST: TRUE [0/0] {697} - ¦--')': ) [0/1] {699} - °--expr: { - c [0/0] {700} - ¦--'{': { [0/2] {701} - ¦--expr: chang [1/2] {702} - ¦ ¦--expr: chang [0/1] {704} - ¦ ¦ °--SYMBOL: chang [0/0] {703} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {705} - ¦ °--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: dirna [1/0] {712} - ¦ ¦ ¦--expr: dirna [0/0] {714} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: dirna [0/0] {713} - ¦ ¦ ¦--'(': ( [0/0] {715} - ¦ ¦ ¦--expr: path [0/0] {717} - ¦ ¦ ¦ °--SYMBOL: path [0/0] {716} - ¦ ¦ °--')': ) [0/0] {718} - ¦ ¦--',': , [0/4] {719} - ¦ ¦--expr: trans [1/2] {720} - ¦ ¦ ¦--expr: trans [0/0] {722} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: trans [0/0] {721} - ¦ ¦ ¦--'(': ( [0/0] {723} - ¦ ¦ ¦--expr: basen [0/0] {724} - ¦ ¦ ¦ ¦--expr: basen [0/0] {726} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: basen [0/0] {725} - ¦ ¦ ¦ ¦--'(': ( [0/0] {727} - ¦ ¦ ¦ ¦--expr: path [0/0] {729} - ¦ ¦ ¦ ¦ °--SYMBOL: path [0/0] {728} - ¦ ¦ ¦ °--')': ) [0/0] {730} - ¦ ¦ ¦--',': , [0/1] {731} - ¦ ¦ ¦--expr: trans [0/0] {733} - ¦ ¦ ¦ °--SYMBOL: trans [0/0] {732} - ¦ ¦ ¦--',': , [0/1] {734} - ¦ ¦ ¦--expr: inclu [0/0] {736} - ¦ ¦ ¦ °--SYMBOL: inclu [0/0] {735} - ¦ ¦ °--')': ) [0/0] {737} - ¦ °--')': ) [1/0] {738} - ¦--expr: invis [1/0] {739} - ¦ ¦--expr: invis [0/0] {741} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: invis [0/0] {740} - ¦ ¦--'(': ( [0/0] {742} - ¦ ¦--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 deleted file mode 100644 index 9da283113..000000000 --- a/tests/testthat/roxygen-examples-complete/11-start-with-dontrun-in_tree +++ /dev/null @@ -1,113 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: #' Hi [0/0] {1} - ¦--COMMENT: #' [1/0] {2} - ¦--COMMENT: #' x [1/0] {3} - ¦--COMMENT: #' @e [1/0] {4} - ¦--COMMENT: #' \d [1/0] {5} - ¦--COMMENT: #' st [1/0] {6} - ¦--COMMENT: #' st [1/0] {7} - ¦--COMMENT: #' [1/0] {8} - ¦--COMMENT: #' [1/0] {9} - ¦--COMMENT: #' ) [1/0] {10} - ¦--COMMENT: #' } [1/0] {11} - ¦--COMMENT: #' @e [1/0] {12} - °--expr: style [1/0] {13} - ¦--expr: style [0/1] {15} - ¦ °--SYMBOL: style [0/0] {14} - ¦--LEFT_ASSIGN: <- [0/1] {16} - °--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} - ¦ °--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: tidyv [0/0] {30} - ¦ °--SYMBOL: tidyv [0/0] {29} - ¦--',': , [0/22] {31} - ¦--SYMBOL_FORMALS: trans [1/1] {32} - ¦--EQ_FORMALS: = [0/1] {33} - ¦--expr: style [0/0] {34} - ¦ ¦--expr: style [0/0] {36} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: style [0/0] {35} - ¦ ¦--'(': ( [0/0] {37} - ¦ ¦--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: "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: "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: TRUE [0/0] {55} - ¦ °--NUM_CONST: TRUE [0/0] {54} - ¦--')': ) [0/1] {56} - °--expr: { - p [0/0] {57} - ¦--'{': { [0/2] {58} - ¦--expr: pkg_r [1/2] {59} - ¦ ¦--expr: pkg_r [0/1] {61} - ¦ ¦ °--SYMBOL: pkg_r [0/0] {60} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {62} - ¦ °--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: pkg [0/0] {72} - ¦ ¦ °--SYMBOL: pkg [0/0] {71} - ¦ °--')': ) [0/0] {73} - ¦--expr: chang [1/2] {74} - ¦ ¦--expr: chang [0/1] {76} - ¦ ¦ °--SYMBOL: chang [0/0] {75} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {77} - ¦ °--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: pkg_r [0/0] {85} - ¦ ¦ °--SYMBOL: pkg_r [0/0] {84} - ¦ ¦--',': , [0/1] {86} - ¦ ¦--expr: prett [0/0] {87} - ¦ ¦ ¦--expr: prett [0/0] {89} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: prett [0/0] {88} - ¦ ¦ ¦--'(': ( [0/4] {90} - ¦ ¦ ¦--expr: trans [1/0] {92} - ¦ ¦ ¦ °--SYMBOL: trans [0/0] {91} - ¦ ¦ ¦--',': , [0/1] {93} - ¦ ¦ ¦--expr: filet [0/0] {95} - ¦ ¦ ¦ °--SYMBOL: filet [0/0] {94} - ¦ ¦ ¦--',': , [0/1] {96} - ¦ ¦ ¦--expr: exclu [0/0] {98} - ¦ ¦ ¦ °--SYMBOL: exclu [0/0] {97} - ¦ ¦ ¦--',': , [0/1] {99} - ¦ ¦ ¦--expr: inclu [0/2] {101} - ¦ ¦ ¦ °--SYMBOL: inclu [0/0] {100} - ¦ ¦ °--')': ) [1/0] {102} - ¦ °--')': ) [0/0] {103} - ¦--expr: invis [1/0] {104} - ¦ ¦--expr: invis [0/0] {106} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: invis [0/0] {105} - ¦ ¦--'(': ( [0/0] {107} - ¦ ¦--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 deleted file mode 100644 index 2abe159d9..000000000 --- a/tests/testthat/roxygen-examples-complete/12-dontshow-dontrun-donttest-in_tree +++ /dev/null @@ -1,235 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: #' Cr [0/0] {1} - ¦--COMMENT: #' [1/0] {2} - ¦--COMMENT: #' @p [1/0] {3} - ¦--COMMENT: #' [1/0] {4} - ¦--COMMENT: #' @e [1/0] {5} - ¦--COMMENT: #' se [1/0] {6} - ¦--COMMENT: #' [1/0] {7} - ¦--COMMENT: #' [1/0] {8} - ¦--COMMENT: #' [1/0] {9} - ¦--COMMENT: #' } [1/0] {10} - ¦--COMMENT: #' @e [1/0] {11} - ¦--COMMENT: #' \d [1/0] {12} - ¦--COMMENT: #' { [1/0] {13} - ¦--COMMENT: #' [1/0] {14} - ¦--COMMENT: #' } [1/0] {15} - ¦--COMMENT: #' } [1/0] {16} - ¦--COMMENT: #' se [1/0] {17} - ¦--COMMENT: #' [1/0] {18} - ¦--COMMENT: #' } [1/0] {19} - ¦--COMMENT: #' @e [1/0] {20} - ¦--COMMENT: #' \d [1/0] {21} - ¦--COMMENT: #' st [1/0] {22} - ¦--COMMENT: #' ", [1/0] {23} - ¦--COMMENT: #' } [1/0] {24} - ¦--COMMENT: #' @i [1/0] {25} - ¦--COMMENT: #' @e [1/0] {26} - ¦--expr: creat [1/0] {27} - ¦ ¦--expr: creat [0/1] {29} - ¦ ¦ °--SYMBOL: creat [0/0] {28} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {30} - ¦ °--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: defau [0/0] {37} - ¦ ¦ °--SYMBOL: defau [0/0] {36} - ¦ ¦--',': , [0/31] {38} - ¦ ¦--SYMBOL_FORMALS: line_ [1/1] {39} - ¦ ¦--EQ_FORMALS: = [0/1] {40} - ¦ ¦--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: 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: 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: 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: 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: 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: { - l [0/0] {72} - ¦ ¦--'{': { [0/2] {73} - ¦ ¦--expr: list( [1/0] {74} - ¦ ¦ ¦--expr: list( [0/1] {75} - ¦ ¦ ¦ ¦--expr: list [0/0] {77} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: list [0/0] {76} - ¦ ¦ ¦ ¦--'(': ( [0/4] {78} - ¦ ¦ ¦ ¦--COMMENT: # tra [1/4] {79} - ¦ ¦ ¦ ¦--SYMBOL_SUB: initi [1/1] {80} - ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {81} - ¦ ¦ ¦ ¦--expr: list( [0/0] {82} - ¦ ¦ ¦ ¦ ¦--expr: list [0/0] {84} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: list [0/0] {83} - ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {85} - ¦ ¦ ¦ ¦ ¦--expr: initi [0/0] {87} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL: initi [0/0] {86} - ¦ ¦ ¦ ¦ °--')': ) [0/0] {88} - ¦ ¦ ¦ ¦--',': , [0/4] {89} - ¦ ¦ ¦ ¦--expr: line_ [1/0] {91} - ¦ ¦ ¦ ¦ °--SYMBOL: line_ [0/0] {90} - ¦ ¦ ¦ ¦--',': , [0/4] {92} - ¦ ¦ ¦ ¦--expr: space [1/0] {94} - ¦ ¦ ¦ ¦ °--SYMBOL: space [0/0] {93} - ¦ ¦ ¦ ¦--',': , [0/4] {95} - ¦ ¦ ¦ ¦--expr: token [1/0] {97} - ¦ ¦ ¦ ¦ °--SYMBOL: token [0/0] {96} - ¦ ¦ ¦ ¦--',': , [0/4] {98} - ¦ ¦ ¦ ¦--expr: inden [1/0] {100} - ¦ ¦ ¦ ¦ °--SYMBOL: inden [0/0] {99} - ¦ ¦ ¦ ¦--',': , [0/4] {101} - ¦ ¦ ¦ ¦--COMMENT: # tra [1/4] {102} - ¦ ¦ ¦ ¦--expr: use_r [1/0] {104} - ¦ ¦ ¦ ¦ °--SYMBOL: use_r [0/0] {103} - ¦ ¦ ¦ ¦--',': , [0/4] {105} - ¦ ¦ ¦ ¦--expr: reind [1/2] {107} - ¦ ¦ ¦ ¦ °--SYMBOL: reind [0/0] {106} - ¦ ¦ ¦ °--')': ) [1/0] {108} - ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/4] {109} - ¦ ¦ °--expr: map(c [1/0] {110} - ¦ ¦ ¦--expr: map [0/0] {112} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: map [0/0] {111} - ¦ ¦ ¦--'(': ( [0/0] {113} - ¦ ¦ ¦--expr: compa [0/0] {115} - ¦ ¦ ¦ °--SYMBOL: compa [0/0] {114} - ¦ ¦ °--')': ) [0/0] {116} - ¦ °--'}': } [1/0] {117} - ¦--COMMENT: #' Cr [3/0] {118} - ¦--COMMENT: #' [1/0] {119} - ¦--COMMENT: #' @p [1/0] {120} - ¦--COMMENT: #' [1/0] {121} - ¦--COMMENT: #' @e [1/0] {122} - ¦--COMMENT: #' se [1/0] {123} - ¦--COMMENT: #' [1/0] {124} - ¦--COMMENT: #' [1/0] {125} - ¦--COMMENT: #' [1/0] {126} - ¦--COMMENT: #' } [1/0] {127} - ¦--COMMENT: #' @e [1/0] {128} - ¦--COMMENT: #' \d [1/0] {129} - ¦--COMMENT: #' {x [1/0] {130} - ¦--COMMENT: #' } [1/0] {131} - ¦--COMMENT: #' } [1/0] {132} - ¦--COMMENT: #' se [1/0] {133} - ¦--COMMENT: #' cr [1/0] {134} - ¦--COMMENT: #' } [1/0] {135} - ¦--COMMENT: #' @e [1/0] {136} - ¦--COMMENT: #' \d [1/0] {137} - ¦--COMMENT: #' ", [1/0] {138} - ¦--COMMENT: #' } [1/0] {139} - ¦--COMMENT: #' @i [1/0] {140} - ¦--COMMENT: #' @e [1/0] {141} - °--expr: creat [1/0] {142} - ¦--expr: creat [0/1] {144} - ¦ °--SYMBOL: creat [0/0] {143} - ¦--LEFT_ASSIGN: <- [0/1] {145} - °--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: defau [0/0] {152} - ¦ °--SYMBOL: defau [0/0] {151} - ¦--',': , [0/31] {153} - ¦--SYMBOL_FORMALS: line_ [1/1] {154} - ¦--EQ_FORMALS: = [0/1] {155} - ¦--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: 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: 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: 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: 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: 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: { - l [0/0] {187} - ¦--'{': { [0/2] {188} - ¦--expr: list( [1/0] {189} - ¦ ¦--expr: list( [0/0] {190} - ¦ ¦ ¦--expr: list [0/0] {192} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: list [0/0] {191} - ¦ ¦ ¦--'(': ( [0/4] {193} - ¦ ¦ ¦--COMMENT: #tran [1/4] {194} - ¦ ¦ ¦--SYMBOL_SUB: initi [1/1] {195} - ¦ ¦ ¦--EQ_SUB: = [0/1] {196} - ¦ ¦ ¦--expr: list( [0/0] {197} - ¦ ¦ ¦ ¦--expr: list [0/0] {199} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: list [0/0] {198} - ¦ ¦ ¦ ¦--'(': ( [0/0] {200} - ¦ ¦ ¦ ¦--expr: initi [0/0] {202} - ¦ ¦ ¦ ¦ °--SYMBOL: initi [0/0] {201} - ¦ ¦ ¦ °--')': ) [0/0] {203} - ¦ ¦ ¦--',': , [0/4] {204} - ¦ ¦ ¦--expr: line_ [1/0] {206} - ¦ ¦ ¦ °--SYMBOL: line_ [0/0] {205} - ¦ ¦ ¦--',': , [0/4] {207} - ¦ ¦ ¦--expr: space [1/0] {209} - ¦ ¦ ¦ °--SYMBOL: space [0/0] {208} - ¦ ¦ ¦--',': , [0/4] {210} - ¦ ¦ ¦--expr: token [1/0] {212} - ¦ ¦ ¦ °--SYMBOL: token [0/0] {211} - ¦ ¦ ¦--',': , [0/4] {213} - ¦ ¦ ¦--expr: inden [1/0] {215} - ¦ ¦ ¦ °--SYMBOL: inden [0/0] {214} - ¦ ¦ ¦--',': , [0/4] {216} - ¦ ¦ ¦--COMMENT: # tra [1/4] {217} - ¦ ¦ ¦--expr: use_r [1/0] {219} - ¦ ¦ ¦ °--SYMBOL: use_r [0/0] {218} - ¦ ¦ ¦--',': , [0/4] {220} - ¦ ¦ ¦--expr: reind [1/2] {222} - ¦ ¦ ¦ °--SYMBOL: reind [0/0] {221} - ¦ ¦ °--')': ) [1/0] {223} - ¦ ¦--SPECIAL-PIPE: %>% [0/4] {224} - ¦ °--expr: map(c [1/0] {225} - ¦ ¦--expr: map [0/0] {227} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: map [0/0] {226} - ¦ ¦--'(': ( [0/0] {228} - ¦ ¦--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 deleted file mode 100644 index bd1f31905..000000000 --- a/tests/testthat/roxygen-examples-complete/12-fun-decs-in-examples-in_tree +++ /dev/null @@ -1,149 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: #' Cr [0/0] {1} - ¦--COMMENT: #' [1/0] {2} - ¦--COMMENT: #' @p [1/0] {3} - ¦--COMMENT: #' [1/0] {4} - ¦--COMMENT: #' @e [1/0] {5} - ¦--COMMENT: #' se [1/0] {6} - ¦--COMMENT: #' [1/0] {7} - ¦--COMMENT: #' [1/0] {8} - ¦--COMMENT: #' [1/0] {9} - ¦--COMMENT: #' } [1/0] {10} - ¦--COMMENT: #' se [1/0] {11} - ¦--COMMENT: #' [1/0] {12} - ¦--COMMENT: #' } [1/0] {13} - ¦--COMMENT: #' st [1/0] {14} - ¦--COMMENT: #' ", [1/0] {15} - ¦--COMMENT: #' \d [1/0] {16} - ¦--COMMENT: #' se [1/0] {17} - ¦--COMMENT: #' [1/0] {18} - ¦--COMMENT: #' [1/0] {19} - ¦--COMMENT: #' [1/0] {20} - ¦--COMMENT: #' } [1/0] {21} - ¦--COMMENT: #' } [1/0] {22} - ¦--COMMENT: #' @i [1/0] {23} - ¦--COMMENT: #' @e [1/0] {24} - ¦--expr: creat [1/0] {25} - ¦ ¦--expr: creat [0/1] {27} - ¦ ¦ °--SYMBOL: creat [0/0] {26} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {28} - ¦ °--expr: funct [0/0] {29} - ¦ ¦--FUNCTION: funct [0/0] {30} - ¦ ¦--'(': ( [0/0] {31} - ¦ ¦--SYMBOL_FORMALS: initi [0/1] {32} - ¦ ¦--EQ_FORMALS: = [0/1] {33} - ¦ ¦--expr: defau [0/0] {35} - ¦ ¦ °--SYMBOL: defau [0/0] {34} - ¦ ¦--',': , [0/31] {36} - ¦ ¦--SYMBOL_FORMALS: line_ [1/1] {37} - ¦ ¦--EQ_FORMALS: = [0/1] {38} - ¦ ¦--expr: NULL [0/0] {40} - ¦ ¦ °--NULL_CONST: NULL [0/0] {39} - ¦ ¦--',': , [0/31] {41} - ¦ ¦--SYMBOL_FORMALS: space [1/1] {42} - ¦ ¦--EQ_FORMALS: = [0/1] {43} - ¦ ¦--expr: NULL [0/0] {45} - ¦ ¦ °--NULL_CONST: NULL [0/0] {44} - ¦ ¦--',': , [0/31] {46} - ¦ ¦--SYMBOL_FORMALS: token [1/1] {47} - ¦ ¦--EQ_FORMALS: = [0/1] {48} - ¦ ¦--expr: NULL [0/0] {50} - ¦ ¦ °--NULL_CONST: NULL [0/0] {49} - ¦ ¦--',': , [0/31] {51} - ¦ ¦--SYMBOL_FORMALS: inden [1/1] {52} - ¦ ¦--EQ_FORMALS: = [0/1] {53} - ¦ ¦--expr: NULL [0/0] {55} - ¦ ¦ °--NULL_CONST: NULL [0/0] {54} - ¦ ¦--',': , [0/31] {56} - ¦ ¦--SYMBOL_FORMALS: use_r [1/1] {57} - ¦ ¦--EQ_FORMALS: = [0/1] {58} - ¦ ¦--expr: FALSE [0/0] {60} - ¦ ¦ °--NUM_CONST: FALSE [0/0] {59} - ¦ ¦--',': , [0/31] {61} - ¦ ¦--SYMBOL_FORMALS: reind [1/1] {62} - ¦ ¦--EQ_FORMALS: = [0/1] {63} - ¦ ¦--expr: tidyv [0/0] {64} - ¦ ¦ ¦--expr: tidyv [0/0] {66} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: tidyv [0/0] {65} - ¦ ¦ ¦--'(': ( [0/0] {67} - ¦ ¦ °--')': ) [0/0] {68} - ¦ ¦--')': ) [0/1] {69} - ¦ °--expr: { - l [0/0] {70} - ¦ ¦--'{': { [0/2] {71} - ¦ ¦--expr: list( [1/0] {72} - ¦ ¦ ¦--expr: list( [0/1] {73} - ¦ ¦ ¦ ¦--expr: list [0/0] {75} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: list [0/0] {74} - ¦ ¦ ¦ ¦--'(': ( [0/4] {76} - ¦ ¦ ¦ ¦--COMMENT: # tra [1/4] {77} - ¦ ¦ ¦ ¦--SYMBOL_SUB: initi [1/1] {78} - ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {79} - ¦ ¦ ¦ ¦--expr: list( [0/0] {80} - ¦ ¦ ¦ ¦ ¦--expr: list [0/0] {82} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: list [0/0] {81} - ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {83} - ¦ ¦ ¦ ¦ ¦--expr: initi [0/0] {85} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL: initi [0/0] {84} - ¦ ¦ ¦ ¦ °--')': ) [0/0] {86} - ¦ ¦ ¦ ¦--',': , [0/4] {87} - ¦ ¦ ¦ ¦--expr: line_ [1/0] {89} - ¦ ¦ ¦ ¦ °--SYMBOL: line_ [0/0] {88} - ¦ ¦ ¦ ¦--',': , [0/4] {90} - ¦ ¦ ¦ ¦--expr: space [1/0] {92} - ¦ ¦ ¦ ¦ °--SYMBOL: space [0/0] {91} - ¦ ¦ ¦ ¦--',': , [0/4] {93} - ¦ ¦ ¦ ¦--expr: token [1/0] {95} - ¦ ¦ ¦ ¦ °--SYMBOL: token [0/0] {94} - ¦ ¦ ¦ ¦--',': , [0/4] {96} - ¦ ¦ ¦ ¦--expr: inden [1/0] {98} - ¦ ¦ ¦ ¦ °--SYMBOL: inden [0/0] {97} - ¦ ¦ ¦ ¦--',': , [0/4] {99} - ¦ ¦ ¦ ¦--COMMENT: # tra [1/4] {100} - ¦ ¦ ¦ ¦--expr: use_r [1/0] {102} - ¦ ¦ ¦ ¦ °--SYMBOL: use_r [0/0] {101} - ¦ ¦ ¦ ¦--',': , [0/4] {103} - ¦ ¦ ¦ ¦--expr: reind [1/2] {105} - ¦ ¦ ¦ ¦ °--SYMBOL: reind [0/0] {104} - ¦ ¦ ¦ °--')': ) [1/0] {106} - ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/4] {107} - ¦ ¦ °--expr: map(c [1/0] {108} - ¦ ¦ ¦--expr: map [0/0] {110} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: map [0/0] {109} - ¦ ¦ ¦--'(': ( [0/0] {111} - ¦ ¦ ¦--expr: compa [0/0] {113} - ¦ ¦ ¦ °--SYMBOL: compa [0/0] {112} - ¦ ¦ °--')': ) [0/0] {114} - ¦ °--'}': } [1/0] {115} - ¦--COMMENT: #' An [2/0] {116} - ¦--COMMENT: #' @e [1/0] {117} - ¦--COMMENT: #' \d [1/0] {118} - ¦--COMMENT: #' op [1/0] {119} - ¦--COMMENT: #' } [1/0] {120} - ¦--COMMENT: #' \d [1/0] {121} - ¦--COMMENT: #' op [1/0] {122} - ¦--COMMENT: #' } [1/0] {123} - ¦--COMMENT: #' \d [1/0] {124} - ¦--COMMENT: #' op [1/0] {125} - ¦--COMMENT: #' } [1/0] {126} - ¦--COMMENT: #' \d [1/0] {127} - ¦--COMMENT: #' op [1/0] {128} - ¦--COMMENT: #' } [1/0] {129} - ¦--COMMENT: #' \d [1/0] {130} - ¦--COMMENT: #' op [1/0] {131} - ¦--COMMENT: #' } [1/0] {132} - ¦--COMMENT: #' \d [1/0] {133} - ¦--COMMENT: #' op [1/0] {134} - ¦--COMMENT: #' } [1/0] {135} - ¦--COMMENT: #' op [1/0] {136} - ¦--COMMENT: #' \d [1/0] {137} - ¦--COMMENT: #' op [1/0] {138} - ¦--COMMENT: #' } [1/0] {139} - ¦--COMMENT: #' \d [1/0] {140} - ¦--COMMENT: #' op [1/0] {141} - ¦--COMMENT: #' } [1/0] {142} - ¦--COMMENT: #' \d [1/0] {143} - ¦--COMMENT: #' op [1/0] {144} - ¦--COMMENT: #' } [1/0] {145} - °--expr: NULL [1/0] {147} - °--NULL_CONST: NULL [0/0] {146} diff --git a/tests/testthat/roxygen-examples-complete/13-empty-lines-in.R b/tests/testthat/roxygen-examples-complete/13-empty-lines-in.R index e1ab00834..1af04bba3 100644 --- a/tests/testthat/roxygen-examples-complete/13-empty-lines-in.R +++ b/tests/testthat/roxygen-examples-complete/13-empty-lines-in.R @@ -12,17 +12,27 @@ #' #' #' +#' ( +#' +#' #' # more #' a <- 3 +#' +#' ) #' # a comment #' \dontrun{ +#' { +#' #' x #' +#' } +#' #' y # hi #' #' # more #' #' a <- 3 +#' #' } #' @importFrom purrr compact #' @export diff --git a/tests/testthat/roxygen-examples-complete/13-empty-lines-in_tree b/tests/testthat/roxygen-examples-complete/13-empty-lines-in_tree deleted file mode 100644 index b511569eb..000000000 --- a/tests/testthat/roxygen-examples-complete/13-empty-lines-in_tree +++ /dev/null @@ -1,120 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: #' Cr [0/0] {1} - ¦--COMMENT: #' [1/0] {2} - ¦--COMMENT: #' @p [1/0] {3} - ¦--COMMENT: #' [1/0] {4} - ¦--COMMENT: #' @e [1/0] {5} - ¦--COMMENT: #' # [1/0] {6} - ¦--COMMENT: #' [1/0] {7} - ¦--COMMENT: #' [1/0] {8} - ¦--COMMENT: #' # [1/0] {9} - ¦--COMMENT: #' [1/0] {10} - ¦--COMMENT: #' [1/0] {11} - ¦--COMMENT: #' [1/0] {12} - ¦--COMMENT: #' [1/0] {13} - ¦--COMMENT: #' # [1/0] {14} - ¦--COMMENT: #' a [1/0] {15} - ¦--COMMENT: #' # [1/0] {16} - ¦--COMMENT: #' \d [1/0] {17} - ¦--COMMENT: #' x [1/0] {18} - ¦--COMMENT: #' [1/0] {19} - ¦--COMMENT: #' y [1/0] {20} - ¦--COMMENT: #' [1/0] {21} - ¦--COMMENT: #' # [1/0] {22} - ¦--COMMENT: #' [1/0] {23} - ¦--COMMENT: #' a [1/0] {24} - ¦--COMMENT: #' } [1/0] {25} - ¦--COMMENT: #' @i [1/0] {26} - ¦--COMMENT: #' @e [1/0] {27} - °--expr: creat [1/0] {28} - ¦--expr: creat [0/1] {30} - ¦ °--SYMBOL: creat [0/0] {29} - ¦--LEFT_ASSIGN: <- [0/1] {31} - °--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: defau [0/0] {38} - ¦ °--SYMBOL: defau [0/0] {37} - ¦--',': , [0/31] {39} - ¦--SYMBOL_FORMALS: line_ [1/1] {40} - ¦--EQ_FORMALS: = [0/1] {41} - ¦--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: 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: 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: 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: 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: 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: { - l [0/0] {73} - ¦--'{': { [0/2] {74} - ¦--expr: list( [1/0] {75} - ¦ ¦--expr: list( [0/1] {76} - ¦ ¦ ¦--expr: list [0/0] {78} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: list [0/0] {77} - ¦ ¦ ¦--'(': ( [0/4] {79} - ¦ ¦ ¦--COMMENT: # tra [1/4] {80} - ¦ ¦ ¦--SYMBOL_SUB: initi [1/1] {81} - ¦ ¦ ¦--EQ_SUB: = [0/1] {82} - ¦ ¦ ¦--expr: list( [0/0] {83} - ¦ ¦ ¦ ¦--expr: list [0/0] {85} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: list [0/0] {84} - ¦ ¦ ¦ ¦--'(': ( [0/0] {86} - ¦ ¦ ¦ ¦--expr: initi [0/0] {88} - ¦ ¦ ¦ ¦ °--SYMBOL: initi [0/0] {87} - ¦ ¦ ¦ °--')': ) [0/0] {89} - ¦ ¦ ¦--',': , [0/4] {90} - ¦ ¦ ¦--expr: line_ [1/0] {92} - ¦ ¦ ¦ °--SYMBOL: line_ [0/0] {91} - ¦ ¦ ¦--',': , [0/4] {93} - ¦ ¦ ¦--expr: space [1/0] {95} - ¦ ¦ ¦ °--SYMBOL: space [0/0] {94} - ¦ ¦ ¦--',': , [0/4] {96} - ¦ ¦ ¦--expr: token [1/0] {98} - ¦ ¦ ¦ °--SYMBOL: token [0/0] {97} - ¦ ¦ ¦--',': , [0/4] {99} - ¦ ¦ ¦--expr: inden [1/0] {101} - ¦ ¦ ¦ °--SYMBOL: inden [0/0] {100} - ¦ ¦ ¦--',': , [0/4] {102} - ¦ ¦ ¦--COMMENT: # tra [1/4] {103} - ¦ ¦ ¦--expr: use_r [1/0] {105} - ¦ ¦ ¦ °--SYMBOL: use_r [0/0] {104} - ¦ ¦ ¦--',': , [0/4] {106} - ¦ ¦ ¦--expr: reind [1/2] {108} - ¦ ¦ ¦ °--SYMBOL: reind [0/0] {107} - ¦ ¦ °--')': ) [1/0] {109} - ¦ ¦--SPECIAL-PIPE: %>% [0/4] {110} - ¦ °--expr: map(c [1/0] {111} - ¦ ¦--expr: map [0/0] {113} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: map [0/0] {112} - ¦ ¦--'(': ( [0/0] {114} - ¦ ¦--expr: compa [0/0] {116} - ¦ ¦ °--SYMBOL: compa [0/0] {115} - ¦ °--')': ) [0/0] {117} - °--'}': } [1/0] {118} diff --git a/tests/testthat/roxygen-examples-complete/13-empty-lines-out.R b/tests/testthat/roxygen-examples-complete/13-empty-lines-out.R index ae4f1b9db..460600158 100644 --- a/tests/testthat/roxygen-examples-complete/13-empty-lines-out.R +++ b/tests/testthat/roxygen-examples-complete/13-empty-lines-out.R @@ -9,13 +9,15 @@ #' # two #' #' -#' -#' -#' # more -#' a <- 3 +#' ( +#' # more +#' a <- 3 +#' ) #' # a comment #' \dontrun{ -#' x +#' { +#' x +#' } #' #' y # hi #' diff --git a/tests/testthat/roxygen-examples-complete/14-pipe-dontrun-in_tree b/tests/testthat/roxygen-examples-complete/14-pipe-dontrun-in_tree deleted file mode 100644 index 6d03f57f6..000000000 --- a/tests/testthat/roxygen-examples-complete/14-pipe-dontrun-in_tree +++ /dev/null @@ -1,19 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: #' Hi [0/0] {1} - ¦--COMMENT: #' [1/0] {2} - ¦--COMMENT: #' x [1/0] {3} - ¦--COMMENT: #' @e [1/0] {4} - ¦--COMMENT: #' a [1/0] {5} - ¦--COMMENT: #' [1/0] {6} - ¦--COMMENT: #' [1/0] {7} - ¦--COMMENT: #' \d [1/0] {8} - ¦--COMMENT: #' st [1/0] {9} - ¦--COMMENT: #' [1/0] {10} - ¦--COMMENT: #' [1/0] {11} - ¦--COMMENT: #' )% [1/0] {12} - ¦--COMMENT: #' [1/0] {13} - ¦--COMMENT: #' } [1/0] {14} - ¦--COMMENT: #' ca [1/0] {15} - ¦--COMMENT: #' @e [1/0] {16} - °--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 deleted file mode 100644 index 974a1e333..000000000 --- a/tests/testthat/roxygen-examples-complete/15-roxygen-dontrun-indention-in_tree +++ /dev/null @@ -1,27 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: #' Bl [0/0] {1} - ¦--COMMENT: #' [1/0] {2} - ¦--COMMENT: #' @e [1/0] {3} - ¦--COMMENT: #' \d [1/0] {4} - ¦--COMMENT: #' st [1/0] {5} - ¦--COMMENT: #' [1/0] {6} - ¦--COMMENT: #' [1/0] {7} - ¦--COMMENT: #' [1/0] {8} - ¦--COMMENT: #' \d [1/0] {9} - ¦--COMMENT: #' [1/0] {10} - ¦--COMMENT: #' [1/0] {11} - ¦--COMMENT: #' [1/0] {12} - ¦--COMMENT: #' } [1/0] {13} - ¦--COMMENT: #' if [1/0] {14} - ¦--COMMENT: #' [1/0] {15} - ¦--COMMENT: #' [1/0] {16} - ¦--COMMENT: #' if [1/0] {17} - ¦--COMMENT: #' re [1/0] {18} - ¦--COMMENT: #'if [1/0] {19} - ¦--COMMENT: #'ret [1/0] {20} - °--expr: x <- [1/0] {21} - ¦--expr: x [0/1] {23} - ¦ °--SYMBOL: x [0/0] {22} - ¦--LEFT_ASSIGN: <- [0/1] {24} - °--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 deleted file mode 100644 index 22b238b62..000000000 --- a/tests/testthat/roxygen-examples-complete/16-dont-warn-empty-in_tree +++ /dev/null @@ -1,16 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: #' Do [0/0] {1} - ¦--COMMENT: #' [1/0] {2} - ¦--COMMENT: #' So [1/0] {3} - ¦--COMMENT: #' @e [1/0] {4} - ¦--COMMENT: #' g( [1/0] {5} - ¦--COMMENT: #' \d [1/0] {6} - ¦--COMMENT: #' f( [1/0] {7} - ¦--COMMENT: #' } [1/0] {8} - ¦--COMMENT: #' [1/0] {9} - ¦--COMMENT: #' @e [1/0] {10} - °--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/17-two-no-non-comment-in_tree b/tests/testthat/roxygen-examples-complete/17-two-no-non-comment-in_tree deleted file mode 100644 index 34ab1e4de..000000000 --- a/tests/testthat/roxygen-examples-complete/17-two-no-non-comment-in_tree +++ /dev/null @@ -1,13 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: #' @e [0/0] {1} - ¦--COMMENT: #' [1/0] {2} - ¦--COMMENT: #' [1/0] {3} - ¦--COMMENT: #' } [1/0] {4} - ¦--COMMENT: #' # [1/0] {5} - ¦--COMMENT: #' an [1/0] {6} - ¦--COMMENT: #' @e [4/0] {7} - ¦--COMMENT: #' [1/0] {8} - ¦--COMMENT: #' [1/0] {9} - ¦--COMMENT: #' } [1/0] {10} - ¦--COMMENT: #' # [1/0] {11} - °--COMMENT: #' an [1/0] {12} diff --git a/tests/testthat/roxygen-examples-complete/18-no-non-comment-in_tree b/tests/testthat/roxygen-examples-complete/18-no-non-comment-in_tree deleted file mode 100644 index 86f0c3de2..000000000 --- a/tests/testthat/roxygen-examples-complete/18-no-non-comment-in_tree +++ /dev/null @@ -1,7 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: #' @e [0/0] {1} - ¦--COMMENT: #' [1/0] {2} - ¦--COMMENT: #' [1/0] {3} - ¦--COMMENT: #' } [1/0] {4} - ¦--COMMENT: #' # [1/0] {5} - °--COMMENT: #' an [1/0] {6} diff --git a/tests/testthat/roxygen-examples-complete/19-escaped-slash-in_tree b/tests/testthat/roxygen-examples-complete/19-escaped-slash-in_tree deleted file mode 100644 index fcf4e4a39..000000000 --- a/tests/testthat/roxygen-examples-complete/19-escaped-slash-in_tree +++ /dev/null @@ -1,79 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: #' Da [0/0] {1} - ¦--COMMENT: #' [1/0] {2} - ¦--COMMENT: #' @e [1/0] {3} - ¦--COMMENT: #' [1/0] {4} - ¦--COMMENT: #' [1/0] {5} - ¦--COMMENT: #' \d [1/0] {6} - ¦--COMMENT: #' [1/0] {7} - ¦--COMMENT: #' [1/0] {8} - ¦--COMMENT: #' } [1/0] {9} - ¦--COMMENT: #' @e [1/0] {10} - ¦--expr: NULL [1/0] {12} - ¦ °--NULL_CONST: NULL [0/0] {11} - ¦--expr: one [3/0] {13} - ¦ ¦--expr: one [0/2] {15} - ¦ ¦ °--SYMBOL: one [0/0] {14} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {16} - ¦ °--expr: "\t" [0/0] {18} - ¦ °--STR_CONST: "\t" [0/0] {17} - ¦--expr_or_assign_or_help: two [1/0] {19} - ¦ ¦--expr: two [0/3] {21} - ¦ ¦ °--SYMBOL: two [0/0] {20} - ¦ ¦--EQ_ASSIGN: = [0/1] {22} - ¦ °--expr: "\\t" [0/0] {24} - ¦ °--STR_CONST: "\\t" [0/0] {23} - ¦--expr_or_assign_or_help: three [1/0] {25} - ¦ ¦--expr: three [0/1] {27} - ¦ ¦ °--SYMBOL: three [0/0] {26} - ¦ ¦--EQ_ASSIGN: = [0/1] {28} - ¦ °--expr: "\\\t [0/0] {30} - ¦ °--STR_CONST: "\\\t [0/0] {29} - ¦--expr_or_assign_or_help: four [1/0] {31} - ¦ ¦--expr: four [0/2] {33} - ¦ ¦ °--SYMBOL: four [0/0] {32} - ¦ ¦--EQ_ASSIGN: = [0/1] {34} - ¦ °--expr: "\\\\ [0/0] {36} - ¦ °--STR_CONST: "\\\\ [0/0] {35} - ¦--expr_or_assign_or_help: five [1/0] {37} - ¦ ¦--expr: five [0/2] {39} - ¦ ¦ °--SYMBOL: five [0/0] {38} - ¦ ¦--EQ_ASSIGN: = [0/1] {40} - ¦ °--expr: "\\\\ [0/0] {42} - ¦ °--STR_CONST: "\\\\ [0/0] {41} - ¦--expr_or_assign_or_help: six [1/0] {43} - ¦ ¦--expr: six [0/3] {45} - ¦ ¦ °--SYMBOL: six [0/0] {44} - ¦ ¦--EQ_ASSIGN: = [0/1] {46} - ¦ °--expr: "\\\\ [0/0] {48} - ¦ °--STR_CONST: "\\\\ [0/0] {47} - ¦--expr_or_assign_or_help: two [2/0] {49} - ¦ ¦--expr: two [0/3] {51} - ¦ ¦ °--SYMBOL: two [0/0] {50} - ¦ ¦--EQ_ASSIGN: = [0/1] {52} - ¦ °--expr: "\\" [0/0] {54} - ¦ °--STR_CONST: "\\" [0/0] {53} - ¦--expr_or_assign_or_help: four [1/0] {55} - ¦ ¦--expr: four [0/2] {57} - ¦ ¦ °--SYMBOL: four [0/0] {56} - ¦ ¦--EQ_ASSIGN: = [0/1] {58} - ¦ °--expr: "\\\\ [0/0] {60} - ¦ °--STR_CONST: "\\\\ [0/0] {59} - ¦--expr_or_assign_or_help: five [1/0] {61} - ¦ ¦--expr: five [0/2] {63} - ¦ ¦ °--SYMBOL: five [0/0] {62} - ¦ ¦--EQ_ASSIGN: = [0/1] {64} - ¦ °--expr: "\\\\ [0/0] {66} - ¦ °--STR_CONST: "\\\\ [0/0] {65} - ¦--expr_or_assign_or_help: six [1/0] {67} - ¦ ¦--expr: six [0/3] {69} - ¦ ¦ °--SYMBOL: six [0/0] {68} - ¦ ¦--EQ_ASSIGN: = [0/1] {70} - ¦ °--expr: "\\\\ [0/0] {72} - ¦ °--STR_CONST: "\\\\ [0/0] {71} - °--expr_or_assign_or_help: six [1/0] {73} - ¦--expr: six [0/3] {75} - ¦ °--SYMBOL: six [0/0] {74} - ¦--EQ_ASSIGN: = [0/1] {76} - °--expr: "\\\\ [0/0] {78} - °--STR_CONST: "\\\\ [0/0] {77} diff --git a/tests/testthat/roxygen-examples-complete/20-exampleIf-simple-in_tree b/tests/testthat/roxygen-examples-complete/20-exampleIf-simple-in_tree deleted file mode 100644 index cb8c82e20..000000000 --- a/tests/testthat/roxygen-examples-complete/20-exampleIf-simple-in_tree +++ /dev/null @@ -1,16 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: #' Th [0/0] {1} - ¦--COMMENT: #' [1/0] {2} - ¦--COMMENT: #' St [1/0] {3} - ¦--COMMENT: #' @f [1/0] {4} - ¦--COMMENT: #' @e [1/0] {5} - ¦--COMMENT: #' c( [1/0] {6} - ¦--COMMENT: #' @i [1/0] {7} - ¦--COMMENT: #' @e [1/0] {8} - ¦--expr: a [1/0] {9} - ¦ ¦--expr: a [0/5] {11} - ¦ ¦ °--SYMBOL: a [0/0] {10} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {12} - ¦ °--expr: call [0/0] {14} - ¦ °--SYMBOL: call [0/0] {13} - °--';': ; [0/0] {15} diff --git a/tests/testthat/roxygen-examples-complete/21-exampleIf-multiple-in_tree b/tests/testthat/roxygen-examples-complete/21-exampleIf-multiple-in_tree deleted file mode 100644 index 9138e38d9..000000000 --- a/tests/testthat/roxygen-examples-complete/21-exampleIf-multiple-in_tree +++ /dev/null @@ -1,18 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: #' Th [0/0] {1} - ¦--COMMENT: #' [1/0] {2} - ¦--COMMENT: #' St [1/0] {3} - ¦--COMMENT: #' @f [1/0] {4} - ¦--COMMENT: #' @e [1/0] {5} - ¦--COMMENT: #' c( [1/0] {6} - ¦--COMMENT: #' @e [1/0] {7} - ¦--COMMENT: #' x= [1/0] {8} - ¦--COMMENT: #' @i [1/0] {9} - ¦--COMMENT: #' @e [1/0] {10} - ¦--expr: a [1/0] {11} - ¦ ¦--expr: a [0/5] {13} - ¦ ¦ °--SYMBOL: a [0/0] {12} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {14} - ¦ °--expr: call [0/0] {16} - ¦ °--SYMBOL: call [0/0] {15} - °--';': ; [0/0] {17} diff --git a/tests/testthat/roxygen-examples-complete/22-exampleIf-example-mixed-in_tree b/tests/testthat/roxygen-examples-complete/22-exampleIf-example-mixed-in_tree deleted file mode 100644 index d283302bd..000000000 --- a/tests/testthat/roxygen-examples-complete/22-exampleIf-example-mixed-in_tree +++ /dev/null @@ -1,32 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: #' Th [0/0] {1} - ¦--COMMENT: #' [1/0] {2} - ¦--COMMENT: #' St [1/0] {3} - ¦--COMMENT: #' @f [1/0] {4} - ¦--COMMENT: #' @e [1/0] {5} - ¦--COMMENT: #' c( [1/0] {6} - ¦--COMMENT: #' @e [1/0] {7} - ¦--COMMENT: #' x= [1/0] {8} - ¦--COMMENT: #' @i [1/0] {9} - ¦--COMMENT: #' @e [1/0] {10} - ¦--expr: x <- [1/0] {11} - ¦ ¦--expr: x [0/1] {13} - ¦ ¦ °--SYMBOL: x [0/0] {12} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {14} - ¦ °--expr: 3 [0/0] {16} - ¦ °--NUM_CONST: 3 [0/0] {15} - ¦--COMMENT: #' So [2/0] {17} - ¦--COMMENT: #' [1/0] {18} - ¦--COMMENT: #' St [1/0] {19} - ¦--COMMENT: #' @f [1/0] {20} - ¦--COMMENT: #' @e [1/0] {21} - ¦--COMMENT: #' x= [1/0] {22} - ¦--COMMENT: #' @e [1/0] {23} - ¦--COMMENT: #' c( [1/0] {24} - ¦--COMMENT: #' @e [1/0] {25} - °--expr: funct [1/0] {26} - ¦--FUNCTION: funct [0/0] {27} - ¦--'(': ( [0/0] {28} - ¦--')': ) [0/2] {29} - °--expr: NULL [1/0] {31} - °--NULL_CONST: NULL [0/0] {30} diff --git a/tests/testthat/roxygen-examples-complete/23-exampleIf-multiline-cond-in_tree b/tests/testthat/roxygen-examples-complete/23-exampleIf-multiline-cond-in_tree deleted file mode 100644 index 27ed71c9d..000000000 --- a/tests/testthat/roxygen-examples-complete/23-exampleIf-multiline-cond-in_tree +++ /dev/null @@ -1,30 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: #' df [0/0] {1} - ¦--COMMENT: #' [1/0] {2} - ¦--COMMENT: #' fj [1/0] {3} - ¦--COMMENT: #' @f [1/0] {4} - ¦--COMMENT: #' @e [1/0] {5} - ¦--COMMENT: #' 't [1/0] {6} - ¦--COMMENT: #' } [1/0] {7} - ¦--COMMENT: #' c( [1/0] {8} - ¦--COMMENT: #' @i [1/0] {9} - ¦--COMMENT: #' @e [1/0] {10} - ¦--expr: x <- [1/0] {11} - ¦ ¦--expr: x [0/1] {13} - ¦ ¦ °--SYMBOL: x [0/0] {12} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {14} - ¦ °--expr: 3 [0/0] {16} - ¦ °--NUM_CONST: 3 [0/0] {15} - ¦--COMMENT: #' df [3/0] {17} - ¦--COMMENT: #' [1/0] {18} - ¦--COMMENT: #' fj [1/0] {19} - ¦--COMMENT: #' @e [1/0] {20} - ¦--COMMENT: #' 't [1/0] {21} - ¦--COMMENT: #' } [1/0] {22} - ¦--COMMENT: #' c( [1/0] {23} - °--expr: x <- [1/0] {24} - ¦--expr: x [0/1] {26} - ¦ °--SYMBOL: x [0/0] {25} - ¦--LEFT_ASSIGN: <- [0/1] {27} - °--expr: 3 [0/0] {29} - °--NUM_CONST: 3 [0/0] {28} diff --git a/tests/testthat/roxygen-examples-complete/24-exampleIf-spacing-in_tree b/tests/testthat/roxygen-examples-complete/24-exampleIf-spacing-in_tree deleted file mode 100644 index 3e2391645..000000000 --- a/tests/testthat/roxygen-examples-complete/24-exampleIf-spacing-in_tree +++ /dev/null @@ -1,37 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: #' Th [0/0] {1} - ¦--COMMENT: #' [1/0] {2} - ¦--COMMENT: #' St [1/0] {3} - ¦--COMMENT: #' @f [1/0] {4} - ¦--COMMENT: #' @e [1/0] {5} - ¦--COMMENT: #' c( [1/0] {6} - ¦--COMMENT: #' @e [1/0] {7} - ¦--COMMENT: #' c( [1/0] {8} - ¦--COMMENT: #' [1/0] {9} - ¦--COMMENT: #' c( [1/0] {10} - ¦--COMMENT: #' @i [1/0] {11} - ¦--COMMENT: #' @e [1/0] {12} - ¦--expr: x <- [1/0] {13} - ¦ ¦--expr: x [0/1] {15} - ¦ ¦ °--SYMBOL: x [0/0] {14} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {16} - ¦ °--expr: 3 [0/0] {18} - ¦ °--NUM_CONST: 3 [0/0] {17} - ¦--COMMENT: #' No [3/0] {19} - ¦--COMMENT: #' [1/0] {20} - ¦--COMMENT: #' St [1/0] {21} - ¦--COMMENT: #' @f [1/0] {22} - ¦--COMMENT: #' @e [1/0] {23} - ¦--COMMENT: #' a [1/0] {24} - ¦--COMMENT: #' @e [1/0] {25} - ¦--COMMENT: #' a [1/0] {26} - ¦--COMMENT: #' [1/0] {27} - ¦--COMMENT: #' a [1/0] {28} - ¦--COMMENT: #' @i [1/0] {29} - ¦--COMMENT: #' @e [1/0] {30} - °--expr: x <- [1/0] {31} - ¦--expr: x [0/1] {33} - ¦ °--SYMBOL: x [0/0] {32} - ¦--LEFT_ASSIGN: <- [0/1] {34} - °--expr: 33 [0/0] {36} - °--NUM_CONST: 33 [0/0] {35} diff --git a/tests/testthat/roxygen-examples-complete/25-ordinary-comment-in-example-in_tree b/tests/testthat/roxygen-examples-complete/25-ordinary-comment-in-example-in_tree deleted file mode 100644 index edac0463e..000000000 --- a/tests/testthat/roxygen-examples-complete/25-ordinary-comment-in-example-in_tree +++ /dev/null @@ -1,141 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: #' Ex [0/0] {1} - ¦--COMMENT: # Ran [1/0] {2} - ¦--COMMENT: #' Ro [1/0] {3} - ¦--COMMENT: #' @e [1/0] {4} - ¦--COMMENT: #' 1 [1/0] {5} - ¦--expr: NULL [1/0] {7} - ¦ °--NULL_CONST: NULL [0/0] {6} - ¦--COMMENT: #' Ex [3/0] {8} - ¦--COMMENT: # Ran [1/0] {9} - ¦--COMMENT: #' Ro [1/0] {10} - ¦--COMMENT: #' @e [1/0] {11} - ¦--COMMENT: #' 1 [1/0] {12} - ¦--expr: NULL [1/0] {14} - ¦ °--NULL_CONST: NULL [0/0] {13} - ¦--COMMENT: #' Ex [2/0] {15} - ¦--COMMENT: # Ran [1/0] {16} - ¦--COMMENT: #' Ro [1/0] {17} - ¦--COMMENT: #' @e [1/0] {18} - ¦--COMMENT: #' 1 [1/0] {19} - ¦--COMMENT: # com [1/0] {20} - ¦--COMMENT: # mor [1/0] {21} - ¦--expr: NULL [1/0] {23} - ¦ °--NULL_CONST: NULL [0/0] {22} - ¦--COMMENT: #' Ex [2/0] {24} - ¦--COMMENT: # Ran [1/0] {25} - ¦--COMMENT: #' Ro [1/0] {26} - ¦--COMMENT: #' @e [1/0] {27} - ¦--COMMENT: # The [1/0] {28} - ¦--COMMENT: #' 1 [1/0] {29} - ¦--COMMENT: # com [1/0] {30} - ¦--COMMENT: # mor [1/0] {31} - ¦--expr: NULL [1/0] {33} - ¦ °--NULL_CONST: NULL [0/0] {32} - ¦--COMMENT: #' Ex [2/0] {34} - ¦--COMMENT: #' Ra [1/0] {35} - ¦--COMMENT: #' Ro [1/0] {36} - ¦--COMMENT: #' @e [1/0] {37} - ¦--COMMENT: # The [1/0] {38} - ¦--COMMENT: #' 1 [1/0] {39} - ¦--COMMENT: # com [1/0] {40} - ¦--COMMENT: # mor [1/0] {41} - ¦--expr: NULL [1/0] {43} - ¦ °--NULL_CONST: NULL [0/0] {42} - ¦--COMMENT: #' Ex [2/0] {44} - ¦--COMMENT: # Ran [1/0] {45} - ¦--COMMENT: #' Ro [1/0] {46} - ¦--COMMENT: #' @e [1/0] {47} - ¦--COMMENT: # The [1/0] {48} - ¦--COMMENT: #' \d [1/0] {49} - ¦--COMMENT: #' 1 [1/0] {50} - ¦--COMMENT: #' } [1/0] {51} - ¦--COMMENT: # com [1/0] {52} - ¦--COMMENT: # mor [1/0] {53} - ¦--expr: NULL [1/0] {55} - ¦ °--NULL_CONST: NULL [0/0] {54} - ¦--COMMENT: #' Ex [2/0] {56} - ¦--COMMENT: # Ran [1/0] {57} - ¦--COMMENT: #' Ro [1/0] {58} - ¦--COMMENT: #' @e [1/0] {59} - ¦--COMMENT: # The [1/0] {60} - ¦--COMMENT: #' \d [1/0] {61} - ¦--COMMENT: #' 1 [1/0] {62} - ¦--COMMENT: #' } [1/0] {63} - ¦--COMMENT: # mor [1/0] {64} - ¦--expr: NULL [1/0] {66} - ¦ °--NULL_CONST: NULL [0/0] {65} - ¦--COMMENT: #' Ex [2/0] {67} - ¦--COMMENT: # Ran [1/0] {68} - ¦--COMMENT: #' Ro [1/0] {69} - ¦--COMMENT: #' @e [1/0] {70} - ¦--COMMENT: # 'Th [1/0] {71} - ¦--COMMENT: #' \d [1/0] {72} - ¦--COMMENT: #' 1 [1/0] {73} - ¦--COMMENT: #' } [1/0] {74} - ¦--COMMENT: # com [1/0] {75} - ¦--COMMENT: # mor [1/0] {76} - ¦--expr: NULL [1/0] {78} - ¦ °--NULL_CONST: NULL [0/0] {77} - ¦--COMMENT: #' Ex [2/0] {79} - ¦--COMMENT: # Ran [1/0] {80} - ¦--COMMENT: #' Ro [1/0] {81} - ¦--COMMENT: #' @e [1/0] {82} - ¦--COMMENT: # The [1/0] {83} - ¦--COMMENT: #' \d [1/0] {84} - ¦--COMMENT: # com [1/0] {85} - ¦--COMMENT: #' 1 [1/0] {86} - ¦--COMMENT: #' } [1/0] {87} - ¦--COMMENT: # mor [1/0] {88} - ¦--expr: NULL [1/0] {90} - ¦ °--NULL_CONST: NULL [0/0] {89} - ¦--COMMENT: #' Ex [2/0] {91} - ¦--COMMENT: # Ran [1/0] {92} - ¦--COMMENT: #' Ro [1/0] {93} - ¦--COMMENT: #' @e [1/0] {94} - ¦--COMMENT: # The [1/0] {95} - ¦--COMMENT: #' \d [1/0] {96} - ¦--COMMENT: #' ca [1/0] {97} - ¦--COMMENT: # com [1/0] {98} - ¦--COMMENT: #' 1 [1/0] {99} - ¦--COMMENT: #' ) [1/0] {100} - ¦--COMMENT: #' } [1/0] {101} - ¦--COMMENT: # mor [1/0] {102} - ¦--expr: NULL [1/0] {104} - ¦ °--NULL_CONST: NULL [0/0] {103} - ¦--COMMENT: # nol [2/0] {105} - ¦--COMMENT: #' @e [1/0] {106} - ¦--COMMENT: # nol [1/0] {107} - ¦--COMMENT: #' df [1/0] {108} - ¦--expr: func [1/0] {109} - ¦ ¦--expr: func [0/1] {111} - ¦ ¦ °--SYMBOL: func [0/0] {110} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {112} - ¦ °--expr: funct [0/0] {113} - ¦ ¦--FUNCTION: funct [0/0] {114} - ¦ ¦--'(': ( [0/0] {115} - ¦ ¦--')': ) [0/1] {116} - ¦ °--expr: NULL [0/0] {118} - ¦ °--NULL_CONST: NULL [0/0] {117} - ¦--COMMENT: #' Hi [3/0] {119} - ¦--COMMENT: # Com [1/0] {120} - ¦--COMMENT: #' @e [1/0] {121} - ¦--COMMENT: #' 1 [1/0] {122} - ¦--COMMENT: # thi [1/0] {123} - ¦--COMMENT: # thi [1/0] {124} - ¦--COMMENT: #this [1/0] {125} - ¦--COMMENT: # thi [1/0] {126} - ¦--COMMENT: #' c( [1/0] {127} - ¦--expr: NULL [1/0] {129} - ¦ °--NULL_CONST: NULL [0/0] {128} - ¦--COMMENT: #' Hi [2/0] {130} - ¦--COMMENT: # Com [1/0] {131} - ¦--COMMENT: #' @e [1/0] {132} - ¦--COMMENT: #' 1 [1/0] {133} - ¦--COMMENT: # thi [1/0] {134} - ¦--COMMENT: # thi [1/0] {135} - ¦--COMMENT: #this [1/0] {136} - ¦--COMMENT: # thi [1/0] {137} - ¦--COMMENT: #' c( [1/0] {138} - °--expr: NULL [1/0] {140} - °--NULL_CONST: NULL [0/0] {139} diff --git a/tests/testthat/roxygen-examples-complete/26-empty-trailing-lines-in_tree b/tests/testthat/roxygen-examples-complete/26-empty-trailing-lines-in_tree deleted file mode 100644 index 8f9a397dc..000000000 --- a/tests/testthat/roxygen-examples-complete/26-empty-trailing-lines-in_tree +++ /dev/null @@ -1,37 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: #' th [0/0] {1} - ¦--COMMENT: #' [1/0] {2} - ¦--COMMENT: #' me [1/0] {3} - ¦--COMMENT: #' @e [1/0] {4} - ¦--COMMENT: #' 2 [1/0] {5} - ¦--COMMENT: #' [1/0] {6} - ¦--expr: NULL [1/0] {8} - ¦ °--NULL_CONST: NULL [0/0] {7} - ¦--COMMENT: #' th [3/0] {9} - ¦--COMMENT: #' [1/0] {10} - ¦--COMMENT: #' me [1/0] {11} - ¦--COMMENT: #' @e [1/0] {12} - ¦--COMMENT: #' 2 [1/0] {13} - ¦--COMMENT: #' [1/0] {14} - ¦--COMMENT: #' [1/0] {15} - ¦--COMMENT: #' [1/0] {16} - ¦--COMMENT: #' [1/0] {17} - ¦--COMMENT: #' [1/0] {18} - ¦--COMMENT: #' [1/0] {19} - ¦--COMMENT: #' [1/0] {20} - ¦--expr: NULL [1/0] {22} - ¦ °--NULL_CONST: NULL [0/0] {21} - ¦--COMMENT: #' th [3/0] {23} - ¦--COMMENT: #' [1/0] {24} - ¦--COMMENT: #' me [1/0] {25} - ¦--COMMENT: #' @e [1/0] {26} - ¦--COMMENT: #' 2 [1/0] {27} - ¦--expr: NULL [1/0] {29} - ¦ °--NULL_CONST: NULL [0/0] {28} - ¦--COMMENT: #' th [4/0] {30} - ¦--COMMENT: #' [1/0] {31} - ¦--COMMENT: #' em [1/0] {32} - ¦--COMMENT: #' @e [1/0] {33} - ¦--COMMENT: #' 2 [1/0] {34} - °--expr: NULL [2/0] {36} - °--NULL_CONST: NULL [0/0] {35} diff --git a/tests/testthat/roxygen-examples-complete/26-empty-trailing-lines-out.R b/tests/testthat/roxygen-examples-complete/26-empty-trailing-lines-out.R index f85ff9e76..dc44475aa 100644 --- a/tests/testthat/roxygen-examples-complete/26-empty-trailing-lines-out.R +++ b/tests/testthat/roxygen-examples-complete/26-empty-trailing-lines-out.R @@ -24,7 +24,6 @@ NULL NULL - #' this #' #' empty line after example diff --git a/tests/testthat/roxygen-examples-complete/27-no-code-block-after-example-in_tree b/tests/testthat/roxygen-examples-complete/27-no-code-block-after-example-in_tree deleted file mode 100644 index 3eac5d60e..000000000 --- a/tests/testthat/roxygen-examples-complete/27-no-code-block-after-example-in_tree +++ /dev/null @@ -1,12 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: #' Th [0/0] {1} - ¦--COMMENT: #' [1/0] {2} - ¦--COMMENT: #' [1/0] {3} - ¦--COMMENT: #' is [1/0] {4} - ¦--COMMENT: #' [1/0] {5} - ¦--COMMENT: #' @e [1/0] {6} - ¦--COMMENT: #' 1+ [1/0] {7} - ¦--COMMENT: # nol [3/0] {8} - ¦--COMMENT: #' @e [1/0] {9} - ¦--COMMENT: #' 32 [1/0] {10} - °--COMMENT: # nol [1/0] {11} diff --git a/tests/testthat/roxygen-examples-complete/28-end-not-blank-in_tree b/tests/testthat/roxygen-examples-complete/28-end-not-blank-in_tree deleted file mode 100644 index 9cd091e60..000000000 --- a/tests/testthat/roxygen-examples-complete/28-end-not-blank-in_tree +++ /dev/null @@ -1,4 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: #' @e [0/0] {1} - ¦--COMMENT: #' @e [1/0] {2} - °--COMMENT: #' x= [1/0] {3} diff --git a/tests/testthat/roxygen-examples-complete/29-multiple-empty-lines-in-example-in_tree b/tests/testthat/roxygen-examples-complete/29-multiple-empty-lines-in-example-in_tree deleted file mode 100644 index 37a30f03f..000000000 --- a/tests/testthat/roxygen-examples-complete/29-multiple-empty-lines-in-example-in_tree +++ /dev/null @@ -1,13 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: #' Em [0/0] {1} - ¦--COMMENT: #' [1/0] {2} - ¦--COMMENT: #' @e [1/0] {3} - ¦--expr: 1 [1/0] {5} - ¦ °--NUM_CONST: 1 [0/0] {4} - ¦--COMMENT: #' Em [2/0] {6} - ¦--COMMENT: #' [1/0] {7} - ¦--COMMENT: #' @e [1/0] {8} - ¦--COMMENT: #' \d [1/0] {9} - ¦--COMMENT: #' } [1/0] {10} - °--expr: 2 [1/0] {12} - °--NUM_CONST: 2 [0/0] {11} diff --git a/tests/testthat/roxygen-examples-complete/30-multiple-empty-lines-between-in.R b/tests/testthat/roxygen-examples-complete/30-multiple-empty-lines-between-in.R new file mode 100644 index 000000000..880595599 --- /dev/null +++ b/tests/testthat/roxygen-examples-complete/30-multiple-empty-lines-between-in.R @@ -0,0 +1,16 @@ +#' Empty line in examples +#' +#' @examples +1 + + + + + + +#' Empty line in examples +#' +#' @examples +#' \dontrun{ +#' } +2 diff --git a/tests/testthat/roxygen-examples-complete/30-multiple-empty-lines-between-out.R b/tests/testthat/roxygen-examples-complete/30-multiple-empty-lines-between-out.R new file mode 100644 index 000000000..8871734b8 --- /dev/null +++ b/tests/testthat/roxygen-examples-complete/30-multiple-empty-lines-between-out.R @@ -0,0 +1,13 @@ +#' Empty line in examples +#' +#' @examples +1 + + +#' Empty line in examples +#' +#' @examples +#' \dontrun{ +#' +#' } +2 diff --git a/tests/testthat/scope-AsIs/scope_indention-in_tree b/tests/testthat/scope-AsIs/scope_indention-in_tree deleted file mode 100644 index 10fda6ca9..000000000 --- a/tests/testthat/scope-AsIs/scope_indention-in_tree +++ /dev/null @@ -1,97 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: # not [0/0] {1} - ¦--expr: if (x [1/0] {2} - ¦ ¦--IF: if [0/1] {3} - ¦ ¦--'(': ( [0/0] {4} - ¦ ¦--expr: x [0/0] {6} - ¦ ¦ °--SYMBOL: x [0/0] {5} - ¦ ¦--')': ) [0/1] {7} - ¦ ¦--expr: {1+1+ [0/1] {8} - ¦ ¦ ¦--'{': { [0/0] {9} - ¦ ¦ ¦--expr: 1+1++ [0/0] {10} - ¦ ¦ ¦ ¦--expr: 1 [0/0] {13} - ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {12} - ¦ ¦ ¦ ¦--'+': + [0/0] {14} - ¦ ¦ ¦ ¦--expr: 1 [0/0] {16} - ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {15} - ¦ ¦ ¦ ¦--'+': + [0/0] {17} - ¦ ¦ ¦ °--expr: +1 [0/0] {18} - ¦ ¦ ¦ ¦--'+': + [0/0] {19} - ¦ ¦ ¦ °--expr: 1 [0/0] {21} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {20} - ¦ ¦ °--'}': } [0/0] {22} - ¦ ¦--ELSE: else [0/0] {23} - ¦ °--expr: {3} [0/0] {24} - ¦ ¦--'{': { [0/0] {25} - ¦ ¦--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: test_ [1/0] {31} - ¦ ¦--expr: test_ [0/0] {33} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: test_ [0/0] {32} - ¦ ¦--'(': ( [0/0] {34} - ¦ ¦--expr: "x" [0/0] {36} - ¦ ¦ °--STR_CONST: "x" [0/0] {35} - ¦ ¦--',': , [0/2] {37} - ¦ ¦--expr: { - [1/0] {38} - ¦ ¦ ¦--'{': { [0/12] {39} - ¦ ¦ ¦--expr: my_te [1/0] {40} - ¦ ¦ ¦ ¦--expr: my_te [0/0] {42} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: my_te [0/0] {41} - ¦ ¦ ¦ ¦--'(': ( [0/0] {43} - ¦ ¦ ¦ ¦--expr: call [0/0] {45} - ¦ ¦ ¦ ¦ °--SYMBOL: call [0/0] {44} - ¦ ¦ ¦ °--')': ) [0/0] {46} - ¦ ¦ °--'}': } [1/0] {47} - ¦ °--')': ) [0/0] {48} - ¦--COMMENT: # do [2/0] {49} - ¦--expr_or_assign_or_help: a = 3 [1/0] {50} - ¦ ¦--expr: a [0/1] {52} - ¦ ¦ °--SYMBOL: a [0/0] {51} - ¦ ¦--EQ_ASSIGN: = [0/1] {53} - ¦ °--expr: 3 [0/0] {55} - ¦ °--NUM_CONST: 3 [0/0] {54} - ¦--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: 3 [0/0] {63} - ¦ ¦ °--NUM_CONST: 3 [0/0] {62} - ¦ °--')': ) [0/0] {64} - ¦--COMMENT: # do [2/0] {65} - ¦--expr: a <- [1/0] {66} - ¦ ¦--expr: a [0/1] {68} - ¦ ¦ °--SYMBOL: a [0/0] {67} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {69} - ¦ °--expr: funct [0/0] {70} - ¦ ¦--FUNCTION: funct [0/0] {71} - ¦ ¦--'(': ( [0/0] {72} - ¦ ¦--SYMBOL_FORMALS: x [0/0] {73} - ¦ ¦--')': ) [0/1] {74} - ¦ °--expr: x + 1 [0/0] {75} - ¦ ¦--expr: x [0/1] {77} - ¦ ¦ °--SYMBOL: x [0/0] {76} - ¦ ¦--'+': + [0/1] {78} - ¦ °--expr: 1 [0/0] {80} - ¦ °--NUM_CONST: 1 [0/0] {79} - ¦--';': ; [0/0] {81} - ¦--expr: b [0/0] {83} - ¦ °--SYMBOL: b [0/0] {82} - ¦--';': ; [0/0] {84} - ¦--expr: c [0/0] {86} - ¦ °--SYMBOL: c [0/0] {85} - ¦--COMMENT: # don [2/0] {87} - °--expr: a %>% [1/0] {88} - ¦--expr: a [0/1] {91} - ¦ °--SYMBOL: a [0/0] {90} - ¦--SPECIAL-PIPE: %>% [0/2] {92} - ¦--expr: b [1/1] {94} - ¦ °--SYMBOL: b [0/0] {93} - ¦--SPECIAL-PIPE: %>% [0/2] {95} - °--expr: c [1/0] {97} - °--SYMBOL: c [0/0] {96} diff --git a/tests/testthat/scope-AsIs/scope_indention_tokens-in_tree b/tests/testthat/scope-AsIs/scope_indention_tokens-in_tree deleted file mode 100644 index c589fac39..000000000 --- a/tests/testthat/scope-AsIs/scope_indention_tokens-in_tree +++ /dev/null @@ -1,96 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: # add [0/0] {1} - ¦--expr: if (x [1/0] {2} - ¦ ¦--IF: if [0/1] {3} - ¦ ¦--'(': ( [0/0] {4} - ¦ ¦--expr: x [0/0] {6} - ¦ ¦ °--SYMBOL: x [0/0] {5} - ¦ ¦--')': ) [0/1] {7} - ¦ ¦--expr: {1 + [0/1] {8} - ¦ ¦ ¦--'{': { [0/0] {9} - ¦ ¦ ¦--expr: 1 + 1 [0/0] {10} - ¦ ¦ ¦ ¦--expr: 1 [0/1] {13} - ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {12} - ¦ ¦ ¦ ¦--'+': + [0/1] {14} - ¦ ¦ ¦ ¦--expr: 1 [0/1] {16} - ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {15} - ¦ ¦ ¦ ¦--'+': + [0/1] {17} - ¦ ¦ ¦ °--expr: +1 [0/0] {18} - ¦ ¦ ¦ ¦--'+': + [0/0] {19} - ¦ ¦ ¦ °--expr: 1 [0/0] {21} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {20} - ¦ ¦ °--'}': } [0/0] {22} - ¦ ¦--ELSE: else [0/1] {23} - ¦ °--expr: {3} [0/0] {24} - ¦ ¦--'{': { [0/0] {25} - ¦ ¦--expr: 3 [0/0] {27} - ¦ ¦ °--NUM_CONST: 3 [0/0] {26} - ¦ °--'}': } [0/0] {28} - ¦--COMMENT: # rem [2/0] {29} - ¦--expr: test_ [1/0] {30} - ¦ ¦--expr: test_ [0/0] {32} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: test_ [0/0] {31} - ¦ ¦--'(': ( [0/0] {33} - ¦ ¦--expr: "x" [0/0] {35} - ¦ ¦ °--STR_CONST: "x" [0/0] {34} - ¦ ¦--',': , [0/10] {36} - ¦ ¦--expr: { - [1/0] {37} - ¦ ¦ ¦--'{': { [0/12] {38} - ¦ ¦ ¦--expr: my_te [1/10] {39} - ¦ ¦ ¦ ¦--expr: my_te [0/0] {41} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: my_te [0/0] {40} - ¦ ¦ ¦ ¦--'(': ( [0/0] {42} - ¦ ¦ ¦ ¦--expr: call [0/0] {44} - ¦ ¦ ¦ ¦ °--SYMBOL: call [0/0] {43} - ¦ ¦ ¦ °--')': ) [0/0] {45} - ¦ ¦ °--'}': } [1/0] {46} - ¦ °--')': ) [0/0] {47} - ¦--COMMENT: # do [3/0] {48} - ¦--expr_or_assign_or_help: a =3 [1/0] {49} - ¦ ¦--expr: a [0/1] {51} - ¦ ¦ °--SYMBOL: a [0/0] {50} - ¦ ¦--EQ_ASSIGN: = [0/0] {52} - ¦ °--expr: 3 [0/0] {54} - ¦ °--NUM_CONST: 3 [0/0] {53} - ¦--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: 3 [0/0] {62} - ¦ ¦ °--NUM_CONST: 3 [0/0] {61} - ¦ °--')': ) [0/0] {63} - ¦--COMMENT: # do [2/0] {64} - ¦--expr: a <- [1/0] {65} - ¦ ¦--expr: a [0/1] {67} - ¦ ¦ °--SYMBOL: a [0/0] {66} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {68} - ¦ °--expr: funct [0/0] {69} - ¦ ¦--FUNCTION: funct [0/0] {70} - ¦ ¦--'(': ( [0/0] {71} - ¦ ¦--SYMBOL_FORMALS: x [0/0] {72} - ¦ ¦--')': ) [0/1] {73} - ¦ °--expr: x + 1 [0/0] {74} - ¦ ¦--expr: x [0/1] {76} - ¦ ¦ °--SYMBOL: x [0/0] {75} - ¦ ¦--'+': + [0/1] {77} - ¦ °--expr: 1 [0/0] {79} - ¦ °--NUM_CONST: 1 [0/0] {78} - ¦--';': ; [0/0] {80} - ¦--expr: b [0/0] {82} - ¦ °--SYMBOL: b [0/0] {81} - ¦--';': ; [0/0] {83} - ¦--expr: c [0/0] {85} - ¦ °--SYMBOL: c [0/0] {84} - ¦--COMMENT: # don [2/0] {86} - °--expr: a %>% [1/0] {87} - ¦--expr: a [0/1] {90} - ¦ °--SYMBOL: a [0/0] {89} - ¦--SPECIAL-PIPE: %>% [0/2] {91} - ¦--expr: b [1/1] {93} - ¦ °--SYMBOL: b [0/0] {92} - ¦--SPECIAL-PIPE: %>% [0/2] {94} - °--expr: c [1/0] {96} - °--SYMBOL: c [0/0] {95} diff --git a/tests/testthat/scope-AsIs/scope_line_breaks-in_tree b/tests/testthat/scope-AsIs/scope_line_breaks-in_tree deleted file mode 100644 index 2b1d97fb2..000000000 --- a/tests/testthat/scope-AsIs/scope_line_breaks-in_tree +++ /dev/null @@ -1,96 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: # add [0/0] {1} - ¦--expr: if (x [1/0] {2} - ¦ ¦--IF: if [0/1] {3} - ¦ ¦--'(': ( [0/0] {4} - ¦ ¦--expr: x [0/0] {6} - ¦ ¦ °--SYMBOL: x [0/0] {5} - ¦ ¦--')': ) [0/1] {7} - ¦ ¦--expr: {1 + [0/1] {8} - ¦ ¦ ¦--'{': { [0/0] {9} - ¦ ¦ ¦--expr: 1 + 1 [0/0] {10} - ¦ ¦ ¦ ¦--expr: 1 [0/1] {13} - ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {12} - ¦ ¦ ¦ ¦--'+': + [0/1] {14} - ¦ ¦ ¦ ¦--expr: 1 [0/1] {16} - ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {15} - ¦ ¦ ¦ ¦--'+': + [0/1] {17} - ¦ ¦ ¦ °--expr: +1 [0/0] {18} - ¦ ¦ ¦ ¦--'+': + [0/0] {19} - ¦ ¦ ¦ °--expr: 1 [0/0] {21} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {20} - ¦ ¦ °--'}': } [0/0] {22} - ¦ ¦--ELSE: else [0/1] {23} - ¦ °--expr: {3} [0/0] {24} - ¦ ¦--'{': { [0/0] {25} - ¦ ¦--expr: 3 [0/0] {27} - ¦ ¦ °--NUM_CONST: 3 [0/0] {26} - ¦ °--'}': } [0/0] {28} - ¦--COMMENT: # rem [2/0] {29} - ¦--expr: test_ [1/0] {30} - ¦ ¦--expr: test_ [0/0] {32} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: test_ [0/0] {31} - ¦ ¦--'(': ( [0/0] {33} - ¦ ¦--expr: "x" [0/0] {35} - ¦ ¦ °--STR_CONST: "x" [0/0] {34} - ¦ ¦--',': , [0/10] {36} - ¦ ¦--expr: { - [1/0] {37} - ¦ ¦ ¦--'{': { [0/12] {38} - ¦ ¦ ¦--expr: my_te [1/10] {39} - ¦ ¦ ¦ ¦--expr: my_te [0/0] {41} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: my_te [0/0] {40} - ¦ ¦ ¦ ¦--'(': ( [0/0] {42} - ¦ ¦ ¦ ¦--expr: call [0/0] {44} - ¦ ¦ ¦ ¦ °--SYMBOL: call [0/0] {43} - ¦ ¦ ¦ °--')': ) [0/0] {45} - ¦ ¦ °--'}': } [1/0] {46} - ¦ °--')': ) [0/0] {47} - ¦--COMMENT: # do [3/0] {48} - ¦--expr_or_assign_or_help: a = 3 [1/0] {49} - ¦ ¦--expr: a [0/1] {51} - ¦ ¦ °--SYMBOL: a [0/0] {50} - ¦ ¦--EQ_ASSIGN: = [0/1] {52} - ¦ °--expr: 3 [0/0] {54} - ¦ °--NUM_CONST: 3 [0/0] {53} - ¦--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: 3 [0/0] {62} - ¦ ¦ °--NUM_CONST: 3 [0/0] {61} - ¦ °--')': ) [0/0] {63} - ¦--COMMENT: # do [2/0] {64} - ¦--expr: a <- [1/0] {65} - ¦ ¦--expr: a [0/1] {67} - ¦ ¦ °--SYMBOL: a [0/0] {66} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {68} - ¦ °--expr: funct [0/0] {69} - ¦ ¦--FUNCTION: funct [0/0] {70} - ¦ ¦--'(': ( [0/0] {71} - ¦ ¦--SYMBOL_FORMALS: x [0/0] {72} - ¦ ¦--')': ) [0/1] {73} - ¦ °--expr: x + 1 [0/0] {74} - ¦ ¦--expr: x [0/1] {76} - ¦ ¦ °--SYMBOL: x [0/0] {75} - ¦ ¦--'+': + [0/1] {77} - ¦ °--expr: 1 [0/0] {79} - ¦ °--NUM_CONST: 1 [0/0] {78} - ¦--';': ; [0/0] {80} - ¦--expr: b [0/0] {82} - ¦ °--SYMBOL: b [0/0] {81} - ¦--';': ; [0/0] {83} - ¦--expr: c [0/0] {85} - ¦ °--SYMBOL: c [0/0] {84} - ¦--COMMENT: # don [2/0] {86} - °--expr: a %>% [1/0] {87} - ¦--expr: a [0/1] {90} - ¦ °--SYMBOL: a [0/0] {89} - ¦--SPECIAL-PIPE: %>% [0/2] {91} - ¦--expr: b [1/1] {93} - ¦ °--SYMBOL: b [0/0] {92} - ¦--SPECIAL-PIPE: %>% [0/2] {94} - °--expr: c [1/0] {96} - °--SYMBOL: c [0/0] {95} diff --git a/tests/testthat/scope-AsIs/scope_none-in_tree b/tests/testthat/scope-AsIs/scope_none-in_tree deleted file mode 100644 index 3c65a9c14..000000000 --- a/tests/testthat/scope-AsIs/scope_none-in_tree +++ /dev/null @@ -1,159 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: #'thi [0/0] {1} - ¦--COMMENT: #' [1/0] {2} - ¦--COMMENT: #' @p [1/0] {3} - ¦--COMMENT: #' [1/0] {4} - ¦--expr: a<- f [1/0] {5} - ¦ ¦--expr: a [0/0] {7} - ¦ ¦ °--SYMBOL: a [0/0] {6} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {8} - ¦ °--expr: funct [0/0] {9} - ¦ ¦--FUNCTION: funct [0/0] {10} - ¦ ¦--'(': ( [0/0] {11} - ¦ ¦--SYMBOL_FORMALS: x [0/0] {12} - ¦ ¦--')': ) [0/0] {13} - ¦ °--expr: { - t [0/0] {14} - ¦ ¦--'{': { [0/2] {15} - ¦ ¦--expr: test_ [1/2] {16} - ¦ ¦ ¦--expr: test_ [0/0] {18} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: test_ [0/0] {17} - ¦ ¦ ¦--'(': ( [0/0] {19} - ¦ ¦ ¦--expr: "I wa [0/0] {21} - ¦ ¦ ¦ °--STR_CONST: "I wa [0/0] {20} - ¦ ¦ ¦--',': , [0/0] {22} - ¦ ¦ ¦--expr: { - [0/5] {23} - ¦ ¦ ¦ ¦--'{': { [0/4] {24} - ¦ ¦ ¦ ¦--expr: out < [1/4] {25} - ¦ ¦ ¦ ¦ ¦--expr: out [0/1] {27} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL: out [0/0] {26} - ¦ ¦ ¦ ¦ ¦--LEFT_ASSIGN: <- [0/1] {28} - ¦ ¦ ¦ ¦ °--expr: c(1,c [0/0] {29} - ¦ ¦ ¦ ¦ ¦--expr: c [0/0] {31} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {30} - ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {32} - ¦ ¦ ¦ ¦ ¦--expr: 1 [0/0] {34} - ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {33} - ¦ ¦ ¦ ¦ ¦--',': , [0/0] {35} - ¦ ¦ ¦ ¦ ¦--expr: c( - [0/0] {36} - ¦ ¦ ¦ ¦ ¦ ¦--expr: c [0/0] {38} - ¦ ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {37} - ¦ ¦ ¦ ¦ ¦ ¦--'(': ( [0/6] {39} - ¦ ¦ ¦ ¦ ¦ ¦--expr: 22 +1 [1/4] {40} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: 22 [0/1] {42} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 22 [0/0] {41} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--'+': + [0/0] {43} - ¦ ¦ ¦ ¦ ¦ ¦ °--expr: 1 [0/0] {45} - ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {44} - ¦ ¦ ¦ ¦ ¦ °--')': ) [1/0] {46} - ¦ ¦ ¦ ¦ °--')': ) [0/0] {47} - ¦ ¦ ¦ ¦--expr: if (x [1/2] {48} - ¦ ¦ ¦ ¦ ¦--IF: if [0/1] {49} - ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {50} - ¦ ¦ ¦ ¦ ¦--expr: x > 1 [0/0] {51} - ¦ ¦ ¦ ¦ ¦ ¦--expr: x [0/1] {53} - ¦ ¦ ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {52} - ¦ ¦ ¦ ¦ ¦ ¦--GT: > [0/1] {54} - ¦ ¦ ¦ ¦ ¦ °--expr: 10 [0/0] {56} - ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 10 [0/0] {55} - ¦ ¦ ¦ ¦ ¦--')': ) [0/1] {57} - ¦ ¦ ¦ ¦ °--expr: { - [0/0] {58} - ¦ ¦ ¦ ¦ ¦--'{': { [0/6] {59} - ¦ ¦ ¦ ¦ ¦--expr: for ( [1/4] {60} - ¦ ¦ ¦ ¦ ¦ ¦--FOR: for [0/1] {61} - ¦ ¦ ¦ ¦ ¦ ¦--forcond: (x in [0/1] {62} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {63} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--SYMBOL: x [0/1] {64} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--IN: in [0/1] {65} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: 22 [0/0] {67} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 22 [0/0] {66} - ¦ ¦ ¦ ¦ ¦ ¦ °--')': ) [0/0] {68} - ¦ ¦ ¦ ¦ ¦ °--expr: { # F [0/0] {69} - ¦ ¦ ¦ ¦ ¦ ¦--'{': { [0/1] {70} - ¦ ¦ ¦ ¦ ¦ ¦--COMMENT: # FIX [0/8] {71} - ¦ ¦ ¦ ¦ ¦ ¦--expr: prin( [1/6] {72} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: prin [0/0] {74} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: prin [0/0] {73} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {75} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: x [0/0] {77} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {76} - ¦ ¦ ¦ ¦ ¦ ¦ °--')': ) [0/0] {78} - ¦ ¦ ¦ ¦ ¦ °--'}': } [1/0] {79} - ¦ ¦ ¦ ¦ °--'}': } [1/0] {80} - ¦ ¦ ¦ °--'}': } [1/0] {81} - ¦ ¦ °--')': ) [0/0] {82} - ¦ ¦--COMMENT: #we l [1/2] {83} - ¦ ¦--expr: c(lis [1/2] {84} - ¦ ¦ ¦--expr: c [0/0] {86} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {85} - ¦ ¦ ¦--'(': ( [0/0] {87} - ¦ ¦ ¦--expr: list( [0/0] {88} - ¦ ¦ ¦ ¦--expr: list [0/0] {90} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: list [0/0] {89} - ¦ ¦ ¦ ¦--'(': ( [0/0] {91} - ¦ ¦ ¦ ¦--expr: x + 2 [0/0] {92} - ¦ ¦ ¦ ¦ ¦--expr: x [0/1] {94} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {93} - ¦ ¦ ¦ ¦ ¦--'+': + [0/1] {95} - ¦ ¦ ¦ ¦ °--expr: 2 [0/0] {97} - ¦ ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {96} - ¦ ¦ ¦ °--')': ) [0/0] {98} - ¦ ¦ ¦--',': , [0/4] {99} - ¦ ¦ ¦--expr: c( [1/1] {100} - ¦ ¦ ¦ ¦--expr: c [0/0] {102} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {101} - ¦ ¦ ¦ ¦--'(': ( [0/4] {103} - ¦ ¦ ¦ ¦--expr: c( - [0/3] {104} - ¦ ¦ ¦ ¦ ¦--expr: c [0/0] {106} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {105} - ¦ ¦ ¦ ¦ ¦--'(': ( [0/6] {107} - ¦ ¦ ¦ ¦ ¦--expr: 26 ^ [1/0] {108} - ¦ ¦ ¦ ¦ ¦ ¦--expr: 26 [0/1] {110} - ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 26 [0/0] {109} - ¦ ¦ ¦ ¦ ¦ ¦--'^': ^ [0/1] {111} - ¦ ¦ ¦ ¦ ¦ °--expr: 2 [0/0] {113} - ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {112} - ¦ ¦ ¦ ¦ ¦--',': , [0/1] {114} - ¦ ¦ ¦ ¦ ¦--COMMENT: # FIX [0/6] {115} - ¦ ¦ ¦ ¦ ¦--expr: 8 [1/0] {117} - ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 8 [0/0] {116} - ¦ ¦ ¦ ¦ ¦--',': , [0/6] {118} - ¦ ¦ ¦ ¦ ¦--expr: 7 [1/4] {120} - ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 7 [0/0] {119} - ¦ ¦ ¦ ¦ °--')': ) [1/0] {121} - ¦ ¦ ¦ °--')': ) [0/0] {122} - ¦ ¦ °--')': ) [0/0] {123} - ¦ ¦--expr: call( [2/0] {124} - ¦ ¦ ¦--expr: call [0/0] {126} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {125} - ¦ ¦ ¦--'(': ( [0/4] {127} - ¦ ¦ ¦--expr: 1 [1/0] {129} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {128} - ¦ ¦ ¦--',': , [0/1] {130} - ¦ ¦ ¦--expr: 2 [0/0] {132} - ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {131} - ¦ ¦ ¦--',': , [0/4] {133} - ¦ ¦ ¦--expr: 23+In [1/0] {134} - ¦ ¦ ¦ ¦--expr: 23 [0/0] {137} - ¦ ¦ ¦ ¦ °--NUM_CONST: 23 [0/0] {136} - ¦ ¦ ¦ ¦--'+': + [0/0] {138} - ¦ ¦ ¦ ¦--expr: Inf [0/1] {140} - ¦ ¦ ¦ ¦ °--NUM_CONST: Inf [0/0] {139} - ¦ ¦ ¦ ¦--'-': - [0/1] {141} - ¦ ¦ ¦ °--expr: 99 [0/0] {143} - ¦ ¦ ¦ °--NUM_CONST: 99 [0/0] {142} - ¦ ¦ ¦--',': , [0/1] {144} - ¦ ¦ ¦--expr: call( [0/0] {145} - ¦ ¦ ¦ ¦--expr: call [0/0] {147} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {146} - ¦ ¦ ¦ ¦--'(': ( [0/6] {148} - ¦ ¦ ¦ ¦--expr: 16 [1/4] {150} - ¦ ¦ ¦ ¦ °--NUM_CONST: 16 [0/0] {149} - ¦ ¦ ¦ °--')': ) [1/0] {151} - ¦ ¦ °--')': ) [0/0] {152} - ¦ °--'}': } [1/0] {153} - °--COMMENT: # com [1/0] {154} diff --git a/tests/testthat/scope-AsIs/scope_spaces-in_tree b/tests/testthat/scope-AsIs/scope_spaces-in_tree deleted file mode 100644 index 81781740b..000000000 --- a/tests/testthat/scope-AsIs/scope_spaces-in_tree +++ /dev/null @@ -1,25 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: a<-fu [0/0] {1} - ¦--expr: a [0/0] {3} - ¦ °--SYMBOL: a [0/0] {2} - ¦--LEFT_ASSIGN: <- [0/0] {4} - °--expr: funct [0/0] {5} - ¦--FUNCTION: funct [0/0] {6} - ¦--'(': ( [0/0] {7} - ¦--')': ) [0/0] {8} - °--expr: { - [0/0] {9} - ¦--'{': { [0/20] {10} - ¦--expr: 1+1 [1/0] {11} - ¦ ¦--expr: 1 [0/0] {13} - ¦ ¦ °--NUM_CONST: 1 [0/0] {12} - ¦ ¦--'+': + [0/0] {14} - ¦ °--expr: 1 [0/0] {16} - ¦ °--NUM_CONST: 1 [0/0] {15} - ¦--expr_or_assign_or_help: d=3 [1/4] {17} - ¦ ¦--expr: d [0/0] {19} - ¦ ¦ °--SYMBOL: d [0/0] {18} - ¦ ¦--EQ_ASSIGN: = [0/0] {20} - ¦ °--expr: 3 [0/0] {22} - ¦ °--NUM_CONST: 3 [0/0] {21} - °--'}': } [1/0] {23} diff --git a/tests/testthat/scope-AsIs/scope_spaces_indention-in_tree b/tests/testthat/scope-AsIs/scope_spaces_indention-in_tree deleted file mode 100644 index 10fda6ca9..000000000 --- a/tests/testthat/scope-AsIs/scope_spaces_indention-in_tree +++ /dev/null @@ -1,97 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: # not [0/0] {1} - ¦--expr: if (x [1/0] {2} - ¦ ¦--IF: if [0/1] {3} - ¦ ¦--'(': ( [0/0] {4} - ¦ ¦--expr: x [0/0] {6} - ¦ ¦ °--SYMBOL: x [0/0] {5} - ¦ ¦--')': ) [0/1] {7} - ¦ ¦--expr: {1+1+ [0/1] {8} - ¦ ¦ ¦--'{': { [0/0] {9} - ¦ ¦ ¦--expr: 1+1++ [0/0] {10} - ¦ ¦ ¦ ¦--expr: 1 [0/0] {13} - ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {12} - ¦ ¦ ¦ ¦--'+': + [0/0] {14} - ¦ ¦ ¦ ¦--expr: 1 [0/0] {16} - ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {15} - ¦ ¦ ¦ ¦--'+': + [0/0] {17} - ¦ ¦ ¦ °--expr: +1 [0/0] {18} - ¦ ¦ ¦ ¦--'+': + [0/0] {19} - ¦ ¦ ¦ °--expr: 1 [0/0] {21} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {20} - ¦ ¦ °--'}': } [0/0] {22} - ¦ ¦--ELSE: else [0/0] {23} - ¦ °--expr: {3} [0/0] {24} - ¦ ¦--'{': { [0/0] {25} - ¦ ¦--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: test_ [1/0] {31} - ¦ ¦--expr: test_ [0/0] {33} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: test_ [0/0] {32} - ¦ ¦--'(': ( [0/0] {34} - ¦ ¦--expr: "x" [0/0] {36} - ¦ ¦ °--STR_CONST: "x" [0/0] {35} - ¦ ¦--',': , [0/2] {37} - ¦ ¦--expr: { - [1/0] {38} - ¦ ¦ ¦--'{': { [0/12] {39} - ¦ ¦ ¦--expr: my_te [1/0] {40} - ¦ ¦ ¦ ¦--expr: my_te [0/0] {42} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: my_te [0/0] {41} - ¦ ¦ ¦ ¦--'(': ( [0/0] {43} - ¦ ¦ ¦ ¦--expr: call [0/0] {45} - ¦ ¦ ¦ ¦ °--SYMBOL: call [0/0] {44} - ¦ ¦ ¦ °--')': ) [0/0] {46} - ¦ ¦ °--'}': } [1/0] {47} - ¦ °--')': ) [0/0] {48} - ¦--COMMENT: # do [2/0] {49} - ¦--expr_or_assign_or_help: a = 3 [1/0] {50} - ¦ ¦--expr: a [0/1] {52} - ¦ ¦ °--SYMBOL: a [0/0] {51} - ¦ ¦--EQ_ASSIGN: = [0/1] {53} - ¦ °--expr: 3 [0/0] {55} - ¦ °--NUM_CONST: 3 [0/0] {54} - ¦--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: 3 [0/0] {63} - ¦ ¦ °--NUM_CONST: 3 [0/0] {62} - ¦ °--')': ) [0/0] {64} - ¦--COMMENT: # do [2/0] {65} - ¦--expr: a <- [1/0] {66} - ¦ ¦--expr: a [0/1] {68} - ¦ ¦ °--SYMBOL: a [0/0] {67} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {69} - ¦ °--expr: funct [0/0] {70} - ¦ ¦--FUNCTION: funct [0/0] {71} - ¦ ¦--'(': ( [0/0] {72} - ¦ ¦--SYMBOL_FORMALS: x [0/0] {73} - ¦ ¦--')': ) [0/1] {74} - ¦ °--expr: x + 1 [0/0] {75} - ¦ ¦--expr: x [0/1] {77} - ¦ ¦ °--SYMBOL: x [0/0] {76} - ¦ ¦--'+': + [0/1] {78} - ¦ °--expr: 1 [0/0] {80} - ¦ °--NUM_CONST: 1 [0/0] {79} - ¦--';': ; [0/0] {81} - ¦--expr: b [0/0] {83} - ¦ °--SYMBOL: b [0/0] {82} - ¦--';': ; [0/0] {84} - ¦--expr: c [0/0] {86} - ¦ °--SYMBOL: c [0/0] {85} - ¦--COMMENT: # don [2/0] {87} - °--expr: a %>% [1/0] {88} - ¦--expr: a [0/1] {91} - ¦ °--SYMBOL: a [0/0] {90} - ¦--SPECIAL-PIPE: %>% [0/2] {92} - ¦--expr: b [1/1] {94} - ¦ °--SYMBOL: b [0/0] {93} - ¦--SPECIAL-PIPE: %>% [0/2] {95} - °--expr: c [1/0] {97} - °--SYMBOL: c [0/0] {96} diff --git a/tests/testthat/scope-AsIs/scope_spaces_line_breaks-in_tree b/tests/testthat/scope-AsIs/scope_spaces_line_breaks-in_tree deleted file mode 100644 index 95f85f205..000000000 --- a/tests/testthat/scope-AsIs/scope_spaces_line_breaks-in_tree +++ /dev/null @@ -1,96 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: # add [0/0] {1} - ¦--expr: if (x [1/0] {2} - ¦ ¦--IF: if [0/1] {3} - ¦ ¦--'(': ( [0/0] {4} - ¦ ¦--expr: x [0/0] {6} - ¦ ¦ °--SYMBOL: x [0/0] {5} - ¦ ¦--')': ) [0/1] {7} - ¦ ¦--expr: {1 + [0/1] {8} - ¦ ¦ ¦--'{': { [0/0] {9} - ¦ ¦ ¦--expr: 1 + 1 [0/0] {10} - ¦ ¦ ¦ ¦--expr: 1 [0/1] {13} - ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {12} - ¦ ¦ ¦ ¦--'+': + [0/1] {14} - ¦ ¦ ¦ ¦--expr: 1 [0/1] {16} - ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {15} - ¦ ¦ ¦ ¦--'+': + [0/1] {17} - ¦ ¦ ¦ °--expr: +1 [0/0] {18} - ¦ ¦ ¦ ¦--'+': + [0/0] {19} - ¦ ¦ ¦ °--expr: 1 [0/0] {21} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {20} - ¦ ¦ °--'}': } [0/0] {22} - ¦ ¦--ELSE: else [0/1] {23} - ¦ °--expr: {3} [0/0] {24} - ¦ ¦--'{': { [0/0] {25} - ¦ ¦--expr: 3 [0/0] {27} - ¦ ¦ °--NUM_CONST: 3 [0/0] {26} - ¦ °--'}': } [0/0] {28} - ¦--COMMENT: # rem [2/0] {29} - ¦--expr: test_ [1/0] {30} - ¦ ¦--expr: test_ [0/0] {32} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: test_ [0/0] {31} - ¦ ¦--'(': ( [0/0] {33} - ¦ ¦--expr: "x" [0/0] {35} - ¦ ¦ °--STR_CONST: "x" [0/0] {34} - ¦ ¦--',': , [0/10] {36} - ¦ ¦--expr: { - [1/0] {37} - ¦ ¦ ¦--'{': { [0/12] {38} - ¦ ¦ ¦--expr: my_te [1/10] {39} - ¦ ¦ ¦ ¦--expr: my_te [0/0] {41} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: my_te [0/0] {40} - ¦ ¦ ¦ ¦--'(': ( [0/1] {42} - ¦ ¦ ¦ ¦--expr: call [0/0] {44} - ¦ ¦ ¦ ¦ °--SYMBOL: call [0/0] {43} - ¦ ¦ ¦ °--')': ) [0/0] {45} - ¦ ¦ °--'}': } [1/0] {46} - ¦ °--')': ) [0/0] {47} - ¦--COMMENT: # do [3/0] {48} - ¦--expr_or_assign_or_help: a = 3 [1/0] {49} - ¦ ¦--expr: a [0/1] {51} - ¦ ¦ °--SYMBOL: a [0/0] {50} - ¦ ¦--EQ_ASSIGN: = [0/1] {52} - ¦ °--expr: 3 [0/0] {54} - ¦ °--NUM_CONST: 3 [0/0] {53} - ¦--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: 3 [0/0] {62} - ¦ ¦ °--NUM_CONST: 3 [0/0] {61} - ¦ °--')': ) [0/0] {63} - ¦--COMMENT: # do [2/0] {64} - ¦--expr: a <- [1/0] {65} - ¦ ¦--expr: a [0/1] {67} - ¦ ¦ °--SYMBOL: a [0/0] {66} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {68} - ¦ °--expr: funct [0/0] {69} - ¦ ¦--FUNCTION: funct [0/0] {70} - ¦ ¦--'(': ( [0/0] {71} - ¦ ¦--SYMBOL_FORMALS: x [0/0] {72} - ¦ ¦--')': ) [0/1] {73} - ¦ °--expr: x + 1 [0/0] {74} - ¦ ¦--expr: x [0/1] {76} - ¦ ¦ °--SYMBOL: x [0/0] {75} - ¦ ¦--'+': + [0/1] {77} - ¦ °--expr: 1 [0/0] {79} - ¦ °--NUM_CONST: 1 [0/0] {78} - ¦--';': ; [0/0] {80} - ¦--expr: b [0/0] {82} - ¦ °--SYMBOL: b [0/0] {81} - ¦--';': ; [0/0] {83} - ¦--expr: c [0/0] {85} - ¦ °--SYMBOL: c [0/0] {84} - ¦--COMMENT: # don [2/0] {86} - °--expr: a %>% [1/0] {87} - ¦--expr: a [0/1] {90} - ¦ °--SYMBOL: a [0/0] {89} - ¦--SPECIAL-PIPE: %>% [0/2] {91} - ¦--expr: b [1/1] {93} - ¦ °--SYMBOL: b [0/0] {92} - ¦--SPECIAL-PIPE: %>% [0/2] {94} - °--expr: c [1/0] {96} - °--SYMBOL: c [0/0] {95} diff --git a/tests/testthat/scope-AsIs/scope_spaces_tokens-in_tree b/tests/testthat/scope-AsIs/scope_spaces_tokens-in_tree deleted file mode 100644 index c738d5f48..000000000 --- a/tests/testthat/scope-AsIs/scope_spaces_tokens-in_tree +++ /dev/null @@ -1,96 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: # add [0/0] {1} - ¦--expr: if (x [1/0] {2} - ¦ ¦--IF: if [0/1] {3} - ¦ ¦--'(': ( [0/0] {4} - ¦ ¦--expr: x [0/0] {6} - ¦ ¦ °--SYMBOL: x [0/0] {5} - ¦ ¦--')': ) [0/1] {7} - ¦ ¦--expr: {1 +1 [0/1] {8} - ¦ ¦ ¦--'{': { [0/0] {9} - ¦ ¦ ¦--expr: 1 +1 [0/0] {10} - ¦ ¦ ¦ ¦--expr: 1 [0/1] {13} - ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {12} - ¦ ¦ ¦ ¦--'+': + [0/0] {14} - ¦ ¦ ¦ ¦--expr: 1 [0/1] {16} - ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {15} - ¦ ¦ ¦ ¦--'+': + [0/1] {17} - ¦ ¦ ¦ °--expr: +1 [0/0] {18} - ¦ ¦ ¦ ¦--'+': + [0/0] {19} - ¦ ¦ ¦ °--expr: 1 [0/0] {21} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {20} - ¦ ¦ °--'}': } [0/0] {22} - ¦ ¦--ELSE: else [0/1] {23} - ¦ °--expr: {3} [0/0] {24} - ¦ ¦--'{': { [0/0] {25} - ¦ ¦--expr: 3 [0/0] {27} - ¦ ¦ °--NUM_CONST: 3 [0/0] {26} - ¦ °--'}': } [0/0] {28} - ¦--COMMENT: # rem [2/0] {29} - ¦--expr: test_ [1/0] {30} - ¦ ¦--expr: test_ [0/0] {32} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: test_ [0/0] {31} - ¦ ¦--'(': ( [0/0] {33} - ¦ ¦--expr: "x" [0/0] {35} - ¦ ¦ °--STR_CONST: "x" [0/0] {34} - ¦ ¦--',': , [0/10] {36} - ¦ ¦--expr: { - [1/0] {37} - ¦ ¦ ¦--'{': { [0/12] {38} - ¦ ¦ ¦--expr: my_te [1/10] {39} - ¦ ¦ ¦ ¦--expr: my_te [0/0] {41} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: my_te [0/0] {40} - ¦ ¦ ¦ ¦--'(': ( [0/0] {42} - ¦ ¦ ¦ ¦--expr: call [0/0] {44} - ¦ ¦ ¦ ¦ °--SYMBOL: call [0/0] {43} - ¦ ¦ ¦ °--')': ) [0/0] {45} - ¦ ¦ °--'}': } [1/0] {46} - ¦ °--')': ) [0/0] {47} - ¦--COMMENT: # do [3/0] {48} - ¦--expr_or_assign_or_help: a = 3 [1/0] {49} - ¦ ¦--expr: a [0/1] {51} - ¦ ¦ °--SYMBOL: a [0/0] {50} - ¦ ¦--EQ_ASSIGN: = [0/1] {52} - ¦ °--expr: 3 [0/0] {54} - ¦ °--NUM_CONST: 3 [0/0] {53} - ¦--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: 3 [0/0] {62} - ¦ ¦ °--NUM_CONST: 3 [0/0] {61} - ¦ °--')': ) [0/0] {63} - ¦--COMMENT: # do [2/0] {64} - ¦--expr: a <- [1/0] {65} - ¦ ¦--expr: a [0/1] {67} - ¦ ¦ °--SYMBOL: a [0/0] {66} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {68} - ¦ °--expr: funct [0/0] {69} - ¦ ¦--FUNCTION: funct [0/0] {70} - ¦ ¦--'(': ( [0/0] {71} - ¦ ¦--SYMBOL_FORMALS: x [0/0] {72} - ¦ ¦--')': ) [0/1] {73} - ¦ °--expr: x + 1 [0/0] {74} - ¦ ¦--expr: x [0/1] {76} - ¦ ¦ °--SYMBOL: x [0/0] {75} - ¦ ¦--'+': + [0/1] {77} - ¦ °--expr: 1 [0/0] {79} - ¦ °--NUM_CONST: 1 [0/0] {78} - ¦--';': ; [0/0] {80} - ¦--expr: b [0/0] {82} - ¦ °--SYMBOL: b [0/0] {81} - ¦--';': ; [0/0] {83} - ¦--expr: c [0/0] {85} - ¦ °--SYMBOL: c [0/0] {84} - ¦--COMMENT: # don [2/0] {86} - °--expr: a %>% [1/0] {87} - ¦--expr: a [0/1] {90} - ¦ °--SYMBOL: a [0/0] {89} - ¦--SPECIAL-PIPE: %>% [0/2] {91} - ¦--expr: b [1/1] {93} - ¦ °--SYMBOL: b [0/0] {92} - ¦--SPECIAL-PIPE: %>% [0/2] {94} - °--expr: c [1/0] {96} - °--SYMBOL: c [0/0] {95} diff --git a/tests/testthat/scope-AsIs/scope_tokens-in_tree b/tests/testthat/scope-AsIs/scope_tokens-in_tree deleted file mode 100644 index 2b1d97fb2..000000000 --- a/tests/testthat/scope-AsIs/scope_tokens-in_tree +++ /dev/null @@ -1,96 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: # add [0/0] {1} - ¦--expr: if (x [1/0] {2} - ¦ ¦--IF: if [0/1] {3} - ¦ ¦--'(': ( [0/0] {4} - ¦ ¦--expr: x [0/0] {6} - ¦ ¦ °--SYMBOL: x [0/0] {5} - ¦ ¦--')': ) [0/1] {7} - ¦ ¦--expr: {1 + [0/1] {8} - ¦ ¦ ¦--'{': { [0/0] {9} - ¦ ¦ ¦--expr: 1 + 1 [0/0] {10} - ¦ ¦ ¦ ¦--expr: 1 [0/1] {13} - ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {12} - ¦ ¦ ¦ ¦--'+': + [0/1] {14} - ¦ ¦ ¦ ¦--expr: 1 [0/1] {16} - ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {15} - ¦ ¦ ¦ ¦--'+': + [0/1] {17} - ¦ ¦ ¦ °--expr: +1 [0/0] {18} - ¦ ¦ ¦ ¦--'+': + [0/0] {19} - ¦ ¦ ¦ °--expr: 1 [0/0] {21} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {20} - ¦ ¦ °--'}': } [0/0] {22} - ¦ ¦--ELSE: else [0/1] {23} - ¦ °--expr: {3} [0/0] {24} - ¦ ¦--'{': { [0/0] {25} - ¦ ¦--expr: 3 [0/0] {27} - ¦ ¦ °--NUM_CONST: 3 [0/0] {26} - ¦ °--'}': } [0/0] {28} - ¦--COMMENT: # rem [2/0] {29} - ¦--expr: test_ [1/0] {30} - ¦ ¦--expr: test_ [0/0] {32} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: test_ [0/0] {31} - ¦ ¦--'(': ( [0/0] {33} - ¦ ¦--expr: "x" [0/0] {35} - ¦ ¦ °--STR_CONST: "x" [0/0] {34} - ¦ ¦--',': , [0/10] {36} - ¦ ¦--expr: { - [1/0] {37} - ¦ ¦ ¦--'{': { [0/12] {38} - ¦ ¦ ¦--expr: my_te [1/10] {39} - ¦ ¦ ¦ ¦--expr: my_te [0/0] {41} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: my_te [0/0] {40} - ¦ ¦ ¦ ¦--'(': ( [0/0] {42} - ¦ ¦ ¦ ¦--expr: call [0/0] {44} - ¦ ¦ ¦ ¦ °--SYMBOL: call [0/0] {43} - ¦ ¦ ¦ °--')': ) [0/0] {45} - ¦ ¦ °--'}': } [1/0] {46} - ¦ °--')': ) [0/0] {47} - ¦--COMMENT: # do [3/0] {48} - ¦--expr_or_assign_or_help: a = 3 [1/0] {49} - ¦ ¦--expr: a [0/1] {51} - ¦ ¦ °--SYMBOL: a [0/0] {50} - ¦ ¦--EQ_ASSIGN: = [0/1] {52} - ¦ °--expr: 3 [0/0] {54} - ¦ °--NUM_CONST: 3 [0/0] {53} - ¦--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: 3 [0/0] {62} - ¦ ¦ °--NUM_CONST: 3 [0/0] {61} - ¦ °--')': ) [0/0] {63} - ¦--COMMENT: # do [2/0] {64} - ¦--expr: a <- [1/0] {65} - ¦ ¦--expr: a [0/1] {67} - ¦ ¦ °--SYMBOL: a [0/0] {66} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {68} - ¦ °--expr: funct [0/0] {69} - ¦ ¦--FUNCTION: funct [0/0] {70} - ¦ ¦--'(': ( [0/0] {71} - ¦ ¦--SYMBOL_FORMALS: x [0/0] {72} - ¦ ¦--')': ) [0/1] {73} - ¦ °--expr: x + 1 [0/0] {74} - ¦ ¦--expr: x [0/1] {76} - ¦ ¦ °--SYMBOL: x [0/0] {75} - ¦ ¦--'+': + [0/1] {77} - ¦ °--expr: 1 [0/0] {79} - ¦ °--NUM_CONST: 1 [0/0] {78} - ¦--';': ; [0/0] {80} - ¦--expr: b [0/0] {82} - ¦ °--SYMBOL: b [0/0] {81} - ¦--';': ; [0/0] {83} - ¦--expr: c [0/0] {85} - ¦ °--SYMBOL: c [0/0] {84} - ¦--COMMENT: # don [2/0] {86} - °--expr: a %>% [1/0] {87} - ¦--expr: a [0/1] {90} - ¦ °--SYMBOL: a [0/0] {89} - ¦--SPECIAL-PIPE: %>% [0/2] {91} - ¦--expr: b [1/1] {93} - ¦ °--SYMBOL: b [0/0] {92} - ¦--SPECIAL-PIPE: %>% [0/2] {94} - °--expr: c [1/0] {96} - °--SYMBOL: c [0/0] {95} diff --git a/tests/testthat/scope-character/scope_indention-in_tree b/tests/testthat/scope-character/scope_indention-in_tree deleted file mode 100644 index 10fda6ca9..000000000 --- a/tests/testthat/scope-character/scope_indention-in_tree +++ /dev/null @@ -1,97 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: # not [0/0] {1} - ¦--expr: if (x [1/0] {2} - ¦ ¦--IF: if [0/1] {3} - ¦ ¦--'(': ( [0/0] {4} - ¦ ¦--expr: x [0/0] {6} - ¦ ¦ °--SYMBOL: x [0/0] {5} - ¦ ¦--')': ) [0/1] {7} - ¦ ¦--expr: {1+1+ [0/1] {8} - ¦ ¦ ¦--'{': { [0/0] {9} - ¦ ¦ ¦--expr: 1+1++ [0/0] {10} - ¦ ¦ ¦ ¦--expr: 1 [0/0] {13} - ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {12} - ¦ ¦ ¦ ¦--'+': + [0/0] {14} - ¦ ¦ ¦ ¦--expr: 1 [0/0] {16} - ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {15} - ¦ ¦ ¦ ¦--'+': + [0/0] {17} - ¦ ¦ ¦ °--expr: +1 [0/0] {18} - ¦ ¦ ¦ ¦--'+': + [0/0] {19} - ¦ ¦ ¦ °--expr: 1 [0/0] {21} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {20} - ¦ ¦ °--'}': } [0/0] {22} - ¦ ¦--ELSE: else [0/0] {23} - ¦ °--expr: {3} [0/0] {24} - ¦ ¦--'{': { [0/0] {25} - ¦ ¦--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: test_ [1/0] {31} - ¦ ¦--expr: test_ [0/0] {33} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: test_ [0/0] {32} - ¦ ¦--'(': ( [0/0] {34} - ¦ ¦--expr: "x" [0/0] {36} - ¦ ¦ °--STR_CONST: "x" [0/0] {35} - ¦ ¦--',': , [0/2] {37} - ¦ ¦--expr: { - [1/0] {38} - ¦ ¦ ¦--'{': { [0/12] {39} - ¦ ¦ ¦--expr: my_te [1/0] {40} - ¦ ¦ ¦ ¦--expr: my_te [0/0] {42} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: my_te [0/0] {41} - ¦ ¦ ¦ ¦--'(': ( [0/0] {43} - ¦ ¦ ¦ ¦--expr: call [0/0] {45} - ¦ ¦ ¦ ¦ °--SYMBOL: call [0/0] {44} - ¦ ¦ ¦ °--')': ) [0/0] {46} - ¦ ¦ °--'}': } [1/0] {47} - ¦ °--')': ) [0/0] {48} - ¦--COMMENT: # do [2/0] {49} - ¦--expr_or_assign_or_help: a = 3 [1/0] {50} - ¦ ¦--expr: a [0/1] {52} - ¦ ¦ °--SYMBOL: a [0/0] {51} - ¦ ¦--EQ_ASSIGN: = [0/1] {53} - ¦ °--expr: 3 [0/0] {55} - ¦ °--NUM_CONST: 3 [0/0] {54} - ¦--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: 3 [0/0] {63} - ¦ ¦ °--NUM_CONST: 3 [0/0] {62} - ¦ °--')': ) [0/0] {64} - ¦--COMMENT: # do [2/0] {65} - ¦--expr: a <- [1/0] {66} - ¦ ¦--expr: a [0/1] {68} - ¦ ¦ °--SYMBOL: a [0/0] {67} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {69} - ¦ °--expr: funct [0/0] {70} - ¦ ¦--FUNCTION: funct [0/0] {71} - ¦ ¦--'(': ( [0/0] {72} - ¦ ¦--SYMBOL_FORMALS: x [0/0] {73} - ¦ ¦--')': ) [0/1] {74} - ¦ °--expr: x + 1 [0/0] {75} - ¦ ¦--expr: x [0/1] {77} - ¦ ¦ °--SYMBOL: x [0/0] {76} - ¦ ¦--'+': + [0/1] {78} - ¦ °--expr: 1 [0/0] {80} - ¦ °--NUM_CONST: 1 [0/0] {79} - ¦--';': ; [0/0] {81} - ¦--expr: b [0/0] {83} - ¦ °--SYMBOL: b [0/0] {82} - ¦--';': ; [0/0] {84} - ¦--expr: c [0/0] {86} - ¦ °--SYMBOL: c [0/0] {85} - ¦--COMMENT: # don [2/0] {87} - °--expr: a %>% [1/0] {88} - ¦--expr: a [0/1] {91} - ¦ °--SYMBOL: a [0/0] {90} - ¦--SPECIAL-PIPE: %>% [0/2] {92} - ¦--expr: b [1/1] {94} - ¦ °--SYMBOL: b [0/0] {93} - ¦--SPECIAL-PIPE: %>% [0/2] {95} - °--expr: c [1/0] {97} - °--SYMBOL: c [0/0] {96} diff --git a/tests/testthat/scope-character/scope_line_breaks-in_tree b/tests/testthat/scope-character/scope_line_breaks-in_tree deleted file mode 100644 index 2b1d97fb2..000000000 --- a/tests/testthat/scope-character/scope_line_breaks-in_tree +++ /dev/null @@ -1,96 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: # add [0/0] {1} - ¦--expr: if (x [1/0] {2} - ¦ ¦--IF: if [0/1] {3} - ¦ ¦--'(': ( [0/0] {4} - ¦ ¦--expr: x [0/0] {6} - ¦ ¦ °--SYMBOL: x [0/0] {5} - ¦ ¦--')': ) [0/1] {7} - ¦ ¦--expr: {1 + [0/1] {8} - ¦ ¦ ¦--'{': { [0/0] {9} - ¦ ¦ ¦--expr: 1 + 1 [0/0] {10} - ¦ ¦ ¦ ¦--expr: 1 [0/1] {13} - ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {12} - ¦ ¦ ¦ ¦--'+': + [0/1] {14} - ¦ ¦ ¦ ¦--expr: 1 [0/1] {16} - ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {15} - ¦ ¦ ¦ ¦--'+': + [0/1] {17} - ¦ ¦ ¦ °--expr: +1 [0/0] {18} - ¦ ¦ ¦ ¦--'+': + [0/0] {19} - ¦ ¦ ¦ °--expr: 1 [0/0] {21} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {20} - ¦ ¦ °--'}': } [0/0] {22} - ¦ ¦--ELSE: else [0/1] {23} - ¦ °--expr: {3} [0/0] {24} - ¦ ¦--'{': { [0/0] {25} - ¦ ¦--expr: 3 [0/0] {27} - ¦ ¦ °--NUM_CONST: 3 [0/0] {26} - ¦ °--'}': } [0/0] {28} - ¦--COMMENT: # rem [2/0] {29} - ¦--expr: test_ [1/0] {30} - ¦ ¦--expr: test_ [0/0] {32} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: test_ [0/0] {31} - ¦ ¦--'(': ( [0/0] {33} - ¦ ¦--expr: "x" [0/0] {35} - ¦ ¦ °--STR_CONST: "x" [0/0] {34} - ¦ ¦--',': , [0/10] {36} - ¦ ¦--expr: { - [1/0] {37} - ¦ ¦ ¦--'{': { [0/12] {38} - ¦ ¦ ¦--expr: my_te [1/10] {39} - ¦ ¦ ¦ ¦--expr: my_te [0/0] {41} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: my_te [0/0] {40} - ¦ ¦ ¦ ¦--'(': ( [0/0] {42} - ¦ ¦ ¦ ¦--expr: call [0/0] {44} - ¦ ¦ ¦ ¦ °--SYMBOL: call [0/0] {43} - ¦ ¦ ¦ °--')': ) [0/0] {45} - ¦ ¦ °--'}': } [1/0] {46} - ¦ °--')': ) [0/0] {47} - ¦--COMMENT: # do [3/0] {48} - ¦--expr_or_assign_or_help: a = 3 [1/0] {49} - ¦ ¦--expr: a [0/1] {51} - ¦ ¦ °--SYMBOL: a [0/0] {50} - ¦ ¦--EQ_ASSIGN: = [0/1] {52} - ¦ °--expr: 3 [0/0] {54} - ¦ °--NUM_CONST: 3 [0/0] {53} - ¦--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: 3 [0/0] {62} - ¦ ¦ °--NUM_CONST: 3 [0/0] {61} - ¦ °--')': ) [0/0] {63} - ¦--COMMENT: # do [2/0] {64} - ¦--expr: a <- [1/0] {65} - ¦ ¦--expr: a [0/1] {67} - ¦ ¦ °--SYMBOL: a [0/0] {66} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {68} - ¦ °--expr: funct [0/0] {69} - ¦ ¦--FUNCTION: funct [0/0] {70} - ¦ ¦--'(': ( [0/0] {71} - ¦ ¦--SYMBOL_FORMALS: x [0/0] {72} - ¦ ¦--')': ) [0/1] {73} - ¦ °--expr: x + 1 [0/0] {74} - ¦ ¦--expr: x [0/1] {76} - ¦ ¦ °--SYMBOL: x [0/0] {75} - ¦ ¦--'+': + [0/1] {77} - ¦ °--expr: 1 [0/0] {79} - ¦ °--NUM_CONST: 1 [0/0] {78} - ¦--';': ; [0/0] {80} - ¦--expr: b [0/0] {82} - ¦ °--SYMBOL: b [0/0] {81} - ¦--';': ; [0/0] {83} - ¦--expr: c [0/0] {85} - ¦ °--SYMBOL: c [0/0] {84} - ¦--COMMENT: # don [2/0] {86} - °--expr: a %>% [1/0] {87} - ¦--expr: a [0/1] {90} - ¦ °--SYMBOL: a [0/0] {89} - ¦--SPECIAL-PIPE: %>% [0/2] {91} - ¦--expr: b [1/1] {93} - ¦ °--SYMBOL: b [0/0] {92} - ¦--SPECIAL-PIPE: %>% [0/2] {94} - °--expr: c [1/0] {96} - °--SYMBOL: c [0/0] {95} diff --git a/tests/testthat/scope-character/scope_none-in_tree b/tests/testthat/scope-character/scope_none-in_tree deleted file mode 100644 index 3c65a9c14..000000000 --- a/tests/testthat/scope-character/scope_none-in_tree +++ /dev/null @@ -1,159 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: #'thi [0/0] {1} - ¦--COMMENT: #' [1/0] {2} - ¦--COMMENT: #' @p [1/0] {3} - ¦--COMMENT: #' [1/0] {4} - ¦--expr: a<- f [1/0] {5} - ¦ ¦--expr: a [0/0] {7} - ¦ ¦ °--SYMBOL: a [0/0] {6} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {8} - ¦ °--expr: funct [0/0] {9} - ¦ ¦--FUNCTION: funct [0/0] {10} - ¦ ¦--'(': ( [0/0] {11} - ¦ ¦--SYMBOL_FORMALS: x [0/0] {12} - ¦ ¦--')': ) [0/0] {13} - ¦ °--expr: { - t [0/0] {14} - ¦ ¦--'{': { [0/2] {15} - ¦ ¦--expr: test_ [1/2] {16} - ¦ ¦ ¦--expr: test_ [0/0] {18} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: test_ [0/0] {17} - ¦ ¦ ¦--'(': ( [0/0] {19} - ¦ ¦ ¦--expr: "I wa [0/0] {21} - ¦ ¦ ¦ °--STR_CONST: "I wa [0/0] {20} - ¦ ¦ ¦--',': , [0/0] {22} - ¦ ¦ ¦--expr: { - [0/5] {23} - ¦ ¦ ¦ ¦--'{': { [0/4] {24} - ¦ ¦ ¦ ¦--expr: out < [1/4] {25} - ¦ ¦ ¦ ¦ ¦--expr: out [0/1] {27} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL: out [0/0] {26} - ¦ ¦ ¦ ¦ ¦--LEFT_ASSIGN: <- [0/1] {28} - ¦ ¦ ¦ ¦ °--expr: c(1,c [0/0] {29} - ¦ ¦ ¦ ¦ ¦--expr: c [0/0] {31} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {30} - ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {32} - ¦ ¦ ¦ ¦ ¦--expr: 1 [0/0] {34} - ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {33} - ¦ ¦ ¦ ¦ ¦--',': , [0/0] {35} - ¦ ¦ ¦ ¦ ¦--expr: c( - [0/0] {36} - ¦ ¦ ¦ ¦ ¦ ¦--expr: c [0/0] {38} - ¦ ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {37} - ¦ ¦ ¦ ¦ ¦ ¦--'(': ( [0/6] {39} - ¦ ¦ ¦ ¦ ¦ ¦--expr: 22 +1 [1/4] {40} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: 22 [0/1] {42} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 22 [0/0] {41} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--'+': + [0/0] {43} - ¦ ¦ ¦ ¦ ¦ ¦ °--expr: 1 [0/0] {45} - ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {44} - ¦ ¦ ¦ ¦ ¦ °--')': ) [1/0] {46} - ¦ ¦ ¦ ¦ °--')': ) [0/0] {47} - ¦ ¦ ¦ ¦--expr: if (x [1/2] {48} - ¦ ¦ ¦ ¦ ¦--IF: if [0/1] {49} - ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {50} - ¦ ¦ ¦ ¦ ¦--expr: x > 1 [0/0] {51} - ¦ ¦ ¦ ¦ ¦ ¦--expr: x [0/1] {53} - ¦ ¦ ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {52} - ¦ ¦ ¦ ¦ ¦ ¦--GT: > [0/1] {54} - ¦ ¦ ¦ ¦ ¦ °--expr: 10 [0/0] {56} - ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 10 [0/0] {55} - ¦ ¦ ¦ ¦ ¦--')': ) [0/1] {57} - ¦ ¦ ¦ ¦ °--expr: { - [0/0] {58} - ¦ ¦ ¦ ¦ ¦--'{': { [0/6] {59} - ¦ ¦ ¦ ¦ ¦--expr: for ( [1/4] {60} - ¦ ¦ ¦ ¦ ¦ ¦--FOR: for [0/1] {61} - ¦ ¦ ¦ ¦ ¦ ¦--forcond: (x in [0/1] {62} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {63} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--SYMBOL: x [0/1] {64} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--IN: in [0/1] {65} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: 22 [0/0] {67} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 22 [0/0] {66} - ¦ ¦ ¦ ¦ ¦ ¦ °--')': ) [0/0] {68} - ¦ ¦ ¦ ¦ ¦ °--expr: { # F [0/0] {69} - ¦ ¦ ¦ ¦ ¦ ¦--'{': { [0/1] {70} - ¦ ¦ ¦ ¦ ¦ ¦--COMMENT: # FIX [0/8] {71} - ¦ ¦ ¦ ¦ ¦ ¦--expr: prin( [1/6] {72} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: prin [0/0] {74} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: prin [0/0] {73} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {75} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: x [0/0] {77} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {76} - ¦ ¦ ¦ ¦ ¦ ¦ °--')': ) [0/0] {78} - ¦ ¦ ¦ ¦ ¦ °--'}': } [1/0] {79} - ¦ ¦ ¦ ¦ °--'}': } [1/0] {80} - ¦ ¦ ¦ °--'}': } [1/0] {81} - ¦ ¦ °--')': ) [0/0] {82} - ¦ ¦--COMMENT: #we l [1/2] {83} - ¦ ¦--expr: c(lis [1/2] {84} - ¦ ¦ ¦--expr: c [0/0] {86} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {85} - ¦ ¦ ¦--'(': ( [0/0] {87} - ¦ ¦ ¦--expr: list( [0/0] {88} - ¦ ¦ ¦ ¦--expr: list [0/0] {90} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: list [0/0] {89} - ¦ ¦ ¦ ¦--'(': ( [0/0] {91} - ¦ ¦ ¦ ¦--expr: x + 2 [0/0] {92} - ¦ ¦ ¦ ¦ ¦--expr: x [0/1] {94} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {93} - ¦ ¦ ¦ ¦ ¦--'+': + [0/1] {95} - ¦ ¦ ¦ ¦ °--expr: 2 [0/0] {97} - ¦ ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {96} - ¦ ¦ ¦ °--')': ) [0/0] {98} - ¦ ¦ ¦--',': , [0/4] {99} - ¦ ¦ ¦--expr: c( [1/1] {100} - ¦ ¦ ¦ ¦--expr: c [0/0] {102} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {101} - ¦ ¦ ¦ ¦--'(': ( [0/4] {103} - ¦ ¦ ¦ ¦--expr: c( - [0/3] {104} - ¦ ¦ ¦ ¦ ¦--expr: c [0/0] {106} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {105} - ¦ ¦ ¦ ¦ ¦--'(': ( [0/6] {107} - ¦ ¦ ¦ ¦ ¦--expr: 26 ^ [1/0] {108} - ¦ ¦ ¦ ¦ ¦ ¦--expr: 26 [0/1] {110} - ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 26 [0/0] {109} - ¦ ¦ ¦ ¦ ¦ ¦--'^': ^ [0/1] {111} - ¦ ¦ ¦ ¦ ¦ °--expr: 2 [0/0] {113} - ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {112} - ¦ ¦ ¦ ¦ ¦--',': , [0/1] {114} - ¦ ¦ ¦ ¦ ¦--COMMENT: # FIX [0/6] {115} - ¦ ¦ ¦ ¦ ¦--expr: 8 [1/0] {117} - ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 8 [0/0] {116} - ¦ ¦ ¦ ¦ ¦--',': , [0/6] {118} - ¦ ¦ ¦ ¦ ¦--expr: 7 [1/4] {120} - ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 7 [0/0] {119} - ¦ ¦ ¦ ¦ °--')': ) [1/0] {121} - ¦ ¦ ¦ °--')': ) [0/0] {122} - ¦ ¦ °--')': ) [0/0] {123} - ¦ ¦--expr: call( [2/0] {124} - ¦ ¦ ¦--expr: call [0/0] {126} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {125} - ¦ ¦ ¦--'(': ( [0/4] {127} - ¦ ¦ ¦--expr: 1 [1/0] {129} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {128} - ¦ ¦ ¦--',': , [0/1] {130} - ¦ ¦ ¦--expr: 2 [0/0] {132} - ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {131} - ¦ ¦ ¦--',': , [0/4] {133} - ¦ ¦ ¦--expr: 23+In [1/0] {134} - ¦ ¦ ¦ ¦--expr: 23 [0/0] {137} - ¦ ¦ ¦ ¦ °--NUM_CONST: 23 [0/0] {136} - ¦ ¦ ¦ ¦--'+': + [0/0] {138} - ¦ ¦ ¦ ¦--expr: Inf [0/1] {140} - ¦ ¦ ¦ ¦ °--NUM_CONST: Inf [0/0] {139} - ¦ ¦ ¦ ¦--'-': - [0/1] {141} - ¦ ¦ ¦ °--expr: 99 [0/0] {143} - ¦ ¦ ¦ °--NUM_CONST: 99 [0/0] {142} - ¦ ¦ ¦--',': , [0/1] {144} - ¦ ¦ ¦--expr: call( [0/0] {145} - ¦ ¦ ¦ ¦--expr: call [0/0] {147} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {146} - ¦ ¦ ¦ ¦--'(': ( [0/6] {148} - ¦ ¦ ¦ ¦--expr: 16 [1/4] {150} - ¦ ¦ ¦ ¦ °--NUM_CONST: 16 [0/0] {149} - ¦ ¦ ¦ °--')': ) [1/0] {151} - ¦ ¦ °--')': ) [0/0] {152} - ¦ °--'}': } [1/0] {153} - °--COMMENT: # com [1/0] {154} diff --git a/tests/testthat/scope-character/scope_spaces-in_tree b/tests/testthat/scope-character/scope_spaces-in_tree deleted file mode 100644 index 81781740b..000000000 --- a/tests/testthat/scope-character/scope_spaces-in_tree +++ /dev/null @@ -1,25 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: a<-fu [0/0] {1} - ¦--expr: a [0/0] {3} - ¦ °--SYMBOL: a [0/0] {2} - ¦--LEFT_ASSIGN: <- [0/0] {4} - °--expr: funct [0/0] {5} - ¦--FUNCTION: funct [0/0] {6} - ¦--'(': ( [0/0] {7} - ¦--')': ) [0/0] {8} - °--expr: { - [0/0] {9} - ¦--'{': { [0/20] {10} - ¦--expr: 1+1 [1/0] {11} - ¦ ¦--expr: 1 [0/0] {13} - ¦ ¦ °--NUM_CONST: 1 [0/0] {12} - ¦ ¦--'+': + [0/0] {14} - ¦ °--expr: 1 [0/0] {16} - ¦ °--NUM_CONST: 1 [0/0] {15} - ¦--expr_or_assign_or_help: d=3 [1/4] {17} - ¦ ¦--expr: d [0/0] {19} - ¦ ¦ °--SYMBOL: d [0/0] {18} - ¦ ¦--EQ_ASSIGN: = [0/0] {20} - ¦ °--expr: 3 [0/0] {22} - ¦ °--NUM_CONST: 3 [0/0] {21} - °--'}': } [1/0] {23} diff --git a/tests/testthat/scope-character/scope_tokens-in_tree b/tests/testthat/scope-character/scope_tokens-in_tree deleted file mode 100644 index 2b1d97fb2..000000000 --- a/tests/testthat/scope-character/scope_tokens-in_tree +++ /dev/null @@ -1,96 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: # add [0/0] {1} - ¦--expr: if (x [1/0] {2} - ¦ ¦--IF: if [0/1] {3} - ¦ ¦--'(': ( [0/0] {4} - ¦ ¦--expr: x [0/0] {6} - ¦ ¦ °--SYMBOL: x [0/0] {5} - ¦ ¦--')': ) [0/1] {7} - ¦ ¦--expr: {1 + [0/1] {8} - ¦ ¦ ¦--'{': { [0/0] {9} - ¦ ¦ ¦--expr: 1 + 1 [0/0] {10} - ¦ ¦ ¦ ¦--expr: 1 [0/1] {13} - ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {12} - ¦ ¦ ¦ ¦--'+': + [0/1] {14} - ¦ ¦ ¦ ¦--expr: 1 [0/1] {16} - ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {15} - ¦ ¦ ¦ ¦--'+': + [0/1] {17} - ¦ ¦ ¦ °--expr: +1 [0/0] {18} - ¦ ¦ ¦ ¦--'+': + [0/0] {19} - ¦ ¦ ¦ °--expr: 1 [0/0] {21} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {20} - ¦ ¦ °--'}': } [0/0] {22} - ¦ ¦--ELSE: else [0/1] {23} - ¦ °--expr: {3} [0/0] {24} - ¦ ¦--'{': { [0/0] {25} - ¦ ¦--expr: 3 [0/0] {27} - ¦ ¦ °--NUM_CONST: 3 [0/0] {26} - ¦ °--'}': } [0/0] {28} - ¦--COMMENT: # rem [2/0] {29} - ¦--expr: test_ [1/0] {30} - ¦ ¦--expr: test_ [0/0] {32} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: test_ [0/0] {31} - ¦ ¦--'(': ( [0/0] {33} - ¦ ¦--expr: "x" [0/0] {35} - ¦ ¦ °--STR_CONST: "x" [0/0] {34} - ¦ ¦--',': , [0/10] {36} - ¦ ¦--expr: { - [1/0] {37} - ¦ ¦ ¦--'{': { [0/12] {38} - ¦ ¦ ¦--expr: my_te [1/10] {39} - ¦ ¦ ¦ ¦--expr: my_te [0/0] {41} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: my_te [0/0] {40} - ¦ ¦ ¦ ¦--'(': ( [0/0] {42} - ¦ ¦ ¦ ¦--expr: call [0/0] {44} - ¦ ¦ ¦ ¦ °--SYMBOL: call [0/0] {43} - ¦ ¦ ¦ °--')': ) [0/0] {45} - ¦ ¦ °--'}': } [1/0] {46} - ¦ °--')': ) [0/0] {47} - ¦--COMMENT: # do [3/0] {48} - ¦--expr_or_assign_or_help: a = 3 [1/0] {49} - ¦ ¦--expr: a [0/1] {51} - ¦ ¦ °--SYMBOL: a [0/0] {50} - ¦ ¦--EQ_ASSIGN: = [0/1] {52} - ¦ °--expr: 3 [0/0] {54} - ¦ °--NUM_CONST: 3 [0/0] {53} - ¦--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: 3 [0/0] {62} - ¦ ¦ °--NUM_CONST: 3 [0/0] {61} - ¦ °--')': ) [0/0] {63} - ¦--COMMENT: # do [2/0] {64} - ¦--expr: a <- [1/0] {65} - ¦ ¦--expr: a [0/1] {67} - ¦ ¦ °--SYMBOL: a [0/0] {66} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {68} - ¦ °--expr: funct [0/0] {69} - ¦ ¦--FUNCTION: funct [0/0] {70} - ¦ ¦--'(': ( [0/0] {71} - ¦ ¦--SYMBOL_FORMALS: x [0/0] {72} - ¦ ¦--')': ) [0/1] {73} - ¦ °--expr: x + 1 [0/0] {74} - ¦ ¦--expr: x [0/1] {76} - ¦ ¦ °--SYMBOL: x [0/0] {75} - ¦ ¦--'+': + [0/1] {77} - ¦ °--expr: 1 [0/0] {79} - ¦ °--NUM_CONST: 1 [0/0] {78} - ¦--';': ; [0/0] {80} - ¦--expr: b [0/0] {82} - ¦ °--SYMBOL: b [0/0] {81} - ¦--';': ; [0/0] {83} - ¦--expr: c [0/0] {85} - ¦ °--SYMBOL: c [0/0] {84} - ¦--COMMENT: # don [2/0] {86} - °--expr: a %>% [1/0] {87} - ¦--expr: a [0/1] {90} - ¦ °--SYMBOL: a [0/0] {89} - ¦--SPECIAL-PIPE: %>% [0/2] {91} - ¦--expr: b [1/1] {93} - ¦ °--SYMBOL: b [0/0] {92} - ¦--SPECIAL-PIPE: %>% [0/2] {94} - °--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 deleted file mode 100644 index be3886955..000000000 --- a/tests/testthat/serialize_tests/correct-in_tree +++ /dev/null @@ -1,7 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: 1 [0/0] {2} - ¦ °--NUM_CONST: 1 [0/0] {1} - ¦--expr: 2 [1/0] {4} - ¦ °--NUM_CONST: 2 [0/0] {3} - °--expr: 3 [1/0] {6} - °--NUM_CONST: 3 [0/0] {5} diff --git a/tests/testthat/serialize_tests/k2-another-in_file-in_tree b/tests/testthat/serialize_tests/k2-another-in_file-in_tree deleted file mode 100644 index 0e6aa6847..000000000 --- a/tests/testthat/serialize_tests/k2-another-in_file-in_tree +++ /dev/null @@ -1,30 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: [0/0] {1} - ¦--expr: [0/0] {3} - ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {2} - ¦--'(': ( [0/0] {4} - ¦--expr: [0/0] {6} - ¦ °--NUM_CONST: 1 [0/0] {5} - ¦--',': , [0/5] {7} - ¦--expr: [1/0] {8} - ¦ ¦--expr: [0/0] {10} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call2 [0/0] {9} - ¦ ¦--'(': ( [0/0] {11} - ¦ ¦--expr: [0/0] {12} - ¦ ¦ ¦--expr: [0/0] {14} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {13} - ¦ ¦ ¦--'(': ( [0/0] {15} - ¦ ¦ ¦--expr: [0/0] {17} - ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {16} - ¦ ¦ ¦--',': , [0/1] {18} - ¦ ¦ ¦--expr: [0/0] {20} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {19} - ¦ ¦ ¦--',': , [0/8] {21} - ¦ ¦ ¦--expr: [0/0] {23} - ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {22} - ¦ ¦ °--')': ) [0/0] {24} - ¦ ¦--',': , [0/11] {25} - ¦ ¦--expr: [1/0] {27} - ¦ ¦ °--NUM_CONST: 4 [0/0] {26} - ¦ °--')': ) [0/0] {28} - °--')': ) [0/0] {29} diff --git a/tests/testthat/serialize_tests/k2-in_tree b/tests/testthat/serialize_tests/k2-in_tree deleted file mode 100644 index aa6b6df0c..000000000 --- a/tests/testthat/serialize_tests/k2-in_tree +++ /dev/null @@ -1,30 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: [0/0] {1} - ¦--expr: [0/0] {3} - ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {2} - ¦--'(': ( [0/0] {4} - ¦--expr: [0/0] {6} - ¦ °--NUM_CONST: 1 [0/0] {5} - ¦--',': , [0/0] {7} - ¦--expr: [1/0] {8} - ¦ ¦--expr: [0/0] {10} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call2 [0/0] {9} - ¦ ¦--'(': ( [0/0] {11} - ¦ ¦--expr: [0/0] {12} - ¦ ¦ ¦--expr: [0/0] {14} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {13} - ¦ ¦ ¦--'(': ( [0/0] {15} - ¦ ¦ ¦--expr: [0/0] {17} - ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {16} - ¦ ¦ ¦--',': , [0/12] {18} - ¦ ¦ ¦--expr: [0/0] {20} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {19} - ¦ ¦ ¦--',': , [0/1] {21} - ¦ ¦ ¦--expr: [0/0] {23} - ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {22} - ¦ ¦ °--')': ) [0/0] {24} - ¦ ¦--',': , [0/2] {25} - ¦ ¦--expr: [1/0] {27} - ¦ ¦ °--NUM_CONST: 4 [0/0] {26} - ¦ °--')': ) [0/0] {28} - °--')': ) [0/0] {29} diff --git a/tests/testthat/serialize_tests/k3-in_tree b/tests/testthat/serialize_tests/k3-in_tree deleted file mode 100644 index 5f6cd8cf6..000000000 --- a/tests/testthat/serialize_tests/k3-in_tree +++ /dev/null @@ -1,6 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--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 deleted file mode 100644 index d7f85e501..000000000 --- a/tests/testthat/spacing/bang_bang_spacing-in_tree +++ /dev/null @@ -1,60 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: a(! ! [0/0] {1} - ¦ ¦--expr: a [0/0] {3} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: a [0/0] {2} - ¦ ¦--'(': ( [0/0] {4} - ¦ ¦--expr: ! !!x [0/0] {5} - ¦ ¦ ¦--'!': ! [0/1] {6} - ¦ ¦ °--expr: !!x [0/0] {7} - ¦ ¦ ¦--'!': ! [0/0] {8} - ¦ ¦ °--expr: !x [0/0] {9} - ¦ ¦ ¦--'!': ! [0/0] {10} - ¦ ¦ °--expr: x [0/0] {12} - ¦ ¦ °--SYMBOL: x [0/0] {11} - ¦ °--')': ) [0/0] {13} - ¦--expr: k(!!g [1/0] {14} - ¦ ¦--expr: k [0/0] {16} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: k [0/0] {15} - ¦ ¦--'(': ( [0/0] {17} - ¦ ¦--expr: !!g [0/0] {18} - ¦ ¦ ¦--'!': ! [0/0] {19} - ¦ ¦ °--expr: !g [0/0] {20} - ¦ ¦ ¦--'!': ! [0/0] {21} - ¦ ¦ °--expr: g [0/0] {23} - ¦ ¦ °--SYMBOL: g [0/0] {22} - ¦ °--')': ) [0/0] {24} - ¦--expr: a(!!! [1/0] {25} - ¦ ¦--expr: a [0/0] {27} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: a [0/0] {26} - ¦ ¦--'(': ( [0/0] {28} - ¦ ¦--expr: !!!x [0/0] {29} - ¦ ¦ ¦--'!': ! [0/0] {30} - ¦ ¦ °--expr: !!x [0/0] {31} - ¦ ¦ ¦--'!': ! [0/0] {32} - ¦ ¦ °--expr: !x [0/0] {33} - ¦ ¦ ¦--'!': ! [0/0] {34} - ¦ ¦ °--expr: x [0/0] {36} - ¦ ¦ °--SYMBOL: x [0/0] {35} - ¦ °--')': ) [0/0] {37} - ¦--expr: a(!! [1/0] {38} - ¦ ¦--expr: a [0/0] {40} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: a [0/0] {39} - ¦ ¦--'(': ( [0/0] {41} - ¦ ¦--expr: !! !x [0/0] {42} - ¦ ¦ ¦--'!': ! [0/0] {43} - ¦ ¦ °--expr: ! !x [0/0] {44} - ¦ ¦ ¦--'!': ! [0/1] {45} - ¦ ¦ °--expr: !x [0/0] {46} - ¦ ¦ ¦--'!': ! [0/0] {47} - ¦ ¦ °--expr: x [0/0] {49} - ¦ ¦ °--SYMBOL: x [0/0] {48} - ¦ °--')': ) [0/0] {50} - °--expr: a(!b) [1/0] {51} - ¦--expr: a [0/0] {53} - ¦ °--SYMBOL_FUNCTION_CALL: a [0/0] {52} - ¦--'(': ( [0/0] {54} - ¦--expr: !b [0/0] {55} - ¦ ¦--'!': ! [0/0] {56} - ¦ °--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 deleted file mode 100644 index 74758f9da..000000000 --- a/tests/testthat/spacing/colons-in_tree +++ /dev/null @@ -1,45 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: 1 : [0/0] {1} - ¦ ¦--expr: 1 [0/1] {3} - ¦ ¦ °--NUM_CONST: 1 [0/0] {2} - ¦ ¦--':': : [0/2] {4} - ¦ °--expr: 4 [0/0] {6} - ¦ °--NUM_CONST: 4 [0/0] {5} - ¦--expr: 1:4 [2/0] {7} - ¦ ¦--expr: 1 [0/0] {9} - ¦ ¦ °--NUM_CONST: 1 [0/0] {8} - ¦ ¦--':': : [0/0] {10} - ¦ °--expr: 4 [0/0] {12} - ¦ °--NUM_CONST: 4 [0/0] {11} - ¦--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: 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: 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: 3 [0/0] {34} - ¦ ¦ °--NUM_CONST: 3 [0/0] {33} - ¦ °--')': ) [0/0] {35} - °--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: 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 deleted file mode 100644 index 78c967bae..000000000 --- a/tests/testthat/spacing/comments-in_tree +++ /dev/null @@ -1,13 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: a [0/1] {2} - ¦ °--SYMBOL: a [0/0] {1} - ¦--COMMENT: # com [0/0] {3} - ¦--expr: b [1/1] {5} - ¦ °--SYMBOL: b [0/0] {4} - ¦--COMMENT: #comm [0/0] {6} - ¦--expr: c [1/4] {8} - ¦ °--SYMBOL: c [0/0] {7} - ¦--COMMENT: # com [0/0] {9} - ¦--expr: dejk [1/1] {11} - ¦ °--SYMBOL: dejk [0/0] {10} - °--COMMENT: #comm [0/0] {12} diff --git a/tests/testthat/spacing/dollar-in.R b/tests/testthat/spacing/dollar-in.R new file mode 100644 index 000000000..3ac9a459a --- /dev/null +++ b/tests/testthat/spacing/dollar-in.R @@ -0,0 +1,5 @@ +mtcars $wt + +mtcars$ wt + +mtcars $ wt diff --git a/tests/testthat/spacing/dollar-out.R b/tests/testthat/spacing/dollar-out.R new file mode 100644 index 000000000..070ddc731 --- /dev/null +++ b/tests/testthat/spacing/dollar-out.R @@ -0,0 +1,5 @@ +mtcars$wt + +mtcars$wt + +mtcars$wt diff --git a/tests/testthat/spacing/round_curly-in_tree b/tests/testthat/spacing/round_curly-in_tree deleted file mode 100644 index a54f8736a..000000000 --- a/tests/testthat/spacing/round_curly-in_tree +++ /dev/null @@ -1,71 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: a <- [0/0] {1} - ¦ ¦--expr: a [0/1] {3} - ¦ ¦ °--SYMBOL: a [0/0] {2} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {4} - ¦ °--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} - ¦ ¦--'{': { [0/0] {11} - ¦ °--'}': } [1/0] {12} - ¦--expr: if(a) [2/0] {13} - ¦ ¦--IF: if [0/0] {14} - ¦ ¦--'(': ( [0/0] {15} - ¦ ¦--expr: a [0/0] {17} - ¦ ¦ °--SYMBOL: a [0/0] {16} - ¦ ¦--')': ) [0/0] {18} - ¦ °--expr: { - 3 [0/0] {19} - ¦ ¦--'{': { [0/2] {20} - ¦ ¦--expr: 3 [1/0] {22} - ¦ ¦ °--NUM_CONST: 3 [0/0] {21} - ¦ °--'}': } [1/0] {23} - ¦--expr: for(i [2/0] {24} - ¦ ¦--FOR: for [0/0] {25} - ¦ ¦--forcond: (i in [0/0] {26} - ¦ ¦ ¦--'(': ( [0/0] {27} - ¦ ¦ ¦--SYMBOL: i [0/1] {28} - ¦ ¦ ¦--IN: in [0/1] {29} - ¦ ¦ ¦--expr: 10 [0/0] {31} - ¦ ¦ ¦ °--NUM_CONST: 10 [0/0] {30} - ¦ ¦ °--')': ) [0/0] {32} - ¦ °--expr: { - i [0/0] {33} - ¦ ¦--'{': { [0/2] {34} - ¦ ¦--expr: i [1/0] {36} - ¦ ¦ °--SYMBOL: i [0/0] {35} - ¦ °--'}': } [1/0] {37} - °--expr: if(x) [2/0] {38} - ¦--IF: if [0/0] {39} - ¦--'(': ( [0/0] {40} - ¦--expr: x [0/0] {42} - ¦ °--SYMBOL: x [0/0] {41} - ¦--')': ) [0/0] {43} - ¦--expr: { - y [0/0] {44} - ¦ ¦--'{': { [0/2] {45} - ¦ ¦--expr: y [1/0] {47} - ¦ ¦ °--SYMBOL: y [0/0] {46} - ¦ °--'}': } [1/0] {48} - ¦--ELSE: else [0/1] {49} - °--expr: if(x) [0/0] {50} - ¦--IF: if [0/0] {51} - ¦--'(': ( [0/0] {52} - ¦--expr: x [0/0] {54} - ¦ °--SYMBOL: x [0/0] {53} - ¦--')': ) [0/0] {55} - ¦--expr: { - x [0/1] {56} - ¦ ¦--'{': { [0/2] {57} - ¦ ¦--expr: x [1/0] {59} - ¦ ¦ °--SYMBOL: x [0/0] {58} - ¦ °--'}': } [1/0] {60} - ¦--ELSE: else [0/0] {61} - °--expr: { -} [0/0] {62} - ¦--'{': { [0/0] {63} - °--'}': } [1/0] {64} diff --git a/tests/testthat/spacing/round_curly-out.R b/tests/testthat/spacing/round_curly-out.R index e49f328b3..8f2a4c49a 100644 --- a/tests/testthat/spacing/round_curly-out.R +++ b/tests/testthat/spacing/round_curly-out.R @@ -1,5 +1,4 @@ -a <- function(x) { -} +a <- function(x) {} if (a) { 3 @@ -13,5 +12,4 @@ if (x) { y } else if (x) { x -} else { -} +} else {} diff --git a/tests/testthat/spacing/spacing-square-in_tree b/tests/testthat/spacing/spacing-square-in_tree deleted file mode 100644 index c712ee813..000000000 --- a/tests/testthat/spacing/spacing-square-in_tree +++ /dev/null @@ -1,76 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: a[[2] [0/0] {1} - ¦ ¦--expr: a [0/0] {3} - ¦ ¦ °--SYMBOL: a [0/0] {2} - ¦ ¦--LBB: [[ [0/0] {4} - ¦ ¦--expr: 2 [0/0] {6} - ¦ ¦ °--NUM_CONST: 2 [0/0] {5} - ¦ ¦--']': ] [0/0] {7} - ¦ °--']': ] [0/0] {8} - ¦--expr: a[[2 [1/0] {9} - ¦ ¦--expr: a [0/0] {11} - ¦ ¦ °--SYMBOL: a [0/0] {10} - ¦ ¦--LBB: [[ [0/0] {12} - ¦ ¦--expr: 2 [0/1] {14} - ¦ ¦ °--NUM_CONST: 2 [0/0] {13} - ¦ ¦--']': ] [0/0] {15} - ¦ °--']': ] [0/0] {16} - ¦--expr: a[[ 2 [2/0] {17} - ¦ ¦--expr: a [0/0] {19} - ¦ ¦ °--SYMBOL: a [0/0] {18} - ¦ ¦--LBB: [[ [0/1] {20} - ¦ ¦--expr: 2 [0/0] {22} - ¦ ¦ °--NUM_CONST: 2 [0/0] {21} - ¦ ¦--']': ] [0/0] {23} - ¦ °--']': ] [0/0] {24} - ¦--expr: a[[ 2 [2/0] {25} - ¦ ¦--expr: a [0/0] {27} - ¦ ¦ °--SYMBOL: a [0/0] {26} - ¦ ¦--LBB: [[ [0/1] {28} - ¦ ¦--expr: 2 [0/1] {30} - ¦ ¦ °--NUM_CONST: 2 [0/0] {29} - ¦ ¦--']': ] [0/0] {31} - ¦ °--']': ] [0/0] {32} - ¦--expr: a[2] [3/0] {33} - ¦ ¦--expr: a [0/0] {35} - ¦ ¦ °--SYMBOL: a [0/0] {34} - ¦ ¦--'[': [ [0/0] {36} - ¦ ¦--expr: 2 [0/0] {38} - ¦ ¦ °--NUM_CONST: 2 [0/0] {37} - ¦ °--']': ] [0/0] {39} - ¦--expr: a[2 ] [1/0] {40} - ¦ ¦--expr: a [0/0] {42} - ¦ ¦ °--SYMBOL: a [0/0] {41} - ¦ ¦--'[': [ [0/0] {43} - ¦ ¦--expr: 2 [0/1] {45} - ¦ ¦ °--NUM_CONST: 2 [0/0] {44} - ¦ °--']': ] [0/0] {46} - ¦--expr: a[ 2] [2/0] {47} - ¦ ¦--expr: a [0/0] {49} - ¦ ¦ °--SYMBOL: a [0/0] {48} - ¦ ¦--'[': [ [0/1] {50} - ¦ ¦--expr: 2 [0/0] {52} - ¦ ¦ °--NUM_CONST: 2 [0/0] {51} - ¦ °--']': ] [0/0] {53} - ¦--expr: a[ 2 [2/0] {54} - ¦ ¦--expr: a [0/0] {56} - ¦ ¦ °--SYMBOL: a [0/0] {55} - ¦ ¦--'[': [ [0/1] {57} - ¦ ¦--expr: 2 [0/1] {59} - ¦ ¦ °--NUM_CONST: 2 [0/0] {58} - ¦ °--']': ] [0/0] {60} - ¦--expr: a [[2 [3/0] {61} - ¦ ¦--expr: a [0/1] {63} - ¦ ¦ °--SYMBOL: a [0/0] {62} - ¦ ¦--LBB: [[ [0/0] {64} - ¦ ¦--expr: 2 [0/0] {66} - ¦ ¦ °--NUM_CONST: 2 [0/0] {65} - ¦ ¦--']': ] [0/0] {67} - ¦ °--']': ] [0/0] {68} - °--expr: a [1] [1/0] {69} - ¦--expr: a [0/1] {71} - ¦ °--SYMBOL: a [0/0] {70} - ¦--'[': [ [0/0] {72} - ¦--expr: 1 [0/0] {74} - ¦ °--NUM_CONST: 1 [0/0] {73} - °--']': ] [0/0] {75} diff --git a/tests/testthat/spacing/spacing-tilde-in_tree b/tests/testthat/spacing/spacing-tilde-in_tree deleted file mode 100644 index b8ac310af..000000000 --- a/tests/testthat/spacing/spacing-tilde-in_tree +++ /dev/null @@ -1,57 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: a~b [0/0] {1} - ¦ ¦--expr: a [0/0] {3} - ¦ ¦ °--SYMBOL: a [0/0] {2} - ¦ ¦--'~': ~ [0/0] {4} - ¦ °--expr: b [0/0] {6} - ¦ °--SYMBOL: b [0/0] {5} - ¦--expr: ~b [1/0] {7} - ¦ ¦--'~': ~ [0/0] {8} - ¦ °--expr: b [0/0] {10} - ¦ °--SYMBOL: b [0/0] {9} - ¦--expr: ~b+ c [1/0] {11} - ¦ ¦--'~': ~ [0/0] {12} - ¦ °--expr: b+ c [0/0] {13} - ¦ ¦--expr: b [0/0] {15} - ¦ ¦ °--SYMBOL: b [0/0] {14} - ¦ ¦--'+': + [0/1] {16} - ¦ °--expr: c [0/0] {18} - ¦ °--SYMBOL: c [0/0] {17} - ¦--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: b [0/0] {25} - ¦ ¦ °--SYMBOL: b [0/0] {24} - ¦ ¦--'~': ~ [0/0] {26} - ¦ °--expr: c [0/0] {28} - ¦ °--SYMBOL: c [0/0] {27} - ¦--expr: a ~b [2/1] {29} - ¦ ¦--expr: a [0/2] {31} - ¦ ¦ °--SYMBOL: a [0/0] {30} - ¦ ¦--'~': ~ [0/0] {32} - ¦ °--expr: b [0/0] {34} - ¦ °--SYMBOL: b [0/0] {33} - ¦--expr: ~b [1/0] {35} - ¦ ¦--'~': ~ [0/0] {36} - ¦ °--expr: b [0/0] {38} - ¦ °--SYMBOL: b [0/0] {37} - ¦--expr: ~ b+ [1/0] {39} - ¦ ¦--'~': ~ [0/2] {40} - ¦ °--expr: b+c [0/0] {41} - ¦ ¦--expr: b [0/0] {43} - ¦ ¦ °--SYMBOL: b [0/0] {42} - ¦ ¦--'+': + [0/0] {44} - ¦ °--expr: c [0/0] {46} - ¦ °--SYMBOL: c [0/0] {45} - °--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: b [0/0] {53} - ¦ °--SYMBOL: b [0/0] {52} - ¦--'~': ~ [0/2] {54} - °--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 deleted file mode 100644 index 1276d7301..000000000 --- a/tests/testthat/spacing/spacing_comma-in_tree +++ /dev/null @@ -1,20 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: c( [0/0] {1} - ¦--expr: c [0/0] {3} - ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {2} - ¦--'(': ( [0/4] {4} - ¦--expr: 1 [0/0] {6} - ¦ °--NUM_CONST: 1 [0/0] {5} - ¦--',': , [0/7] {7} - ¦--expr: 16 [0/4] {9} - ¦ °--NUM_CONST: 16 [0/0] {8} - ¦--',': , [0/1] {10} - ¦--expr: 333 [0/1] {12} - ¦ °--NUM_CONST: 333 [0/0] {11} - ¦--',': , [0/1] {13} - ¦--expr: 33 [0/1] {15} - ¦ °--NUM_CONST: 33 [0/0] {14} - ¦--',': , [0/2] {16} - ¦--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 deleted file mode 100644 index 1b7af56ef..000000000 --- a/tests/testthat/spacing/spacing_comma2-in_tree +++ /dev/null @@ -1,23 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: call( [0/0] {1} - ¦ ¦--expr: call [0/0] {3} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {2} - ¦ ¦--'(': ( [0/0] {4} - ¦ ¦--expr: arg [0/1] {6} - ¦ ¦ °--SYMBOL: arg [0/0] {5} - ¦ ¦--',': , [0/0] {7} - ¦ ¦--',': , [0/0] {8} - ¦ ¦--expr: more_ [0/0] {10} - ¦ ¦ °--SYMBOL: more_ [0/0] {9} - ¦ °--')': ) [0/0] {11} - °--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: 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 deleted file mode 100644 index bebe6be90..000000000 --- a/tests/testthat/spacing/spacing_function-in_tree +++ /dev/null @@ -1,20 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: funct [0/0] {1} - ¦--FUNCTION: funct [0/2] {2} - ¦--'(': ( [0/0] {3} - ¦--SYMBOL_FORMALS: x [0/0] {4} - ¦--',': , [0/1] {5} - ¦--SYMBOL_FORMALS: y [0/0] {6} - ¦--',': , [0/1] {7} - ¦--SYMBOL_FORMALS: z [0/0] {8} - ¦--')': ) [0/1] {9} - °--expr: { - 3 [0/0] {10} - ¦--'{': { [0/2] {11} - ¦--expr: 3 + 1 [1/0] {12} - ¦ ¦--expr: 3 [0/1] {14} - ¦ ¦ °--NUM_CONST: 3 [0/0] {13} - ¦ ¦--'+': + [0/1] {15} - ¦ °--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 deleted file mode 100644 index 4e4325d2e..000000000 --- a/tests/testthat/spacing/spacing_if-in_tree +++ /dev/null @@ -1,12 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: if(TR [0/0] {1} - ¦--IF: if [0/0] {2} - ¦--'(': ( [0/0] {3} - ¦--expr: TRUE [0/0] {5} - ¦ °--NUM_CONST: TRUE [0/0] {4} - ¦--')': ) [0/1] {6} - ¦--expr: x [0/1] {8} - ¦ °--SYMBOL: x [0/0] {7} - ¦--ELSE: else [0/1] {9} - °--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 deleted file mode 100644 index 380ead73e..000000000 --- a/tests/testthat/spacing/spacing_in-in_tree +++ /dev/null @@ -1,12 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: for ( [0/0] {1} - ¦--FOR: for [0/1] {2} - ¦--forcond: (i [0/1] {3} - ¦ ¦--'(': ( [0/0] {4} - ¦ ¦--SYMBOL: i [0/5] {5} - ¦ ¦--IN: in [0/5] {6} - ¦ ¦--expr: 3 [0/0] {8} - ¦ ¦ °--NUM_CONST: 3 [0/0] {7} - ¦ °--')': ) [0/0] {9} - °--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 deleted file mode 100644 index 32d1dfd9d..000000000 --- a/tests/testthat/start_line/comment-in_tree +++ /dev/null @@ -1,17 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: # a c [0/0] {1} - °--expr: a <- [1/0] {2} - ¦--expr: a [0/1] {4} - ¦ °--SYMBOL: a [0/0] {3} - ¦--LEFT_ASSIGN: <- [0/1] {5} - °--expr: funct [0/0] {6} - ¦--FUNCTION: funct [0/0] {7} - ¦--'(': ( [0/0] {8} - ¦--SYMBOL_FORMALS: x [0/0] {9} - ¦--')': ) [0/1] {10} - °--expr: { - x [0/0] {11} - ¦--'{': { [0/2] {12} - ¦--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 deleted file mode 100644 index d10990f55..000000000 --- a/tests/testthat/start_line/no_comment-in_tree +++ /dev/null @@ -1,16 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: a <- [0/0] {1} - ¦--expr: a [0/1] {3} - ¦ °--SYMBOL: a [0/0] {2} - ¦--LEFT_ASSIGN: <- [0/1] {4} - °--expr: funct [0/0] {5} - ¦--FUNCTION: funct [0/0] {6} - ¦--'(': ( [0/0] {7} - ¦--SYMBOL_FORMALS: x [0/0] {8} - ¦--')': ) [0/1] {9} - °--expr: { - x [0/0] {10} - ¦--'{': { [0/2] {11} - ¦--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 deleted file mode 100644 index a95a7929c..000000000 --- a/tests/testthat/strict/eof-in_tree +++ /dev/null @@ -1,3 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--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 deleted file mode 100644 index fd1fd103d..000000000 --- a/tests/testthat/strict/eol-in_tree +++ /dev/null @@ -1,9 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: a() [0/0] {1} - ¦ ¦--expr: a [0/0] {3} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: a [0/0] {2} - ¦ ¦--'(': ( [0/0] {4} - ¦ °--')': ) [0/0] {5} - ¦--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 deleted file mode 100644 index 2caa97471..000000000 --- a/tests/testthat/strict/non_strict-in_tree +++ /dev/null @@ -1,763 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: test [0/0] {1} - ¦ ¦--expr: test [0/1] {3} - ¦ ¦ °--SYMBOL: test [0/0] {2} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {4} - ¦ °--expr: funct [0/0] {5} - ¦ ¦--FUNCTION: funct [0/0] {6} - ¦ ¦--'(': ( [0/0] {7} - ¦ ¦--')': ) [0/1] {8} - ¦ °--expr: { - " [0/0] {9} - ¦ ¦--'{': { [0/2] {10} - ¦ ¦--expr: "Doub [1/2] {12} - ¦ ¦ °--STR_CONST: "Doub [0/0] {11} - ¦ ¦--expr: 'Sing [1/2] {14} - ¦ ¦ °--STR_CONST: 'Sing [0/0] {13} - ¦ ¦--expr: 'even [1/2] {16} - ¦ ¦ °--STR_CONST: 'even [0/0] {15} - ¦ ¦--expr: 'but [1/2] {18} - ¦ ¦ °--STR_CONST: 'but [0/0] {17} - ¦ ¦--expr: "mult [2/2] {20} - ¦ ¦ °--STR_CONST: "mult [0/0] {19} - ¦ ¦--expr: 'That [2/2] {22} - ¦ ¦ °--STR_CONST: 'That [0/0] {21} - ¦ ¦--expr: 'stri [2/2] {24} - ¦ ¦ °--STR_CONST: 'stri [0/0] {23} - ¦ ¦--expr: '\\' [2/2] {26} - ¦ ¦ °--STR_CONST: '\\' [0/0] {25} - ¦ ¦--expr: '\\\' [1/2] {28} - ¦ ¦ °--STR_CONST: '\\\' [0/0] {27} - ¦ ¦--expr: '\\\\ [1/2] {30} - ¦ ¦ °--STR_CONST: '\\\\ [0/0] {29} - ¦ ¦--expr: '\\\\ [1/2] {32} - ¦ ¦ °--STR_CONST: '\\\\ [0/0] {31} - ¦ ¦--expr: '\'\\ [1/2] {34} - ¦ ¦ °--STR_CONST: '\'\\ [0/0] {33} - ¦ ¦--COMMENT: # Com [2/2] {35} - ¦ ¦--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: aroun [0/0] {43} - ¦ ¦ ¦ °--SYMBOL: aroun [0/0] {42} - ¦ ¦ °--')': ) [0/0] {44} - ¦ ¦--expr: no_sp [2/2] {45} - ¦ ¦ ¦--expr: no_sp [0/0] {47} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: no_sp [0/0] {46} - ¦ ¦ ¦--'(': ( [0/1] {48} - ¦ ¦ ¦--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: paren [0/0] {55} - ¦ ¦ ¦ ¦--expr: paren [0/0] {57} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: paren [0/0] {56} - ¦ ¦ ¦ ¦--'(': ( [0/1] {58} - ¦ ¦ ¦ ¦--expr: (1 + [0/0] {59} - ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {60} - ¦ ¦ ¦ ¦ ¦--expr: 1 + 2 [0/0] {61} - ¦ ¦ ¦ ¦ ¦ ¦--expr: 1 [0/1] {63} - ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {62} - ¦ ¦ ¦ ¦ ¦ ¦--'+': + [0/1] {64} - ¦ ¦ ¦ ¦ ¦ °--expr: 2 [0/0] {66} - ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {65} - ¦ ¦ ¦ ¦ °--')': ) [0/0] {67} - ¦ ¦ ¦ °--')': ) [0/0] {68} - ¦ ¦ °--')': ) [0/0] {69} - ¦ ¦--expr: no_sp [1/2] {70} - ¦ ¦ ¦--expr: no_sp [0/1] {72} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: no_sp [0/0] {71} - ¦ ¦ ¦--'(': ( [0/0] {73} - ¦ ¦ ¦--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: paren [0/0] {80} - ¦ ¦ ¦ ¦--expr: paren [0/1] {82} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: paren [0/0] {81} - ¦ ¦ ¦ ¦--'(': ( [0/1] {83} - ¦ ¦ ¦ ¦--expr: (1 + [0/0] {84} - ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {85} - ¦ ¦ ¦ ¦ ¦--expr: 1 + 2 [0/0] {86} - ¦ ¦ ¦ ¦ ¦ ¦--expr: 1 [0/1] {88} - ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {87} - ¦ ¦ ¦ ¦ ¦ ¦--'+': + [0/1] {89} - ¦ ¦ ¦ ¦ ¦ °--expr: 2 [0/0] {91} - ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {90} - ¦ ¦ ¦ ¦ °--')': ) [0/0] {92} - ¦ ¦ ¦ °--')': ) [0/0] {93} - ¦ ¦ °--')': ) [0/0] {94} - ¦ ¦--expr: no_sp [1/2] {95} - ¦ ¦ ¦--expr: no_sp [0/0] {97} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: no_sp [0/0] {96} - ¦ ¦ ¦--'(': ( [0/0] {98} - ¦ ¦ ¦--expr: befor [0/0] {99} - ¦ ¦ ¦ ¦--expr: befor [0/0] {101} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: befor [0/0] {100} - ¦ ¦ ¦ ¦--'(': ( [0/0] {102} - ¦ ¦ ¦ ¦--expr: closi [0/1] {104} - ¦ ¦ ¦ ¦ °--SYMBOL: closi [0/0] {103} - ¦ ¦ ¦ °--')': ) [0/0] {105} - ¦ ¦ ¦--',': , [0/1] {106} - ¦ ¦ ¦--expr: paren [0/1] {107} - ¦ ¦ ¦ ¦--expr: paren [0/0] {109} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: paren [0/0] {108} - ¦ ¦ ¦ ¦--'(': ( [0/0] {110} - ¦ ¦ ¦ ¦--expr: (1 + [0/1] {111} - ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {112} - ¦ ¦ ¦ ¦ ¦--expr: 1 + 2 [0/0] {113} - ¦ ¦ ¦ ¦ ¦ ¦--expr: 1 [0/1] {115} - ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {114} - ¦ ¦ ¦ ¦ ¦ ¦--'+': + [0/1] {116} - ¦ ¦ ¦ ¦ ¦ °--expr: 2 [0/0] {118} - ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {117} - ¦ ¦ ¦ ¦ °--')': ) [0/0] {119} - ¦ ¦ ¦ °--')': ) [0/0] {120} - ¦ ¦ °--')': ) [0/0] {121} - ¦ ¦--expr: multi [1/2] {122} - ¦ ¦ ¦--expr: multi [0/0] {124} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: multi [0/0] {123} - ¦ ¦ ¦--'(': ( [0/4] {125} - ¦ ¦ ¦--expr: line [1/0] {127} - ¦ ¦ ¦ °--SYMBOL: line [0/0] {126} - ¦ ¦ ¦--',': , [0/4] {128} - ¦ ¦ ¦--expr: call [1/2] {130} - ¦ ¦ ¦ °--SYMBOL: call [0/0] {129} - ¦ ¦ °--')': ) [1/0] {131} - ¦ ¦--expr: multi [1/2] {132} - ¦ ¦ ¦--expr: multi [0/0] {134} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: multi [0/0] {133} - ¦ ¦ ¦--'(': ( [0/2] {135} - ¦ ¦ °--')': ) [1/0] {136} - ¦ ¦--expr: one_s [2/2] {137} - ¦ ¦ ¦--expr: one_s [0/0] {139} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: one_s [0/0] {138} - ¦ ¦ ¦--'(': ( [0/0] {140} - ¦ ¦ ¦--expr: after [0/0] {142} - ¦ ¦ ¦ °--SYMBOL: after [0/0] {141} - ¦ ¦ ¦--',': , [0/0] {143} - ¦ ¦ ¦--expr: comma [0/0] {144} - ¦ ¦ ¦ ¦--expr: comma [0/0] {146} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: comma [0/0] {145} - ¦ ¦ ¦ ¦--'(': ( [0/0] {147} - ¦ ¦ ¦ ¦--expr: "in" [0/0] {149} - ¦ ¦ ¦ ¦ °--STR_CONST: "in" [0/0] {148} - ¦ ¦ ¦ ¦--',': , [0/0] {150} - ¦ ¦ ¦ ¦--expr: "func [0/0] {152} - ¦ ¦ ¦ ¦ °--STR_CONST: "func [0/0] {151} - ¦ ¦ ¦ ¦--',': , [0/2] {153} - ¦ ¦ ¦ ¦--expr: args [0/0] {155} - ¦ ¦ ¦ ¦ °--SYMBOL: args [0/0] {154} - ¦ ¦ ¦ °--')': ) [0/0] {156} - ¦ ¦ °--')': ) [0/0] {157} - ¦ ¦--expr: { - [2/2] {158} - ¦ ¦ ¦--'{': { [0/4] {159} - ¦ ¦ ¦--expr: brace [1/4] {161} - ¦ ¦ ¦ °--SYMBOL: brace [0/0] {160} - ¦ ¦ ¦--expr: expre [1/2] {163} - ¦ ¦ ¦ °--SYMBOL: expre [0/0] {162} - ¦ ¦ °--'}': } [1/0] {164} - ¦ ¦--expr: brace [2/2] {165} - ¦ ¦ ¦--expr: brace [0/0] {167} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: brace [0/0] {166} - ¦ ¦ ¦--'(': ( [0/0] {168} - ¦ ¦ ¦--expr: "unna [0/0] {170} - ¦ ¦ ¦ °--STR_CONST: "unna [0/0] {169} - ¦ ¦ ¦--',': , [0/1] {171} - ¦ ¦ ¦--expr: { - [0/0] {172} - ¦ ¦ ¦ ¦--'{': { [0/4] {173} - ¦ ¦ ¦ ¦--expr: "func [1/4] {175} - ¦ ¦ ¦ ¦ °--STR_CONST: "func [0/0] {174} - ¦ ¦ ¦ ¦--expr: call [1/2] {177} - ¦ ¦ ¦ ¦ °--SYMBOL: call [0/0] {176} - ¦ ¦ ¦ °--'}': } [1/0] {178} - ¦ ¦ °--')': ) [0/0] {179} - ¦ ¦--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} - ¦ ¦ ¦ ¦--'{': { [0/4] {187} - ¦ ¦ ¦ ¦--expr: "func [1/4] {189} - ¦ ¦ ¦ ¦ °--STR_CONST: "func [0/0] {188} - ¦ ¦ ¦ ¦--expr: call [1/2] {191} - ¦ ¦ ¦ ¦ °--SYMBOL: call [0/0] {190} - ¦ ¦ ¦ °--'}': } [1/0] {192} - ¦ ¦ °--')': ) [0/0] {193} - ¦ ¦--expr: brace [2/2] {194} - ¦ ¦ ¦--expr: brace [0/0] {196} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: brace [0/0] {195} - ¦ ¦ ¦--'(': ( [0/0] {197} - ¦ ¦ ¦--expr: "unna [0/0] {199} - ¦ ¦ ¦ °--STR_CONST: "unna [0/0] {198} - ¦ ¦ ¦--',': , [0/4] {200} - ¦ ¦ ¦--expr: { - } [0/0] {201} - ¦ ¦ ¦ ¦--'{': { [0/2] {202} - ¦ ¦ ¦ °--'}': } [1/0] {203} - ¦ ¦ °--')': ) [0/0] {204} - ¦ ¦--expr: brace [2/2] {205} - ¦ ¦ ¦--expr: brace [0/0] {207} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: brace [0/0] {206} - ¦ ¦ ¦--'(': ( [0/0] {208} - ¦ ¦ ¦--expr: "unna [0/0] {210} - ¦ ¦ ¦ °--STR_CONST: "unna [0/0] {209} - ¦ ¦ ¦--',': , [0/0] {211} - ¦ ¦ ¦--expr: { - } [0/0] {212} - ¦ ¦ ¦ ¦--'{': { [0/2] {213} - ¦ ¦ ¦ °--'}': } [1/0] {214} - ¦ ¦ °--')': ) [0/0] {215} - ¦ ¦--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} - ¦ ¦ ¦ ¦--'{': { [0/2] {223} - ¦ ¦ ¦ °--'}': } [1/0] {224} - ¦ ¦ °--')': ) [0/0] {225} - ¦ ¦--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} - ¦ ¦ ¦ ¦--'{': { [0/2] {233} - ¦ ¦ ¦ °--'}': } [1/0] {234} - ¦ ¦ °--')': ) [0/0] {235} - ¦ ¦--expr: brace [2/2] {236} - ¦ ¦ ¦--expr: brace [0/0] {238} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: brace [0/0] {237} - ¦ ¦ ¦--'(': ( [0/2] {239} - ¦ ¦ ¦--expr: { - [0/0] {240} - ¦ ¦ ¦ ¦--'{': { [0/4] {241} - ¦ ¦ ¦ ¦--expr: empty [1/2] {243} - ¦ ¦ ¦ ¦ °--SYMBOL: empty [0/0] {242} - ¦ ¦ ¦ °--'}': } [1/0] {244} - ¦ ¦ °--')': ) [0/0] {245} - ¦ ¦--expr: a%/%b [2/2] {246} - ¦ ¦ ¦--expr: a [0/0] {248} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {247} - ¦ ¦ ¦--SPECIAL-OTHER: %/% [0/0] {249} - ¦ ¦ °--expr: b [0/0] {251} - ¦ ¦ °--SYMBOL: b [0/0] {250} - ¦ ¦--expr: a%%b [1/2] {252} - ¦ ¦ ¦--expr: a [0/0] {254} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {253} - ¦ ¦ ¦--SPECIAL-OTHER: %% [0/0] {255} - ¦ ¦ °--expr: b [0/0] {257} - ¦ ¦ °--SYMBOL: b [0/0] {256} - ¦ ¦--expr: a&&b [1/2] {258} - ¦ ¦ ¦--expr: a [0/0] {260} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {259} - ¦ ¦ ¦--AND2: && [0/0] {261} - ¦ ¦ °--expr: b [0/0] {263} - ¦ ¦ °--SYMBOL: b [0/0] {262} - ¦ ¦--expr: a||b [1/2] {264} - ¦ ¦ ¦--expr: a [0/0] {266} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {265} - ¦ ¦ ¦--OR2: || [0/0] {267} - ¦ ¦ °--expr: b [0/0] {269} - ¦ ¦ °--SYMBOL: b [0/0] {268} - ¦ ¦--expr: a==b [1/2] {270} - ¦ ¦ ¦--expr: a [0/0] {272} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {271} - ¦ ¦ ¦--EQ: == [0/0] {273} - ¦ ¦ °--expr: b [0/0] {275} - ¦ ¦ °--SYMBOL: b [0/0] {274} - ¦ ¦--expr: a!=b [1/2] {276} - ¦ ¦ ¦--expr: a [0/0] {278} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {277} - ¦ ¦ ¦--NE: != [0/0] {279} - ¦ ¦ °--expr: b [0/0] {281} - ¦ ¦ °--SYMBOL: b [0/0] {280} - ¦ ¦--expr: a<=b [1/2] {282} - ¦ ¦ ¦--expr: a [0/0] {284} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {283} - ¦ ¦ ¦--LE: <= [0/0] {285} - ¦ ¦ °--expr: b [0/0] {287} - ¦ ¦ °--SYMBOL: b [0/0] {286} - ¦ ¦--expr: a>=b [1/2] {288} - ¦ ¦ ¦--expr: a [0/0] {290} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {289} - ¦ ¦ ¦--GE: >= [0/0] {291} - ¦ ¦ °--expr: b [0/0] {293} - ¦ ¦ °--SYMBOL: b [0/0] {292} - ¦ ¦--expr: a<-b [1/2] {294} - ¦ ¦ ¦--expr: a [0/0] {296} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {295} - ¦ ¦ ¦--LEFT_ASSIGN: <- [0/0] {297} - ¦ ¦ °--expr: b [0/0] {299} - ¦ ¦ °--SYMBOL: b [0/0] {298} - ¦ ¦--expr: a->b [1/2] {300} - ¦ ¦ ¦--expr: a [0/0] {302} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {301} - ¦ ¦ ¦--RIGHT_ASSIGN: -> [0/0] {303} - ¦ ¦ °--expr: b [0/0] {305} - ¦ ¦ °--SYMBOL: b [0/0] {304} - ¦ ¦--expr_or_assign_or_help: a=b [1/2] {306} - ¦ ¦ ¦--expr: a [0/0] {308} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {307} - ¦ ¦ ¦--EQ_ASSIGN: = [0/0] {309} - ¦ ¦ °--expr: b [0/0] {311} - ¦ ¦ °--SYMBOL: b [0/0] {310} - ¦ ¦--expr: ab [1/2] {318} - ¦ ¦ ¦--expr: a [0/0] {320} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {319} - ¦ ¦ ¦--GT: > [0/0] {321} - ¦ ¦ °--expr: b [0/0] {323} - ¦ ¦ °--SYMBOL: b [0/0] {322} - ¦ ¦--expr: a*b [1/2] {324} - ¦ ¦ ¦--expr: a [0/0] {326} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {325} - ¦ ¦ ¦--'*': * [0/0] {327} - ¦ ¦ °--expr: b [0/0] {329} - ¦ ¦ °--SYMBOL: b [0/0] {328} - ¦ ¦--expr: a/b [1/2] {330} - ¦ ¦ ¦--expr: a [0/0] {332} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {331} - ¦ ¦ ¦--'/': / [0/0] {333} - ¦ ¦ °--expr: b [0/0] {335} - ¦ ¦ °--SYMBOL: b [0/0] {334} - ¦ ¦--expr: a^b [1/2] {336} - ¦ ¦ ¦--expr: a [0/0] {338} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {337} - ¦ ¦ ¦--'^': ^ [0/0] {339} - ¦ ¦ °--expr: b [0/0] {341} - ¦ ¦ °--SYMBOL: b [0/0] {340} - ¦ ¦--expr: a&b [1/2] {342} - ¦ ¦ ¦--expr: a [0/0] {344} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {343} - ¦ ¦ ¦--AND: & [0/0] {345} - ¦ ¦ °--expr: b [0/0] {347} - ¦ ¦ °--SYMBOL: b [0/0] {346} - ¦ ¦--expr: a|b [1/2] {348} - ¦ ¦ ¦--expr: a [0/0] {350} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {349} - ¦ ¦ ¦--OR: | [0/0] {351} - ¦ ¦ °--expr: b [0/0] {353} - ¦ ¦ °--SYMBOL: b [0/0] {352} - ¦ ¦--expr: a:=b [1/2] {354} - ¦ ¦ ¦--expr: a [0/0] {356} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {355} - ¦ ¦ ¦--LEFT_ASSIGN: := [0/0] {357} - ¦ ¦ °--expr: b [0/0] {359} - ¦ ¦ °--SYMBOL: b [0/0] {358} - ¦ ¦--expr: a+b [2/2] {360} - ¦ ¦ ¦--expr: a [0/0] {362} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {361} - ¦ ¦ ¦--'+': + [0/0] {363} - ¦ ¦ °--expr: b [0/0] {365} - ¦ ¦ °--SYMBOL: b [0/0] {364} - ¦ ¦--expr: a-b [1/2] {366} - ¦ ¦ ¦--expr: a [0/0] {368} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {367} - ¦ ¦ ¦--'-': - [0/0] {369} - ¦ ¦ °--expr: b [0/0] {371} - ¦ ¦ °--SYMBOL: b [0/0] {370} - ¦ ¦--expr: a++b [1/2] {372} - ¦ ¦ ¦--expr: a [0/0] {374} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {373} - ¦ ¦ ¦--'+': + [0/0] {375} - ¦ ¦ °--expr: +b [0/0] {376} - ¦ ¦ ¦--'+': + [0/0] {377} - ¦ ¦ °--expr: b [0/0] {379} - ¦ ¦ °--SYMBOL: b [0/0] {378} - ¦ ¦--expr: a+-b [1/2] {380} - ¦ ¦ ¦--expr: a [0/0] {382} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {381} - ¦ ¦ ¦--'+': + [0/0] {383} - ¦ ¦ °--expr: -b [0/0] {384} - ¦ ¦ ¦--'-': - [0/0] {385} - ¦ ¦ °--expr: b [0/0] {387} - ¦ ¦ °--SYMBOL: b [0/0] {386} - ¦ ¦--expr: a++b [1/2] {388} - ¦ ¦ ¦--expr: a [0/0] {390} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {389} - ¦ ¦ ¦--'+': + [0/0] {391} - ¦ ¦ °--expr: +b [0/0] {392} - ¦ ¦ ¦--'+': + [0/0] {393} - ¦ ¦ °--expr: b [0/0] {395} - ¦ ¦ °--SYMBOL: b [0/0] {394} - ¦ ¦--expr: a-+b [1/2] {396} - ¦ ¦ ¦--expr: a [0/0] {398} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {397} - ¦ ¦ ¦--'-': - [0/0] {399} - ¦ ¦ °--expr: +b [0/0] {400} - ¦ ¦ ¦--'+': + [0/0] {401} - ¦ ¦ °--expr: b [0/0] {403} - ¦ ¦ °--SYMBOL: b [0/0] {402} - ¦ ¦--expr: a--b [1/2] {404} - ¦ ¦ ¦--expr: a [0/0] {406} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {405} - ¦ ¦ ¦--'-': - [0/0] {407} - ¦ ¦ °--expr: -b [0/0] {408} - ¦ ¦ ¦--'-': - [0/0] {409} - ¦ ¦ °--expr: b [0/0] {411} - ¦ ¦ °--SYMBOL: b [0/0] {410} - ¦ ¦--expr: a+--b [1/2] {412} - ¦ ¦ ¦--expr: a [0/0] {414} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {413} - ¦ ¦ ¦--'+': + [0/0] {415} - ¦ ¦ °--expr: --b [0/0] {416} - ¦ ¦ ¦--'-': - [0/0] {417} - ¦ ¦ °--expr: -b [0/0] {418} - ¦ ¦ ¦--'-': - [0/0] {419} - ¦ ¦ °--expr: b [0/0] {421} - ¦ ¦ °--SYMBOL: b [0/0] {420} - ¦ ¦--expr: a--+b [1/2] {422} - ¦ ¦ ¦--expr: a [0/0] {424} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {423} - ¦ ¦ ¦--'-': - [0/0] {425} - ¦ ¦ °--expr: -+b [0/0] {426} - ¦ ¦ ¦--'-': - [0/0] {427} - ¦ ¦ °--expr: +b [0/0] {428} - ¦ ¦ ¦--'+': + [0/0] {429} - ¦ ¦ °--expr: b [0/0] {431} - ¦ ¦ °--SYMBOL: b [0/0] {430} - ¦ ¦--expr: call( [1/2] {432} - ¦ ¦ ¦--expr: call [0/0] {434} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {433} - ¦ ¦ ¦--'(': ( [0/1] {435} - ¦ ¦ ¦--expr: + a [0/0] {436} - ¦ ¦ ¦ ¦--'+': + [0/1] {437} - ¦ ¦ ¦ °--expr: a [0/0] {439} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {438} - ¦ ¦ °--')': ) [0/0] {440} - ¦ ¦--expr: call( [1/2] {441} - ¦ ¦ ¦--expr: call [0/0] {443} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {442} - ¦ ¦ ¦--'(': ( [0/1] {444} - ¦ ¦ ¦--expr: - a [0/0] {445} - ¦ ¦ ¦ ¦--'-': - [0/1] {446} - ¦ ¦ ¦ °--expr: a [0/0] {448} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {447} - ¦ ¦ °--')': ) [0/0] {449} - ¦ ¦--expr: call( [1/2] {450} - ¦ ¦ ¦--expr: call [0/0] {452} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {451} - ¦ ¦ ¦--'(': ( [0/0] {453} - ¦ ¦ ¦--expr: 5 [0/0] {455} - ¦ ¦ ¦ °--NUM_CONST: 5 [0/0] {454} - ¦ ¦ ¦--',': , [0/1] {456} - ¦ ¦ ¦--expr: + a [0/0] {457} - ¦ ¦ ¦ ¦--'+': + [0/1] {458} - ¦ ¦ ¦ °--expr: a [0/0] {460} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {459} - ¦ ¦ °--')': ) [0/0] {461} - ¦ ¦--expr: call( [1/2] {462} - ¦ ¦ ¦--expr: call [0/0] {464} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {463} - ¦ ¦ ¦--'(': ( [0/0] {465} - ¦ ¦ ¦--expr: 5 [0/0] {467} - ¦ ¦ ¦ °--NUM_CONST: 5 [0/0] {466} - ¦ ¦ ¦--',': , [0/1] {468} - ¦ ¦ ¦--expr: - a [0/0] {469} - ¦ ¦ ¦ ¦--'-': - [0/1] {470} - ¦ ¦ ¦ °--expr: a [0/0] {472} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {471} - ¦ ¦ °--')': ) [0/0] {473} - ¦ ¦--COMMENT: # Onl [2/2] {474} - ¦ ¦--expr: call( [1/2] {475} - ¦ ¦ ¦--expr: call [0/0] {477} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {476} - ¦ ¦ ¦--'(': ( [0/4] {478} - ¦ ¦ ¦--expr: prese [1/0] {480} - ¦ ¦ ¦ °--SYMBOL: prese [0/0] {479} - ¦ ¦ ¦--',': , [0/1] {481} - ¦ ¦ ¦--expr: dista [0/0] {483} - ¦ ¦ ¦ °--SYMBOL: dista [0/0] {482} - ¦ ¦ ¦--',': , [0/4] {484} - ¦ ¦ ¦--expr: after [1/0] {486} - ¦ ¦ ¦ °--SYMBOL: after [0/0] {485} - ¦ ¦ ¦--',': , [0/5] {487} - ¦ ¦ ¦--expr: comma [0/0] {489} - ¦ ¦ ¦ °--SYMBOL: comma [0/0] {488} - ¦ ¦ ¦--',': , [0/4] {490} - ¦ ¦ ¦--expr: given [1/0] {492} - ¦ ¦ ¦ °--SYMBOL: given [0/0] {491} - ¦ ¦ ¦--',': , [0/0] {493} - ¦ ¦ ¦--expr: one [0/2] {495} - ¦ ¦ ¦ °--SYMBOL: one [0/0] {494} - ¦ ¦ °--')': ) [1/0] {496} - ¦ ¦--expr: if(TR [2/2] {497} - ¦ ¦ ¦--IF: if [0/0] {498} - ¦ ¦ ¦--'(': ( [0/0] {499} - ¦ ¦ ¦--expr: TRUE [0/0] {501} - ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {500} - ¦ ¦ ¦--')': ) [0/0] {502} - ¦ ¦ °--expr: { - [0/0] {503} - ¦ ¦ ¦--'{': { [0/4] {504} - ¦ ¦ ¦--expr: FALSE [1/2] {506} - ¦ ¦ ¦ °--NUM_CONST: FALSE [0/0] {505} - ¦ ¦ °--'}': } [1/0] {507} - ¦ ¦--expr: if(TR [2/2] {508} - ¦ ¦ ¦--IF: if [0/0] {509} - ¦ ¦ ¦--'(': ( [0/0] {510} - ¦ ¦ ¦--expr: TRUE [0/0] {512} - ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {511} - ¦ ¦ ¦--')': ) [0/0] {513} - ¦ ¦ ¦--expr: { - [0/0] {514} - ¦ ¦ ¦ ¦--'{': { [0/4] {515} - ¦ ¦ ¦ ¦--expr: FALSE [1/2] {517} - ¦ ¦ ¦ ¦ °--NUM_CONST: FALSE [0/0] {516} - ¦ ¦ ¦ °--'}': } [1/0] {518} - ¦ ¦ ¦--ELSE: else [0/0] {519} - ¦ ¦ °--expr: { - [0/0] {520} - ¦ ¦ ¦--'{': { [0/4] {521} - ¦ ¦ ¦--expr: TRUE [1/2] {523} - ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {522} - ¦ ¦ °--'}': } [1/0] {524} - ¦ ¦--expr: while [2/2] {525} - ¦ ¦ ¦--WHILE: while [0/0] {526} - ¦ ¦ ¦--'(': ( [0/0] {527} - ¦ ¦ ¦--expr: TRUE [0/0] {529} - ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {528} - ¦ ¦ ¦--')': ) [0/0] {530} - ¦ ¦ °--expr: { - [0/0] {531} - ¦ ¦ ¦--'{': { [0/4] {532} - ¦ ¦ ¦--expr: FALSE [1/2] {534} - ¦ ¦ ¦ °--NUM_CONST: FALSE [0/0] {533} - ¦ ¦ °--'}': } [1/0] {535} - ¦ ¦--expr: singl [2/2] {536} - ¦ ¦ ¦--expr: singl [0/1] {538} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: singl [0/0] {537} - ¦ ¦ ¦--'(': ( [0/1] {539} - ¦ ¦ ¦--expr: "func [0/1] {541} - ¦ ¦ ¦ °--STR_CONST: "func [0/0] {540} - ¦ ¦ ¦--',': , [0/0] {542} - ¦ ¦ ¦--expr: call [0/1] {544} - ¦ ¦ ¦ °--SYMBOL: call [0/0] {543} - ¦ ¦ °--')': ) [0/0] {545} - ¦ ¦--expr: multi [2/2] {546} - ¦ ¦ ¦--expr: multi [0/1] {548} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: multi [0/0] {547} - ¦ ¦ ¦--'(': ( [0/2] {549} - ¦ ¦ ¦--expr: "func [1/0] {551} - ¦ ¦ ¦ °--STR_CONST: "func [0/0] {550} - ¦ ¦ ¦--',': , [0/1] {552} - ¦ ¦ ¦--expr: call [0/1] {554} - ¦ ¦ ¦ °--SYMBOL: call [0/0] {553} - ¦ ¦ °--')': ) [0/0] {555} - ¦ ¦--expr: neste [2/2] {556} - ¦ ¦ ¦--expr: neste [0/1] {558} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: neste [0/0] {557} - ¦ ¦ ¦--'(': ( [0/1] {559} - ¦ ¦ ¦--expr: funct [0/1] {560} - ¦ ¦ ¦ ¦--expr: funct [0/1] {562} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: funct [0/0] {561} - ¦ ¦ ¦ ¦--'(': ( [0/1] {563} - ¦ ¦ ¦ ¦--expr: "in" [0/1] {565} - ¦ ¦ ¦ ¦ °--STR_CONST: "in" [0/0] {564} - ¦ ¦ ¦ ¦--',': , [0/0] {566} - ¦ ¦ ¦ ¦--expr: one [0/1] {568} - ¦ ¦ ¦ ¦ °--SYMBOL: one [0/0] {567} - ¦ ¦ ¦ ¦--',': , [0/0] {569} - ¦ ¦ ¦ ¦--expr: line [0/1] {571} - ¦ ¦ ¦ ¦ °--SYMBOL: line [0/0] {570} - ¦ ¦ ¦ °--')': ) [0/0] {572} - ¦ ¦ °--')': ) [0/0] {573} - ¦ ¦--expr: neste [2/2] {574} - ¦ ¦ ¦--expr: neste [0/1] {576} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: neste [0/0] {575} - ¦ ¦ ¦--'(': ( [0/1] {577} - ¦ ¦ ¦--expr: funct [0/1] {578} - ¦ ¦ ¦ ¦--expr: funct [0/1] {580} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: funct [0/0] {579} - ¦ ¦ ¦ ¦--'(': ( [0/2] {581} - ¦ ¦ ¦ ¦--expr: "in" [1/0] {583} - ¦ ¦ ¦ ¦ °--STR_CONST: "in" [0/0] {582} - ¦ ¦ ¦ ¦--',': , [0/6] {584} - ¦ ¦ ¦ ¦--expr: multi [1/0] {586} - ¦ ¦ ¦ ¦ °--SYMBOL: multi [0/0] {585} - ¦ ¦ ¦ ¦--',': , [0/0] {587} - ¦ ¦ ¦ ¦--expr: lines [0/1] {589} - ¦ ¦ ¦ ¦ °--SYMBOL: lines [0/0] {588} - ¦ ¦ ¦ °--')': ) [0/0] {590} - ¦ ¦ °--')': ) [0/0] {591} - ¦ ¦--expr: neste [2/2] {592} - ¦ ¦ ¦--expr: neste [0/0] {594} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: neste [0/0] {593} - ¦ ¦ ¦--'(': ( [0/2] {595} - ¦ ¦ ¦--expr: funct [1/0] {596} - ¦ ¦ ¦ ¦--expr: funct [0/1] {598} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: funct [0/0] {597} - ¦ ¦ ¦ ¦--'(': ( [0/1] {599} - ¦ ¦ ¦ ¦--expr: with [0/1] {601} - ¦ ¦ ¦ ¦ °--SYMBOL: with [0/0] {600} - ¦ ¦ ¦ °--')': ) [0/0] {602} - ¦ ¦ ¦--',': , [0/6] {603} - ¦ ¦ ¦--expr: many [1/2] {605} - ¦ ¦ ¦ °--SYMBOL: many [0/0] {604} - ¦ ¦ ¦--',': , [1/5] {606} - ¦ ¦ ¦--expr: first [0/2] {608} - ¦ ¦ ¦ °--SYMBOL: first [0/0] {607} - ¦ ¦ °--')': ) [0/0] {609} - ¦ ¦--expr: neste [2/2] {610} - ¦ ¦ ¦--expr: neste [0/0] {612} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: neste [0/0] {611} - ¦ ¦ ¦--'(': ( [0/4] {613} - ¦ ¦ ¦--expr: funct [1/0] {614} - ¦ ¦ ¦ ¦--expr: funct [0/1] {616} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: funct [0/0] {615} - ¦ ¦ ¦ ¦--'(': ( [0/1] {617} - ¦ ¦ ¦ ¦--expr: with [0/1] {619} - ¦ ¦ ¦ ¦ °--SYMBOL: with [0/0] {618} - ¦ ¦ ¦ °--')': ) [0/0] {620} - ¦ ¦ ¦--',': , [0/2] {621} - ¦ ¦ ¦--COMMENT: # a c [0/4] {622} - ¦ ¦ ¦--expr: many [1/1] {624} - ¦ ¦ ¦ °--SYMBOL: many [0/0] {623} - ¦ ¦ ¦--COMMENT: #more [0/4] {625} - ¦ ¦ ¦--',': , [1/5] {626} - ¦ ¦ ¦--expr: first [0/2] {628} - ¦ ¦ ¦ °--SYMBOL: first [0/0] {627} - ¦ ¦ °--')': ) [0/0] {629} - ¦ ¦--expr: diffi [2/0] {630} - ¦ ¦ ¦--expr: diffi [0/0] {632} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: diffi [0/0] {631} - ¦ ¦ ¦--'(': ( [0/0] {633} - ¦ ¦ ¦--expr: neste [0/0] {634} - ¦ ¦ ¦ ¦--expr: neste [0/0] {636} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: neste [0/0] {635} - ¦ ¦ ¦ ¦--'(': ( [0/4] {637} - ¦ ¦ ¦ ¦--expr: "func [1/0] {639} - ¦ ¦ ¦ ¦ °--STR_CONST: "func [0/0] {638} - ¦ ¦ ¦ ¦--',': , [0/1] {640} - ¦ ¦ ¦ ¦--expr: call [0/2] {642} - ¦ ¦ ¦ ¦ °--SYMBOL: call [0/0] {641} - ¦ ¦ ¦ °--')': ) [1/0] {643} - ¦ ¦ ¦--',': , [0/4] {644} - ¦ ¦ ¦--expr: with [1/0] {646} - ¦ ¦ ¦ °--SYMBOL: with [0/0] {645} - ¦ ¦ ¦--',': , [0/1] {647} - ¦ ¦ ¦--expr: more [0/0] {649} - ¦ ¦ ¦ °--SYMBOL: more [0/0] {648} - ¦ ¦ ¦--',': , [0/1] {650} - ¦ ¦ ¦--expr: args [0/2] {652} - ¦ ¦ ¦ °--SYMBOL: args [0/0] {651} - ¦ ¦ °--')': ) [1/0] {653} - ¦ °--'}': } [1/0] {654} - ¦--COMMENT: # for [3/0] {655} - ¦--expr: lm(a~ [1/0] {656} - ¦ ¦--expr: lm [0/0] {658} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: lm [0/0] {657} - ¦ ¦--'(': ( [0/0] {659} - ¦ ¦--expr: a~b+c [0/0] {660} - ¦ ¦ ¦--expr: a [0/0] {662} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {661} - ¦ ¦ ¦--'~': ~ [0/0] {663} - ¦ ¦ ¦--expr: b [0/0] {666} - ¦ ¦ ¦ °--SYMBOL: b [0/0] {665} - ¦ ¦ ¦--'+': + [0/0] {667} - ¦ ¦ °--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: NA [0/0] {674} - ¦ ¦ °--NUM_CONST: NA [0/0] {673} - ¦ °--')': ) [0/0] {675} - ¦--expr: lm(a~ [1/0] {676} - ¦ ¦--expr: lm [0/0] {678} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: lm [0/0] {677} - ¦ ¦--'(': ( [0/0] {679} - ¦ ¦--expr: a~.-1 [0/0] {680} - ¦ ¦ ¦--expr: a [0/0] {682} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {681} - ¦ ¦ ¦--'~': ~ [0/0] {683} - ¦ ¦ ¦--expr: . [0/0] {686} - ¦ ¦ ¦ °--SYMBOL: . [0/0] {685} - ¦ ¦ ¦--'-': - [0/0] {687} - ¦ ¦ °--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: NA [0/0] {694} - ¦ ¦ °--NUM_CONST: NA [0/0] {693} - ¦ °--')': ) [0/0] {695} - ¦--expr: a~b:c [1/0] {696} - ¦ ¦--expr: a [0/0] {698} - ¦ ¦ °--SYMBOL: a [0/0] {697} - ¦ ¦--'~': ~ [0/0] {699} - ¦ °--expr: b:c [0/0] {700} - ¦ ¦--expr: b [0/0] {702} - ¦ ¦ °--SYMBOL: b [0/0] {701} - ¦ ¦--':': : [0/0] {703} - ¦ °--expr: c [0/0] {705} - ¦ °--SYMBOL: c [0/0] {704} - ¦--expr: a~b : [1/0] {706} - ¦ ¦--expr: a [0/0] {708} - ¦ ¦ °--SYMBOL: a [0/0] {707} - ¦ ¦--'~': ~ [0/0] {709} - ¦ °--expr: b :c [0/0] {710} - ¦ ¦--expr: b [0/1] {712} - ¦ ¦ °--SYMBOL: b [0/0] {711} - ¦ ¦--':': : [0/0] {713} - ¦ °--expr: c [0/0] {715} - ¦ °--SYMBOL: c [0/0] {714} - ¦--expr: a ~ [1/0] {716} - ¦ ¦--expr: a [0/3] {718} - ¦ ¦ °--SYMBOL: a [0/0] {717} - ¦ ¦--'~': ~ [0/3] {719} - ¦ °--expr: b : [0/0] {720} - ¦ ¦--expr: b [0/2] {722} - ¦ ¦ °--SYMBOL: b [0/0] {721} - ¦ ¦--':': : [0/1] {723} - ¦ °--expr: c [0/0] {725} - ¦ °--SYMBOL: c [0/0] {724} - ¦--expr: ~ a [2/0] {726} - ¦ ¦--'~': ~ [0/3] {727} - ¦ °--expr: a [0/0] {729} - ¦ °--SYMBOL: a [0/0] {728} - ¦--expr: ~gg [1/0] {730} - ¦ ¦--'~': ~ [0/0] {731} - ¦ °--expr: gg [0/0] {733} - ¦ °--SYMBOL: gg [0/0] {732} - ¦--expr: b~ [1/0] {734} - ¦ ¦--expr: b [0/0] {736} - ¦ ¦ °--SYMBOL: b [0/0] {735} - ¦ ¦--'~': ~ [0/3] {737} - ¦ °--expr: k [0/0] {739} - ¦ °--SYMBOL: k [0/0] {738} - °--expr: call( [1/0] {740} - ¦--expr: call [0/0] {742} - ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {741} - ¦--'(': ( [0/0] {743} - ¦--expr: 1 [0/0] {745} - ¦ °--NUM_CONST: 1 [0/0] {744} - ¦--',': , [0/0] {746} - ¦--expr: ~ qq [0/0] {747} - ¦ ¦--'~': ~ [0/1] {748} - ¦ °--expr: qq [0/0] {750} - ¦ °--SYMBOL: qq [0/0] {749} - °--')': ) [0/0] {751} diff --git a/tests/testthat/strict/non_strict-out.R b/tests/testthat/strict/non_strict-out.R index 08f773a73..64a698bb5 100644 --- a/tests/testthat/strict/non_strict-out.R +++ b/tests/testthat/strict/non_strict-out.R @@ -51,17 +51,13 @@ test <- function() { call }) - braced("unnamed reduces space", { - }) + braced("unnamed reduces space", {}) - braced("unnamed adds space space", { - }) + braced("unnamed adds space space", {}) - braced(named_reduces_space = { - }) + braced(named_reduces_space = {}) - braced(named_adds_space = { - }) + braced(named_adds_space = {}) braced({ empty_removes_space diff --git a/tests/testthat/strict/strict-in_tree b/tests/testthat/strict/strict-in_tree deleted file mode 100644 index 94428955b..000000000 --- a/tests/testthat/strict/strict-in_tree +++ /dev/null @@ -1,747 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: test [0/0] {1} - ¦ ¦--expr: test [0/1] {3} - ¦ ¦ °--SYMBOL: test [0/0] {2} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {4} - ¦ °--expr: funct [0/0] {5} - ¦ ¦--FUNCTION: funct [0/0] {6} - ¦ ¦--'(': ( [0/0] {7} - ¦ ¦--')': ) [0/1] {8} - ¦ °--expr: { - " [0/0] {9} - ¦ ¦--'{': { [0/2] {10} - ¦ ¦--expr: "Doub [1/2] {12} - ¦ ¦ °--STR_CONST: "Doub [0/0] {11} - ¦ ¦--expr: 'Sing [1/2] {14} - ¦ ¦ °--STR_CONST: 'Sing [0/0] {13} - ¦ ¦--expr: 'even [1/2] {16} - ¦ ¦ °--STR_CONST: 'even [0/0] {15} - ¦ ¦--expr: 'but [1/2] {18} - ¦ ¦ °--STR_CONST: 'but [0/0] {17} - ¦ ¦--COMMENT: # Com [2/2] {19} - ¦ ¦--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: aroun [0/0] {27} - ¦ ¦ ¦ °--SYMBOL: aroun [0/0] {26} - ¦ ¦ °--')': ) [0/0] {28} - ¦ ¦--expr: no_sp [2/2] {29} - ¦ ¦ ¦--expr: no_sp [0/0] {31} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: no_sp [0/0] {30} - ¦ ¦ ¦--'(': ( [0/1] {32} - ¦ ¦ ¦--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: paren [0/0] {39} - ¦ ¦ ¦ ¦--expr: paren [0/0] {41} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: paren [0/0] {40} - ¦ ¦ ¦ ¦--'(': ( [0/1] {42} - ¦ ¦ ¦ ¦--expr: (1 + [0/0] {43} - ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {44} - ¦ ¦ ¦ ¦ ¦--expr: 1 + 2 [0/0] {45} - ¦ ¦ ¦ ¦ ¦ ¦--expr: 1 [0/1] {47} - ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {46} - ¦ ¦ ¦ ¦ ¦ ¦--'+': + [0/1] {48} - ¦ ¦ ¦ ¦ ¦ °--expr: 2 [0/0] {50} - ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {49} - ¦ ¦ ¦ ¦ °--')': ) [0/0] {51} - ¦ ¦ ¦ °--')': ) [0/0] {52} - ¦ ¦ °--')': ) [0/0] {53} - ¦ ¦--expr: no_sp [1/2] {54} - ¦ ¦ ¦--expr: no_sp [0/1] {56} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: no_sp [0/0] {55} - ¦ ¦ ¦--'(': ( [0/0] {57} - ¦ ¦ ¦--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: paren [0/0] {64} - ¦ ¦ ¦ ¦--expr: paren [0/1] {66} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: paren [0/0] {65} - ¦ ¦ ¦ ¦--'(': ( [0/1] {67} - ¦ ¦ ¦ ¦--expr: (1 + [0/0] {68} - ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {69} - ¦ ¦ ¦ ¦ ¦--expr: 1 + 2 [0/0] {70} - ¦ ¦ ¦ ¦ ¦ ¦--expr: 1 [0/1] {72} - ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {71} - ¦ ¦ ¦ ¦ ¦ ¦--'+': + [0/1] {73} - ¦ ¦ ¦ ¦ ¦ °--expr: 2 [0/0] {75} - ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {74} - ¦ ¦ ¦ ¦ °--')': ) [0/0] {76} - ¦ ¦ ¦ °--')': ) [0/0] {77} - ¦ ¦ °--')': ) [0/0] {78} - ¦ ¦--expr: no_sp [1/2] {79} - ¦ ¦ ¦--expr: no_sp [0/0] {81} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: no_sp [0/0] {80} - ¦ ¦ ¦--'(': ( [0/0] {82} - ¦ ¦ ¦--expr: befor [0/0] {83} - ¦ ¦ ¦ ¦--expr: befor [0/0] {85} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: befor [0/0] {84} - ¦ ¦ ¦ ¦--'(': ( [0/0] {86} - ¦ ¦ ¦ ¦--expr: closi [0/1] {88} - ¦ ¦ ¦ ¦ °--SYMBOL: closi [0/0] {87} - ¦ ¦ ¦ °--')': ) [0/0] {89} - ¦ ¦ ¦--',': , [0/1] {90} - ¦ ¦ ¦--expr: paren [0/1] {91} - ¦ ¦ ¦ ¦--expr: paren [0/0] {93} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: paren [0/0] {92} - ¦ ¦ ¦ ¦--'(': ( [0/0] {94} - ¦ ¦ ¦ ¦--expr: (1 + [0/1] {95} - ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {96} - ¦ ¦ ¦ ¦ ¦--expr: 1 + 2 [0/0] {97} - ¦ ¦ ¦ ¦ ¦ ¦--expr: 1 [0/1] {99} - ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {98} - ¦ ¦ ¦ ¦ ¦ ¦--'+': + [0/1] {100} - ¦ ¦ ¦ ¦ ¦ °--expr: 2 [0/0] {102} - ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {101} - ¦ ¦ ¦ ¦ °--')': ) [0/0] {103} - ¦ ¦ ¦ °--')': ) [0/0] {104} - ¦ ¦ °--')': ) [0/0] {105} - ¦ ¦--expr: multi [1/2] {106} - ¦ ¦ ¦--expr: multi [0/0] {108} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: multi [0/0] {107} - ¦ ¦ ¦--'(': ( [0/4] {109} - ¦ ¦ ¦--expr: line [1/0] {111} - ¦ ¦ ¦ °--SYMBOL: line [0/0] {110} - ¦ ¦ ¦--',': , [0/4] {112} - ¦ ¦ ¦--expr: call [1/2] {114} - ¦ ¦ ¦ °--SYMBOL: call [0/0] {113} - ¦ ¦ °--')': ) [1/0] {115} - ¦ ¦--expr: multi [1/2] {116} - ¦ ¦ ¦--expr: multi [0/0] {118} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: multi [0/0] {117} - ¦ ¦ ¦--'(': ( [0/2] {119} - ¦ ¦ °--')': ) [1/0] {120} - ¦ ¦--expr: one_s [2/2] {121} - ¦ ¦ ¦--expr: one_s [0/0] {123} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: one_s [0/0] {122} - ¦ ¦ ¦--'(': ( [0/0] {124} - ¦ ¦ ¦--expr: after [0/0] {126} - ¦ ¦ ¦ °--SYMBOL: after [0/0] {125} - ¦ ¦ ¦--',': , [0/0] {127} - ¦ ¦ ¦--expr: comma [0/0] {128} - ¦ ¦ ¦ ¦--expr: comma [0/0] {130} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: comma [0/0] {129} - ¦ ¦ ¦ ¦--'(': ( [0/0] {131} - ¦ ¦ ¦ ¦--expr: "in" [0/0] {133} - ¦ ¦ ¦ ¦ °--STR_CONST: "in" [0/0] {132} - ¦ ¦ ¦ ¦--',': , [0/0] {134} - ¦ ¦ ¦ ¦--expr: "func [0/0] {136} - ¦ ¦ ¦ ¦ °--STR_CONST: "func [0/0] {135} - ¦ ¦ ¦ ¦--',': , [0/2] {137} - ¦ ¦ ¦ ¦--expr: args [0/0] {139} - ¦ ¦ ¦ ¦ °--SYMBOL: args [0/0] {138} - ¦ ¦ ¦ °--')': ) [0/0] {140} - ¦ ¦ °--')': ) [0/0] {141} - ¦ ¦--expr: { - [2/2] {142} - ¦ ¦ ¦--'{': { [0/4] {143} - ¦ ¦ ¦--expr: brace [1/4] {145} - ¦ ¦ ¦ °--SYMBOL: brace [0/0] {144} - ¦ ¦ ¦--expr: expre [1/2] {147} - ¦ ¦ ¦ °--SYMBOL: expre [0/0] {146} - ¦ ¦ °--'}': } [1/0] {148} - ¦ ¦--expr: brace [2/2] {149} - ¦ ¦ ¦--expr: brace [0/0] {151} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: brace [0/0] {150} - ¦ ¦ ¦--'(': ( [0/0] {152} - ¦ ¦ ¦--expr: "unna [0/0] {154} - ¦ ¦ ¦ °--STR_CONST: "unna [0/0] {153} - ¦ ¦ ¦--',': , [0/1] {155} - ¦ ¦ ¦--expr: { - [0/0] {156} - ¦ ¦ ¦ ¦--'{': { [0/4] {157} - ¦ ¦ ¦ ¦--expr: "func [1/4] {159} - ¦ ¦ ¦ ¦ °--STR_CONST: "func [0/0] {158} - ¦ ¦ ¦ ¦--expr: call [1/2] {161} - ¦ ¦ ¦ ¦ °--SYMBOL: call [0/0] {160} - ¦ ¦ ¦ °--'}': } [1/0] {162} - ¦ ¦ °--')': ) [0/0] {163} - ¦ ¦--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} - ¦ ¦ ¦ ¦--'{': { [0/4] {171} - ¦ ¦ ¦ ¦--expr: "func [1/4] {173} - ¦ ¦ ¦ ¦ °--STR_CONST: "func [0/0] {172} - ¦ ¦ ¦ ¦--expr: call [1/2] {175} - ¦ ¦ ¦ ¦ °--SYMBOL: call [0/0] {174} - ¦ ¦ ¦ °--'}': } [1/0] {176} - ¦ ¦ °--')': ) [0/0] {177} - ¦ ¦--expr: brace [2/2] {178} - ¦ ¦ ¦--expr: brace [0/0] {180} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: brace [0/0] {179} - ¦ ¦ ¦--'(': ( [0/0] {181} - ¦ ¦ ¦--expr: "unna [0/0] {183} - ¦ ¦ ¦ °--STR_CONST: "unna [0/0] {182} - ¦ ¦ ¦--',': , [0/4] {184} - ¦ ¦ ¦--expr: { - } [0/0] {185} - ¦ ¦ ¦ ¦--'{': { [0/2] {186} - ¦ ¦ ¦ °--'}': } [1/0] {187} - ¦ ¦ °--')': ) [0/0] {188} - ¦ ¦--expr: brace [2/2] {189} - ¦ ¦ ¦--expr: brace [0/0] {191} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: brace [0/0] {190} - ¦ ¦ ¦--'(': ( [0/0] {192} - ¦ ¦ ¦--expr: "unna [0/0] {194} - ¦ ¦ ¦ °--STR_CONST: "unna [0/0] {193} - ¦ ¦ ¦--',': , [0/0] {195} - ¦ ¦ ¦--expr: { - } [0/0] {196} - ¦ ¦ ¦ ¦--'{': { [0/2] {197} - ¦ ¦ ¦ °--'}': } [1/0] {198} - ¦ ¦ °--')': ) [0/0] {199} - ¦ ¦--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} - ¦ ¦ ¦ ¦--'{': { [0/2] {207} - ¦ ¦ ¦ °--'}': } [1/0] {208} - ¦ ¦ °--')': ) [0/0] {209} - ¦ ¦--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} - ¦ ¦ ¦ ¦--'{': { [0/2] {217} - ¦ ¦ ¦ °--'}': } [1/0] {218} - ¦ ¦ °--')': ) [0/0] {219} - ¦ ¦--expr: brace [2/2] {220} - ¦ ¦ ¦--expr: brace [0/0] {222} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: brace [0/0] {221} - ¦ ¦ ¦--'(': ( [0/2] {223} - ¦ ¦ ¦--expr: { - [0/0] {224} - ¦ ¦ ¦ ¦--'{': { [0/4] {225} - ¦ ¦ ¦ ¦--expr: empty [1/2] {227} - ¦ ¦ ¦ ¦ °--SYMBOL: empty [0/0] {226} - ¦ ¦ ¦ °--'}': } [1/0] {228} - ¦ ¦ °--')': ) [0/0] {229} - ¦ ¦--expr: a%/%b [2/2] {230} - ¦ ¦ ¦--expr: a [0/0] {232} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {231} - ¦ ¦ ¦--SPECIAL-OTHER: %/% [0/0] {233} - ¦ ¦ °--expr: b [0/0] {235} - ¦ ¦ °--SYMBOL: b [0/0] {234} - ¦ ¦--expr: a%%b [1/2] {236} - ¦ ¦ ¦--expr: a [0/0] {238} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {237} - ¦ ¦ ¦--SPECIAL-OTHER: %% [0/0] {239} - ¦ ¦ °--expr: b [0/0] {241} - ¦ ¦ °--SYMBOL: b [0/0] {240} - ¦ ¦--expr: a&&b [1/2] {242} - ¦ ¦ ¦--expr: a [0/0] {244} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {243} - ¦ ¦ ¦--AND2: && [0/0] {245} - ¦ ¦ °--expr: b [0/0] {247} - ¦ ¦ °--SYMBOL: b [0/0] {246} - ¦ ¦--expr: a||b [1/2] {248} - ¦ ¦ ¦--expr: a [0/0] {250} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {249} - ¦ ¦ ¦--OR2: || [0/0] {251} - ¦ ¦ °--expr: b [0/0] {253} - ¦ ¦ °--SYMBOL: b [0/0] {252} - ¦ ¦--expr: a==b [1/2] {254} - ¦ ¦ ¦--expr: a [0/0] {256} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {255} - ¦ ¦ ¦--EQ: == [0/0] {257} - ¦ ¦ °--expr: b [0/0] {259} - ¦ ¦ °--SYMBOL: b [0/0] {258} - ¦ ¦--expr: a!=b [1/2] {260} - ¦ ¦ ¦--expr: a [0/0] {262} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {261} - ¦ ¦ ¦--NE: != [0/0] {263} - ¦ ¦ °--expr: b [0/0] {265} - ¦ ¦ °--SYMBOL: b [0/0] {264} - ¦ ¦--expr: a<=b [1/2] {266} - ¦ ¦ ¦--expr: a [0/0] {268} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {267} - ¦ ¦ ¦--LE: <= [0/0] {269} - ¦ ¦ °--expr: b [0/0] {271} - ¦ ¦ °--SYMBOL: b [0/0] {270} - ¦ ¦--expr: a>=b [1/2] {272} - ¦ ¦ ¦--expr: a [0/0] {274} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {273} - ¦ ¦ ¦--GE: >= [0/0] {275} - ¦ ¦ °--expr: b [0/0] {277} - ¦ ¦ °--SYMBOL: b [0/0] {276} - ¦ ¦--expr: a<-b [1/2] {278} - ¦ ¦ ¦--expr: a [0/0] {280} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {279} - ¦ ¦ ¦--LEFT_ASSIGN: <- [0/0] {281} - ¦ ¦ °--expr: b [0/0] {283} - ¦ ¦ °--SYMBOL: b [0/0] {282} - ¦ ¦--expr: a->b [1/2] {284} - ¦ ¦ ¦--expr: a [0/0] {286} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {285} - ¦ ¦ ¦--RIGHT_ASSIGN: -> [0/0] {287} - ¦ ¦ °--expr: b [0/0] {289} - ¦ ¦ °--SYMBOL: b [0/0] {288} - ¦ ¦--expr_or_assign_or_help: a=b [1/2] {290} - ¦ ¦ ¦--expr: a [0/0] {292} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {291} - ¦ ¦ ¦--EQ_ASSIGN: = [0/0] {293} - ¦ ¦ °--expr: b [0/0] {295} - ¦ ¦ °--SYMBOL: b [0/0] {294} - ¦ ¦--expr: ab [1/2] {302} - ¦ ¦ ¦--expr: a [0/0] {304} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {303} - ¦ ¦ ¦--GT: > [0/0] {305} - ¦ ¦ °--expr: b [0/0] {307} - ¦ ¦ °--SYMBOL: b [0/0] {306} - ¦ ¦--expr: a*b [1/2] {308} - ¦ ¦ ¦--expr: a [0/0] {310} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {309} - ¦ ¦ ¦--'*': * [0/0] {311} - ¦ ¦ °--expr: b [0/0] {313} - ¦ ¦ °--SYMBOL: b [0/0] {312} - ¦ ¦--expr: a/b [1/2] {314} - ¦ ¦ ¦--expr: a [0/0] {316} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {315} - ¦ ¦ ¦--'/': / [0/0] {317} - ¦ ¦ °--expr: b [0/0] {319} - ¦ ¦ °--SYMBOL: b [0/0] {318} - ¦ ¦--expr: a^b [1/2] {320} - ¦ ¦ ¦--expr: a [0/0] {322} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {321} - ¦ ¦ ¦--'^': ^ [0/0] {323} - ¦ ¦ °--expr: b [0/0] {325} - ¦ ¦ °--SYMBOL: b [0/0] {324} - ¦ ¦--expr: a&b [1/2] {326} - ¦ ¦ ¦--expr: a [0/0] {328} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {327} - ¦ ¦ ¦--AND: & [0/0] {329} - ¦ ¦ °--expr: b [0/0] {331} - ¦ ¦ °--SYMBOL: b [0/0] {330} - ¦ ¦--expr: a|b [1/2] {332} - ¦ ¦ ¦--expr: a [0/0] {334} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {333} - ¦ ¦ ¦--OR: | [0/0] {335} - ¦ ¦ °--expr: b [0/0] {337} - ¦ ¦ °--SYMBOL: b [0/0] {336} - ¦ ¦--expr: a:=b [1/2] {338} - ¦ ¦ ¦--expr: a [0/0] {340} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {339} - ¦ ¦ ¦--LEFT_ASSIGN: := [0/0] {341} - ¦ ¦ °--expr: b [0/0] {343} - ¦ ¦ °--SYMBOL: b [0/0] {342} - ¦ ¦--expr: a+b [2/2] {344} - ¦ ¦ ¦--expr: a [0/0] {346} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {345} - ¦ ¦ ¦--'+': + [0/0] {347} - ¦ ¦ °--expr: b [0/0] {349} - ¦ ¦ °--SYMBOL: b [0/0] {348} - ¦ ¦--expr: a-b [1/2] {350} - ¦ ¦ ¦--expr: a [0/0] {352} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {351} - ¦ ¦ ¦--'-': - [0/0] {353} - ¦ ¦ °--expr: b [0/0] {355} - ¦ ¦ °--SYMBOL: b [0/0] {354} - ¦ ¦--expr: a++b [1/2] {356} - ¦ ¦ ¦--expr: a [0/0] {358} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {357} - ¦ ¦ ¦--'+': + [0/0] {359} - ¦ ¦ °--expr: +b [0/0] {360} - ¦ ¦ ¦--'+': + [0/0] {361} - ¦ ¦ °--expr: b [0/0] {363} - ¦ ¦ °--SYMBOL: b [0/0] {362} - ¦ ¦--expr: a+-b [1/2] {364} - ¦ ¦ ¦--expr: a [0/0] {366} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {365} - ¦ ¦ ¦--'+': + [0/0] {367} - ¦ ¦ °--expr: -b [0/0] {368} - ¦ ¦ ¦--'-': - [0/0] {369} - ¦ ¦ °--expr: b [0/0] {371} - ¦ ¦ °--SYMBOL: b [0/0] {370} - ¦ ¦--expr: a++b [1/2] {372} - ¦ ¦ ¦--expr: a [0/0] {374} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {373} - ¦ ¦ ¦--'+': + [0/0] {375} - ¦ ¦ °--expr: +b [0/0] {376} - ¦ ¦ ¦--'+': + [0/0] {377} - ¦ ¦ °--expr: b [0/0] {379} - ¦ ¦ °--SYMBOL: b [0/0] {378} - ¦ ¦--expr: a-+b [1/2] {380} - ¦ ¦ ¦--expr: a [0/0] {382} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {381} - ¦ ¦ ¦--'-': - [0/0] {383} - ¦ ¦ °--expr: +b [0/0] {384} - ¦ ¦ ¦--'+': + [0/0] {385} - ¦ ¦ °--expr: b [0/0] {387} - ¦ ¦ °--SYMBOL: b [0/0] {386} - ¦ ¦--expr: a--b [1/2] {388} - ¦ ¦ ¦--expr: a [0/0] {390} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {389} - ¦ ¦ ¦--'-': - [0/0] {391} - ¦ ¦ °--expr: -b [0/0] {392} - ¦ ¦ ¦--'-': - [0/0] {393} - ¦ ¦ °--expr: b [0/0] {395} - ¦ ¦ °--SYMBOL: b [0/0] {394} - ¦ ¦--expr: a+--b [1/2] {396} - ¦ ¦ ¦--expr: a [0/0] {398} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {397} - ¦ ¦ ¦--'+': + [0/0] {399} - ¦ ¦ °--expr: --b [0/0] {400} - ¦ ¦ ¦--'-': - [0/0] {401} - ¦ ¦ °--expr: -b [0/0] {402} - ¦ ¦ ¦--'-': - [0/0] {403} - ¦ ¦ °--expr: b [0/0] {405} - ¦ ¦ °--SYMBOL: b [0/0] {404} - ¦ ¦--expr: a--+b [1/2] {406} - ¦ ¦ ¦--expr: a [0/0] {408} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {407} - ¦ ¦ ¦--'-': - [0/0] {409} - ¦ ¦ °--expr: -+b [0/0] {410} - ¦ ¦ ¦--'-': - [0/0] {411} - ¦ ¦ °--expr: +b [0/0] {412} - ¦ ¦ ¦--'+': + [0/0] {413} - ¦ ¦ °--expr: b [0/0] {415} - ¦ ¦ °--SYMBOL: b [0/0] {414} - ¦ ¦--expr: call( [1/2] {416} - ¦ ¦ ¦--expr: call [0/0] {418} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {417} - ¦ ¦ ¦--'(': ( [0/1] {419} - ¦ ¦ ¦--expr: + a [0/0] {420} - ¦ ¦ ¦ ¦--'+': + [0/1] {421} - ¦ ¦ ¦ °--expr: a [0/0] {423} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {422} - ¦ ¦ °--')': ) [0/0] {424} - ¦ ¦--expr: call( [1/2] {425} - ¦ ¦ ¦--expr: call [0/0] {427} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {426} - ¦ ¦ ¦--'(': ( [0/1] {428} - ¦ ¦ ¦--expr: - a [0/0] {429} - ¦ ¦ ¦ ¦--'-': - [0/1] {430} - ¦ ¦ ¦ °--expr: a [0/0] {432} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {431} - ¦ ¦ °--')': ) [0/0] {433} - ¦ ¦--expr: call( [1/2] {434} - ¦ ¦ ¦--expr: call [0/0] {436} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {435} - ¦ ¦ ¦--'(': ( [0/0] {437} - ¦ ¦ ¦--expr: 5 [0/0] {439} - ¦ ¦ ¦ °--NUM_CONST: 5 [0/0] {438} - ¦ ¦ ¦--',': , [0/1] {440} - ¦ ¦ ¦--expr: + a [0/0] {441} - ¦ ¦ ¦ ¦--'+': + [0/1] {442} - ¦ ¦ ¦ °--expr: a [0/0] {444} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {443} - ¦ ¦ °--')': ) [0/0] {445} - ¦ ¦--expr: call( [1/2] {446} - ¦ ¦ ¦--expr: call [0/0] {448} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {447} - ¦ ¦ ¦--'(': ( [0/0] {449} - ¦ ¦ ¦--expr: 5 [0/0] {451} - ¦ ¦ ¦ °--NUM_CONST: 5 [0/0] {450} - ¦ ¦ ¦--',': , [0/1] {452} - ¦ ¦ ¦--expr: - a [0/0] {453} - ¦ ¦ ¦ ¦--'-': - [0/1] {454} - ¦ ¦ ¦ °--expr: a [0/0] {456} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {455} - ¦ ¦ °--')': ) [0/0] {457} - ¦ ¦--COMMENT: # Onl [2/2] {458} - ¦ ¦--expr: call( [1/2] {459} - ¦ ¦ ¦--expr: call [0/0] {461} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {460} - ¦ ¦ ¦--'(': ( [0/4] {462} - ¦ ¦ ¦--expr: prese [1/0] {464} - ¦ ¦ ¦ °--SYMBOL: prese [0/0] {463} - ¦ ¦ ¦--',': , [0/1] {465} - ¦ ¦ ¦--expr: dista [0/0] {467} - ¦ ¦ ¦ °--SYMBOL: dista [0/0] {466} - ¦ ¦ ¦--',': , [0/4] {468} - ¦ ¦ ¦--expr: after [1/0] {470} - ¦ ¦ ¦ °--SYMBOL: after [0/0] {469} - ¦ ¦ ¦--',': , [0/5] {471} - ¦ ¦ ¦--expr: comma [0/0] {473} - ¦ ¦ ¦ °--SYMBOL: comma [0/0] {472} - ¦ ¦ ¦--',': , [0/4] {474} - ¦ ¦ ¦--expr: given [1/0] {476} - ¦ ¦ ¦ °--SYMBOL: given [0/0] {475} - ¦ ¦ ¦--',': , [0/0] {477} - ¦ ¦ ¦--expr: one [0/2] {479} - ¦ ¦ ¦ °--SYMBOL: one [0/0] {478} - ¦ ¦ °--')': ) [1/0] {480} - ¦ ¦--expr: if(TR [2/2] {481} - ¦ ¦ ¦--IF: if [0/0] {482} - ¦ ¦ ¦--'(': ( [0/0] {483} - ¦ ¦ ¦--expr: TRUE [0/0] {485} - ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {484} - ¦ ¦ ¦--')': ) [0/0] {486} - ¦ ¦ °--expr: { - [0/0] {487} - ¦ ¦ ¦--'{': { [0/4] {488} - ¦ ¦ ¦--expr: FALSE [1/2] {490} - ¦ ¦ ¦ °--NUM_CONST: FALSE [0/0] {489} - ¦ ¦ °--'}': } [1/0] {491} - ¦ ¦--expr: if(TR [2/2] {492} - ¦ ¦ ¦--IF: if [0/0] {493} - ¦ ¦ ¦--'(': ( [0/0] {494} - ¦ ¦ ¦--expr: TRUE [0/0] {496} - ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {495} - ¦ ¦ ¦--')': ) [0/0] {497} - ¦ ¦ ¦--expr: { - [0/0] {498} - ¦ ¦ ¦ ¦--'{': { [0/4] {499} - ¦ ¦ ¦ ¦--expr: FALSE [1/2] {501} - ¦ ¦ ¦ ¦ °--NUM_CONST: FALSE [0/0] {500} - ¦ ¦ ¦ °--'}': } [1/0] {502} - ¦ ¦ ¦--ELSE: else [0/0] {503} - ¦ ¦ °--expr: { - [0/0] {504} - ¦ ¦ ¦--'{': { [0/4] {505} - ¦ ¦ ¦--expr: TRUE [1/2] {507} - ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {506} - ¦ ¦ °--'}': } [1/0] {508} - ¦ ¦--expr: while [2/2] {509} - ¦ ¦ ¦--WHILE: while [0/0] {510} - ¦ ¦ ¦--'(': ( [0/0] {511} - ¦ ¦ ¦--expr: TRUE [0/0] {513} - ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {512} - ¦ ¦ ¦--')': ) [0/0] {514} - ¦ ¦ °--expr: { - [0/0] {515} - ¦ ¦ ¦--'{': { [0/4] {516} - ¦ ¦ ¦--expr: FALSE [1/2] {518} - ¦ ¦ ¦ °--NUM_CONST: FALSE [0/0] {517} - ¦ ¦ °--'}': } [1/0] {519} - ¦ ¦--expr: singl [2/2] {520} - ¦ ¦ ¦--expr: singl [0/1] {522} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: singl [0/0] {521} - ¦ ¦ ¦--'(': ( [0/1] {523} - ¦ ¦ ¦--expr: "func [0/1] {525} - ¦ ¦ ¦ °--STR_CONST: "func [0/0] {524} - ¦ ¦ ¦--',': , [0/0] {526} - ¦ ¦ ¦--expr: call [0/1] {528} - ¦ ¦ ¦ °--SYMBOL: call [0/0] {527} - ¦ ¦ °--')': ) [0/0] {529} - ¦ ¦--expr: multi [2/2] {530} - ¦ ¦ ¦--expr: multi [0/1] {532} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: multi [0/0] {531} - ¦ ¦ ¦--'(': ( [0/2] {533} - ¦ ¦ ¦--expr: "func [1/0] {535} - ¦ ¦ ¦ °--STR_CONST: "func [0/0] {534} - ¦ ¦ ¦--',': , [0/1] {536} - ¦ ¦ ¦--expr: call [0/1] {538} - ¦ ¦ ¦ °--SYMBOL: call [0/0] {537} - ¦ ¦ °--')': ) [0/0] {539} - ¦ ¦--expr: neste [2/2] {540} - ¦ ¦ ¦--expr: neste [0/1] {542} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: neste [0/0] {541} - ¦ ¦ ¦--'(': ( [0/1] {543} - ¦ ¦ ¦--expr: funct [0/1] {544} - ¦ ¦ ¦ ¦--expr: funct [0/1] {546} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: funct [0/0] {545} - ¦ ¦ ¦ ¦--'(': ( [0/1] {547} - ¦ ¦ ¦ ¦--expr: "in" [0/1] {549} - ¦ ¦ ¦ ¦ °--STR_CONST: "in" [0/0] {548} - ¦ ¦ ¦ ¦--',': , [0/0] {550} - ¦ ¦ ¦ ¦--expr: one [0/1] {552} - ¦ ¦ ¦ ¦ °--SYMBOL: one [0/0] {551} - ¦ ¦ ¦ ¦--',': , [0/0] {553} - ¦ ¦ ¦ ¦--expr: line [0/1] {555} - ¦ ¦ ¦ ¦ °--SYMBOL: line [0/0] {554} - ¦ ¦ ¦ °--')': ) [0/0] {556} - ¦ ¦ °--')': ) [0/0] {557} - ¦ ¦--expr: neste [2/2] {558} - ¦ ¦ ¦--expr: neste [0/1] {560} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: neste [0/0] {559} - ¦ ¦ ¦--'(': ( [0/1] {561} - ¦ ¦ ¦--expr: funct [0/1] {562} - ¦ ¦ ¦ ¦--expr: funct [0/1] {564} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: funct [0/0] {563} - ¦ ¦ ¦ ¦--'(': ( [0/2] {565} - ¦ ¦ ¦ ¦--expr: "in" [1/0] {567} - ¦ ¦ ¦ ¦ °--STR_CONST: "in" [0/0] {566} - ¦ ¦ ¦ ¦--',': , [0/6] {568} - ¦ ¦ ¦ ¦--expr: multi [1/0] {570} - ¦ ¦ ¦ ¦ °--SYMBOL: multi [0/0] {569} - ¦ ¦ ¦ ¦--',': , [0/0] {571} - ¦ ¦ ¦ ¦--expr: lines [0/1] {573} - ¦ ¦ ¦ ¦ °--SYMBOL: lines [0/0] {572} - ¦ ¦ ¦ °--')': ) [0/0] {574} - ¦ ¦ °--')': ) [0/0] {575} - ¦ ¦--expr: neste [2/2] {576} - ¦ ¦ ¦--expr: neste [0/0] {578} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: neste [0/0] {577} - ¦ ¦ ¦--'(': ( [0/2] {579} - ¦ ¦ ¦--expr: funct [1/0] {580} - ¦ ¦ ¦ ¦--expr: funct [0/1] {582} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: funct [0/0] {581} - ¦ ¦ ¦ ¦--'(': ( [0/1] {583} - ¦ ¦ ¦ ¦--expr: with [0/1] {585} - ¦ ¦ ¦ ¦ °--SYMBOL: with [0/0] {584} - ¦ ¦ ¦ °--')': ) [0/0] {586} - ¦ ¦ ¦--',': , [0/6] {587} - ¦ ¦ ¦--expr: many [1/2] {589} - ¦ ¦ ¦ °--SYMBOL: many [0/0] {588} - ¦ ¦ ¦--',': , [1/5] {590} - ¦ ¦ ¦--expr: first [0/2] {592} - ¦ ¦ ¦ °--SYMBOL: first [0/0] {591} - ¦ ¦ °--')': ) [0/0] {593} - ¦ ¦--expr: neste [2/2] {594} - ¦ ¦ ¦--expr: neste [0/0] {596} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: neste [0/0] {595} - ¦ ¦ ¦--'(': ( [0/4] {597} - ¦ ¦ ¦--expr: funct [1/0] {598} - ¦ ¦ ¦ ¦--expr: funct [0/1] {600} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: funct [0/0] {599} - ¦ ¦ ¦ ¦--'(': ( [0/1] {601} - ¦ ¦ ¦ ¦--expr: with [0/1] {603} - ¦ ¦ ¦ ¦ °--SYMBOL: with [0/0] {602} - ¦ ¦ ¦ °--')': ) [0/0] {604} - ¦ ¦ ¦--',': , [0/2] {605} - ¦ ¦ ¦--COMMENT: # a c [0/4] {606} - ¦ ¦ ¦--expr: many [1/1] {608} - ¦ ¦ ¦ °--SYMBOL: many [0/0] {607} - ¦ ¦ ¦--COMMENT: #more [0/4] {609} - ¦ ¦ ¦--',': , [1/5] {610} - ¦ ¦ ¦--expr: first [0/2] {612} - ¦ ¦ ¦ °--SYMBOL: first [0/0] {611} - ¦ ¦ °--')': ) [0/0] {613} - ¦ ¦--expr: diffi [2/0] {614} - ¦ ¦ ¦--expr: diffi [0/0] {616} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: diffi [0/0] {615} - ¦ ¦ ¦--'(': ( [0/0] {617} - ¦ ¦ ¦--expr: neste [0/0] {618} - ¦ ¦ ¦ ¦--expr: neste [0/0] {620} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: neste [0/0] {619} - ¦ ¦ ¦ ¦--'(': ( [0/4] {621} - ¦ ¦ ¦ ¦--expr: "func [1/0] {623} - ¦ ¦ ¦ ¦ °--STR_CONST: "func [0/0] {622} - ¦ ¦ ¦ ¦--',': , [0/1] {624} - ¦ ¦ ¦ ¦--expr: call [0/2] {626} - ¦ ¦ ¦ ¦ °--SYMBOL: call [0/0] {625} - ¦ ¦ ¦ °--')': ) [1/0] {627} - ¦ ¦ ¦--',': , [0/4] {628} - ¦ ¦ ¦--expr: with [1/0] {630} - ¦ ¦ ¦ °--SYMBOL: with [0/0] {629} - ¦ ¦ ¦--',': , [0/1] {631} - ¦ ¦ ¦--expr: more [0/0] {633} - ¦ ¦ ¦ °--SYMBOL: more [0/0] {632} - ¦ ¦ ¦--',': , [0/1] {634} - ¦ ¦ ¦--expr: args [0/2] {636} - ¦ ¦ ¦ °--SYMBOL: args [0/0] {635} - ¦ ¦ °--')': ) [1/0] {637} - ¦ °--'}': } [1/0] {638} - ¦--COMMENT: # for [3/0] {639} - ¦--expr: lm(a~ [1/0] {640} - ¦ ¦--expr: lm [0/0] {642} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: lm [0/0] {641} - ¦ ¦--'(': ( [0/0] {643} - ¦ ¦--expr: a~b+c [0/0] {644} - ¦ ¦ ¦--expr: a [0/0] {646} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {645} - ¦ ¦ ¦--'~': ~ [0/0] {647} - ¦ ¦ ¦--expr: b [0/0] {650} - ¦ ¦ ¦ °--SYMBOL: b [0/0] {649} - ¦ ¦ ¦--'+': + [0/0] {651} - ¦ ¦ °--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: NA [0/0] {658} - ¦ ¦ °--NUM_CONST: NA [0/0] {657} - ¦ °--')': ) [0/0] {659} - ¦--expr: lm(a~ [1/0] {660} - ¦ ¦--expr: lm [0/0] {662} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: lm [0/0] {661} - ¦ ¦--'(': ( [0/0] {663} - ¦ ¦--expr: a~.-1 [0/0] {664} - ¦ ¦ ¦--expr: a [0/0] {666} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {665} - ¦ ¦ ¦--'~': ~ [0/0] {667} - ¦ ¦ ¦--expr: . [0/0] {670} - ¦ ¦ ¦ °--SYMBOL: . [0/0] {669} - ¦ ¦ ¦--'-': - [0/0] {671} - ¦ ¦ °--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: NA [0/0] {678} - ¦ ¦ °--NUM_CONST: NA [0/0] {677} - ¦ °--')': ) [0/0] {679} - ¦--expr: a~b:c [1/0] {680} - ¦ ¦--expr: a [0/0] {682} - ¦ ¦ °--SYMBOL: a [0/0] {681} - ¦ ¦--'~': ~ [0/0] {683} - ¦ °--expr: b:c [0/0] {684} - ¦ ¦--expr: b [0/0] {686} - ¦ ¦ °--SYMBOL: b [0/0] {685} - ¦ ¦--':': : [0/0] {687} - ¦ °--expr: c [0/0] {689} - ¦ °--SYMBOL: c [0/0] {688} - ¦--expr: a ~ [1/0] {690} - ¦ ¦--expr: a [0/3] {692} - ¦ ¦ °--SYMBOL: a [0/0] {691} - ¦ ¦--'~': ~ [0/3] {693} - ¦ °--expr: b : [0/0] {694} - ¦ ¦--expr: b [0/2] {696} - ¦ ¦ °--SYMBOL: b [0/0] {695} - ¦ ¦--':': : [0/1] {697} - ¦ °--expr: c [0/0] {699} - ¦ °--SYMBOL: c [0/0] {698} - ¦--expr: a~b : [1/0] {700} - ¦ ¦--expr: a [0/0] {702} - ¦ ¦ °--SYMBOL: a [0/0] {701} - ¦ ¦--'~': ~ [0/0] {703} - ¦ °--expr: b :c [0/0] {704} - ¦ ¦--expr: b [0/1] {706} - ¦ ¦ °--SYMBOL: b [0/0] {705} - ¦ ¦--':': : [0/0] {707} - ¦ °--expr: c [0/0] {709} - ¦ °--SYMBOL: c [0/0] {708} - ¦--expr: ~ [1/0] {710} - ¦ ¦--'~': ~ [0/4] {711} - ¦ °--expr: a [0/0] {713} - ¦ °--SYMBOL: a [0/0] {712} - ¦--expr: ~gg [1/0] {714} - ¦ ¦--'~': ~ [0/0] {715} - ¦ °--expr: gg [0/0] {717} - ¦ °--SYMBOL: gg [0/0] {716} - ¦--expr: b~k [1/0] {718} - ¦ ¦--expr: b [0/0] {720} - ¦ ¦ °--SYMBOL: b [0/0] {719} - ¦ ¦--'~': ~ [0/0] {721} - ¦ °--expr: k [0/0] {723} - ¦ °--SYMBOL: k [0/0] {722} - °--expr: call( [1/0] {724} - ¦--expr: call [0/0] {726} - ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {725} - ¦--'(': ( [0/0] {727} - ¦--expr: 1 [0/0] {729} - ¦ °--NUM_CONST: 1 [0/0] {728} - ¦--',': , [0/1] {730} - ¦--expr: ~ qq [0/0] {731} - ¦ ¦--'~': ~ [0/1] {732} - ¦ °--expr: qq [0/0] {734} - ¦ °--SYMBOL: qq [0/0] {733} - °--')': ) [0/0] {735} diff --git a/tests/testthat/strict/strict-out.R b/tests/testthat/strict/strict-out.R index 3422f4e5b..688cf7f88 100644 --- a/tests/testthat/strict/strict-out.R +++ b/tests/testthat/strict/strict-out.R @@ -34,17 +34,13 @@ test <- function() { call }) - braced("unnamed reduces space", { - }) + braced("unnamed reduces space", {}) - braced("unnamed adds space space", { - }) + braced("unnamed adds space space", {}) - braced(named_reduces_space = { - }) + braced(named_reduces_space = {}) - braced(named_adds_space = { - }) + braced(named_adds_space = {}) braced({ empty_removes_space diff --git a/tests/testthat/stylerignore/adding-removing-in_tree b/tests/testthat/stylerignore/adding-removing-in_tree deleted file mode 100644 index df503a1ec..000000000 --- a/tests/testthat/stylerignore/adding-removing-in_tree +++ /dev/null @@ -1,180 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: # sty [0/0] {1} - ¦--expr: 1 +1 [1/0] {2} - ¦ ¦--expr: 1 [0/1] {4} - ¦ ¦ °--NUM_CONST: 1 [0/0] {3} - ¦ ¦--'+': + [0/0] {5} - ¦ °--expr: 1 [0/0] {7} - ¦ °--NUM_CONST: 1 [0/0] {6} - ¦--';': ; [0/0] {8} - ¦--expr: 3 [0/0] {10} - ¦ °--NUM_CONST: 3 [0/0] {9} - ¦--COMMENT: # sty [1/0] {11} - ¦--COMMENT: # a c [1/0] {12} - ¦--expr: c(z ) [1/0] {13} - ¦ ¦--expr: c [0/0] {15} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {14} - ¦ ¦--'(': ( [0/0] {16} - ¦ ¦--expr: z [0/1] {18} - ¦ ¦ °--SYMBOL: z [0/0] {17} - ¦ °--')': ) [0/0] {19} - ¦--COMMENT: # sty [3/0] {20} - ¦--expr: if (F [1/0] {21} - ¦ ¦--IF: if [0/1] {22} - ¦ ¦--'(': ( [0/0] {23} - ¦ ¦--expr: FALSE [0/0] {25} - ¦ ¦ °--NUM_CONST: FALSE [0/0] {24} - ¦ ¦--')': ) [0/2] {26} - ¦ °--expr: 3 [1/0] {28} - ¦ °--NUM_CONST: 3 [0/0] {27} - ¦--expr_or_assign_or_help: x = 3 [1/0] {29} - ¦ ¦--expr: x [0/1] {31} - ¦ ¦ °--SYMBOL: x [0/0] {30} - ¦ ¦--EQ_ASSIGN: = [0/1] {32} - ¦ °--expr: 3 [0/0] {34} - ¦ °--NUM_CONST: 3 [0/0] {33} - ¦--expr_or_assign_or_help: y = 2 [2/1] {35} - ¦ ¦--expr: y [0/1] {37} - ¦ ¦ °--SYMBOL: y [0/0] {36} - ¦ ¦--EQ_ASSIGN: = [0/1] {38} - ¦ °--expr: 2 [0/0] {40} - ¦ °--NUM_CONST: 2 [0/0] {39} - ¦--COMMENT: # com [0/0] {41} - ¦--COMMENT: # sty [1/0] {42} - ¦--expr: if (F [2/0] {43} - ¦ ¦--IF: if [0/1] {44} - ¦ ¦--'(': ( [0/0] {45} - ¦ ¦--expr: FALSE [0/0] {47} - ¦ ¦ °--NUM_CONST: FALSE [0/0] {46} - ¦ ¦--')': ) [0/1] {48} - ¦ °--expr: { - 3 [0/0] {49} - ¦ ¦--'{': { [0/2] {50} - ¦ ¦--expr: 3 [1/0] {52} - ¦ ¦ °--NUM_CONST: 3 [0/0] {51} - ¦ °--'}': } [1/0] {53} - ¦--COMMENT: # sty [3/0] {54} - ¦--expr: funct [1/0] {55} - ¦ ¦--FUNCTION: funct [0/0] {56} - ¦ ¦--'(': ( [0/0] {57} - ¦ ¦--')': ) [0/2] {58} - ¦ °--expr: NULL [1/0] {60} - ¦ °--NULL_CONST: NULL [0/0] {59} - ¦--COMMENT: # sty [1/0] {61} - ¦--COMMENT: # sty [3/0] {62} - ¦--expr: if (f [1/0] {63} - ¦ ¦--IF: if [0/1] {64} - ¦ ¦--'(': ( [0/0] {65} - ¦ ¦--expr: f(x) [0/0] {66} - ¦ ¦ ¦--expr: f [0/0] {68} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: f [0/0] {67} - ¦ ¦ ¦--'(': ( [0/0] {69} - ¦ ¦ ¦--expr: x [0/0] {71} - ¦ ¦ ¦ °--SYMBOL: x [0/0] {70} - ¦ ¦ °--')': ) [0/0] {72} - ¦ ¦--')': ) [0/1] {73} - ¦ ¦--expr: { - 3 [0/1] {74} - ¦ ¦ ¦--'{': { [0/2] {75} - ¦ ¦ ¦--expr: 3 [1/0] {77} - ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {76} - ¦ ¦ °--'}': } [1/0] {78} - ¦ ¦--ELSE: else [0/2] {79} - ¦ °--expr: 4 [1/0] {81} - ¦ °--NUM_CONST: 4 [0/0] {80} - ¦--COMMENT: # sty [1/0] {82} - ¦--COMMENT: # sty [3/0] {83} - ¦--expr: while [1/0] {84} - ¦ ¦--WHILE: while [0/1] {85} - ¦ ¦--'(': ( [0/0] {86} - ¦ ¦--expr: x < 4 [0/0] {87} - ¦ ¦ ¦--expr: x [0/1] {89} - ¦ ¦ ¦ °--SYMBOL: x [0/0] {88} - ¦ ¦ ¦--LT: < [0/1] {90} - ¦ ¦ °--expr: 4 [0/0] {92} - ¦ ¦ °--NUM_CONST: 4 [0/0] {91} - ¦ ¦--')': ) [0/1] {93} - ¦ °--expr: n() [0/0] {94} - ¦ ¦--expr: n [0/0] {96} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: n [0/0] {95} - ¦ ¦--'(': ( [0/0] {97} - ¦ °--')': ) [0/0] {98} - ¦--COMMENT: # sty [1/0] {99} - ¦--COMMENT: # sty [3/0] {100} - ¦--expr: for(i [1/0] {101} - ¦ ¦--FOR: for [0/0] {102} - ¦ ¦--forcond: (i in [0/1] {103} - ¦ ¦ ¦--'(': ( [0/0] {104} - ¦ ¦ ¦--SYMBOL: i [0/1] {105} - ¦ ¦ ¦--IN: in [0/1] {106} - ¦ ¦ ¦--expr: 1:3 [0/0] {107} - ¦ ¦ ¦ ¦--expr: 1 [0/0] {109} - ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {108} - ¦ ¦ ¦ ¦--':': : [0/0] {110} - ¦ ¦ ¦ °--expr: 3 [0/0] {112} - ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {111} - ¦ ¦ °--')': ) [0/0] {113} - ¦ °--expr: { - i [0/0] {114} - ¦ ¦--'{': { [0/2] {115} - ¦ ¦--expr: i [1/0] {117} - ¦ ¦ °--SYMBOL: i [0/0] {116} - ¦ °--'}': } [1/0] {118} - ¦--COMMENT: # sty [1/0] {119} - ¦--COMMENT: # sty [2/0] {120} - ¦--expr: for ( [1/0] {121} - ¦ ¦--FOR: for [0/1] {122} - ¦ ¦--forcond: (i in [0/2] {123} - ¦ ¦ ¦--'(': ( [0/0] {124} - ¦ ¦ ¦--SYMBOL: i [0/1] {125} - ¦ ¦ ¦--IN: in [0/1] {126} - ¦ ¦ ¦--expr: 1:3 [0/0] {127} - ¦ ¦ ¦ ¦--expr: 1 [0/0] {129} - ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {128} - ¦ ¦ ¦ ¦--':': : [0/0] {130} - ¦ ¦ ¦ °--expr: 3 [0/0] {132} - ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {131} - ¦ ¦ °--')': ) [0/0] {133} - ¦ °--expr: g(i) [1/0] {134} - ¦ ¦--expr: g(i) [0/1] {135} - ¦ ¦ ¦--expr: g [0/0] {137} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: g [0/0] {136} - ¦ ¦ ¦--'(': ( [0/0] {138} - ¦ ¦ ¦--expr: i [0/0] {140} - ¦ ¦ ¦ °--SYMBOL: i [0/0] {139} - ¦ ¦ °--')': ) [0/0] {141} - ¦ ¦--'-': - [0/1] {142} - ¦ °--expr: 2 [0/0] {144} - ¦ °--NUM_CONST: 2 [0/0] {143} - ¦--COMMENT: # sty [2/0] {145} - ¦--expr: 1+ 54 [1/0] {146} - ¦ ¦--expr: 1 [0/0] {148} - ¦ ¦ °--NUM_CONST: 1 [0/0] {147} - ¦ ¦--'+': + [0/1] {149} - ¦ °--expr: 54780 [0/0] {151} - ¦ °--NUM_CONST: 54780 [0/0] {150} - ¦--expr: 1 +1 [3/1] {152} - ¦ ¦--expr: 1 [0/1] {154} - ¦ ¦ °--NUM_CONST: 1 [0/0] {153} - ¦ ¦--'+': + [0/0] {155} - ¦ °--expr: 1 [0/0] {157} - ¦ °--NUM_CONST: 1 [0/0] {156} - ¦--COMMENT: # sty [0/0] {158} - ¦--expr: 1 [2/0] {160} - ¦ °--NUM_CONST: 1 [0/0] {159} - ¦--';': ; [0/0] {161} - ¦--expr: 1 [0/1] {163} - ¦ °--NUM_CONST: 1 [0/0] {162} - ¦--COMMENT: # sty [0/0] {164} - ¦--COMMENT: # sty [2/0] {165} - ¦--expr: 1 +1 [1/0] {166} - ¦ ¦--expr: 1 [0/1] {168} - ¦ ¦ °--NUM_CONST: 1 [0/0] {167} - ¦ ¦--'+': + [0/0] {169} - ¦ °--expr: 1 [0/0] {171} - ¦ °--NUM_CONST: 1 [0/0] {170} - ¦--';': ; [0/0] {172} - ¦--expr: 3 [0/1] {174} - ¦ °--NUM_CONST: 3 [0/0] {173} - ¦--COMMENT: # com [0/0] {175} - °--COMMENT: # sty [1/0] {176} diff --git a/tests/testthat/stylerignore/alignment-in_tree b/tests/testthat/stylerignore/alignment-in_tree deleted file mode 100644 index 18ae34374..000000000 --- a/tests/testthat/stylerignore/alignment-in_tree +++ /dev/null @@ -1,110 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: ps( - [0/0] {1} - ¦--expr: ps [0/0] {3} - ¦ °--SYMBOL_FUNCTION_CALL: ps [0/0] {2} - ¦--'(': ( [0/2] {4} - ¦--SYMBOL_SUB: inter [1/1] {5} - ¦--EQ_SUB: = [0/1] {6} - ¦--expr: p_uty [0/0] {7} - ¦ ¦--expr: p_uty [0/0] {9} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: p_uty [0/0] {8} - ¦ ¦--'(': ( [0/0] {10} - ¦ ¦--SYMBOL_SUB: tgs [0/1] {11} - ¦ ¦--EQ_SUB: = [0/1] {12} - ¦ ¦--expr: "trai [0/0] {14} - ¦ ¦ °--STR_CONST: "trai [0/0] {13} - ¦ °--')': ) [0/0] {15} - ¦--',': , [0/2] {16} - ¦--SYMBOL_SUB: monot [1/4] {17} - ¦--EQ_SUB: = [0/1] {18} - ¦--expr: p_uty [0/0] {19} - ¦ ¦--expr: p_uty [0/0] {21} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: p_uty [0/0] {20} - ¦ ¦--'(': ( [0/0] {22} - ¦ ¦--SYMBOL_SUB: dfaul [0/1] {23} - ¦ ¦--EQ_SUB: = [0/1] {24} - ¦ ¦--expr: 0 [0/0] {26} - ¦ ¦ °--NUM_CONST: 0 [0/0] {25} - ¦ ¦--',': , [0/1] {27} - ¦ ¦--SYMBOL_SUB: tags [0/1] {28} - ¦ ¦--EQ_SUB: = [0/1] {29} - ¦ ¦--expr: c("tr [0/0] {30} - ¦ ¦ ¦--expr: c [0/0] {32} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {31} - ¦ ¦ ¦--'(': ( [0/0] {33} - ¦ ¦ ¦--expr: "trai [0/0] {35} - ¦ ¦ ¦ °--STR_CONST: "trai [0/0] {34} - ¦ ¦ ¦--',': , [0/1] {36} - ¦ ¦ ¦--expr: "cont [0/0] {38} - ¦ ¦ ¦ °--STR_CONST: "cont [0/0] {37} - ¦ ¦ °--')': ) [0/0] {39} - ¦ ¦--',': , [0/1] {40} - ¦ ¦--SYMBOL_SUB: custo [0/1] {41} - ¦ ¦--EQ_SUB: = [0/1] {42} - ¦ ¦--expr: funct [0/0] {43} - ¦ ¦ ¦--FUNCTION: funct [0/0] {44} - ¦ ¦ ¦--'(': ( [0/0] {45} - ¦ ¦ ¦--SYMBOL_FORMALS: x [0/0] {46} - ¦ ¦ ¦--')': ) [0/1] {47} - ¦ ¦ °--expr: { ch [0/0] {48} - ¦ ¦ ¦--'{': { [0/2] {49} - ¦ ¦ ¦--expr: check [0/1] {50} - ¦ ¦ ¦ ¦--expr: check [0/0] {51} - ¦ ¦ ¦ ¦ ¦--SYMBOL_PACKAGE: check [0/0] {52} - ¦ ¦ ¦ ¦ ¦--NS_GET: :: [0/0] {53} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: check [0/0] {54} - ¦ ¦ ¦ ¦--'(': ( [0/0] {55} - ¦ ¦ ¦ ¦--expr: x [0/0] {57} - ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {56} - ¦ ¦ ¦ ¦--',': , [0/1] {58} - ¦ ¦ ¦ ¦--SYMBOL_SUB: lower [0/1] {59} - ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {60} - ¦ ¦ ¦ ¦--expr: -1 [0/0] {61} - ¦ ¦ ¦ ¦ ¦--'-': - [0/0] {62} - ¦ ¦ ¦ ¦ °--expr: 1 [0/0] {64} - ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {63} - ¦ ¦ ¦ ¦--',': , [0/1] {65} - ¦ ¦ ¦ ¦--SYMBOL_SUB: upper [0/1] {66} - ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {67} - ¦ ¦ ¦ ¦--expr: 1 [0/0] {69} - ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {68} - ¦ ¦ ¦ ¦--',': , [0/1] {70} - ¦ ¦ ¦ ¦--SYMBOL_SUB: any.m [0/1] {71} - ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {72} - ¦ ¦ ¦ ¦--expr: FALSE [0/0] {74} - ¦ ¦ ¦ ¦ °--NUM_CONST: FALSE [0/0] {73} - ¦ ¦ ¦ °--')': ) [0/0] {75} - ¦ ¦ °--'}': } [0/0] {76} - ¦ °--')': ) [0/0] {77} - ¦--',': , [0/1] {78} - ¦--COMMENT: # sty [0/2] {79} - ¦--SYMBOL_SUB: norma [1/10] {80} - ¦--EQ_SUB: = [0/1] {81} - ¦--expr: p_fct [0/0] {82} - ¦ ¦--expr: p_fct [0/0] {84} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: p_fct [0/0] {83} - ¦ ¦--'(': ( [0/0] {85} - ¦ ¦--expr: c("te [0/0] {86} - ¦ ¦ ¦--expr: c [0/0] {88} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {87} - ¦ ¦ ¦--'(': ( [0/0] {89} - ¦ ¦ ¦--expr: "tee" [0/0] {91} - ¦ ¦ ¦ °--STR_CONST: "tee" [0/0] {90} - ¦ ¦ ¦--',': , [0/1] {92} - ¦ ¦ ¦--expr: "fore [0/0] {94} - ¦ ¦ ¦ °--STR_CONST: "fore [0/0] {93} - ¦ ¦ °--')': ) [0/0] {95} - ¦ ¦--',': , [0/1] {96} - ¦ ¦--SYMBOL_SUB: defau [0/1] {97} - ¦ ¦--EQ_SUB: = [0/1] {98} - ¦ ¦--expr: "tree [0/0] {100} - ¦ ¦ °--STR_CONST: "tree [0/0] {99} - ¦ ¦--',': , [0/1] {101} - ¦ ¦--SYMBOL_SUB: tags [0/1] {102} - ¦ ¦--EQ_SUB: = [0/1] {103} - ¦ ¦--expr: "trai [0/0] {105} - ¦ ¦ °--STR_CONST: "trai [0/0] {104} - ¦ °--')': ) [0/0] {106} - ¦--',': , [0/0] {107} - °--')': ) [1/0] {108} diff --git a/tests/testthat/stylerignore/braces-in_tree b/tests/testthat/stylerignore/braces-in_tree deleted file mode 100644 index a24768ff6..000000000 --- a/tests/testthat/stylerignore/braces-in_tree +++ /dev/null @@ -1,81 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: x<- f [0/1] {1} - ¦ ¦--expr: x [0/0] {3} - ¦ ¦ °--SYMBOL: x [0/0] {2} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {4} - ¦ °--expr: funct [0/0] {5} - ¦ ¦--FUNCTION: funct [0/0] {6} - ¦ ¦--'(': ( [0/0] {7} - ¦ ¦--')': ) [0/0] {8} - ¦ °--expr: 3 [1/0] {10} - ¦ °--NUM_CONST: 3 [0/0] {9} - ¦--COMMENT: # sty [0/0] {11} - ¦--expr: x<- f [2/0] {12} - ¦ ¦--expr: x [0/0] {14} - ¦ ¦ °--SYMBOL: x [0/0] {13} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {15} - ¦ °--expr: funct [0/0] {16} - ¦ ¦--FUNCTION: funct [0/0] {17} - ¦ ¦--'(': ( [0/0] {18} - ¦ ¦--')': ) [0/1] {19} - ¦ ¦--COMMENT: # sty [0/2] {20} - ¦ °--expr: 3 [1/0] {22} - ¦ °--NUM_CONST: 3 [0/0] {21} - ¦--expr: if (x [3/0] {23} - ¦ ¦--IF: if [0/1] {24} - ¦ ¦--'(': ( [0/0] {25} - ¦ ¦--expr: x [0/0] {27} - ¦ ¦ °--SYMBOL: x [0/0] {26} - ¦ ¦--')': ) [0/1] {28} - ¦ ¦--COMMENT: # sty [0/2] {29} - ¦ ¦--expr: 3 [1/1] {31} - ¦ ¦ °--NUM_CONST: 3 [0/0] {30} - ¦ ¦--ELSE: else [0/2] {32} - ¦ °--expr: 4 [1/0] {34} - ¦ °--NUM_CONST: 4 [0/0] {33} - ¦--expr: if (x [2/0] {35} - ¦ ¦--IF: if [0/1] {36} - ¦ ¦--'(': ( [0/0] {37} - ¦ ¦--expr: x [0/0] {39} - ¦ ¦ °--SYMBOL: x [0/0] {38} - ¦ ¦--')': ) [0/1] {40} - ¦ ¦--expr: { - 3 [0/1] {41} - ¦ ¦ ¦--'{': { [0/2] {42} - ¦ ¦ ¦--expr: 3 [1/0] {44} - ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {43} - ¦ ¦ °--'}': } [1/0] {45} - ¦ ¦--ELSE: else [0/2] {46} - ¦ ¦--COMMENT: # sty [0/2] {47} - ¦ °--expr: 4 [1/0] {49} - ¦ °--NUM_CONST: 4 [0/0] {48} - ¦--expr: if (x [2/1] {50} - ¦ ¦--IF: if [0/1] {51} - ¦ ¦--'(': ( [0/0] {52} - ¦ ¦--expr: x [0/0] {54} - ¦ ¦ °--SYMBOL: x [0/0] {53} - ¦ ¦--')': ) [0/2] {55} - ¦ ¦--expr: 3 [1/1] {57} - ¦ ¦ °--NUM_CONST: 3 [0/0] {56} - ¦ ¦--ELSE: else [0/1] {58} - ¦ °--expr: 4 [0/0] {60} - ¦ °--NUM_CONST: 4 [0/0] {59} - ¦--COMMENT: # sty [0/0] {61} - ¦--expr: while [2/0] {62} - ¦ ¦--WHILE: while [0/1] {63} - ¦ ¦--'(': ( [0/0] {64} - ¦ ¦--expr: x [0/0] {66} - ¦ ¦ °--SYMBOL: x [0/0] {65} - ¦ ¦--')': ) [0/1] {67} - ¦ ¦--COMMENT: # sty [0/2] {68} - ¦ °--expr: "x" [1/0] {70} - ¦ °--STR_CONST: "x" [0/0] {69} - ¦--expr: while [3/0] {71} - ¦ ¦--WHILE: while [0/1] {72} - ¦ ¦--'(': ( [0/0] {73} - ¦ ¦--expr: x [0/0] {75} - ¦ ¦ °--SYMBOL: x [0/0] {74} - ¦ ¦--')': ) [0/2] {76} - ¦ °--expr: "x" [1/0] {78} - ¦ °--STR_CONST: "x" [0/0] {77} - °--COMMENT: # sty [0/0] {79} diff --git a/tests/testthat/stylerignore/crossing-with-expressions-in_tree b/tests/testthat/stylerignore/crossing-with-expressions-in_tree deleted file mode 100644 index d1e859747..000000000 --- a/tests/testthat/stylerignore/crossing-with-expressions-in_tree +++ /dev/null @@ -1,91 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: call( [0/0] {1} - ¦ ¦--expr: call [0/0] {3} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {2} - ¦ ¦--'(': ( [0/2] {4} - ¦ ¦--COMMENT: # sty [1/2] {5} - ¦ ¦--expr: 1+ 1 [1/0] {6} - ¦ ¦ ¦--expr: 1 [0/0] {8} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {7} - ¦ ¦ ¦--'+': + [0/1] {9} - ¦ ¦ °--expr: 1 [0/0] {11} - ¦ ¦ °--NUM_CONST: 1 [0/0] {10} - ¦ ¦--',': , [0/1] {12} - ¦ ¦--expr: test_ [0/0] {13} - ¦ ¦ ¦--expr: test_ [0/0] {15} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: test_ [0/0] {14} - ¦ ¦ ¦--'(': ( [0/0] {16} - ¦ ¦ ¦--expr: "hier [0/0] {18} - ¦ ¦ ¦ °--STR_CONST: "hier [0/0] {17} - ¦ ¦ ¦--',': , [0/1] {19} - ¦ ¦ ¦--SYMBOL_SUB: na.rm [0/1] {20} - ¦ ¦ ¦--EQ_SUB: = [0/1] {21} - ¦ ¦ ¦--expr: 3 [0/1] {23} - ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {22} - ¦ ¦ ¦--',': , [0/0] {24} - ¦ ¦ ¦--SYMBOL_SUB: py [0/1] {25} - ¦ ¦ ¦--EQ_SUB: = [0/1] {26} - ¦ ¦ ¦--expr: 43 [0/2] {28} - ¦ ¦ ¦ °--NUM_CONST: 43 [0/0] {27} - ¦ ¦ °--')': ) [1/0] {29} - ¦ °--')': ) [1/0] {30} - ¦--COMMENT: # als [2/0] {31} - ¦--expr: test_ [1/0] {32} - ¦ ¦--expr: test_ [0/0] {34} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: test_ [0/0] {33} - ¦ ¦--'(': ( [0/0] {35} - ¦ ¦--expr: "hier [0/0] {37} - ¦ ¦ °--STR_CONST: "hier [0/0] {36} - ¦ ¦--',': , [0/1] {38} - ¦ ¦--SYMBOL_SUB: na.rm [0/1] {39} - ¦ ¦--EQ_SUB: = [0/1] {40} - ¦ ¦--expr: 3 [0/0] {42} - ¦ ¦ °--NUM_CONST: 3 [0/0] {41} - ¦ ¦--',': , [0/1] {43} - ¦ ¦--SYMBOL_SUB: py [0/1] {44} - ¦ ¦--EQ_SUB: = [0/1] {45} - ¦ ¦--expr: 43 [0/9] {47} - ¦ ¦ °--NUM_CONST: 43 [0/0] {46} - ¦ °--')': ) [1/0] {48} - ¦--expr_or_assign_or_help: x="ne [3/1] {49} - ¦ ¦--expr: x [0/0] {51} - ¦ ¦ °--SYMBOL: x [0/0] {50} - ¦ ¦--EQ_ASSIGN: = [0/0] {52} - ¦ °--expr: "new" [0/0] {54} - ¦ °--STR_CONST: "new" [0/0] {53} - ¦--COMMENT: # sty [0/0] {55} - ¦--expr_or_assign_or_help: y=1 [1/1] {56} - ¦ ¦--expr: y [0/0] {58} - ¦ ¦ °--SYMBOL: y [0/0] {57} - ¦ ¦--EQ_ASSIGN: = [0/0] {59} - ¦ °--expr: 1 [0/0] {61} - ¦ °--NUM_CONST: 1 [0/0] {60} - ¦--COMMENT: # non [0/0] {62} - ¦--expr: more_ [2/0] {63} - ¦ ¦--expr: more_ [0/0] {65} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: more_ [0/0] {64} - ¦ ¦--'(': ( [0/2] {66} - ¦ ¦--COMMENT: # sty [1/2] {67} - ¦ ¦--expr: with( [1/0] {68} - ¦ ¦ ¦--expr: with [0/0] {70} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: with [0/0] {69} - ¦ ¦ ¦--'(': ( [0/4] {71} - ¦ ¦ ¦--expr: argum [1/0] {73} - ¦ ¦ ¦ °--SYMBOL: argum [0/0] {72} - ¦ ¦ °--')': ) [0/0] {74} - ¦ °--')': ) [0/0] {75} - ¦--expr: 1 + 1 [1/0] {76} - ¦ ¦--expr: 1 [0/1] {78} - ¦ ¦ °--NUM_CONST: 1 [0/0] {77} - ¦ ¦--'+': + [0/1] {79} - ¦ °--expr: 1 [0/0] {81} - ¦ °--NUM_CONST: 1 [0/0] {80} - °--expr: a(!b) [1/0] {82} - ¦--expr: a [0/0] {84} - ¦ °--SYMBOL_FUNCTION_CALL: a [0/0] {83} - ¦--'(': ( [0/0] {85} - ¦--expr: !b [0/0] {86} - ¦ ¦--'!': ! [0/0] {87} - ¦ °--expr: b [0/0] {89} - ¦ °--SYMBOL: b [0/0] {88} - °--')': ) [0/0] {90} diff --git a/tests/testthat/stylerignore/simple-in_tree b/tests/testthat/stylerignore/simple-in_tree deleted file mode 100644 index be7eeea9e..000000000 --- a/tests/testthat/stylerignore/simple-in_tree +++ /dev/null @@ -1,113 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: call( [0/1] {1} - ¦ ¦--expr: call [0/0] {3} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {2} - ¦ ¦--'(': ( [0/0] {4} - ¦ ¦--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: test_ [1/0] {11} - ¦ ¦--expr: test_ [0/0] {13} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: test_ [0/0] {12} - ¦ ¦--'(': ( [0/0] {14} - ¦ ¦--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: 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: 43 [0/9] {26} - ¦ ¦ °--NUM_CONST: 43 [0/0] {25} - ¦ °--')': ) [1/0] {27} - ¦--expr_or_assign_or_help: x="ne [3/1] {28} - ¦ ¦--expr: x [0/0] {30} - ¦ ¦ °--SYMBOL: x [0/0] {29} - ¦ ¦--EQ_ASSIGN: = [0/0] {31} - ¦ °--expr: "new" [0/0] {33} - ¦ °--STR_CONST: "new" [0/0] {32} - ¦--COMMENT: # sty [0/0] {34} - ¦--expr_or_assign_or_help: y=1 [1/1] {35} - ¦ ¦--expr: y [0/0] {37} - ¦ ¦ °--SYMBOL: y [0/0] {36} - ¦ ¦--EQ_ASSIGN: = [0/0] {38} - ¦ °--expr: 1 [0/0] {40} - ¦ °--NUM_CONST: 1 [0/0] {39} - ¦--COMMENT: # non [0/0] {41} - ¦--expr: more_ [2/0] {42} - ¦ ¦--expr: more_ [0/0] {44} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: more_ [0/0] {43} - ¦ ¦--'(': ( [0/0] {45} - ¦ ¦--expr: with( [0/0] {46} - ¦ ¦ ¦--expr: with [0/0] {48} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: with [0/0] {47} - ¦ ¦ ¦--'(': ( [0/0] {49} - ¦ ¦ ¦--expr: argum [0/0] {51} - ¦ ¦ ¦ °--SYMBOL: argum [0/0] {50} - ¦ ¦ °--')': ) [0/0] {52} - ¦ °--')': ) [0/0] {53} - ¦--COMMENT: # sty [1/0] {54} - ¦--expr: 1 + 1 [1/0] {55} - ¦ ¦--expr: 1 [0/1] {57} - ¦ ¦ °--NUM_CONST: 1 [0/0] {56} - ¦ ¦--'+': + [0/1] {58} - ¦ °--expr: 1 [0/0] {60} - ¦ °--NUM_CONST: 1 [0/0] {59} - ¦--expr: a(!b) [1/0] {61} - ¦ ¦--expr: a [0/0] {63} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: a [0/0] {62} - ¦ ¦--'(': ( [0/0] {64} - ¦ ¦--expr: !b [0/0] {65} - ¦ ¦ ¦--'!': ! [0/0] {66} - ¦ ¦ °--expr: b [0/0] {68} - ¦ ¦ °--SYMBOL: b [0/0] {67} - ¦ °--')': ) [0/0] {69} - ¦--COMMENT: # --- [3/0] {70} - ¦--expr_or_assign_or_help: x="ne [1/1] {71} - ¦ ¦--expr: x [0/0] {73} - ¦ ¦ °--SYMBOL: x [0/0] {72} - ¦ ¦--EQ_ASSIGN: = [0/0] {74} - ¦ °--expr: "new" [0/0] {76} - ¦ °--STR_CONST: "new" [0/0] {75} - ¦--COMMENT: # sty [0/0] {77} - ¦--expr_or_assign_or_help: y=1 [1/1] {78} - ¦ ¦--expr: y [0/0] {80} - ¦ ¦ °--SYMBOL: y [0/0] {79} - ¦ ¦--EQ_ASSIGN: = [0/0] {81} - ¦ °--expr: 1 [0/0] {83} - ¦ °--NUM_CONST: 1 [0/0] {82} - ¦--COMMENT: # non [0/0] {84} - ¦--expr: more_ [2/0] {85} - ¦ ¦--expr: more_ [0/0] {87} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: more_ [0/0] {86} - ¦ ¦--'(': ( [0/0] {88} - ¦ ¦--expr: with( [0/0] {89} - ¦ ¦ ¦--expr: with [0/0] {91} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: with [0/0] {90} - ¦ ¦ ¦--'(': ( [0/0] {92} - ¦ ¦ ¦--expr: argum [0/0] {94} - ¦ ¦ ¦ °--SYMBOL: argum [0/0] {93} - ¦ ¦ °--')': ) [0/0] {95} - ¦ °--')': ) [0/0] {96} - ¦--COMMENT: # sty [1/0] {97} - ¦--expr: 1 + 1 [1/0] {98} - ¦ ¦--expr: 1 [0/1] {100} - ¦ ¦ °--NUM_CONST: 1 [0/0] {99} - ¦ ¦--'+': + [0/1] {101} - ¦ °--expr: 1 [0/0] {103} - ¦ °--NUM_CONST: 1 [0/0] {102} - °--expr: a(!b) [1/0] {104} - ¦--expr: a [0/0] {106} - ¦ °--SYMBOL_FUNCTION_CALL: a [0/0] {105} - ¦--'(': ( [0/0] {107} - ¦--expr: !b [0/0] {108} - ¦ ¦--'!': ! [0/0] {109} - ¦ °--expr: b [0/0] {111} - ¦ °--SYMBOL: b [0/0] {110} - °--')': ) [0/0] {112} diff --git a/tests/testthat/test-cache-low-level-api.R b/tests/testthat/test-cache-low-level-api.R index 0c9ed6acd..f4b4694ea 100644 --- a/tests/testthat/test-cache-low-level-api.R +++ b/tests/testthat/test-cache-low-level-api.R @@ -1,16 +1,16 @@ 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) %>% + base::transform(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) %>% + base::transform(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)) %>% + base::transform(is_cached = c(TRUE, TRUE, FALSE, FALSE)) %>% cache_find_block() expect_equal(blocks_edge, c(1, 2, 2, 2)) }) @@ -30,7 +30,7 @@ test_that("caching utils make right blocks with comments", { blocks_simple_uncached <- compute_parse_data_nested(text) %>% - dplyr::mutate(is_cached = c( + base::transform(is_cached = c( FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, FALSE, FALSE, FALSE )) %>% @@ -48,7 +48,7 @@ test_that("caching utils make right blocks with comments", { tau1 = 1 # here? " blocks_simple_cached <- compute_parse_data_nested(text) %>% - dplyr::mutate(is_cached = c( + base::transform(is_cached = c( FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE )) %>% cache_find_block() @@ -101,17 +101,17 @@ test_that("blank lines are correctly identified", { 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) %>% + base::transform(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) %>% + base::transform(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)) %>% + base::transform(is_cached = c(TRUE, TRUE, FALSE)) %>% cache_find_block() expect_equal(blocks_edge, c(1, 2, 2)) }) diff --git a/tests/testthat/test-create_token.R b/tests/testthat/test-create_token.R index c00892808..bf99b6dcb 100644 --- a/tests/testthat/test-create_token.R +++ b/tests/testthat/test-create_token.R @@ -1,5 +1,3 @@ - - test_that("can create a token that has relevant columns", { pd_names <- c( "token", "text", "short", "lag_newlines", "newlines", "pos_id", diff --git a/tests/testthat/test-create_tree.R b/tests/testthat/test-create_tree.R index c8bcfb319..e6ab27068 100644 --- a/tests/testthat/test-create_tree.R +++ b/tests/testthat/test-create_tree.R @@ -1,5 +1,3 @@ - - test_that("create_trees outputs identical structure if trees have same structure", { skip_if_not_installed("DiagrammeR") skip_if_not_installed("data.tree") diff --git a/tests/testthat/test-curly-curly.R b/tests/testthat/test-curly-curly.R index d61299e75..48fcc64d1 100644 --- a/tests/testthat/test-curly-curly.R +++ b/tests/testthat/test-curly-curly.R @@ -1,8 +1,6 @@ - - test_that("curly-culry", { - expect_warning(test_collection("curly-curly", + expect_no_warning(test_collection("curly-curly", "mixed", transformer = style_text - ), NA) + )) }) diff --git a/tests/testthat/test-detect-alignment.R b/tests/testthat/test-detect-alignment.R index e0db9a93f..f28ae6b28 100644 --- a/tests/testthat/test-detect-alignment.R +++ b/tests/testthat/test-detect-alignment.R @@ -1,8 +1,8 @@ test_that("does apply spacing rules only if not aligned", { - expect_warning(test_collection("alignment", + expect_no_warning(test_collection("alignment", transformer = style_text - ), NA) + )) text <- "tribble(\n ~x, ~y,\n 11, list(a = 1),\n 2, list(bjj = 2)\n)" - expect_warning(style_text(text), NA) + expect_no_warning(style_text(text)) }) diff --git a/tests/testthat/test-escaping.R b/tests/testthat/test-escaping.R index f9a5c7864..18bc2cebe 100644 --- a/tests/testthat/test-escaping.R +++ b/tests/testthat/test-escaping.R @@ -1,7 +1,7 @@ test_that("escaping of characters works", { - expect_warning(test_collection("escaping", "basic", + expect_no_warning(test_collection("escaping", "basic", transformer = style_text - ), NA) + )) expect_error(test_collection("escaping", "fail-parsing-1", transformer = style_text diff --git a/tests/testthat/test-exception_handling.R b/tests/testthat/test-exception_handling.R index 74afef5e8..7bf1b9f1d 100644 --- a/tests/testthat/test-exception_handling.R +++ b/tests/testthat/test-exception_handling.R @@ -1,5 +1,3 @@ - - test_that("style_text returns custom error", { expect_error(style_text("a <- 3 4"), "unexpected numeric constant") }) diff --git a/tests/testthat/test-fun_dec.R b/tests/testthat/test-fun_dec.R index be01c4af6..c2a5b69d9 100644 --- a/tests/testthat/test-fun_dec.R +++ b/tests/testthat/test-fun_dec.R @@ -1,9 +1,9 @@ test_that("reindent function declaration", { - expect_warning(test_collection("fun_dec", "fun_dec_scope_spaces", + expect_no_warning(test_collection("fun_dec", "fun_dec_scope_spaces", transformer = style_text, scope = "spaces" - ), NA) + )) - expect_warning(test_collection("fun_dec", "line_break_fun_dec", + expect_no_warning(test_collection("fun_dec", "line_break_fun_dec", transformer = style_text - ), NA) + )) }) diff --git a/tests/testthat/test-helpers.R b/tests/testthat/test-helpers.R index c5f3a5619..acded0ce0 100644 --- a/tests/testthat/test-helpers.R +++ b/tests/testthat/test-helpers.R @@ -1,5 +1,3 @@ - - test_that("can construct and print vertical", { skip_if_not_installed("prettycode") expect_snapshot({ @@ -17,8 +15,3 @@ test_that("can lookup tokens", { lookup_new_special() }) }) - -test_that("can extend non-comment", { - pd <- compute_parse_data_nested(c("if (TRUE) # \n call(34)")) - expect_equal(extend_if_comment(pd$child[[1]], 4), 5) -}) diff --git a/tests/testthat/test-identify-roxygen-examples.R b/tests/testthat/test-identify-roxygen-examples.R index 8eee143e2..0b89c6fde 100644 --- a/tests/testthat/test-identify-roxygen-examples.R +++ b/tests/testthat/test-identify-roxygen-examples.R @@ -1,5 +1,3 @@ - - #' Things to consider: #' * one function declaration or many #' * example(s) is last tag or not? diff --git a/tests/testthat/test-indention_curly.R b/tests/testthat/test-indention_curly.R index 5064dcb4d..54b7821a9 100644 --- a/tests/testthat/test-indention_curly.R +++ b/tests/testthat/test-indention_curly.R @@ -1,32 +1,30 @@ - - test_that("indention on one-liner curley only is not changed", { - expect_warning(test_collection("indention_curly_brackets", + expect_no_warning(test_collection("indention_curly_brackets", "one_line_curly", transformer = style_text - ), NA) + )) }) test_that("indention with multi-line curley only is correct", { - expect_warning(test_collection("indention_curly_brackets", + expect_no_warning(test_collection("indention_curly_brackets", "multi_line_curly_only", transformer = style_text_without_curly_curly - ), NA) + )) }) test_that("indention with multi-line curley and round is correct", { - expect_warning(test_collection("indention_curly_brackets", + expect_no_warning(test_collection("indention_curly_brackets", "multi_line_curly_round_only", transformer = style_text - ), NA) + )) }) test_that("custom indention for curly braces is corretct ", { - expect_warning(test_collection("indention_curly_brackets", + expect_no_warning(test_collection("indention_curly_brackets", "custom", transformer = style_text, indent_by = 4 - ), NA) + )) }) @@ -35,13 +33,13 @@ test_that(paste( "complete styling via top-level api is correct", "(round, curly, spacing)" ), { - expect_warning(test_collection("indention_curly_brackets", + expect_no_warning(test_collection("indention_curly_brackets", "multi_line_curly_round_spacing", transformer = style_text - ), NA) + )) - expect_warning(test_collection("indention_curly_brackets", + expect_no_warning(test_collection("indention_curly_brackets", "multi_line_curly_while_for_if_fun", transformer = style_text - ), NA) + )) }) diff --git a/tests/testthat/test-indention_fun_calls.R b/tests/testthat/test-indention_fun_calls.R index f44c037b8..643d5ef9e 100644 --- a/tests/testthat/test-indention_fun_calls.R +++ b/tests/testthat/test-indention_fun_calls.R @@ -1,7 +1,5 @@ - - test_that("edge cases work", { - expect_warning(test_collection("indention_fun_calls", + expect_no_warning(test_collection("indention_fun_calls", transformer = style_text, strict = FALSE - ), NA) + )) }) diff --git a/tests/testthat/test-indention_multiple.R b/tests/testthat/test-indention_multiple.R index a99634f3d..aa1523bba 100644 --- a/tests/testthat/test-indention_multiple.R +++ b/tests/testthat/test-indention_multiple.R @@ -1,59 +1,57 @@ - - test_that("multiple round brackets don't cause extraindention", { - expect_warning(test_collection("indention_multiple", + expect_no_warning(test_collection("indention_multiple", "round_only", transformer = style_text - ), NA) + )) - expect_warning(test_collection("indention_multiple", + expect_no_warning(test_collection("indention_multiple", "round_closing_on_same_line", transformer = style_text - ), NA) + )) }) test_that("multiple curly brackets don't cause extraindention", { - expect_warning(test_collection("indention_multiple", + expect_no_warning(test_collection("indention_multiple", "curly_only", transformer = style_text_without_curly_curly - ), NA) + )) }) test_that("multiple curly and round brackets don't cause extraindention", { - expect_warning(test_collection("indention_multiple", + expect_no_warning(test_collection("indention_multiple", "curly_and_round", transformer = style_text_without_curly_curly - ), NA) + )) }) test_that("multiple curly and round brackets overall test", { - expect_warning(test_collection("indention_multiple", + expect_no_warning(test_collection("indention_multiple", "overall", transformer = style_text - ), NA) + )) }) test_that("if and ifelse interacting with curly braces works", { - expect_warning(test_collection("indention_multiple", + expect_no_warning(test_collection("indention_multiple", "if_else_curly", transformer = style_text, strict = FALSE - ), NA) + )) }) test_that("edge cases work", { - expect_warning(test_collection("indention_multiple", + expect_no_warning(test_collection("indention_multiple", "edge_strict", transformer = style_text_without_curly_curly - ), NA) + )) }) test_that("token / braces interaction works", { - expect_warning(test_collection("indention_multiple", + expect_no_warning(test_collection("indention_multiple", "fun_for_new_line", transformer = style_text_without_curly_curly - ), NA) + )) }) diff --git a/tests/testthat/test-indention_operators.R b/tests/testthat/test-indention_operators.R index 3e62f85f8..fc4971a23 100644 --- a/tests/testthat/test-indention_operators.R +++ b/tests/testthat/test-indention_operators.R @@ -1,157 +1,152 @@ - - test_that("pipe is indended correctly", { - expect_warning(test_collection("indention_operators", + expect_no_warning(test_collection("indention_operators", "pipe", transformer = style_text - ), NA) + )) }) test_that("base pipe is indended correctly", { skip_if(getRversion() < "4.1") - expect_warning(test_collection("indention_operators", + expect_no_warning(test_collection("indention_operators", "base_pipe", transformer = style_text - ), NA) + )) }) test_that("mathematical operators are indended correctly", { - expect_warning(test_collection("indention_operators", + expect_no_warning(test_collection("indention_operators", "plus_minus", transformer = style_op - ), NA) + )) - expect_warning(test_collection("indention_operators", + expect_no_warning(test_collection("indention_operators", "multiply_divide", transformer = style_op - ), NA) + )) }) test_that("while / for / if without curly brackets", { - expect_warning(test_collection("indention_operators", + expect_no_warning(test_collection("indention_operators", "while_for_if_without_curly_non_strict", transformer = style_text, strict = FALSE - ), NA) - expect_warning(test_collection("indention_operators", + )) + expect_no_warning(test_collection("indention_operators", "while_for_without_curly_same_line_non_strict", transformer = style_text, strict = FALSE - ), NA) + )) - expect_warning(test_collection("indention_operators", + expect_no_warning(test_collection("indention_operators", "if-else-no-braces-not-strict", transformer = style_text, strict = FALSE - ), NA) + )) }) test_that("function multiline without curly brackets", { - expect_warning(test_collection("indention_operators", + expect_no_warning(test_collection("indention_operators", "function-multiline-no-braces-strict", transformer = style_text, strict = TRUE - ), NA) - expect_warning(test_collection("indention_operators", + )) + expect_no_warning(test_collection("indention_operators", "function-multiline-no-braces-non-strict", transformer = style_text, strict = FALSE - ), NA) + )) }) test_that("while / for / if without curly brackets", { - expect_warning(test_collection("indention_operators", + expect_no_warning(test_collection("indention_operators", "while_for_if_without_curly_strict", transformer = style_text, strict = TRUE - ), NA) + )) }) test_that("nested for and indention", { - expect_warning( + expect_no_warning( test_collection("indention_operators", "nested-for-spacing-scope-indention", transformer = style_text, scope = "indention" - ), - NA + ) ) - expect_warning( + expect_no_warning( test_collection("indention_operators", "nested-for-spacing-scope-spaces", transformer = style_text, scope = "spaces" - ), - NA + ) ) }) test_that("logical, special EQ_SUB and EQ_ASSIGN tokens are indented correctly", { - expect_warning(test_collection("indention_operators", + expect_no_warning(test_collection("indention_operators", "logical_special", transformer = style_text, scope = "line_breaks" - ), NA) + )) - expect_warning(test_collection("indention_operators", + expect_no_warning(test_collection("indention_operators", "eq_assign", transformer = style_text - ), NA) - expect_warning(test_collection("indention_operators", + )) + expect_no_warning(test_collection("indention_operators", "eq_formal_simple", transformer = style_text - ), NA) + )) }) test_that("dollar is indented and spaced correctly", { - expect_warning(test_collection("indention_operators", + expect_no_warning(test_collection("indention_operators", "dollar", transformer = style_text - ), NA) + )) }) test_that( "code is indented correctly if not first pontial trigger causes indention", { - expect_warning( + expect_no_warning( test_collection( "indention_operators", "not_first_trigger", transformer = style_text - ), - NA + ) ) } ) test_that("indents eq_sub correctly with various levels of scope", { - expect_warning(test_collection("indention_operators", + expect_no_warning(test_collection("indention_operators", "eq_sub_complex_indention", transformer = style_text, scope = "indention" - ), NA) + )) - expect_warning(test_collection("indention_operators", + expect_no_warning(test_collection("indention_operators", "eq_sub_complex_tokens", transformer = style_text, scope = "tokens" - ), NA) + )) }) test_that("indents eq_formals correctly with various levels of scope", { - expect_warning(test_collection("indention_operators", + expect_no_warning(test_collection("indention_operators", "eq_formals_complex_indention", transformer = style_text, scope = "indention" - ), NA) + )) - expect_warning(test_collection("indention_operators", + expect_no_warning(test_collection("indention_operators", "eq_formals_complex_tokens", transformer = style_text, scope = "tokens" - ), NA) + )) }) test_that("tilde causes indention and is flattened out", { - expect_warning(test_collection("indention_operators", + expect_no_warning(test_collection("indention_operators", "tilde", transformer = style_text - ), NA) + )) }) test_that("overall", { - expect_warning(test_collection("indention_operators", + expect_no_warning(test_collection("indention_operators", "overall", transformer = style_text - ), NA) + )) }) diff --git a/tests/testthat/test-indention_round_brackets.R b/tests/testthat/test-indention_round_brackets.R index c0c6a9409..9257810f1 100644 --- a/tests/testthat/test-indention_round_brackets.R +++ b/tests/testthat/test-indention_round_brackets.R @@ -1,19 +1,17 @@ - - test_that("one-line function call yields correct indention", { - expect_warning(test_collection("indention_round_brackets", + expect_no_warning(test_collection("indention_round_brackets", "one_line", transformer = style_text - ), NA) + )) }) ## ............................................................................ test_that(paste("multi-line function call yields correct indention"), { - expect_warning(test_collection("indention_round_brackets", + expect_no_warning(test_collection("indention_round_brackets", "multi_line", transformer = style_text - ), NA) + )) }) ## ............................................................................ @@ -24,8 +22,8 @@ test_that(paste("multi-line function call yields correct indention"), { # Does NOT cover indention by operators such as +" test_that("arithmetic grouping with braces yields correctly indention", { - expect_warning(test_collection("indention_round_brackets", + expect_no_warning(test_collection("indention_round_brackets", "arithmetic", transformer = style_text - ), NA) + )) }) diff --git a/tests/testthat/test-insertion_comment_interaction.R b/tests/testthat/test-insertion_comment_interaction.R index 698b58d03..5a1c08c45 100644 --- a/tests/testthat/test-insertion_comment_interaction.R +++ b/tests/testthat/test-insertion_comment_interaction.R @@ -1,27 +1,25 @@ - - ## ............................................................................ ## strict = TRUE #### test_that("token are added correctly to conditional statements", { - expect_warning(test_collection( + expect_no_warning(test_collection( "insertion_comment_interaction", "just_if_strict", transformer = style_text - ), NA) + )) }) test_that("token are added correctly to conditional statements", { - expect_warning(test_collection( + expect_no_warning(test_collection( "insertion_comment_interaction", "if_else_strict", transformer = style_text - ), NA) + )) }) test_that("token are added correctly to conditional statements", { - expect_warning(test_collection( + expect_no_warning(test_collection( "insertion_comment_interaction", "if_else_if_else_strict", transformer = style_text - ), NA) + )) }) @@ -29,22 +27,22 @@ test_that("token are added correctly to conditional statements", { ## strict = FALSE #### test_that("token are added correctly to conditional statements", { - expect_warning(test_collection( + expect_no_warning(test_collection( "insertion_comment_interaction", "just_if_non_strict", transformer = style_text, strict = FALSE - ), NA) + )) }) test_that("token are added correctly to conditional statements", { - expect_warning(test_collection( + expect_no_warning(test_collection( "insertion_comment_interaction", "if_else_non_strict", transformer = style_text, strict = FALSE - ), NA) + )) }) test_that("token are added correctly to conditional statements", { - expect_warning(test_collection( + expect_no_warning(test_collection( "insertion_comment_interaction", "if_else_if_else_non_strict", transformer = style_text, strict = FALSE - ), NA) + )) }) diff --git a/tests/testthat/test-io.R b/tests/testthat/test-io.R index 6195fd52d..89fca4dff 100644 --- a/tests/testthat/test-io.R +++ b/tests/testthat/test-io.R @@ -6,8 +6,10 @@ test_that("non-ASCII characters are handled properly for text styling", { test_that("non-ASCII characters are handled properly for file styling", { - skip_if(.Platform$OS.type != "windows") - + # to avoid warnings + # on unix: 'OS reports request to set locale to "English_United States.1252" cannot be honored' + # on win: 'using locale code page other than 65001 ("UTF-8") may cause problems' + withr::local_options(list(warn = -1L)) withr::with_locale( c(LC_CTYPE = "English_United States.1252"), { diff --git a/tests/testthat/test-line_breaks_and_other.R b/tests/testthat/test-line_breaks_and_other.R index 7568ac71f..da893dc30 100644 --- a/tests/testthat/test-line_breaks_and_other.R +++ b/tests/testthat/test-line_breaks_and_other.R @@ -1,76 +1,74 @@ - - test_that("line breaks involing curly brackets", { - expect_warning(test_collection("line_breaks_and_other", "curly", + expect_no_warning(test_collection("line_breaks_and_other", "curly", transformer = style_text - ), NA) + )) }) test_that("line breaks involing curly brackets", { - expect_warning(test_collection("line_breaks_and_other", "braces-fun-calls", + expect_no_warning(test_collection("line_breaks_and_other", "braces-fun-calls", transformer = style_text - ), NA) + )) }) test_that("line breaks involing curly brackets", { - expect_warning(test_collection("line_breaks_and_other", "edge_comment_and_curly", + expect_no_warning(test_collection("line_breaks_and_other", "edge_comment_and_curly", transformer = style_text - ), NA) + )) }) test_that("adding and removing line breaks", { - expect_warning(test_collection("line_breaks_and_other", "if", + expect_no_warning(test_collection("line_breaks_and_other", "if", transformer = style_text - ), NA) + )) }) test_that("no line break after %>% if next token is comment", { - expect_warning(test_collection("line_breaks_and_other", "pipe_and", + expect_no_warning(test_collection("line_breaks_and_other", "pipe_and", transformer = style_text - ), NA) + )) }) test_that("line break before comma is removed and placed after comma ", { - expect_warning(test_collection("line_breaks_and_other", "comma", + expect_no_warning(test_collection("line_breaks_and_other", "comma", transformer = style_text - ), NA) + )) }) test_that("line break before comma is removed and placed after comma ", { - expect_warning(test_collection("line_breaks_and_other", "pipe-line", + expect_no_warning(test_collection("line_breaks_and_other", "pipe-line", transformer = style_text - ), NA) + )) }) test_that("Can handle base R pie", { skip_if(getRversion() < "4.1") - expect_warning(test_collection("line_breaks_and_other", "base-pipe-line", + expect_no_warning(test_collection("line_breaks_and_other", "base-pipe-line", transformer = style_text - ), NA) + )) }) test_that("line break added for ggplot2 call", { - expect_warning(test_collection("line_breaks_and_other", "ggplot2", + expect_no_warning(test_collection("line_breaks_and_other", "ggplot2", transformer = style_text - ), NA) + )) }) test_that("drop redundant line breaks in assignments", { - expect_warning(test_collection("line_breaks_and_other", "assignment", + expect_no_warning(test_collection("line_breaks_and_other", "assignment", transformer = style_text, scope = I(c("line_breaks", "tokens")) - ), NA) + )) }) test_that("line is correctly broken around = ", { - expect_warning(test_collection("line_breaks_and_other", "around-eq-sub", + expect_no_warning(test_collection("line_breaks_and_other", "around-eq-sub", transformer = style_text - ), NA) + )) }) test_that("comments are not moved down after {", { - expect_warning(test_collection("line_breaks_and_other", "comment-around-curly", + expect_no_warning(test_collection("line_breaks_and_other", "comment-around-curly", transformer = style_text - ), NA) + )) }) diff --git a/tests/testthat/test-line_breaks_fun_call.R b/tests/testthat/test-line_breaks_fun_call.R index 939a95d1b..dd588388b 100644 --- a/tests/testthat/test-line_breaks_fun_call.R +++ b/tests/testthat/test-line_breaks_fun_call.R @@ -1,64 +1,63 @@ - test_that("line breaks work in general", { - expect_warning(test_collection("line_breaks_fun_call", + expect_no_warning(test_collection("line_breaks_fun_call", "token_dependent_mixed", transformer = style_text - ), NA) + )) - expect_warning(test_collection("line_breaks_fun_call", + expect_no_warning(test_collection("line_breaks_fun_call", "token_dependent_complex_strict", transformer = style_text - ), NA) + )) }) test_that("blank lines in function calls are removed for strict = TRUE", { - expect_warning(test_collection("line_breaks_fun_call", + expect_no_warning(test_collection("line_breaks_fun_call", "blank-strict", transformer = style_text - ), NA) + )) - expect_warning(test_collection("line_breaks_fun_call", + expect_no_warning(test_collection("line_breaks_fun_call", "blank-non-strict", transformer = style_text, strict = FALSE - ), NA) + )) }) test_that("line breaks are not applied with non-strict", { - expect_warning(test_collection("line_breaks_fun_call", + expect_no_warning(test_collection("line_breaks_fun_call", "token_dependent_complex_non_strict", transformer = style_text, strict = FALSE - ), NA) + )) }) test_that("line breaks work with comments", { - expect_warning(test_collection("line_breaks_fun_call", + expect_no_warning(test_collection("line_breaks_fun_call", "token_dependent_comments", transformer = style_text - ), NA) - expect_warning(test_collection("line_breaks_fun_call", + )) + expect_no_warning(test_collection("line_breaks_fun_call", "line_breaks_and_comments", transformer = style_text - ), NA) + )) }) test_that("line breaks work with exceptions", { - expect_warning(test_collection("line_breaks_fun_call", + expect_no_warning(test_collection("line_breaks_fun_call", "switch_ifelse", transformer = style_text - ), NA) + )) }) test_that("line breaks work with exceptions", { - expect_warning(test_collection("line_breaks_fun_call", + expect_no_warning(test_collection("line_breaks_fun_call", "named_arguments", transformer = style_text - ), NA) + )) }) test_that("line breaks work with exceptions", { - expect_warning(test_collection("line_breaks_fun_call", + expect_no_warning(test_collection("line_breaks_fun_call", "unindent", transformer = style_text - ), NA) + )) }) diff --git a/tests/testthat/test-line_breaks_top_level_exprs.R b/tests/testthat/test-line_breaks_top_level_exprs.R new file mode 100644 index 000000000..643385954 --- /dev/null +++ b/tests/testthat/test-line_breaks_top_level_exprs.R @@ -0,0 +1,29 @@ +test_that("extra line breaks between conditional statements are removed", { + expect_no_warning( + test_collection("line_breaks_top_level_exprs", "conditionals", transformer = style_text) + ) +}) + +test_that("extra line breaks between function and definitions and calls are removed", { + expect_no_warning( + test_collection("line_breaks_top_level_exprs", "function_defs_and_calls", transformer = style_text) + ) +}) + +test_that("extra line breaks between piped chains are removed", { + expect_no_warning( + test_collection("line_breaks_top_level_exprs", "piped_chains", transformer = style_text) + ) +}) + +test_that("extra line breaks between braced expressions are removed", { + expect_no_warning( + test_collection("line_breaks_top_level_exprs", "braces", transformer = style_text) + ) +}) + +test_that("extra line breaks are not removed in non-strict mode", { + expect_no_warning( + test_collection("line_breaks_top_level_exprs", "non_strict", transformer = style_text, strict = FALSE) + ) +}) diff --git a/tests/testthat/test-math_token_spacing.R b/tests/testthat/test-math_token_spacing.R index 9b1aa9009..4e0c94574 100644 --- a/tests/testthat/test-math_token_spacing.R +++ b/tests/testthat/test-math_token_spacing.R @@ -1,5 +1,3 @@ - - test_that("invalid tokens return error", { expect_error(test_collection( "math_token_spacing", "non_strict_math_spacing_all", @@ -12,39 +10,39 @@ test_that("invalid tokens return error", { }) test_that("non-strict default: spacing around all", { - expect_warning(test_collection( + expect_no_warning(test_collection( "math_token_spacing", "non_strict_math_spacing_all", transformer = style_text, style = tidyverse_style, scope = "spaces", math_token_spacing = specify_math_token_spacing(), strict = FALSE - ), NA) + )) }) test_that("strict default: spacing around all", { - expect_warning(test_collection( + expect_no_warning(test_collection( "math_token_spacing", "strict_math_spacing_all", transformer = style_text, style = tidyverse_style, scope = "spaces", math_token_spacing = tidyverse_math_token_spacing(), strict = TRUE - ), NA) + )) }) test_that("strict no space around +", { - expect_warning(test_collection( + expect_no_warning(test_collection( "math_token_spacing", "strict_math_spacing_zero_plus", transformer = style_text, style = tidyverse_style, scope = "spaces", math_token_spacing = specify_math_token_spacing(zero = "'+'") - ), NA) + )) }) test_that("strict no space around all but ^", { - expect_warning(test_collection( + expect_no_warning(test_collection( "math_token_spacing", "strict_math_spacing_zero_all_but_power", transformer = style_text, style = tidyverse_style, @@ -52,5 +50,5 @@ test_that("strict no space around all but ^", { math_token_spacing = specify_math_token_spacing(zero = c( "'+'", "'-'", "'/'", "'*'" )) - ), NA) + )) }) diff --git a/tests/testthat/test-multiple_expressions.R b/tests/testthat/test-multiple_expressions.R index 783f012dd..6b8c0ecd3 100644 --- a/tests/testthat/test-multiple_expressions.R +++ b/tests/testthat/test-multiple_expressions.R @@ -2,15 +2,15 @@ library("testthat") test_that("simple multiple expressions are styled correctly", { - expect_warning(test_collection("multiple_expressions", + expect_no_warning(test_collection("multiple_expressions", "two_simple", transformer = style_text - ), NA) + )) }) test_that("complex multiple expressions are styled correctly", { - expect_warning(test_collection("multiple_expressions", + expect_no_warning(test_collection("multiple_expressions", "three_complex", transformer = style_text - ), NA) + )) }) diff --git a/tests/testthat/test-parse_comments.R b/tests/testthat/test-parse_comments.R index 53ec3e9b3..99c17a623 100644 --- a/tests/testthat/test-parse_comments.R +++ b/tests/testthat/test-parse_comments.R @@ -1,74 +1,74 @@ test_that("spacing within comments is done correctly", { - expect_warning(test_collection("parse_comments", + expect_no_warning(test_collection("parse_comments", "within_spacing_with_force", transformer = style_text, style = tidyverse_style, start_comments_with_one_space = TRUE - ), NA) + )) - expect_warning(test_collection("parse_comments", + expect_no_warning(test_collection("parse_comments", "within_spacing_without_force", transformer = style_text, style = tidyverse_style, start_comments_with_one_space = FALSE - ), NA) + )) - expect_warning(test_collection("parse_comments", + expect_no_warning(test_collection("parse_comments", "eol_eof_spaces", transformer = style_text - ), NA) + )) }) test_that("comments are treated corectly", { - expect_warning(test_collection("parse_comments", + expect_no_warning(test_collection("parse_comments", "mixed", transformer = style_empty - ), NA) + )) - expect_warning(test_collection("parse_comments", + expect_no_warning(test_collection("parse_comments", "just_comments", transformer = style_empty - ), NA) + )) - expect_warning(test_collection("parse_comments", + expect_no_warning(test_collection("parse_comments", "with_indention", transformer = style_text - ), NA) + )) }) test_that("rplumber tags / syntax is handled properly", { - expect_warning(test_collection("parse_comments", + expect_no_warning(test_collection("parse_comments", "rplumber", transformer = style_text - ), NA) + )) }) test_that("hashbangs are respected", { - expect_warning(test_collection("parse_comments", + expect_no_warning(test_collection("parse_comments", "shebang", transformer = style_text - ), NA) + )) }) test_that("xaringan markers are respected", { - expect_warning(test_collection("parse_comments", + expect_no_warning(test_collection("parse_comments", "xaringan", transformer = style_text - ), NA) + )) }) test_that("output prefix markers are respected", { - expect_warning(test_collection("parse_comments", + expect_no_warning(test_collection("parse_comments", "output-prefix", transformer = style_text - ), NA) + )) }) test_that("code chunk headers for spinning are respected", { - expect_warning(test_collection("parse_comments", + expect_no_warning(test_collection("parse_comments", "spinning_code_chunk_headers", transformer = style_text - ), NA) + )) }) diff --git a/tests/testthat/test-parsing.R b/tests/testthat/test-parsing.R index c5cb2463a..6935bac49 100644 --- a/tests/testthat/test-parsing.R +++ b/tests/testthat/test-parsing.R @@ -1,36 +1,6 @@ - - -test_that("repreated parsing solves wrong parent assignment", { - expect_warning( - test_collection( - "parsing", "repeated_parsing", - transformer = style_text, - strict = FALSE - ), - NA - ) - - # move to temp dir - dir <- tempfile("styler") - dir.create(dir) - path_temp <- file.path(dir, "repeated_parsing-in.R") - path_perm <- testthat_file("parsing", "repeated_parsing-in.R") - file.copy(path_perm, dir) - - sys_call <- paste0( - "R -q -e \"styler::cache_deactivate(); styler::style_file(\\\"", path_temp, "\\\")\"" - ) - calls_sys(sys_call, intern = FALSE, ignore.stdout = TRUE, ignore.stderr = TRUE) - ref <- read_utf8_bare(testthat_file("parsing", "repeated_parsing-out.R")) - result <- read_utf8_bare(path_temp) - expect_equal(ref, result) - unlink(dir) -}) - test_that("long strings are parsed correctly", { - expect_warning( - test_collection("parsing", "long_strings", transformer = style_text), - NA + expect_no_warning( + test_collection("parsing", "long_strings", transformer = style_text) ) }) @@ -58,16 +28,24 @@ test_that("CRLF EOLs fail with informative error", { test_that("mixed CRLF / LF EOLs fail", { + error_msg_stem <- if (getRversion() < "4.4") "unexpected input" else "unexpected invalid token" expect_error( style_text("a + 3 -4 -> x\nx + 2\r\n glück + 1"), - "unexpected input" + error_msg_stem ) }) -test_that("unicode can't be propprely handled on Windows for R < 4.2", { - msg <- ifelse(getRversion() < "4.2" && is_windows(), - "Can't parse input due to unicode restriction in base R\\.", - NA +test_that("unicode can't be properly handled on Windows for R < 4.2", { + skip_if_not(getRversion() < "4.2" && is_windows()) + + expect_error( + style_text('suit <- "♠"'), + "Can't parse input due to unicode restriction in base R\\." ) - expect_error(style_text('suit <- "♠"'), msg) +}) + +test_that("unicode is properly handled in all settings other than on Windows for R < 4.2", { + skip_if(getRversion() < "4.2" && is_windows()) + + expect_error(style_text('suit <- "♠"'), NA) }) diff --git a/tests/testthat/test-public_api-0.R b/tests/testthat/test-public_api-0.R index e0d46f105..70e90cbec 100644 --- a/tests/testthat/test-public_api-0.R +++ b/tests/testthat/test-public_api-0.R @@ -32,7 +32,7 @@ test_that("styler can style package and exclude some directories and files", { capture_output(expect_true({ styled <- style_pkg(testthat_file("public-api", "xyzpackage"), exclude_dirs = "tests", - exclude_files = ".Rprofile" + exclude_files = "\\.Rprofile" ) nrow(styled) == 1 })) @@ -40,10 +40,18 @@ test_that("styler can style package and exclude some directories and files", { capture_output(expect_true({ styled <- style_pkg(testthat_file("public-api", "xyzpackage"), exclude_dirs = "tests", - exclude_files = "./.Rprofile" + exclude_files = ".*ofile" ) nrow(styled) == 1 })) + + capture_output(expect_true({ + styled <- style_pkg(testthat_file("public-api", "xyzpackage"), + exclude_dirs = "tests", + exclude_files = "hello" + ) + nrow(styled) == 0 + })) }) diff --git a/tests/testthat/test-public_api-3.R b/tests/testthat/test-public_api-3.R index 8b1e926fb..de74e8bfd 100644 --- a/tests/testthat/test-public_api-3.R +++ b/tests/testthat/test-public_api-3.R @@ -120,31 +120,31 @@ test_that("scope can be specified as is", { test_that("Can properly determine style_after_saving", { withr::with_envvar(list(save_after_styling = TRUE), { - expect_warning(op <- save_after_styling_is_active(), "is depreciated") - expect_equal(op, TRUE) + expect_warning(op <- save_after_styling_is_active(), "is deprecated") + expect_true(op) }) withr::with_envvar(list(save_after_styling = FALSE), { - expect_warning(op <- save_after_styling_is_active(), "is depreciated") - expect_equal(op, FALSE) + expect_warning(op <- save_after_styling_is_active(), "is deprecated") + expect_false(op) }) withr::with_options(list(styler.save_after_styling = TRUE), { expect_silent(op <- save_after_styling_is_active()) - expect_equal(op, TRUE) + expect_true(op) }) withr::with_options(list(styler.save_after_styling = TRUE), { withr::with_envvar(list(save_after_styling = FALSE), { - expect_warning(op <- save_after_styling_is_active(), "is depreciated") - expect_equal(op, TRUE) + expect_warning(op <- save_after_styling_is_active(), "is deprecated") + expect_true(op) }) }) withr::with_options(list(styler.save_after_styling = FALSE), { expect_silent(op <- save_after_styling_is_active()) - expect_equal(op, FALSE) + expect_false(op) }) }) diff --git a/tests/testthat/test-relocate_eq_assign.R b/tests/testthat/test-relocate_eq_assign.R index fe7b13bc1..0ea30900f 100644 --- a/tests/testthat/test-relocate_eq_assign.R +++ b/tests/testthat/test-relocate_eq_assign.R @@ -1,4 +1,3 @@ - # Tests code in R/relevel.R test_that("tree hierarchy is the same no matter whether = or <- is used", { skip_if_not_installed("DiagrammeR") @@ -44,35 +43,35 @@ test_that("tree hierarchy is the same no matter whether = or <- is used", { }) test_that("braces are added in the right place in ifelse if eq_assign is in expr", { - expect_warning(test_collection( + expect_no_warning(test_collection( "relocate_eq_assign", "eq_assign_ifelse_scope_tokens", transformer = style_text, style = tidyverse_style - ), NA) + )) }) test_that("complicated reassignment works", { - expect_warning(test_collection( + expect_no_warning(test_collection( "relocate_eq_assign", "eq_assign_multiple_tokens_eq_only", transformer = style_text, scope = "tokens", style = tidyverse_style - ), NA) + )) - expect_warning(test_collection( + expect_no_warning(test_collection( "relocate_eq_assign", "eq_assign_multiple_tokens_mixed", transformer = style_text, scope = "tokens", style = tidyverse_style - ), NA) + )) }) test_that("eq_assign is not replaced", { - expect_warning(test_collection( + expect_no_warning(test_collection( "relocate_eq_assign", "eq_assign_ifelse_scope_line_breaks", transformer = style_text, scope = "line_breaks", style = tidyverse_style - ), NA) + )) }) diff --git a/tests/testthat/test-rmd.R b/tests/testthat/test-rmd.R index 6ff803d80..229a0e18a 100644 --- a/tests/testthat/test-rmd.R +++ b/tests/testthat/test-rmd.R @@ -1,59 +1,57 @@ - - test_that("can style .Rmd files", { - expect_warning(test_collection("rmd", "simple", + expect_no_warning(test_collection("rmd", "simple", transformer = transform_mixed, transformer_fun = style_text, filetype = "Rmd", write_tree = FALSE - ), NA) + )) - expect_warning(test_collection("rmd", "r_and_non_r_code_chunks", + expect_no_warning(test_collection("rmd", "r_and_non_r_code_chunks", transformer = transform_mixed, transformer_fun = style_text, filetype = "Rmd", write_tree = FALSE - ), NA) + )) - expect_warning(test_collection("rmd", "nested", + expect_no_warning(test_collection("rmd", "nested", transformer = transform_mixed, transformer_fun = style_text, filetype = "Rmd", write_tree = FALSE - ), NA) + )) - expect_warning(test_collection("rmd", "invalid", + expect_no_warning(test_collection("rmd", "invalid", transformer = transform_mixed, transformer_fun = style_text, filetype = "Rmd", write_tree = FALSE - ), NA) + )) ## new 3-5 - expect_warning(test_collection("rmd", "random3", + expect_no_warning(test_collection("rmd", "random3", transformer = transform_mixed, transformer_fun = style_text, filetype = "Rmd", write_tree = FALSE - ), NA) - expect_warning(test_collection("rmd", "random5", + )) + expect_no_warning(test_collection("rmd", "random5", transformer = transform_mixed, transformer_fun = style_text, filetype = "Rmd", write_tree = FALSE - ), NA) - expect_warning(test_collection("rmd", "random6", + )) + expect_no_warning(test_collection("rmd", "random6", transformer = transform_mixed, transformer_fun = style_text, filetype = "Rmd", write_tree = FALSE - ), NA) - expect_warning(test_collection("rmd", "random7", + )) + expect_no_warning(test_collection("rmd", "random7", transformer = transform_mixed, transformer_fun = style_text, filetype = "Rmd", write_tree = FALSE - ), NA) + )) }) diff --git a/tests/testthat/test-rnw.R b/tests/testthat/test-rnw.R index 1a9158d3f..617c4ed4f 100644 --- a/tests/testthat/test-rnw.R +++ b/tests/testthat/test-rnw.R @@ -1,18 +1,16 @@ - - test_that("can style .Rnw files", { - expect_warning(test_collection( + expect_no_warning(test_collection( "rnw", "008-outdec", transformer = transform_mixed, transformer_fun = style_text, filetype = "Rnw", write_tree = FALSE - ), NA) - expect_warning(test_collection( + )) + expect_no_warning(test_collection( "rnw", "011-conditional-eval", transformer = transform_mixed, transformer_fun = style_text, filetype = "Rnw", write_tree = FALSE - ), NA) + )) }) diff --git a/tests/testthat/test-roundtrip.R b/tests/testthat/test-roundtrip.R index d50242bc2..a92dd8598 100644 --- a/tests/testthat/test-roundtrip.R +++ b/tests/testthat/test-roundtrip.R @@ -1,6 +1,3 @@ - - - test_that("parse_tree_must_be_identical works", { expect_true( parse_tree_must_be_identical(tidyverse_style(scope = "line_breaks")) diff --git a/tests/testthat/test-roxygen-examples-complete-01.R b/tests/testthat/test-roxygen-examples-complete-01.R new file mode 100644 index 000000000..994ef26d3 --- /dev/null +++ b/tests/testthat/test-roxygen-examples-complete-01.R @@ -0,0 +1,5 @@ +# NB: DO NOT EDIT. Auto-generated by ./tests/dev/generate_roxygen_tests.R. + +test_that("analogous to test-roxygen-examples-complete: 01", { + expect_no_warning(test_collection("roxygen-examples-complete", "^01-", transformer = style_text)) +}) diff --git a/tests/testthat/test-roxygen-examples-complete-02.R b/tests/testthat/test-roxygen-examples-complete-02.R new file mode 100644 index 000000000..a32a2f842 --- /dev/null +++ b/tests/testthat/test-roxygen-examples-complete-02.R @@ -0,0 +1,5 @@ +# NB: DO NOT EDIT. Auto-generated by ./tests/dev/generate_roxygen_tests.R. + +test_that("analogous to test-roxygen-examples-complete: 02", { + expect_no_warning(test_collection("roxygen-examples-complete", "^02-", transformer = style_text)) +}) diff --git a/tests/testthat/test-roxygen-examples-complete-03.R b/tests/testthat/test-roxygen-examples-complete-03.R new file mode 100644 index 000000000..08265d7ac --- /dev/null +++ b/tests/testthat/test-roxygen-examples-complete-03.R @@ -0,0 +1,5 @@ +# NB: DO NOT EDIT. Auto-generated by ./tests/dev/generate_roxygen_tests.R. + +test_that("analogous to test-roxygen-examples-complete: 03", { + expect_no_warning(test_collection("roxygen-examples-complete", "^03-", transformer = style_text)) +}) diff --git a/tests/testthat/test-roxygen-examples-complete-04.R b/tests/testthat/test-roxygen-examples-complete-04.R new file mode 100644 index 000000000..883a90afe --- /dev/null +++ b/tests/testthat/test-roxygen-examples-complete-04.R @@ -0,0 +1,5 @@ +# NB: DO NOT EDIT. Auto-generated by ./tests/dev/generate_roxygen_tests.R. + +test_that("analogous to test-roxygen-examples-complete: 04", { + expect_no_warning(test_collection("roxygen-examples-complete", "^04-", transformer = style_text)) +}) diff --git a/tests/testthat/test-roxygen-examples-complete-05.R b/tests/testthat/test-roxygen-examples-complete-05.R new file mode 100644 index 000000000..5757c5d76 --- /dev/null +++ b/tests/testthat/test-roxygen-examples-complete-05.R @@ -0,0 +1,5 @@ +# NB: DO NOT EDIT. Auto-generated by ./tests/dev/generate_roxygen_tests.R. + +test_that("analogous to test-roxygen-examples-complete: 05", { + expect_no_warning(test_collection("roxygen-examples-complete", "^05-", transformer = style_text)) +}) diff --git a/tests/testthat/test-roxygen-examples-complete-06.R b/tests/testthat/test-roxygen-examples-complete-06.R new file mode 100644 index 000000000..246be9f85 --- /dev/null +++ b/tests/testthat/test-roxygen-examples-complete-06.R @@ -0,0 +1,5 @@ +# NB: DO NOT EDIT. Auto-generated by ./tests/dev/generate_roxygen_tests.R. + +test_that("analogous to test-roxygen-examples-complete: 06", { + expect_no_warning(test_collection("roxygen-examples-complete", "^06-", transformer = style_text)) +}) diff --git a/tests/testthat/test-roxygen-examples-complete-07.R b/tests/testthat/test-roxygen-examples-complete-07.R new file mode 100644 index 000000000..d45cf07ce --- /dev/null +++ b/tests/testthat/test-roxygen-examples-complete-07.R @@ -0,0 +1,5 @@ +# NB: DO NOT EDIT. Auto-generated by ./tests/dev/generate_roxygen_tests.R. + +test_that("analogous to test-roxygen-examples-complete: 07", { + expect_no_warning(test_collection("roxygen-examples-complete", "^07-", transformer = style_text)) +}) diff --git a/tests/testthat/test-roxygen-examples-complete-08.R b/tests/testthat/test-roxygen-examples-complete-08.R new file mode 100644 index 000000000..ed70c49fa --- /dev/null +++ b/tests/testthat/test-roxygen-examples-complete-08.R @@ -0,0 +1,5 @@ +# NB: DO NOT EDIT. Auto-generated by ./tests/dev/generate_roxygen_tests.R. + +test_that("analogous to test-roxygen-examples-complete: 08", { + expect_no_warning(test_collection("roxygen-examples-complete", "^08-", transformer = style_text)) +}) diff --git a/tests/testthat/test-roxygen-examples-complete-09.R b/tests/testthat/test-roxygen-examples-complete-09.R new file mode 100644 index 000000000..b92ed8791 --- /dev/null +++ b/tests/testthat/test-roxygen-examples-complete-09.R @@ -0,0 +1,5 @@ +# NB: DO NOT EDIT. Auto-generated by ./tests/dev/generate_roxygen_tests.R. + +test_that("analogous to test-roxygen-examples-complete: 09", { + expect_no_warning(test_collection("roxygen-examples-complete", "^09-", transformer = style_text)) +}) diff --git a/tests/testthat/test-roxygen-examples-complete-10.R b/tests/testthat/test-roxygen-examples-complete-10.R new file mode 100644 index 000000000..b13b6efa7 --- /dev/null +++ b/tests/testthat/test-roxygen-examples-complete-10.R @@ -0,0 +1,5 @@ +# NB: DO NOT EDIT. Auto-generated by ./tests/dev/generate_roxygen_tests.R. + +test_that("analogous to test-roxygen-examples-complete: 10", { + expect_no_warning(test_collection("roxygen-examples-complete", "^10-", transformer = style_text)) +}) diff --git a/tests/testthat/test-roxygen-examples-complete-11.R b/tests/testthat/test-roxygen-examples-complete-11.R new file mode 100644 index 000000000..d2998cb78 --- /dev/null +++ b/tests/testthat/test-roxygen-examples-complete-11.R @@ -0,0 +1,5 @@ +# NB: DO NOT EDIT. Auto-generated by ./tests/dev/generate_roxygen_tests.R. + +test_that("analogous to test-roxygen-examples-complete: 11", { + expect_no_warning(test_collection("roxygen-examples-complete", "^11-", transformer = style_text)) +}) diff --git a/tests/testthat/test-roxygen-examples-complete-12.R b/tests/testthat/test-roxygen-examples-complete-12.R new file mode 100644 index 000000000..9d190901d --- /dev/null +++ b/tests/testthat/test-roxygen-examples-complete-12.R @@ -0,0 +1,5 @@ +# NB: DO NOT EDIT. Auto-generated by ./tests/dev/generate_roxygen_tests.R. + +test_that("analogous to test-roxygen-examples-complete: 12", { + expect_no_warning(test_collection("roxygen-examples-complete", "^12-", transformer = style_text)) +}) diff --git a/tests/testthat/test-roxygen-examples-complete-13.R b/tests/testthat/test-roxygen-examples-complete-13.R new file mode 100644 index 000000000..87c9a28d2 --- /dev/null +++ b/tests/testthat/test-roxygen-examples-complete-13.R @@ -0,0 +1,5 @@ +# NB: DO NOT EDIT. Auto-generated by ./tests/dev/generate_roxygen_tests.R. + +test_that("analogous to test-roxygen-examples-complete: 13", { + expect_no_warning(test_collection("roxygen-examples-complete", "^13-", transformer = style_text)) +}) diff --git a/tests/testthat/test-roxygen-examples-complete-14.R b/tests/testthat/test-roxygen-examples-complete-14.R new file mode 100644 index 000000000..cb675af50 --- /dev/null +++ b/tests/testthat/test-roxygen-examples-complete-14.R @@ -0,0 +1,5 @@ +# NB: DO NOT EDIT. Auto-generated by ./tests/dev/generate_roxygen_tests.R. + +test_that("analogous to test-roxygen-examples-complete: 14", { + expect_no_warning(test_collection("roxygen-examples-complete", "^14-", transformer = style_text)) +}) diff --git a/tests/testthat/test-roxygen-examples-complete-15.R b/tests/testthat/test-roxygen-examples-complete-15.R new file mode 100644 index 000000000..7878baeab --- /dev/null +++ b/tests/testthat/test-roxygen-examples-complete-15.R @@ -0,0 +1,5 @@ +# NB: DO NOT EDIT. Auto-generated by ./tests/dev/generate_roxygen_tests.R. + +test_that("analogous to test-roxygen-examples-complete: 15", { + expect_no_warning(test_collection("roxygen-examples-complete", "^15-", transformer = style_text, scope = "spaces")) +}) diff --git a/tests/testthat/test-roxygen-examples-complete-16.R b/tests/testthat/test-roxygen-examples-complete-16.R new file mode 100644 index 000000000..e2a94fba6 --- /dev/null +++ b/tests/testthat/test-roxygen-examples-complete-16.R @@ -0,0 +1,5 @@ +# NB: DO NOT EDIT. Auto-generated by ./tests/dev/generate_roxygen_tests.R. + +test_that("analogous to test-roxygen-examples-complete: 16", { + expect_no_warning(test_collection("roxygen-examples-complete", "^16-", transformer = style_text)) +}) diff --git a/tests/testthat/test-roxygen-examples-complete-17.R b/tests/testthat/test-roxygen-examples-complete-17.R new file mode 100644 index 000000000..2593baed5 --- /dev/null +++ b/tests/testthat/test-roxygen-examples-complete-17.R @@ -0,0 +1,5 @@ +# NB: DO NOT EDIT. Auto-generated by ./tests/dev/generate_roxygen_tests.R. + +test_that("analogous to test-roxygen-examples-complete: 17", { + expect_no_warning(test_collection("roxygen-examples-complete", "^17-", transformer = style_text)) +}) diff --git a/tests/testthat/test-roxygen-examples-complete-18.R b/tests/testthat/test-roxygen-examples-complete-18.R new file mode 100644 index 000000000..a35120f36 --- /dev/null +++ b/tests/testthat/test-roxygen-examples-complete-18.R @@ -0,0 +1,5 @@ +# NB: DO NOT EDIT. Auto-generated by ./tests/dev/generate_roxygen_tests.R. + +test_that("analogous to test-roxygen-examples-complete: 18", { + expect_no_warning(test_collection("roxygen-examples-complete", "^18-", transformer = style_text)) +}) diff --git a/tests/testthat/test-roxygen-examples-complete-19.R b/tests/testthat/test-roxygen-examples-complete-19.R new file mode 100644 index 000000000..f007ef7be --- /dev/null +++ b/tests/testthat/test-roxygen-examples-complete-19.R @@ -0,0 +1,5 @@ +# NB: DO NOT EDIT. Auto-generated by ./tests/dev/generate_roxygen_tests.R. + +test_that("analogous to test-roxygen-examples-complete: 19", { + expect_no_warning(test_collection("roxygen-examples-complete", "^19-", transformer = style_text)) +}) diff --git a/tests/testthat/test-roxygen-examples-complete-20.R b/tests/testthat/test-roxygen-examples-complete-20.R new file mode 100644 index 000000000..1f9f402a9 --- /dev/null +++ b/tests/testthat/test-roxygen-examples-complete-20.R @@ -0,0 +1,5 @@ +# NB: DO NOT EDIT. Auto-generated by ./tests/dev/generate_roxygen_tests.R. + +test_that("analogous to test-roxygen-examples-complete: 20", { + expect_no_warning(test_collection("roxygen-examples-complete", "^20-", transformer = style_text)) +}) diff --git a/tests/testthat/test-roxygen-examples-complete-21.R b/tests/testthat/test-roxygen-examples-complete-21.R new file mode 100644 index 000000000..23f49d568 --- /dev/null +++ b/tests/testthat/test-roxygen-examples-complete-21.R @@ -0,0 +1,5 @@ +# NB: DO NOT EDIT. Auto-generated by ./tests/dev/generate_roxygen_tests.R. + +test_that("analogous to test-roxygen-examples-complete: 21", { + expect_no_warning(test_collection("roxygen-examples-complete", "^21-", transformer = style_text)) +}) diff --git a/tests/testthat/test-roxygen-examples-complete-22.R b/tests/testthat/test-roxygen-examples-complete-22.R new file mode 100644 index 000000000..4295e5b20 --- /dev/null +++ b/tests/testthat/test-roxygen-examples-complete-22.R @@ -0,0 +1,5 @@ +# NB: DO NOT EDIT. Auto-generated by ./tests/dev/generate_roxygen_tests.R. + +test_that("analogous to test-roxygen-examples-complete: 22", { + expect_no_warning(test_collection("roxygen-examples-complete", "^22-", transformer = style_text)) +}) diff --git a/tests/testthat/test-roxygen-examples-complete-23.R b/tests/testthat/test-roxygen-examples-complete-23.R new file mode 100644 index 000000000..79472b937 --- /dev/null +++ b/tests/testthat/test-roxygen-examples-complete-23.R @@ -0,0 +1,5 @@ +# NB: DO NOT EDIT. Auto-generated by ./tests/dev/generate_roxygen_tests.R. + +test_that("analogous to test-roxygen-examples-complete: 23", { + expect_error(test_collection("roxygen-examples-complete", "^23-", transformer = style_text), "issues/1242") +}) diff --git a/tests/testthat/test-roxygen-examples-complete-24.R b/tests/testthat/test-roxygen-examples-complete-24.R new file mode 100644 index 000000000..8177615d4 --- /dev/null +++ b/tests/testthat/test-roxygen-examples-complete-24.R @@ -0,0 +1,5 @@ +# NB: DO NOT EDIT. Auto-generated by ./tests/dev/generate_roxygen_tests.R. + +test_that("analogous to test-roxygen-examples-complete: 24", { + expect_no_warning(test_collection("roxygen-examples-complete", "^24-", transformer = style_text)) +}) diff --git a/tests/testthat/test-roxygen-examples-complete-25.R b/tests/testthat/test-roxygen-examples-complete-25.R new file mode 100644 index 000000000..0c610e2d4 --- /dev/null +++ b/tests/testthat/test-roxygen-examples-complete-25.R @@ -0,0 +1,5 @@ +# NB: DO NOT EDIT. Auto-generated by ./tests/dev/generate_roxygen_tests.R. + +test_that("analogous to test-roxygen-examples-complete: 25", { + expect_no_warning(test_collection("roxygen-examples-complete", "^25-", transformer = style_text)) +}) diff --git a/tests/testthat/test-roxygen-examples-complete-26.R b/tests/testthat/test-roxygen-examples-complete-26.R new file mode 100644 index 000000000..cedbbe026 --- /dev/null +++ b/tests/testthat/test-roxygen-examples-complete-26.R @@ -0,0 +1,5 @@ +# NB: DO NOT EDIT. Auto-generated by ./tests/dev/generate_roxygen_tests.R. + +test_that("analogous to test-roxygen-examples-complete: 26", { + expect_no_warning(test_collection("roxygen-examples-complete", "^26-", transformer = style_text)) +}) diff --git a/tests/testthat/test-roxygen-examples-complete-27.R b/tests/testthat/test-roxygen-examples-complete-27.R new file mode 100644 index 000000000..4831e133c --- /dev/null +++ b/tests/testthat/test-roxygen-examples-complete-27.R @@ -0,0 +1,5 @@ +# NB: DO NOT EDIT. Auto-generated by ./tests/dev/generate_roxygen_tests.R. + +test_that("analogous to test-roxygen-examples-complete: 27", { + expect_no_warning(test_collection("roxygen-examples-complete", "^27-", transformer = style_text)) +}) diff --git a/tests/testthat/test-roxygen-examples-complete-28.R b/tests/testthat/test-roxygen-examples-complete-28.R new file mode 100644 index 000000000..ffcc436c8 --- /dev/null +++ b/tests/testthat/test-roxygen-examples-complete-28.R @@ -0,0 +1,5 @@ +# NB: DO NOT EDIT. Auto-generated by ./tests/dev/generate_roxygen_tests.R. + +test_that("analogous to test-roxygen-examples-complete: 28", { + expect_no_warning(test_collection("roxygen-examples-complete", "^28-", transformer = style_text)) +}) diff --git a/tests/testthat/test-roxygen-examples-complete-29.R b/tests/testthat/test-roxygen-examples-complete-29.R new file mode 100644 index 000000000..10873f663 --- /dev/null +++ b/tests/testthat/test-roxygen-examples-complete-29.R @@ -0,0 +1,5 @@ +# NB: DO NOT EDIT. Auto-generated by ./tests/dev/generate_roxygen_tests.R. + +test_that("analogous to test-roxygen-examples-complete: 29", { + expect_no_warning(test_collection("roxygen-examples-complete", "^29-", transformer = style_text)) +}) diff --git a/tests/testthat/test-roxygen-examples-complete-30.R b/tests/testthat/test-roxygen-examples-complete-30.R new file mode 100644 index 000000000..1e47a7388 --- /dev/null +++ b/tests/testthat/test-roxygen-examples-complete-30.R @@ -0,0 +1,5 @@ +# NB: DO NOT EDIT. Auto-generated by ./tests/dev/generate_roxygen_tests.R. + +test_that("analogous to test-roxygen-examples-complete: 30", { + expect_no_warning(test_collection("roxygen-examples-complete", "^30-", transformer = style_text)) +}) diff --git a/tests/testthat/test-roxygen-examples-complete.R b/tests/testthat/test-roxygen-examples-complete.R deleted file mode 100644 index 0d78cc4f0..000000000 --- a/tests/testthat/test-roxygen-examples-complete.R +++ /dev/null @@ -1,152 +0,0 @@ -test_that("analogous to test-roxygen-examples-complete", { - expect_warning(test_collection( - "roxygen-examples-complete", "^01", - transformer = style_text - ), NA) - - expect_warning(test_collection( - "roxygen-examples-complete", "^11", - transformer = style_text - ), NA) - - expect_warning(test_collection( - "roxygen-examples-complete", "^12-fun", - transformer = style_text - ), NA) - - expect_warning(test_collection( - "roxygen-examples-complete", "^12-dont", - transformer = style_text - ), NA) - - - expect_warning(test_collection( - "roxygen-examples-complete", "^13", - transformer = style_text - ), NA) - - expect_warning(test_collection( - "roxygen-examples-complete", "^14", - transformer = style_text - ), NA) - - expect_warning(test_collection( - "roxygen-examples-complete", "^02", - transformer = style_text - ), NA) - - expect_warning(test_collection( - "roxygen-examples-complete", "^03", - transformer = style_text - ), NA) - - expect_warning(test_collection( - "roxygen-examples-complete", "^04", - transformer = style_text - ), NA) - - expect_warning(test_collection( - "roxygen-examples-complete", "^05", - transformer = style_text - ), NA) - - expect_warning(test_collection( - "roxygen-examples-complete", "^06", - transformer = style_text - ), NA) - - expect_warning(test_collection( - "roxygen-examples-complete", "^07", - transformer = style_text - ), NA) - - expect_warning(test_collection( - "roxygen-examples-complete", "^08", - transformer = style_text - ), NA) - - expect_warning(test_collection( - "roxygen-examples-complete", "^09", - transformer = style_text - ), NA) - - expect_warning(test_collection( - "roxygen-examples-complete", "^10", - transformer = style_text - ), NA) - - expect_warning(test_collection( - "roxygen-examples-complete", "^15", - transformer = style_text, scope = "spaces" - ), NA) - - # Don't warn about empty strings in roxygen comments - expect_warning(test_collection( - "roxygen-examples-complete", "^16", - transformer = style_text - ), NA) - - expect_warning(test_collection( - "roxygen-examples-complete", "^17", - transformer = style_text - ), NA) - - expect_warning(test_collection( - "roxygen-examples-complete", "^18", - transformer = style_text - ), NA) - expect_warning(test_collection( - "roxygen-examples-complete", "^19", - transformer = style_text - ), NA) - - expect_warning(test_collection( - "roxygen-examples-complete", "^20", - transformer = style_text - ), NA) - - expect_warning(test_collection( - "roxygen-examples-complete", "^21", - transformer = style_text - ), NA) - - expect_warning(test_collection( - "roxygen-examples-complete", "^22", - transformer = style_text - ), NA) - - expect_error(test_collection( - "roxygen-examples-complete", "^23", - transformer = style_text - ), "issues/1242") - - expect_warning(test_collection( - "roxygen-examples-complete", "^24", - transformer = style_text - ), NA) - - expect_warning(test_collection( - "roxygen-examples-complete", "^25", - transformer = style_text - ), NA) - - expect_warning(test_collection( - "roxygen-examples-complete", "^26", - transformer = style_text - ), NA) - - expect_warning(test_collection( - "roxygen-examples-complete", "^27", - transformer = style_text - ), NA) - - expect_warning(test_collection( - "roxygen-examples-complete", "^28", - transformer = style_text - ), NA) - - expect_warning(test_collection( - "roxygen-examples-complete", "^29", - transformer = style_text - ), NA) -}) diff --git a/tests/testthat/test-roxygen-examples-parse.R b/tests/testthat/test-roxygen-examples-parse.R index d733b1585..5a1a56c96 100644 --- a/tests/testthat/test-roxygen-examples-parse.R +++ b/tests/testthat/test-roxygen-examples-parse.R @@ -1,5 +1,3 @@ - - test_that("simple examples can be parsed", { expected_out <- c("\n", "x <- 1\n") expect_equal(parse_roxygen(c("#' @examples", "#' x <- 1"))$text, expected_out) diff --git a/tests/testthat/test-scope-AsIs.R b/tests/testthat/test-scope-AsIs.R index 97eec4ebf..da1638a32 100644 --- a/tests/testthat/test-scope-AsIs.R +++ b/tests/testthat/test-scope-AsIs.R @@ -1,72 +1,70 @@ - - test_that("no indention manipulation but spaces manipulation", { - expect_warning(test_collection( + expect_no_warning(test_collection( "scope-AsIs", "scope_spaces-", transformer = style_text, style = tidyverse_style, scope = I("spaces") - ), NA) + )) }) test_that("just indention", { - expect_warning(test_collection( + expect_no_warning(test_collection( "scope-AsIs", "scope_indention-", transformer = style_text, style = tidyverse_style, scope = I("indention") - ), NA) + )) }) test_that("indention and spaces", { - expect_warning(test_collection( + expect_no_warning(test_collection( "scope-AsIs", "scope_spaces_indention-", transformer = style_text, style = tidyverse_style, scope = I(c("indention", "spaces")) - ), NA) + )) }) test_that("line-break manipulation", { - expect_warning(test_collection( + expect_no_warning(test_collection( "scope-AsIs", "scope_line_breaks-", transformer = style_text, style = tidyverse_style, scope = I("line_breaks") - ), NA) + )) }) test_that("line-break manipulation", { - expect_warning(test_collection( + expect_no_warning(test_collection( "scope-AsIs", "scope_spaces_line_breaks-", transformer = style_text, style = tidyverse_style, scope = I(c("line_breaks", "spaces")) - ), NA) + )) }) test_that("tokens and indention", { - expect_warning(test_collection( + expect_no_warning(test_collection( "scope-AsIs", "scope_indention_tokens-", transformer = style_text, style = tidyverse_style, scope = I(c("tokens", "indention")) - ), NA) + )) }) test_that("tokens and indention", { - expect_warning(test_collection( + expect_no_warning(test_collection( "scope-AsIs", "scope_spaces_tokens-", transformer = style_text, style = tidyverse_style, scope = I(c("spaces", "tokens")) - ), NA) + )) }) test_that("no manipulation at all", { - expect_warning(test_collection( + expect_no_warning(test_collection( "scope-AsIs", "scope_none-", transformer = style_text, style = tidyverse_style, scope = I("none") - ), NA) + )) }) diff --git a/tests/testthat/test-scope-character.R b/tests/testthat/test-scope-character.R index 256f7d670..3cc82b55c 100644 --- a/tests/testthat/test-scope-character.R +++ b/tests/testthat/test-scope-character.R @@ -1,45 +1,43 @@ - - test_that("no indention manipulation but spaces manipulation", { - expect_warning(test_collection( + expect_no_warning(test_collection( "scope-character", "scope_spaces", transformer = style_text, style = tidyverse_style, scope = "spaces" - ), NA) + )) }) test_that("no line-break manipulation", { - expect_warning(test_collection( + expect_no_warning(test_collection( "scope-character", "scope_indention", transformer = style_text, style = tidyverse_style, scope = "indention" - ), NA) + )) }) test_that("no token manipulation", { - expect_warning(test_collection( + expect_no_warning(test_collection( "scope-character", "scope_line_breaks", transformer = style_text, style = tidyverse_style, scope = "line_breaks" - ), NA) + )) }) test_that("no space manipulation", { - expect_warning(test_collection( + expect_no_warning(test_collection( "scope-character", "scope_tokens", transformer = style_text, style = tidyverse_style, scope = "tokens" - ), NA) + )) }) test_that("no manipulation at all", { - expect_warning(test_collection( + expect_no_warning(test_collection( "scope-character", "scope_none", transformer = style_text, style = tidyverse_style, scope = "none" - ), NA) + )) }) diff --git a/tests/testthat/test-serialize_tests.R b/tests/testthat/test-serialize_tests.R index 2b858a77a..cab2100e3 100644 --- a/tests/testthat/test-serialize_tests.R +++ b/tests/testthat/test-serialize_tests.R @@ -1,5 +1,3 @@ - - test_that("No files to compare returns error", { expect_error(test_collection("serialize_tests", "xyz", transformer = as_is diff --git a/tests/testthat/test-spacing.R b/tests/testthat/test-spacing.R index 9caadf9e4..aa7bdb997 100644 --- a/tests/testthat/test-spacing.R +++ b/tests/testthat/test-spacing.R @@ -1,80 +1,85 @@ - - test_that("curly braces", { - expect_warning(test_collection( + expect_no_warning(test_collection( "spacing", "round", transformer = style_text - ), NA) + )) }) test_that(":, ::, and :::", { - expect_warning(test_collection( + expect_no_warning(test_collection( "spacing", "colon", transformer = style_text - ), NA) + )) }) test_that("comments and strict = FALSE", { - expect_warning(test_collection( + expect_no_warning(test_collection( "spacing", "comments", transformer = style_text, stric = FALSE - ), NA) + )) }) test_that("Space placed after 'if' and before '('", { - expect_warning(test_collection( + expect_no_warning(test_collection( "spacing", "spacing_if", transformer = style_text - ), NA) + )) }) test_that("space before comma is removed", { - expect_warning(test_collection( + expect_no_warning(test_collection( "spacing", "spacing_comma", transformer = style_text - ), NA) + )) }) test_that("two commas are separated by a space", { - expect_warning(test_collection( + expect_no_warning(test_collection( "spacing", "spacing_comma2", transformer = style_text - ), NA) + )) }) test_that("spacing between ! and bang is perserved", { - expect_warning(test_collection( + expect_no_warning(test_collection( "spacing", "bang_bang_spacing", transformer = style_text - ), NA) + )) }) test_that("spacing around in works", { - expect_warning(test_collection( + expect_no_warning(test_collection( "spacing", "spacing_in", transformer = style_text - ), NA) + )) }) test_that("no spaces after token FUNCTION", { - expect_warning(test_collection( + expect_no_warning(test_collection( "spacing", "spacing_function", transformer = style_text, strict = FALSE - ), NA) + )) }) test_that("spacing around tilde", { - expect_warning(test_collection( + expect_no_warning(test_collection( "spacing", "spacing-tilde", transformer = style_text, strict = TRUE - ), NA) + )) }) test_that("spacing around square brackets / braces", { - expect_warning(test_collection( + expect_no_warning(test_collection( "spacing", "spacing-square", transformer = style_text, strict = TRUE - ), NA) + )) +}) + +test_that("spacing around dollar", { + expect_no_warning(test_collection( + "spacing", "dollar", + transformer = style_text, strict = TRUE + )) }) diff --git a/tests/testthat/test-square_brackets.R b/tests/testthat/test-square_brackets.R index a400c1f30..7c4ef65a4 100644 --- a/tests/testthat/test-square_brackets.R +++ b/tests/testthat/test-square_brackets.R @@ -1,8 +1,6 @@ - - test_that("square brackets cause indention", { - expect_warning(test_collection( + expect_no_warning(test_collection( "indention_square_brackets", transformer = style_text - ), NA) + )) }) diff --git a/tests/testthat/test-start_line.R b/tests/testthat/test-start_line.R index f154dc555..5d96cc2b2 100644 --- a/tests/testthat/test-start_line.R +++ b/tests/testthat/test-start_line.R @@ -1,7 +1,5 @@ - - test_that("leading spaces are preserved at start of text", { - expect_warning(test_collection("start_line", + expect_no_warning(test_collection("start_line", transformer = style_empty - ), NA) + )) }) diff --git a/tests/testthat/test-strict.R b/tests/testthat/test-strict.R index 774096980..bf6e92a40 100644 --- a/tests/testthat/test-strict.R +++ b/tests/testthat/test-strict.R @@ -1,33 +1,31 @@ - - test_that("can style example source file with strict = TRUE", { - expect_warning(test_collection( + expect_no_warning(test_collection( "strict", "strict", transformer = style_text, strict = TRUE - ), NA) + )) }) test_that("can style example source file with strict = FALSE", { - expect_warning(test_collection( + expect_no_warning(test_collection( "strict", "non_strict", transformer = style_text, strict = FALSE - ), NA) + )) }) test_that("removes space at EOL", { - expect_warning(test_collection( + expect_no_warning(test_collection( "strict", "eol", transformer = style_text, strict = FALSE - ), NA) + )) }) test_that("removes blank lines at EOF", { - expect_warning(test_collection( + expect_no_warning(test_collection( "strict", "eof", transformer = style_text, strict = FALSE - ), NA) + )) }) diff --git a/tests/testthat/test-stylerignore.R b/tests/testthat/test-stylerignore.R index e17fb9adf..925f91143 100644 --- a/tests/testthat/test-stylerignore.R +++ b/tests/testthat/test-stylerignore.R @@ -127,31 +127,31 @@ test_that("works with other markers", { test_that("Simple example works", { - expect_warning(test_collection("stylerignore", "simple", + expect_no_warning(test_collection("stylerignore", "simple", transformer = style_text - ), NA) + )) }) test_that("stylerignore does not need coincidence with top-level expressions", { - expect_warning(test_collection("stylerignore", "crossing", + expect_no_warning(test_collection("stylerignore", "crossing", transformer = style_text - ), NA) + )) }) test_that("token adding or removing works in stylerignore", { - expect_warning(test_collection("stylerignore", "adding-removing", + expect_no_warning(test_collection("stylerignore", "adding-removing", transformer = style_text - ), NA) + )) }) test_that("no token added or removed in complex case", { - expect_warning(test_collection("stylerignore", "braces", + expect_no_warning(test_collection("stylerignore", "braces", transformer = style_text - ), NA) + )) }) test_that("stylerignore sequences are respected in alignment detection", { - expect_warning(test_collection("stylerignore", "alignment", + expect_no_warning(test_collection("stylerignore", "alignment", transformer = style_text - ), NA) + )) }) diff --git a/tests/testthat/test-tidyeval.R b/tests/testthat/test-tidyeval.R index 76b7a2457..45192320c 100644 --- a/tests/testthat/test-tidyeval.R +++ b/tests/testthat/test-tidyeval.R @@ -1,19 +1,17 @@ - - test_that("no spaces within bang-bang operator !!!", { - expect_warning(test_collection("tidyeval", "bang_bang", + expect_no_warning(test_collection("tidyeval", "bang_bang", transformer = style_text - ), NA) + )) }) test_that(":= has correct spacing", { - expect_warning(test_collection("tidyeval", "setting_var", + expect_no_warning(test_collection("tidyeval", "setting_var", transformer = style_text - ), NA) + )) }) test_that("Space before comma if preceding token is EQ_SUB", { - expect_warning(test_collection("tidyeval", "eq_sub", + expect_no_warning(test_collection("tidyeval", "eq_sub", transformer = style_text - ), NA) + )) }) diff --git a/tests/testthat/test-token_adding_removing.R b/tests/testthat/test-token_adding_removing.R index cd0026a0f..584f7f9b9 100644 --- a/tests/testthat/test-token_adding_removing.R +++ b/tests/testthat/test-token_adding_removing.R @@ -1,65 +1,63 @@ - - test_that("other manipulations are correct (add braces, semi-colon etc.)", { - expect_warning(test_collection("token_adding_removing", "mixed_token", + expect_no_warning(test_collection("token_adding_removing", "mixed_token", transformer = style_text - ), NA) + )) }) test_that("braces in if-else clause are added correctly", { - expect_warning(test_collection("token_adding_removing", "if_else_strict", + expect_no_warning(test_collection("token_adding_removing", "if_else_strict", transformer = style_text - ), NA) - expect_warning(test_collection("token_adding_removing", "if_else_non_strict", + )) + expect_no_warning(test_collection("token_adding_removing", "if_else_non_strict", transformer = style_text, strict = FALSE - ), NA) - expect_warning(test_collection("token_adding_removing", "if-else-comma", + )) + expect_no_warning(test_collection("token_adding_removing", "if-else-comma", transformer = style_text, strict = TRUE - ), NA) + )) }) test_that("double braces are treated correctly", { - expect_warning(test_collection("token_adding_removing", "double_braces", + expect_no_warning(test_collection("token_adding_removing", "double_braces", transformer = style_text - ), NA) + )) }) test_that("double braces are treated correctly", { - expect_warning(test_collection("token_adding_removing", "token_creation_find_pos", + expect_no_warning(test_collection("token_adding_removing", "token_creation_find_pos", transformer = style_text - ), NA) + )) }) test_that("braces only added to pipe if RHS is a symbol", { - expect_warning(test_collection("token_adding_removing", "add_brackets_in_pipe", + expect_no_warning(test_collection("token_adding_removing", "add_brackets_in_pipe", transformer = style_text - ), NA) + )) }) test_that("No braces are added if conditional statement is within pipe", { - expect_warning(test_collection("token_adding_removing", "else-pipe", + expect_no_warning(test_collection("token_adding_removing", "else-pipe", transformer = style_text - ), NA) + )) }) test_that("No brace is added within `substitute()`", { - expect_warning(test_collection("token_adding_removing", "substitute", + expect_no_warning(test_collection("token_adding_removing", "substitute", transformer = style_text - ), NA) + )) }) test_that("stylreignore interacts correctly with wrap_expr_in_curly", { - expect_warning(test_collection("token_adding_removing", "if_else_stylerignore", + expect_no_warning(test_collection("token_adding_removing", "if_else_stylerignore", transformer = style_text - ), NA) + )) }) test_that("stylreignore interacts correctly with wrap_expr_in_curly", { - expect_warning(test_collection("token_adding_removing", "for_while_stylerignore", + expect_no_warning(test_collection("token_adding_removing", "for_while_stylerignore", transformer = style_text - ), NA) + )) }) diff --git a/tests/testthat/test-transformers-drop.R b/tests/testthat/test-transformers-drop.R index f3d5731fe..ad10908f5 100644 --- a/tests/testthat/test-transformers-drop.R +++ b/tests/testthat/test-transformers-drop.R @@ -71,6 +71,8 @@ test_that("tidyverse transformers are correctly dropped", { t_fun <- transformers_drop("x", t_style) names_line_break <- c( + "remove_empty_lines_after_opening_and_before_closing_braces", + "set_line_breaks_between_top_level_exprs", "set_line_break_around_comma_and_or", "set_line_break_after_assignment", "set_line_break_after_opening_if_call_is_multi_line", diff --git a/tests/testthat/test-unary.R b/tests/testthat/test-unary.R index 8fe52eb0c..0c5cc2b30 100644 --- a/tests/testthat/test-unary.R +++ b/tests/testthat/test-unary.R @@ -1,18 +1,16 @@ - - test_that("no spaces before unary operator", { - expect_warning(test_collection("unary_spacing", + expect_no_warning(test_collection("unary_spacing", "unary_simple", transformer = style_text - ), NA) + )) - expect_warning(test_collection("unary_spacing", + expect_no_warning(test_collection("unary_spacing", "unary_complex", transformer = style_text - ), NA) + )) - expect_warning(test_collection("unary_spacing", + expect_no_warning(test_collection("unary_spacing", "unary_indention", transformer = style_text - ), NA) + )) }) diff --git a/tests/testthat/test-unindention.R b/tests/testthat/test-unindention.R index cd06de29c..0d6058d6a 100644 --- a/tests/testthat/test-unindention.R +++ b/tests/testthat/test-unindention.R @@ -1,17 +1,15 @@ - - test_that("round brackets are unindented correctly", { - expect_warning(test_collection("unindention", + expect_no_warning(test_collection("unindention", "mixed", transformer = style_text_without_curly_curly - ), NA) + )) }) test_that("tokens are not dropped in named vector", { - expect_warning(test_collection("unindention", + expect_no_warning(test_collection("unindention", "vec", transformer = style_text - ), NA) + )) }) @@ -19,8 +17,8 @@ test_that(paste( "if last token is multi-line and no line break precede,", "unindention is correct" ), { - expect_warning(test_collection("unindention", + expect_no_warning(test_collection("unindention", "vec", transformer = style_text - ), NA) + )) }) diff --git a/tests/testthat/test-unindention_regex.R b/tests/testthat/test-unindention_regex.R index 7e364fa46..e009b67e1 100644 --- a/tests/testthat/test-unindention_regex.R +++ b/tests/testthat/test-unindention_regex.R @@ -1,21 +1,20 @@ - test_that("forced regex token-dependent indention", { - expect_warning(test_collection( + expect_no_warning(test_collection( "unindention_regex", "regex_force_with", transformer = style_text, reindention = specify_reindention(c( "^# ", "^## ", "^### " )) - ), NA) + )) }) test_that("do not force regex token-dependent indention without pattern", { - expect_warning(test_collection( + expect_no_warning(test_collection( "unindention_regex", "regex_force_no", transformer = style_text, reindention = specify_reindention(NULL) - ), NA) + )) }) diff --git a/tests/testthat/test-utils.R b/tests/testthat/test-utils.R index ed43923ff..f11e241fd 100644 --- a/tests/testthat/test-utils.R +++ b/tests/testthat/test-utils.R @@ -1,5 +1,3 @@ - - test_that("non-comment-helpers", { pd <- compute_parse_data_nested("a <- # hi \n x %>% b()") child <- pd$child[[1]] diff --git a/tests/testthat/test-varia.R b/tests/testthat/test-varia.R index 422363a0d..effc0f865 100644 --- a/tests/testthat/test-varia.R +++ b/tests/testthat/test-varia.R @@ -1,5 +1,3 @@ - - test_that("ensure_last_n_empty", { expect_equal( ensure_last_n_empty("x"), diff --git a/tests/testthat/tests-cache-require-serial.R b/tests/testthat/tests-cache-require-serial.R index 96c861247..ca0807866 100644 --- a/tests/testthat/tests-cache-require-serial.R +++ b/tests/testthat/tests-cache-require-serial.R @@ -25,7 +25,7 @@ test_that("top-level test: Caches top-level expressions efficiently on style_tex partially_cached_benchmark["elapsed"] * 1.5, not_cached_benchmark["elapsed"] ) - expect_lt(full_cached_benchmark["elapsed"] * 35, benchmark["elapsed"]) + expect_lt(full_cached_benchmark["elapsed"] * 20, benchmark["elapsed"]) }) diff --git a/tests/testthat/tidyeval/bang_bang-in_tree b/tests/testthat/tidyeval/bang_bang-in_tree deleted file mode 100644 index 5e03ff01a..000000000 --- a/tests/testthat/tidyeval/bang_bang-in_tree +++ /dev/null @@ -1,167 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: names [0/0] {1} - ¦ ¦--expr: names [0/1] {3} - ¦ ¦ °--SYMBOL: names [0/0] {2} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {4} - ¦ °--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: 'Sepa [0/0] {12} - ¦ ¦ °--STR_CONST: 'Sepa [0/0] {11} - ¦ °--')': ) [0/0] {13} - ¦--expr: head( [1/0] {14} - ¦ ¦--expr: head [0/0] {16} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: head [0/0] {15} - ¦ ¦--'(': ( [0/0] {17} - ¦ ¦--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: iris[ [0/0] {24} - ¦ ¦ ¦ ¦--expr: iris [0/0] {26} - ¦ ¦ ¦ ¦ °--SYMBOL: iris [0/0] {25} - ¦ ¦ ¦ ¦--'[': [ [0/0] {27} - ¦ ¦ ¦ ¦--',': , [0/0] {28} - ¦ ¦ ¦ ¦--expr: 1:2 [0/0] {29} - ¦ ¦ ¦ ¦ ¦--expr: 1 [0/0] {31} - ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {30} - ¦ ¦ ¦ ¦ ¦--':': : [0/0] {32} - ¦ ¦ ¦ ¦ °--expr: 2 [0/0] {34} - ¦ ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {33} - ¦ ¦ ¦ °--']': ] [0/0] {35} - ¦ ¦ ¦--',': , [0/1] {36} - ¦ ¦ ¦--expr: ! ! ! [0/0] {37} - ¦ ¦ ¦ ¦--'!': ! [0/1] {38} - ¦ ¦ ¦ °--expr: ! ! n [0/0] {39} - ¦ ¦ ¦ ¦--'!': ! [0/1] {40} - ¦ ¦ ¦ °--expr: ! nam [0/0] {41} - ¦ ¦ ¦ ¦--'!': ! [0/1] {42} - ¦ ¦ ¦ °--expr: names [0/0] {44} - ¦ ¦ ¦ °--SYMBOL: names [0/0] {43} - ¦ ¦ °--')': ) [0/0] {45} - ¦ ¦--',': , [0/1] {46} - ¦ ¦--expr: 3 [0/0] {48} - ¦ ¦ °--NUM_CONST: 3 [0/0] {47} - ¦ °--')': ) [0/0] {49} - ¦--expr: head( [1/0] {50} - ¦ ¦--expr: head [0/0] {52} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: head [0/0] {51} - ¦ ¦--'(': ( [0/0] {53} - ¦ ¦--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: iris[ [0/0] {60} - ¦ ¦ ¦ ¦--expr: iris [0/0] {62} - ¦ ¦ ¦ ¦ °--SYMBOL: iris [0/0] {61} - ¦ ¦ ¦ ¦--'[': [ [0/0] {63} - ¦ ¦ ¦ ¦--',': , [0/0] {64} - ¦ ¦ ¦ ¦--expr: 1:2 [0/0] {65} - ¦ ¦ ¦ ¦ ¦--expr: 1 [0/0] {67} - ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {66} - ¦ ¦ ¦ ¦ ¦--':': : [0/0] {68} - ¦ ¦ ¦ ¦ °--expr: 2 [0/0] {70} - ¦ ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {69} - ¦ ¦ ¦ °--']': ] [0/0] {71} - ¦ ¦ ¦--',': , [0/0] {72} - ¦ ¦ ¦--expr: !! ! [0/0] {73} - ¦ ¦ ¦ ¦--'!': ! [0/0] {74} - ¦ ¦ ¦ °--expr: ! ! n [0/0] {75} - ¦ ¦ ¦ ¦--'!': ! [0/1] {76} - ¦ ¦ ¦ °--expr: ! nam [0/0] {77} - ¦ ¦ ¦ ¦--'!': ! [0/1] {78} - ¦ ¦ ¦ °--expr: names [0/0] {80} - ¦ ¦ ¦ °--SYMBOL: names [0/0] {79} - ¦ ¦ °--')': ) [0/0] {81} - ¦ ¦--',': , [0/1] {82} - ¦ ¦--expr: 3 [0/0] {84} - ¦ ¦ °--NUM_CONST: 3 [0/0] {83} - ¦ °--')': ) [0/0] {85} - ¦--expr: head( [1/0] {86} - ¦ ¦--expr: head [0/0] {88} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: head [0/0] {87} - ¦ ¦--'(': ( [0/0] {89} - ¦ ¦--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: iris[ [0/0] {96} - ¦ ¦ ¦ ¦--expr: iris [0/0] {98} - ¦ ¦ ¦ ¦ °--SYMBOL: iris [0/0] {97} - ¦ ¦ ¦ ¦--'[': [ [0/0] {99} - ¦ ¦ ¦ ¦--',': , [0/0] {100} - ¦ ¦ ¦ ¦--expr: 1:2 [0/0] {101} - ¦ ¦ ¦ ¦ ¦--expr: 1 [0/0] {103} - ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {102} - ¦ ¦ ¦ ¦ ¦--':': : [0/0] {104} - ¦ ¦ ¦ ¦ °--expr: 2 [0/0] {106} - ¦ ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {105} - ¦ ¦ ¦ °--']': ] [0/0] {107} - ¦ ¦ ¦--',': , [0/1] {108} - ¦ ¦ ¦--expr: !!!na [0/0] {109} - ¦ ¦ ¦ ¦--'!': ! [0/0] {110} - ¦ ¦ ¦ °--expr: !!nam [0/0] {111} - ¦ ¦ ¦ ¦--'!': ! [0/0] {112} - ¦ ¦ ¦ °--expr: !name [0/0] {113} - ¦ ¦ ¦ ¦--'!': ! [0/0] {114} - ¦ ¦ ¦ °--expr: names [0/0] {116} - ¦ ¦ ¦ °--SYMBOL: names [0/0] {115} - ¦ ¦ °--')': ) [0/0] {117} - ¦ ¦--',': , [0/1] {118} - ¦ ¦--expr: 3 [0/0] {120} - ¦ ¦ °--NUM_CONST: 3 [0/0] {119} - ¦ °--')': ) [0/0] {121} - °--expr: my_su [1/0] {122} - ¦--expr: my_su [0/1] {124} - ¦ °--SYMBOL: my_su [0/0] {123} - ¦--LEFT_ASSIGN: <- [0/1] {125} - °--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: { - d [0/0] {133} - ¦--'{': { [0/2] {134} - ¦--expr: df %> [1/0] {135} - ¦ ¦--expr: df [0/1] {138} - ¦ ¦ °--SYMBOL: df [0/0] {137} - ¦ ¦--SPECIAL-PIPE: %>% [0/4] {139} - ¦ ¦--expr: group [1/1] {140} - ¦ ¦ ¦--expr: group [0/0] {142} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: group [0/0] {141} - ¦ ¦ ¦--'(': ( [0/1] {143} - ¦ ¦ ¦--expr: ! ! g [0/0] {144} - ¦ ¦ ¦ ¦--'!': ! [0/1] {145} - ¦ ¦ ¦ °--expr: ! gro [0/0] {146} - ¦ ¦ ¦ ¦--'!': ! [0/1] {147} - ¦ ¦ ¦ °--expr: group [0/0] {149} - ¦ ¦ ¦ °--SYMBOL: group [0/0] {148} - ¦ ¦ °--')': ) [0/0] {150} - ¦ ¦--SPECIAL-PIPE: %>% [0/4] {151} - ¦ °--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: mean( [0/0] {158} - ¦ ¦ ¦--expr: mean [0/0] {160} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: mean [0/0] {159} - ¦ ¦ ¦--'(': ( [0/0] {161} - ¦ ¦ ¦--expr: a [0/0] {163} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {162} - ¦ ¦ °--')': ) [0/0] {164} - ¦ °--')': ) [0/0] {165} - °--'}': } [1/0] {166} diff --git a/tests/testthat/tidyeval/eq_sub_and_comma-in_tree b/tests/testthat/tidyeval/eq_sub_and_comma-in_tree deleted file mode 100644 index f707a6e07..000000000 --- a/tests/testthat/tidyeval/eq_sub_and_comma-in_tree +++ /dev/null @@ -1,24 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: a <- [0/0] {1} - ¦--expr: a [0/1] {3} - ¦ °--SYMBOL: a [0/0] {2} - ¦--LEFT_ASSIGN: <- [0/1] {4} - °--expr: funct [0/0] {5} - ¦--FUNCTION: funct [0/0] {6} - ¦--'(': ( [0/0] {7} - ¦--')': ) [0/1] {8} - °--expr: { - d [0/0] {9} - ¦--'{': { [0/2] {10} - ¦--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} - ¦ ¦--EQ_SUB: = [0/0] {16} - ¦ ¦--',': , [0/4] {17} - ¦ ¦--SYMBOL_SUB: c [1/1] {18} - ¦ ¦--EQ_SUB: = [0/0] {19} - ¦ ¦--',': , [0/2] {20} - ¦ °--')': ) [1/0] {21} - °--'}': } [1/0] {22} diff --git a/tests/testthat/tidyeval/setting_var_names-in_tree b/tests/testthat/tidyeval/setting_var_names-in_tree deleted file mode 100644 index 32cc2cfda..000000000 --- a/tests/testthat/tidyeval/setting_var_names-in_tree +++ /dev/null @@ -1,47 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: mtcar [0/0] {1} - ¦--expr: mtcar [0/1] {4} - ¦ °--SYMBOL: mtcar [0/0] {3} - ¦--SPECIAL-PIPE: %>% [0/2] {5} - ¦--expr: group [1/1] {6} - ¦ ¦--expr: group [0/0] {8} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: group [0/0] {7} - ¦ ¦--'(': ( [0/0] {9} - ¦ ¦--expr: am [0/0] {11} - ¦ ¦ °--SYMBOL: am [0/0] {10} - ¦ °--')': ) [0/0] {12} - ¦--SPECIAL-PIPE: %>% [0/2] {13} - °--expr: summa [1/0] {14} - ¦--expr: summa [0/0] {16} - ¦ °--SYMBOL_FUNCTION_CALL: summa [0/0] {15} - ¦--'(': ( [0/4] {17} - ¦--expr: !!mea [1/0] {18} - ¦ ¦--expr: !!mea [0/0] {19} - ¦ ¦ ¦--'!': ! [0/0] {20} - ¦ ¦ °--expr: !mean [0/0] {21} - ¦ ¦ ¦--'!': ! [0/0] {22} - ¦ ¦ °--expr: mean_ [0/0] {24} - ¦ ¦ °--SYMBOL: mean_ [0/0] {23} - ¦ ¦--LEFT_ASSIGN: := [0/0] {25} - ¦ °--expr: mean( [0/0] {26} - ¦ ¦--expr: mean [0/0] {28} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: mean [0/0] {27} - ¦ ¦--'(': ( [0/0] {29} - ¦ ¦--expr: cyl [0/0] {31} - ¦ ¦ °--SYMBOL: cyl [0/0] {30} - ¦ °--')': ) [0/0] {32} - ¦--',': , [0/4] {33} - ¦--expr: !!cou [1/2] {34} - ¦ ¦--expr: !!cou [0/4] {35} - ¦ ¦ ¦--'!': ! [0/0] {36} - ¦ ¦ °--expr: !coun [0/0] {37} - ¦ ¦ ¦--'!': ! [0/0] {38} - ¦ ¦ °--expr: count [0/0] {40} - ¦ ¦ °--SYMBOL: count [0/0] {39} - ¦ ¦--LEFT_ASSIGN: := [0/0] {41} - ¦ °--expr: n() [0/0] {42} - ¦ ¦--expr: n [0/0] {44} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: n [0/0] {43} - ¦ ¦--'(': ( [0/0] {45} - ¦ °--')': ) [0/0] {46} - °--')': ) [1/0] {47} 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 deleted file mode 100644 index 41937bcfc..000000000 --- a/tests/testthat/token_adding_removing/add_brackets_in_pipe-in_tree +++ /dev/null @@ -1,31 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: 1 %>% [0/0] {1} - ¦ ¦--expr: 1 [0/1] {3} - ¦ ¦ °--NUM_CONST: 1 [0/0] {2} - ¦ ¦--SPECIAL-PIPE: %>% [0/1] {4} - ¦ °--expr: 2 [0/0] {6} - ¦ °--NUM_CONST: 2 [0/0] {5} - ¦--expr: 1 %x% [1/0] {7} - ¦ ¦--expr: 1 [0/1] {9} - ¦ ¦ °--NUM_CONST: 1 [0/0] {8} - ¦ ¦--SPECIAL-OTHER: %x% [0/1] {10} - ¦ °--expr: 1 [0/0] {12} - ¦ °--NUM_CONST: 1 [0/0] {11} - ¦--expr: 1 %x% [1/0] {13} - ¦ ¦--expr: 1 [0/1] {15} - ¦ ¦ °--NUM_CONST: 1 [0/0] {14} - ¦ ¦--SPECIAL-OTHER: %x% [0/1] {16} - ¦ °--expr: y [0/0] {18} - ¦ °--SYMBOL: y [0/0] {17} - ¦--expr: 1 %>% [1/0] {19} - ¦ ¦--expr: 1 [0/1] {21} - ¦ ¦ °--NUM_CONST: 1 [0/0] {20} - ¦ ¦--SPECIAL-PIPE: %>% [0/1] {22} - ¦ °--expr: x [0/0] {24} - ¦ °--SYMBOL: x [0/0] {23} - °--expr: 1 %s% [1/0] {25} - ¦--expr: 1 [0/1] {27} - ¦ °--NUM_CONST: 1 [0/0] {26} - ¦--SPECIAL-OTHER: %s% [0/1] {28} - °--expr: 1 [0/0] {30} - °--NUM_CONST: 1 [0/0] {29} diff --git a/tests/testthat/token_adding_removing/add_brackets_in_pipe-stylerignore-in_tree b/tests/testthat/token_adding_removing/add_brackets_in_pipe-stylerignore-in_tree deleted file mode 100644 index 0e89e475e..000000000 --- a/tests/testthat/token_adding_removing/add_brackets_in_pipe-stylerignore-in_tree +++ /dev/null @@ -1,163 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: # sty [0/0] {1} - ¦--expr: aflh( [1/0] {2} - ¦ ¦--expr: aflh [0/0] {4} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: aflh [0/0] {3} - ¦ ¦--'(': ( [0/0] {5} - ¦ ¦--expr: { - i [0/0] {6} - ¦ ¦ ¦--'{': { [0/2] {7} - ¦ ¦ ¦--expr: isfri [1/0] {8} - ¦ ¦ ¦ ¦--expr: isfri [0/1] {14} - ¦ ¦ ¦ ¦ °--SYMBOL: isfri [0/0] {13} - ¦ ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/4] {15} - ¦ ¦ ¦ ¦--COMMENT: # com [1/4] {16} - ¦ ¦ ¦ ¦--expr: tjnfa [1/1] {17} - ¦ ¦ ¦ ¦ ¦--expr: tjnfa [0/0] {19} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: tjnfa [0/0] {18} - ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {20} - ¦ ¦ ¦ ¦ °--')': ) [0/0] {21} - ¦ ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/1] {22} - ¦ ¦ ¦ ¦--COMMENT: # com [0/4] {23} - ¦ ¦ ¦ ¦--expr: tjnfa [1/1] {24} - ¦ ¦ ¦ ¦ ¦--expr: tjnfa [0/0] {26} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: tjnfa [0/0] {25} - ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {27} - ¦ ¦ ¦ ¦ °--')': ) [0/0] {28} - ¦ ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/4] {29} - ¦ ¦ ¦ ¦--expr: tjnfx [1/1] {30} - ¦ ¦ ¦ ¦ ¦--expr: tjnfx [0/0] {32} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: tjnfx [0/0] {31} - ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {33} - ¦ ¦ ¦ ¦ °--')': ) [0/0] {34} - ¦ ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/4] {35} - ¦ ¦ ¦ ¦--expr: tf797 [1/1] {36} - ¦ ¦ ¦ ¦ ¦--expr: tf797 [0/0] {38} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: tf797 [0/0] {37} - ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {39} - ¦ ¦ ¦ ¦ °--')': ) [0/0] {40} - ¦ ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/1] {41} - ¦ ¦ ¦ ¦--COMMENT: # mor [0/4] {42} - ¦ ¦ ¦ ¦--COMMENT: # com [1/4] {43} - ¦ ¦ ¦ °--expr: yyexp [1/0] {44} - ¦ ¦ ¦ ¦--expr: yyexp [0/0] {46} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: yyexp [0/0] {45} - ¦ ¦ ¦ ¦--'(': ( [0/0] {47} - ¦ ¦ ¦ °--')': ) [0/0] {48} - ¦ ¦ °--'}': } [1/0] {49} - ¦ °--')': ) [0/0] {50} - ¦--COMMENT: # sty [1/0] {51} - ¦--expr: aflh( [3/0] {52} - ¦ ¦--expr: aflh [0/0] {54} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: aflh [0/0] {53} - ¦ ¦--'(': ( [0/0] {55} - ¦ ¦--expr: { - i [0/0] {56} - ¦ ¦ ¦--'{': { [0/2] {57} - ¦ ¦ ¦--expr: isfri [1/0] {58} - ¦ ¦ ¦ ¦--expr: isfri [0/1] {64} - ¦ ¦ ¦ ¦ °--SYMBOL: isfri [0/0] {63} - ¦ ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/4] {65} - ¦ ¦ ¦ ¦--COMMENT: # com [1/4] {66} - ¦ ¦ ¦ ¦--expr: tjnfa [1/1] {67} - ¦ ¦ ¦ ¦ ¦--expr: tjnfa [0/0] {69} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: tjnfa [0/0] {68} - ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {70} - ¦ ¦ ¦ ¦ °--')': ) [0/0] {71} - ¦ ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/1] {72} - ¦ ¦ ¦ ¦--COMMENT: # com [0/4] {73} - ¦ ¦ ¦ ¦--expr: tjnfa [1/1] {74} - ¦ ¦ ¦ ¦ ¦--expr: tjnfa [0/0] {76} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: tjnfa [0/0] {75} - ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {77} - ¦ ¦ ¦ ¦ °--')': ) [0/0] {78} - ¦ ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/4] {79} - ¦ ¦ ¦ ¦--expr: tjnfx [1/1] {80} - ¦ ¦ ¦ ¦ ¦--expr: tjnfx [0/0] {82} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: tjnfx [0/0] {81} - ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {83} - ¦ ¦ ¦ ¦ °--')': ) [0/0] {84} - ¦ ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/4] {85} - ¦ ¦ ¦ ¦--expr: tf797 [1/1] {86} - ¦ ¦ ¦ ¦ ¦--expr: tf797 [0/0] {88} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: tf797 [0/0] {87} - ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {89} - ¦ ¦ ¦ ¦ °--')': ) [0/0] {90} - ¦ ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/1] {91} - ¦ ¦ ¦ ¦--COMMENT: # mor [0/4] {92} - ¦ ¦ ¦ ¦--COMMENT: # com [1/4] {93} - ¦ ¦ ¦ °--expr: yyexp [1/0] {94} - ¦ ¦ ¦ ¦--expr: yyexp [0/0] {96} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: yyexp [0/0] {95} - ¦ ¦ ¦ ¦--'(': ( [0/0] {97} - ¦ ¦ ¦ °--')': ) [0/0] {98} - ¦ ¦ °--'}': } [1/0] {99} - ¦ °--')': ) [0/0] {100} - ¦--COMMENT: # sty [3/0] {101} - ¦--expr: aflh( [1/0] {102} - ¦ ¦--expr: aflh [0/0] {104} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: aflh [0/0] {103} - ¦ ¦--'(': ( [0/0] {105} - ¦ ¦--expr: { - i [0/0] {106} - ¦ ¦ ¦--'{': { [0/2] {107} - ¦ ¦ ¦--expr: isfri [1/1] {108} - ¦ ¦ ¦ ¦--expr: isfri [0/1] {114} - ¦ ¦ ¦ ¦ °--SYMBOL: isfri [0/0] {113} - ¦ ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/4] {115} - ¦ ¦ ¦ ¦--COMMENT: # com [1/4] {116} - ¦ ¦ ¦ ¦--expr: tjnfa [1/1] {118} - ¦ ¦ ¦ ¦ °--SYMBOL: tjnfa [0/0] {117} - ¦ ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/4] {119} - ¦ ¦ ¦ ¦--expr: tjnfa [1/1] {121} - ¦ ¦ ¦ ¦ °--SYMBOL: tjnfa [0/0] {120} - ¦ ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/4] {122} - ¦ ¦ ¦ ¦--expr: tjnfx [1/1] {124} - ¦ ¦ ¦ ¦ °--SYMBOL: tjnfx [0/0] {123} - ¦ ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/4] {125} - ¦ ¦ ¦ ¦--COMMENT: # mor [1/4] {126} - ¦ ¦ ¦ ¦--expr: tf797 [1/1] {128} - ¦ ¦ ¦ ¦ °--SYMBOL: tf797 [0/0] {127} - ¦ ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/1] {129} - ¦ ¦ ¦ ¦--COMMENT: # com [0/4] {130} - ¦ ¦ ¦ ¦--COMMENT: # her [1/4] {131} - ¦ ¦ ¦ °--expr: yyexp [1/0] {133} - ¦ ¦ ¦ °--SYMBOL: yyexp [0/0] {132} - ¦ ¦ ¦--COMMENT: # [0/2] {134} - ¦ ¦ ¦--COMMENT: # wha [1/0] {135} - ¦ ¦ °--'}': } [1/0] {136} - ¦ °--')': ) [0/0] {137} - ¦--COMMENT: # sty [1/0] {138} - °--expr: aflh( [3/0] {139} - ¦--expr: aflh [0/0] {141} - ¦ °--SYMBOL_FUNCTION_CALL: aflh [0/0] {140} - ¦--'(': ( [0/0] {142} - ¦--expr: { - i [0/0] {143} - ¦ ¦--'{': { [0/2] {144} - ¦ ¦--expr: isfri [1/1] {145} - ¦ ¦ ¦--expr: isfri [0/1] {151} - ¦ ¦ ¦ °--SYMBOL: isfri [0/0] {150} - ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/4] {152} - ¦ ¦ ¦--COMMENT: # com [1/4] {153} - ¦ ¦ ¦--expr: tjnfa [1/1] {155} - ¦ ¦ ¦ °--SYMBOL: tjnfa [0/0] {154} - ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/4] {156} - ¦ ¦ ¦--expr: tjnfa [1/1] {158} - ¦ ¦ ¦ °--SYMBOL: tjnfa [0/0] {157} - ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/4] {159} - ¦ ¦ ¦--expr: tjnfx [1/1] {161} - ¦ ¦ ¦ °--SYMBOL: tjnfx [0/0] {160} - ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/4] {162} - ¦ ¦ ¦--COMMENT: # mor [1/4] {163} - ¦ ¦ ¦--expr: tf797 [1/1] {165} - ¦ ¦ ¦ °--SYMBOL: tf797 [0/0] {164} - ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/1] {166} - ¦ ¦ ¦--COMMENT: # com [0/4] {167} - ¦ ¦ ¦--COMMENT: # her [1/4] {168} - ¦ ¦ °--expr: yyexp [1/0] {170} - ¦ ¦ °--SYMBOL: yyexp [0/0] {169} - ¦ ¦--COMMENT: # [0/2] {171} - ¦ ¦--COMMENT: # wha [1/0] {172} - ¦ °--'}': } [1/0] {173} - °--')': ) [0/0] {174} diff --git a/tests/testthat/token_adding_removing/double_braces-in_tree b/tests/testthat/token_adding_removing/double_braces-in_tree deleted file mode 100644 index 6ae6d16e2..000000000 --- a/tests/testthat/token_adding_removing/double_braces-in_tree +++ /dev/null @@ -1,27 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: if (X [0/0] {1} - ¦ ¦--IF: if [0/1] {2} - ¦ ¦--'(': ( [0/0] {3} - ¦ ¦--expr: X [0/0] {5} - ¦ ¦ °--SYMBOL: X [0/0] {4} - ¦ ¦--')': ) [0/2] {6} - ¦ °--expr: retur [1/0] {7} - ¦ ¦--expr: retur [0/0] {9} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: retur [0/0] {8} - ¦ ¦--'(': ( [0/0] {10} - ¦ ¦--expr: TRUE [0/0] {12} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {11} - ¦ °--')': ) [0/0] {13} - °--expr: if (X [2/0] {14} - ¦--IF: if [0/1] {15} - ¦--'(': ( [0/0] {16} - ¦--expr: X [0/0] {18} - ¦ °--SYMBOL: X [0/0] {17} - ¦--')': ) [0/1] {19} - °--expr: retur [0/0] {20} - ¦--expr: retur [0/0] {22} - ¦ °--SYMBOL_FUNCTION_CALL: retur [0/0] {21} - ¦--'(': ( [0/0] {23} - ¦--expr: FALSE [0/0] {25} - ¦ °--NUM_CONST: FALSE [0/0] {24} - °--')': ) [0/0] {26} diff --git a/tests/testthat/token_adding_removing/else-pipe-in_tree b/tests/testthat/token_adding_removing/else-pipe-in_tree deleted file mode 100644 index c8f1974f9..000000000 --- a/tests/testthat/token_adding_removing/else-pipe-in_tree +++ /dev/null @@ -1,41 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: mtcar [0/0] {1} - ¦ ¦--expr: mtcar [0/1] {4} - ¦ ¦ °--SYMBOL: mtcar [0/0] {3} - ¦ ¦--SPECIAL-PIPE: %>% [0/2] {5} - ¦ ¦--expr: mutat [1/1] {6} - ¦ ¦ ¦--expr: mutat [0/0] {8} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: mutat [0/0] {7} - ¦ ¦ ¦--'(': ( [0/4] {9} - ¦ ¦ ¦--SYMBOL_SUB: x [1/1] {10} - ¦ ¦ ¦--EQ_SUB: = [0/1] {11} - ¦ ¦ ¦--expr: 1 [0/2] {13} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {12} - ¦ ¦ °--')': ) [1/0] {14} - ¦ ¦--SPECIAL-PIPE: %>% [0/2] {15} - ¦ °--expr: if (F [1/0] {16} - ¦ ¦--IF: if [0/1] {17} - ¦ ¦--'(': ( [0/0] {18} - ¦ ¦--expr: FALSE [0/0] {20} - ¦ ¦ °--NUM_CONST: FALSE [0/0] {19} - ¦ ¦--')': ) [0/1] {21} - ¦ ¦--expr: { - [0/1] {22} - ¦ ¦ ¦--'{': { [0/4] {23} - ¦ ¦ ¦--expr: mutat [1/2] {24} - ¦ ¦ ¦ ¦--expr: mutat [0/0] {26} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: mutat [0/0] {25} - ¦ ¦ ¦ ¦--'(': ( [0/0] {27} - ¦ ¦ ¦ ¦--expr: . [0/0] {29} - ¦ ¦ ¦ ¦ °--SYMBOL: . [0/0] {28} - ¦ ¦ ¦ ¦--',': , [0/1] {30} - ¦ ¦ ¦ ¦--SYMBOL_SUB: count [0/1] {31} - ¦ ¦ ¦ ¦--EQ_SUB: = [0/1] {32} - ¦ ¦ ¦ ¦--expr: 2 [0/0] {34} - ¦ ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {33} - ¦ ¦ ¦ °--')': ) [0/0] {35} - ¦ ¦ °--'}': } [1/0] {36} - ¦ ¦--ELSE: else [0/1] {37} - ¦ °--expr: . [0/0] {39} - ¦ °--SYMBOL: . [0/0] {38} - °--COMMENT: # add [2/0] {40} diff --git a/tests/testthat/token_adding_removing/for_while_stylerignore-in_tree b/tests/testthat/token_adding_removing/for_while_stylerignore-in_tree deleted file mode 100644 index ef9ea4bbb..000000000 --- a/tests/testthat/token_adding_removing/for_while_stylerignore-in_tree +++ /dev/null @@ -1,180 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: while [0/0] {1} - ¦ ¦--WHILE: while [0/0] {2} - ¦ ¦--'(': ( [0/0] {3} - ¦ ¦--expr: TRUE [0/0] {5} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {4} - ¦ ¦--')': ) [0/2] {6} - ¦ °--expr: 3 [1/0] {8} - ¦ °--NUM_CONST: 3 [0/0] {7} - ¦--COMMENT: # sty [2/0] {9} - ¦--expr: while [1/0] {10} - ¦ ¦--WHILE: while [0/0] {11} - ¦ ¦--'(': ( [0/0] {12} - ¦ ¦--expr: TRUE [0/0] {14} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {13} - ¦ ¦--')': ) [0/2] {15} - ¦ °--expr: 3 [1/0] {17} - ¦ °--NUM_CONST: 3 [0/0] {16} - ¦--COMMENT: # sty [2/0] {18} - ¦--expr: while [1/0] {19} - ¦ ¦--WHILE: while [0/0] {20} - ¦ ¦--'(': ( [0/0] {21} - ¦ ¦--expr: TRUE [0/0] {23} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {22} - ¦ ¦--')': ) [0/2] {24} - ¦ ¦--COMMENT: # sty [1/2] {25} - ¦ °--expr: 3 [1/0] {27} - ¦ °--NUM_CONST: 3 [0/0] {26} - ¦--COMMENT: # sty [2/0] {28} - ¦--expr: for ( [2/0] {29} - ¦ ¦--FOR: for [0/1] {30} - ¦ ¦--forcond: (i # [0/2] {31} - ¦ ¦ ¦--'(': ( [0/0] {32} - ¦ ¦ ¦--SYMBOL: i [0/1] {33} - ¦ ¦ ¦--COMMENT: # sty [0/5] {34} - ¦ ¦ ¦--IN: in [1/1] {35} - ¦ ¦ ¦--expr: 3 [0/0] {37} - ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {36} - ¦ ¦ °--')': ) [0/0] {38} - ¦ °--expr: 3 [1/0] {40} - ¦ °--NUM_CONST: 3 [0/0] {39} - ¦--COMMENT: # sty [2/0] {41} - ¦--expr: for ( [1/0] {42} - ¦ ¦--FOR: for [0/1] {43} - ¦ ¦--forcond: (i - [0/2] {44} - ¦ ¦ ¦--'(': ( [0/0] {45} - ¦ ¦ ¦--SYMBOL: i [0/5] {46} - ¦ ¦ ¦--IN: in [1/1] {47} - ¦ ¦ ¦--expr: 3 [0/0] {49} - ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {48} - ¦ ¦ °--')': ) [0/0] {50} - ¦ °--expr: 3 [1/0] {52} - ¦ °--NUM_CONST: 3 [0/0] {51} - ¦--COMMENT: # sty [1/0] {53} - ¦--COMMENT: # sty [3/0] {54} - ¦--expr: for ( [1/0] {55} - ¦ ¦--FOR: for [0/1] {56} - ¦ ¦--forcond: (i - [0/2] {57} - ¦ ¦ ¦--'(': ( [0/0] {58} - ¦ ¦ ¦--SYMBOL: i [0/5] {59} - ¦ ¦ ¦--IN: in [1/1] {60} - ¦ ¦ ¦--expr: 3 [0/0] {62} - ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {61} - ¦ ¦ °--')': ) [0/0] {63} - ¦ °--expr: { - 3 [0/0] {64} - ¦ ¦--'{': { [0/2] {65} - ¦ ¦--expr: 3 [1/0] {67} - ¦ ¦ °--NUM_CONST: 3 [0/0] {66} - ¦ °--'}': } [0/0] {68} - ¦--COMMENT: # sty [1/0] {69} - ¦--expr: for ( [3/1] {70} - ¦ ¦--FOR: for [0/1] {71} - ¦ ¦--forcond: (i - [0/2] {72} - ¦ ¦ ¦--'(': ( [0/0] {73} - ¦ ¦ ¦--SYMBOL: i [0/5] {74} - ¦ ¦ ¦--IN: in [1/1] {75} - ¦ ¦ ¦--expr: 3 [0/0] {77} - ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {76} - ¦ ¦ °--')': ) [0/0] {78} - ¦ °--expr: { - 3 [0/0] {79} - ¦ ¦--'{': { [0/2] {80} - ¦ ¦--expr: 3 [1/0] {82} - ¦ ¦ °--NUM_CONST: 3 [0/0] {81} - ¦ °--'}': } [0/0] {83} - ¦--COMMENT: # sty [0/0] {84} - ¦--expr: for ( [2/0] {85} - ¦ ¦--FOR: for [0/1] {86} - ¦ ¦--forcond: (i - [0/2] {87} - ¦ ¦ ¦--'(': ( [0/0] {88} - ¦ ¦ ¦--SYMBOL: i [0/5] {89} - ¦ ¦ ¦--IN: in [1/1] {90} - ¦ ¦ ¦--expr: 3 [0/0] {92} - ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {91} - ¦ ¦ °--')': ) [0/0] {93} - ¦ °--expr: {# st [0/0] {94} - ¦ ¦--'{': { [0/0] {95} - ¦ ¦--COMMENT: # sty [0/2] {96} - ¦ ¦--expr: 3 [1/0] {98} - ¦ ¦ °--NUM_CONST: 3 [0/0] {97} - ¦ °--'}': } [0/0] {99} - ¦--expr: for ( [2/0] {100} - ¦ ¦--FOR: for [0/1] {101} - ¦ ¦--forcond: (i# s [0/2] {102} - ¦ ¦ ¦--'(': ( [0/0] {103} - ¦ ¦ ¦--SYMBOL: i [0/0] {104} - ¦ ¦ ¦--COMMENT: # sty [0/5] {105} - ¦ ¦ ¦--IN: in [1/1] {106} - ¦ ¦ ¦--expr: 3 [0/0] {108} - ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {107} - ¦ ¦ °--')': ) [0/0] {109} - ¦ °--expr: { - 3 [0/0] {110} - ¦ ¦--'{': { [0/2] {111} - ¦ ¦--expr: 3 [1/0] {113} - ¦ ¦ °--NUM_CONST: 3 [0/0] {112} - ¦ °--'}': } [0/0] {114} - ¦--expr: while [3/0] {115} - ¦ ¦--WHILE: while [0/0] {116} - ¦ ¦--'(': ( [0/2] {117} - ¦ ¦--expr: FALSE [1/0] {119} - ¦ ¦ °--NUM_CONST: FALSE [0/0] {118} - ¦ ¦--')': ) [1/1] {120} - ¦ °--expr: { - # [0/0] {121} - ¦ ¦--'{': { [0/2] {122} - ¦ ¦--COMMENT: # sty [1/2] {123} - ¦ ¦--expr: 1 [1/2] {125} - ¦ ¦ °--NUM_CONST: 1 [0/0] {124} - ¦ ¦--COMMENT: # sty [1/0] {126} - ¦ °--'}': } [1/0] {127} - ¦--expr: while [2/0] {128} - ¦ ¦--WHILE: while [0/0] {129} - ¦ ¦--'(': ( [0/2] {130} - ¦ ¦--expr: FALSE [1/1] {132} - ¦ ¦ °--NUM_CONST: FALSE [0/0] {131} - ¦ ¦--COMMENT: # com [0/0] {133} - ¦ ¦--')': ) [1/1] {134} - ¦ °--expr: { - # [0/0] {135} - ¦ ¦--'{': { [0/2] {136} - ¦ ¦--COMMENT: # sty [1/2] {137} - ¦ ¦--expr: 1 [1/2] {139} - ¦ ¦ °--NUM_CONST: 1 [0/0] {138} - ¦ ¦--COMMENT: # sty [1/0] {140} - ¦ °--'}': } [1/0] {141} - ¦--expr: while [2/0] {142} - ¦ ¦--WHILE: while [0/0] {143} - ¦ ¦--'(': ( [0/1] {144} - ¦ ¦--COMMENT: # sty [0/2] {145} - ¦ ¦--expr: FALSE [1/0] {147} - ¦ ¦ °--NUM_CONST: FALSE [0/0] {146} - ¦ ¦--')': ) [1/1] {148} - ¦ °--expr: { - - [0/0] {149} - ¦ ¦--'{': { [0/2] {150} - ¦ ¦--expr: 1 [2/0] {152} - ¦ ¦ °--NUM_CONST: 1 [0/0] {151} - ¦ °--'}': } [2/0] {153} - ¦--expr: while [2/0] {154} - ¦ ¦--WHILE: while [0/0] {155} - ¦ ¦--'(': ( [0/2] {156} - ¦ ¦--COMMENT: # sty [1/2] {157} - ¦ ¦--expr: FALSE [1/0] {159} - ¦ ¦ °--NUM_CONST: FALSE [0/0] {158} - ¦ ¦--')': ) [1/1] {160} - ¦ °--expr: { - - [0/0] {161} - ¦ ¦--'{': { [0/2] {162} - ¦ ¦--expr: 1 [2/0] {164} - ¦ ¦ °--NUM_CONST: 1 [0/0] {163} - ¦ °--'}': } [2/0] {165} - °--COMMENT: # sty [1/0] {166} diff --git a/tests/testthat/token_adding_removing/if-else-comma-in_tree b/tests/testthat/token_adding_removing/if-else-comma-in_tree deleted file mode 100644 index 00da35b6a..000000000 --- a/tests/testthat/token_adding_removing/if-else-comma-in_tree +++ /dev/null @@ -1,89 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: call( [0/0] {1} - ¦ ¦--expr: call [0/0] {3} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {2} - ¦ ¦--'(': ( [0/2] {4} - ¦ ¦--expr: if (x [1/0] {5} - ¦ ¦ ¦--IF: if [0/1] {6} - ¦ ¦ ¦--'(': ( [0/0] {7} - ¦ ¦ ¦--expr: x [0/0] {9} - ¦ ¦ ¦ °--SYMBOL: x [0/0] {8} - ¦ ¦ ¦--')': ) [0/4] {10} - ¦ ¦ °--expr: y [1/0] {12} - ¦ ¦ °--SYMBOL: y [0/0] {11} - ¦ ¦--',': , [0/2] {13} - ¦ ¦--expr: if(x) [1/0] {14} - ¦ ¦ ¦--IF: if [0/0] {15} - ¦ ¦ ¦--'(': ( [0/0] {16} - ¦ ¦ ¦--expr: x [0/0] {18} - ¦ ¦ ¦ °--SYMBOL: x [0/0] {17} - ¦ ¦ ¦--')': ) [0/4] {19} - ¦ ¦ °--expr: z [1/0] {21} - ¦ ¦ °--SYMBOL: z [0/0] {20} - ¦ °--')': ) [1/0] {22} - ¦--expr: call( [2/0] {23} - ¦ ¦--expr: call [0/0] {25} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {24} - ¦ ¦--'(': ( [0/0] {26} - ¦ ¦--expr: if (x [0/1] {27} - ¦ ¦ ¦--IF: if [0/1] {28} - ¦ ¦ ¦--'(': ( [0/0] {29} - ¦ ¦ ¦--expr: x [0/0] {31} - ¦ ¦ ¦ °--SYMBOL: x [0/0] {30} - ¦ ¦ ¦--')': ) [0/1] {32} - ¦ ¦ °--expr: y [0/0] {34} - ¦ ¦ °--SYMBOL: y [0/0] {33} - ¦ ¦--',': , [0/5] {35} - ¦ ¦--expr: if(x) [1/1] {36} - ¦ ¦ ¦--IF: if [0/0] {37} - ¦ ¦ ¦--'(': ( [0/0] {38} - ¦ ¦ ¦--expr: x [0/0] {40} - ¦ ¦ ¦ °--SYMBOL: x [0/0] {39} - ¦ ¦ ¦--')': ) [0/1] {41} - ¦ ¦ °--expr: z [0/0] {43} - ¦ ¦ °--SYMBOL: z [0/0] {42} - ¦ °--')': ) [0/0] {44} - ¦--expr: call( [2/0] {45} - ¦ ¦--expr: call [0/0] {47} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {46} - ¦ ¦--'(': ( [0/0] {48} - ¦ ¦--expr: if (x [0/0] {49} - ¦ ¦ ¦--IF: if [0/1] {50} - ¦ ¦ ¦--'(': ( [0/0] {51} - ¦ ¦ ¦--expr: x [0/0] {53} - ¦ ¦ ¦ °--SYMBOL: x [0/0] {52} - ¦ ¦ ¦--')': ) [0/1] {54} - ¦ ¦ °--expr: y [0/0] {56} - ¦ ¦ °--SYMBOL: y [0/0] {55} - ¦ ¦--',': , [0/5] {57} - ¦ ¦--expr: if(x) [1/1] {58} - ¦ ¦ ¦--IF: if [0/0] {59} - ¦ ¦ ¦--'(': ( [0/0] {60} - ¦ ¦ ¦--expr: x [0/0] {62} - ¦ ¦ ¦ °--SYMBOL: x [0/0] {61} - ¦ ¦ ¦--')': ) [0/1] {63} - ¦ ¦ °--expr: z [0/0] {65} - ¦ ¦ °--SYMBOL: z [0/0] {64} - ¦ °--')': ) [0/0] {66} - °--expr: call( [2/0] {67} - ¦--expr: call [0/0] {69} - ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {68} - ¦--'(': ( [0/0] {70} - ¦--expr: if (x [0/0] {71} - ¦ ¦--IF: if [0/1] {72} - ¦ ¦--'(': ( [0/0] {73} - ¦ ¦--expr: x [0/0] {75} - ¦ ¦ °--SYMBOL: x [0/0] {74} - ¦ ¦--')': ) [0/1] {76} - ¦ °--expr: y [0/0] {78} - ¦ °--SYMBOL: y [0/0] {77} - ¦--',': , [0/5] {79} - ¦--expr: if(x) [1/0] {80} - ¦ ¦--IF: if [0/0] {81} - ¦ ¦--'(': ( [0/0] {82} - ¦ ¦--expr: x [0/0] {84} - ¦ ¦ °--SYMBOL: x [0/0] {83} - ¦ ¦--')': ) [0/1] {85} - ¦ °--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 deleted file mode 100644 index ad8fd9ee7..000000000 --- a/tests/testthat/token_adding_removing/if_else_non_strict-in_tree +++ /dev/null @@ -1,173 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: { - i [0/0] {1} - ¦ ¦--'{': { [0/2] {2} - ¦ ¦--expr: if (T [1/0] {3} - ¦ ¦ ¦--IF: if [0/1] {4} - ¦ ¦ ¦--'(': ( [0/0] {5} - ¦ ¦ ¦--expr: TRUE [0/0] {7} - ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {6} - ¦ ¦ ¦--')': ) [0/4] {8} - ¦ ¦ ¦--expr: 3 [1/0] {10} - ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {9} - ¦ ¦ ¦--ELSE: else [1/0] {11} - ¦ ¦ °--expr: 5 [1/0] {13} - ¦ ¦ °--NUM_CONST: 5 [0/0] {12} - ¦ °--'}': } [1/0] {14} - ¦--expr: { - i [3/0] {15} - ¦ ¦--'{': { [0/2] {16} - ¦ ¦--expr: if (T [1/3] {17} - ¦ ¦ ¦--IF: if [0/1] {18} - ¦ ¦ ¦--'(': ( [0/0] {19} - ¦ ¦ ¦--expr: TRUE [0/0] {21} - ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {20} - ¦ ¦ ¦--')': ) [0/1] {22} - ¦ ¦ ¦--expr: { - [0/0] {23} - ¦ ¦ ¦ ¦--'{': { [0/4] {24} - ¦ ¦ ¦ ¦--expr: 3 [1/4] {26} - ¦ ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {25} - ¦ ¦ ¦ ¦--expr: a + b [1/3] {27} - ¦ ¦ ¦ ¦ ¦--expr: a [0/1] {29} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL: a [0/0] {28} - ¦ ¦ ¦ ¦ ¦--'+': + [0/1] {30} - ¦ ¦ ¦ ¦ °--expr: b [0/0] {32} - ¦ ¦ ¦ ¦ °--SYMBOL: b [0/0] {31} - ¦ ¦ ¦ °--'}': } [1/0] {33} - ¦ ¦ ¦--ELSE: else [0/4] {34} - ¦ ¦ °--expr: 5 [1/0] {36} - ¦ ¦ °--NUM_CONST: 5 [0/0] {35} - ¦ ¦--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: { - i [3/0] {43} - ¦ ¦--'{': { [0/2] {44} - ¦ ¦--expr: if (T [1/0] {45} - ¦ ¦ ¦--IF: if [0/1] {46} - ¦ ¦ ¦--'(': ( [0/0] {47} - ¦ ¦ ¦--expr: TRUE [0/0] {49} - ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {48} - ¦ ¦ ¦--')': ) [0/4] {50} - ¦ ¦ ¦--expr: 3 [1/2] {52} - ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {51} - ¦ ¦ ¦--ELSE: else [1/1] {53} - ¦ ¦ °--expr: { - [0/0] {54} - ¦ ¦ ¦--'{': { [0/4] {55} - ¦ ¦ ¦--expr: h() [1/4] {56} - ¦ ¦ ¦ ¦--expr: h [0/0] {58} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: h [0/0] {57} - ¦ ¦ ¦ ¦--'(': ( [0/0] {59} - ¦ ¦ ¦ °--')': ) [0/0] {60} - ¦ ¦ ¦--expr: 5 [1/1] {62} - ¦ ¦ ¦ °--NUM_CONST: 5 [0/0] {61} - ¦ ¦ °--'}': } [0/0] {63} - ¦ °--'}': } [1/0] {64} - ¦--expr: { - i [3/0] {65} - ¦ ¦--'{': { [0/2] {66} - ¦ ¦--expr: if (T [1/0] {67} - ¦ ¦ ¦--IF: if [0/1] {68} - ¦ ¦ ¦--'(': ( [0/0] {69} - ¦ ¦ ¦--expr: TRUE [0/0] {71} - ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {70} - ¦ ¦ ¦--')': ) [0/1] {72} - ¦ ¦ ¦--expr: { - [0/0] {73} - ¦ ¦ ¦ ¦--'{': { [0/4] {74} - ¦ ¦ ¦ ¦--expr: 3 [1/2] {76} - ¦ ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {75} - ¦ ¦ ¦ °--'}': } [1/0] {77} - ¦ ¦ ¦--ELSE: else [0/1] {78} - ¦ ¦ °--expr: { - [0/0] {79} - ¦ ¦ ¦--'{': { [0/4] {80} - ¦ ¦ ¦--expr: s() [1/4] {81} - ¦ ¦ ¦ ¦--expr: s [0/0] {83} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: s [0/0] {82} - ¦ ¦ ¦ ¦--'(': ( [0/0] {84} - ¦ ¦ ¦ °--')': ) [0/0] {85} - ¦ ¦ ¦--expr: 5 [1/1] {87} - ¦ ¦ ¦ °--NUM_CONST: 5 [0/0] {86} - ¦ ¦ °--'}': } [0/0] {88} - ¦ °--'}': } [1/0] {89} - ¦--expr: if (T [2/0] {90} - ¦ ¦--IF: if [0/1] {91} - ¦ ¦--'(': ( [0/0] {92} - ¦ ¦--expr: TRUE [0/0] {94} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {93} - ¦ ¦--')': ) [0/2] {95} - ¦ ¦--expr: 1 [1/1] {97} - ¦ ¦ °--NUM_CONST: 1 [0/0] {96} - ¦ ¦--ELSE: else [0/4] {98} - ¦ °--expr: 3 [1/0] {100} - ¦ °--NUM_CONST: 3 [0/0] {99} - ¦--expr: if (F [2/0] {101} - ¦ ¦--IF: if [0/1] {102} - ¦ ¦--'(': ( [0/0] {103} - ¦ ¦--expr: FALSE [0/0] {105} - ¦ ¦ °--NUM_CONST: FALSE [0/0] {104} - ¦ ¦--')': ) [0/2] {106} - ¦ ¦--expr: 1 + a [1/1] {107} - ¦ ¦ ¦--expr: 1 [0/1] {109} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {108} - ¦ ¦ ¦--'+': + [0/1] {110} - ¦ ¦ °--expr: a * ( [0/0] {111} - ¦ ¦ ¦--expr: a [0/1] {113} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {112} - ¦ ¦ ¦--'*': * [0/1] {114} - ¦ ¦ °--expr: ( 31/ [0/0] {115} - ¦ ¦ ¦--'(': ( [0/1] {116} - ¦ ¦ ¦--expr: 31/2 [0/0] {117} - ¦ ¦ ¦ ¦--expr: 31 [0/0] {119} - ¦ ¦ ¦ ¦ °--NUM_CONST: 31 [0/0] {118} - ¦ ¦ ¦ ¦--'/': / [0/0] {120} - ¦ ¦ ¦ °--expr: 2 [0/0] {122} - ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {121} - ¦ ¦ °--')': ) [0/0] {123} - ¦ ¦--ELSE: else [0/4] {124} - ¦ °--expr: 3^k [1/0] {125} - ¦ ¦--expr: 3 [0/0] {127} - ¦ ¦ °--NUM_CONST: 3 [0/0] {126} - ¦ ¦--'^': ^ [0/0] {128} - ¦ °--expr: k [0/0] {130} - ¦ °--SYMBOL: k [0/0] {129} - ¦--expr: if (T [3/0] {131} - ¦ ¦--IF: if [0/1] {132} - ¦ ¦--'(': ( [0/0] {133} - ¦ ¦--expr: TRUE [0/0] {135} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {134} - ¦ ¦--')': ) [0/2] {136} - ¦ ¦--expr: 1+1 [1/1] {137} - ¦ ¦ ¦--expr: 1 [0/0] {139} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {138} - ¦ ¦ ¦--'+': + [0/0] {140} - ¦ ¦ °--expr: 1 [0/0] {142} - ¦ ¦ °--NUM_CONST: 1 [0/0] {141} - ¦ ¦--ELSE: else [0/4] {143} - ¦ °--expr: 3 [1/0] {145} - ¦ °--NUM_CONST: 3 [0/0] {144} - °--expr: if (T [2/0] {146} - ¦--IF: if [0/1] {147} - ¦--'(': ( [0/0] {148} - ¦--expr: TRUE [0/0] {150} - ¦ °--NUM_CONST: TRUE [0/0] {149} - ¦--')': ) [0/2] {151} - ¦--expr: 1 + 1 [1/1] {152} - ¦ ¦--expr: 1 [0/1] {154} - ¦ ¦ °--NUM_CONST: 1 [0/0] {153} - ¦ ¦--'+': + [0/1] {155} - ¦ °--expr: 1 [0/0] {157} - ¦ °--NUM_CONST: 1 [0/0] {156} - ¦--ELSE: else [0/1] {158} - °--expr: a +4 [0/0] {159} - ¦--expr: a [0/1] {161} - ¦ °--SYMBOL: a [0/0] {160} - ¦--'+': + [0/0] {162} - °--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 deleted file mode 100644 index e5d3a6155..000000000 --- a/tests/testthat/token_adding_removing/if_else_strict-in_tree +++ /dev/null @@ -1,173 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: { - i [0/0] {1} - ¦ ¦--'{': { [0/2] {2} - ¦ ¦--expr: if (T [1/0] {3} - ¦ ¦ ¦--IF: if [0/1] {4} - ¦ ¦ ¦--'(': ( [0/0] {5} - ¦ ¦ ¦--expr: TRUE [0/0] {7} - ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {6} - ¦ ¦ ¦--')': ) [0/4] {8} - ¦ ¦ ¦--expr: 3 [1/0] {10} - ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {9} - ¦ ¦ ¦--ELSE: else [1/0] {11} - ¦ ¦ °--expr: 5 [1/0] {13} - ¦ ¦ °--NUM_CONST: 5 [0/0] {12} - ¦ °--'}': } [1/0] {14} - ¦--expr: { - i [3/0] {15} - ¦ ¦--'{': { [0/2] {16} - ¦ ¦--expr: if (T [1/3] {17} - ¦ ¦ ¦--IF: if [0/1] {18} - ¦ ¦ ¦--'(': ( [0/0] {19} - ¦ ¦ ¦--expr: TRUE [0/0] {21} - ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {20} - ¦ ¦ ¦--')': ) [0/1] {22} - ¦ ¦ ¦--expr: { - [0/0] {23} - ¦ ¦ ¦ ¦--'{': { [0/4] {24} - ¦ ¦ ¦ ¦--expr: 3 [1/4] {26} - ¦ ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {25} - ¦ ¦ ¦ ¦--expr: a + b [1/3] {27} - ¦ ¦ ¦ ¦ ¦--expr: a [0/1] {29} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL: a [0/0] {28} - ¦ ¦ ¦ ¦ ¦--'+': + [0/1] {30} - ¦ ¦ ¦ ¦ °--expr: b [0/0] {32} - ¦ ¦ ¦ ¦ °--SYMBOL: b [0/0] {31} - ¦ ¦ ¦ °--'}': } [1/0] {33} - ¦ ¦ ¦--ELSE: else [0/4] {34} - ¦ ¦ °--expr: 5 [1/0] {36} - ¦ ¦ °--NUM_CONST: 5 [0/0] {35} - ¦ ¦--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: { - i [3/0] {43} - ¦ ¦--'{': { [0/2] {44} - ¦ ¦--expr: if (T [1/0] {45} - ¦ ¦ ¦--IF: if [0/1] {46} - ¦ ¦ ¦--'(': ( [0/0] {47} - ¦ ¦ ¦--expr: TRUE [0/0] {49} - ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {48} - ¦ ¦ ¦--')': ) [0/4] {50} - ¦ ¦ ¦--expr: 3 [1/2] {52} - ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {51} - ¦ ¦ ¦--ELSE: else [1/1] {53} - ¦ ¦ °--expr: { - [0/0] {54} - ¦ ¦ ¦--'{': { [0/4] {55} - ¦ ¦ ¦--expr: h() [1/4] {56} - ¦ ¦ ¦ ¦--expr: h [0/0] {58} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: h [0/0] {57} - ¦ ¦ ¦ ¦--'(': ( [0/0] {59} - ¦ ¦ ¦ °--')': ) [0/0] {60} - ¦ ¦ ¦--expr: 5 [1/1] {62} - ¦ ¦ ¦ °--NUM_CONST: 5 [0/0] {61} - ¦ ¦ °--'}': } [0/0] {63} - ¦ °--'}': } [1/0] {64} - ¦--expr: { - i [3/0] {65} - ¦ ¦--'{': { [0/2] {66} - ¦ ¦--expr: if (T [1/0] {67} - ¦ ¦ ¦--IF: if [0/1] {68} - ¦ ¦ ¦--'(': ( [0/0] {69} - ¦ ¦ ¦--expr: TRUE [0/0] {71} - ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {70} - ¦ ¦ ¦--')': ) [0/1] {72} - ¦ ¦ ¦--expr: { - [0/0] {73} - ¦ ¦ ¦ ¦--'{': { [0/4] {74} - ¦ ¦ ¦ ¦--expr: 3 [1/2] {76} - ¦ ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {75} - ¦ ¦ ¦ °--'}': } [1/0] {77} - ¦ ¦ ¦--ELSE: else [0/1] {78} - ¦ ¦ °--expr: { - [0/0] {79} - ¦ ¦ ¦--'{': { [0/4] {80} - ¦ ¦ ¦--expr: s() [1/4] {81} - ¦ ¦ ¦ ¦--expr: s [0/0] {83} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: s [0/0] {82} - ¦ ¦ ¦ ¦--'(': ( [0/0] {84} - ¦ ¦ ¦ °--')': ) [0/0] {85} - ¦ ¦ ¦--expr: 5 [1/1] {87} - ¦ ¦ ¦ °--NUM_CONST: 5 [0/0] {86} - ¦ ¦ °--'}': } [0/0] {88} - ¦ °--'}': } [1/0] {89} - ¦--expr: if (T [2/0] {90} - ¦ ¦--IF: if [0/1] {91} - ¦ ¦--'(': ( [0/0] {92} - ¦ ¦--expr: TRUE [0/0] {94} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {93} - ¦ ¦--')': ) [0/2] {95} - ¦ ¦--expr: 1 [1/1] {97} - ¦ ¦ °--NUM_CONST: 1 [0/0] {96} - ¦ ¦--ELSE: else [0/2] {98} - ¦ °--expr: 3 [1/0] {100} - ¦ °--NUM_CONST: 3 [0/0] {99} - ¦--expr: if (F [2/0] {101} - ¦ ¦--IF: if [0/1] {102} - ¦ ¦--'(': ( [0/0] {103} - ¦ ¦--expr: FALSE [0/0] {105} - ¦ ¦ °--NUM_CONST: FALSE [0/0] {104} - ¦ ¦--')': ) [0/2] {106} - ¦ ¦--expr: 1 + a [1/1] {107} - ¦ ¦ ¦--expr: 1 [0/1] {109} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {108} - ¦ ¦ ¦--'+': + [0/1] {110} - ¦ ¦ °--expr: a * ( [0/0] {111} - ¦ ¦ ¦--expr: a [0/1] {113} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {112} - ¦ ¦ ¦--'*': * [0/1] {114} - ¦ ¦ °--expr: ( 31/ [0/0] {115} - ¦ ¦ ¦--'(': ( [0/1] {116} - ¦ ¦ ¦--expr: 31/2 [0/0] {117} - ¦ ¦ ¦ ¦--expr: 31 [0/0] {119} - ¦ ¦ ¦ ¦ °--NUM_CONST: 31 [0/0] {118} - ¦ ¦ ¦ ¦--'/': / [0/0] {120} - ¦ ¦ ¦ °--expr: 2 [0/0] {122} - ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {121} - ¦ ¦ °--')': ) [0/0] {123} - ¦ ¦--ELSE: else [0/2] {124} - ¦ °--expr: 3^k [1/0] {125} - ¦ ¦--expr: 3 [0/0] {127} - ¦ ¦ °--NUM_CONST: 3 [0/0] {126} - ¦ ¦--'^': ^ [0/0] {128} - ¦ °--expr: k [0/0] {130} - ¦ °--SYMBOL: k [0/0] {129} - ¦--expr: if (T [3/0] {131} - ¦ ¦--IF: if [0/1] {132} - ¦ ¦--'(': ( [0/0] {133} - ¦ ¦--expr: TRUE [0/0] {135} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {134} - ¦ ¦--')': ) [0/2] {136} - ¦ ¦--expr: 1+1 [1/1] {137} - ¦ ¦ ¦--expr: 1 [0/0] {139} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {138} - ¦ ¦ ¦--'+': + [0/0] {140} - ¦ ¦ °--expr: 1 [0/0] {142} - ¦ ¦ °--NUM_CONST: 1 [0/0] {141} - ¦ ¦--ELSE: else [0/4] {143} - ¦ °--expr: 3 [1/0] {145} - ¦ °--NUM_CONST: 3 [0/0] {144} - °--expr: if (T [3/0] {146} - ¦--IF: if [0/1] {147} - ¦--'(': ( [0/0] {148} - ¦--expr: TRUE [0/0] {150} - ¦ °--NUM_CONST: TRUE [0/0] {149} - ¦--')': ) [0/2] {151} - ¦--expr: 1 + 1 [1/1] {152} - ¦ ¦--expr: 1 [0/1] {154} - ¦ ¦ °--NUM_CONST: 1 [0/0] {153} - ¦ ¦--'+': + [0/1] {155} - ¦ °--expr: 1 [0/0] {157} - ¦ °--NUM_CONST: 1 [0/0] {156} - ¦--ELSE: else [0/1] {158} - °--expr: a +4 [0/0] {159} - ¦--expr: a [0/1] {161} - ¦ °--SYMBOL: a [0/0] {160} - ¦--'+': + [0/0] {162} - °--expr: 4 [0/0] {164} - °--NUM_CONST: 4 [0/0] {163} diff --git a/tests/testthat/token_adding_removing/if_else_stylerignore-in_tree b/tests/testthat/token_adding_removing/if_else_stylerignore-in_tree deleted file mode 100644 index 77a7ae18b..000000000 --- a/tests/testthat/token_adding_removing/if_else_stylerignore-in_tree +++ /dev/null @@ -1,232 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr_or_assign_or_help: a =1 [0/0] {1} - ¦ ¦--expr: a [0/1] {3} - ¦ ¦ °--SYMBOL: a [0/0] {2} - ¦ ¦--EQ_ASSIGN: = [0/0] {4} - ¦ °--expr: 1 [0/0] {6} - ¦ °--NUM_CONST: 1 [0/0] {5} - ¦--expr_or_assign_or_help: b=3 [1/0] {7} - ¦ ¦--expr: b [0/0] {9} - ¦ ¦ °--SYMBOL: b [0/0] {8} - ¦ ¦--EQ_ASSIGN: = [0/0] {10} - ¦ °--expr: 3 [0/0] {12} - ¦ °--NUM_CONST: 3 [0/0] {11} - ¦--expr_or_assign_or_help: k = 9 [1/0] {13} - ¦ ¦--expr: k [0/1] {15} - ¦ ¦ °--SYMBOL: k [0/0] {14} - ¦ ¦--EQ_ASSIGN: = [0/1] {16} - ¦ °--expr: 9 [0/0] {18} - ¦ °--NUM_CONST: 9 [0/0] {17} - ¦--expr: h <- [1/0] {19} - ¦ ¦--expr: h [0/1] {21} - ¦ ¦ °--SYMBOL: h [0/0] {20} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {22} - ¦ °--expr: funct [0/0] {23} - ¦ ¦--FUNCTION: funct [0/0] {24} - ¦ ¦--'(': ( [0/0] {25} - ¦ ¦--')': ) [0/1] {26} - ¦ °--expr: 1 [0/0] {28} - ¦ °--NUM_CONST: 1 [0/0] {27} - ¦--expr: s <- [1/0] {29} - ¦ ¦--expr: s [0/1] {31} - ¦ ¦ °--SYMBOL: s [0/0] {30} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {32} - ¦ °--expr: h [0/0] {34} - ¦ °--SYMBOL: h [0/0] {33} - ¦--expr: { - i [1/0] {35} - ¦ ¦--'{': { [0/2] {36} - ¦ ¦--expr: if (T [1/1] {37} - ¦ ¦ ¦--IF: if [0/1] {38} - ¦ ¦ ¦--'(': ( [0/0] {39} - ¦ ¦ ¦--expr: TRUE [0/0] {41} - ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {40} - ¦ ¦ ¦--')': ) [0/1] {42} - ¦ ¦ ¦--COMMENT: # sty [0/4] {43} - ¦ ¦ ¦--expr: 3 [1/2] {45} - ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {44} - ¦ ¦ ¦--ELSE: else [1/4] {46} - ¦ ¦ °--expr: 5 [1/0] {48} - ¦ ¦ °--NUM_CONST: 5 [0/0] {47} - ¦ ¦--COMMENT: # sty [0/0] {49} - ¦ °--'}': } [1/0] {50} - ¦--expr: { - i [3/0] {51} - ¦ ¦--'{': { [0/2] {52} - ¦ ¦--expr: if (T [1/1] {53} - ¦ ¦ ¦--IF: if [0/1] {54} - ¦ ¦ ¦--'(': ( [0/0] {55} - ¦ ¦ ¦--expr: TRUE [0/0] {57} - ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {56} - ¦ ¦ ¦--')': ) [0/1] {58} - ¦ ¦ ¦--expr: { # s [0/0] {59} - ¦ ¦ ¦ ¦--'{': { [0/1] {60} - ¦ ¦ ¦ ¦--COMMENT: # sty [0/4] {61} - ¦ ¦ ¦ ¦--expr: 3 [1/4] {63} - ¦ ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {62} - ¦ ¦ ¦ ¦--expr: a + b [1/2] {64} - ¦ ¦ ¦ ¦ ¦--expr: a [0/1] {66} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL: a [0/0] {65} - ¦ ¦ ¦ ¦ ¦--'+': + [0/1] {67} - ¦ ¦ ¦ ¦ °--expr: b [0/0] {69} - ¦ ¦ ¦ ¦ °--SYMBOL: b [0/0] {68} - ¦ ¦ ¦ °--'}': } [1/0] {70} - ¦ ¦ ¦--ELSE: else [0/4] {71} - ¦ ¦ °--expr: 5 [1/0] {73} - ¦ ¦ °--NUM_CONST: 5 [0/0] {72} - ¦ ¦--COMMENT: # sty [0/2] {74} - ¦ ¦--expr: c() [2/0] {75} - ¦ ¦ ¦--expr: c [0/0] {77} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: c [0/0] {76} - ¦ ¦ ¦--'(': ( [0/0] {78} - ¦ ¦ °--')': ) [0/0] {79} - ¦ °--'}': } [1/0] {80} - ¦--COMMENT: # sty [2/0] {81} - ¦--expr: { - i [1/0] {82} - ¦ ¦--'{': { [0/2] {83} - ¦ ¦--expr: if (T [1/0] {84} - ¦ ¦ ¦--IF: if [0/1] {85} - ¦ ¦ ¦--'(': ( [0/0] {86} - ¦ ¦ ¦--expr: TRUE [0/0] {88} - ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {87} - ¦ ¦ ¦--')': ) [0/4] {89} - ¦ ¦ ¦--expr: 3 [1/2] {91} - ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {90} - ¦ ¦ ¦--ELSE: else [1/1] {92} - ¦ ¦ °--expr: { - [0/0] {93} - ¦ ¦ ¦--'{': { [0/4] {94} - ¦ ¦ ¦--expr: h() [1/4] {95} - ¦ ¦ ¦ ¦--expr: h [0/0] {97} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: h [0/0] {96} - ¦ ¦ ¦ ¦--'(': ( [0/0] {98} - ¦ ¦ ¦ °--')': ) [0/0] {99} - ¦ ¦ ¦--expr: 5 [1/1] {101} - ¦ ¦ ¦ °--NUM_CONST: 5 [0/0] {100} - ¦ ¦ °--'}': } [0/0] {102} - ¦ °--'}': } [1/0] {103} - ¦--COMMENT: # sty [1/0] {104} - ¦--expr: { - i [2/0] {105} - ¦ ¦--'{': { [0/2] {106} - ¦ ¦--expr: if (T [1/0] {107} - ¦ ¦ ¦--IF: if [0/1] {108} - ¦ ¦ ¦--'(': ( [0/0] {109} - ¦ ¦ ¦--expr: TRUE [0/0] {111} - ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {110} - ¦ ¦ ¦--')': ) [0/1] {112} - ¦ ¦ ¦--expr: { - [0/0] {113} - ¦ ¦ ¦ ¦--'{': { [0/4] {114} - ¦ ¦ ¦ ¦--expr: 3 [1/1] {116} - ¦ ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {115} - ¦ ¦ ¦ ¦--COMMENT: # sty [0/2] {117} - ¦ ¦ ¦ °--'}': } [1/0] {118} - ¦ ¦ ¦--ELSE: else [0/1] {119} - ¦ ¦ °--expr: { - [0/0] {120} - ¦ ¦ ¦--'{': { [0/4] {121} - ¦ ¦ ¦--expr: s() [1/4] {122} - ¦ ¦ ¦ ¦--expr: s [0/0] {124} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: s [0/0] {123} - ¦ ¦ ¦ ¦--'(': ( [0/0] {125} - ¦ ¦ ¦ °--')': ) [0/0] {126} - ¦ ¦ ¦--expr: 5 [1/1] {128} - ¦ ¦ ¦ °--NUM_CONST: 5 [0/0] {127} - ¦ ¦ °--'}': } [0/0] {129} - ¦ °--'}': } [1/0] {130} - ¦--expr: if (T [2/0] {131} - ¦ ¦--IF: if [0/1] {132} - ¦ ¦--'(': ( [0/0] {133} - ¦ ¦--expr: TRUE [0/0] {135} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {134} - ¦ ¦--')': ) [0/1] {136} - ¦ ¦--COMMENT: # sty [0/2] {137} - ¦ ¦--expr: 1 [1/1] {139} - ¦ ¦ °--NUM_CONST: 1 [0/0] {138} - ¦ ¦--ELSE: else [0/4] {140} - ¦ °--expr: 3 [1/0] {142} - ¦ °--NUM_CONST: 3 [0/0] {141} - ¦--expr: if (F [2/0] {143} - ¦ ¦--IF: if [0/1] {144} - ¦ ¦--'(': ( [0/0] {145} - ¦ ¦--expr: FALSE [0/0] {147} - ¦ ¦ °--NUM_CONST: FALSE [0/0] {146} - ¦ ¦--')': ) [0/1] {148} - ¦ ¦--COMMENT: # sty [0/2] {149} - ¦ ¦--expr: 1 + a [1/1] {150} - ¦ ¦ ¦--expr: 1 [0/1] {152} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {151} - ¦ ¦ ¦--'+': + [0/1] {153} - ¦ ¦ °--expr: a * ( [0/0] {154} - ¦ ¦ ¦--expr: a [0/1] {156} - ¦ ¦ ¦ °--SYMBOL: a [0/0] {155} - ¦ ¦ ¦--'*': * [0/1] {157} - ¦ ¦ °--expr: ( 31/ [0/0] {158} - ¦ ¦ ¦--'(': ( [0/1] {159} - ¦ ¦ ¦--expr: 31/2 [0/0] {160} - ¦ ¦ ¦ ¦--expr: 31 [0/0] {162} - ¦ ¦ ¦ ¦ °--NUM_CONST: 31 [0/0] {161} - ¦ ¦ ¦ ¦--'/': / [0/0] {163} - ¦ ¦ ¦ °--expr: 2 [0/0] {165} - ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {164} - ¦ ¦ °--')': ) [0/0] {166} - ¦ ¦--ELSE: else [0/4] {167} - ¦ °--expr: 3^k [1/0] {168} - ¦ ¦--expr: 3 [0/0] {170} - ¦ ¦ °--NUM_CONST: 3 [0/0] {169} - ¦ ¦--'^': ^ [0/0] {171} - ¦ °--expr: k [0/0] {173} - ¦ °--SYMBOL: k [0/0] {172} - ¦--expr: if (T [3/0] {174} - ¦ ¦--IF: if [0/1] {175} - ¦ ¦--'(': ( [0/0] {176} - ¦ ¦--expr: TRUE [0/0] {178} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {177} - ¦ ¦--')': ) [0/2] {179} - ¦ ¦--expr: 1+1 [1/1] {180} - ¦ ¦ ¦--expr: 1 [0/0] {182} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {181} - ¦ ¦ ¦--'+': + [0/0] {183} - ¦ ¦ °--expr: 1 [0/0] {185} - ¦ ¦ °--NUM_CONST: 1 [0/0] {184} - ¦ ¦--ELSE: else [0/1] {186} - ¦ ¦--COMMENT: # sty [0/4] {187} - ¦ °--expr: 3 [1/0] {189} - ¦ °--NUM_CONST: 3 [0/0] {188} - ¦--expr: if (T [2/0] {190} - ¦ ¦--IF: if [0/1] {191} - ¦ ¦--'(': ( [0/0] {192} - ¦ ¦--expr: TRUE [0/0] {194} - ¦ ¦ °--NUM_CONST: TRUE [0/0] {193} - ¦ ¦--')': ) [0/2] {195} - ¦ ¦--expr: 1 + 1 [1/1] {196} - ¦ ¦ ¦--expr: 1 [0/1] {198} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {197} - ¦ ¦ ¦--'+': + [0/1] {199} - ¦ ¦ °--expr: 1 [0/0] {201} - ¦ ¦ °--NUM_CONST: 1 [0/0] {200} - ¦ ¦--ELSE: else [0/1] {202} - ¦ °--expr: a +4 [0/0] {203} - ¦ ¦--expr: a [0/1] {205} - ¦ ¦ °--SYMBOL: a [0/0] {204} - ¦ ¦--'+': + [0/0] {206} - ¦ °--expr: 4 [0/0] {208} - ¦ °--NUM_CONST: 4 [0/0] {207} - ¦--COMMENT: # sty [2/0] {209} - ¦--expr: {if ( [1/0] {210} - ¦ ¦--'{': { [0/0] {211} - ¦ ¦--expr: if (T [0/0] {212} - ¦ ¦ ¦--IF: if [0/1] {213} - ¦ ¦ ¦--'(': ( [0/0] {214} - ¦ ¦ ¦--expr: TRUE [0/0] {216} - ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {215} - ¦ ¦ ¦--')': ) [0/2] {217} - ¦ ¦ ¦--expr: 3 [1/0] {219} - ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {218} - ¦ ¦ ¦--ELSE: else [1/2] {220} - ¦ ¦ °--expr: 5 [1/0] {222} - ¦ ¦ °--NUM_CONST: 5 [0/0] {221} - ¦ °--'}': } [1/0] {223} - °--COMMENT: # sty [1/0] {224} diff --git a/tests/testthat/token_adding_removing/mixed_token-in_tree b/tests/testthat/token_adding_removing/mixed_token-in_tree deleted file mode 100644 index 2e91e3aaf..000000000 --- a/tests/testthat/token_adding_removing/mixed_token-in_tree +++ /dev/null @@ -1,54 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: # = r [0/0] {1} - ¦--expr_or_assign_or_help: a = 3 [1/0] {2} - ¦ ¦--expr: a [0/1] {4} - ¦ ¦ °--SYMBOL: a [0/0] {3} - ¦ ¦--EQ_ASSIGN: = [0/1] {5} - ¦ °--expr: 3 [0/0] {7} - ¦ °--NUM_CONST: 3 [0/0] {6} - ¦--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: 3 [0/0] {15} - ¦ ¦ °--NUM_CONST: 3 [0/0] {14} - ¦ °--')': ) [0/0] {16} - ¦--COMMENT: # sem [2/0] {17} - ¦--expr: a [1/0] {19} - ¦ °--SYMBOL: a [0/0] {18} - ¦--';': ; [0/1] {20} - ¦--expr: b [0/1] {22} - ¦ °--SYMBOL: b [0/0] {21} - ¦--';': ; [0/0] {23} - ¦--expr: c [0/0] {25} - ¦ °--SYMBOL: c [0/0] {24} - ¦--';': ; [0/0] {26} - ¦--expr: d [0/0] {28} - ¦ °--SYMBOL: d [0/0] {27} - ¦--COMMENT: # quo [3/0] {29} - ¦--expr: "text [1/0] {31} - ¦ °--STR_CONST: "text [0/0] {30} - ¦--expr: 'text [1/0] {33} - ¦ °--STR_CONST: 'text [0/0] {32} - ¦--COMMENT: # add [4/0] {34} - ¦--expr: a %>% [1/0] {35} - ¦ ¦--expr: a [0/1] {38} - ¦ ¦ °--SYMBOL: a [0/0] {37} - ¦ ¦--SPECIAL-PIPE: %>% [0/2] {39} - ¦ ¦--expr: b [1/1] {41} - ¦ ¦ °--SYMBOL: b [0/0] {40} - ¦ ¦--SPECIAL-PIPE: %>% [0/2] {42} - ¦ °--expr: c [1/0] {44} - ¦ °--SYMBOL: c [0/0] {43} - ¦--COMMENT: # add [2/0] {45} - °--expr: a %>% [1/0] {46} - ¦--expr: a [0/1] {49} - ¦ °--SYMBOL: a [0/0] {48} - ¦--SPECIAL-PIPE: %>% [0/1] {50} - ¦--expr: b [0/1] {52} - ¦ °--SYMBOL: b [0/0] {51} - ¦--SPECIAL-PIPE: %>% [0/2] {53} - °--expr: c [1/0] {55} - °--SYMBOL: c [0/0] {54} diff --git a/tests/testthat/token_adding_removing/mixed_token-out.R b/tests/testthat/token_adding_removing/mixed_token-out.R index e80aafb4d..068ab64ef 100644 --- a/tests/testthat/token_adding_removing/mixed_token-out.R +++ b/tests/testthat/token_adding_removing/mixed_token-out.R @@ -14,7 +14,6 @@ d 'text with "quotes"' - # adding brackets in pipes a %>% b() %>% diff --git a/tests/testthat/token_adding_removing/substitute-in_tree b/tests/testthat/token_adding_removing/substitute-in_tree deleted file mode 100644 index 70c35013e..000000000 --- a/tests/testthat/token_adding_removing/substitute-in_tree +++ /dev/null @@ -1,39 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: expr [0/0] {1} - ¦ ¦--expr: expr [0/1] {3} - ¦ ¦ °--SYMBOL: expr [0/0] {2} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {4} - ¦ °--expr: subst [0/0] {5} - ¦ ¦--expr: subst [0/0] {7} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: subst [0/0] {6} - ¦ ¦--'(': ( [0/0] {8} - ¦ ¦--expr: airqu [0/0] {9} - ¦ ¦ ¦--expr: airqu [0/1] {11} - ¦ ¦ ¦ °--SYMBOL: airqu [0/0] {10} - ¦ ¦ ¦--SPECIAL-PIPE: %>% [0/1] {12} - ¦ ¦ °--expr: FUN_E [0/0] {14} - ¦ ¦ °--SYMBOL: FUN_E [0/0] {13} - ¦ ¦--',': , [0/1] {15} - ¦ ¦--SYMBOL_SUB: env [0/1] {16} - ¦ ¦--EQ_SUB: = [0/1] {17} - ¦ ¦--expr: list( [0/0] {18} - ¦ ¦ ¦--expr: list [0/0] {20} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: list [0/0] {19} - ¦ ¦ ¦--'(': ( [0/0] {21} - ¦ ¦ ¦--SYMBOL_SUB: FUN_E [0/1] {22} - ¦ ¦ ¦--EQ_SUB: = [0/1] {23} - ¦ ¦ ¦--expr: call( [0/0] {24} - ¦ ¦ ¦ ¦--expr: call [0/0] {26} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {25} - ¦ ¦ ¦ ¦--'(': ( [0/0] {27} - ¦ ¦ ¦ ¦--expr: "FUN_ [0/0] {29} - ¦ ¦ ¦ ¦ °--STR_CONST: "FUN_ [0/0] {28} - ¦ ¦ ¦ °--')': ) [0/0] {30} - ¦ ¦ °--')': ) [0/0] {31} - ¦ °--')': ) [0/0] {32} - °--expr: a %>% [1/0] {33} - ¦--expr: a [0/1] {35} - ¦ °--SYMBOL: a [0/0] {34} - ¦--SPECIAL-PIPE: %>% [0/2] {36} - °--expr: x [1/0] {38} - °--SYMBOL: x [0/0] {37} 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 deleted file mode 100644 index d7851f86c..000000000 --- a/tests/testthat/token_adding_removing/token_creation_find_pos-in_tree +++ /dev/null @@ -1,190 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: print [0/0] {1} - ¦ ¦--expr: print [0/1] {3} - ¦ ¦ °--SYMBOL: print [0/0] {2} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {4} - ¦ °--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: { - l [0/0] {12} - ¦ ¦--'{': { [0/2] {13} - ¦ ¦--expr: lines [1/2] {14} - ¦ ¦ ¦--expr: lines [0/1] {16} - ¦ ¦ ¦ °--SYMBOL: lines [0/0] {15} - ¦ ¦ ¦--LEFT_ASSIGN: <- [0/1] {17} - ¦ ¦ °--expr: m(y, [0/0] {18} - ¦ ¦ ¦--expr: m [0/0] {20} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: m [0/0] {19} - ¦ ¦ ¦--'(': ( [0/0] {21} - ¦ ¦ ¦--expr: y [0/0] {23} - ¦ ¦ ¦ °--SYMBOL: y [0/0] {22} - ¦ ¦ ¦--',': , [0/1] {24} - ¦ ¦ ¦--expr: ... [0/0] {26} - ¦ ¦ ¦ °--SYMBOL: ... [0/0] {25} - ¦ ¦ ¦--',': , [0/1] {27} - ¦ ¦ ¦--SYMBOL_SUB: print [0/1] {28} - ¦ ¦ ¦--EQ_SUB: = [0/1] {29} - ¦ ¦ ¦--expr: TRUE [0/0] {31} - ¦ ¦ ¦ °--NUM_CONST: TRUE [0/0] {30} - ¦ ¦ °--')': ) [0/0] {32} - ¦ ¦--expr: paste [1/0] {33} - ¦ ¦ ¦--expr: paste [0/0] {35} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: paste [0/0] {34} - ¦ ¦ ¦--'(': ( [0/0] {36} - ¦ ¦ ¦--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: "\n" [0/0] {43} - ¦ ¦ ¦ °--STR_CONST: "\n" [0/0] {42} - ¦ ¦ °--')': ) [0/0] {44} - ¦ °--'}': } [1/0] {45} - ¦--COMMENT: # No [2/0] {46} - ¦--expr: kng < [2/0] {47} - ¦ ¦--expr: kng [0/1] {49} - ¦ ¦ °--SYMBOL: kng [0/0] {48} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {50} - ¦ °--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: 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: "%i" [0/0] {65} - ¦ ¦ °--STR_CONST: "%i" [0/0] {64} - ¦ ¦--',': , [0/1] {66} - ¦ ¦--expr: lgd(x [0/0] {67} - ¦ ¦ ¦--expr: lgd [0/0] {69} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: lgd [0/0] {68} - ¦ ¦ ¦--'(': ( [0/0] {70} - ¦ ¦ ¦--expr: x [0/0] {72} - ¦ ¦ ¦ °--SYMBOL: x [0/0] {71} - ¦ ¦ °--')': ) [0/0] {73} - ¦ ¦--',': , [0/1] {74} - ¦ ¦--expr: tds(y [0/0] {75} - ¦ ¦ ¦--expr: tds [0/0] {77} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: tds [0/0] {76} - ¦ ¦ ¦--'(': ( [0/0] {78} - ¦ ¦ ¦--expr: y [0/0] {80} - ¦ ¦ ¦ °--SYMBOL: y [0/0] {79} - ¦ ¦ °--')': ) [0/0] {81} - ¦ °--')': ) [0/0] {82} - ¦--expr: tka < [1/0] {83} - ¦ ¦--expr: tka [0/1] {85} - ¦ ¦ °--SYMBOL: tka [0/0] {84} - ¦ ¦--LEFT_ASSIGN: <- [0/1] {86} - ¦ °--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: 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: "%s" [0/0] {101} - ¦ ¦ °--STR_CONST: "%s" [0/0] {100} - ¦ ¦--',': , [0/1] {102} - ¦ ¦--expr: slice [0/0] {103} - ¦ ¦ ¦--expr: slice [0/0] {105} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: slice [0/0] {104} - ¦ ¦ ¦--'(': ( [0/0] {106} - ¦ ¦ ¦--expr: x [0/0] {108} - ¦ ¦ ¦ °--SYMBOL: x [0/0] {107} - ¦ ¦ °--')': ) [0/0] {109} - ¦ ¦--',': , [0/1] {110} - ¦ ¦--expr: acast [0/0] {111} - ¦ ¦ ¦--expr: acast [0/0] {113} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: acast [0/0] {112} - ¦ ¦ ¦--'(': ( [0/0] {114} - ¦ ¦ ¦--expr: d [0/0] {116} - ¦ ¦ ¦ °--SYMBOL: d [0/0] {115} - ¦ ¦ °--')': ) [0/0] {117} - ¦ °--')': ) [0/0] {118} - °--expr: anoth [2/0] {119} - ¦--expr: anoth [0/1] {121} - ¦ °--SYMBOL: anoth [0/0] {120} - ¦--LEFT_ASSIGN: <- [0/1] {122} - °--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: { - i [0/0] {130} - ¦--'{': { [0/2] {131} - ¦--expr: if (! [1/2] {132} - ¦ ¦--IF: if [0/1] {133} - ¦ ¦--'(': ( [0/0] {134} - ¦ ¦--expr: !fun( [0/0] {135} - ¦ ¦ ¦--expr: !fun( [0/1] {136} - ¦ ¦ ¦ ¦--'!': ! [0/0] {137} - ¦ ¦ ¦ °--expr: fun(x [0/0] {138} - ¦ ¦ ¦ ¦--expr: fun [0/0] {140} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: fun [0/0] {139} - ¦ ¦ ¦ ¦--'(': ( [0/0] {141} - ¦ ¦ ¦ ¦--expr: x [0/0] {143} - ¦ ¦ ¦ ¦ °--SYMBOL: x [0/0] {142} - ¦ ¦ ¦ °--')': ) [0/0] {144} - ¦ ¦ ¦--AND2: && [0/1] {145} - ¦ ¦ °--expr: !not_ [0/0] {146} - ¦ ¦ ¦--'!': ! [0/0] {147} - ¦ ¦ °--expr: not_i [0/0] {148} - ¦ ¦ ¦--expr: not_i [0/0] {150} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: not_i [0/0] {149} - ¦ ¦ ¦--'(': ( [0/0] {151} - ¦ ¦ ¦--expr: y [0/0] {153} - ¦ ¦ ¦ °--SYMBOL: y [0/0] {152} - ¦ ¦ °--')': ) [0/0] {154} - ¦ ¦--')': ) [0/1] {155} - ¦ °--expr: { - [0/0] {156} - ¦ ¦--'{': { [0/4] {157} - ¦ ¦--expr: retur [1/2] {158} - ¦ ¦ ¦--expr: retur [0/0] {160} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: retur [0/0] {159} - ¦ ¦ ¦--'(': ( [0/0] {161} - ¦ ¦ ¦--expr: s [0/0] {163} - ¦ ¦ ¦ °--SYMBOL: s [0/0] {162} - ¦ ¦ °--')': ) [0/0] {164} - ¦ °--'}': } [1/0] {165} - ¦--expr: ident [1/0] {166} - ¦ ¦--expr: ident [0/0] {168} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: ident [0/0] {167} - ¦ ¦--'(': ( [0/0] {169} - ¦ ¦--expr: kss(n [0/0] {170} - ¦ ¦ ¦--expr: kss [0/0] {172} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: kss [0/0] {171} - ¦ ¦ ¦--'(': ( [0/0] {173} - ¦ ¦ ¦--expr: nmp [0/0] {175} - ¦ ¦ ¦ °--SYMBOL: nmp [0/0] {174} - ¦ ¦ °--')': ) [0/0] {176} - ¦ ¦--',': , [0/1] {177} - ¦ ¦--expr: gsk(r [0/0] {178} - ¦ ¦ ¦--expr: gsk [0/0] {180} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: gsk [0/0] {179} - ¦ ¦ ¦--'(': ( [0/0] {181} - ¦ ¦ ¦--expr: rdm [0/0] {183} - ¦ ¦ ¦ °--SYMBOL: rdm [0/0] {182} - ¦ ¦ °--')': ) [0/0] {184} - ¦ °--')': ) [0/0] {185} - °--'}': } [1/0] {186} diff --git a/tests/testthat/unary_spacing/unary_complex-in_tree b/tests/testthat/unary_spacing/unary_complex-in_tree deleted file mode 100644 index 42b3fce70..000000000 --- a/tests/testthat/unary_spacing/unary_complex-in_tree +++ /dev/null @@ -1,81 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: 1+(1 [0/0] {1} - ¦ ¦--expr: 1 [0/0] {4} - ¦ ¦ °--NUM_CONST: 1 [0/0] {3} - ¦ ¦--'+': + [0/0] {5} - ¦ ¦--expr: (1 [0/0] {6} - ¦ ¦ ¦--'(': ( [0/0] {7} - ¦ ¦ ¦--expr: 1 - [0/0] {8} - ¦ ¦ ¦ ¦--expr: 1 [0/3] {11} - ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {10} - ¦ ¦ ¦ ¦--'-': - [0/1] {12} - ¦ ¦ ¦ ¦--expr: (- (- [0/5] {13} - ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {14} - ¦ ¦ ¦ ¦ ¦--expr: - (- [0/3] {15} - ¦ ¦ ¦ ¦ ¦ ¦--'-': - [0/1] {16} - ¦ ¦ ¦ ¦ ¦ °--expr: (- 3 [0/0] {17} - ¦ ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {18} - ¦ ¦ ¦ ¦ ¦ ¦--expr: - 3 + [0/0] {19} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: - 3 [0/1] {21} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦--'-': - [0/1] {22} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--expr: 3 [0/0] {24} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {23} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--'+': + [0/2] {25} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--expr: 11 [0/0] {27} - ¦ ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 11 [0/0] {26} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--'+': + [0/0] {28} - ¦ ¦ ¦ ¦ ¦ ¦ °--expr: + 1 [0/0] {29} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--'+': + [0/3] {30} - ¦ ¦ ¦ ¦ ¦ ¦ °--expr: 1 [0/0] {32} - ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {31} - ¦ ¦ ¦ ¦ ¦ °--')': ) [0/0] {33} - ¦ ¦ ¦ ¦ °--')': ) [0/0] {34} - ¦ ¦ ¦ ¦--'-': - [0/0] {35} - ¦ ¦ ¦ °--expr: 4 [0/0] {37} - ¦ ¦ ¦ °--NUM_CONST: 4 [0/0] {36} - ¦ ¦ °--')': ) [0/0] {38} - ¦ ¦--'-': - [0/0] {39} - ¦ °--expr: -40 [0/0] {40} - ¦ ¦--'-': - [0/0] {41} - ¦ °--expr: 40 [0/0] {43} - ¦ °--NUM_CONST: 40 [0/0] {42} - °--expr: 1+(1- [1/0] {44} - ¦--expr: 1 [0/0] {47} - ¦ °--NUM_CONST: 1 [0/0] {46} - ¦--'+': + [0/0] {48} - ¦--expr: (1-(- [0/0] {49} - ¦ ¦--'(': ( [0/0] {50} - ¦ ¦--expr: 1-(-( [0/0] {51} - ¦ ¦ ¦--expr: 1 [0/0] {54} - ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {53} - ¦ ¦ ¦--'-': - [0/0] {55} - ¦ ¦ ¦--expr: (-(-3 [0/0] {56} - ¦ ¦ ¦ ¦--'(': ( [0/0] {57} - ¦ ¦ ¦ ¦--expr: -(-3+ [0/0] {58} - ¦ ¦ ¦ ¦ ¦--'-': - [0/0] {59} - ¦ ¦ ¦ ¦ °--expr: (-3+1 [0/0] {60} - ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {61} - ¦ ¦ ¦ ¦ ¦--expr: -3+11 [0/0] {62} - ¦ ¦ ¦ ¦ ¦ ¦--expr: -3 [0/0] {64} - ¦ ¦ ¦ ¦ ¦ ¦ ¦--'-': - [0/0] {65} - ¦ ¦ ¦ ¦ ¦ ¦ °--expr: 3 [0/0] {67} - ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {66} - ¦ ¦ ¦ ¦ ¦ ¦--'+': + [0/0] {68} - ¦ ¦ ¦ ¦ ¦ ¦--expr: 11 [0/0] {70} - ¦ ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 11 [0/0] {69} - ¦ ¦ ¦ ¦ ¦ ¦--'+': + [0/0] {71} - ¦ ¦ ¦ ¦ ¦ °--expr: +1 [0/0] {72} - ¦ ¦ ¦ ¦ ¦ ¦--'+': + [0/0] {73} - ¦ ¦ ¦ ¦ ¦ °--expr: 1 [0/0] {75} - ¦ ¦ ¦ ¦ ¦ °--NUM_CONST: 1 [0/0] {74} - ¦ ¦ ¦ ¦ °--')': ) [0/0] {76} - ¦ ¦ ¦ °--')': ) [0/0] {77} - ¦ ¦ ¦--'-': - [0/0] {78} - ¦ ¦ °--expr: 4 [0/0] {80} - ¦ ¦ °--NUM_CONST: 4 [0/0] {79} - ¦ °--')': ) [0/0] {81} - ¦--'-': - [0/0] {82} - °--expr: -40 [0/0] {83} - ¦--'-': - [0/0] {84} - °--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 deleted file mode 100644 index a1d0470e5..000000000 --- a/tests/testthat/unary_spacing/unary_indention-in_tree +++ /dev/null @@ -1,57 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: 1 + - [0/0] {1} - ¦ ¦--expr: 1 [0/1] {4} - ¦ ¦ °--NUM_CONST: 1 [0/0] {3} - ¦ ¦--'+': + [0/5] {5} - ¦ ¦--expr: 2 [1/1] {6} - ¦ ¦ ¦--expr: 2 [0/4] {9} - ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {8} - ¦ ¦ ¦--'/': / [0/2] {10} - ¦ ¦ ¦--expr: 8 [1/0] {12} - ¦ ¦ ¦ °--NUM_CONST: 8 [0/0] {11} - ¦ ¦ ¦--'/': / [0/5] {13} - ¦ ¦ °--expr: 5 [1/0] {15} - ¦ ¦ °--NUM_CONST: 5 [0/0] {14} - ¦ ¦--'+': + [0/0] {16} - ¦ °--expr: 13 [1/0] {18} - ¦ °--NUM_CONST: 13 [0/0] {17} - ¦--expr: 1 + - [3/0] {19} - ¦ ¦--expr: 1 [0/1] {22} - ¦ ¦ °--NUM_CONST: 1 [0/0] {21} - ¦ ¦--'+': + [0/2] {23} - ¦ ¦--expr: + 1 [1/1] {24} - ¦ ¦ ¦--'+': + [0/1] {25} - ¦ ¦ °--expr: 1 [0/0] {27} - ¦ ¦ °--NUM_CONST: 1 [0/0] {26} - ¦ ¦--'-': - [0/0] {28} - ¦ °--expr: -1 / - [1/0] {29} - ¦ ¦--expr: -1 [0/1] {31} - ¦ ¦ ¦--'-': - [0/0] {32} - ¦ ¦ °--expr: 1 [0/0] {34} - ¦ ¦ °--NUM_CONST: 1 [0/0] {33} - ¦ ¦--'/': / [0/2] {35} - ¦ ¦--expr: 27 [1/2] {37} - ¦ ¦ °--NUM_CONST: 27 [0/0] {36} - ¦ ¦--'/': / [0/2] {38} - ¦ °--expr: - 3 [1/0] {39} - ¦ ¦--'-': - [0/1] {40} - ¦ °--expr: 3 [0/0] {42} - ¦ °--NUM_CONST: 3 [0/0] {41} - °--expr: 1 / - [2/0] {43} - ¦--expr: 1 [0/1] {46} - ¦ °--NUM_CONST: 1 [0/0] {45} - ¦--'/': / [0/2] {47} - ¦--expr: 2 [1/1] {49} - ¦ °--NUM_CONST: 2 [0/0] {48} - ¦--'+': + [0/2] {50} - °--expr: 33 * - [1/0] {51} - ¦--expr: 33 [0/1] {53} - ¦ °--NUM_CONST: 33 [0/0] {52} - ¦--'*': * [0/2] {54} - °--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 deleted file mode 100644 index bebf9c503..000000000 --- a/tests/testthat/unary_spacing/unary_simple-in_tree +++ /dev/null @@ -1,26 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: 1+-1/ [0/0] {1} - ¦--expr: 1 [0/0] {6} - ¦ °--NUM_CONST: 1 [0/0] {5} - ¦--'+': + [0/0] {7} - ¦--expr: -1/2 [0/0] {8} - ¦ ¦--expr: -1 [0/0] {9} - ¦ ¦ ¦--'-': - [0/0] {10} - ¦ ¦ °--expr: 1 [0/0] {12} - ¦ ¦ °--NUM_CONST: 1 [0/0] {11} - ¦ ¦--'/': / [0/0] {13} - ¦ °--expr: 2 [0/0] {15} - ¦ °--NUM_CONST: 2 [0/0] {14} - ¦--'-': - [0/0] {16} - ¦--expr: 3 [0/0] {18} - ¦ °--NUM_CONST: 3 [0/0] {17} - ¦--'-': - [0/0] {19} - ¦--expr: -3 [0/0] {20} - ¦ ¦--'-': - [0/0] {21} - ¦ °--expr: 3 [0/0] {23} - ¦ °--NUM_CONST: 3 [0/0] {22} - ¦--'+': + [0/0] {24} - °--expr: +3 [0/0] {25} - ¦--'+': + [0/0] {26} - °--expr: 3 [0/0] {28} - °--NUM_CONST: 3 [0/0] {27} diff --git a/tests/testthat/unindention/mixed-double-in_tree b/tests/testthat/unindention/mixed-double-in_tree deleted file mode 100644 index 48a5a8d9b..000000000 --- a/tests/testthat/unindention/mixed-double-in_tree +++ /dev/null @@ -1,189 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: # cla [0/0] {1} - ¦--expr: funct [2/0] {2} - ¦ ¦--FUNCTION: funct [0/0] {3} - ¦ ¦--'(': ( [0/0] {4} - ¦ ¦--SYMBOL_FORMALS: x [0/0] {5} - ¦ ¦--',': , [0/9] {6} - ¦ ¦--SYMBOL_FORMALS: y [1/0] {7} - ¦ ¦--')': ) [0/1] {8} - ¦ °--expr: { - 1 [0/0] {9} - ¦ ¦--'{': { [0/2] {10} - ¦ ¦--expr: 1 [1/0] {12} - ¦ ¦ °--NUM_CONST: 1 [0/0] {11} - ¦ °--'}': } [1/0] {13} - ¦--expr: funct [3/0] {14} - ¦ ¦--FUNCTION: funct [0/0] {15} - ¦ ¦--'(': ( [0/0] {16} - ¦ ¦--SYMBOL_FORMALS: x [0/0] {17} - ¦ ¦--',': , [0/9] {18} - ¦ ¦--SYMBOL_FORMALS: y [1/0] {19} - ¦ ¦--',': , [0/9] {20} - ¦ ¦--SYMBOL_FORMALS: k [1/0] {21} - ¦ ¦--')': ) [0/1] {22} - ¦ °--expr: { - 1 [0/0] {23} - ¦ ¦--'{': { [0/2] {24} - ¦ ¦--expr: 1 [1/0] {26} - ¦ ¦ °--NUM_CONST: 1 [0/0] {25} - ¦ °--'}': } [1/0] {27} - ¦--expr: funct [3/0] {28} - ¦ ¦--FUNCTION: funct [0/0] {29} - ¦ ¦--'(': ( [0/0] {30} - ¦ ¦--SYMBOL_FORMALS: x [0/0] {31} - ¦ ¦--',': , [0/9] {32} - ¦ ¦--SYMBOL_FORMALS: y [1/0] {33} - ¦ ¦--')': ) [0/1] {34} - ¦ °--expr: { - 1 [0/0] {35} - ¦ ¦--'{': { [0/2] {36} - ¦ ¦--expr: 1 [1/0] {38} - ¦ ¦ °--NUM_CONST: 1 [0/0] {37} - ¦ °--'}': } [1/0] {39} - ¦--expr: funct [2/0] {40} - ¦ ¦--FUNCTION: funct [0/0] {41} - ¦ ¦--'(': ( [0/9] {42} - ¦ ¦--SYMBOL_FORMALS: x [1/0] {43} - ¦ ¦--',': , [0/9] {44} - ¦ ¦--SYMBOL_FORMALS: y [1/0] {45} - ¦ ¦--')': ) [0/1] {46} - ¦ °--expr: { - 1 [0/0] {47} - ¦ ¦--'{': { [0/2] {48} - ¦ ¦--expr: 1 [1/0] {50} - ¦ ¦ °--NUM_CONST: 1 [0/0] {49} - ¦ °--'}': } [1/0] {51} - ¦--expr: funct [3/0] {52} - ¦ ¦--FUNCTION: funct [0/0] {53} - ¦ ¦--'(': ( [0/0] {54} - ¦ ¦--SYMBOL_FORMALS: x [0/0] {55} - ¦ ¦--',': , [0/1] {56} - ¦ ¦--SYMBOL_FORMALS: y [0/0] {57} - ¦ ¦--')': ) [0/1] {58} - ¦ °--expr: { - 1 [0/0] {59} - ¦ ¦--'{': { [0/2] {60} - ¦ ¦--expr: 1 [1/0] {62} - ¦ ¦ °--NUM_CONST: 1 [0/0] {61} - ¦ °--'}': } [1/0] {63} - ¦--expr: funct [2/0] {64} - ¦ ¦--FUNCTION: funct [0/0] {65} - ¦ ¦--'(': ( [0/0] {66} - ¦ ¦--SYMBOL_FORMALS: x [0/0] {67} - ¦ ¦--',': , [0/9] {68} - ¦ ¦--COMMENT: # [1/9] {69} - ¦ ¦--SYMBOL_FORMALS: y [1/0] {70} - ¦ ¦--')': ) [0/1] {71} - ¦ °--expr: { - 1 [0/0] {72} - ¦ ¦--'{': { [0/2] {73} - ¦ ¦--expr: 1 [1/0] {75} - ¦ ¦ °--NUM_CONST: 1 [0/0] {74} - ¦ °--'}': } [1/0] {76} - ¦--COMMENT: # dou [3/0] {77} - ¦--expr: funct [1/0] {78} - ¦ ¦--FUNCTION: funct [0/0] {79} - ¦ ¦--'(': ( [0/0] {80} - ¦ ¦--SYMBOL_FORMALS: x [0/0] {81} - ¦ ¦--',': , [0/0] {82} - ¦ ¦--SYMBOL_FORMALS: y [1/0] {83} - ¦ ¦--')': ) [0/1] {84} - ¦ °--expr: { - 1 [0/0] {85} - ¦ ¦--'{': { [0/2] {86} - ¦ ¦--expr: 1 [1/0] {88} - ¦ ¦ °--NUM_CONST: 1 [0/0] {87} - ¦ °--'}': } [1/0] {89} - ¦--expr: funct [3/0] {90} - ¦ ¦--FUNCTION: funct [0/0] {91} - ¦ ¦--'(': ( [0/0] {92} - ¦ ¦--SYMBOL_FORMALS: x [0/0] {93} - ¦ ¦--',': , [0/0] {94} - ¦ ¦--SYMBOL_FORMALS: y [1/0] {95} - ¦ ¦--',': , [0/9] {96} - ¦ ¦--SYMBOL_FORMALS: k [1/0] {97} - ¦ ¦--')': ) [0/1] {98} - ¦ °--expr: { - 1 [0/0] {99} - ¦ ¦--'{': { [0/2] {100} - ¦ ¦--expr: 1 [1/0] {102} - ¦ ¦ °--NUM_CONST: 1 [0/0] {101} - ¦ °--'}': } [1/0] {103} - ¦--expr: funct [3/0] {104} - ¦ ¦--FUNCTION: funct [0/0] {105} - ¦ ¦--'(': ( [0/4] {106} - ¦ ¦--SYMBOL_FORMALS: x [2/0] {107} - ¦ ¦--',': , [0/4] {108} - ¦ ¦--SYMBOL_FORMALS: y [1/0] {109} - ¦ ¦--')': ) [0/1] {110} - ¦ °--expr: { - 1 [0/0] {111} - ¦ ¦--'{': { [0/2] {112} - ¦ ¦--expr: 1 [1/0] {114} - ¦ ¦ °--NUM_CONST: 1 [0/0] {113} - ¦ °--'}': } [1/0] {115} - ¦--expr: funct [3/0] {116} - ¦ ¦--FUNCTION: funct [0/0] {117} - ¦ ¦--'(': ( [0/2] {118} - ¦ ¦--SYMBOL_FORMALS: x [1/0] {119} - ¦ ¦--',': , [0/1] {120} - ¦ ¦--SYMBOL_FORMALS: y [0/0] {121} - ¦ ¦--')': ) [0/1] {122} - ¦ °--expr: { - 1 [0/0] {123} - ¦ ¦--'{': { [0/2] {124} - ¦ ¦--expr: 1 [1/0] {126} - ¦ ¦ °--NUM_CONST: 1 [0/0] {125} - ¦ °--'}': } [1/0] {127} - ¦--expr: funct [2/0] {128} - ¦ ¦--FUNCTION: funct [0/0] {129} - ¦ ¦--'(': ( [0/0] {130} - ¦ ¦--SYMBOL_FORMALS: x [0/0] {131} - ¦ ¦--',': , [0/0] {132} - ¦ ¦--COMMENT: # [1/25] {133} - ¦ ¦--SYMBOL_FORMALS: y [1/0] {134} - ¦ ¦--')': ) [0/1] {135} - ¦ °--expr: { - 1 [0/0] {136} - ¦ ¦--'{': { [0/2] {137} - ¦ ¦--expr: 1 [1/0] {139} - ¦ ¦ °--NUM_CONST: 1 [0/0] {138} - ¦ °--'}': } [1/0] {140} - ¦--COMMENT: # las [3/0] {141} - ¦--expr: funct [1/0] {142} - ¦ ¦--FUNCTION: funct [0/0] {143} - ¦ ¦--'(': ( [0/4] {144} - ¦ ¦--SYMBOL_FORMALS: x [1/0] {145} - ¦ ¦--',': , [0/1] {146} - ¦ ¦--SYMBOL_FORMALS: y [0/0] {147} - ¦ ¦--')': ) [0/1] {148} - ¦ °--expr: NULL [0/0] {150} - ¦ °--NULL_CONST: NULL [0/0] {149} - ¦--expr: funct [2/0] {151} - ¦ ¦--FUNCTION: funct [0/0] {152} - ¦ ¦--'(': ( [0/4] {153} - ¦ ¦--SYMBOL_FORMALS: x [1/0] {154} - ¦ ¦--',': , [0/1] {155} - ¦ ¦--SYMBOL_FORMALS: y [0/0] {156} - ¦ ¦--')': ) [1/1] {157} - ¦ °--expr: NULL [0/0] {159} - ¦ °--NULL_CONST: NULL [0/0] {158} - ¦--expr: funct [2/0] {160} - ¦ ¦--FUNCTION: funct [0/0] {161} - ¦ ¦--'(': ( [0/4] {162} - ¦ ¦--SYMBOL_FORMALS: x [1/0] {163} - ¦ ¦--',': , [0/4] {164} - ¦ ¦--SYMBOL_FORMALS: y [1/0] {165} - ¦ ¦--')': ) [0/1] {166} - ¦ °--expr: NULL [0/0] {168} - ¦ °--NULL_CONST: NULL [0/0] {167} - °--expr: funct [2/0] {169} - ¦--FUNCTION: funct [0/0] {170} - ¦--'(': ( [0/4] {171} - ¦--SYMBOL_FORMALS: x [1/0] {172} - ¦--',': , [0/4] {173} - ¦--SYMBOL_FORMALS: y [1/0] {174} - ¦--')': ) [1/1] {175} - °--expr: NULL [0/0] {177} - °--NULL_CONST: NULL [0/0] {176} diff --git a/tests/testthat/unindention/mixed-double-out.R b/tests/testthat/unindention/mixed-double-out.R index a1c7e24d2..44591e1f2 100644 --- a/tests/testthat/unindention/mixed-double-out.R +++ b/tests/testthat/unindention/mixed-double-out.R @@ -37,29 +37,33 @@ function(x, # double function( - x, - y) { + x, + y +) { 1 } function( - x, - y, - k) { + x, + y, + k +) { 1 } function( - x, - y) { + x, + y +) { 1 } function( - x, y) { + x, y +) { 1 } @@ -72,23 +76,23 @@ function(x, # last brace function( - x, y) { + x, y) { NULL } function( - x, y) { + x, y) { NULL } function( - x, - y) { + x, + y) { NULL } function( - x, - y) { + x, + y) { NULL } diff --git a/tests/testthat/unindention/mixed-in_tree b/tests/testthat/unindention/mixed-in_tree deleted file mode 100644 index 275bbebef..000000000 --- a/tests/testthat/unindention/mixed-in_tree +++ /dev/null @@ -1,61 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--expr: { - ( [0/0] {1} - ¦ ¦--'{': { [0/2] {2} - ¦ ¦--expr: ((( - [1/3] {3} - ¦ ¦ ¦--'(': ( [0/0] {4} - ¦ ¦ ¦--expr: (( - 2 [0/0] {5} - ¦ ¦ ¦ ¦--'(': ( [0/0] {6} - ¦ ¦ ¦ ¦--expr: ( - 2 - [0/0] {7} - ¦ ¦ ¦ ¦ ¦--'(': ( [0/1] {8} - ¦ ¦ ¦ ¦ ¦--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} - ¦--'{': { [0/0] {16} - ¦--expr: { - [1/0] {17} - ¦ ¦--'{': { [0/8] {18} - ¦ ¦--expr: call( [1/5] {19} - ¦ ¦ ¦--expr: call [0/0] {21} - ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {20} - ¦ ¦ ¦--'(': ( [0/10] {22} - ¦ ¦ ¦--expr: call1 [1/0] {23} - ¦ ¦ ¦ ¦--expr: call1 [0/0] {25} - ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: call1 [0/0] {24} - ¦ ¦ ¦ ¦--'(': ( [0/0] {26} - ¦ ¦ ¦ ¦--expr: 2 [0/0] {28} - ¦ ¦ ¦ ¦ °--NUM_CONST: 2 [0/0] {27} - ¦ ¦ ¦ ¦--',': , [0/1] {29} - ¦ ¦ ¦ ¦--expr: 3 [0/0] {31} - ¦ ¦ ¦ ¦ °--NUM_CONST: 3 [0/0] {30} - ¦ ¦ ¦ °--')': ) [0/0] {32} - ¦ ¦ ¦--',': , [0/10] {33} - ¦ ¦ ¦--expr: { - [1/1] {34} - ¦ ¦ ¦ ¦--'{': { [0/15] {35} - ¦ ¦ ¦ ¦--expr: sin(c [1/2] {36} - ¦ ¦ ¦ ¦ ¦--expr: sin [0/0] {38} - ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: sin [0/0] {37} - ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {39} - ¦ ¦ ¦ ¦ ¦--expr: cos(p [0/0] {40} - ¦ ¦ ¦ ¦ ¦ ¦--expr: cos [0/0] {42} - ¦ ¦ ¦ ¦ ¦ ¦ °--SYMBOL_FUNCTION_CALL: cos [0/0] {41} - ¦ ¦ ¦ ¦ ¦ ¦--'(': ( [0/0] {43} - ¦ ¦ ¦ ¦ ¦ ¦--expr: pi [0/0] {45} - ¦ ¦ ¦ ¦ ¦ ¦ °--SYMBOL: pi [0/0] {44} - ¦ ¦ ¦ ¦ ¦ °--')': ) [0/0] {46} - ¦ ¦ ¦ ¦ °--')': ) [0/0] {47} - ¦ ¦ ¦ °--'}': } [1/0] {48} - ¦ ¦ °--')': ) [0/0] {49} - ¦ °--'}': } [1/0] {50} - °--'}': } [1/0] {51} diff --git a/tests/testthat/unindention/unindent_multi_line-in_tree b/tests/testthat/unindention/unindent_multi_line-in_tree deleted file mode 100644 index d2b2b61a7..000000000 --- a/tests/testthat/unindention/unindent_multi_line-in_tree +++ /dev/null @@ -1,31 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {id}) - ¦--expr: [0/1] {55} - ¦ ¦--expr: [0/0] {3} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: call [0/0] {1} - ¦ ¦--'(': ( [0/2] {2} - ¦ ¦--expr: [1/0] {7} - ¦ ¦ °--SYMBOL: engin [0/0] {5} - ¦ ¦--',': , [0/2] {6} - ¦ ¦--SYMBOL_SUB: xetex [1/1] {11} - ¦ ¦--EQ_SUB: = [0/1] {12} - ¦ ¦--expr: [0/0] {22} - ¦ ¦ ¦--'{': { [0/9] {13} - ¦ ¦ ¦--expr: [1/7] {17} - ¦ ¦ ¦ °--SYMBOL: x [0/0] {15} - ¦ ¦ °--'}': } [1/0] {20} - ¦ ¦--',': , [0/7] {23} - ¦ ¦--SYMBOL_SUB: luate [1/0] {27} - ¦ ¦--EQ_SUB: = [0/1] {28} - ¦ ¦--expr: [0/0] {38} - ¦ ¦ ¦--'{': { [0/7] {29} - ¦ ¦ ¦--expr: [1/7] {33} - ¦ ¦ ¦ °--SYMBOL: x [0/0] {31} - ¦ ¦ °--'}': } [1/0] {36} - ¦ ¦--',': , [0/0] {39} - ¦ ¦--expr: [0/1] {51} - ¦ ¦ ¦--'{': { [0/3] {42} - ¦ ¦ ¦--expr: [1/2] {46} - ¦ ¦ ¦ °--SYMBOL: xx [0/0] {44} - ¦ ¦ °--'}': } [1/0] {49} - ¦ °--')': ) [0/0] {52} - °--COMMENT: # FIX [0/0] {56} diff --git a/tests/testthat/unindention/vec_with_fun-in_tree b/tests/testthat/unindention/vec_with_fun-in_tree deleted file mode 100644 index d34be57bd..000000000 --- a/tests/testthat/unindention/vec_with_fun-in_tree +++ /dev/null @@ -1,18 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--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: funct [0/0] {7} - ¦ ¦--FUNCTION: funct [0/0] {8} - ¦ ¦--'(': ( [0/0] {9} - ¦ ¦--')': ) [0/1] {10} - ¦ °--expr: { - [0/0] {11} - ¦ ¦--'{': { [0/5] {12} - ¦ ¦--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 deleted file mode 100644 index 68bd330dc..000000000 --- a/tests/testthat/unindention_regex/random_non_comment_indention-in_tree +++ /dev/null @@ -1,17 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - °--expr: a <- [0/0] {1} - ¦--expr: a [0/1] {3} - ¦ °--SYMBOL: a [0/0] {2} - ¦--LEFT_ASSIGN: <- [0/1] {4} - °--expr: funct [0/0] {5} - ¦--FUNCTION: funct [0/0] {6} - ¦--'(': ( [0/0] {7} - ¦--')': ) [0/1] {8} - °--expr: { - bb [0/0] {9} - ¦--'{': { [0/1] {10} - ¦--expr: bbx [1/2] {12} - ¦ °--SYMBOL: bbx [0/0] {11} - ¦--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 deleted file mode 100644 index 80aec2371..000000000 --- a/tests/testthat/unindention_regex/regex_force_no_pattern-in_tree +++ /dev/null @@ -1,24 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: # _ [0/0] {1} - ¦--COMMENT: # l [1/0] {2} - °--expr: a <- [1/0] {3} - ¦--expr: a [0/1] {5} - ¦ °--SYMBOL: a [0/0] {4} - ¦--LEFT_ASSIGN: <- [0/1] {6} - °--expr: funct [0/0] {7} - ¦--FUNCTION: funct [0/0] {8} - ¦--'(': ( [0/0] {9} - ¦--')': ) [0/1] {10} - °--expr: { - # [0/0] {11} - ¦--'{': { [0/2] {12} - ¦--COMMENT: ### . [1/2] {13} - ¦--COMMENT: ### i [1/2] {14} - ¦--expr: q() [1/2] {15} - ¦ ¦--expr: q [0/0] {17} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: q [0/0] {16} - ¦ ¦--'(': ( [0/0] {18} - ¦ °--')': ) [0/0] {19} - ¦--COMMENT: ## . [1/2] {20} - ¦--COMMENT: ## s [1/0] {21} - °--'}': } [1/0] {22} diff --git a/tests/testthat/unindention_regex/regex_force_with_pattern-in_tree b/tests/testthat/unindention_regex/regex_force_with_pattern-in_tree deleted file mode 100644 index 66c1cda0a..000000000 --- a/tests/testthat/unindention_regex/regex_force_with_pattern-in_tree +++ /dev/null @@ -1,24 +0,0 @@ -ROOT (token: short_text [lag_newlines/spaces] {pos_id}) - ¦--COMMENT: # _ [0/0] {1} - ¦--COMMENT: # l [1/0] {2} - °--expr: a <- [1/0] {3} - ¦--expr: a [0/1] {5} - ¦ °--SYMBOL: a [0/0] {4} - ¦--LEFT_ASSIGN: <- [0/1] {6} - °--expr: funct [0/0] {7} - ¦--FUNCTION: funct [0/0] {8} - ¦--'(': ( [0/0] {9} - ¦--')': ) [0/1] {10} - °--expr: { - ## [0/0] {11} - ¦--'{': { [0/1] {12} - ¦--COMMENT: ### . [1/5] {13} - ¦--COMMENT: ### i [1/5] {14} - ¦--expr: q() [1/4] {15} - ¦ ¦--expr: q [0/0] {17} - ¦ ¦ °--SYMBOL_FUNCTION_CALL: q [0/0] {16} - ¦ ¦--'(': ( [0/0] {18} - ¦ °--')': ) [0/0] {19} - ¦--COMMENT: ## . [1/2] {20} - ¦--COMMENT: ## s [1/0] {21} - °--'}': } [1/0] {22} diff --git a/touchstone/config.json b/touchstone/config.json index 84f9d3441..601c57ee2 100644 --- a/touchstone/config.json +++ b/touchstone/config.json @@ -1,9 +1,8 @@ { "os": "ubuntu-latest", - "r": "4.2", - "rspm": "https://packagemanager.rstudio.com/all/__linux__/focal/2023-03-01", + "r": "4.4", + "rspm": "https://packagemanager.rstudio.com/all/__linux__/focal/2024-05-01", "benchmarking_repo": "lorenzwalthert/here", "benchmarking_ref": "bf0167746da7fe4fb156082bad93c9e5cd3386bd", "benchmarking_path": "touchstone/sources/here", - } diff --git a/vignettes/customizing_styler.Rmd b/vignettes/customizing_styler.Rmd index e566daabd..7c31c9a27 100644 --- a/vignettes/customizing_styler.Rmd +++ b/vignettes/customizing_styler.Rmd @@ -32,8 +32,8 @@ The `transformers` argument is, apart from the code to style, the key argument o ```{r, message = FALSE} library("styler") +library("magrittr") cache_deactivate() -library("dplyr") names(tidyverse_style()) str(tidyverse_style(), give.attr = FALSE, list.len = 3) ``` @@ -44,14 +44,15 @@ We note that there are different types of transformer functions. `initialize` in tidyverse_style()$space$remove_space_after_opening_paren ``` -As the name says, this function removes spaces after the opening parenthesis. But how? Its input is a *nest*. Since the visitor will go through all levels of nesting, we just need a function that can be applied to a *nest*, that is, to a parse table at one level of nesting. We can compute the nested parse table and look at one of the levels of nesting that is interesting for us (more on the data structure in the vignettes "Data structures" and "Manipulating the parse table"): +As the name says, this function removes spaces after the opening parenthesis. But how? Its input is a *nest*. Since the visitor will go through all levels of nesting, we just need a function that can be applied to a *nest*, that is, to a parse table at one level of nesting. We can compute the nested parse table and look at one of the levels of nesting that is interesting for us: ```{r} string_to_format <- "call( 3)" pd <- styler:::compute_parse_data_nested(string_to_format) %>% styler:::pre_visit_one(default_style_guide_attributes) -pd$child[[1]] %>% - select(token, terminal, text, newlines, spaces) + +cols <- c('token', 'terminal', 'text', 'newlines', 'spaces') +pd$child[[1]][, cols] ``` `default_style_guide_attributes()` is called to initialize some variables, it does not actually transform the parse table. @@ -59,8 +60,7 @@ pd$child[[1]] %>% All the function `remove_space_after_opening_paren()` now does is to look for the opening bracket and set the column `spaces` of the token to zero. Note that it is very important to check whether there is also a line break following after that token. If so, `spaces` should not be touched because of the way `spaces` and `newlines` are defined. `spaces` are the number of spaces after a token and `newlines`. Hence, if a line break follows, spaces are not EOL spaces, but rather the spaces directly before the next token. If there was a line break after the token and the rule did not check for that, indention for the token following `(` would be removed. This would be unwanted for example if `use_raw_indention` is set to `TRUE` (which means indention should not be touched). If we apply the rule to our parse table, we can see that the column `spaces` changes and is now zero for all tokens: ```{r} -styler:::remove_space_after_opening_paren(pd$child[[1]]) %>% - select(token, terminal, text, newlines, spaces) +styler:::remove_space_after_opening_paren(pd$child[[1]])[, cols] ``` All top-level styling functions have a `style` argument (which defaults to `tidyverse_style`). If you check out the help file, you can see that the argument `style` is only used to create the default `transformers` argument, which defaults to `style(...)`. This allows for the styling options to be set without having to specify them inside the function passed to `transformers`. diff --git a/vignettes/distribute_custom_style_guides.Rmd b/vignettes/distribute_custom_style_guides.Rmd index 031a13876..45e3a0798 100644 --- a/vignettes/distribute_custom_style_guides.Rmd +++ b/vignettes/distribute_custom_style_guides.Rmd @@ -22,15 +22,15 @@ This vignette describes how you can distribute your own style guide. It builds o There are a few packages that implement a third-party style guide that are maintained by styler contributors: -- [lorenzwalthert/styler.nocomments](https://github.com/lorenzwalthert/styler.nocomments) -- [lorenzwalthert/semicoloner](https://github.com/lorenzwalthert/semicoloner) -- [lorenzwalthert/oneliner](https://github.com/lorenzwalthert/oneliner) -- [mlr-org/styler.mlr](https://github.com/mlr-org/styler.mlr) +- [lorenzwalthert/styler.nocomments](https://github.com/lorenzwalthert/styler.nocomments): Drops comments. +- [lorenzwalthert/semicoloner](https://github.com/lorenzwalthert/semicoloner): Puts `;` at the end of lines. +- [lorenzwalthert/oneliner](https://github.com/lorenzwalthert/oneliner): Puts all code on one line. +- [mlr-org/styler.mlr](https://github.com/mlr-org/styler.mlr): Implements mlr's style guide. Other available style guides include: - -- [ropensci-review-tools/spaceout](https://github.com/ropensci-review-tools/spaceout) -- [gadenbuie/grkstyle](https://github.com/gadenbuie/grkstyle) +- [Robinlovelace/styler.equals](https://github.com/Robinlovelace/styler.equals): Tidyverse style but `=` instead of `<-` for assignment. +- [ropensci-review-tools/spaceout](https://github.com/ropensci-review-tools/spaceout): More spaces around braces. +- [gadenbuie/grkstyle](https://github.com/gadenbuie/grkstyle): Styles indention differently and allows to use tabs for it instead of spaces. To start out, you can use the [GitHub Template](https://github.com/lorenzwalthert/styler.yours) for third-party style guides that has already the right directory structure and patterns described below in place. diff --git a/vignettes/strict.Rmd b/vignettes/strict.Rmd index 880a5db10..13ad2509d 100644 --- a/vignettes/strict.Rmd +++ b/vignettes/strict.Rmd @@ -58,12 +58,11 @@ function() 1 ~ more() # comment ``` -- More than one line break is tolerated before closing curly brace and line breaks between curly and round braces are not removed. +- Line breaks between curly and round braces are not removed. ```{styler} test({ 1 - } ) ``` diff --git a/vignettes/styler.Rmd b/vignettes/styler.Rmd index dcb451adc..1b5387112 100644 --- a/vignettes/styler.Rmd +++ b/vignettes/styler.Rmd @@ -28,7 +28,7 @@ styler::cache_deactivate() styler provides the following API to format code: -- `style_file()` styles `.R`, `.qmd`, `.Rmd`, `.Rmarkdown`, `.Rnw`, and `.Rprofile` files. +- `style_file()` styles `.qmd`, `.R`, `.Rmd`, `.Rmarkdown`, `.Rnw`, and `.Rprofile` files. - `style_dir()` styles all these files in a directory.