internal: Make a function operate internal to parsetools

Description Usage Arguments Functions

View source: R/internal.R

Description

Convert a function to look for pd object in the parent.frame(), and the id to extract from the pd unless overwritten.

These functions are for internal use but are documented here for reference.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
internal(fun, id = pd$id)

token(id = pd$id, pd = get("pd", parent.frame()))

text(id = pd$id, pd = get("pd", parent.frame()))

nodes(id, pd = get("pd", parent.frame()))

start_line(id, pd = get("pd", parent.frame()))

start_col(id, pd = get("pd", parent.frame()))

end_line(id, pd = get("pd", parent.frame()))

end_col(id, pd = get("pd", parent.frame()))

filename(pd = get("pd", parent.frame()))

lines(id, pd = get("pd", parent.frame()))

is_terminal(id, pd = get("pd", parent.frame()))

is_first_on_line(id, pd = get("pd", parent.frame()))

is_last_on_line(id, pd = get("pd", parent.frame()))

spans_multiple_lines(id, pd = get("pd", parent.frame()))

terminal_ids_on_line(line, pd = get("pd", parent.frame()))

ids_starting_on_line(line, pd = get("pd", parent.frame()))

ids_ending_on_line(line, pd = get("pd", parent.frame()))

prev_terminal(id = pd$id, pd = get("pd", parent.frame()))

expr_text(id, pd = get("pd", parent.frame()))

Arguments

fun

The function to make internal

id

the ID of the expression

pd

the parse data.

line

a line number

Functions


parsetools documentation built on April 14, 2020, 5:32 p.m.