tests/testthat/references/namespace.R

# ------------------------------------------------------------------------------
# namespace

foo::
foo::bar
foo::bar(1)

# ------------------------------------------------------------------------------
# namespace internal

foo:::
foo:::bar
foo:::bar(1)

# ------------------------------------------------------------------------------
# namespace missing rhs

# It's nice that `::` allows an optional RHS and enforces that it can only be a
# string or identifier, so this gives us a pretty clean tree even though it is
# invalid R code.
# https://github.com/r-lib/tree-sitter-r/issues/65
library(dplyr::)

library()

1
2
3

Try the treesitter.r package in your browser

Any scripts or data that you put into this service are public.

treesitter.r documentation built on Sept. 12, 2024, 7:06 a.m.