nick-ulle/rstatic

Make ASTNode initializer methods more convenient

nick-ulle opened this issue · 0 comments

Generating new code is unwieldy because most of the ASTNode initializer methods only accept ASTNodes as arguments. This issue is to make the initializer methods more user friendly by having them accept regular R objects and convert automatically.

For example,

Call$new(Symbol$new("+"), list(Integer$new(3L), Integer$new(4L)))

should be something we can write succinctly as

Call$new("+", list(3L, 4L))

or even

Call$new("+", 3L, 4L)