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

live-preview: Remove string value/range from property information #5926

Merged
merged 4 commits into from
Aug 26, 2024

Conversation

hunger
Copy link
Member

@hunger hunger commented Aug 23, 2024

Now that we do no longer need to pass all the property data through the LSP, we can actually pass around the SyntaxNode defining the current property value, so that we do not have to make sense of a string, but can look at the original AST instead.

tools/lsp/preview/properties.rs Outdated Show resolved Hide resolved
tools/lsp/preview/properties.rs Show resolved Hide resolved
@hunger
Copy link
Member Author

hunger commented Aug 26, 2024

The latest changes add some more helper functions found on rowan::Syntax* to the equivalent parser::Syntax* and then proceeds to remove anything rowan related from the LSP.

It also removes the explicit rowan dependency of our LSP and removes rowan from the workspace dependencies as it is only used in i-slint-compiler now, as it probably should have been all along.

Pass the syntax node defining the current property value along with
the other information on properties.

This will allow us to look at the AST nodes and not just the string
value containing the expression.
... by implementing more helpers on `parser::SyntaxNode` and
`parser::SyntaxToken`.
@hunger
Copy link
Member Author

hunger commented Aug 26, 2024

I really need to automate cargo fmt again :-/

@hunger hunger merged commit d28b13c into slint-ui:master Aug 26, 2024
33 of 34 checks passed
@hunger hunger deleted the tobias/push-nnkzssmkmxqx branch August 26, 2024 12:51
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