[Development] Toolability of mixing QML and JS
Thomas Hartmann
Thomas.Hartmann at digia.com
Wed Jun 26 16:11:59 CEST 2013
Hi,
Am 26/06/2013 15:47, schrieb Rutledge Shawn:
>
> On 26 Jun 2013, at 3:27 PM, Thomas Hartmann wrote:
>>
>> The problem with that approach is that an AST is read only by design.
>
> Why does it have to be that way?
By Design. ;)
Abstract syntax trees are a data structure widely used in compilers, due
to their property of representing the structure of program code.
An AST is a purely syntactical representation of the source and tightly
coupled with the grammar.
The AST is the output of a parser and therefore a read-only structure.
Any data structure that is modifiable and reflects the changes in the
source code should be called DOM or similar.
I just found out that they seem to mix up the terms DOM and AST in the
Eclipse world. I think not making this distinction is confusing.
In the case of QML we have a read-only AST and it is designed to be
read-only.
A DOM is a lot more complex then a pure AST and of course it has access
to an AST on the lower levels. In our case the Model/DOM is also
significantly more abstract then the AST and hides several syntactical
details, that are of no interest on the level of a UI designer.
Kind Regards,
Thomas Hartmann
More information about the Development
mailing list