Skip to content

Commit 350941a

Browse files
committed
Fix for function return type
1 parent 3d11684 commit 350941a

6 files changed

+161
-84
lines changed

syntaxes/cfml.sublime-syntax

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ scope: embedding.cfml
1010

1111
variables:
1212
attribute_name: '[_[:alpha:]][[:alnum:]_\-:]*'
13+
1314
contexts:
1415
else-pop:
1516
- match: (?=\S)
@@ -73,7 +74,8 @@ contexts:
7374
- match: (?i:\b(?:extends)\b)
7475
scope: entity.other.attribute-name.cfml storage.modifier.extends.cfml
7576
push:
76-
- - meta_scope: meta.class.inheritance.cfml
77+
- - meta_include_prototype: false
78+
- meta_scope: meta.class.inheritance.cfml
7779
- include: immediately-pop
7880
- - match: '='
7981
scope: punctuation.separator.key-value.cfml

syntaxes/cfscript-in-tags.sublime-syntax

+72-40
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,8 @@ contexts:
168168
- match: \bswitch\b
169169
scope: keyword.control.switch.cfml
170170
push:
171-
- - meta_scope: meta.switch.cfml
171+
- - meta_include_prototype: false
172+
- meta_scope: meta.switch.cfml
172173
- include: immediately-pop
173174
- - match: \{
174175
scope: punctuation.section.block.begin.cfml
@@ -193,7 +194,8 @@ contexts:
193194
- match: \bdo\b
194195
scope: keyword.control.loop.cfml
195196
push:
196-
- - meta_scope: meta.do-while.cfml
197+
- - meta_include_prototype: false
198+
- meta_scope: meta.do-while.cfml
197199
- include: immediately-pop
198200
- - include: parens-scope
199201
- include: else-pop
@@ -206,46 +208,53 @@ contexts:
206208
- match: \b(?:for)\b
207209
scope: keyword.control.loop.cfml
208210
push:
209-
- - meta_scope: meta.for.cfml
211+
- - meta_include_prototype: false
212+
- meta_scope: meta.for.cfml
210213
- include: immediately-pop
211214
- block-scope
212215
- parens-scope
213216
- match: \b(?:while)\b
214217
scope: keyword.control.loop.cfml
215218
push:
216-
- - meta_scope: meta.while.cfml
219+
- - meta_include_prototype: false
220+
- meta_scope: meta.while.cfml
217221
- include: immediately-pop
218222
- block-scope
219223
- parens-scope
220224
- match: \b(?:else\s+if|if)\b
221225
scope: keyword.control.conditional.cfml
222226
push:
223-
- - meta_scope: meta.conditional.cfml
227+
- - meta_include_prototype: false
228+
- meta_scope: meta.conditional.cfml
224229
- include: immediately-pop
225230
- block-scope
226231
- parens-scope
227232
- match: \b(?:else)\b
228233
scope: keyword.control.conditional.cfml
229234
push:
230-
- - meta_scope: meta.conditional.cfml
235+
- - meta_include_prototype: false
236+
- meta_scope: meta.conditional.cfml
231237
- include: immediately-pop
232238
- block-scope
233239
- match: \b(?:try)\b
234240
scope: keyword.control.trycatch.cfml
235241
push:
236-
- - meta_scope: meta.try.cfml
242+
- - meta_include_prototype: false
243+
- meta_scope: meta.try.cfml
237244
- include: immediately-pop
238245
- block-scope
239246
- match: \b(?:finally)\b
240247
scope: keyword.control.trycatch.cfml
241248
push:
242-
- - meta_scope: meta.finally.cfml
249+
- - meta_include_prototype: false
250+
- meta_scope: meta.finally.cfml
243251
- include: immediately-pop
244252
- block-scope
245253
- match: \b(?:catch)\b
246254
scope: keyword.control.trycatch.cfml
247255
push:
248-
- - meta_scope: meta.catch.cfml
256+
- - meta_include_prototype: false
257+
- meta_scope: meta.catch.cfml
249258
- include: immediately-pop
250259
- block-scope
251260
- catch-scope
@@ -325,7 +334,8 @@ contexts:
325334
- match: \bstatic\b(?=\s*[\n\{])
326335
scope: keyword.control.static.cfml
327336
push:
328-
- - meta_scope: meta.block.static.cfml
337+
- - meta_include_prototype: false
338+
- meta_scope: meta.block.static.cfml
329339
- include: immediately-pop
330340
- - include: block-scope
331341

@@ -496,7 +506,8 @@ contexts:
496506
- match: \bnew\b
497507
scope: keyword.operator.word.new.cfml
498508
set:
499-
- - meta_scope: meta.instance.constructor.cfml
509+
- - meta_include_prototype: false
510+
- meta_scope: meta.instance.constructor.cfml
500511
- include: immediately-pop
501512
- - match: \(
502513
scope: punctuation.section.group.begin.cfml
@@ -689,7 +700,8 @@ contexts:
689700
anonymous-function:
690701
- match: (?={{func_assignment_lookahead}}|{{arrow_func_lookahead}})
691702
set:
692-
- - meta_scope: meta.function.anonymous.cfml
703+
- - meta_include_prototype: false
704+
- meta_scope: meta.function.anonymous.cfml
693705
- include: immediately-pop
694706
- - include: either-function-declaration
695707

@@ -704,7 +716,8 @@ contexts:
704716
set:
705717
- - include: function-block
706718
- include: else-pop
707-
- - meta_scope: meta.function.declaration.cfml
719+
- - meta_include_prototype: false
720+
- meta_scope: meta.function.declaration.cfml
708721
- include: immediately-pop
709722
- - match: (?=[;{])
710723
pop: true
@@ -729,7 +742,7 @@ contexts:
729742
pop: true
730743
- match: (?i){{storage_modifier}}
731744
scope: storage.modifier.cfml
732-
- match: (?=[A-Za-z])
745+
- match: (?=[_$[:alpha:]])
733746
push: storage-types
734747

735748
arrow-function-declaration:
@@ -738,13 +751,15 @@ contexts:
738751
- - include: function-block
739752
- match: (?=\S)
740753
set:
741-
- - meta_scope: meta.function.body.cfml
754+
- - meta_include_prototype: false
755+
- meta_scope: meta.function.body.cfml
742756
- include: immediately-pop
743757
- - match: (?=,)
744758
pop: true
745759
- include: expression-statement-end
746760
- expression-begin
747-
- - meta_scope: meta.function.declaration.cfml
761+
- - meta_include_prototype: false
762+
- meta_scope: meta.function.declaration.cfml
748763
- include: immediately-pop
749764
- - match: =>
750765
scope: storage.type.function.arrow.cfml
@@ -798,7 +813,8 @@ contexts:
798813
- - match: '='
799814
scope: keyword.operator.assignment.binary.cfml
800815
set:
801-
- - meta_scope: meta.parameter.optional.cfml
816+
- - meta_include_prototype: false
817+
- meta_scope: meta.parameter.optional.cfml
802818
- include: immediately-pop
803819
- expression-no-comma
804820
- include: else-pop
@@ -840,17 +856,20 @@ contexts:
840856
push:
841857
- - include: either-function-declaration
842858
- include: else-pop
843-
- - meta_scope: meta.function.declaration.cfml
859+
- - meta_include_prototype: false
860+
- meta_scope: meta.function.declaration.cfml
844861
- include: immediately-pop
845862
- - match: '[:=]'
846863
scope: punctuation.separator.key-value.cfml
847864
- include: else-pop
848-
- - meta_scope: meta.struct-literal.key.cfml
865+
- - meta_include_prototype: false
866+
- meta_scope: meta.struct-literal.key.cfml
849867
- include: immediately-pop
850868
- method-name
851869
- match: (?="|')
852870
push:
853-
- - meta_scope: meta.struct-literal.key.cfml
871+
- - meta_include_prototype: false
872+
- meta_scope: meta.struct-literal.key.cfml
854873
- include: immediately-pop
855874
- string
856875
- match: '[_$[:alnum:]]+(?=\s*[:=])'
@@ -887,7 +906,8 @@ contexts:
887906
array-literal:
888907
- match: (?=\[)
889908
set:
890-
- - meta_scope: meta.sequence.cfml
909+
- - meta_include_prototype: false
910+
- meta_scope: meta.sequence.cfml
891911
- include: immediately-pop
892912
- - match: \[
893913
scope: punctuation.section.brackets.begin.cfml
@@ -923,23 +943,23 @@ contexts:
923943
pop: true
924944
- include: expression-push
925945
- - match: "'"
926-
scope: punctuation.definition.string.begin.cfml
927946
set:
928947
- - meta_scope: meta.string.quoted.single.cfml string.quoted.single.cfml
929-
- pop: true
930-
match: "'"
948+
- match: "'"
949+
pop: true
931950
scope: punctuation.definition.string.end.cfml
932951
- - include: storage-types
933952
- include: else-pop
934-
- match: '"'
935953
scope: punctuation.definition.string.begin.cfml
954+
- match: '"'
936955
set:
937956
- - meta_scope: meta.string.quoted.double.cfml string.quoted.double.cfml
938-
- pop: true
939-
match: '"'
957+
- match: '"'
958+
pop: true
940959
scope: punctuation.definition.string.end.cfml
941960
- - include: storage-types
942961
- include: else-pop
962+
scope: punctuation.definition.string.begin.cfml
943963
- include: else-pop
944964

945965
property-access:
@@ -1006,7 +1026,8 @@ contexts:
10061026
- match: ({{identifier}})(?=\s*\()
10071027
scope: variable.function.cfml
10081028
set:
1009-
- - meta_scope: meta.function-call.cfml
1029+
- - meta_include_prototype: false
1030+
- meta_scope: meta.function-call.cfml
10101031
- include: immediately-pop
10111032
- - match: \(
10121033
scope: punctuation.section.group.begin.cfml
@@ -1060,7 +1081,8 @@ contexts:
10601081
captures:
10611082
1: variable.function.cfml
10621083
set:
1063-
- - meta_scope: meta.function-call.method.cfml
1084+
- - meta_include_prototype: false
1085+
- meta_scope: meta.function-call.method.cfml
10641086
- include: immediately-pop
10651087
- - match: \(
10661088
scope: punctuation.section.group.begin.cfml
@@ -1085,7 +1107,8 @@ contexts:
10851107
captures:
10861108
1: variable.function.static.cfml
10871109
set:
1088-
- - meta_scope: meta.function-call.method.static.cfml
1110+
- - meta_include_prototype: false
1111+
- meta_scope: meta.function-call.method.static.cfml
10891112
- include: immediately-pop
10901113
- - match: \(
10911114
scope: punctuation.section.group.begin.cfml
@@ -1138,6 +1161,7 @@ contexts:
11381161
- match: '{{identifier}}'
11391162
scope: variable.other.readwrite.cfml
11401163
pop: true
1164+
11411165
struct-property:
11421166
- match: '{{constant_identifier}}'
11431167
scope: meta.property.constant.cfml
@@ -1187,7 +1211,8 @@ contexts:
11871211
- match: '='
11881212
scope: keyword.operator.assignment.binary.cfml
11891213
set:
1190-
- - meta_scope: source.cfml.script
1214+
- - meta_include_prototype: false
1215+
- meta_scope: source.cfml.script
11911216
- include: immediately-pop
11921217
- expression
11931218
- include: else-pop
@@ -1197,7 +1222,8 @@ contexts:
11971222
- match: '='
11981223
scope: keyword.operator.assignment.binary.cfml
11991224
set:
1200-
- - meta_scope: source.cfml.script
1225+
- - meta_include_prototype: false
1226+
- meta_scope: source.cfml.script
12011227
- include: immediately-pop
12021228
- expression
12031229
- include: else-pop
@@ -1276,7 +1302,8 @@ contexts:
12761302
|update|wddx|websocket|window|xml|zip|zipparam)(?=\()
12771303
scope: entity.name.tag.script.cfml
12781304
push:
1279-
- - meta_scope: meta.tag.script.cf.cfml
1305+
- - meta_include_prototype: false
1306+
- meta_scope: meta.tag.script.cf.cfml
12801307
- include: immediately-pop
12811308
- - match: \(
12821309
scope: punctuation.section.group.begin.cfml
@@ -1306,28 +1333,32 @@ contexts:
13061333
captures:
13071334
1: support.function.cfml
13081335
set:
1309-
- - meta_scope: meta.function-call.support.cfml meta.function-call.support.createcomponent.cfml
1336+
- - meta_include_prototype: false
1337+
- meta_scope: meta.function-call.support.cfml meta.function-call.support.createcomponent.cfml
13101338
- include: immediately-pop
13111339
- support-call-params
13121340
- match: (?i)\b(createobject)(?=\((?:\s*type\s*=)?\s*[\"']java[\"']\s*,)
13131341
captures:
13141342
1: support.function.cfml
13151343
set:
1316-
- - meta_scope: meta.function-call.support.cfml meta.function-call.support.createjavaobject.cfml
1344+
- - meta_include_prototype: false
1345+
- meta_scope: meta.function-call.support.cfml meta.function-call.support.createjavaobject.cfml
13171346
- include: immediately-pop
13181347
- support-call-params
13191348
- match: (?i)\b(entity(?:load|loadbypk|new))(?=\()
13201349
captures:
13211350
1: support.function.cfml
13221351
set:
1323-
- - meta_scope: meta.function-call.support.cfml meta.function-call.support.entity.cfml
1352+
- - meta_include_prototype: false
1353+
- meta_scope: meta.function-call.support.cfml meta.function-call.support.entity.cfml
13241354
- include: immediately-pop
13251355
- support-call-params
13261356
- match: (?i)\b(arraynew)(?=\[)
13271357
captures:
13281358
1: support.function.cfml
13291359
set:
1330-
- - meta_scope: meta.function-call.support.cfml
1360+
- - meta_include_prototype: false
1361+
- meta_scope: meta.function-call.support.cfml
13311362
- include: immediately-pop
13321363
- support-call-params
13331364
- array-types
@@ -1433,7 +1464,8 @@ contexts:
14331464
captures:
14341465
1: support.function.cfml
14351466
set:
1436-
- - meta_scope: meta.function-call.support.cfml
1467+
- - meta_include_prototype: false
1468+
- meta_scope: meta.function-call.support.cfml
14371469
- include: immediately-pop
14381470
- support-call-params
14391471
@@ -1489,7 +1521,8 @@ contexts:
14891521
|year|yesnoformat)(?=\()
14901522
scope: support.function.member.cfml
14911523
set:
1492-
- - meta_scope: meta.function-call.method.support.cfml
1524+
- - meta_include_prototype: false
1525+
- meta_scope: meta.function-call.method.support.cfml
14931526
- include: immediately-pop
14941527
- - match: \(
14951528
scope: punctuation.section.group.begin.cfml
@@ -1512,4 +1545,3 @@ contexts:
15121545
angle-bracket-pop:
15131546
- match: (?=/?>)
15141547
pop: true
1515-

0 commit comments

Comments
 (0)