cache_by_expression: Cache text

Description Usage Arguments

View source: R/utils-cache.R

Description

Splits text into expressions and adds these to the cache. Note that top-level comments are not cached because caching and in particular checking if they are cached is too expensive. Comments may be cached as part of the whole text (as opposed to on an expression by expression basis) using cache_write() directly. Also, we must not cache stylerignore sequence, because we might see the same expression that does not comply with the style guide outside a stylerignore sequence and wrongly think we should leave it as is.

Usage

1
cache_by_expression(text, transformers)

Arguments

text

A character vector with one or more expressions.

transformers

The transformers.


krlmlr/styler documentation built on Oct. 25, 2020, 8:13 a.m.