Skip to content
This repository has been archived by the owner on Aug 26, 2023. It is now read-only.

Correct the .parse() function in the biscuits post #75

Open
matt-dray opened this issue Feb 28, 2023 · 1 comment
Open

Correct the .parse() function in the biscuits post #75

matt-dray opened this issue Feb 28, 2023 · 1 comment
Labels
rostrum-blog-2 🆕 Address/fix in Quarto version of blog update 🆙 Update a post's content

Comments

@matt-dray
Copy link
Owner

parsed <- parsed[parsed$terminal == TRUE, ] should read parsed <- tokens[tokens$terminal == TRUE, ].

@matt-dray
Copy link
Owner Author

In fact, the whole thing can be simplified to:

.parse <- function(string) {
  tokens <- getParseData(parse(text = string))
  parsed <- tokens[tokens$terminal == TRUE, ]
  rownames(parsed) <- as.character(seq(nrow(parsed)))
  return(parsed)
}

In other words, no need to treat the input to parse() as a file input. Will need to update the body text to reflect this too.

@matt-dray matt-dray added the update 🆙 Update a post's content label Mar 1, 2023
@matt-dray matt-dray added the rostrum-blog-2 🆕 Address/fix in Quarto version of blog label Jul 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
rostrum-blog-2 🆕 Address/fix in Quarto version of blog update 🆙 Update a post's content
Projects
None yet
Development

No branches or pull requests

1 participant