Scopes: specify where to place the start and end locations
hbenl opened this issue · comments
Holger Benl commented
For example, when encoding a scope for function f() {}
, the start location could be placed at the beginning of function
or at {
.
Simon Zünd commented
Note that Ecma262 defines all this somewhat via bindings and execution order, but not syntactically with tokens (e.g. on which token a scope starts/ends).
We might be able to derive it from the spec, where scopes actually start/end. Or we could look at what JS engines do.
Holger Benl commented
- in Chrome's debug protocol the start location is reported to be at the opening paren of the function's parameter list (see this comment)
- Firefox' debug protocol doesn't report locations for scopes