aboutsummaryrefslogtreecommitdiffstats
path: root/tools/qmlformat/dumpastvisitor.h
Commit message (Collapse)AuthorAgeFilesLines
* 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: preserve annotationsFawzi Mohamed2020-02-121-0/+5
| | | | | | Change-Id: I22e72d91f6d422e93a7ebc642a8449cb490aec20 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
* qmlformat: Support even more language featuresMaximilian Goldstein2020-01-301-7/+24
| | | | | | | | | | | | | | 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 some language features being unsupportedMaximilian Goldstein2020-01-171-0/+3
| | | | | | | | | | | | | | | | | | | qmlformat now supports: - arrow functions - generator functions - this expressions - object patterns - regex literals - type expressions - plain expressions Aborts if an error occurs during dumping now. Also now automatically tests qmlformat against all example / test qml files. Change-Id: Idc24004c6f2c1cd65289bcad75985a1ef047c8d2 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmlformat: Fix whitespace for parameter defaultsMaximilian Goldstein2020-01-081-4/+4
| | | | | Change-Id: I7958bf1546cc5854fc9b9856e36928ea932af0ca Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* tools/qmlformat: Improve formatting quite a bitMaximilian Goldstein2019-12-201-1/+1
| | | | | | | | | | - Fix strings not getting properly escaped - Fix if/else blocks not getting formatted correctly in some cases - Remove unnecessary newlines - Improve comment attachment Change-Id: Id8264c069315b3c6bd9ba8e8ac991dbdce8581a7 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* qtdeclarative/tools: Implement qmlformatMaximilian Goldstein2019-12-191-0/+123
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>