+
Skip to content
This repository was archived by the owner on Aug 31, 2023. It is now read-only.

Conversation

MichaReiser
Copy link
Contributor

@MichaReiser MichaReiser commented Sep 15, 2022

Summary

This PR makes the SyntaxElementKey public. The key methods already have been public but the type itself wasn't, preventing it to e.g. be used as keys in a HashMap.

The Comments refactoring uses SyntaxElementKey as HashMap keys which is why it is necessary to use the type in other crates. An alternative would have been to use SyntaxNode and SyntaxToken as keys. However, this has the downside that all keys must be deallocated after formatting a file whereas the compiler may be able to optimize the drop away when using the key.

Test Plan

cargo build

This PR makes the `SyntaxElementKey` public. The `key` methods already have been public but the type itself wasn't,
preventing it to e.g. be used as keys in a `HashMap`.
@MichaReiser MichaReiser requested a review from a team September 15, 2022 11:53
@netlify
Copy link

netlify bot commented Sep 15, 2022

Deploy Preview for rometools ready!

Name Link
🔨 Latest commit 3b6baea
🔍 Latest deploy log https://app.netlify.com/sites/rometools/deploys/6323122b7eb6e6000a9e0b86
😎 Deploy Preview https://deploy-preview-3229--rometools.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@MichaReiser MichaReiser temporarily deployed to netlify-playground September 15, 2022 11:53 Inactive
@github-actions
Copy link

@MichaReiser MichaReiser added this to the 0.10.0 milestone Sep 15, 2022
@github-actions
Copy link

Parser conformance results on ubuntu-latest

js/262

Test result main count This PR count Difference
Total 45879 45879 0
Passed 44939 44939 0
Failed 940 940 0
Panics 0 0 0
Coverage 97.95% 97.95% 0.00%

jsx/babel

Test result main count This PR count Difference
Total 39 39 0
Passed 36 36 0
Failed 3 3 0
Panics 0 0 0
Coverage 92.31% 92.31% 0.00%

symbols/microsoft

Test result main count This PR count Difference
Total 5946 5946 0
Passed 1621 1621 0
Failed 4325 4325 0
Panics 0 0 0
Coverage 27.26% 27.26% 0.00%

ts/babel

Test result main count This PR count Difference
Total 588 588 0
Passed 519 519 0
Failed 69 69 0
Panics 0 0 0
Coverage 88.27% 88.27% 0.00%

ts/microsoft

Test result main count This PR count Difference
Total 16257 16257 0
Passed 12395 12395 0
Failed 3862 3862 0
Panics 0 0 0
Coverage 76.24% 76.24% 0.00%

@ematipico ematipico added the A-Core Area: core label Sep 15, 2022
@MichaReiser MichaReiser merged commit a8b7a73 into main Sep 15, 2022
@MichaReiser MichaReiser deleted the feat/expose-syntax-element-key branch September 15, 2022 12:23
@ematipico ematipico removed this from the 0.10.0 milestone Sep 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

A-Core Area: core

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载