Skip to main content

r_wrapper_raw_literal

Function r_wrapper_raw_literal 

Source
pub(crate) fn r_wrapper_raw_literal(
    s: &str,
    formals: &BTreeSet<String>,
) -> TokenStream
Expand description

Build a TokenStream containing a raw string literal from an R wrapper string.

Every generated wrapper is finalized here, so this is also where calls a formal would shadow are qualified: formals holds every R formal of the wrappers in s, and each call to a base function that shares a name with one of them is written base::name(...) (qualify_shadowed_calls).

The delimiter has one more # than the longest run of # after a " in the wrapper, so a doc comment quoting "# a footer" or a default of "#" can’t end the literal early (#2111).