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
Olivier Goffart
19cef07d96
Properly detect loop in layout
...
cc #257
2021-06-18 20:30:14 +02:00
Olivier Goffart
42c25248a8
Allow to give a name to for
and if
2021-06-18 16:40:40 +02:00
Olivier Goffart
deaa0fddb0
WIP layout: split vertical and horizontal cache
...
Split the vertical and horizontal pass into different property cache
This will allow to implement "height for with"
This patch does not port the Rust or C++ binding yet
2021-06-16 15:14:07 +02:00
Olivier Goffart
2438f27200
Keep the old long names property as deprecated
2021-06-14 10:28:30 +02:00
Olivier Goffart
ee00c9eb92
Rename maximum- and minimum- properties to max- and min-
...
Issue #259
2021-06-14 10:28:30 +02:00
Olivier Goffart
522e78915f
Fix the tests
2021-06-07 20:40:36 +02:00
Olivier Goffart
ce34ff87d0
Finish support for callback aliases
...
cc #111
2021-06-07 20:40:36 +02:00
Olivier Goffart
3ddc3c6ce5
Don't re-use Type::Void for inferred type
...
Make it explicit that it is inferred, and differentiate callback and property
2021-06-07 20:40:36 +02:00
Olivier Goffart
715d38903f
Allow to omit the type of aliases
2021-06-07 10:48:09 +02:00
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