Skip to content

Conversation

@mishoo
Copy link
Contributor

@mishoo mishoo commented Sep 9, 2024

js2-visit-extern-binding will now walk the bindings in proper order (left-to-right) both for import and export parents. Previously, the walker would descend into the right node first for export, with the visible bug that js2-node-at-point would not find the foo name in this case:

export { |foo as bar };

Other small fixes:

  • do not extend the boundary of the foo name node in a case like this:

    export default foo     ;
    
  • include the semicolon when printing nodes like the above

  • fix a bunch of warnings related to length of docstrings; also type of a defcustom.

  • minor cleanups

`js2-visit-extern-binding` will now walk the bindings in proper
order (left-to-right) both for `import` and `export` parents. Previously,
the walker would descend into the right node first for `export`, with the
visible bug that `js2-node-at-point` would not find the `foo` name in this
case:

    export { |foo as bar };

Other small fixes:

- do not extend the boundary of the `foo` name node in a case like this:

    export default foo     ;

- include the semicolon when printing nodes like the above

- fix a bunch of warnings related to length of docstrings; also type of a
  defcustom.

- minor cleanups
@mishoo mishoo marked this pull request as draft September 10, 2024 05:56
@dgutov
Copy link
Collaborator

dgutov commented Sep 10, 2024

Hi! Thanks for this.

Could you add a few more tests? The js2-deftest-parse macro should at least help exercise the change in the printing behavior.

@mishoo
Copy link
Contributor Author

mishoo commented Sep 18, 2024

Could you add a few more tests? The js2-deftest-parse macro should at least help exercise the change in the printing behavior.

Yep, that's why I marked it as draft, but I didn't get to it yet... hopefully this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants