rewrite: Interface for AST rewriting

Description Usage Arguments Value Examples

View source: R/core-rewrite.R

Description

Interface for AST rewriting

Usage

1
rewrite(ast, rules)

Arguments

ast

A language object.

rules

A list of functions, each of which is the output from 'make_rule'.

Value

A language object.

Examples

1
2
3
4
5
library(rockstaR)

rule = make_rule("nothing", "NULL")
lyrics = "Rockstar is nothing"
rewrite(lyrics, list(rule))

trianglegirl/rockstaR documentation built on Dec. 31, 2020, 8:46 a.m.