Commit graph

12 commits

Author SHA1 Message Date
Olivier Goffart
12393e21bd
syntax_tests: allow to update tests, and don't use a regexp (#8589)
* syntax_tests: allow to "bless" tests, and don't use a regexp

A regexp was used at the beginning because I thought we would want to
allow error to contains things that were not predictable or that would
often change. But this is not the case¹. It is better to actually test
for the full error message

¹ well actually it was the case for path, but there is another substitution to 
 `📂` for the manifest directory

* syntax_tests: Bless the tests

* syntax_tests: Manual adjust after bless

Because there used to be comments on the same line of the message which
bless don't support

* Fix error message with path on windows

 - The debug implementation of path make double slash, that's not what
   we want to show the user
 - normalize paths to use `/` so the test passes
2025-06-02 16:47:33 +02:00
Olivier Goffart
ed179cd5b1
Refactoring: get rid in the callable in the Expression tree
Have a special node for them in FunctionCall
2025-01-24 20:26:35 +01:00
Olivier Goffart
4a5ba09e7a Fix panic in legacy component with out property
Fixes #7095
2024-12-16 13:58:56 +01:00
Olivier Goffart
461beb80cd Fix purity check for focus() on custom component
Do the purity check before doing the transformation of the `focus()`
function, so the source location of the error is the most accurate

Fixes #6979
2024-12-03 15:52:33 +01:00
Olivier Goffart
650fd0eef5 Fix panic when calling expression containing un-called macro
Fixes #6650
2024-11-11 16:08:22 +01:00
Olivier Goffart
dff19c52da Fix assertion failed: lhs_lookup.is_local_to_component
Fixes #6632
2024-10-28 11:44:25 +01:00
Olivier Goffart
6717e627a1 Fix panic when a layout constraint has an Expression::Invalid as binding
We can detect this case earlier

Fix #6590
2024-10-22 09:35:57 +02:00
Olivier Goffart
6c81d5069e Fix parsing of unfinished import statement
Fix #6588

Note for the test: parse error at the end of the file are actually
reported at offset 0. Use a trick to add more `^` at the beginning to
mean that.
(Offset 0 is actually offset 1 as the column starts at 1)
2024-10-22 09:35:46 +02:00
Olivier Goffart
4e50fbdb15 Fix panic making an alias to a private property
Fixes #6587
2024-10-22 09:35:31 +02:00
Olivier Goffart
13d44130d9
Fix compiler panic binding to property with syntax error (#6572)
Fixes #6519
2024-10-16 21:35:35 +02:00
Olivier Goffart
f0e02a3aa3 Fix panic with invalid code
Fix #6518
2024-10-15 11:42:28 +02:00
Olivier Goffart
4718d5b050
Fix invalid node generated while parsing invalid @tr (#6560)
Fixes #6512

The TrPlural must always have an expression otherwise it panics later.
(Also adjust the panic message when nodes are missing)
2024-10-15 10:23:56 +02:00