Simon Hausmann
cc9d5e09f0
Add support for clip on Path elements
...
This allows clipping the viewbox conveniently.
2021-05-21 19:51:00 +02:00
Olivier Goffart
a1880bd943
Report an error when trying to convert from logical to physical coordinate in a global
2021-05-20 18:11:58 +02:00
Olivier Goffart
8f94099a7e
Fix reporting of uncalled "max" in imports
2021-05-20 18:11:58 +02:00
Olivier Goffart
6d48468823
Don't recurse when we can use cached value
...
Also avoid stack overflow in case of infinite loop
2021-05-20 13:40:51 +02:00
Olivier Goffart
73c396ed7a
Report binding loops for layouts
2021-05-18 12:25:19 +02:00
Olivier Goffart
4824d43c50
Fix binding loop detection involving states
2021-05-18 10:52:05 +02:00
Olivier Goffart
3548c48bff
Detect binding loop at compile-time
...
FIXME: i've currently disabled layout from the detection because it reports
error in our current examples
2021-05-15 15:49:27 +02:00
Olivier Goffart
c39cb48125
Move builtin types builtin function lookup in the lookup module
...
This way these function can also be auto-completed
2021-05-12 22:21:08 +02:00
Olivier Goffart
0968880ea9
Fix panic when parsing invalid states
2021-05-12 08:50:39 +02:00
Olivier Goffart
d7d9badc93
Fix panic when using some value from an invalid component in a imported file
2021-05-07 18:28:23 +02:00
Olivier Goffart
e163794549
Fix panic when a non-element type is used as an element
2021-05-07 15:36:10 +02:00
Olivier Goffart
3b73c96c37
Adjust the syntax_tests to the change of length
2021-04-21 17:15:19 +02:00
Olivier Goffart
91ed04a72c
Make length
(still the default for all property) be the logical length
...
And a new `physical_length` is now the physical_length unit
Note: this does not change the runtime part yet
2021-04-21 17:15:19 +02:00
Olivier Goffart
069b5aa1a1
Refactor lookup
...
Share some code so we can eaily list all possibilities and we will use that
in the LSP for the completion
2021-04-16 23:41:59 +02:00
Olivier Goffart
87f4a363cf
Add support for opacity property
2021-04-15 15:05:09 +02:00
Olivier Goffart
e34b88d658
Fix panic in invalid export
2021-04-15 11:46:05 +02:00
Olivier Goffart
49477724c6
Fix panic when invalid property
2021-04-15 11:24:49 +02:00
Olivier Goffart
f3489f40ba
Fix panic when parse error of a if
2021-04-15 10:46:22 +02:00
Olivier Goffart
1e730eb845
Fix panic when parsing wrong import statement
...
Have to be several tests because the parser bails out at the first error.
The error message is not optimal but better than a panic
2021-04-14 12:47:26 +02:00
Olivier Goffart
49868a8dae
Try our best to generate a document node, even when there are errors
2021-04-14 12:06:02 +02:00
Olivier Goffart
fed73bbd67
syntax_tests: Try to build the object_tree::document even in case of parse error
...
To make sure it doesn't panic.
Also fix a bunch of errors that were causing panic bacause missing elements in the tree
The goal it to be able to generate a best effort node required for the LSP
2021-04-14 11:46:49 +02:00
Simon Hausmann
aa599e5a98
Fix missing license header
2021-04-14 10:02:22 +02:00
Simon Hausmann
c301cc22b5
Collect foreign imports and filter out true type fonts/collections
...
Resolve them early enough to produce good diagnostics. Permit true type
fonts & collections.
2021-04-14 09:17:23 +02:00
Simon Hausmann
cbf2b51670
Allow empty imports
...
Allow import "blah.60" or, more likely in the future, import "foo.ttf".
2021-04-14 09:01:49 +02:00
Olivier Goffart
533da0ea4c
Add missing file
2021-04-12 19:02:37 +02:00
Olivier Goffart
c3ab89dd3e
Refactor import opening and its hook
...
This way the hook is called regardless if the file exist in the import path or not
2021-04-06 12:27:59 +02:00
Olivier Goffart
f1a7847820
Fixup syntax_tests
2021-03-15 12:41:10 +01:00
Olivier Goffart
a203097b88
Attempt to fix windows syntax_tests
...
Looks like the slashes were not canonical on Windows
2021-03-15 12:05:03 +01:00
Olivier Goffart
014e13b05f
Make Diagnostic field private
2021-03-15 10:37:24 +01:00
Olivier Goffart
730b1ccff2
Refactor diagnostic: Merge BuildDiagnostic and FileDiagnostic
2021-03-12 19:32:50 +01:00
Olivier Goffart
fc35d101d9
Rename diagnostics::level to DiagnosticLevel
2021-03-11 16:27:40 +01:00
Olivier Goffart
968dfaae87
Put what is the FileDiagnostics into the SourceFile so the SourceFile has the content
2021-03-11 16:23:46 +01:00
Simon Hausmann
c8f1389529
Restore test that was accidentally removed
...
It was accidentally removed in commit
9b46e547a2e4fa9beaf23dea8b56458ef4c7c856
2021-02-22 11:17:39 +01:00
Simon Hausmann
13116e8a20
Begin working on the home page
2021-02-22 11:17:38 +01:00
Olivier Goffart
92f9402a39
Fix C++ compilation if using condition between 0 and a unit type
2021-02-16 18:40:32 +01:00
Olivier Goffart
86a440eb79
Fix infinite loop when parsing states
...
Noticed that because i had a merge conflict in a file and the build hang
2021-02-16 08:56:02 +01:00
Olivier Goffart
0174db3679
Delay the percentage size conversion to after the layouting phase
...
So we can see inthe layouting phase if the size was in percent
2021-02-11 15:08:24 +01:00
Olivier Goffart
b75e135459
Support complex product of units
...
Fixes #68
2021-02-04 12:56:14 +01:00
Simon Hausmann
3854d1236a
Fix syntax tests
2021-02-03 13:17:57 +01:00
Simon Hausmann
7982325da4
Change Rectangle::background's type to be a brush
...
This also introduces the brush type in the compiler and generators. At the
moment only conversion from Color is implemented.
2021-02-03 12:49:44 +01:00
Simon Hausmann
e8b64be9bd
Issue a warning when accessing a deprecated property through component scopes
2021-02-03 08:03:01 +01:00
Simon Hausmann
c771bcff45
Print a warning when trying to animate deprecated properties
2021-02-02 22:58:54 +01:00
Simon Hausmann
246398fcb3
Issue a warning when accessing deprecated properties through member lookups
2021-02-02 22:42:02 +01:00
Simon Hausmann
e61529976e
Issue warnings when creating bindings against deprecated properties
2021-02-02 22:42:02 +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
c479fd132d
Fix panic when @children is in the last component
...
Throw an error instead
Fixes #148
2021-02-02 16:44:09 +01:00
Olivier Goffart
294cf9bbe3
Convert from literal 0
to any unit-like types
...
cc #68
2021-02-02 15:38:07 +01:00
Olivier Goffart
ad1e18764a
Make angle its own type
2021-02-01 14:49:25 +01:00
Olivier Goffart
2d12e118ac
Resolve linear gradients
2021-02-01 14:25:27 +01:00
Simon Hausmann
6a4f2aa572
Added the two missing path sub-elements for quadratic and cubic curves
2021-01-28 14:14:24 +01:00