Olivier Goffart
81ebb2177e
LSP: completion of properties
2021-04-07 23:55:46 +02:00
Olivier Goffart
72f4827617
Fix message in assert not being a string literal
...
assert! does take a format string anyway so one need not to use format! as the
message of an assert. (That's better since then a string is not allocated when
the assert is going to succeed anyway
2021-03-25 17:08:15 +01: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
7c48bcdd4c
Add the source file getter to the Spanned trait, and remove SpannedWithSourceFile
2021-03-11 14:09:55 +01:00
Olivier Goffart
2d12e118ac
Resolve linear gradients
2021-02-01 14:25:27 +01:00
Olivier Goffart
8ab713c681
Parse @linear-gradient(...)
2021-02-01 14:25:27 +01:00
Olivier Goffart
82aa658cef
Update rowan
2021-01-28 15:37:01 +01:00
Olivier Goffart
3b968c8a8e
Fixup previous commit
...
the $children replacement shouldn't have replaced rust code
2021-01-28 11:58:43 +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
882bd7ddb7
Lex template string
2021-01-18 14:43:54 +01:00
Olivier Goffart
7fcb49bef1
Implement Go to definition for elements
2020-12-23 15:15:53 +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
281a744e86
Load the builtin from a fake .60 file
2020-11-04 16:56:35 +01:00
Simon Hausmann
ef18e89e4f
Typeloader cleanup
...
Split the document loading related part of load_dependency into a
separate ensure_document helper function.
2020-11-04 14:16:58 +01:00
Olivier Goffart
11e55dd8d2
String -> Float conversions
2020-11-03 15:19:58 +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
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
4981c3ca75
Some check for the two way bindings
2020-09-23 14:06:08 +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
Simon Hausmann
2a9c962b8d
Exclude exposure of easing and duration typed properties
...
We decided that their type mapping is not ready for public API yet. For
example for duration we'd like to replace the opaque i64 with another
opaque type that however has convenient conversions to
std::time::Duration or std::chrono::milliseconds. We can't use either
directly because we need ffi compatibility, in order to create an
instance in C++ and pass it to the Rust run-time.
So this hides such properties and instead produces a warning.
2020-09-04 21:25:11 +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
Patrick José Pereira
9cd4cb80e2
sixtyfps_compiler: parser: Change nth function of Parser to return Token
...
Improve the Parser functionality allowing access to the nth Token,
resulting in a much more flexible API.
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2020-08-31 15:02:41 +02:00
Patrick José Pereira
a7b376fe7b
sixtyfps_compiler: parser: Add kind function for Token
...
This allow access to the private property
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
10e8d7ffb9
Replace the regexp-based lexer with a custom lexer
...
The regexp crate is huge and takes more than a third of the size of the
wasm-interpreter.
2020-08-28 13:34:43 +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
Simon Hausmann
84406cc70b
Add support for renaming imports
...
This is very useful to avoid name clashes.
2020-07-23 10:12:45 +02:00
Simon Hausmann
a9b0d84a72
Improve source file propagation
...
Instead of doing the SyntaxNodeWithSourceFile construction as late as
possible (in Document::from_node), we can do it as early as possible.
That'll reduce the chances of missing out the source file and prepares
for dependency loading just based on a SNWS :)
This also makes the source_file optional in the SNWS, but that's
consistent with what the diagnostics expect.
2020-07-22 16:10:02 +02:00
Simon Hausmann
0b5f4054ea
Improve import uri parsing
...
Avoid unnecessary SyntaxKind variants. The import uri is simply the first string literal in the ImportSpecifier.
Also covert the case of an empty import list and use expect() instead of
test() to produce a meaningful error message.
2020-07-22 14:06:42 +02:00
Simon Hausmann
3e619170cd
Extend the parser with support for import statements
2020-07-22 11:31:58 +02:00
Simon Hausmann
3e21aafab9
Add support for direct export for convenience
2020-07-22 08:45:49 +02:00
Simon Hausmann
921a41b07c
Add support for explicit exports from files
...
Using an ES module inspired syntax, this allows free naming and control
over exported names.
2020-07-22 08:40:30 +02:00
Simon Hausmann
abe6888296
Collect proper per-file diagnostics in the compiler passes
...
When creating diagnostics in the passes, report them correctly in the
build diagnostics. There's no automated test yet, but it was manually
verified.
2020-07-21 15:27:41 +02:00