Closed M4rtinK closed 3 years ago
If there is an underscore in directory import path, the parsing will fail, breaking syntax highlighting for the full file.
import "foo_component" fails to parse, resulting in:
import "foo_component"
QmlTokenType.FOLDER_PACKAGE_NAME or QmlTokenType.PACKAGE_NAME expected, got '"'
Dropping the underscore fixes the parsing:
import "foocomponent"
Full reproducer follows:
main.qml
import QtQuick 2.3 import QtQuick.Window 2.0 import "foo_component" Window { visible: true width: 640 height: 480 title: qsTr("Hello World") //The method qsTr() is used for translations from one language to other. FooRectangle { width : 300 height : 300 anchors.centerIn: parent } Text { text: qsTr("Hello World") anchors.centerIn: parent } }
foo_component/FooRectangle.qml
import QtQuick 2.0 Rectangle { id : br color : "red" }
Hi Martin
Version 0.9.6 is ready to download. Please let us know if it solves your problem with comments.
If there is an underscore in directory import path, the parsing will fail, breaking syntax highlighting for the full file.
import "foo_component"
fails to parse, resulting in:QmlTokenType.FOLDER_PACKAGE_NAME or QmlTokenType.PACKAGE_NAME expected, got '"'
Dropping the underscore fixes the parsing:
import "foocomponent"
Full reproducer follows:
main.qml
foo_component/FooRectangle.qml