`$` and `@` should not allow arbitrary expressions on the RHS
DavisVaughan opened this issue · 1 comments
DavisVaughan commented
Only strings and symbols
https://github.com/wch/r-source/blob/36008873fb8ca2af3bdaaff418dbade5f7bce118/src/main/gram.y#L512-L515
foo${hi}
gives
(program ($ lhs: (identifier) rhs: ({ body: (identifier))))
but really that should probably error
kevinushey commented
Having arbitrary expressions was the easiest way to support foo$bar$baz
or foo$bar()$baz[[1]]$bam
, but it still might be worth clamping those down a bit.