Olivier Goffart
3db3400951
Rename the Object type to Struct in the compiler
2021-03-16 12:38:53 +01:00
Olivier Goffart
87ad4fe59e
Rename Object to Struct in the language reference
2021-03-16 12:32:24 +01:00
Olivier Goffart
6315b02ffe
Build the documentation with all features
2021-03-16 12:04:40 +01:00
Simon Hausmann
e3a33dffe0
Revert "Remove the import resolve callback from the compiler configuration"
...
This reverts commit 2dcbc45cd6
.
It breaks loading of the printer demo in the editor because in
import_file we fail to return the absolute path and thus end up
importing common.60 too many times.
2021-03-16 11:43:33 +01:00
Olivier Goffart
455693dbc0
Documentation for the interpreter crate
2021-03-16 11:24:02 +01:00
Simon Hausmann
2dcbc45cd6
Remove the import resolve callback from the compiler configuration
...
It turns out that this isn't really needed with the current
implementation.
2021-03-15 20:02:46 +01:00
Simon Hausmann
79aefcb303
Fix compilation of tests
2021-03-15 20:02:31 +01:00
Olivier Goffart
4ab3802eee
Fix the documentation tests
2021-03-15 19:51:04 +01:00
Olivier Goffart
fef4a10ebd
Use the new API for the interpreter in wasm
...
Improve the ComponenetDefinition::from_source
2021-03-15 17:57:46 +01:00
Olivier Goffart
48333370a6
Use the new interpreter API in things that depends on it
2021-03-15 17:29:27 +01:00
Simon Hausmann
8372d3f6d8
Rename call_*
to invoke_*
for callbacks
...
Fixes #187
2021-03-15 17:01:05 +01:00
Simon Hausmann
b27034efa5
Rename sixtyfps::IntoWeak
into sixtyfps::ComponentHandle
and remove Clone
from generated components
...
`ComponentHandle` offers a richer API of common functions, such as
`show()`/`hide()` as well as the new `clone_strong()` - that should help
to prevent mistakely created strong reference that may cause leaks.
Fixes #188
2021-03-15 16:01:13 +01:00
Olivier Goffart
7236e0dee6
Get rid of VoidValue and other small changes
2021-03-15 15:19:24 +01:00
Olivier Goffart
9676ed398d
Fix wasm build
2021-03-15 15:14:15 +01:00
Simon Hausmann
9034bd3d1a
Move the refined eval::Value
API to api::Value
...
This is the new public value representation for the interpreter
2021-03-15 15:12:34 +01:00
Olivier Goffart
d7b86cd0c4
Polishing of the interpreter API after review
2021-03-15 14:43:55 +01:00
Simon Hausmann
c2c3e00cd7
Remove ModelPtr
from the interpreter
...
Instead stick a straight `Rc<dyn ...>` into the `Value` enum
2021-03-15 14:43:01 +01:00
Simon Hausmann
c9ef9c93d8
Hide Value::PathData/EasingCurve/EnumerationValue
...
As discussed, these are not yet for public API
2021-03-15 12:58:00 +01:00
Simon Hausmann
a4c196df60
Use api::Struct
in Value::Struct
, replacing Value::Object
2021-03-15 12:55:39 +01:00
Olivier Goffart
f1a7847820
Fixup syntax_tests
2021-03-15 12:41:10 +01:00
Olivier Goffart
8074f74d67
Implement From instead of TryFrom for Value
...
Since all the TryFrom are actually infaillible
2021-03-15 12:39:40 +01:00
Olivier Goffart
41f52f9ad4
Remove Value::Color
2021-03-15 12:33:47 +01:00
Olivier Goffart
34632206e6
Add some comments in the interpreter API
2021-03-15 12:13:41 +01:00
Olivier Goffart
5a416d0fc7
Make the Value non_exhaustive
2021-03-15 12:07:52 +01:00
Olivier Goffart
a203097b88
Attempt to fix windows syntax_tests
...
Looks like the slashes were not canonical on Windows
2021-03-15 12:05:03 +01:00
Olivier Goffart
5c79f2dbe1
Expose the Diagnostic as the return type in the interpreter API
2021-03-15 11:56:30 +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
Simon Hausmann
2ae5b8413a
Fix wasm build
...
Re-add the compiler configuration internal API. When `from_string` is complete then we can switch to the new public
compiler config API.
And use diagnostics accessor functions.
2021-03-15 11:25:48 +01:00
Olivier Goffart
b2572f8bb3
Fix parser test macro
2021-03-15 10:50:33 +01:00
Simon Hausmann
70ff7baa85
Fix compilation after diagnostics API changes
2021-03-15 10:43:26 +01:00
Olivier Goffart
014e13b05f
Make Diagnostic field private
2021-03-15 10:37:24 +01:00
Simon Hausmann
41f77b2a27
Use SharedVector
for Value::Array
instead of Vec
...
That will make it more efficient to pass data into the interpreter in the future,
especially from C++.
2021-03-15 10:19:35 +01:00
Simon Hausmann
fdeca052cb
Provide the same CompilerConfiguration wrapper in the interpreter API as in the Rust build API
2021-03-15 10:05:56 +01:00
Olivier Goffart
730b1ccff2
Refactor diagnostic: Merge BuildDiagnostic and FileDiagnostic
2021-03-12 19:32:50 +01:00
Olivier Goffart
11e0be5130
Add the SourceLocation into the Diagnostic
2021-03-12 12:49:19 +01:00
Olivier Goffart
fc35d101d9
Rename diagnostics::level to DiagnosticLevel
2021-03-11 16:27:40 +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
bf88bad131
Mention our Mattermost instance in the Readme
2021-03-11 11:39:49 +01:00
Olivier Goffart
4f115edb87
Fix cmake install
2021-03-11 11:34:09 +01:00
Olivier Goffart
436d113b1e
Rename ResourceReference
to ImageReference
in the compiler
2021-03-11 10:29:05 +01:00
Olivier Goffart
933c1bbf59
Rename Value::Resource
to Value::Image
2021-03-11 10:15:53 +01:00
Olivier Goffart
6f88d78303
Rename Resource
to ImageReference
in the runtime
2021-03-11 10:06:23 +01:00
Olivier Goffart
c840b046ae
Rename the "resource" type to "image"
2021-03-10 17:24:31 +01:00
Olivier Goffart
44e81a40d6
Fixup C++ build
2021-03-10 17:24:31 +01:00
Olivier Goffart
89bbdce88e
Polish a bit the Brush API
2021-03-10 16:54:33 +01:00
Olivier Goffart
03d9938f8b
More WIP work into the interpreter API
2021-03-10 11:46:20 +01:00
Olivier Goffart
7584b571ea
Interpreter: refactor in preparation to expose a public API
2021-03-10 09:08:25 +01:00
Olivier Goffart
16426c91b0
There is no x11 feature for corelib anymore since that is moved to the backend
2021-03-09 19:52:18 +01:00
Olivier Goffart
9e3f316e30
Docs: Fix some broken links
2021-03-09 19:32:52 +01:00