[Qbs] Using ES6 templates string in qbs files

Иван Комиссаров abbapoh at gmail.com
Wed Jun 26 14:23:32 CEST 2024


Before Qbs passes the JS code to the engine, it parses it using the QML parser (even for pure js files, not sure why though). We use a very old version of a parser copied from Qt which doesn’t support all JS features.

Ivan

> 26 июня 2024 г., в 14:58, Maximilian Hrabowski <hrabowski at bee360.com> написал(а):
> 
> 
> Hi all,
>  
> I thought qbs 2.x switched to latest QJSEngine which support ES7.
> While in QML code it is no problem to use template strings `…` , in qbs files I get a syntax error, e.g.:
>  
> console.log(`the path is ${path}`);
>  
> won’t work.
>  
> Are my expectations wrong?
>  
> Best regards,
> Max
> _______________________________________________
> Qbs mailing list
> Qbs at qt-project.org
> https://lists.qt-project.org/listinfo/qbs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20240626/19b46431/attachment.htm>


More information about the Qbs mailing list