Recognize symbols created by delayedAssign / assign / makeActiveBinding#364
Recognize symbols created by delayedAssign / assign / makeActiveBinding#364renkun-ken merged 15 commits intoREditorSupport:masterfrom
Conversation
|
It does not seem to work with the following: makeActiveBinding(("a"), function() 1, environment())We could simply ignore these calls with the name being not simply a string literal. |
|
I just recall the reason we didn't detect these assign functions. Consider the following examples: e <- new.env()
assign("var", 1, e)
assign("var", 2, globalenv())
assign("var", 3, .GlobalEnv)All these assign functions have an argument to specify which environment the assignment should be done. The document outline only lists the global symbols in the document. However, these assignments may be done in any environment. Should we detect the |
|
Yes, I'm aware of this issue. My personal points are:
Simple improvements for this, in my opinion, could be detecting the
However, I'm hesitate to do it as it complicates the code and it's difficult to consider all those possibilities. So my suggestion is that we may choose one of the two strategy:
What do you think? |
I think this is good enough for most cases. |
|
As |
Closes #362
A simple test file
Outline can display the promise / active binding symbols now