[Geany-Devel] Interested making a patch to add QML support

Matthew Brush mbrush at xxxxx
Thu Sep 19 07:03:45 UTC 2013


On 13-09-18 06:27 PM, Lex Trotman wrote:
> On 19 September 2013 09:35, Lex Trotman <elextr at gmail.com> wrote:
>
>>
>> Have you tried to see if the javascript lexer and parser work well enough
>> for QML? its supposed to be based on js.
>>
>
> Looks like the js lexer works ok, but the parser simply treats QML
> constructs as data and skips them, oh well.
>
> Not sure how easy a regex parser will be, IIUC QML symbols are specified as
> the id: property inside the object, meaning you need to handle nested
> context.
>

I guess you'd have to recognize first an "anonymous" declaration and 
then if you see "id:" pattern then set the (likely global variable) 
name, otherwise leave as anonymous. I don't think there's requirement to 
give declarations a name in QML, IIRC.

That being said, my recollection of QML is coming back and I think it 
can actually embed many valid JavaScript expressions inline, so it might 
not be as easy as I initially figured: Caveat scriptor.

Cheers,
Matthew Brush


More information about the Devel mailing list