Olivier Goffart
64499498b0
Fix the syntax_tests
...
We now get an error in recursive functions, but that's not the point of this test
2021-11-02 11:59:02 +01:00
Olivier Goffart
8622dcb910
Do the default_geometry pass without inlining
2021-10-28 15:52:29 +02:00
Olivier Goffart
67dd409f87
Move a few more passes before inlining
2021-10-28 15:52:29 +02:00
Olivier Goffart
5f07678478
Make the layout pass work on non-inlined tree
2021-10-28 15:52:29 +02:00
Olivier Goffart
72f022b3ed
Document the test harness
2021-10-26 14:51:23 +02:00
Olivier Goffart
b99ff1b766
Put filename in quote in import errors
...
So that the `debug_assert!` that fires when a error message ends with a
period does not crash the LSP when typing an incomplete filename that ends
with a '.'
2021-10-07 14:44:12 +02:00
Simon Hausmann
2ecf6c61d4
Minor cleanup: include the path in the error message when embedding an image fails
2021-10-06 09:44:06 +02:00
Olivier Goffart
521bf192f8
Improve error message for parse error
...
print the literal token symbol instead of the internal token name
2021-10-06 08:54:14 +02:00
Simon Hausmann
517b731e7b
Fix CI build
...
Turn message about inability to embed images into a warning for now
We do test our tutorial and in the CI build we enforce embedding,
so the icon paths there don't work.
2021-10-05 23:16:46 +02:00
Simon Hausmann
88ad176008
Improve diagnostics when images cannot be located for embedding
...
This is a two-stage change, that first centralizes the file I/O code
path for on-disk and builtin:/ files. Secondly the resource embedding
pass now produces diagnostics if a file cannot be located.
2021-10-05 23:16:46 +02:00
Olivier Goffart
80d7b2ebe8
Hard error when not calling a callback
...
While before it was silently ignored or caused error in the generated code.
Fixes #542
2021-10-05 12:56:26 +02:00
Olivier Goffart
ae3e1b4680
Allow normal Element to be in the Dialog's button row with dialog-button-role
2021-10-05 09:46:20 +02:00
Simon Hausmann
d3dfd43bdc
Tweak dialog error messages
...
Replace "should" with "must"/"can only" to emphasize that this is an error.
2021-09-30 11:27:50 +02:00
Olivier Goffart
7db9f3dfa9
Dialog: automatically add clicked callback for the standard button
...
And make the viewer listen to them and set them to automatically close dialogs
2021-09-30 10:21:13 +02:00
Olivier Goffart
7f05bfa309
Add the Dialog element
2021-09-29 16:25:44 +02:00
Simon Hausmann
5ee005c972
Fix panic in LSP when declaring animation on layout controlled property
...
When an animate foo {} declaration ends up creating an synthetic, invalid BindingExpression,
we still need to give it a span, to ensure that the diagnostics
produced later have *some* location set.
Fixes #515
2021-09-22 16:01:29 +02:00
Olivier Goffart
8d15bc1427
Parser: make the parentheses around if
element optional
...
closes #466
2021-09-07 10:57:08 +02:00
Simon Hausmann
4d3f08d954
Allow global singletons to have default callback handlers
...
It's already working, we just need to remove the error handling :-)
Fixes #467
2021-09-06 13:56:27 +02:00
Simon Hausmann
ab522eb147
Produce errors when exporting a name multiple times
2021-08-31 10:19:50 +02:00
Simon Hausmann
c3ca796b1d
Fix missing compiler warning about duplicated ids when using id more than twice
...
Don't remove the id of a duplicate from the seen set, as it may appear
again.
2021-08-30 20:35:31 +02:00
Tobias Hunger
a387c0f60f
Janitor: Fix clippy::needless_borrow
2021-08-18 00:24:51 +02:00
Tobias Hunger
aea4ecca99
Apply pre-commit hooks to all files
2021-08-17 22:38:16 +02:00
Olivier Goffart
d5b1a95f74
Turn the "duplicated id" error into a warning
...
Just for compatibility reason with 0.1.0, this is going to be turned
back into an error at a later point
2021-08-12 13:47:11 +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
Simon Hausmann
01c3347d19
Make fluent the new default style
...
It's not ugly :-)
2021-08-10 15:56:38 +02:00
Olivier Goffart
b6137ecbc4
Error when trying to use internal builtin items
2021-08-09 17:43:22 +02:00
Olivier Goffart
fa770ec262
Fix panic when one of the two branch of a condition is Type::Void
...
Throw a proper compilation error.
Note that there may be a bit too many error now when the two
branch of a condition are not the same, but it's better than a panic
2021-08-06 19:44:05 +02:00
Olivier Goffart
a89d83e58f
Apply suggestions from code review
...
Co-authored-by: Simon Hausmann <simon.hausmann@sixtyfps.io>
2021-08-06 15:58:13 +02:00
Olivier Goffart
b5f34fd1d7
Make it an error to use dynamic tabs in the TabWidget
2021-08-06 15:58:13 +02:00
Olivier Goffart
d41839abe3
Compiler pass for the TabWidget
...
it will lower the TabWidget into a TabWidgetImpl and the tabs into TabImpl
2021-08-06 15:58:13 +02:00
Olivier Goffart
6a32a8b37a
Don't error on empty documents
2021-07-29 17:40:20 +02:00
Olivier Goffart
bd52f4d444
Allow the clip property to be a dynamic property
2021-07-29 15:02:25 +02:00
Olivier Goffart
09c36ae965
Test for commit e0fad7fbdf
2021-07-29 13:25:47 +02:00
Simon Hausmann
fd26dd4944
Fix expected error messages
...
Amends a3652e6823
2021-07-28 17:08:27 +02:00
Simon Hausmann
e8727e98c5
Produce an error message when using if or for in grid layouts
...
An early error is better than a build error at compile time of generated code.
2021-07-28 17:08:27 +02:00
Olivier Goffart
be37a9f69a
Allow angle and duration in the public API snce we document it
2021-07-26 17:36:02 +02:00
Olivier Goffart
ae210e79ec
Properly handle self assignment on non-float types
2021-07-23 16:33:50 +02:00
Simon Hausmann
4f13238ff5
Fix preview on rectangles with opacity or drop shadow
...
Instead of producing an error, produce just a warning that the effect won't
be visible on root elements.
2021-07-23 11:41:28 +02:00
Olivier Goffart
f7923bfb77
Fix an error ending by a period
...
Reword the error because we might not even have an identifier
2021-07-22 14:38:58 +02:00
Olivier Goffart
f5de7e00a0
Make sure error messages don't end with '.'
...
As suggested in https://github.com/sixtyfpsui/sixtyfps/pull/275#issuecomment-881240725
2021-07-16 12:39:50 +02:00
Olivier Goffart
920903ad19
Throw an error if there are duplicated id in a component
2021-07-07 12:31:40 +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
Tobias Hunger
a38868b4aa
Janitor: Fix typo in local function name
...
No behavior change is intended!
2021-06-28 08:32:00 +02:00
Olivier Goffart
9b4bcab926
Better error message when overriding a layout property
...
As suggested by Simon
2021-06-23 17:15:49 +02:00
Olivier Goffart
e721a4cf1e
Report error when the 'x' or 'y' property is set for elements in layout
2021-06-23 16:53:45 +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
7a1ba1a1d5
Forgot to add the test for previous commit
2021-06-22 13:28:15 +02:00
Olivier Goffart
fb7050e3e6
Properly detect layout loop involving images
2021-06-21 12:33:15 +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