File tree Expand file tree Collapse file tree 5 files changed +42
-17
lines changed Expand file tree Collapse file tree 5 files changed +42
-17
lines changed Original file line number Diff line number Diff line change 1
1
<snippet >
2
- <content ><![CDATA[ let ${1:name}: ${2:type} = ${0:value};]]> </content >
2
+ <content ><![CDATA[ let ${1:name}${2:: type} = ${0:value};]]> </content >
3
3
<tabTrigger >variable</tabTrigger >
4
4
<scope >source.tact</scope >
5
5
<description >let …: … = …;</description >
Original file line number Diff line number Diff line change 633
633
"details" : " <a href=\" https://docs.tact-lang.org/ref/core-debug#nativethrow\" >Tact Docs</a>"
634
634
},
635
635
{
636
- "trigger" : " nativeThrowWhen \t throw exit code under condition" ,
637
- "contents" : " nativeThrowWhen (${1:code_Int}, ${2:condition_Bool})" ,
636
+ "trigger" : " nativeThrowIf \t throw exit code under condition" ,
637
+ "contents" : " nativeThrowIf (${1:code_Int}, ${2:condition_Bool})" ,
638
638
"kind" : " function" ,
639
- "details" : " <a href=\" https://docs.tact-lang.org/ref/core-debug#nativethrowwhen \" >Tact Docs</a>"
639
+ "details" : " <a href=\" https://docs.tact-lang.org/ref/core-debug#nativethrowif \" >Tact Docs</a>"
640
640
},
641
641
{
642
642
"trigger" : " nativeThrowUnless\t throw exit code unless condition" ,
Original file line number Diff line number Diff line change 725
725
<key >comment </key >
726
726
<string >Control flow keywords, prefixed by more than one dot </string >
727
727
<key >match </key >
728
- <string >(?< =\.\.)\b(else|catch|until|in)\b </string >
728
+ <string >(?< =\.\.)\b(else|catch|until|in(?!\s*\() )\b </string >
729
729
<key >name </key >
730
730
<string >keyword.control.tact </string >
731
731
</dict >
732
732
<dict >
733
733
<key >comment </key >
734
734
<string >Control flow keywords </string >
735
735
<key >match </key >
736
- <string >(?< !\.)\b(if|else|try|catch|repeat|do|until|while|foreach|in|return)\b </string >
736
+ <string >(?< !\.)\b(if|else|try|catch|repeat|do|until|while|foreach|in(?!\s*\() |return)\b </string >
737
737
<key >name </key >
738
738
<string >keyword.control.tact </string >
739
739
</dict >
849
849
</dict >
850
850
<key >variable </key >
851
851
<dict >
852
- <key >comment </key >
853
- <string >Any valid Tact identifier </string >
854
- <key >match </key >
855
- <string >\b([a-zA-Z_][a-zA-Z0-9_]*)\b </string >
856
- <key >name </key >
857
- <string >variable.other.tact </string >
852
+ <key >patterns </key >
853
+ <array >
854
+ <dict >
855
+ <key >comment </key >
856
+ <string >Any valid Tact identifier </string >
857
+ <key >match </key >
858
+ <string >(?< !\.)\b(_)\b </string >
859
+ <key >name </key >
860
+ <string >comment.unused-identifier.tact </string >
861
+ </dict >
862
+ <dict >
863
+ <key >comment </key >
864
+ <string >Any valid Tact identifier </string >
865
+ <key >match </key >
866
+ <string >\b([a-zA-Z_][a-zA-Z0-9_]*)\b </string >
867
+ <key >name </key >
868
+ <string >variable.other.tact </string >
869
+ </dict >
870
+ </array >
858
871
</dict >
859
872
</dict >
860
873
</dict >
Original file line number Diff line number Diff line change 475
475
},
476
476
{
477
477
"comment" : " Control flow keywords, prefixed by more than one dot" ,
478
- "match" : " (?<=\\ .\\ .)\\ b(else|catch|until|in)\\ b" ,
478
+ "match" : " (?<=\\ .\\ .)\\ b(else|catch|until|in(?! \\ s* \\ () )\\ b" ,
479
479
"name" : " keyword.control.tact"
480
480
},
481
481
{
482
482
"comment" : " Control flow keywords" ,
483
- "match" : " (?<!\\ .)\\ b(if|else|try|catch|repeat|do|until|while|foreach|in|return)\\ b" ,
483
+ "match" : " (?<!\\ .)\\ b(if|else|try|catch|repeat|do|until|while|foreach|in(?! \\ s* \\ () |return)\\ b" ,
484
484
"name" : " keyword.control.tact"
485
485
},
486
486
{
556
556
},
557
557
558
558
"variable" : {
559
- "comment" : " Any valid Tact identifier" ,
560
- "match" : " \\ b([a-zA-Z_][a-zA-Z0-9_]*)\\ b" ,
561
- "name" : " variable.other.tact"
559
+ "patterns" : [
560
+ {
561
+ "comment" : " Any valid Tact identifier" ,
562
+ "match" : " (?<!\\ .)\\ b(_)\\ b" ,
563
+ "name" : " comment.unused-identifier.tact"
564
+ },
565
+ {
566
+ "comment" : " Any valid Tact identifier" ,
567
+ "match" : " \\ b([a-zA-Z_][a-zA-Z0-9_]*)\\ b" ,
568
+ "name" : " variable.other.tact"
569
+ }
570
+ ]
562
571
}
563
572
}
564
573
}
Original file line number Diff line number Diff line change @@ -52,6 +52,9 @@ extends fun c(self: SomeMessage): Int {
52
52
// ^^ keyword.operator.assignment.tact
53
53
// ^^ constant.numeric.decimal.tact
54
54
// ^ punctuation.semi.tact
55
+
56
+ let _ = 20 ;
57
+ // ^ comment.unused-identifier.tact
55
58
}
56
59
57
60
self .description = " Tact is awesome!" ;
You can’t perform that action at this time.
0 commit comments