Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-119237

Let parser handle incomplete documents

    XMLWordPrintable

Details

    • Task
    • Resolution: Unresolved
    • P2: Important
    • 6.9
    • 6.7
    • QML: Tooling
    • None

    Description

      Currently, the parser requires exactly one UIRootMember. However, that's problematic for the LSP when starting with an empty document, as it means we cannot offer auto-completion (for import statements, and the very first item).

      One way to fix this would be to make an empty UiProgram (or ones containing only UiHeaderItemListOpt nodes) valid (unconditionally), and add checks in the appropriate places to reject such files.

      Another solution would be to add basically the same, but as a new toplevel rule, and have only the LSP (and potentially qmllint) opt into this behaviour

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              fabiankosmale Fabian Kosmale
              fabiankosmale Fabian Kosmale
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes