{ "name": "QML", "scopeName": "source.qml", "patterns": [ { "name": "comment.block.documentation.qml", "begin": "/\\*(?!/)", "end": "\\*/" }, { "name": "comment.line.double-slash.qml", "match": "//.*$" }, { "name": "meta.import.qml", "begin": "\\b(import)\\s+", "end": "$", "patterns": [ { "name": "meta.import.namespace.qml", "match": "([\\w\\d\\.]+)\\s+(\\d+\\.\\d+)(?:\\s+(as)\\s+([A-Z][\\w\\d]*))?", "captures": { "1": { "name": "entity.name.class.qml" }, "2": { "name": "constant.numeric.qml" }, "3": { "name": "keyword.other.import.qml" }, "4": { "name": "entity.name.class.qml" } } }, { "name": "meta.import.dirjs.qml", "match": "(\\\"[^\\\"]+\\\")(?:\\s+(as)\\s+([A-Z][\\w\\d]*))?", "captures": { "1": { "name": "string.quoted.double.qml" }, "2": { "name": "keyword.other.import.qml" }, "3": { "name": "entity.name.class.qml" } } } ], "beginCaptures": { "1": { "name": "keyword.other.import.qml" } } }, { "name": "support.class.qml", "match": "\\b[A-Z]\\w*\\b" }, { "name": "support.class.qml", "match": "(((^|\\{)\\s*)|\\b)on[A-Z]\\w*\\b" }, { "name": "meta.id.qml", "match": "(?:^|\\{)\\s*(id)\\s*\\:\\s*([^;\\s]+)\\b", "captures": { "1": { "name": "keyword.other.qml" }, "2": { "name": "storage.modifier.qml" } } }, { "name": "meta.propertydef.qml", "match": "^\\s*(?:(default|readonly)\\s+)?(property)\\s+(?:(alias)|([\\w\\\u003c\\\u003e]+))\\s+(\\w+)", "captures": { "1": { "name": "keyword.other.qml" }, "2": { "name": "keyword.other.qml" }, "3": { "name": "keyword.other.qml" }, "4": { "name": "storage.type.qml" }, "5": { "name": "entity.other.attribute-name.qml" } } }, { "name": "meta.signal.qml", "begin": "\\b(signal)\\s+(\\w+)\\s*", "end": ";|(?=/)|$", "patterns": [ { "name": "meta.signal.parameters.qml", "match": "(\\w+)\\s+(\\w+)", "captures": { "1": { "name": "storage.type.qml" }, "2": { "name": "variable.parameter.qml" } } } ], "beginCaptures": { "1": { "name": "keyword.other.qml" }, "2": { "name": "support.function.qml" } } }, { "name": "meta.keyword.qml", "match": "(?:\\b|\\s+)(?:(true|false|null|undefined)|(var|void)|(on|as|enum|connect|break|case|catch|continue|debugger|default|delete|do|else|finally|for|if|in|instanceof|new|return|switch|this|throw|try|typeof|while|with))\\b", "captures": { "1": { "name": "constant.language.qml" }, "2": { "name": "storage.type.qml" }, "3": { "name": "keyword.control.qml" } } }, { "name": "meta.function.qml", "match": "\\b(function)\\s+([\\w_]+)\\s*(?=\\()", "captures": { "1": { "name": "storage.type.qml" }, "2": { "name": "entity.name.function.untitled" } } }, { "name": "support.function.qml", "match": "\\b[\\w_]+\\s*(?=\\()" }, { "name": "entity.other.attribute-name.qml", "match": "(?:^|\\{|;)\\s*[a-z][\\w\\.]*\\s*(?=\\:)" }, { "name": "entity.other.attribute-name.qml", "match": "(?\u003c=\\.)\\b\\w*" }, { "name": "variable.parameter", "match": "\\b([a-z_]\\w*)\\b" }, { "include": "source.js" } ] }