Olivier Goffart
b42c187ed1
Refactor the way the two-ways biding are represented internaly
...
Don't put them in a fake expression.
This simplifies a bit the expression handling, and will make
possible to fix analysis that needs a vew into the aliases
2021-08-20 18:26:36 +02:00
Olivier Goffart
c25538c982
Normalize identifiers to -
instead of _
...
As a result
- The error messages will now show the error with `-` instead of `_`
- The LSP will auto-complete with -
- The interpreter's list of properties will list the property with '-'
(but we made the change so that set_property, get_property, and so on
work also if passed a '-')
2021-08-10 22:21:01 +02:00
Olivier Goffart
e0fad7fbdf
Proper .60 compilation error when changing a property linked with a two way binding in a state
...
Instead of generating wrong code or panic
2021-07-27 10:18:24 +02:00
Olivier Goffart
f544e67fa1
Fix panic or invalid code caused by invalid expression in the tree
...
When there is an animaiton but no expression, the binding is
left with an invalid expression.
State was keeping that invalid expression as part of sub expression
this is a regression since commit ba32777cab
2021-07-27 09:10:33 +02:00
Olivier Goffart
ba32777cab
Refactoring: move the animation in the PropertyBinding struct
...
Since they always belong together.
This will help for issue #193
2021-07-23 15:25:53 +02:00
Olivier Goffart
13bd828b96
Update license date
2021-07-02 15:55:54 +02:00
Tobias Hunger
13d7f5e7bd
Janitor: Fix typos in comments and user-facing strings
...
Also adapt tests for error messages containing the fixed strings.
No behavior change is intended!
2021-06-28 08:32:25 +02:00
Olivier Goffart
40a6e1ecb8
Fix warning
2021-06-23 13:10:24 +02:00
Olivier Goffart
9d2bd11098
Error when having an animation in a transition on a property which is not part of the state
...
Fixes #255
2021-06-23 13:05:25 +02:00
Olivier Goffart
a97bcd5ae1
Use BTreeMap unstead of HashMap to store the bindings
...
Because the order is important to keep deterministic error and output
2021-06-18 21:47:00 +02:00
Olivier Goffart
4824d43c50
Fix binding loop detection involving states
2021-05-18 10:52:05 +02:00
Olivier Goffart
84501e630a
Rename SyntaxNodeWithSourceFile to SyntaxNode
...
Same for SyntaxToken
2021-04-13 17:10:56 +02:00
Olivier Goffart
5dfa2549c8
Put the named reference in a Rc so it will be easier to compute the use count and suck
2021-03-29 15:16:41 +02:00
Olivier Goffart
3db3400951
Rename the Object type to Struct in the compiler
2021-03-16 12:38:53 +01:00
Simon Hausmann
2f3c280ebe
Fix cargo fmt --check
...
Not sure what happened but I guess the new release made it stricter
2021-02-18 13:45:42 +01:00
Simon Hausmann
1f091cb1c0
Rename Rectangle.color to Rectangle.background
...
Add support for built-in property aliases and rename `color` to
`background` - in preparation for it also changing to type brush.
Right now the alias is silent, a deprecation and overall change
will come in a subsequent change.
2021-02-02 17:01:12 +01:00
Olivier Goffart
865e6055f2
Work on transition: lower the transitions
2020-11-20 09:39:06 +01:00
Olivier Goffart
88ceeeb3e6
Error when a transition reffers to a state that does not exist
2020-11-20 09:39:06 +01:00
Olivier Goffart
cfa9413861
More work on the state binding for transition:
...
When there is a transition, turn the state property into a property of StateInfo
Not yet implemented for C++
2020-11-19 12:43:28 +01:00
Olivier Goffart
27a6ff1227
Move Type and related concepts in a different module
...
Leaving only the TypeRegister in the typeregister module
2020-10-23 11:17:14 +02:00
Olivier Goffart
8361ef4019
Start code egeneration for the two ways binding
...
This is only meant to include the cases in which the property are optimized.
Does not work yet for the dynamic component
2020-09-24 14:37:16 +02:00
Olivier Goffart
58cdaeb8dd
Update license header to mention that commertial option are available
2020-08-26 13:23:42 +02:00
Simon Hausmann
2823f32692
Apply license headers to all non-binary/non-json sources
2020-08-17 17:55:20 +02:00
Olivier Goffart
52cf481dc4
Fix states in repeated elements
...
This create reference to new property that needs to be adjusted
2020-08-04 14:02:18 +02:00
Olivier Goffart
f02512f467
Allow to get the span of a binding
2020-07-28 18:02:23 +02:00
Olivier Goffart
bdea34d8c4
Generate an expression for states
2020-07-21 19:01:48 +02:00