Skip to content
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

Scopes: specify where to place the start and end locations #76

Open
hbenl opened this issue Mar 8, 2024 · 2 comments
Open

Scopes: specify where to place the start and end locations #76

hbenl opened this issue Mar 8, 2024 · 2 comments
Labels

Comments

@hbenl
Copy link
Collaborator

hbenl commented Mar 8, 2024

For example, when encoding a scope for function f() {}, the start location could be placed at the beginning of function or at {.

@szuend
Copy link
Collaborator

szuend commented Mar 12, 2024

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.

@hbenl
Copy link
Collaborator Author

hbenl commented Mar 12, 2024

  • 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants