-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Design ideas #3
Comments
Some other ideas:
(re
How should we handle multiple attributes for a single function? Eg. // [[Rcpp::export, attributes::register]]
int foo() { ... } A hiccup there is that it's not interpretable as R code unless we split on ", " (but we might have to be careful for things like the following): // [[foo::bar("one", "two"), attributes::foo]]
... I guess we would split on something like |
(Coming at this from an outsider's view, of course.) How do you want to regard the basic "// [[ expression ]]" syntax? If you If that seems too verbose, you could implicitly interpret "expression" (This is all assuming you want some link to R syntax.) John On 3/4/14, 12:08 PM, Kevin Ushey wrote:
|
We use parse( text = ) on whatever is between [[ and ]] so we could separate attributes with ; If we start to have more attributes, perhaps we can have multi line comments, e.g /* [[ Envoyé de mon iPhone Le 5 mars 2014 à 00:27, johnmchambers notifications@github.com a écrit :
|
I think it would be nice to stay within the spec for C++11 attributes. The J.J. On Tue, Mar 4, 2014 at 11:33 PM, Romain François
|
I think the initial version should be written in R. For things like code generation, we can be much more expressive in R. And this is not something performance critical.
I'd like a mechanism for package to register attribute handlers. So we need a way to go from:
to the
bar
handler shipped by packagefoo
.Code between
// [[
and]]
should be parseable as R code. We'll have to implement making sense of the parsed expression, but it should be fairly trivial.The text was updated successfully, but these errors were encountered: