R/core-rewrite.R
make_rule.Rd
Make a AST transformation rule
make_rule(from, to)
A character string.
A function that takes a language object and returns a language object.
library(rockstaR) rule = make_rule("nothing", "NULL") lyrics = "Rockstar is nothing" rewrite(lyrics, list(rule)) #> [1] "Rockstar is NULL"