safeguard | R Documentation |
Perform pre-transpilation check
safeguard(ast, rules, deparsers)
ast |
A language object. |
rules |
A list of functions; the rewriting rules, each of which is the output from make_rule. |
deparsers |
A list of functions; the deparsers, each of which is the output from make_deparser. |
TRUE when the check is complete.
# Expect no warning
safeguard(parse_expr("a <- 3"),
rules = default_rules(),
deparsers = default_deparsers())
# Expect a warning (as `max` is reserved to be a function by the transpiler)
safeguard(parse_expr("max <- 3"),
rules = default_rules(),
deparsers = default_deparsers())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.