Bug 470685

Summary: Parser hangs on Template Literals/strings and Arrow functions
Product: [Applications] kdevelop Reporter: Jacob Mungle <jelgnum>
Component: Language Support: QML/JavaScriptAssignee: kdevelop-bugs-null
Status: REPORTED ---    
Severity: normal CC: igorkuo
Priority: NOR    
Version First Reported In: 5.11.230401   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: arrow function in a qml file

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