mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 10:50:00 +00:00
Add local variables (#8740)
Fixes: #2752 ChangeLog: Added local variable with `let`
This commit is contained in:
parent
3640cb8b97
commit
d2a5ae03dc
15 changed files with 554 additions and 23 deletions
|
@ -367,7 +367,8 @@ declare_syntax! {
|
|||
/// the right-hand-side of a binding
|
||||
// Fixme: the test should be a or
|
||||
BindingExpression-> [ ?CodeBlock, ?Expression ],
|
||||
CodeBlock-> [ *Expression, *ReturnStatement ],
|
||||
CodeBlock-> [ *Expression, *LetStatement, *ReturnStatement ],
|
||||
LetStatement -> [ DeclaredIdentifier, ?Type, Expression ],
|
||||
ReturnStatement -> [ ?Expression ],
|
||||
// FIXME: the test should test that as alternative rather than several of them (but it can also be a literal)
|
||||
Expression-> [ ?Expression, ?FunctionCallExpression, ?IndexExpression, ?SelfAssignment,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue