Skip to content
Prev 32110 / 63424 Next

Why does the lexical analyzer drop comments ?

hadley wickham wrote:
Yep. Plan to combine the more verbose information out of the modified 
parser with the same guess machine that checkUsage uses.
Another side effect is that we could imagine to link error patterns 
identified by checkUsage (no visible binding for global variable "y", 
...) to actual locations on the file (for example the place where the 
variable y is used in that case ), which at the moment is not possible 
because the parser only locates entire expression (semantic groupings) 
and not tokens.

 > f <- function( x = 2) {
+ y + 2
+ }
 > checkUsage( f )
<anonymous>: no visible binding for global variable ?y?