Bug 470685 - Parser hangs on Template Literals/strings and Arrow functions
Summary: Parser hangs on Template Literals/strings and Arrow functions
Status: REPORTED
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: QML/JavaScript (show other bugs)
Version: 5.11.230401
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-06 04:32 UTC by Jacob Mungle
Modified: 2023-06-06 05:57 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
arrow function in a qml file (6.75 KB, image/png)
2023-06-06 04:32 UTC, Jacob Mungle
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jacob Mungle 2023-06-06 04:32:02 UTC
Created attachment 159486 [details]
arrow function in a qml file

SUMMARY
***
When parsing qml files the parser throws unexpected token on arrow functions and template literals/strings then will stop updating after changes are made
both of these are well supported in javascript for a long time
***


STEPS TO REPRODUCE
1. Open a qml file with an arrow function or template literals (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)
2. wait for parser to finish
3. Unexpected token `>' will appear next to arrow functions
    Unexpected token `' will appear next to template literals
4. Hover functions; the "where is this declared" box doesn't work for the file, neither does highlighting
5. Parser will sometimes stop working kdevelop is restarted

OBSERVED RESULT
arrow functions and template string will show as errors and highlighting will fail

EXPECTED RESULT
file parses normally, and is fully highlighted

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 6.3.5.zen2-1
(available in About System)
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.106.0
Qt Version: 5.15.9
Comment 1 Igor Kushnir 2023-06-06 05:57:15 UTC
The qmljs plugin lacks a maintainer and may have to be disabled during porting to Qt 6. See https://mail.kde.org/pipermail/kdevelop-devel/2022-August/063726.html