Commit graph

100 commits

Author SHA1 Message Date
Tobias Hunger
8b30849f7e compilerlib: Add tests for linear_gradient and image_url
Add two simple tests to make sure we do not exidentally break the
alternative spelling for linear-gradient and image-url.
2021-11-22 13:21:17 +01:00
Tobias Hunger
37a2ad5b0f compilerlib: Fix an assert triggered by linear_gradient
Allow both documented spellings of linear_gradient in the debug_assert.
2021-11-22 13:21:17 +01:00
Olivier Goffart
8d15bc1427 Parser: make the parentheses around if element optional
closes #466
2021-09-07 10:57:08 +02:00
Olivier Goffart
11398c19eb First implementation of semantic token in the LSP 2021-08-25 13:26:50 +02:00
Olivier Goffart
6a32a8b37a Don't error on empty documents 2021-07-29 17:40:20 +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
Tobias Hunger
35dd3ed282 Janitor: Remove redundant clone() calls 2021-07-08 20:43:38 +02:00
Tobias Hunger
4d712b3f4f Janitor: Clippy suggests to collapse these ifs 2021-07-06 22:34:21 +02:00
Olivier Goffart
13bd828b96 Update license date 2021-07-02 15:55:54 +02:00
Olivier Goffart
42c25248a8 Allow to give a name to for and if 2021-06-18 16:40:40 +02:00
Olivier Goffart
ce34ff87d0 Finish support for callback aliases
cc #111
2021-06-07 20:40:36 +02:00
Olivier Goffart
7384d334c1 WIP: parse callback aliases 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
Olivier Goffart
01c00251b0 Move parsing code for elements to its own modules 2021-06-07 10:48:09 +02:00
Olivier Goffart
0968880ea9 Fix panic when parsing invalid states 2021-05-12 08:50:39 +02:00
Olivier Goffart
ad298a309f WIP: LSP autocompletion of expression 2021-04-16 23:41:59 +02:00
Olivier Goffart
f3489f40ba Fix panic when parse error of a if 2021-04-15 10:46:22 +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
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
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
49c7300907 Support for if else in statements 2021-02-05 13:53:37 +01:00
Olivier Goffart
8ab713c681 Parse @linear-gradient(...) 2021-02-01 14:25:27 +01:00
Olivier Goffart
07df517473 Replace $children with @children 2021-01-28 11:55:08 +01:00
Olivier Goffart
bb4212f0aa Remove bang macro support 2021-01-28 11:49:24 +01:00
Olivier Goffart
5debc08f98 Parse @image-url 2021-01-28 11:49:24 +01:00
Simon Hausmann
16a75a2ff8 Parse return statements 2021-01-25 15:32:00 +01:00
Olivier Goffart
8dc79699de String template concatenation
Currently not supported in the sixtyfps macro
2021-01-18 16:09:58 +01:00
Olivier Goffart
0d2d48be4f Rename "signal" to "callback" 2020-12-18 09:51:01 +01:00
Olivier Goffart
7f78bea8b5 Fix a bunch of cargo clippy warnings in the compiler 2020-12-07 12:54:38 +01:00
Olivier Goffart
8b10414451 Parse signal return type
(currently does nothing with it)
2020-12-01 18:47:49 +01:00
Simon Hausmann
6fba6aca56 Consistency fix for transitions API
Use "in" and "out" instead of "to" and "out".
2020-12-01 11:18:47 +01:00
Olivier Goffart
decbe0ade5 Fix panic when exporting invalid types
And also still allow to export builtin component
2020-11-02 17:18:42 +01:00
Olivier Goffart
e85dbfb041 Parse global structure
for issue #96
2020-10-28 07:18:24 +01:00
Olivier Goffart
980aceded6 Parser: put the component name in a DeclaredIdentifier node
that way we will be able to have the global keyword as another identifier there
2020-10-28 07:18:24 +01:00
Olivier Goffart
b9533a217e Parse struct declaration 2020-10-27 16:09:05 +01:00
Olivier Goffart
0a8c098779 Remove the component contextual keyword
It is not used
2020-10-27 16:09:05 +01:00
Olivier Goffart
84ecffa5d7 Parser: avoid too many "Fixme" error
Echo a parse error once per items
2020-10-12 16:12:32 +02:00
Olivier Goffart
e3459f39d4 Parse two ways bindings 2020-09-23 14:06:08 +02:00
Olivier Goffart
e0ed5252a8 Parse type declaration
```
export Foo := {
    property <int> xxx;
}
```
2020-09-16 18:26:13 +02:00
Olivier Goffart
c809638003 Parse signal handler with arguments (parsing only) 2020-09-07 18:14:17 +02:00
Olivier Goffart
9f026c820d Parse declaration of signal with arguments 2020-09-07 17:41:24 +02:00
Olivier Goffart
9fbb40d91b Start working on a debug statement 2020-09-03 19:10:07 +02:00
Olivier Goffart
9d405060e2 Parse object and array type 2020-09-03 07:43:20 +02:00
Patrick José Pereira
b63852967e sixtyfps_compiler: parser: Move code to use new nth and kind functions
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2020-08-31 15:02:41 +02:00
Simon Hausmann
c1aa4b28c6 Add support for children insertion points for components
Sometimes re-usable components need to act as containers that allow the
user to place other items inside. The component needs to be able to
control the placement of these user-provided elements. That is what the
new

    $children

expression inside elements does.
2020-08-28 15:05:21 +02:00
Olivier Goffart
58cdaeb8dd Update license header to mention that commertial option are available 2020-08-26 13:23:42 +02:00
Simon Hausmann
2823f32692 Apply license headers to all non-binary/non-json sources 2020-08-17 17:55:20 +02:00
Olivier Goffart
0199b70cea if statements 2020-08-04 17:36:20 +02:00
Olivier Goffart
232848de9e Make sure that there is only one error reported when assigning to invalid
This also start parsing assignment ('=') as a self assignement
but the code generation is not yet implmented
2020-07-24 11:33:00 +02:00