├── LICENSE
├── README.md
├── Snippets
├── anchors
│ ├── any.sublime-snippet
│ ├── flat
│ │ ├── centerIn.sublime-snippet
│ │ ├── edges.sublime-snippet
│ │ ├── fill.sublime-snippet
│ │ ├── horizontalCenter.sublime-snippet
│ │ ├── margins.sublime-snippet
│ │ └── verticalCenter.sublime-snippet
│ ├── group.sublime-snippet
│ └── grouped
│ │ ├── centerin.sublime-snippet
│ │ ├── edges.sublime-snippet
│ │ ├── fill.sublime-snippet
│ │ ├── horizontalCenter.sublime-snippet
│ │ ├── margins.sublime-snippet
│ │ └── verticalCenter.sublime-snippet
├── qml_alias.sublime-snippet
├── qml_color.sublime-snippet
├── qml_component_on_completed.sublime-snippet
├── qml_component_on_destruction.sublime-snippet
├── qml_connections.sublime-snippet
├── qml_function.sublime-snippet
├── qml_imports.sublime-snippet
├── qml_inline_component.sublime-snippet
├── qml_item.sublime-snippet
├── qml_layout_all.sublime-snippet
├── qml_layout_height.sublime-snippet
├── qml_layout_width.sublime-snippet
├── qml_mousearea.sublime-snippet
├── qml_property.sublime-snippet
├── qml_property_default.sublime-snippet
├── qml_property_readonly.sublime-snippet
├── qml_property_required.sublime-snippet
├── qml_property_required_redeclaration.sublime-snippet
├── qml_qtobject.sublime-snippet
├── qml_rect.sublime-snippet
├── qml_signal.sublime-snippet
└── qml_stack_status.sublime-snippet
├── Support
├── Comments - QML.tmPreferences
├── Comments - qmldir.tmPreferences
├── Fold.tmPreferences
├── Indentation Rules - Embedded JavaScript.tmPreferences
├── Indentation Rules - QML.tmPreferences
├── Indexed Reference List - Imports.tmPreferences
├── Indexed Symbol List - Imports.tmPreferences
├── QML.sublime-build
├── QML.sublime-syntax
├── Symbol List.tmPreferences
└── qmldir.sublime-syntax
├── logo.svg
├── messages.json
└── messages
├── 1.0.0.txt
├── 1.2.0.txt
└── 1.6.0.txt
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2013 Sergey Kozlov
4 | Copyright (c) 2022 ivan (@ratijas) tkachenko
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | this software and associated documentation files (the "Software"), to deal in
8 | the Software without restriction, including without limitation the rights to
9 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
10 | the Software, and to permit persons to whom the Software is furnished to do so,
11 | subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
18 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
19 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
20 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | # QML for Sublime Text
4 |
5 |
6 | [](https://github.com/SublimeText/QML/actions/workflows/syntax.yml)
7 | 
8 |
9 | ## About
10 |
11 | This is a [Sublime Text](https://www.sublimetext.com/) & [Sublime Merge](https://www.sublimemerge.com/) package that adds support for the [Qt/QML](https://en.wikipedia.org/wiki/QML) ecosystem.
12 |
13 | This package provides the following features:
14 |
15 | - Complete syntax highlighting for QML and qmldir files.
16 | - GoTo indexing for `id`s, property declarations and inline components.
17 | - Snippets for commonly used properties and types.
18 |
19 | If you are a KDE developer, check out [kdesrc-build plugin for Sublime Text](https://github.com/ratijas/kdesrc-build-sublime) as well!
20 |
21 | ## Installation
22 |
23 | The easiest way is to install it from [Package Control](https://packagecontrol.io/packages/QML).
24 |
25 | - Install [Package Control](https://packagecontrol.io/) itself, if you haven't done already
26 | - Open up the command palette: Ctrl+Shift+P (Linux, Windows) / Cmd+Shift+P (OS X)
27 | - Search for `Package Control: Install Package`
28 | - Search for `QML`
29 | - Hit Enter
30 |
31 | ### Using Git
32 |
33 | Go to your Sublime Text Packages directory and clone the repository using the command below:
34 |
35 | $ git clone https://github.com/SublimeText/QML
36 |
37 | ### Manual Download
38 |
39 | - Download the files using the .zip download option
40 | - Unzip the files (and rename the folder to QML if needed)
41 | - Copy the folder to your Sublime Text Packages directory
42 |
43 | ## License
44 |
45 | This package is licensed under the MIT License.
46 |
--------------------------------------------------------------------------------
/Snippets/anchors/any.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
5 | anchors
6 | source.qml meta.block.qml
7 | anchors.…
8 |
9 |
--------------------------------------------------------------------------------
/Snippets/anchors/flat/centerIn.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
5 | anchors.centerIn
6 | source.qml meta.block.qml
7 | anchors.…
8 |
9 |
--------------------------------------------------------------------------------
/Snippets/anchors/flat/edges.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
8 | anchors.top,left,right,bottom
9 | source.qml meta.block.qml
10 | anchors.…
11 |
12 |
--------------------------------------------------------------------------------
/Snippets/anchors/flat/fill.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
5 | anchors.fill
6 | source.qml meta.block.qml
7 | anchors.…
8 |
9 |
--------------------------------------------------------------------------------
/Snippets/anchors/flat/horizontalCenter.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
5 | anchors.horizontalCenter
6 | source.qml meta.block.qml
7 | anchors.…
8 |
9 |
--------------------------------------------------------------------------------
/Snippets/anchors/flat/margins.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
5 | anchors.margins
6 | source.qml meta.block.qml
7 | anchors.…
8 |
9 |
--------------------------------------------------------------------------------
/Snippets/anchors/flat/verticalCenter.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
5 | anchors.verticalCenter
6 | source.qml meta.block.qml
7 | anchors.…
8 |
9 |
--------------------------------------------------------------------------------
/Snippets/anchors/group.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
7 | anchors
8 | source.qml meta.block.qml
9 | anchors { … }
10 |
11 |
--------------------------------------------------------------------------------
/Snippets/anchors/grouped/centerin.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
5 | centerIn
6 | source.qml meta.block.qml meta.binding.property.qml
7 | anchors { … }
8 |
9 |
--------------------------------------------------------------------------------
/Snippets/anchors/grouped/edges.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
8 | top,left,right,bottom
9 | source.qml meta.block.qml meta.binding.property.qml
10 | anchors { … }
11 |
12 |
--------------------------------------------------------------------------------
/Snippets/anchors/grouped/fill.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
5 | fill
6 | source.qml meta.block.qml meta.binding.property.qml
7 | anchors { … }
8 |
9 |
--------------------------------------------------------------------------------
/Snippets/anchors/grouped/horizontalCenter.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
5 | horizontalCenter
6 | source.qml meta.block.qml meta.binding.property.qml
7 | anchors { … }
8 |
9 |
--------------------------------------------------------------------------------
/Snippets/anchors/grouped/margins.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
5 | margins
6 | source.qml meta.block.qml meta.binding.property.qml
7 | anchors { … }
8 |
9 |
--------------------------------------------------------------------------------
/Snippets/anchors/grouped/verticalCenter.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
5 | verticalCenter
6 | source.qml meta.block.qml meta.binding.property.qml
7 | anchors { … }
8 |
9 |
--------------------------------------------------------------------------------
/Snippets/qml_alias.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
5 | alias
6 | source.qml
7 | QML property alias
8 |
9 |
--------------------------------------------------------------------------------
/Snippets/qml_color.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
5 | color
6 | source.qml meta.block.qml
7 | #...
8 |
9 |
--------------------------------------------------------------------------------
/Snippets/qml_component_on_completed.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
5 | completed
6 | source.qml meta.block.qml
7 | Component.onCompleted:
8 |
9 |
--------------------------------------------------------------------------------
/Snippets/qml_component_on_destruction.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
5 | destruction
6 | source.qml meta.block.qml
7 | Component.onDestruction:
8 |
9 |
--------------------------------------------------------------------------------
/Snippets/qml_connections.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
10 | connections
11 | source.qml
12 | Connections {}
13 |
14 |
--------------------------------------------------------------------------------
/Snippets/qml_function.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
5 | function
6 | source.qml meta.block.qml
7 | function or method
8 |
9 |
--------------------------------------------------------------------------------
/Snippets/qml_imports.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
10 | imports
11 | source.qml - meta.block.qml
12 | stdlib
13 |
14 |
--------------------------------------------------------------------------------
/Snippets/qml_inline_component.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
7 | component
8 | source.qml
9 | inline component
10 |
11 |
--------------------------------------------------------------------------------
/Snippets/qml_item.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
7 | item
8 | source.qml
9 | Item {}
10 |
11 |
--------------------------------------------------------------------------------
/Snippets/qml_layout_all.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
6 | layout.fill
7 | source.qml meta.block.qml
8 | width & height
9 |
10 |
--------------------------------------------------------------------------------
/Snippets/qml_layout_height.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
5 | layout.fillHeight
6 | source.qml meta.block.qml
7 | height
8 |
9 |
--------------------------------------------------------------------------------
/Snippets/qml_layout_width.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
5 | layout.fillWidth
6 | source.qml meta.block.qml
7 | width
8 |
9 |
--------------------------------------------------------------------------------
/Snippets/qml_mousearea.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
13 | mouse
14 | source.qml
15 | MouseArea {}
16 |
17 |
--------------------------------------------------------------------------------
/Snippets/qml_property.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
5 | property
6 | source.qml meta.block.qml
7 | new property
8 |
9 |
--------------------------------------------------------------------------------
/Snippets/qml_property_default.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
5 | default property
6 | source.qml meta.block.qml
7 | new property
8 |
9 |
--------------------------------------------------------------------------------
/Snippets/qml_property_readonly.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
5 | readonly property
6 | source.qml meta.block.qml
7 | new property
8 |
9 |
--------------------------------------------------------------------------------
/Snippets/qml_property_required.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
5 | required property
6 | source.qml meta.block.qml
7 | new property
8 |
9 |
--------------------------------------------------------------------------------
/Snippets/qml_property_required_redeclaration.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
5 | required name
6 | source.qml meta.block.qml
7 | redeclare property
8 |
9 |
--------------------------------------------------------------------------------
/Snippets/qml_qtobject.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
7 | qtobj
8 | source.qml
9 | QtObject {}
10 |
11 |
--------------------------------------------------------------------------------
/Snippets/qml_rect.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
12 | rectangle
13 | source.qml
14 | Rectangle {}
15 |
16 |
--------------------------------------------------------------------------------
/Snippets/qml_signal.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
5 | signal
6 | source.qml
7 | QML signal
8 |
9 |
--------------------------------------------------------------------------------
/Snippets/qml_stack_status.sublime-snippet:
--------------------------------------------------------------------------------
1 |
2 |
14 | stack.onStatusChanged
15 | source.qml meta.block.qml
16 | onStatusChanged:
17 |
18 |
--------------------------------------------------------------------------------
/Support/Comments - QML.tmPreferences:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | name
6 | Comments
7 | scope
8 | source.qml
9 | settings
10 |
11 | shellVariables
12 |
13 |
14 | name
15 | TM_COMMENT_START
16 | value
17 | //
18 |
19 |
20 | name
21 | TM_COMMENT_START_2
22 | value
23 | /*
24 |
25 |
26 | name
27 | TM_COMMENT_END_2
28 | value
29 | */
30 |
31 |
32 | name
33 | TM_COMMENT_DISABLE_INDENT_2
34 | value
35 | yes
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/Support/Comments - qmldir.tmPreferences:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | name
6 | Comments
7 | scope
8 | source.qmldir
9 | settings
10 |
11 | shellVariables
12 |
13 |
14 | name
15 | TM_COMMENT_START
16 | value
17 | #
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Support/Fold.tmPreferences:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | scope
5 | source.qml
6 | settings
7 |
8 | foldScopes
9 |
10 |
11 | begin
12 | punctuation.section.block.begin
13 | end
14 | punctuation.section.block.end
15 |
16 |
17 | begin
18 | punctuation.section.sequence.begin
19 | end
20 | punctuation.section.sequence.end
21 |
22 |
23 | begin
24 | punctuation.section.group.begin
25 | end
26 | punctuation.section.group.end
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/Support/Indentation Rules - Embedded JavaScript.tmPreferences:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | scope
5 |
6 | source.qml meta.block.js,
7 | source.qml meta.switch.js
8 |
9 | settings
10 |
11 | decreaseIndentPattern
12 |
24 |
25 | increaseIndentPattern
26 |
39 |
40 | bracketIndentNextLinePattern
41 | (?: \s* (? /\*.*\*/ ) )* \s* )
44 | (?:
45 | # indent after:
46 | # - `else`
47 | else
48 | # indent after:
49 | # - `else if (...)`
50 | # - `if (...)`
51 | # - `while (...)`
52 | | (?: (?: else \g )? if | while )
53 | \b
54 | # before a ;
55 | [^;]*
56 | # indent after `for`
57 | | for\b .*
58 | )
59 | $
60 | ]]>
61 |
62 | unIndentedLinePattern
63 |
73 |
74 | indentSquareBrackets
75 |
76 |
77 |
78 |
79 |
--------------------------------------------------------------------------------
/Support/Indentation Rules - QML.tmPreferences:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | scope
5 | source.qml - (meta.block.js | meta.switch.js)
6 | settings
7 |
8 | decreaseIndentPattern
9 |
15 |
16 | increaseIndentPattern
17 |
24 |
25 | bracketIndentNextLinePattern
26 | (?: \s* (? /\*.*\*/ ) )* \s* )
29 | (?:
30 | # indent after:
31 | # - `else`
32 | else
33 | # indent after:
34 | # - `else if (...)`
35 | # - `if (...)`
36 | # - `while (...)`
37 | | (?: (?: else \g )? if | while )
38 | \b
39 | # before a ;
40 | [^;]*
41 | # indent after `for`
42 | | for\b .*
43 | )
44 | $
45 | ]]>
46 |
47 | unIndentedLinePattern
48 |
58 |
59 | indentSquareBrackets
60 |
61 |
62 |
63 |
64 |
--------------------------------------------------------------------------------
/Support/Indexed Reference List - Imports.tmPreferences:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | scope
6 |
7 | source.qml meta.import.qml meta.path
8 |
9 | settings
10 |
11 | showInIndexedReferenceList
12 | 1
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/Support/Indexed Symbol List - Imports.tmPreferences:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | scope
6 | source.qmldir meta.module.qmldir meta.path
7 | settings
8 |
9 | showInIndexedSymbolList
10 | 1
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Support/QML.sublime-build:
--------------------------------------------------------------------------------
1 | {
2 | "cmd": ["qmlscene", "$file"],
3 | "selector": "source.qml",
4 | "file_regex": "^file:\/\/(.+):([0-9]+):() (.*)$",
5 | "windows": {
6 | "file_regex": "^file:\/\/\/(.+):([0-9]+):() (.*)$"
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/Support/QML.sublime-syntax:
--------------------------------------------------------------------------------
1 | %YAML 1.2
2 | ---
3 | version: 2
4 | name: QML
5 | file_extensions:
6 | - qml
7 | - qbs
8 | - qmltypes
9 | scope: source.qml
10 | extends: Packages/JavaScript/JavaScript.sublime-syntax
11 | variables:
12 | identifier_continue: '[[:alnum:]_]'
13 | identifier: '\b[[:alpha:]_]{{identifier_continue}}*\b'
14 | identifier_title: '\b[[:upper:]]{{identifier_continue}}*\b'
15 | identifier_untitle: '\b_*[[:lower:]]{{identifier_continue}}*\b'
16 | identifier_handler: '\b(on)(_*[[:upper:]]{{identifier_continue}}*?)(Changed)?\b'
17 | property_name: (?:(?!{{reserved_word}})(?![[:upper:]])(?:{{identifier_start}}{{identifier_part}}*{{identifier_break}}))
18 | path: '({{identifier}}[ ]*\.[ ]*)*{{identifier}}'
19 | qml_builtin_type: |-
20 | (?x:
21 | # Basic Types Provided By The QML Language
22 | bool|double|enumeration|int|real|string|url|var|variant|
23 | # Basic Types Provided By QML Modules
24 | color|date|font|matrix4x4|point|quaternion|rect|size|vector2d|vector3d|vector4d
25 | ){{identifier_break}}
26 |
27 | contexts:
28 | main:
29 | - include: statements-qml
30 |
31 | statements-qml:
32 | - match: (?=\S)
33 | push: statement-qml
34 |
35 | statement-qml:
36 | - match: '\)|\}|\]'
37 | scope: invalid.illegal.stray-bracket-end.qml
38 | pop: true
39 |
40 | - match: \;
41 | scope: punctuation.terminator.statement.empty.qml
42 | pop: true
43 |
44 | - include: pragma-statement
45 | - include: import-statement
46 | - include: qml-annotation
47 | - include: object-standalone
48 |
49 | expect-semicolon-qml:
50 | - match: \;
51 | scope: punctuation.terminator.statement.qml
52 | pop: true
53 | - include: else-pop
54 |
55 | else-pop-at-eol:
56 | - include: else-pop
57 | - include: eol-pop
58 |
59 | eol-pop:
60 | - match: (?=\s*($|;|\}))
61 | pop: true
62 |
63 | semicolon-or-eol-pop:
64 | - match: \;
65 | scope: punctuation.terminator.statement.qml
66 | pop: true
67 | - match: (?=\s*$)
68 | pop: true
69 |
70 | immediately-pop:
71 | - match: ''
72 | pop: 1
73 |
74 | immediately-pop-2:
75 | - meta_include_prototype: false
76 | - match: ''
77 | pop: 2
78 |
79 | pragma-statement:
80 | - match: \bpragma\b
81 | scope: keyword.control.pragma.qml
82 | push:
83 | - pragma-meta
84 | - maybe-pragma-rhs
85 | - pragma-name
86 |
87 | pragma-meta:
88 | - meta_include_prototype: false
89 | - meta_scope: meta.pragma.qml
90 | - include: immediately-pop
91 |
92 | maybe-pragma-rhs:
93 | - match: ':'
94 | scope: punctuation.separator.mapping.key-value.qml
95 | set: pragma-value-list
96 | - include: semicolon-or-eol-pop
97 |
98 | pragma-value-list:
99 | - match: '{{identifier}}'
100 | scope: storage.modifier.pragma.qml
101 | - match: ','
102 | scope: punctuation.separator.comma.qml
103 | - include: semicolon-or-eol-pop
104 |
105 | pragma-name:
106 | - match: '{{identifier}}'
107 | scope: storage.modifier.pragma.qml
108 | pop: 1
109 | - include: semicolon-or-eol-pop
110 |
111 | import-statement:
112 | - match: import{{identifier_break}}
113 | scope: keyword.control.import.qml
114 | push:
115 | - import-meta
116 | - semicolon-or-eol-pop
117 | - expect-import-alias
118 | - expect-import-version
119 | - expect-import-location
120 |
121 | import-meta:
122 | - meta_include_prototype: false
123 | - meta_scope: meta.import.qml
124 | - include: immediately-pop
125 |
126 | expect-import-location:
127 | - include: import-string
128 | - include: qualified-name
129 | - include: else-pop-at-eol
130 |
131 | import-string:
132 | - include: literal-string
133 | - match: (?=`)
134 | set:
135 | - import-string-invalid-meta
136 | - literal-string-template
137 |
138 | import-string-invalid-meta:
139 | - meta_include_prototype: false
140 | - meta_scope: invalid.illegal.import-string.qml
141 | - include: immediately-pop
142 |
143 | expect-import-version:
144 | - include: import-version
145 | - include: else-pop-at-eol
146 |
147 | import-version:
148 | - match: '(\d+)(?:\s*(\.)\s*(\d+))?'
149 | scope: meta.number.version.qml
150 | captures:
151 | 1: constant.numeric.value.qml
152 | 2: punctuation.separator.decimal.qml
153 | 3: constant.numeric.value.qml
154 | pop: true
155 | - match: (@)(?:{{identifier}})(@)
156 | scope: variable.other.cmake
157 | captures:
158 | 1: punctuation.definition.variable.begin.cmake
159 | 2: punctuation.definition.variable.end.cmake
160 | pop: true
161 |
162 | expect-import-alias:
163 | - include: import-alias
164 | - include: else-pop-at-eol
165 |
166 | import-alias:
167 | - match: as{{identifier_break}}
168 | scope: keyword.operator.as.qml
169 | set:
170 | - meta_scope: meta.import.alias.qml
171 | - match: '{{identifier_title}}'
172 | scope: entity.name.namespace.qml
173 | pop: true
174 | - include: import-illegal-names
175 |
176 | import-illegal-names:
177 | - match: '[^\s]+'
178 | scope: invalid.illegal.name.import.qml
179 | pop: true
180 |
181 | qualified-name:
182 | - match: (?={{identifier}})
183 | set:
184 | - qualified-name-meta
185 | - qualified-name-recursive
186 |
187 | qualified-name-meta:
188 | - meta_include_prototype: false
189 | - meta_scope: meta.path.qml
190 | - include: immediately-pop
191 |
192 | qualified-name-recursive:
193 | - match: '{{identifier}}'
194 | scope: meta.generic-name.qml
195 | set:
196 | - match: \.
197 | scope: punctuation.accessor.qml
198 | set: qualified-name-recursive
199 | - include: else-pop-at-eol
200 |
201 | expect-object-standalone:
202 | - include: object-standalone
203 | - include: else-pop
204 |
205 | object-standalone:
206 | - match: (?={{identifier_title}})
207 | set:
208 | - expect-object-block
209 | - expect-object-type-name
210 |
211 | expect-object-type-name:
212 | - match: (?={{identifier_title}})
213 | set: object-type-name
214 |
215 | # either Namespace.Object or just Object
216 | object-type-name:
217 | # just Object
218 | - match: '{{identifier_title}}(?!\s*\.)'
219 | scope: support.class.qml
220 | pop: true
221 |
222 | # Namespace.Object
223 | - match: '{{identifier_title}}'
224 | scope: support.class.qml
225 | set:
226 | - match: \.
227 | scope: punctuation.accessor.qml
228 | set: object-type-name
229 |
230 | - include: else-pop
231 |
232 | # same as above, but fails with not-standalone-object
233 | try-standalone-object-type-name:
234 | - match: (?={{identifier_title}})
235 | set: standalone-object-type-name
236 |
237 | - match: (?=\S)
238 | fail: not-standalone-object
239 |
240 | standalone-object-type-name:
241 | - match: '{{identifier_title}}(?!\s*\.)'
242 | scope: support.class.qml
243 | pop: true
244 |
245 | - match: '{{identifier_title}}'
246 | scope: support.class.qml
247 | set:
248 | - match: \.
249 | scope: punctuation.accessor.qml
250 | set: standalone-object-type-name
251 |
252 | - match: (?=\S)
253 | fail: not-standalone-object
254 |
255 | # same as above, but fails with not-value-object
256 | try-value-object-type-name:
257 | - match: (?={{identifier_title}})
258 | set: value-object-type-name
259 |
260 | - match: (?=\S)
261 | fail: not-value-object
262 |
263 | value-object-type-name:
264 | - match: '{{identifier_title}}(?!\s*\.)'
265 | scope: support.class.qml
266 | pop: true
267 |
268 | - match: '{{identifier_title}}'
269 | scope: support.class.qml
270 | set:
271 | - match: \.
272 | scope: punctuation.accessor.qml
273 | set: value-object-type-name
274 |
275 | - match: (?=\S)
276 | fail: not-value-object
277 |
278 | expect-object-block:
279 | - include: object-block
280 | - include: else-pop
281 |
282 | object-block:
283 | - match: \{
284 | scope: punctuation.section.block.begin.qml
285 | set:
286 | - meta_scope: meta.block.qml
287 | - match: \}
288 | scope: punctuation.section.block.end.qml
289 | pop: true
290 | - include: object-block-statements
291 |
292 | object-block-statements:
293 | - match: '\)|\}|\]'
294 | scope: invalid.illegal.stray-bracket-end.qml
295 | # pop: true # Don't! Let the object flow further
296 |
297 | - match: (?=\S)
298 | push: object-block-statement
299 |
300 | object-block-statement:
301 | - match: \;
302 | scope: invalid.illegal.unexpected-terminator.qml
303 | pop: true
304 |
305 | # prefixed (easily recognilable)
306 | - include: qml-annotation
307 | - include: enum-declaration
308 | - include: regular-qml-method
309 | - include: regular-qml-signal
310 | - include: property-declaration
311 |
312 | # unprefixed (may require specifix order to work)
313 | - include: object-id
314 | - include: signal-handler-non-attached
315 | - include: property-binding
316 | - include: standalone-object-or-attached-member
317 |
318 | # temporarily allow random nested blocks until the syntax is complete
319 | - include: block
320 |
321 | object-id:
322 | - match: id{{identifier_break}}
323 | scope: keyword.other.id.qml
324 | set:
325 | - object-id-meta
326 | - expect-semicolon-qml
327 | - object-id-name
328 | - property-binding-expect-colon
329 |
330 | object-id-meta:
331 | - meta_include_prototype: false
332 | - meta_scope: meta.binding.property.qml
333 | - include: immediately-pop
334 |
335 | object-id-name:
336 | - match: '(?={{non_reserved_identifier}}){{identifier_untitle}}'
337 | scope: entity.name.label.qml
338 | set:
339 | - include: else-pop-at-eol
340 | - match: '\S+'
341 | scope: invalid.illegal.identifier.qml
342 | pop: true
343 | - match: '\S+'
344 | scope: invalid.illegal.identifier.qml
345 | pop: true
346 | - include: else-pop-at-eol
347 |
348 | property-binding-expect-colon:
349 | - match: ':'
350 | scope: keyword.operator.assignment.qml
351 | pop: true
352 | - match: '\S+'
353 | scope: invalid.illegal.qml
354 | pop: true
355 |
356 | property-declaration:
357 | - include: required-property
358 | - include: default-property
359 | - include: other-property
360 |
361 | property-binding-meta:
362 | - meta_include_prototype: false
363 | - meta_scope: meta.binding.property.qml
364 | - include: immediately-pop
365 |
366 | required-property:
367 | - match: required{{identifier_break}}
368 | scope: keyword.other.qml storage.modifier.required.qml
369 | set:
370 | - property-binding-meta
371 | - required-property-branch
372 |
373 | required-property-branch:
374 | - match: default{{identifier_break}}
375 | scope: keyword.other.qml storage.modifier.default.qml
376 | set: required-property-extended
377 |
378 | - match: '(?={{non_reserved_identifier}})'
379 | branch_point: required-property-fail
380 | branch:
381 | - maybe-simple-required-property
382 | - required-property-extended
383 | pop: true
384 | - include: illegal-property-name
385 |
386 | maybe-simple-required-property:
387 | - match: '{{property_name}}'
388 | scope: meta.binding.name.qml variable.other.member.qml
389 | set: maybe-inside-simple-required-property
390 | - include: illegal-property-name
391 |
392 | maybe-inside-simple-required-property:
393 | - include: illegal-binding
394 | - include: eol-pop
395 | - match: '\S'
396 | fail: required-property-fail
397 |
398 | required-property-extended:
399 | - match: property{{identifier_break}}
400 | scope: keyword.declaration.qml
401 | set:
402 | - expect-illegal-binding
403 | - required-property-name
404 | - required-property-type
405 |
406 | - include: semicolon-or-eol-pop
407 | - match: '\S+'
408 | scope: invalid.illegal.expected-property.qml
409 | pop: true
410 |
411 | required-property-type:
412 | - include: expect-property-type-member
413 |
414 | required-property-name:
415 | - match: '{{property_name}}'
416 | scope: meta.binding.name.qml variable.other.member.qml
417 | pop: true
418 |
419 | - match: '\S+'
420 | scope: invalid.illegal.expected-identifier.qml
421 | pop: true
422 |
423 | illegal-property-name:
424 | - include: semicolon-or-eol-pop
425 | - match: '(?![\{\}])\S+'
426 | scope: invalid.illegal.expected-name.qml
427 | pop: true
428 | - include: else-pop
429 |
430 | default-property:
431 | - match: default{{identifier_break}}
432 | scope: keyword.other.qml storage.modifier.default.qml
433 | set:
434 | - property-binding-meta
435 | - default-property-content
436 |
437 | default-property-content:
438 | - match: required{{identifier_break}}
439 | scope: keyword.other.qml storage.modifier.required.qml
440 | set: required-property-extended
441 |
442 | - match: (?=\S)
443 | set:
444 | - expect-binding
445 | - expect-property-declaration-name
446 | - expect-property-type-member-or-alias
447 | - expect-property-keyword
448 |
449 | - include: semicolon-or-eol-pop
450 |
451 | other-property:
452 | - match: (?=property{{identifier_break}})
453 | branch_point: not-property-declaration
454 | branch:
455 | - try-property-declaration
456 | - property-binding
457 |
458 | - match: (?=component{{identifier_break}})
459 | branch_point: not-component-declaration
460 | branch:
461 | - try-inline-component-declaration
462 | - property-binding
463 |
464 | - match: (?=readonly{{identifier_break}})
465 | set:
466 | - property-binding-meta
467 | - expect-binding
468 | - expect-property-declaration-name
469 | - expect-property-type-member-or-alias
470 | - expect-property-keyword
471 | - property-keyword-readonly
472 |
473 | try-property-declaration:
474 | - match: (?=property{{identifier_break}})
475 | set:
476 | - immediately-pop-2
477 | - property-binding-meta
478 | - expect-binding
479 | - expect-property-declaration-name
480 | - expect-property-type-member-or-alias
481 | - fail-on-semicolon-property
482 | - expect-property-keyword
483 |
484 | try-inline-component-declaration:
485 | - match: (?=component{{identifier_break}})
486 | set:
487 | - immediately-pop-2
488 | - inline-component-meta
489 | - expect-object-standalone
490 | - inline-component-expect-colon-separator
491 | - inline-component-expect-name
492 | - fail-on-semicolon-component
493 | - expect-component-keyword
494 |
495 | fail-on-semicolon-property:
496 | - match: ':'
497 | fail: not-property-declaration
498 | - include: else-pop
499 |
500 | fail-on-semicolon-component:
501 | - match: ':'
502 | fail: not-component-declaration
503 | - include: else-pop
504 |
505 | property-keyword-readonly:
506 | - match: readonly{{identifier_break}}
507 | scope: keyword.other.qml storage.modifier.required.qml
508 | pop: true
509 |
510 | expect-property-keyword:
511 | - match: property{{identifier_break}}
512 | scope: keyword.declaration.qml
513 | pop: true
514 | - include: else-pop-at-eol
515 |
516 | expect-component-keyword:
517 | - match: component{{identifier_break}}
518 | scope: keyword.declaration.component.qml
519 | pop: true
520 | - include: else-pop-at-eol
521 |
522 | expect-intercepted-property:
523 | - match: (?={{identifier}})
524 | set:
525 | - meta_scope: meta.binding.name.qml
526 | - match: (?={{identifier_title}})
527 | push: object-type-name
528 | - match: '{{property_name}}'
529 | scope: ''
530 | - match: \.
531 | scope: punctuation.accessor.qml
532 | - include: illegal-property-name
533 | - include: illegal-property-name
534 |
535 | expect-property-name:
536 | - include: property-name
537 | - include: illegal-property-name
538 |
539 | property-name:
540 | - match: '{{property_name}}'
541 | scope: meta.binding.name.qml
542 | pop: true
543 |
544 | expect-property-declaration-name:
545 | - include: property-declaration-name
546 | - include: illegal-property-name
547 |
548 | property-declaration-name:
549 | - match: '{{property_name}}'
550 | scope: meta.binding.name.qml variable.other.member.qml
551 | pop: true
552 |
553 | property-binding:
554 | - match: (?={{identifier_untitle}})
555 | set:
556 | - property-binding-meta
557 | - property-binding-or-group
558 | - expect-property-name
559 |
560 | property-binding-inside-group:
561 | - include: signal-handler-non-attached
562 | - match: (?={{identifier_untitle}})
563 | set:
564 | # Don't nest meta scopes
565 | - property-binding-or-group
566 | - expect-property-name
567 |
568 | property-binding-or-group:
569 | - match: \.
570 | scope: punctuation.accessor.qml
571 | set:
572 | - include: property-binding-inside-group
573 | - include: else-pop
574 | - match: \{
575 | scope: punctuation.section.block.begin.qml
576 | set:
577 | - meta_scope: meta.block.qml
578 | - match: \}
579 | scope: punctuation.section.block.end.qml
580 | pop: true
581 | - include: object-block-statements
582 | - include: binding
583 | - include: else-pop-at-eol
584 |
585 | standalone-object-or-attached-member:
586 | - match: (?={{identifier_title}})
587 | pop: true
588 | branch_point: not-standalone-object
589 | branch:
590 | - try-standalone-object-interceptor
591 | - try-standalone-object
592 | - attached-member
593 |
594 | try-standalone-object-interceptor:
595 | - match: (?={{identifier_title}})
596 | set:
597 | - expect-object-block
598 | - try-property-interceptor
599 | - try-standalone-object-type-name
600 |
601 | try-property-interceptor:
602 | - match: on{{identifier_break}}
603 | scope: keyword.other.on.qml
604 | set: expect-intercepted-property
605 |
606 | - match: (?=\S)
607 | fail: not-standalone-object
608 |
609 | try-standalone-object:
610 | - match: (?={{identifier_title}})
611 | set:
612 | - try-standalone-object-block
613 | - try-standalone-object-type-name
614 |
615 | try-standalone-object-block:
616 | - match: (?=\{)
617 | set: object-block
618 |
619 | - match: (?=\S)
620 | fail: not-standalone-object
621 |
622 | attached-member:
623 | - include: support-attached
624 | - include: regular-attached
625 |
626 | regular-attached:
627 | - match: (?={{identifier_title}})
628 | set:
629 | - expect-attached-member
630 | - expect-object-type-name
631 |
632 | expect-attached-member:
633 | - include: signal-handler-non-attached
634 | - include: property-binding
635 | - include: else-pop
636 |
637 | expect-binding:
638 | - include: binding
639 | - include: else-pop-at-eol
640 |
641 | binding:
642 | - match: \;
643 | scope: punctuation.terminator.statement.qml
644 | pop: true
645 | - match: ':'
646 | scope: punctuation.separator.mapping.key-value.qml
647 | set: binding-value
648 |
649 | expect-illegal-binding:
650 | - include: illegal-binding
651 | - include: else-pop-at-eol
652 |
653 | illegal-binding:
654 | - match: \;
655 | scope: punctuation.terminator.statement.qml
656 | pop: true
657 | - match: ':'
658 | scope: punctuation.separator.mapping.key-value.qml invalid.illegal.binding.qml
659 | set: binding-value
660 |
661 | binding-value:
662 | - match: (?=\S)
663 | pop: true
664 | branch_point: not-value-object
665 | branch:
666 | - try-value-object
667 | - maybe-array-of-objects
668 | - binding-expression
669 |
670 | binding-expression:
671 | - include: class
672 | - include: regular-function
673 | - include: conditionals
674 | - include: block
675 | - include: expression-statement
676 |
677 | - include: else-pop-at-eol
678 |
679 | # Copied from JavaScript syntax, added binary-operators-qml
680 | expression-end:
681 | - include: postfix-operators
682 | - include: binary-operators
683 | - include: binary-operators-qml
684 | - include: ternary-operator
685 |
686 | - include: left-expression-end
687 |
688 | binary-operators-qml:
689 | - match: as{{identifier_break}}
690 | scope: keyword.operator.qml
691 | push: expression-begin
692 |
693 | try-value-object:
694 | - match: (?={{identifier_title}})
695 | set:
696 | - try-value-object-block
697 | - try-value-object-type-name
698 | - match: '\S'
699 | fail: not-value-object
700 |
701 | try-value-object-block:
702 | - match: (?=\{)
703 | set: object-block
704 |
705 | - match: '\S'
706 | fail: not-value-object
707 |
708 | maybe-array-of-objects:
709 | - match: '\['
710 | scope: punctuation.section.sequence.begin.qml
711 | set:
712 | - maybe-array-of-objects-meta
713 | # Only fail on first object. If this one succeeds, others shall be parsed as objects too.
714 | - array-of-objects-content
715 | # And if it's an empty array, fallback to JavaScript expression
716 | - try-value-object
717 | - match: '\S'
718 | fail: not-value-object
719 |
720 | maybe-array-of-objects-meta:
721 | - meta_include_prototype: false
722 | - meta_scope: meta.sequence.qml
723 | - include: immediately-pop
724 |
725 | array-of-objects-content:
726 | - match: \,
727 | scope: punctuation.separator.comma.qml
728 | - match: '\]'
729 | scope: punctuation.section.sequence.end.qml
730 | pop: true
731 | - match: (?={{identifier_title}})
732 | push: object-standalone
733 | - match: (?=\S)
734 | push:
735 | - array-of-objects-content-invalid-meta
736 | - expression-begin
737 |
738 | array-of-objects-content-invalid-meta:
739 | - meta_include_prototype: false
740 | - meta_scope: invalid.illegal.expected-object.qml
741 | - include: immediately-pop
742 |
743 | # override here, so we can parse if-elseif-else chain in one go
744 | conditionals:
745 | - match: if{{identifier_break}}
746 | scope: keyword.control.conditional.if.js
747 | set:
748 | - conditional-meta
749 | - expect-condition-continuation
750 | - statement
751 | - expect-parenthesized-expression
752 |
753 | - include: conditional
754 |
755 | expect-condition-continuation:
756 | - match: else\s+if{{identifier_break}}
757 | scope: keyword.control.conditional.elseif.js
758 | set:
759 | - expect-condition-continuation
760 | - statement
761 | - expect-parenthesized-expression
762 |
763 | - match: else{{identifier_break}}
764 | scope: keyword.control.conditional.else.js
765 | set:
766 | - statement
767 |
768 | - include: else-pop
769 |
770 | property-type-fallback:
771 | - match: '{{identifier}}'
772 | # Don't highlight unknown type
773 | pop: true
774 | - include: else-pop-at-eol
775 |
776 | expect-property-type-member-or-alias:
777 | - include: property-type-member-or-alias
778 |
779 | - include: property-type-fallback
780 |
781 | property-type-member-or-alias:
782 | - include: property-type-alias
783 | - include: property-type-member
784 |
785 | expect-property-type-member:
786 | - include: property-type-member
787 |
788 | - include: property-type-fallback
789 |
790 | property-type-member:
791 | - include: property-type-list
792 | - include: property-type-simple
793 |
794 | expect-property-type-simple:
795 | - include: property-type-simple
796 |
797 | - include: property-type-fallback
798 |
799 | property-type-simple:
800 | - include: property-type-gadget
801 | - include: expect-object-type-name
802 |
803 | expect-property-type-gadget:
804 | - include: property-type-gadget
805 |
806 | - include: property-type-fallback
807 |
808 | property-type-gadget:
809 | - match: 'variant{{identifier_break}}'
810 | scope: storage.type.qml meta.type.qml support.other.qml invalid.deprecated.variant.qml
811 | pop: true
812 | - match: 'var{{identifier_break}}'
813 | scope: storage.type.qml meta.type.qml support.other.qml
814 | pop: true
815 | - match: 'void{{identifier_break}}'
816 | scope: meta.type.js support.type.void.js
817 | pop: true
818 | - match: '{{qml_builtin_type}}'
819 | scope: meta.type.qml support.type.qml
820 | pop: true
821 | - match: '{{identifier_untitle}}'
822 | scope: meta.type.qml support.class.qml
823 | pop: true
824 |
825 | expect-property-type-alias:
826 | - include: property-type-alias
827 |
828 | - include: property-type-fallback
829 |
830 | property-type-alias:
831 | - match: alias{{identifier_break}}
832 | scope: keyword.other.qml
833 | pop: true
834 |
835 | expect-property-type-list:
836 | - include: property-type-list
837 |
838 | - include: property-type-fallback
839 |
840 | property-type-list:
841 | - match: list{{identifier_break}}
842 | scope: storage.type.qml support.other.qml
843 | set: list-type-generics
844 |
845 | list-type-generics:
846 | - match: '<'
847 | scope: punctuation.definition.generic.begin.qml
848 | set:
849 | - list-type-generics-end
850 | - expect-property-type-simple
851 |
852 | list-type-generics-end:
853 | - match: '>'
854 | scope: punctuation.definition.generic.end.qml
855 | pop: true
856 | - include: else-pop
857 |
858 | # BEGIN methods
859 | # Copied from JavaScript syntax, replaced 'function-' with 'qml-method-', added parameter types.
860 | regular-qml-method:
861 | - match: (?={{func_lookahead}})
862 | set: qml-method-declaration
863 |
864 | qml-method-declaration:
865 | - meta_include_prototype: false
866 | - match: ''
867 | set:
868 | - function-meta
869 | - function-declaration-expect-body
870 | - qml-method-declaration-expect-return-type
871 | - qml-method-declaration-expect-parameters
872 | - qml-method-declaration-expect-name
873 | - function-declaration-expect-generator-star
874 | - function-declaration-expect-function-keyword
875 | - function-declaration-expect-async
876 |
877 | qml-method-declaration-expect-name:
878 | - include: signal-handler-name
879 | - include: function-declaration-expect-name
880 |
881 | qml-method-declaration-expect-parameters:
882 | - include: qml-method-declaration-parameters
883 | - include: else-pop
884 |
885 | qml-method-declaration-parameters:
886 | - match: \(
887 | scope: punctuation.section.group.begin.qml
888 | set:
889 | - clear_scopes: 1
890 | - meta_scope: meta.function.parameters.qml
891 | - match: \)
892 | scope: punctuation.section.group.end.qml
893 | pop: true
894 | - include: qml-method-parameter-binding-list
895 |
896 | qml-method-parameter-binding-list:
897 | - match: ','
898 | scope: punctuation.separator.parameter.function.qml
899 | - include: function-parameter-binding-spread
900 | - match: (?={{binding_pattern_lookahead}})
901 | push: qml-method-parameter
902 | - include: else-pop
903 |
904 | qml-method-parameter:
905 | - match: ''
906 | set:
907 | - initializer
908 | - qml-method-parameter-expect-type # this is added
909 | - qml-method-parameter-binding-pattern
910 |
911 | qml-method-parameter-binding-pattern:
912 | - include: function-parameter-binding-name
913 | # destructuring won't always work in QML (as of Qt 5/6), but hopefully they will someday.
914 | - include: function-parameter-binding-array-destructuring
915 | - include: function-parameter-binding-object-destructuring
916 | - include: else-pop
917 |
918 | qml-method-parameter-expect-type:
919 | - match: ':'
920 | scope: punctuation.separator.type.qml
921 | set: property-type-member
922 | - include: else-pop
923 |
924 | qml-method-declaration-expect-return-type:
925 | - match: ':'
926 | scope: punctuation.separator.type.qml
927 | set: expect-property-type-member
928 | - include: else-pop
929 |
930 | # END methods
931 |
932 | # BEGIN signals
933 |
934 | regular-qml-signal:
935 | - match: (?=signal{{identifier_break}})
936 | set: signal-declaration
937 |
938 | signal-declaration:
939 | - meta_include_prototype: false
940 | - match: ''
941 | set:
942 | - signal-meta
943 | - expect-semicolon
944 | - signal-declaration-expect-parameters
945 | - function-declaration-expect-name
946 | - signal-declaration-expect-keyword
947 |
948 | signal-meta:
949 | - meta_include_prototype: false
950 | - meta_scope: meta.function.js
951 | - include: immediately-pop
952 |
953 | signal-declaration-expect-keyword:
954 | - match: signal{{identifier_break}}
955 | scope: keyword.declaration.function.qml
956 | pop: true
957 | - include: else-pop
958 |
959 | signal-declaration-expect-parameters:
960 | - include: signal-declaration-parameters
961 | - include: else-pop
962 |
963 | signal-declaration-parameters:
964 | - match: \(
965 | scope: punctuation.section.group.begin.qml
966 | set:
967 | - clear_scopes: 1
968 | - meta_scope: meta.function.parameters.qml
969 | - match: \)
970 | scope: punctuation.section.group.end.qml
971 | pop: true
972 | - include: signal-parameter-list
973 |
974 | signal-parameter-list:
975 | - match: ','
976 | scope: punctuation.separator.parameter.function.qml
977 | - match: (?={{identifier}})
978 | push: signal-parameter
979 | - include: else-pop
980 |
981 | signal-parameter:
982 | - match: (?={{identifier}})
983 | pop: true
984 | branch:
985 | - try-signal-parameter-name-first
986 | - try-signal-parameter-type-first
987 | - signal-parameter-untyped
988 | branch_point: signal-parameter-signature
989 | - include: else-pop
990 |
991 | # TypeScript style: `param1: string`
992 | try-signal-parameter-name-first:
993 | - match: (?={{identifier}})
994 | set:
995 | - expect-signal-parameter-type
996 | - maybe-signal-parameter-colon
997 | - expect-signal-parameter-name
998 | - match: (?=\S)
999 | fail: signal-parameter-signature
1000 | - include: else-pop
1001 |
1002 | maybe-signal-parameter-colon:
1003 | - match: ':'
1004 | scope: punctuation.separator.type.qml
1005 | pop: true
1006 | - match: (?=\S)
1007 | fail: signal-parameter-signature
1008 |
1009 | expect-signal-parameter-name:
1010 | - match: (?={{identifier_name}})
1011 | set: signal-parameter-name
1012 |
1013 | - include: else-pop
1014 |
1015 | signal-parameter-name:
1016 | - match: '{{non_reserved_identifier}}'
1017 | scope: meta.binding.name.js variable.parameter.function.js
1018 | pop: true
1019 | - match: '{{identifier_name}}'
1020 | scope: invalid.illegal.identifier.js meta.binding.name.js variable.parameter.function.js
1021 | pop: true
1022 |
1023 | signal-parameter-name-fail-on-missing:
1024 | - match: (?=,|\))
1025 | fail: signal-parameter-signature
1026 | - match: (?=\S)
1027 | set: signal-parameter-name
1028 |
1029 | expect-signal-parameter-type:
1030 | # intentionally skip newlines
1031 | - match: (?=\S)
1032 | set: expect-property-type-simple
1033 | - include: else-pop
1034 |
1035 | # C/C++ style: `string param1`
1036 | try-signal-parameter-type-first:
1037 | - match: ''
1038 | set:
1039 | - signal-parameter-name-fail-on-missing
1040 | - expect-signal-parameter-type
1041 |
1042 | signal-parameter-untyped:
1043 | - match: ''
1044 | set:
1045 | - untyped-meta
1046 | - expect-signal-parameter-name
1047 |
1048 | untyped-meta:
1049 | - meta_include_prototype: false
1050 | - meta_scope: invalid.illegal.expected-type.qml
1051 | - include: immediately-pop
1052 |
1053 | # END signals
1054 |
1055 | literal-string:
1056 | - match: "'"
1057 | scope: punctuation.definition.string.begin.qml
1058 | set:
1059 | - meta_include_prototype: false
1060 | - meta_scope: meta.string.qml string.quoted.single.qml
1061 | - match: \'
1062 | scope: punctuation.definition.string.end.qml
1063 | pop: true
1064 | # Qt/QML extension: newlines are allowed in double-quoted strings
1065 | - match: \n
1066 | scope: invalid.deprecated.newline.qml
1067 | # pop: true
1068 | - include: string-content
1069 | - match: '"'
1070 | scope: punctuation.definition.string.begin.qml
1071 | set:
1072 | - meta_include_prototype: false
1073 | - meta_scope: meta.string.qml string.quoted.double.qml
1074 | - match: \"
1075 | scope: punctuation.definition.string.end.qml
1076 | pop: true
1077 | # Qt/QML extension: newlines are allowed in double-quoted strings
1078 | - match: \n
1079 | scope: invalid.deprecated.newline.qml
1080 | # pop: true
1081 | - include: string-content
1082 |
1083 | # BEGIN support
1084 |
1085 | support:
1086 | - meta_append: false
1087 |
1088 | - include: support-variable-ecma
1089 | - include: support-variable-console
1090 | - include: support-variable-xhr
1091 |
1092 | - include: support-variable-qtqml
1093 | - include: support-variable-qtquick
1094 | - include: support-variable-qtquick-controls
1095 | - include: support-variable-qtquick-dialogs
1096 | - include: support-variable-qtquick-layouts
1097 | - include: support-variable-qtquick-templates
1098 | - include: support-variable-kde
1099 |
1100 | support-variable-xhr:
1101 | - match: XMLHttpRequest{{identifier_break}}
1102 | scope: support.class.dom.js
1103 | pop: true
1104 |
1105 | support-variable-qtqml:
1106 | - match: Component{{identifier_break}}
1107 | scope: support.class.builtin.qml
1108 | set:
1109 | - match: '{{dot_accessor}}'
1110 | scope: punctuation.accessor.js
1111 | set:
1112 | - include: support-property-qtqml-component
1113 | - include: object-property
1114 | - include: else-pop
1115 | - include: else-pop
1116 |
1117 | - match: Binding{{identifier_break}}
1118 | scope: support.class.builtin.qml
1119 | set:
1120 | - match: '{{dot_accessor}}'
1121 | scope: punctuation.accessor.js
1122 | set:
1123 | - include: support-property-qtqml-binding
1124 | - include: object-property
1125 | - include: else-pop
1126 | - include: else-pop
1127 |
1128 | - match: Locale{{identifier_break}}
1129 | scope: support.class.builtin.qml
1130 | set:
1131 | - match: '{{dot_accessor}}'
1132 | scope: punctuation.accessor.js
1133 | set:
1134 | - include: support-property-qtqml-locale
1135 | - include: object-property
1136 | - include: else-pop
1137 | - include: else-pop
1138 |
1139 | # https://doc.qt.io/qt-5/qml-qtqml-qt.html
1140 | - match: Qt{{identifier_break}}
1141 | scope: support.class.builtin.qml
1142 | set:
1143 | - match: '{{dot_accessor}}'
1144 | scope: punctuation.accessor.js
1145 | set:
1146 | - include: support-property-qtqml-qt
1147 | - include: object-property
1148 | - include: else-pop
1149 | - include: else-pop
1150 |
1151 | # https://doc.qt.io/qt-5/qtqml-javascript-qmlglobalobject.html
1152 | - match: (?:qsTr|qsTranslate|qsTrId|QT_TR_NOOP|QT_TRANSLATE_NOOP|QT_TRID_NOOP|gc|print){{identifier_break}}
1153 | scope: support.function.qml
1154 | pop: true
1155 |
1156 | support-property-qtqml-component:
1157 | - include: support-property-qtquick-parts-status
1158 |
1159 | support-property-qtqml-binding:
1160 | - match: (?:RestoreNone|RestoreBinding|RestoreValue|RestoreBindingOrValue){{identifier_break}}
1161 | scope: support.constant.builtin.qml
1162 | pop: true
1163 |
1164 | support-property-qtqml-locale:
1165 | # Definitely not including all the Language, Script and Country/Territory members
1166 | - match: |-
1167 | (?x:(?:
1168 | # DayOfWeek
1169 | Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday
1170 | # MeasurementSystem
1171 | |MetricSystem|ImperialUSSystem|ImperialUKSystem|ImperialSystem
1172 | # FormatType
1173 | |LongFormat|ShortFormat|NarrowFormat
1174 | # NumberOption
1175 | |DefaultNumberOptions|OmitGroupSeparator|RejectGroupSeparator|OmitLeadingZeroInExponent|RejectLeadingZeroInExponent|IncludeTrailingZeroesAfterDot|RejectTrailingZeroesAfterDot
1176 | # DataSizeFormat
1177 | |DataSizeBase1000|DataSizeSIQuantifiers|DataSizeIecFormat|DataSizeTraditionalFormat|DataSizeSIFormat
1178 | # LanguageCodeType
1179 | |ISO639Part1|ISO639Part2B|ISO639Part2T|ISO639Part3|LegacyLanguageCode|ISO639Part2|ISO639Alpha2|ISO639Alpha3|ISO639|AnyLanguageCode
1180 | )){{identifier_break}}
1181 | scope: support.constant.builtin.qml
1182 | pop: true
1183 |
1184 | support-property-qtqml-qt:
1185 | - match: (?:Asynchronous|Synchronous){{identifier_break}}
1186 | scope: support.constant.builtin.qml
1187 | pop: true
1188 |
1189 | # https://doc.qt.io/qt-5/qt.html
1190 | # qtbase/src/corelib/global/qnamespace.h
1191 | - match: |-
1192 | (?x:(?:
1193 | # ScrollBarPolicy
1194 | ScrollBarAsNeeded|ScrollBarAlwaysOff|ScrollBarAlwaysOn
1195 | # FocusPolicy
1196 | |NoFocus|TabFocus|ClickFocus|StrongFocus|WheelFocus
1197 | # ContextMenuPolicy
1198 | |NoContextMenu|DefaultContextMenu|ActionsContextMenu|CustomContextMenu|PreventContextMenu
1199 | # ArrowType
1200 | |NoArrow|UpArrow|DownArrow|LeftArrow|RightArrow
1201 | # ToolButtonStyle
1202 | |ToolButtonIconOnly|ToolButtonTextOnly|ToolButtonTextBesideIcon|ToolButtonTextUnderIcon|ToolButtonFollowStyle
1203 | # PenStyle
1204 | |NoPen|SolidLine|DashLine|DotLine|DashDotLine|DashDotDotLine|CustomDashLine|MPenStyle
1205 | # PenCapStyle
1206 | |FlatCap|SquareCap|RoundCap|MPenCapStyle
1207 | # PenJoinStyle
1208 | |MiterJoin|BevelJoin|RoundJoin|SvgMiterJoin|MPenJoinStyle
1209 | # BrushStyle
1210 | |NoBrush|(?:Solid|Dense[1-7]|Hor|Ver|Cross|BDiag|FDiag|DiagCross|LinearGradient|RadialGradient|ConicalGradient|Texture)Pattern
1211 | # FillRule
1212 | |OddEvenFill|WindingFill
1213 | # MaskMode
1214 | |MaskInColor|MaskOutColor
1215 | # BGMode
1216 | |TransparentMode|OpaqueMode
1217 | # ClipOperation
1218 | |NoClip|ReplaceClip|IntersectClip
1219 | # SizeMode
1220 | |AbsoluteSize|RelativeSize
1221 | # Axis
1222 | |XAxis|YAxis|ZAxis
1223 | # Corner
1224 | |TopLeftCorner|TopRightCorner|BottomLeftCorner|BottomRightCorner
1225 | # Edge
1226 | |TopEdge|LeftEdge|RightEdge|BottomEdge
1227 | # LayoutDirection
1228 | |LeftToRight|RightToLeft|LayoutDirectionAuto
1229 | # SizeHint
1230 | |MinimumSize|PreferredSize|MaximumSize|MinimumDescent|NSizeHints
1231 | # Orientation
1232 | |Horizontal|Vertical
1233 | # DropAction
1234 | |CopyAction|MoveAction|LinkAction|ActionMask|TargetMoveAction|IgnoreAction
1235 | # AlignmentFlag
1236 | |Align(?:Left|Leading|Right|Trailing|HCenter|Justify|Absolute|Horizontal_Mask|Top|Bottom|VCenter|Baseline|Vertical_Mask|Center)
1237 | # TextFlag
1238 | |Text(?:SingleLine|DontClip|ExpandTabs|ShowMnemonic|WordWrap|WrapAnywhere|DontPrint|IncludeTrailingSpaces|HideMnemonic|JustificationForced|ForceLeftToRight|ForceRightToLeft|LongestVariant|BypassShaping)
1239 | # SplitBehaviorFlags
1240 | |(?:Keep|Skip)EmptyParts
1241 | # DockWidgetArea - omited
1242 | # ToolBarArea
1243 | |LeftToolBarArea|RightToolBarArea|TopToolBarArea|BottomToolBarArea
1244 | # TextFormat
1245 | |PlainText|RichText|AutoText|MarkdownText
1246 | # TextElideMode
1247 | |ElideLeft|ElideRight|ElideMiddle|ElideNone
1248 | # DateFormat
1249 | |TextDate|ISODate|SystemLocaleDate|LocalDate|LocaleDate|SystemLocaleShortDate|SystemLocaleLongDate|DefaultLocaleShortDate|DefaultLocaleLongDate|RFC2822Date|ISODateWithMs
1250 | # TimeSpec
1251 | |LocalTime|UTC|OffsetFromUTC|TimeZone
1252 | # DayOfWeek
1253 | |Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday
1254 | # CursorShape
1255 | |ArrowCursor|UpArrowCursor|CrossCursor|WaitCursor|IBeamCursor|SizeVerCursor|SizeHorCursor|SizeBDiagCursor|SizeFDiagCursor|SizeAllCursor|BlankCursor|SplitVCursor|SplitHCursor|PointingHandCursor|ForbiddenCursor|WhatsThisCursor|BusyCursor|OpenHandCursor|ClosedHandCursor|DragCopyCursor|DragMoveCursor|DragLinkCursor|LastCursor|BitmapCursor|CustomCursor
1256 | # GlobalColor
1257 | |color0|color1|black|white|darkGray|gray|lightGray|red|green|blue|cyan|magenta|yellow|darkRed|darkGreen|darkBlue|darkCyan|darkMagenta|darkYellow|transparent
1258 | # AspectRatioMode
1259 | |IgnoreAspectRatio|KeepAspectRatio|KeepAspectRatioByExpanding
1260 | # TransformationMode
1261 | |FastTransformation|SmoothTransformation
1262 | # ImageConversionFlag
1263 | |ColorMode_Mask|AutoColor|ColorOnly|MonoOnly|AlphaDither_Mask|ThresholdAlphaDither|OrderedAlphaDither|DiffuseAlphaDither|NoAlpha|Dither_Mask|DiffuseDither|OrderedDither|ThresholdDither|DitherMode_Mask|AutoDither|PreferDither|AvoidDither|NoOpaqueDetection|NoFormatConversion
1264 | # Key
1265 | |Key_(?:Escape|Tab|Backtab|Backspace|Return|Enter|Insert|Delete|Pause|Print|SysReq|Clear|Home|End|Left|Up|Right|Down|PageUp|PageDown|Shift|Control|Meta|Alt|CapsLock|NumLock|ScrollLock|F[12][0-9]?|F3[0-5]?|F[4-9]|Super_[LR]|Menu|Hyper_[LR]|Help|Direction_[LR]|Space|Any|Exclam|QuoteDbl|NumberSign|Dollar|Percent|Ampersand|Apostrophe|ParenLeft|ParenRight|Asterisk|Plus|Comma|Minus|Period|Slash|[0-9]|Colon|Semicolon|Less|Equal|Greater|Question|At|[A-Z]|Bracket(?:Left|Right)|Backslash|AsciiCircum|Underscore|QuoteLeft|Brace(?:Left|Right)|Bar|AsciiTilde|nobreakspace|exclamdown|cent|sterling|currency|yen|brokenbar|section|diaeresis|copyright|ordfeminine|guillemotleft|notsign|hyphen|registered|macron|degree|plusminus|twosuperior|threesuperior|acute|mu|paragraph|periodcentered|cedilla|onesuperior|masculine|guillemotright|onequarter|onehalf|threequarters|questiondown|Agrave|Aacute|Acircumflex|Atilde|Adiaeresis|Aring|AE|Ccedilla|Egrave|Eacute|Ecircumflex|Ediaeresis|Igrave|Iacute|Icircumflex|Idiaeresis|ETH|Ntilde|Ograve|Oacute|Ocircumflex|Otilde|Odiaeresis|multiply|Ooblique|Ugrave|Uacute|Ucircumflex|Udiaeresis|Yacute|THORN|ssharp|division|ydiaeresis|AltGr|Multi_key|Codeinput|SingleCandidate|MultipleCandidate|PreviousCandidate|Mode_switch|Kanji|Muhenkan|Henkan|Romaji|Hiragana|Katakana|Hiragana_Katakana|Zenkaku|Hankaku|Zenkaku_Hankaku|Touroku|Massyo|Kana_Lock|Kana_Shift|Eisu_Shift|Eisu_toggle|Hangul|Hangul_(?:Start|End|Hanja|Jamo|Romaja|Jeonja|Banja|PreHanja|PostHanja|Special)|Dead_(?:Grave|Acute|Circumflex|Tilde|Macron|Breve|Abovedot|Diaeresis|Abovering|Doubleacute|Caron|Cedilla|Ogonek|Iota|Voiced_Sound|Semivoiced_Sound|Belowdot|Hook|Horn|Stroke|Abovecomma|Abovereversedcomma|Doublegrave|Belowring|Belowmacron|Belowcircumflex|Belowtilde|Belowbreve|Belowdiaeresis|Invertedbreve|Belowcomma|Currency|a|A|e|E|i|I|o|O|u|U|Small_Schwa|Capital_Schwa|Greek|Lowline|Aboveverticalline|Belowverticalline|Longsolidusoverlay)|Back|Forward|Stop|Refresh|Volume(?:Down|Mute|Up)|Bass(?:Boost|Up|Down)|Treble(?:Up|Down)|Media(?:Play|Stop|Previous|Next|Record|Pause|TogglePlayPause)|HomePage|Favorites|Search|Standby|OpenUrl|LaunchMail|LaunchMedia|Launch[0-9A-F]|MonBrightness(?:Up|Down)|KeyboardLightOnOff|KeyboardBrightness(?:Up|Down)|PowerOff|WakeUp|Eject|ScreenSaver|WWW|Memo|LightBulb|Shop|History|AddFavorite|HotLinks|BrightnessAdjust|Finance|Community|AudioRewind|BackForward|ApplicationLeft|ApplicationRight|Book|CD|Calculator|ToDoList|ClearGrab|Close|Copy|Cut|Display|DOS|Documents|Excel|Explorer|Game|Go|iTouch|LogOff|Market|Meeting|MenuKB|MenuPB|MySites|News|OfficeHome|Option|Paste|Phone|Calendar|Reply|Reload|RotateWindows|RotationPB|RotationKB|Save|Send|Spell|SplitScreen|Support|TaskPane|Terminal|Tools|Travel|Video|Word|Xfer|Zoom(?:In|Out)|Away|Messenger|WebCam|MailForward|Pictures|Music|Battery|Bluetooth|WLAN|UWB|AudioForward|AudioRepeat|AudioRandomPlay|Subtitle|AudioCycleTrack|Time|Hibernate|View|TopMenu|PowerDown|Suspend|ContrastAdjust|LaunchG|LaunchH|TouchpadToggle|Touchpad(?:On|Off)|MicMute|Red|Green|Yellow|Blue|ChannelUp|ChannelDown|Guide|Info|Settings|MicVolumeUp|MicVolumeDown|New|Open|Find|Undo|Redo|MediaLast|Select|Yes|No|Cancel|Printer|Execute|Sleep|Play|Zoom|Exit|Context[1-4]|Call|Hangup|Flip|ToggleCallHangup|VoiceDial|LastNumberRedial|Camera|CameraFocus|unknown)
1266 | # ShortcutContext
1267 | |WidgetShortcut|WindowShortcut|ApplicationShortcut|WidgetWithChildrenShortcut
1268 | # TextInteractionFlag
1269 | |NoTextInteraction|TextSelectableBy(?:Mouse|Keyboard)|LinksAccessibleBy(?:Mouse|Keyboard)|TextEditable|TextEditorInteraction|TextBrowserInteraction
1270 | # ItemSelectionMode
1271 | |(?:Contains|Intersects)Item(?:Shape|BoundingRect)
1272 | # ItemSelectionOperation
1273 | |ReplaceSelection|AddToSelection
1274 | # ItemFlag
1275 | |NoItemFlags|ItemIs(?:Selectable|Editable|DragEnabled|DropEnabled|UserCheckable|Enabled|AutoTristate|Tristate)|ItemNeverHasChildren|ItemIsUserTristate
1276 | # CheckState
1277 | |Unchecked|PartiallyChecked|Checked
1278 | # ItemDataRole
1279 | |DisplayRole|DecorationRole|EditRole|ToolTipRole|StatusTipRole|WhatsThisRole|FontRole|TextAlignmentRole|BackgroundRole|ForegroundRole|BackgroundColorRole|TextColorRole|CheckStateRole|AccessibleTextRole|AccessibleDescriptionRole|SizeHintRole|InitialSortOrderRole|DisplayPropertyRole|DecorationPropertyRole|ToolTipPropertyRole|StatusTipPropertyRole|WhatsThisPropertyRole|UserRole
1280 | # SortOrder
1281 | |AscendingOrder|DescendingOrder
1282 | # CaseSensitivity
1283 | |CaseInsensitive|CaseSensitive
1284 | # MatchFlag
1285 | |MatchExactly|MatchContains|MatchStartsWith|MatchEndsWith|MatchRegExp|MatchWildcard|MatchFixedString|MatchRegularExpression|MatchCaseSensitive|MatchWrap|MatchRecursive
1286 | # KeyboardModifier
1287 | |NoModifier|ShiftModifier|ControlModifier|AltModifier|MetaModifier|KeypadModifier|GroupSwitchModifier|KeyboardModifierMask
1288 | # MouseButton
1289 | |(?:No|Left|Right|Middle|Mid|Back)Button|XButton1|ExtraButton1|ForwardButton|XButton2|ExtraButton2|TaskButton|ExtraButton(?:[3-9]|1[0-9]|2[0-4])|AllButtons|MaxMouseButton|MouseButtonMask
1290 | # WindowType
1291 | |Widget|Window|Dialog|Sheet|Drawer|Popup|Tool|ToolTip|SplashScreen|Desktop|SubWindow|ForeignWindow|CoverWindow|WindowType_Mask|MSWindowsFixedSizeDialogHint|MSWindowsOwnDC|BypassWindowManagerHint|X11BypassWindowManagerHint|FramelessWindowHint|WindowTitleHint|WindowSystemMenuHint|WindowMinimizeButtonHint|WindowMaximizeButtonHint|WindowMinMaxButtonsHint|WindowContextHelpButtonHint|WindowShadeButtonHint|WindowStaysOnTopHint|WindowTransparentForInput|WindowOverridesSystemGestures|WindowDoesNotAcceptFocus|MaximizeUsingFullscreenGeometryHint|CustomizeWindowHint|WindowStaysOnBottomHint|WindowCloseButtonHint|MacWindowToolBarButtonHint|BypassGraphicsProxyWidget|NoDropShadowWindowHint|WindowFullscreenButtonHint
1292 | # WindowState
1293 | |WindowNoState|WindowMinimized|WindowMaximized|WindowFullScreen|WindowActive
1294 | # WindowModality
1295 | |NonModal|WindowModal|ApplicationModal
1296 | # WidgetAttribute - omited
1297 | # ApplicationAttribute - omited
1298 | # FocusReason
1299 | |MouseFocusReason|TabFocusReason|BacktabFocusReason|ActiveWindowFocusReason|PopupFocusReason|ShortcutFocusReason|MenuBarFocusReason|OtherFocusReason|NoFocusReason
1300 | # InputMethodHint
1301 | |ImhNone|ImhHiddenText|ImhSensitiveData|ImhNoAutoUppercase|ImhPreferNumbers|ImhPreferUppercase|ImhPreferLowercase|ImhNoPredictiveText|ImhDate|ImhTime|ImhPreferLatin|ImhMultiLine|ImhNoEditMenu|ImhNoTextHandles|ImhDigitsOnly|ImhFormattedNumbersOnly|ImhUppercaseOnly|ImhLowercaseOnly|ImhDialableCharactersOnly|ImhEmailCharactersOnly|ImhUrlCharactersOnly|ImhLatinOnly|ImhExclusiveInputMask
1302 | # InputMethodQuery - omited
1303 | # EnterKeyType
1304 | |EnterKeyDefault|EnterKeyReturn|EnterKeyDone|EnterKeyGo|EnterKeySend|EnterKeySearch|EnterKeyNext|EnterKeyPrevious
1305 | # TouchPointState
1306 | |TouchPointPressed|TouchPointMoved|TouchPointStationary|TouchPointReleased
1307 | # ScreenOrientation
1308 | |PrimaryOrientation|PortraitOrientation|LandscapeOrientation|InvertedPortraitOrientation|InvertedLandscapeOrientation
1309 | # ConnectionType
1310 | |AutoConnection|DirectConnection|QueuedConnection|BlockingQueuedConnection|UniqueConnection
1311 | # ApplicationState
1312 | |ApplicationSuspended|ApplicationHidden|ApplicationInactive|ApplicationActive
1313 | # GestureState
1314 | |NoGesture|GestureStarted|GestureUpdated|GestureFinished|GestureCanceled
1315 | # GestureType
1316 | |TapGesture|TapAndHoldGesture|PanGesture|PinchGesture|SwipeGesture|CustomGesture|LastGestureType
1317 | # NativeGestureType
1318 | |BeginNativeGesture|EndNativeGesture|PanNativeGesture|ZoomNativeGesture|SmartZoomNativeGesture|RotateNativeGesture|SwipeNativeGesture
1319 | # CursorMoveStyle
1320 | |LogicalMoveStyle|VisualMoveStyle
1321 | # TimerType
1322 | |PreciseTimer|CoarseTimer|VeryCoarseTimer
1323 | # ScrollPhase
1324 | |NoScrollPhase|ScrollBegin|ScrollUpdate|ScrollEnd|ScrollMomentum
1325 | # MouseEventSource
1326 | |MouseEventNotSynthesized|MouseEventSynthesizedBySystem|MouseEventSynthesizedByQt|MouseEventSynthesizedByApplication
1327 | # MouseEventFlag
1328 | |MouseEventCreatedDoubleClick|MouseEventFlagMask
1329 | # ChecksumType - omited
1330 | # HighDpiScaleFactorRoundingPolicy - omited
1331 | # TabFocusBehavior
1332 | |NoTabFocus|TabFocusTextControls|TabFocusListControls|TabFocusAllControls
1333 | )){{identifier_break}}
1334 | scope: support.constant.builtin.qml
1335 | pop: true
1336 |
1337 | - match: (?:include|isQtObject|rgba|hsla|hsva|colorEqual|rect|point|size|font|vector2d|vector3d|vector4d|quaternion|matrix4x4|formatDate|formatTime|formatDateTime|openUrlExternally|fontFamilies|md5|btoa|atob|resolvedUrl|locale|binding|lighter|darker|tint|quit|exit|createQmlObject|createComponent|callLater){{identifier_break}}
1338 | scope: support.function.builtin.qml
1339 | pop: true
1340 |
1341 | - match: application{{identifier_break}}
1342 | scope: support.type.object.qt.qml support.class.builtin.qml
1343 | set:
1344 | - match: '{{dot_accessor}}'
1345 | scope: punctuation.accessor.js
1346 | set:
1347 | - include: support-property-qtqml-qt-application
1348 | - include: object-property
1349 | - include: else-pop
1350 | - include: else-pop
1351 |
1352 | - match: platform{{identifier_break}}
1353 | scope: support.type.object.qt.qml support.class.builtin.qml
1354 | set:
1355 | - match: '{{dot_accessor}}'
1356 | scope: punctuation.accessor.js
1357 | set:
1358 | - include: support-property-qtqml-qt-platform
1359 | - include: object-property
1360 | - include: else-pop
1361 | - include: else-pop
1362 |
1363 | - match: (?:inputMethod|styleHints){{identifier_break}}
1364 | scope: support.type.object.qt.qml
1365 | pop: true
1366 |
1367 | support-property-qtqml-qt-application:
1368 | - match: (?:active|state|layoutDirection|font|arguments|name|displayName|version|organization|domain|supportsMultipleWindows|screens){{identifier_break}}
1369 | scope: support.type.object.application.qml
1370 | pop: true
1371 |
1372 | support-property-qtqml-qt-platform:
1373 | - match: (?:os|pluginName){{identifier_break}}
1374 | scope: support.type.object.platform.qml
1375 | pop: true
1376 |
1377 | support-variable-qtquick:
1378 | - match: Animation{{identifier_break}}
1379 | scope: support.class.builtin.qml
1380 | set:
1381 | - match: '{{dot_accessor}}'
1382 | scope: punctuation.accessor.js
1383 | set:
1384 | - include: support-property-qtquick-animation
1385 | - include: object-property
1386 | - include: else-pop
1387 | - include: else-pop
1388 |
1389 | - match: DoubleValidator{{identifier_break}}
1390 | scope: support.class.builtin.qml
1391 | set:
1392 | - match: '{{dot_accessor}}'
1393 | scope: punctuation.accessor.js
1394 | set:
1395 | - include: support-property-qtquick-doublevalidator
1396 | - include: object-property
1397 | - include: else-pop
1398 | - include: else-pop
1399 |
1400 | - match: Drag{{identifier_break}}
1401 | scope: support.class.builtin.qml
1402 | set:
1403 | - match: '{{dot_accessor}}'
1404 | scope: punctuation.accessor.js
1405 | set:
1406 | - include: support-property-qtquick-drag
1407 | - include: object-property
1408 | - include: else-pop
1409 | - include: else-pop
1410 |
1411 | - match: DragHandler{{identifier_break}}
1412 | scope: support.class.builtin.qml
1413 | set:
1414 | - match: '{{dot_accessor}}'
1415 | scope: punctuation.accessor.js
1416 | set:
1417 | - include: support-property-qtquick-draghandler
1418 | - include: object-property
1419 | - include: else-pop
1420 | - include: else-pop
1421 |
1422 | - match: Easing{{identifier_break}}
1423 | scope: support.class.builtin.qml
1424 | set:
1425 | - match: '{{dot_accessor}}'
1426 | scope: punctuation.accessor.js
1427 | set:
1428 | - include: support-property-qtquick-easing
1429 | - include: object-property
1430 | - include: else-pop
1431 | - include: else-pop
1432 |
1433 | - match: EventPoint{{identifier_break}}
1434 | scope: support.class.builtin.qml
1435 | set:
1436 | - match: '{{dot_accessor}}'
1437 | scope: punctuation.accessor.js
1438 | set:
1439 | - include: support-property-qtquick-eventpoint
1440 | - include: object-property
1441 | - include: else-pop
1442 | - include: else-pop
1443 |
1444 | - match: (?:Flickable|TableView){{identifier_break}}
1445 | scope: support.class.builtin.qml
1446 | set:
1447 | - match: '{{dot_accessor}}'
1448 | scope: punctuation.accessor.js
1449 | set:
1450 | - include: support-property-qtquick-flickable
1451 | - include: object-property
1452 | - include: else-pop
1453 | - include: else-pop
1454 |
1455 | - match: Font{{identifier_break}}
1456 | scope: support.class.builtin.qml
1457 | set:
1458 | - match: '{{dot_accessor}}'
1459 | scope: punctuation.accessor.js
1460 | set:
1461 | - include: support-property-qtquick-font
1462 | - include: object-property
1463 | - include: else-pop
1464 | - include: else-pop
1465 |
1466 | - match: FontLoader{{identifier_break}}
1467 | scope: support.class.builtin.qml
1468 | set:
1469 | - match: '{{dot_accessor}}'
1470 | scope: punctuation.accessor.js
1471 | set:
1472 | - include: support-property-qtquick-fontloader
1473 | - include: object-property
1474 | - include: else-pop
1475 | - include: else-pop
1476 |
1477 | - match: Gradient{{identifier_break}}
1478 | scope: support.class.builtin.qml
1479 | set:
1480 | - match: '{{dot_accessor}}'
1481 | scope: punctuation.accessor.js
1482 | set:
1483 | - include: support-property-qtquick-gradient
1484 | - include: object-property
1485 | - include: else-pop
1486 | - include: else-pop
1487 |
1488 | - match: GraphicsInfo{{identifier_break}}
1489 | scope: support.class.builtin.qml
1490 | set:
1491 | - match: '{{dot_accessor}}'
1492 | scope: punctuation.accessor.js
1493 | set:
1494 | - include: support-property-qtquick-graphicsinfo
1495 | - include: object-property
1496 | - include: else-pop
1497 | - include: else-pop
1498 |
1499 | - match: Grid{{identifier_break}}
1500 | scope: support.class.builtin.qml
1501 | set:
1502 | - match: '{{dot_accessor}}'
1503 | scope: punctuation.accessor.js
1504 | set:
1505 | - include: support-property-qtquick-grid
1506 | - include: object-property
1507 | - include: else-pop
1508 | - include: else-pop
1509 |
1510 | - match: GridView{{identifier_break}}
1511 | scope: support.class.builtin.qml
1512 | set:
1513 | - match: '{{dot_accessor}}'
1514 | scope: punctuation.accessor.js
1515 | set:
1516 | - include: support-property-qtquick-gridview
1517 | - include: object-property
1518 | - include: else-pop
1519 | - include: else-pop
1520 |
1521 | - match: Image{{identifier_break}}
1522 | scope: support.class.builtin.qml
1523 | set:
1524 | - match: '{{dot_accessor}}'
1525 | scope: punctuation.accessor.js
1526 | set:
1527 | - include: support-property-qtquick-image
1528 | - include: object-property
1529 | - include: else-pop
1530 | - include: else-pop
1531 |
1532 | - match: InputDevice{{identifier_break}}
1533 | scope: support.class.builtin.qml
1534 | set:
1535 | - match: '{{dot_accessor}}'
1536 | scope: punctuation.accessor.js
1537 | set:
1538 | - include: support-property-qtquick-inputdevice
1539 | - include: object-property
1540 | - include: else-pop
1541 | - include: else-pop
1542 |
1543 | - match: InputMethod{{identifier_break}}
1544 | scope: support.class.builtin.qml
1545 | set:
1546 | - match: '{{dot_accessor}}'
1547 | scope: punctuation.accessor.js
1548 | set:
1549 | - include: support-property-qtquick-inputmethod
1550 | - include: object-property
1551 | - include: else-pop
1552 | - include: else-pop
1553 |
1554 | - match: Item{{identifier_break}}
1555 | scope: support.class.builtin.qml
1556 | set:
1557 | - match: '{{dot_accessor}}'
1558 | scope: punctuation.accessor.js
1559 | set:
1560 | - include: support-property-qtquick-item
1561 | - include: object-property
1562 | - include: else-pop
1563 | - include: else-pop
1564 |
1565 | - match: ItemView{{identifier_break}}
1566 | scope: support.class.builtin.qml
1567 | set:
1568 | - match: '{{dot_accessor}}'
1569 | scope: punctuation.accessor.js
1570 | set:
1571 | - include: support-property-qtquick-itemview
1572 | - include: object-property
1573 | - include: else-pop
1574 | - include: else-pop
1575 |
1576 | - match: KeyNavigation{{identifier_break}}
1577 | scope: support.class.builtin.qml
1578 | set:
1579 | - match: '{{dot_accessor}}'
1580 | scope: punctuation.accessor.js
1581 | set:
1582 | - include: support-property-qtquick-keynavigation
1583 | - include: object-property
1584 | - include: else-pop
1585 | - include: else-pop
1586 |
1587 | - match: Keys{{identifier_break}}
1588 | scope: support.class.builtin.qml
1589 | set:
1590 | - match: '{{dot_accessor}}'
1591 | scope: punctuation.accessor.js
1592 | set:
1593 | - include: support-property-qtquick-keys
1594 | - include: object-property
1595 | - include: else-pop
1596 | - include: else-pop
1597 |
1598 | - match: ListView{{identifier_break}}
1599 | scope: support.class.builtin.qml
1600 | set:
1601 | - match: '{{dot_accessor}}'
1602 | scope: punctuation.accessor.js
1603 | set:
1604 | - include: support-property-qtquick-listview
1605 | - include: object-property
1606 | - include: else-pop
1607 | - include: else-pop
1608 |
1609 | - match: Loader{{identifier_break}}
1610 | scope: support.class.builtin.qml
1611 | set:
1612 | - match: '{{dot_accessor}}'
1613 | scope: punctuation.accessor.js
1614 | set:
1615 | - include: support-property-qtquick-loader
1616 | - include: object-property
1617 | - include: else-pop
1618 | - include: else-pop
1619 |
1620 | - match: PathAnimation{{identifier_break}}
1621 | scope: support.class.builtin.qml
1622 | set:
1623 | - match: '{{dot_accessor}}'
1624 | scope: punctuation.accessor.js
1625 | set:
1626 | - include: support-property-qtquick-pathanimation
1627 | - include: object-property
1628 | - include: else-pop
1629 | - include: else-pop
1630 |
1631 | - match: PathArc{{identifier_break}}
1632 | scope: support.class.builtin.qml
1633 | set:
1634 | - match: '{{dot_accessor}}'
1635 | scope: punctuation.accessor.js
1636 | set:
1637 | - include: support-property-qtquick-patharc
1638 | - include: object-property
1639 | - include: else-pop
1640 | - include: else-pop
1641 |
1642 | - match: PathView{{identifier_break}}
1643 | scope: support.class.builtin.qml
1644 | set:
1645 | - match: '{{dot_accessor}}'
1646 | scope: punctuation.accessor.js
1647 | set:
1648 | - include: support-property-qtquick-pathview
1649 | - include: object-property
1650 | - include: else-pop
1651 | - include: else-pop
1652 |
1653 | - match: Pinch{{identifier_break}}
1654 | scope: support.class.builtin.qml
1655 | set:
1656 | - match: '{{dot_accessor}}'
1657 | scope: punctuation.accessor.js
1658 | set:
1659 | - include: support-property-qtquick-parts-pinch
1660 | - include: object-property
1661 | - include: else-pop
1662 | - include: else-pop
1663 |
1664 | - match: PointerDevice{{identifier_break}}
1665 | scope: support.class.builtin.qml
1666 | set:
1667 | - match: '{{dot_accessor}}'
1668 | scope: punctuation.accessor.js
1669 | set:
1670 | - include: support-property-qtquick-pointerdevice
1671 | - include: object-property
1672 | - include: else-pop
1673 | - include: else-pop
1674 |
1675 | - match: PointerHandler{{identifier_break}}
1676 | scope: support.class.builtin.qml
1677 | set:
1678 | - match: '{{dot_accessor}}'
1679 | scope: punctuation.accessor.js
1680 | set:
1681 | - include: support-property-qtquick-pointerhandler
1682 | - include: object-property
1683 | - include: else-pop
1684 | - include: else-pop
1685 |
1686 | - match: Rotation(?:Animation|Animator){{identifier_break}}
1687 | scope: support.class.builtin.qml
1688 | set:
1689 | - match: '{{dot_accessor}}'
1690 | scope: punctuation.accessor.js
1691 | set:
1692 | - include: support-property-qtquick-rotationanimation
1693 | - include: object-property
1694 | - include: else-pop
1695 | - include: else-pop
1696 |
1697 | - match: ShaderEffect{{identifier_break}}
1698 | scope: support.class.builtin.qml
1699 | set:
1700 | - match: '{{dot_accessor}}'
1701 | scope: punctuation.accessor.js
1702 | set:
1703 | - include: support-property-qtquick-shadereffect
1704 | - include: object-property
1705 | - include: else-pop
1706 | - include: else-pop
1707 |
1708 | - match: ShaderEffectSource{{identifier_break}}
1709 | scope: support.class.builtin.qml
1710 | set:
1711 | - match: '{{dot_accessor}}'
1712 | scope: punctuation.accessor.js
1713 | set:
1714 | - include: support-property-qtquick-shadereffectsource
1715 | - include: object-property
1716 | - include: else-pop
1717 | - include: else-pop
1718 |
1719 | - match: SmoothedAnimation{{identifier_break}}
1720 | scope: support.class.builtin.qml
1721 | set:
1722 | - match: '{{dot_accessor}}'
1723 | scope: punctuation.accessor.js
1724 | set:
1725 | - include: support-property-qtquick-smoothedanimation
1726 | - include: object-property
1727 | - include: else-pop
1728 | - include: else-pop
1729 |
1730 | - match: StandardKey{{identifier_break}}
1731 | scope: support.class.builtin.qml
1732 | set:
1733 | - match: '{{dot_accessor}}'
1734 | scope: punctuation.accessor.js
1735 | set:
1736 | - include: support-property-qtquick-standardkey
1737 | - include: object-property
1738 | - include: else-pop
1739 | - include: else-pop
1740 |
1741 | - match: SystemPalette{{identifier_break}}
1742 | scope: support.class.builtin.qml
1743 | set:
1744 | - match: '{{dot_accessor}}'
1745 | scope: punctuation.accessor.js
1746 | set:
1747 | - include: support-property-qtquick-systempalette
1748 | - include: object-property
1749 | - include: else-pop
1750 | - include: else-pop
1751 |
1752 | - match: TapHandler{{identifier_break}}
1753 | scope: support.class.builtin.qml
1754 | set:
1755 | - match: '{{dot_accessor}}'
1756 | scope: punctuation.accessor.js
1757 | set:
1758 | - include: support-property-qtquick-taphandler
1759 | - include: object-property
1760 | - include: else-pop
1761 | - include: else-pop
1762 |
1763 | - match: Text{{identifier_break}}
1764 | scope: support.class.builtin.qml
1765 | set:
1766 | - match: '{{dot_accessor}}'
1767 | scope: punctuation.accessor.js
1768 | set:
1769 | - include: support-property-qtquick-text
1770 | - include: object-property
1771 | - include: else-pop
1772 | - include: else-pop
1773 |
1774 | - match: TextEdit{{identifier_break}}
1775 | scope: support.class.builtin.qml
1776 | set:
1777 | - match: '{{dot_accessor}}'
1778 | scope: punctuation.accessor.js
1779 | set:
1780 | - include: support-property-qtquick-textedit
1781 | - include: object-property
1782 | - include: else-pop
1783 | - include: else-pop
1784 |
1785 | - match: TextInput{{identifier_break}}
1786 | scope: support.class.builtin.qml
1787 | set:
1788 | - match: '{{dot_accessor}}'
1789 | scope: punctuation.accessor.js
1790 | set:
1791 | - include: support-property-qtquick-textinput
1792 | - include: object-property
1793 | - include: else-pop
1794 | - include: else-pop
1795 |
1796 | - match: (?:Int|RegExp|RegularExpression)Validator{{identifier_break}}
1797 | scope: support.class.builtin.qml
1798 | set:
1799 | - match: '{{dot_accessor}}'
1800 | scope: punctuation.accessor.js
1801 | set:
1802 | - include: support-property-qtquick-parts-validator
1803 | - include: object-property
1804 | - include: else-pop
1805 | - include: else-pop
1806 |
1807 | - match: ViewSection{{identifier_break}}
1808 | scope: support.class.builtin.qml
1809 | set:
1810 | - match: '{{dot_accessor}}'
1811 | scope: punctuation.accessor.js
1812 | set:
1813 | - include: support-property-qtquick-viewsection
1814 | - include: object-property
1815 | - include: else-pop
1816 | - include: else-pop
1817 |
1818 | support-property-qtquick-parts-alignment:
1819 | - match: Align(?:Left|Right|HCenter|Top|Bottom|VCenter){{identifier_break}}
1820 | scope: support.constant.builtin.qml
1821 | pop: true
1822 |
1823 | support-property-qtquick-parts-grid-flow:
1824 | - match: (?:LeftToRight|TopToBottom){{identifier_break}}
1825 | scope: support.constant.builtin.qml
1826 | pop: true
1827 |
1828 | support-property-qtquick-parts-status:
1829 | - match: (?:Null|Ready|Loading|Error){{identifier_break}}
1830 | scope: support.constant.builtin.qml
1831 | pop: true
1832 |
1833 | support-property-qtquick-parts-orientation:
1834 | - match: (?:Horizontal|Vertical){{identifier_break}}
1835 | scope: support.constant.builtin.qml
1836 | pop: true
1837 |
1838 | support-property-qtquick-parts-pinch:
1839 | - match: (?:XAxis|YAxis|XAndYAxis|XandYAxis){{identifier_break}}
1840 | scope: support.constant.builtin.qml
1841 | pop: true
1842 |
1843 | support-property-qtquick-parts-position:
1844 | - match: (?:Header|Footer){{identifier_break}}
1845 | scope: support.constant.builtin.qml
1846 | pop: true
1847 |
1848 | support-property-qtquick-parts-transform-origin:
1849 | - match: (?:TopLeft|Top|TopRight|Left|Center|Right|BottomLeft|Bottom|BottomRight){{identifier_break}}
1850 | scope: support.constant.builtin.qml
1851 | pop: true
1852 |
1853 | support-property-qtquick-parts-validator:
1854 | - match: (?:Invalid|Intermediate|Acceptable){{identifier_break}}
1855 | scope: support.constant.builtin.qml
1856 | pop: true
1857 |
1858 | support-property-qtquick-animation:
1859 | - match: Infinite{{identifier_break}}
1860 | scope: support.constant.builtin.qml
1861 | pop: true
1862 |
1863 | support-property-qtquick-doublevalidator:
1864 | - include: support-property-qtquick-parts-validator
1865 | - match: (?:StandardNotation|ScientificNotation){{identifier_break}}
1866 | scope: support.constant.builtin.qml
1867 | pop: true
1868 |
1869 | support-property-qtquick-drag:
1870 | - include: support-property-qtquick-parts-pinch
1871 | - match: (?:None|Automatic|Internal){{identifier_break}}
1872 | scope: support.constant.builtin.qml
1873 | pop: true
1874 |
1875 | support-property-qtquick-draghandler:
1876 | - match: (?:NoSnap|SnapAuto|SnapIfPressedOutsideTarget|SnapAlways){{identifier_break}}
1877 | scope: support.constant.builtin.qml
1878 | pop: true
1879 |
1880 | support-property-qtquick-easing:
1881 | - match: (?:Linear|InQuad|OutQuad|InOutQuad|OutInQuad|InCubic|OutCubic|InOutCubic|OutInCubic|InQuart|OutQuart|InOutQuart|OutInQuart|InQuint|OutQuint|InOutQuint|OutInQuint|InSine|OutSine|InOutSine|OutInSine|InExpo|OutExpo|InOutExpo|OutInExpo|InCirc|OutCirc|InOutCirc|OutInCirc|InElastic|OutElastic|InOutElastic|OutInElastic|InBack|OutBack|InOutBack|OutInBack|InBounce|OutBounce|InOutBounce|OutInBounce){{identifier_break}}
1882 | scope: support.constant.builtin.qml
1883 | pop: true
1884 |
1885 | support-property-qtquick-eventpoint:
1886 | # State
1887 | - match: (?:Unknown|Stationary|Pressed|Updated|Released){{identifier_break}}
1888 | scope: support.constant.builtin.qml
1889 | pop: true
1890 |
1891 | support-property-qtquick-flickable:
1892 | - match: |-
1893 | (?x:(?:
1894 | # BoundsBehavior & BoundsMovement
1895 | StopAtBounds|DragOverBounds|OvershootBounds|DragAndOvershootBounds|FollowBoundsBehavior
1896 | # FlickableDirection
1897 | |AutoFlickDirection|(?:Horizontal|Vertical|HorizontalAndVertical)Flick|AutoFlickIfNeeded
1898 | )){{identifier_break}}
1899 | scope: support.constant.builtin.qml
1900 | pop: true
1901 |
1902 | support-property-qtquick-font:
1903 | - match: |-
1904 | (?x:(?:
1905 | # FontWeight
1906 | Thin|ExtraLight|Light|Normal|Medium|DemiBold|Bold|ExtraBold|Black
1907 | # Capitalization
1908 | |MixedCase|AllUppercase|AllLowercase|SmallCaps|Capitalize
1909 | # HintingPreference
1910 | |PreferDefaultHinting|PreferNoHinting|PreferVerticalHinting|PreferFullHinting
1911 | )){{identifier_break}}
1912 | scope: support.constant.builtin.qml
1913 | pop: true
1914 |
1915 | support-property-qtquick-fontloader:
1916 | - include: support-property-qtquick-parts-status
1917 |
1918 | support-property-qtquick-gradient:
1919 | - match: (?:Vertical|Horizontal){{identifier_break}}
1920 | scope: support.constant.builtin.qml
1921 | pop: true
1922 |
1923 | support-property-qtquick-graphicsinfo:
1924 | - match: |-
1925 | (?x:(?:
1926 | # GraphicsApi
1927 | Unknown|Software|OpenGL|Direct3D12|OpenVG|OpenGLRhi|Direct3D11Rhi|VulkanRhi|MetalRhi|NullRhi
1928 | # ShaderType
1929 | |UnknownShadingLanguage|GLSL|HLSL|RhiShader
1930 | # ShaderCompilationType
1931 | |RuntimeCompilation|OfflineCompilation
1932 | # ShaderSourceType
1933 | |ShaderSourceString|ShaderSourceFile|ShaderByteCode
1934 | # OpenGLContextProfile
1935 | |OpenGLNoProfile|OpenGLCoreProfile|OpenGLCompatibilityProfile
1936 | # RenderableType
1937 | |SurfaceFormatUnspecified|SurfaceFormatOpenGL|SurfaceFormatOpenGLES
1938 | )){{identifier_break}}
1939 | scope: support.constant.builtin.qml
1940 | pop: true
1941 |
1942 | support-property-qtquick-grid:
1943 | - include: support-property-qtquick-parts-grid-flow
1944 | - match: (?:AlignLeft|AlignRight|AlignHCenter|AlignTop|AlignBottom|AlignVCenter){{identifier_break}}
1945 | scope: support.constant.builtin.qml
1946 | pop: true
1947 |
1948 | support-property-qtquick-gridview:
1949 | - include: support-property-qtquick-itemview
1950 | - match: |-
1951 | (?x:(?:
1952 | # Flow
1953 | FlowLeftToRight|FlowTopToBottom
1954 | # SnapMode
1955 | |NoSnap|SnapToRow|SnapOneRow
1956 | )){{identifier_break}}
1957 | scope: support.constant.builtin.qml
1958 | pop: true
1959 |
1960 | support-property-qtquick-image:
1961 | - include: support-property-qtquick-parts-alignment
1962 | - include: support-property-qtquick-parts-status
1963 | - match: (?:Stretch|PreserveAspectFit|PreserveAspectCrop|Tile|TileVertically|TileHorizontally|Pad){{identifier_break}}
1964 | scope: support.constant.builtin.qml
1965 | pop: true
1966 |
1967 | support-property-qtquick-inputdevice:
1968 | - match: |-
1969 | (?x:(?:
1970 | # DeviceType
1971 | Unknown|Mouse|TouchScreen|TouchPad|Puck|Stylus|Airbrush|Keyboard|AllDevices
1972 | # Capability
1973 | |None|Position|Area|Pressure|Velocity|NormalizedPosition|MouseEmulation|PixelScroll|Scroll|Hover|Rotation|XTilt|YTilt|TangentialPressure|ZPosition|All
1974 | )){{identifier_break}}
1975 | scope: support.constant.builtin.qml
1976 | pop: true
1977 |
1978 | support-property-qtquick-inputmethod:
1979 | - match: (?:Click|ContextMenu){{identifier_break}}
1980 | scope: support.constant.builtin.qml
1981 | pop: true
1982 |
1983 | support-property-qtquick-item:
1984 | - include: support-property-qtquick-parts-transform-origin
1985 |
1986 | support-property-qtquick-itemview:
1987 | - include: support-property-qtquick-flickable
1988 | - match: |-
1989 | (?x:(?:
1990 | # LayoutDirection
1991 | LeftToRight|RightToLeft|VerticalTopToBottom|VerticalBottomToTop
1992 | # VerticalLayoutDirection
1993 | |TopToBottom|BottomToTop
1994 | # HighlightRangeMode
1995 | |NoHighlightRange|ApplyRange|StrictlyEnforceRange
1996 | # PositionMode
1997 | |Beginning|Center|End|Visible|Contain|SnapPosition
1998 | )){{identifier_break}}
1999 | scope: support.constant.builtin.qml
2000 | pop: true
2001 |
2002 | - match: (?:delayRemove|isCurrentItem|view|nextSection|previousSection|section){{identifier_break}}
2003 | scope: support.class.builtin.qml
2004 | pop: true
2005 |
2006 | support-property-qtquick-keynavigation:
2007 | - match: (?:BeforeItem|AfterItem){{identifier_break}}
2008 | scope: support.constant.builtin.qml
2009 | pop: true
2010 |
2011 | support-property-qtquick-keys:
2012 | - include: support-property-qtquick-keynavigation
2013 |
2014 | support-property-qtquick-listview:
2015 | - include: support-property-qtquick-itemview
2016 | - include: support-property-qtquick-parts-orientation
2017 | - match: (?:NoSnap|SnapToItem|SnapOneItem|InlineHeader|OverlayHeader|PullBackHeader|InlineFooter|OverlayFooter|PullBackFooter){{identifier_break}}
2018 | scope: support.constant.builtin.qml
2019 | pop: true
2020 |
2021 | support-property-qtquick-loader:
2022 | - include: support-property-qtquick-parts-status
2023 |
2024 | support-property-qtquick-pathanimation:
2025 | - match: (?:Fixed|RightFirst|LeftFirst|BottomFirst|TopFirst){{identifier_break}}
2026 | scope: support.constant.builtin.qml
2027 | pop: true
2028 |
2029 | support-property-qtquick-patharc:
2030 | - match: (?:Clockwise|Counterclockwise){{identifier_break}}
2031 | scope: support.constant.builtin.qml
2032 | pop: true
2033 |
2034 | support-property-qtquick-pathview:
2035 | - match: |-
2036 | (?x:(?:
2037 | # HighlightRangeMode
2038 | (?:NoHighlight|Apply|StrictlyEnforce)Range
2039 | # SnapMode
2040 | |NoSnap|Snap(?:ToItem|OneItem)
2041 | # MovementDirection
2042 | |Shortest|Negative|Positive
2043 | # PositionMode
2044 | |Beginning|Center|End|Contain|SnapPosition
2045 | )){{identifier_break}}
2046 | scope: support.constant.builtin.qml
2047 | pop: true
2048 |
2049 | support-property-qtquick-pointerdevice:
2050 | - match: |-
2051 | (?x:(?:
2052 | # PointerType
2053 | Unknown|Generic|Finger|Pen|Eraser|Cursor|AllPointerTypes
2054 | # GrabTransition
2055 | |GrabPassive|UngrabPassive|CancelGrabPassive|OverrideGrabPassive|GrabExclusive|UngrabExclusive|CancelGrabExclusive
2056 | )){{identifier_break}}
2057 | scope: support.constant.builtin.qml
2058 | pop: true
2059 |
2060 | support-property-qtquick-pointerhandler:
2061 | - match: (?:TakeOverForbidden|CanTakeOverFrom(?:HandlersOf(?:SameType|DifferentType)|Items|Anything)|ApprovesTakeOverBy(?:HandlersOf(?:SameType|DifferentType)|Items|Anything)|ApprovesCancellation){{identifier_break}}
2062 | scope: support.constant.builtin.qml
2063 | pop: true
2064 |
2065 | support-property-qtquick-rotationanimation:
2066 | - match: (?:Numerical|Shortest|Clockwise|Counterclockwise){{identifier_break}}
2067 | scope: support.constant.builtin.qml
2068 | pop: true
2069 |
2070 | support-property-qtquick-shadereffect:
2071 | - match: (?:NoCulling|BackFaceCulling|FrontFaceCulling|Compiled|Uncompiled|Error){{identifier_break}}
2072 | scope: support.constant.builtin.qml
2073 | pop: true
2074 |
2075 | support-property-qtquick-shadereffectsource:
2076 | - match: |-
2077 | (?x:(?:
2078 | # WrapMode
2079 | ClampToEdge|Repeat(?:Horizontally|Vertically)?
2080 | # Format
2081 | |Alpha|RGBA?
2082 | # TextureMirroring
2083 | |NoMirroring|MirrorHorizontally|MirrorVertically
2084 | )){{identifier_break}}
2085 | scope: support.constant.builtin.qml
2086 | pop: true
2087 |
2088 | support-property-qtquick-smoothedanimation:
2089 | - match: (?:Eased|Immediate|Sync){{identifier_break}}
2090 | scope: support.constant.builtin.qml
2091 | pop: true
2092 |
2093 | support-property-qtquick-standardkey:
2094 | - match: |-
2095 | (?x:(?:
2096 | # StandardKey
2097 | UnknownKey|HelpContents|WhatsThis|Open|Close|Save|New|Delete|Cut|Copy|Paste|Undo|Redo|Back|Forward|Refresh|ZoomIn|ZoomOut|Print|AddTab|NextChild|PreviousChild|Find|FindNext|FindPrevious|Replace|SelectAll|Bold|Italic|Underline|MoveToNextChar|MoveToPreviousChar|MoveToNextWord|MoveToPreviousWord|MoveToNextLine|MoveToPreviousLine|MoveToNextPage|MoveToPreviousPage|MoveToStartOfLine|MoveToEndOfLine|MoveToStartOfBlock|MoveToEndOfBlock|MoveToStartOfDocument|MoveToEndOfDocument|SelectNextChar|SelectPreviousChar|SelectNextWord|SelectPreviousWord|SelectNextLine|SelectPreviousLine|SelectNextPage|SelectPreviousPage|SelectStartOfLine|SelectEndOfLine|SelectStartOfBlock|SelectEndOfBlock|SelectStartOfDocument|SelectEndOfDocument|DeleteStartOfWord|DeleteEndOfWord|DeleteEndOfLine|InsertParagraphSeparator|InsertLineSeparator|SaveAs|Preferences|Quit|FullScreen|Deselect|DeleteCompleteLine|Backspace|Cancel
2098 | # SequenceFormat
2099 | |NativeText|PortableText
2100 | # SequenceMatch
2101 | |NoMatch|PartialMatch|ExactMatch
2102 | )){{identifier_break}}
2103 | scope: support.constant.builtin.qml
2104 | pop: true
2105 |
2106 | support-property-qtquick-systempalette:
2107 | - match: (?:Active|Inactive|Disabled){{identifier_break}}
2108 | scope: support.constant.builtin.qml
2109 | pop: true
2110 |
2111 | support-property-qtquick-taphandler:
2112 | - match: (?:DragThreshold|WithinBounds|ReleaseWithinBounds){{identifier_break}}
2113 | scope: support.constant.builtin.qml
2114 | pop: true
2115 |
2116 | support-property-qtquick-text:
2117 | - include: support-property-qtquick-parts-alignment
2118 | - match: |-
2119 | (?x:(?:
2120 | # HAlignment - not in parts
2121 | AlignJustify
2122 | # TextStyle
2123 | |Normal|Outline|Raised|Sunken
2124 | # TextFormat
2125 | |(?:Plain|Rich|Markdown|Auto|Styled)Text
2126 | # TextElideMode
2127 | |Elide(?:Left|Right|Middle|None)
2128 | # WrapMode
2129 | |NoWrap|WordWrap|WrapAnywhere|WrapAtWordBoundaryOrAnywhere|Wrap
2130 | # RenderType
2131 | |QtRendering|NativeRendering
2132 | # LineHeightMode
2133 | |ProportionalHeight|FixedHeight
2134 | # FontSizeMode
2135 | |FixedSize|HorizontalFit|VerticalFit|Fit
2136 | )){{identifier_break}}
2137 | scope: support.constant.builtin.qml
2138 | pop: true
2139 |
2140 | support-property-qtquick-textedit:
2141 | - include: support-property-qtquick-parts-alignment
2142 | - match: |-
2143 | (?x:(?:
2144 | # HAlignment - not in parts
2145 | AlignJustify
2146 | # TextFormat
2147 | |(?:Plain|Rich|Auto|Markdown)Text
2148 | # WrapMode
2149 | |NoWrap|WordWrap|WrapAnywhere|WrapAtWordBoundaryOrAnywhere|Wrap
2150 | # SelectionMode
2151 | |Select(?:Characters|Words)
2152 | # RenderType
2153 | |QtRendering|NativeRendering
2154 | )){{identifier_break}}
2155 | scope: support.constant.builtin.qml
2156 | pop: true
2157 |
2158 | support-property-qtquick-textinput:
2159 | - include: support-property-qtquick-parts-alignment
2160 | - match: |-
2161 | (?x:(?:
2162 | # EchoMode
2163 | Normal|NoEcho|Password|PasswordEchoOnEdit
2164 | # WrapMode
2165 | |NoWrap|WordWrap|WrapAnywhere|WrapAtWordBoundaryOrAnywhere|Wrap
2166 | # SelectionMode
2167 | |Select(?:Characters|Words)
2168 | # CursorPosition
2169 | |CursorBetweenCharacters|CursorOnCharacter
2170 | # RenderType
2171 | |QtRendering|NativeRendering
2172 | )){{identifier_break}}
2173 | scope: support.constant.builtin.qml
2174 | pop: true
2175 |
2176 | support-property-qtquick-viewsection:
2177 | - match: (?:FullString|FirstCharacter|InlineLabels|CurrentLabelAtStart|NextLabelAtEnd){{identifier_break}}
2178 | scope: support.constant.builtin.qml
2179 | pop: true
2180 |
2181 | support-variable-qtquick-dialogs:
2182 | - match: StandardButton{{identifier_break}}
2183 | scope: support.class.builtin.qml
2184 | set:
2185 | - match: '{{dot_accessor}}'
2186 | scope: punctuation.accessor.js
2187 | set:
2188 | - include: support-property-qtquick-dialogs-standardbutton
2189 | - include: object-property
2190 | - include: else-pop
2191 | - include: else-pop
2192 |
2193 | - match: StandardIcon{{identifier_break}}
2194 | scope: support.class.builtin.qml
2195 | set:
2196 | - match: '{{dot_accessor}}'
2197 | scope: punctuation.accessor.js
2198 | set:
2199 | - include: support-property-qtquick-dialogs-standardicon
2200 | - include: object-property
2201 | - include: else-pop
2202 | - include: else-pop
2203 |
2204 | support-property-qtquick-dialogs-standardbutton:
2205 | - match: (?:NoButton|Ok|Save|SaveAll|Open|Yes|YesToAll|No|NoToAll|Abort|Retry|Ignore|Close|Cancel|Discard|Help|Apply|Reset|RestoreDefaults|NButtons){{identifier_break}}
2206 | scope: support.constant.builtin.qml
2207 | pop: true
2208 |
2209 | support-property-qtquick-dialogs-standardicon:
2210 | - match: (?:NoIcon|Information|Warning|Critical|Question){{identifier_break}}
2211 | scope: support.constant.builtin.qml
2212 | pop: true
2213 |
2214 | support-variable-qtquick-controls:
2215 | - match: (?:AbstractButton|Button|RoundButton|ToolButton){{identifier_break}}
2216 | scope: support.class.builtin.qml
2217 | set:
2218 | - match: '{{dot_accessor}}'
2219 | scope: punctuation.accessor.js
2220 | set:
2221 | - include: support-property-qtquick-controls-abstractbutton
2222 | - include: object-property
2223 | - include: else-pop
2224 | - include: else-pop
2225 |
2226 | - match: Popup{{identifier_break}}
2227 | scope: support.class.builtin.qml
2228 | set:
2229 | - match: '{{dot_accessor}}'
2230 | scope: punctuation.accessor.js
2231 | set:
2232 | - include: support-property-qtquick-controls-popup
2233 | - include: object-property
2234 | - include: else-pop
2235 | - include: else-pop
2236 |
2237 | - match: Dial{{identifier_break}}
2238 | scope: support.class.builtin.qml
2239 | set:
2240 | - match: '{{dot_accessor}}'
2241 | scope: punctuation.accessor.js
2242 | set:
2243 | - include: support-property-qtquick-controls-dial
2244 | - include: object-property
2245 | - include: else-pop
2246 | - include: else-pop
2247 |
2248 | - match: Dialog{{identifier_break}}
2249 | scope: support.class.builtin.qml
2250 | set:
2251 | - match: '{{dot_accessor}}'
2252 | scope: punctuation.accessor.js
2253 | set:
2254 | - include: support-property-qtquick-controls-dialog
2255 | - include: object-property
2256 | - include: else-pop
2257 | - include: else-pop
2258 |
2259 | - match: DialogButtonBox{{identifier_break}}
2260 | scope: support.class.builtin.qml
2261 | set:
2262 | - match: '{{dot_accessor}}'
2263 | scope: punctuation.accessor.js
2264 | set:
2265 | - include: support-property-qtquick-controls-dialogbuttonbox
2266 | - include: object-property
2267 | - include: else-pop
2268 | - include: else-pop
2269 |
2270 | - match: ScrollBar{{identifier_break}}
2271 | scope: support.class.builtin.qml
2272 | set:
2273 | - match: '{{dot_accessor}}'
2274 | scope: punctuation.accessor.js
2275 | set:
2276 | - include: support-property-qtquick-controls-scrollbar
2277 | - include: object-property
2278 | - include: else-pop
2279 | - include: else-pop
2280 |
2281 | - match: Slider{{identifier_break}}
2282 | scope: support.class.builtin.qml
2283 | set:
2284 | - match: '{{dot_accessor}}'
2285 | scope: punctuation.accessor.js
2286 | set:
2287 | - include: support-property-qtquick-controls-slider
2288 | - include: object-property
2289 | - include: else-pop
2290 | - include: else-pop
2291 |
2292 | - match: StackView{{identifier_break}}
2293 | scope: support.class.builtin.qml
2294 | set:
2295 | - match: '{{dot_accessor}}'
2296 | scope: punctuation.accessor.js
2297 | set:
2298 | - include: support-property-qtquick-controls-stackview
2299 | - include: object-property
2300 | - include: else-pop
2301 | - include: else-pop
2302 |
2303 | - match: TabBar{{identifier_break}}
2304 | scope: support.class.builtin.qml
2305 | set:
2306 | - match: '{{dot_accessor}}'
2307 | scope: punctuation.accessor.js
2308 | set:
2309 | - include: support-property-qtquick-controls-tabbar
2310 | - include: object-property
2311 | - include: else-pop
2312 | - include: else-pop
2313 |
2314 | - match: ToolBar{{identifier_break}}
2315 | scope: support.class.builtin.qml
2316 | set:
2317 | - match: '{{dot_accessor}}'
2318 | scope: punctuation.accessor.js
2319 | set:
2320 | - include: support-property-qtquick-controls-toolbar
2321 | - include: object-property
2322 | - include: else-pop
2323 | - include: else-pop
2324 |
2325 | - match: TextArea{{identifier_break}}
2326 | scope: support.class.builtin.qml
2327 | set:
2328 | - match: '{{dot_accessor}}'
2329 | scope: punctuation.accessor.js
2330 | set:
2331 | # inherits TextEdit
2332 | - include: support-property-qtquick-textedit
2333 | - include: object-property
2334 | - include: else-pop
2335 | - include: else-pop
2336 |
2337 | - match: TextField{{identifier_break}}
2338 | scope: support.class.builtin.qml
2339 | set:
2340 | - match: '{{dot_accessor}}'
2341 | scope: punctuation.accessor.js
2342 | set:
2343 | # inherits TextInput
2344 | - include: support-property-qtquick-textinput
2345 | - include: object-property
2346 | - include: else-pop
2347 | - include: else-pop
2348 |
2349 | support-property-qtquick-controls-parts-buttonrole:
2350 | - match: (?:(?:Invalid|Accept|Reject|Destructive|Action|Help|Yes|No|Reset|Apply)Role|NRoles|RoleMask|AlternateRole|Stretch|Reverse|EOL){{identifier_break}}
2351 | scope: support.constant.builtin.qml
2352 | pop: true
2353 |
2354 | support-property-qtquick-controls-parts-snap-mode:
2355 | - match: (?:NoSnap|SnapAlways|SnapOnRelease){{identifier_break}}
2356 | scope: support.constant.builtin.qml
2357 | pop: true
2358 |
2359 | support-property-qtquick-controls-abstractbutton:
2360 | - match: (?:IconOnly|TextOnly|TextBesideIcon|TextUnderIcon){{identifier_break}}
2361 | scope: support.constant.builtin.qml
2362 | pop: true
2363 |
2364 | support-property-qtquick-controls-popup:
2365 | - include: support-property-qtquick-parts-transform-origin
2366 | - match: (?:NoAutoClose|CloseOn(?:PressOutside|PressOutsideParent|ReleaseOutside|ReleaseOutsideParent|Escape)){{identifier_break}}
2367 | scope: support.constant.builtin.qml
2368 | pop: true
2369 |
2370 | support-property-qtquick-controls-dial:
2371 | - include: support-property-qtquick-controls-parts-snap-mode
2372 | - match: |-
2373 | (?x:(?:
2374 | # SnapMode
2375 | NoSnap|SnapAlways|SnapOnRelease
2376 | # InputMode
2377 | |Circular|Horizontal|Vertical
2378 | )){{identifier_break}}
2379 | scope: support.constant.builtin.qml
2380 | pop: true
2381 |
2382 | support-property-qtquick-controls-dialog:
2383 | - include: support-property-qtquick-controls-popup
2384 | - include: support-property-qtquick-dialogs-standardbutton
2385 |
2386 | support-property-qtquick-controls-dialogbuttonbox:
2387 | - include: support-property-qtquick-dialogs-standardbutton
2388 | - include: support-property-qtquick-controls-parts-buttonrole
2389 | - include: support-property-qtquick-parts-position
2390 | - match: (?:UnknownLayout|WinLayout|MacLayout|KdeLayout|GnomeLayout|MacModelessLayout|AndroidLayout){{identifier_break}}
2391 | scope: support.constant.builtin.qml
2392 | pop: true
2393 |
2394 | support-property-qtquick-controls-scrollbar:
2395 | - include: support-property-qtquick-controls-parts-snap-mode
2396 | - match: (?:AsNeeded|AlwaysOff|AlwaysOn){{identifier_break}}
2397 | scope: support.constant.builtin.qml
2398 | pop: true
2399 |
2400 | support-property-qtquick-controls-slider:
2401 | - include: support-property-qtquick-controls-parts-snap-mode
2402 |
2403 | support-property-qtquick-controls-stackview:
2404 | - match: (?:Inactive|Deactivating|Activating|Active){{identifier_break}}
2405 | scope: support.constant.builtin.qml
2406 | pop: true
2407 |
2408 | support-property-qtquick-controls-tabbar:
2409 | - include: support-property-qtquick-parts-position
2410 |
2411 | support-property-qtquick-controls-toolbar:
2412 | - include: support-property-qtquick-parts-position
2413 |
2414 | support-variable-qtquick-layouts:
2415 | - match: GridLayout{{identifier_break}}
2416 | scope: support.class.builtin.qml
2417 | set:
2418 | - match: '{{dot_accessor}}'
2419 | scope: punctuation.accessor.js
2420 | set:
2421 | - include: support-property-qtquick-layouts-gridlayout
2422 | - include: object-property
2423 | - include: else-pop
2424 | - include: else-pop
2425 |
2426 | support-property-qtquick-layouts-gridlayout:
2427 | - include: support-property-qtquick-parts-grid-flow
2428 |
2429 | support-variable-qtquick-templates:
2430 | - match: (?:T|Controls|QtControls2?|QQC2?){{identifier_break}}
2431 | scope: support.class.builtin.qml
2432 | set:
2433 | - match: '{{dot_accessor}}'
2434 | scope: punctuation.accessor.js
2435 | set:
2436 | - include: support-variable-qtquick-controls
2437 | - include: object-property
2438 | - include: else-pop
2439 | - include: else-pop
2440 |
2441 | support-variable-kde:
2442 | # https://api.kde.org/frameworks/ki18n/html/classKLocalizedContext.html
2443 | - match: (?:i18n|i18nc|i18np|i18ncp|i18nd|i18ndc|i18ndp|i18ndcp|xi18n|xi18nc|xi18np|xi18ncp|xi18nd|xi18ndc|xi18ndp|xi18ndcp|translationDomain){{identifier_break}}
2444 | scope: support.function.qml
2445 | pop: true
2446 |
2447 | support-attached:
2448 | - include: support-attached-member-qtqml
2449 |
2450 | support-attached-member-qtqml:
2451 | - match: Component{{identifier_break}}
2452 | scope: support.class.builtin.qml
2453 | set:
2454 | - match: '{{dot_accessor}}'
2455 | scope: punctuation.accessor.js
2456 | set:
2457 | - include: support-attached-member-qtqml-component
2458 | - include: expect-attached-member
2459 | - include: else-pop
2460 | - include: else-pop
2461 |
2462 | support-attached-member-qtqml-component:
2463 | - match: (?=on(?:Completed|Destruction){{identifier_break}})
2464 | set: signal-handler-non-attached-support
2465 |
2466 | # END support
2467 |
2468 | # BEGIN annotations
2469 |
2470 | qml-annotation:
2471 | - match: '@'
2472 | scope: punctuation.definition.annotation.qml
2473 | push:
2474 | - qml-annotation-meta
2475 | - expect-object-standalone
2476 |
2477 | qml-annotation-meta:
2478 | - meta_include_prototype: false
2479 | - meta_scope: meta.annotation.qml
2480 | - include: immediately-pop
2481 |
2482 | # END annotations
2483 |
2484 | # BEGIN component
2485 |
2486 | inline-component-meta:
2487 | - meta_include_prototype: false
2488 | - meta_scope: meta.component.qml
2489 | - include: immediately-pop
2490 |
2491 | inline-component-expect-name:
2492 | - include: inline-component-name
2493 | - include: else-pop
2494 |
2495 | inline-component-name:
2496 | - match: '{{identifier_title}}'
2497 | scope: entity.name.class.qml
2498 | pop: true
2499 |
2500 | inline-component-expect-colon-separator:
2501 | - match: ':'
2502 | scope: punctuation.separator.type.qml
2503 | pop: true
2504 | - include: else-pop
2505 |
2506 | # END component
2507 |
2508 | # BEGIN enum
2509 |
2510 | enum-declaration:
2511 | - match: (?=enum{{identifier_break}})
2512 | set:
2513 | - enum-meta
2514 | - expect-enum-block
2515 | - expect-enum-name
2516 | - expect-enum-keyword
2517 |
2518 | enum-meta:
2519 | - meta_include_prototype: false
2520 | - meta_scope: meta.enum.qml
2521 | - include: immediately-pop
2522 |
2523 | expect-enum-block:
2524 | - match: \{
2525 | scope: punctuation.section.block.begin.qml
2526 | set:
2527 | - meta_scope: meta.block.qml meta.sequence.constants.qml
2528 | - match: \}
2529 | scope: punctuation.section.block.end.qml
2530 | pop: true
2531 | - match: ','
2532 | scope: punctuation.separator.comma.qml
2533 | - match: '='
2534 | scope: keyword.operator.assignment.qml
2535 | - match: '{{identifier_title}}'
2536 | scope: meta.constants.identifier.qml entity.name.constant.qml
2537 | - match: (?=\S)
2538 | push:
2539 | - include: literal-number
2540 | - include: else-pop
2541 | - include: else-pop
2542 |
2543 | expect-enum-name:
2544 | - match: '{{identifier_title}}'
2545 | scope: meta.enum.identifier.qml entity.name.enum.qml
2546 | pop: true
2547 | - include: else-pop
2548 |
2549 | expect-enum-keyword:
2550 | - match: enum{{identifier_break}}
2551 | scope: keyword.declaration.enum.qml
2552 | pop: true
2553 |
2554 | # END enum
2555 |
2556 | # BEGIN handlers
2557 |
2558 | signal-handler-non-attached:
2559 | - match: (?={{identifier_handler}})
2560 | set:
2561 | - signal-binding-meta
2562 | - expect-binding
2563 | - signal-handler-name
2564 |
2565 | # only set this context from verified support contexts
2566 | signal-handler-non-attached-support:
2567 | - match: (?={{identifier_handler}})
2568 | set:
2569 | - signal-binding-meta
2570 | - expect-binding
2571 | - signal-handler-name-support
2572 |
2573 | signal-binding-meta:
2574 | - meta_include_prototype: false
2575 | - meta_scope: meta.handler.qml
2576 | - include: immediately-pop
2577 |
2578 | signal-handler-name:
2579 | - match: '{{identifier_handler}}'
2580 | scope: meta.binding.name.qml variable.function.qml
2581 | captures:
2582 | 2: markup.underline.qml
2583 | pop: true
2584 |
2585 | signal-handler-name-support:
2586 | - match: '{{identifier_handler}}'
2587 | # Italic is not how many themes treat support scopes, but without it
2588 | # an underline scope would reset text style back to regular.
2589 | scope: meta.binding.name.qml support.function.qml markup.italic.qml
2590 | captures:
2591 | 2: markup.underline.qml
2592 | pop: true
2593 |
2594 | # END handlers
2595 |
--------------------------------------------------------------------------------
/Support/Symbol List.tmPreferences:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | scope
5 |
6 | entity.name.label.qml,
7 | variable.other.member.qml
8 |
9 | settings
10 |
11 | showInSymbolList
12 | 1
13 |
14 | showInIndexedSymbolList
15 | 1
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Support/qmldir.sublime-syntax:
--------------------------------------------------------------------------------
1 | %YAML 1.2
2 | ---
3 | version: 2
4 | name: QML Module (qmldir)
5 | file_extensions:
6 | - qmldir
7 | scope: source.qmldir
8 | extends: Packages/QML/Support/QML.sublime-syntax
9 |
10 | contexts:
11 | main:
12 | - include: statements-qmldir
13 |
14 | prototype:
15 | - include: comments
16 |
17 | comments:
18 | - include: line-comments
19 |
20 | line-comments:
21 | - match: '#'
22 | scope: punctuation.definition.comment.qmldir
23 | push:
24 | - meta_scope: comment.line.number-sign.qmldir
25 | - match: \n
26 | pop: 1
27 |
28 | else-pop:
29 | - match: (?=\S)
30 | pop: 1
31 |
32 | immediately-pop:
33 | - match: ''
34 | pop: 1
35 |
36 | eol-pop:
37 | - match: (?=\s*$)
38 | pop: 1
39 |
40 | statements-qmldir:
41 | - include: module
42 | - include: internal
43 | - include: optional
44 | - include: plugin
45 | - include: classname
46 | - include: typeinfo
47 | - include: depends
48 | - include: import-statement
49 | - include: designersupported
50 | - include: resource
51 | - include: prefer
52 |
53 | module:
54 | - match: module{{identifier_break}}
55 | scope: keyword.declaration.module.qmldir
56 | push:
57 | - module-meta
58 | - expect-qualified-name
59 |
60 | module-meta:
61 | - meta_include_prototype: false
62 | - meta_scope: meta.module.qmldir
63 | - include: immediately-pop
64 |
65 | expect-qualified-name:
66 | - include: qualified-name
67 | - include: eol-pop
68 |
69 | internal:
70 | - match: internal{{identifier_break}}
71 | scope: keyword.other.qmldir
72 | push:
73 | - internal-meta
74 | - expect-file
75 | - expect-type-name
76 |
77 | internal-meta:
78 | - meta_include_prototype: false
79 | - meta_scope: meta.internal.qmldir
80 | - include: immediately-pop
81 |
82 | optional:
83 | - match: optional{{identifier_break}}
84 | scope: storage.modifier.qmldir
85 | push: expect-plugin
86 |
87 | expect-plugin:
88 | - include: plugin
89 | - include: eol-pop
90 |
91 | plugin:
92 | - match: plugin{{identifier_break}}
93 | scope: keyword.other.qmldir
94 | push:
95 | - expect-file
96 | - expect-library-name
97 |
98 | expect-library-name:
99 | - include: library-name
100 | - include: eol-pop
101 |
102 | library-name:
103 | - match: '[^\s;]+'
104 | scope: meta.library-name.qmldir
105 | pop: 1
106 |
107 | classname:
108 | - match: classname{{identifier_break}}
109 | scope: keyword.other.qmldir
110 | push: expect-class
111 |
112 | expect-class:
113 | - include: class
114 | - include: eol-pop
115 |
116 | class:
117 | - match: '{{identifier}}'
118 | scope: entity.name.class.forward-decl.c++
119 | pop: 1
120 |
121 | typeinfo:
122 | - match: typeinfo{{identifier_break}}
123 | scope: keyword.other.qmldir
124 | push: expect-file
125 |
126 | expect-file:
127 | - match: (?=\S)
128 | push: file-path
129 | - include: eol-pop
130 |
131 | file-path:
132 | - meta_include_prototype: false
133 | - meta_content_scope: meta.path.url.qmldir meta.string.qmldir string.unquoted.qmldir
134 | - include: eol-pop
135 | - include: scope:text.html.basic#tag-href-attribute-value-content
136 |
137 | depends:
138 | - match: depends{{identifier_break}}
139 | scope: keyword.other.qmldir
140 | push:
141 | - depends-meta
142 | - expect-import-version
143 | - expect-qualified-name
144 |
145 | depends-meta:
146 | - meta_include_prototype: false
147 | - meta_scope: meta.depends.qmldir
148 | - include: immediately-pop
149 |
150 | import-statement:
151 | - match: import{{identifier_break}}
152 | scope: keyword.control.import.qmldir
153 | push:
154 | - import-meta
155 | - expect-import-version
156 | - expect-qualified-name
157 |
158 | designersupported:
159 | - match: designersupported{{identifier_break}}
160 | scope: keyword.other.qmldir
161 | push: eol-pop
162 |
163 | prefer:
164 | - match: prefer{{identifier_break}}
165 | scope: keyword.other.qmldir
166 | push: expect-file
167 |
168 | resource:
169 | - match: (?={{identifier_title}}|singleton{{identifier_break}})
170 | push:
171 | - expect-file
172 | - expect-import-version
173 | - expect-type-name
174 | - maybe-singleton
175 |
176 | expect-type-name:
177 | - include: type-name
178 | - include: else-pop-at-eol
179 |
180 | type-name:
181 | - match: '{{identifier_title}}'
182 | scope: entity.name.class.qml
183 | pop: 1
184 |
185 | maybe-singleton:
186 | - match: singleton{{identifier_break}}
187 | scope: storage.modifier.singleton.qmldir
188 | pop: 1
189 | - include: else-pop
190 |
--------------------------------------------------------------------------------
/logo.svg:
--------------------------------------------------------------------------------
1 |
2 |
59 |
--------------------------------------------------------------------------------
/messages.json:
--------------------------------------------------------------------------------
1 | {
2 | "1.0.0": "messages/1.0.0.txt",
3 | "1.2.0": "messages/1.2.0.txt",
4 | "1.6.0": "messages/1.6.0.txt"
5 | }
6 |
--------------------------------------------------------------------------------
/messages/1.0.0.txt:
--------------------------------------------------------------------------------
1 | QML for Sublime Text 1.0 has been released!
2 |
3 | Enjoy the complete rewrite of a syntax highlighter which is now so featureful
4 | and robust that it's fully capable of parsing even the most bizarre snippets
5 | with lesser known QML constructs. Use the built-in GoTo Definition action to
6 | locate objects by their id, property declarations and inline components!
7 |
8 | Additionally,
9 | - all built-in enum values from QtQml, QtQuick, QtQuick.Dialogs and
10 | QtQuick.Controls, such as Text.AlignHCenter or StandardButton.Cancel are
11 | highlighted with a special different color,
12 | - signal handlers (including those defined as methods in Connections) are
13 | parsed, stripped from 'on' prefix and 'Changed' suffix (if any) such that
14 | some color schemes display the middle part (the actual property/signal
15 | name) as underlined or as different color.
16 |
--------------------------------------------------------------------------------
/messages/1.2.0.txt:
--------------------------------------------------------------------------------
1 | QML for Sublime Text 1.2.0 has been released!
2 |
3 | This minor version brings some improvements to existing snippets as well as adds few new ones.
4 |
5 | At the same time, kdesrc-build plugin for Sublime Text has been released too! If you are a KDE developer, make sure to check it out at https://github.com/ratijas/kdesrc-build-sublime
6 |
--------------------------------------------------------------------------------
/messages/1.6.0.txt:
--------------------------------------------------------------------------------
1 | QML for Sublime Text 1.6.0 has been released!
2 |
3 | This minor version brings some quality-of-life improvements:
4 |
5 | - more hardcoded enum names from the standard library,
6 | - new: support for explicit enum values (numeric literals),
7 | - new: support for type casting `as` operator, which is a QML Engine's
8 | extension to JavaScript syntax.
9 | - new: support for the newer pragma syntax like this:
10 |
11 | pragma ValueTypeBehavior: Copy, Addressable
12 |
13 | - allow `void` and arbitrary gadget names for properties and function
14 | signatures.
15 | - keeping up with upstream changes to the JavaScript package.
16 |
17 | If you are a KDE developer, make sure to also check out kdesrc-build plugin
18 | for Sublime Text at https://github.com/ratijas/kdesrc-build-sublime
19 |
--------------------------------------------------------------------------------