Commit graph

30 commits

Author SHA1 Message Date
Simon Hausmann
3692710b7b Fix CI and simplify Rust generator API
Return an empty token stream in case the document was empty.
2022-01-13 10:23:57 +01:00
Simon Hausmann
ab6c39f877 Remove unused diagnostics parameter from Rust generator 2022-01-12 16:22:35 +01:00
Tobias Hunger
bfca0e3573 Mass update copyright messages to be more REUSE compliant 2021-12-22 10:06:12 +01:00
Olivier Goffart
8b9be10ff8 Attempt to properly detect if the native style is available when cross compiling
... and using the sixtyfps! macro

The problem is that the OUT_DIR in the build script of the macro crate
is reporting a target directory for the host (since the macro itself is
built for the host), but we need to get the OUT_DIR of the crate, so query
it in the macro. Unfortunatelty, that env variable is only set when the
crate (using the macro) has a build script. So use a fallback to find the
target directory

Fixes #462
2021-12-06 12:59:48 +01:00
Olivier Goffart
a094ce7a2a Add a warning on the internal crates documentation that we don't follow semver 2021-08-16 18:26:33 +02:00
Olivier Goffart
7821926002 Rust: defaults to the native style when Qt is available
This requires some gymnastics to get right as the information
need to be passed to the compiler despite having no direct dependency
between the compiler and the runtime or backends.
So use a file in the build directory to tell the default style

cc: #83
2021-07-28 16:57:09 +02:00
Tobias Hunger
8f7d7afa94 Janitor: Replace Option::map returning () with if let 2021-07-09 17:00:46 +02:00
Tobias Hunger
718126e148 Janitor: Remove useless into() 2021-07-09 17:00:46 +02:00
Tobias Hunger
a0c567d242 Janitor: Remove unnecessary return 2021-07-09 17:00:46 +02:00
Tobias Hunger
86e847fec0 Janitor: Prefer strip_prefix over manual stripping 2021-07-09 17:00:46 +02:00
Tobias Hunger
b82ee6a470 Janitor: Replace a == "" with a.is_empty() 2021-07-09 17:00:46 +02:00
Tobias Hunger
ac207428dc Janitor: CSpell fixes
Mark up some special words in documents (like C++ lingo in rust files).
2021-07-06 22:44:09 +02:00
Olivier Goffart
13bd828b96 Update license date 2021-07-02 15:55:54 +02:00
Olivier Goffart
cb06394685 Remove some more use of SyntaxNode and SyntaxToken 2021-04-13 17:10:56 +02:00
Olivier Goffart
cae88f0823 Create a Diagnostic quen the main .60 file can't be loaded 2021-03-15 11:44:20 +01:00
Olivier Goffart
730b1ccff2 Refactor diagnostic: Merge BuildDiagnostic and FileDiagnostic 2021-03-12 19:32:50 +01:00
Olivier Goffart
968dfaae87 Put what is the FileDiagnostics into the SourceFile so the SourceFile has the content 2021-03-11 16:23:46 +01:00
Olivier Goffart
9eac131ae5 Add the logo in the docs 2021-02-12 08:24:42 +01:00
Olivier Goffart
09ce4142a5 Some reorganization of the testdriver 2021-02-01 18:13:19 +01:00
Olivier Goffart
5debc08f98 Parse @image-url 2021-01-28 11:49:24 +01:00
Simon Hausmann
87e0cc7d85 Fix resource embedding doing a wasm build of a project using the sixtyfps! macro
We need to embed resources in wasm builds. Unfortunately we can't detect
that we're called by say wasm-pack and "TARGET"/"HOST" only works inside
build.rs. So instead, to keep things simple, this change always embeds
the image resources when targeting Rust.

The `SIXTYFPS_EMBED_RESOURCES` environment variable can be used to
override this anywhere for any language.

Fixes #130
2020-12-10 15:09:32 +01:00
Olivier Goffart
8b10414451 Parse signal return type
(currently does nothing with it)
2020-12-01 18:47:49 +01:00
Olivier Goffart
2d016dffda Print the diagnostics in stderr for files which do not have span information 2020-12-01 12:10:43 +01:00
Olivier Goffart
19458eb2e6 sixtyfps-macro: recompile when the style changes 2020-12-01 12:10:43 +01:00
Olivier Goffart
8b76114083 Recompile if a dependencies changes 2020-11-18 13:23:59 +01:00
Olivier Goffart
359f42c5f7 Prepare the compiler to be async
This will allow the online editor to load imports from URL asynchroniously later

Since currently the compiler is only working on a single thread, and that we
never await on a future that could block, it is allowed to use the spin_on executor
2020-10-30 15:00:04 +01:00
Olivier Goffart
76b7f1aef6 Allow dashes in identifier
Currenly, dashes are normalized to '_'.
Dashes are not allowed at the begining of an identifier.
If an identifier with a dash is not found, we also look for identifier
without a dash and if that exist, we hint the user to use spaces.

Issue #52
2020-10-22 18:32:25 +02:00
Olivier Goffart
0c253efb0d Some changes in the rust documentation and its README 2020-10-20 18:02:28 +02:00
Olivier Goffart
65ec7e9b7d Fix panic on parse error
Properly report the errors instead.

The later passes panic if the AST is not well formed
2020-10-19 19:43:13 +02:00
Olivier Goffart
a650f29abe Rename sixtyfps-rs-macro to sixtyfps-macros 2020-10-13 11:10:26 +02:00
Renamed from api/sixtyfps-rs/sixtyfps-rs-macro/lib.rs (Browse further)