slint-ui / slint

Slint is a declarative GUI toolkit to build native user interfaces for Rust, C++, or JavaScript apps.
https://slint.dev
Other
17.69k stars 613 forks source link

fmt: `Inconsistency: expected [ ...] ` #6480

Open qarmin opened 1 month ago

qarmin commented 1 month ago

Syntax errors in slint-lsp format in valid slint files:

version 1.8.0

slint-lsp format * -i

Files - ui.zip

errors

Inconsistency: expected [Identifier],  found Node(SyntaxNode { node: Expression@1151..1240, source_file: "color_palette.slint" })
Inconsistency: expected [Identifier],  found Node(SyntaxNode { node: Expression@1278..1349, source_file: "color_palette.slint" })
Inconsistency: expected [Identifier],  found Node(SyntaxNode { node: Expression@1520..1596, source_file: "color_palette.slint" })
Inconsistency: expected [Identifier],  found Node(SyntaxNode { node: Expression@1634..1676, source_file: "color_palette.slint" })
Inconsistency: expected [Identifier],  found Node(SyntaxNode { node: Expression@8283..8289, source_file: "main_lists.slint" })
ogoffart commented 1 month ago

Thanks for the bug report.

The formatter isn't complete yet and there is still some syntax it doesnt handle and bails out on.