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
72de76b71a
Documentation for enums
2023-06-12 13:02:14 +02:00
Olivier Goffart
ac6f473a64
WIP: support for enum in slint
...
Parser and interpreter part
2023-06-12 13:02:14 +02:00
Olivier Goffart
12e6b34e2d
Translations: support for plurals
2023-06-07 10:34:34 +02:00
Olivier Goffart
e97a2e8229
Translations: support context
2023-06-06 14:48:48 +02:00
Olivier Goffart
dcd8450dfa
WIP: start working on translations: @tr()
...
This commit just do the parsing of the @tr macro.
2023-06-05 16:34:59 +02:00
Amirhossein Akhlaghpour
3a4f3c61d5
Add @rust-attr
on scturct ( #2785 )
...
Fixes : #2660
2023-06-05 16:29:55 +02:00
Tobias Hunger
bb67122a50
LSP: Remove offset to position mapper
2023-05-02 15:12:01 +02:00
Tobias Hunger
43aae1de1c
Interpreter: Include the id :=
in Elements
...
Include the "id :=" part when highlighting an Element. This places the
cursor at the 'i' now.
Done-with: @ogoffart
2023-04-26 20:49:12 +02:00
Tobias Hunger
bbdd6aeab7
compiler: Ignore leading whitespace when parsing
...
... and update all out test cases accordingly.
2023-04-26 17:22:13 +02:00
Olivier Goffart
7ef9d9b7ec
LSP: complete the first import right before the first component
...
So this doesn't break the slint! macro (add the import at the beginning
of the rust file)
2023-04-19 17:19:55 +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
Tobias Hunger
3ac01c3f07
clippy: Fix clippy warnings
2023-03-09 09:35:29 +01:00
Olivier Goffart
4f00f268a5
Make the old syntax a warning
2023-02-14 12:38:39 +01:00
Olivier Goffart
4cf6690e5a
syntax_updater: also parse slint,no-preview
code block in md files
...
This include a fix to make sure the diagnostics has access to the
sources even if there is no path
2023-01-07 14:18:10 +01:00
Olivier Goffart
a0d057b8b8
Enable the new syntax by default
2023-01-07 14:18:10 +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
851a910e41
Parser: Parse functions
2022-12-06 14:56:25 +01:00
Olivier Goffart
51933b99bb
New syntax for transitions, within the state
2022-11-22 15:16:54 +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
Tobias Hunger
a4e070bdfd
compiler: Add support for handling binding expressions for the LSP
2022-11-21 15:01:09 +01:00
Olivier Goffart
3240fd8bf9
Test: fix the parser tests when running without SLINT_EXPERIMENTAL_SYNTAX
defined
...
Ignore the error mentioning the new syntax
2022-10-27 13:06:40 +02:00
Olivier Goffart
69b15043d4
Gate the new syntax with an environment variable
2022-10-20 08:02:26 +02:00
Olivier Goffart
8e0c88a991
Fix compiler warning about usage of deprecated method
2022-06-04 10:23:32 +02:00
Olivier Goffart
b4ebd88d35
Implements @radial-gradient(circle, ...)
...
Only the circle is implemented so far.
Part of #263
2022-05-19 14:07:20 +02:00
Olivier Goffart
1d18bd634b
Remove unused branch in macro
...
Nightly rust starts warning about this
2022-05-13 14:36:49 +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
de4e195280
Rename internal crates and add a README.md to them
...
The README.md contains the warning that used to be in lib.rs.
Add README.md files to all internal crates
... pointing to the official public crate to use instead.
Rename internal crates
fixup: README files
fixup rename
2022-02-07 13:12:48 +01:00
Simon Hausmann
125b90a64b
Merge remote-tracking branch 'origin/master' into wip/rename
...
Conflicts:
api/cpp/cbindgen.rs
api/cpp/include/slint.h
examples/CMakeLists.txt
examples/imagefilter/Cargo.toml
examples/plotter/main.rs
internal/backends/mcu/lib.rs
2022-02-04 16:47:20 +01:00
Olivier Goffart
54d9ebdc19
Fix documentation warnings about non-existing links
2022-02-04 14:53:23 +01:00
Olivier Goffart
c5ef368a3f
Fix LSP semantic coloration bailing out sometimes
...
Step to reproduce:
```
xx := Window {
TouchArea {
clicked => {
if (true) {}
// note: because there is no else, the semantic colouring is bailing out now
}
}
TouchArea { clicked => {} }
}
```
This is caused by a bug in rowan::SyntaxToken::next_token that doesn't visit
the next token if it has an empty node
Unfortunately, the LSP has no tests, so I couldn't add one easily
2022-02-04 13:26:30 +01:00
Tobias Hunger
2b55c488ca
Rename sixtyfps to slint in internal
2022-02-02 16:16:55 +01:00
Tobias Hunger
ee5ae56c4a
Move api/sixtyfps-rs to api/rs/slint (no crate rename!)
2022-02-02 13:26:34 +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