R/core-rewrite.R
rewrite.Rd
Interface for AST rewriting
rewrite(ast, rules)
A language object.
A list of functions, each of which is the output from `make_rule`.
library(rockstaR) rule = make_rule("nothing", "NULL") lyrics = "Rockstar is nothing" rewrite(lyrics, list(rule)) #> [1] "Rockstar is NULL"