mirror of
https://github.com/slint-ui/slint.git
synced 2025-09-27 12:29:41 +00:00

The old parser always try first to find `Foo :=` from the old syntax so it would error saying it expect an identifier or `:=` But if we don't find a component, don't try to parse it as a component too early This way we get better error and better auto-completions
10 lines
328 B
Text
10 lines
328 B
Text
// Copyright © SixtyFPS GmbH <info@slint-ui.com>
|
|
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial
|
|
|
|
export TestCase := Window {
|
|
if //
|
|
Foo { }
|
|
// ^error{expected ':'}
|
|
// ^^error{Parse error}
|
|
}
|
|
//^error{Parse error: expected a top-level item such as a component, a struct, or a global}
|