Refactoring: get rid in the callable in the Expression tree

Have a special node for them in FunctionCall
This commit is contained in:
Olivier Goffart 2025-01-24 20:26:35 +01:00 committed by GitHub
parent de87bf2a43
commit ed179cd5b1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
38 changed files with 693 additions and 884 deletions

View file

@ -54,7 +54,7 @@ export Xxx := Rectangle {
45()()();
// ^error{The expression is not a function}
(foo)(1);
// ^error{'foo' must be called. Did you forgot the '\(\)'}
// ^error{Function must be called. Did you forgot the '\(\)'}
}

View file

@ -3,14 +3,10 @@
export component App inherits Window{
background: blue;
// ^error{'blue' must be called}
// ^^error{Cannot convert function\(\) -> color to brush}
// ^error{Function must be called}
function blue()->color {
// ^error{The binding for the property 'blue' is part of a binding loop}
// ^^error{Cannot convert function\(\) -> color to color}
blue
// ^error{'blue' must be called}
// ^error{Function must be called}
}