Aurindam Jana
5a4a7fee63
Update royalty free license to 1.1 ( #2994 )
2023-07-10 10:12:11 +02:00
Tobias Hunger
e02c360000
Clippy polish
2023-06-28 14:22:30 +02:00
Olivier Goffart
fdec5960bd
Support for @rust-attr on enums
2023-06-19 22:40:49 +02:00
Olivier Goffart
11dea135f7
Domain: slint-ui.com -> slint.dev
2023-06-16 10:55:08 +02:00
Aurindam Jana
039e54a5de
Add royalty free license to files except examples and docs ( #2888 )
2023-06-15 11:20:50 +02:00
Olivier Goffart
ac6f473a64
WIP: support for enum in slint
...
Parser and interpreter part
2023-06-12 13:02:14 +02:00
Amirhossein Akhlaghpour
3a4f3c61d5
Add @rust-attr
on scturct ( #2785 )
...
Fixes : #2660
2023-06-05 16:29:55 +02:00
Olivier Goffart
875a7ea179
Parser: Nicer error when extra top-level semicolon
...
Recover from extra semicolon
2023-04-17 15:13:20 +02:00
Olivier Goffart
a7b8bafdf9
Ensure completion in the document in case of parse error or empty document
...
Every token must be part of a document, including the EOF,
otherwise completion don't work at the end of the document.
2023-04-17 07:58:18 +02:00
Olivier Goffart
ee9f730a6d
Parser: Don't parse everything as a component
...
The old parser always try first to find `Foo :=` from the old syntax so it
would error saying it expect an identifier or `:=`
But if we don't find a component, don't try to parse it as a component too early
This way we get better error and better auto-completions
2023-04-17 07:58:18 +02:00
Olivier Goffart
40922874fa
parser: don't parse error on empty import statement
...
Report the error later when loading the import.
That way, we get a more complete AST for auto-completion
2023-04-17 07:58:18 +02:00
Olivier Goffart
4f00f268a5
Make the old syntax a warning
2023-02-14 12:38:39 +01:00
Olivier Goffart
a0d057b8b8
Enable the new syntax by default
2023-01-07 14:18:10 +01:00
Olivier Goffart
aeed3b48fc
Parser: fix parsing of "public function" in release mode
...
`consume()` does not advance whitespace, while `peek()` does. And the
`peek()` in the debug_assert meant that the behavior was different in
release and debug mode.
Use `expect` instead of consume as it skip over white space
2022-12-15 12:52:21 +01:00
Simon Hausmann
8faf57fa40
Minor fix to export * from "blah"
parsing
...
Use the star token directly.
2022-12-09 11:05:08 +01:00
Simon Hausmann
03fe599890
Add support for re-exporting modules
...
Use `export * from "somewhere.slint"` to avoid having to repeat all the
types of an existing module in order to re-export all of the types.
2022-12-09 11:05:08 +01:00
Olivier Goffart
c1c52a2b86
Make the test pass without defining the SLINT_EXPERIMENTAL_SYNTAX env variable
2022-11-21 22:01:52 +01:00
Simon Hausmann
59d3a69688
Fix support for multiple import statements from the same path ( #1868 )
...
Importing multiple types from the same file with multiple import statements would produce an error.
2022-11-21 15:37:38 +01:00
Olivier Goffart
f055afd2de
New syntax: allow to create component without base
2022-10-26 18:09:57 +02:00
Olivier Goffart
69b15043d4
Gate the new syntax with an environment variable
2022-10-20 08:02:26 +02:00
Olivier Goffart
a3ba7bf78a
syntax_updater: Continue new syntax, add it to the parser
...
This re-adds inheritence with the "inherits" keyword
2022-10-20 08:02:26 +02:00
Tobias Hunger
4230ac2572
Update copyright information to reflect name change
...
Also run resue over the codebase and fix complaints from that tool.
2022-02-09 10:27:47 +01:00
Tobias Hunger
e6b24bceec
[reorg]: Set up and populate the internal
directory
...
Move "internal" crates into the `internal` directory. This first batch
includes most of sixtyfps_runtime but leaves the rendering backends
alone for now.
pre-commit applied some cleanups to the moved files:
- Consistent newline at end of file policy
- trimming trailing whitespace
- Formatting Cargo.toml files.
2022-01-31 16:00:50 +01:00