Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use srcref with language objects #220

Open
moodymudskipper opened this issue Jul 13, 2023 · 0 comments
Open

Use srcref with language objects #220

moodymudskipper opened this issue Jul 13, 2023 · 0 comments
Labels
Milestone

Comments

@moodymudskipper
Copy link
Collaborator

To be able to keep comments, skipped lines, indention and other spaces in constructed output. As we do with functions.

See #215 (comment)

The srcref of language objects seems to work a bit differently.

x <- quote({
  a$b # some comment
})

attributes(x)
#> $srcref
#> $srcref[[1]]
#> {
#> 
#> $srcref[[2]]
#> a$b
#> 
#> 
#> $srcfile
#> <text> 
#> 
#> $wholeSrcref
#> x <- quote({
#>   a$b # some comment
#> }

cc @krlmlr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant