aboutsummaryrefslogtreecommitdiffstats
path: root/tools/qmlformat/commentastvisitor.h
Commit message (Collapse)AuthorAgeFilesLines
* qmlformat: Fix multiline comment attachmentMaximilian Goldstein2020-09-041-0/+8
| | | | | | Pick-to: 5.15 Change-Id: I3ba8a4cd683df3309dd6df31b1fd426a0875f8fa Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmlformat: Improve comment attachmentMaximilian Goldstein2020-03-251-2/+3
| | | | | | | | | | - Fixes UiPublicMember nodes having a newline between comment and first node - Implements a Front_Inline type so comments at the beginning of object definitions are handled properly Fixes: QTBUG-82259 Change-Id: I0b40290037ce88a9ffe16390d72cbf3d704db41a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Restore offset/length in QQmlJS::DiagnosticMessageSimon Hausmann2020-03-021-0/+1
| | | | | | | | | | | | This is needed in a few places outside of declarative, so this change restores the loc member in DiagnosticMessage and moves QQmlJS::AST::SourceLocation into common's QQmlJS namespace/directory. QQmlError is unaffected and retains only line/column. Amends d4d197d06279f9257647628f7e1ccc9ec763a6bb Change-Id: Ifb9d344228e3c6e9e26fc4fe112686f9336ea2b2 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmlformat: Support even more language featuresMaximilian Goldstein2020-01-301-0/+1
| | | | | | | | | | | | | | Adds support (among other things) for: - Pragmas - Type annotations - get / set properties - Some previously unsupported escape sequences (\b,\v...) - Calling methods on numeric literals Also now checks whether the dumped code is still parsable. Change-Id: Ia142a7c0b3e608115e79c1d98a62b682dce4eec9 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* qmlformat: Fix default construction of CommentUlf Hermann2020-01-101-2/+2
| | | | | | | m_location would be uninitialized. Change-Id: Ieeeb0c0783a0b8e6f919019bd2ddcc1752993eaf Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmlformat: Fix whitespace for parameter defaultsMaximilian Goldstein2020-01-081-1/+1
| | | | | Change-Id: I7958bf1546cc5854fc9b9856e36928ea932af0ca Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* qtdeclarative/tools: Implement qmlformatMaximilian Goldstein2019-12-191-0/+131
qmlformat is a tool that formats qml files according to the QML coding conventions (https://doc.qt.io/qt-5/qml-codingconventions.html). Change-Id: I359c4bd3b51f60614535f0e857d7e0b21b1d9033 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>