mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 18:58:36 +00:00
Document and enable the in / out keywords with the old component syntax (#1879)
But it still defaults to `in-out`
This commit is contained in:
parent
59d3a69688
commit
d2ade4fd98
3 changed files with 29 additions and 8 deletions
|
@ -336,12 +336,7 @@ fn parse_callback_declaration(p: &mut impl Parser) {
|
|||
/// ```
|
||||
fn parse_property_declaration(p: &mut impl Parser) {
|
||||
let checkpoint = p.checkpoint();
|
||||
let mut reported_experimental = false;
|
||||
while matches!(p.peek().as_str(), "in" | "out" | "in-out" | "in_out" | "private") {
|
||||
if !reported_experimental && !super::enable_experimental() {
|
||||
p.error("the input/output keywords are experimental, set `SLINT_EXPERIMENTAL_SYNTAX` env variable to enable experimental syntax. See https://github.com/slint-ui/slint/issues/1750");
|
||||
}
|
||||
reported_experimental = true;
|
||||
p.consume();
|
||||
}
|
||||
if p.peek().as_str() != "property" {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue