testwhat
testwhat copied to clipboard
Add way to test [, [[ and $
Need a function to test the operators that extract stuff from data structures
Just a note, operators like this are just normal functions, and can be referred to using backticks..
`<-`('a', 1)
a # prints 1
`if`(a == 1, print('one'), print('boo')) # prints one
# indexing
b = 1:10
`[`(b, 2)
# same thing but using get
get("[")(b, 2)
@filipsch any sense for how much modifying test_function would need to handle this? If it's using anything like get("[")(b, 2)
, then it should be pretty smooth sailing...
@machow I'm afraid that getParseData()
doesn't see them as 'just functions', but I'd have to dive more deeply to answer your question in a satisfying way.
This would be very doable with a refactor to use the as.expression
"ast". Would probably require major changes and a week or two of work, though.