Olivier Goffart
30d61452ba
Interpreter and node API: some refactoring towards being able to set properties from JS
2020-06-03 17:33:43 +02:00
Olivier Goffart
0a48252702
Interpreter: implement the ComponentVTable properly
...
with the drop and construct function
2020-06-03 17:33:26 +02:00
Olivier Goffart
a8f02df642
Refactor the viewer into a binary, and an interpreter crate
...
The interpreter can be used from other crates such as the test or the JS for example
2020-06-02 17:05:48 +02:00
Olivier Goffart
88b7f7c0bf
Signal support in the viewer
2020-05-31 02:03:02 +02:00
Olivier Goffart
2debdb43ed
Viewer: Use corelib::rtti::PropertyInfo for declared property
2020-05-30 18:16:51 +02:00
Olivier Goffart
c024f97890
Viewer: use binding when needed
2020-05-30 17:42:17 +02:00
Olivier Goffart
5f01ec30ee
Fix the viewer using generated rtti from a macro
...
One thing that needed to change is that we needed the vtable to be unique
2020-05-30 15:08:51 +02:00
Olivier Goffart
a883da3281
WIP: Use a macro to generate the RTTI
2020-05-30 15:01:50 +02:00
Simon Hausmann
c5cdb86b25
Get rid of the life time specifier for ComponentImpl
...
This was done by simply reference-counting the RTTI structure that's shared.
2020-05-28 20:38:42 +02:00
Simon Hausmann
f9fe2d8fea
Don't crash on hello.60
...
There's a signal binding in there that's not handled yet.
2020-05-28 20:37:36 +02:00
Olivier Goffart
dc276290e9
Add support for self assignment (+=, -=, ...)
2020-05-28 17:02:06 +02:00
Simon Hausmann
d0b9505b28
Don't crash when loading hello.60 in the viewer
...
Ignore signals for now.
2020-05-28 15:44:00 +02:00
Olivier Goffart
95b671c97c
Support for code blocks and signal call
2020-05-28 12:30:08 +02:00
Simon Hausmann
f2df9293a9
Fix the C++ build
...
Remove the Optional from the evaluation context passing for property
evaluation. Unfortunately there are nullptr uses left on the C++ side,
that need to be replaced with passing through.
2020-05-28 12:07:11 +02:00
Simon Hausmann
f1adf323c2
Introduce the use of EvaluationContext in the viewer
2020-05-28 09:20:11 +02:00
Simon Hausmann
c4dd857e0d
Add an evaluation context to property evaluations
...
The context is not used yet or passed on to the binding closure.
2020-05-28 09:20:11 +02:00
Olivier Goffart
486b2ab8f8
Do type checking and convert from number to string
2020-05-27 15:43:45 +02:00
Simon Hausmann
c8b64f5c4b
Remove the lowering
...
The LoweredItem and LoweredComponent contained, in essence, the same
information as the Element and Component in object_tree. Since the
moving declarations pass moved everything to the root element and the
LoweredPropertyDeclarations have been removed as well, this is the last
step.
2020-05-27 14:45:35 +02:00
Olivier Goffart
1389afda0d
viewer: handle property references
...
Note: Currently, the bindings are set as constant value, not as bindings
Since the setting of property happen in a indeterminate order, the value depending on other are currently undeterminate
2020-05-27 11:35:58 +02:00
Olivier Goffart
b084491878
Start working on trying to get custom properties working for the viewer
2020-05-27 11:33:20 +02:00
Olivier Goffart
36fb526811
Do inlining in a pass before the lowering
2020-05-26 15:10:27 +02:00
Olivier Goffart
4ea78134d8
Recactor the compiler so there are passes
2020-05-26 09:40:36 +02:00
Olivier Goffart
c0a4902240
Rename expressions -> expression_tree
...
there is already an expressions module in the parser
2020-05-25 15:28:37 +02:00
Olivier Goffart
93158e63e8
Fix crash in the viewer when there is a Text{}
...
Wrong vtable was used.
2020-05-25 13:15:10 +02:00
Olivier Goffart
3629e5f158
Refactor the Expression
...
So we will resolve the expression in a different step
2020-05-25 13:15:10 +02:00
Olivier Goffart
3965d9048f
syntax_updater: also update the .rs files containing sixtyfps!
2020-05-25 11:49:52 +02:00
Olivier Goffart
5228f3695d
Revert "Replace '=' with ':='"
...
This reverts commit 7be8b09b3b
.
Now that the replacement is done
2020-05-25 10:45:10 +02:00
Olivier Goffart
7be8b09b3b
Replace '=' with ':='
2020-05-25 10:43:19 +02:00
Olivier Goffart
058676e526
Initial import of a syntax_updater tool that rewrite files
2020-05-25 10:07:43 +02:00
Olivier Goffart
270c626c6c
Make the Parser a trait
...
Because the rowan::GreenNode is read-only but i want to use the parser
to generate something that can be mutated
2020-05-22 15:31:27 +02:00
Olivier Goffart
4f22e2c341
Add a bool property type
2020-05-20 13:36:47 +02:00
Olivier Goffart
bf64e40476
Format
2020-05-20 09:34:14 +02:00
Olivier Goffart
6b3765857a
Add a TouchArea builtin item (currently does nothing)
2020-05-20 09:32:01 +02:00
Olivier Goffart
260f17a3e0
Support for inline components within a .60 file
2020-05-19 17:43:56 +02:00
Olivier Goffart
ab28828351
Support for img!("foo.png") to make string absolute
...
This is a temporary solution until we get better ressource handling
2020-05-19 16:30:48 +02:00
Olivier Goffart
f4bfc3a5b4
Use the property system for our components
2020-05-19 15:15:23 +02:00
Olivier Goffart
25bf149e13
Add a shared string that can be used in properties
2020-05-18 17:09:40 +02:00
Olivier Goffart
751a3fbe59
Work on const field offset crate to give type safe offsets
2020-05-18 11:06:44 +02:00
Olivier Goffart
4ca45ca4da
vtable crate: Some refactoring and simplifications
2020-05-18 11:06:44 +02:00
Olivier Goffart
0a973f65d5
vtable: Some more safety fix
2020-05-18 11:06:44 +02:00
Olivier Goffart
f74cfe73cd
Use the vtable crate for the ItemVTable
2020-05-18 11:06:44 +02:00
Olivier Goffart
4988fcb543
More fix to use vtable for component. All rust code compiles
2020-05-18 11:06:31 +02:00
Olivier Goffart
fb691e0808
Implement Component using vtable
...
(the C++ part not yet ported)
2020-05-18 11:04:54 +02:00
Olivier Goffart
4b19818f6c
WIP: port Component to vtable
2020-05-18 11:04:54 +02:00
Olivier Goffart
7d1394e349
Add a viewer tool
2020-05-12 19:19:25 +02:00