File tree Expand file tree Collapse file tree 5 files changed +585
-62
lines changed Expand file tree Collapse file tree 5 files changed +585
-62
lines changed Original file line number Diff line number Diff line change @@ -965,18 +965,24 @@ repository:
965
965
- include : ' #statements'
966
966
967
967
for-loop :
968
- begin : ' {{startOfIdentifier}}( for)(?: \s+(await)) ?\s*(\( )'
968
+ begin : ' {{startOfIdentifier}}for(?=(( \s+|(\s*{{inlineComment}}\s*))await) ?\s*({{inlineComment}}\s*)?(\() )'
969
969
beginCaptures :
970
- ' 1 ' : { name: keyword.control.loop.ts }
971
- ' 2 ' : { name: keyword.control.loop.ts }
972
- ' 3 ' : { name: meta.brace.round.ts }
973
- end : \)
974
- endCaptures :
975
- ' 0 ' : { name: meta.brace.round.ts }
970
+ ' 0 ' : { name: keyword.control.loop.ts }
971
+ end : (?<=\))
976
972
patterns :
977
- - include : ' #var-expr'
978
- - include : ' #expression'
979
- - include : ' #punctuation-semicolon'
973
+ - include : ' #comment'
974
+ - name : keyword.control.loop.ts
975
+ match : await
976
+ - begin : \(
977
+ beginCaptures :
978
+ ' 0 ' : { name: meta.brace.round.ts }
979
+ end : \)
980
+ endCaptures :
981
+ ' 0 ' : { name: meta.brace.round.ts }
982
+ patterns :
983
+ - include : ' #var-expr'
984
+ - include : ' #expression'
985
+ - include : ' #punctuation-semicolon'
980
986
981
987
# blocks
982
988
decl-block :
Original file line number Diff line number Diff line change 3015
3015
<key >for-loop </key >
3016
3016
<dict >
3017
3017
<key >begin </key >
3018
- <string >(?< ![_$[:alnum:]])(?:(?< =\.\.\.)|(?< !\.))( for)(?: \s+(await)) ?\s*(\( ) </string >
3018
+ <string >(?< ![_$[:alnum:]])(?:(?< =\.\.\.)|(?< !\.))for(?=(( \s+|(\s*\/\*([^\*]|(\*[^\/]))*\*\/\s*))await) ?\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)?(\() ) </string >
3019
3019
<key >beginCaptures </key >
3020
3020
<dict >
3021
- <key >1 </key >
3022
- <dict >
3023
- <key >name </key >
3024
- <string >keyword.control.loop.ts </string >
3025
- </dict >
3026
- <key >2 </key >
3021
+ <key >0 </key >
3027
3022
<dict >
3028
3023
<key >name </key >
3029
3024
<string >keyword.control.loop.ts </string >
3030
3025
</dict >
3031
- <key >3 </key >
3032
- <dict >
3033
- <key >name </key >
3034
- <string >meta.brace.round.ts </string >
3035
- </dict >
3036
3026
</dict >
3037
3027
<key >end </key >
3038
- <string >\) </string >
3039
- <key >endCaptures </key >
3040
- <dict >
3041
- <key >0 </key >
3042
- <dict >
3043
- <key >name </key >
3044
- <string >meta.brace.round.ts </string >
3045
- </dict >
3046
- </dict >
3028
+ <string >(?< =\)) </string >
3047
3029
<key >patterns </key >
3048
3030
<array >
3049
3031
<dict >
3050
3032
<key >include </key >
3051
- <string >#var-expr </string >
3033
+ <string >#comment </string >
3052
3034
</dict >
3053
3035
<dict >
3054
- <key >include </key >
3055
- <string >#expression </string >
3036
+ <key >name </key >
3037
+ <string >keyword.control.loop.ts </string >
3038
+ <key >match </key >
3039
+ <string >await </string >
3056
3040
</dict >
3057
3041
<dict >
3058
- <key >include </key >
3059
- <string >#punctuation-semicolon </string >
3042
+ <key >begin </key >
3043
+ <string >\( </string >
3044
+ <key >beginCaptures </key >
3045
+ <dict >
3046
+ <key >0 </key >
3047
+ <dict >
3048
+ <key >name </key >
3049
+ <string >meta.brace.round.ts </string >
3050
+ </dict >
3051
+ </dict >
3052
+ <key >end </key >
3053
+ <string >\) </string >
3054
+ <key >endCaptures </key >
3055
+ <dict >
3056
+ <key >0 </key >
3057
+ <dict >
3058
+ <key >name </key >
3059
+ <string >meta.brace.round.ts </string >
3060
+ </dict >
3061
+ </dict >
3062
+ <key >patterns </key >
3063
+ <array >
3064
+ <dict >
3065
+ <key >include </key >
3066
+ <string >#var-expr </string >
3067
+ </dict >
3068
+ <dict >
3069
+ <key >include </key >
3070
+ <string >#expression </string >
3071
+ </dict >
3072
+ <dict >
3073
+ <key >include </key >
3074
+ <string >#punctuation-semicolon </string >
3075
+ </dict >
3076
+ </array >
3060
3077
</dict >
3061
3078
</array >
3062
3079
</dict >
Original file line number Diff line number Diff line change 3019
3019
<key >for-loop </key >
3020
3020
<dict >
3021
3021
<key >begin </key >
3022
- <string >(?< ![_$[:alnum:]])(?:(?< =\.\.\.)|(?< !\.))( for)(?: \s+(await)) ?\s*(\( ) </string >
3022
+ <string >(?< ![_$[:alnum:]])(?:(?< =\.\.\.)|(?< !\.))for(?=(( \s+|(\s*\/\*([^\*]|(\*[^\/]))*\*\/\s*))await) ?\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)?(\() ) </string >
3023
3023
<key >beginCaptures </key >
3024
3024
<dict >
3025
- <key >1 </key >
3026
- <dict >
3027
- <key >name </key >
3028
- <string >keyword.control.loop.tsx </string >
3029
- </dict >
3030
- <key >2 </key >
3025
+ <key >0 </key >
3031
3026
<dict >
3032
3027
<key >name </key >
3033
3028
<string >keyword.control.loop.tsx </string >
3034
3029
</dict >
3035
- <key >3 </key >
3036
- <dict >
3037
- <key >name </key >
3038
- <string >meta.brace.round.tsx </string >
3039
- </dict >
3040
3030
</dict >
3041
3031
<key >end </key >
3042
- <string >\) </string >
3043
- <key >endCaptures </key >
3044
- <dict >
3045
- <key >0 </key >
3046
- <dict >
3047
- <key >name </key >
3048
- <string >meta.brace.round.tsx </string >
3049
- </dict >
3050
- </dict >
3032
+ <string >(?< =\)) </string >
3051
3033
<key >patterns </key >
3052
3034
<array >
3053
3035
<dict >
3054
3036
<key >include </key >
3055
- <string >#var-expr </string >
3037
+ <string >#comment </string >
3056
3038
</dict >
3057
3039
<dict >
3058
- <key >include </key >
3059
- <string >#expression </string >
3040
+ <key >name </key >
3041
+ <string >keyword.control.loop.tsx </string >
3042
+ <key >match </key >
3043
+ <string >await </string >
3060
3044
</dict >
3061
3045
<dict >
3062
- <key >include </key >
3063
- <string >#punctuation-semicolon </string >
3046
+ <key >begin </key >
3047
+ <string >\( </string >
3048
+ <key >beginCaptures </key >
3049
+ <dict >
3050
+ <key >0 </key >
3051
+ <dict >
3052
+ <key >name </key >
3053
+ <string >meta.brace.round.tsx </string >
3054
+ </dict >
3055
+ </dict >
3056
+ <key >end </key >
3057
+ <string >\) </string >
3058
+ <key >endCaptures </key >
3059
+ <dict >
3060
+ <key >0 </key >
3061
+ <dict >
3062
+ <key >name </key >
3063
+ <string >meta.brace.round.tsx </string >
3064
+ </dict >
3065
+ </dict >
3066
+ <key >patterns </key >
3067
+ <array >
3068
+ <dict >
3069
+ <key >include </key >
3070
+ <string >#var-expr </string >
3071
+ </dict >
3072
+ <dict >
3073
+ <key >include </key >
3074
+ <string >#expression </string >
3075
+ </dict >
3076
+ <dict >
3077
+ <key >include </key >
3078
+ <string >#punctuation-semicolon </string >
3079
+ </dict >
3080
+ </array >
3064
3081
</dict >
3065
3082
</array >
3066
3083
</dict >
You can’t perform that action at this time.
0 commit comments