Skip to content

Commit f4fca39

Browse files
authored
feat: support Tact 1.6.7 (#46)
1 parent 9a4c0a4 commit f4fca39

File tree

5 files changed

+90
-4
lines changed

5 files changed

+90
-4
lines changed

package/Tact.sublime-completions

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -703,6 +703,12 @@
703703
"kind": "function",
704704
"details": "<a href=\"https://docs.tact-lang.org/ref/core-contextstate#sender\">Tact Docs</a>"
705705
},
706+
{
707+
"trigger": "inMsg\tSlice body of the received message",
708+
"contents": "inMsg()",
709+
"kind": "function",
710+
"details": "<a href=\"https://docs.tact-lang.org/ref/core-contextstate#inmsg\">Tact Docs</a>"
711+
},
706712
{
707713
"trigger": "context\treturns Context Struct",
708714
"contents": "context()",

package/Tact.tmLanguage

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -541,9 +541,9 @@
541541
</dict>
542542
<dict>
543543
<key>comment</key>
544-
<string>map&lt;K, V&gt;</string>
544+
<string>map&lt;K, V&gt; or set&lt;T&gt;</string>
545545
<key>begin</key>
546-
<string>(?&lt;!\.)\b(map)\s*(&lt;)</string>
546+
<string>(?&lt;!\.)\b(map|set)\s*(&lt;)</string>
547547
<key>beginCaptures</key>
548548
<dict>
549549
<key>1</key>

package/Tact.tmLanguage.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,8 +352,8 @@
352352
}
353353
},
354354
{
355-
"comment": "map<K, V>",
356-
"begin": "(?<!\\.)\\b(map)\\s*(<)",
355+
"comment": "map<K, V> or set<T>",
356+
"begin": "(?<!\\.)\\b(map|set)\\s*(<)",
357357
"beginCaptures": {
358358
"1": {
359359
"name": "entity.name.type.tact"

tests/syntax_test_contract.tact

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,18 @@ contract Filled {
1414
// ^ punctuation.brackets.curly.tact
1515
// ^ punctuation.brackets.curly.tact
1616

17+
init(f1: Int as uint8,) {}
18+
// <- keyword.other.function.tact
19+
// ^ punctuation.brackets.round.tact
20+
// ^^ variable.other.tact
21+
// ^ punctuation.colon.tact
22+
// ^^^ entity.name.type.tact
23+
// ^^ keyword.other.as.tact storage.modifier.tact
24+
// ^^^^^ entity.name.type.tact
25+
// ^ punctuation.comma.tact
26+
// ^ punctuation.brackets.round.tact
27+
// ^^ punctuation.brackets.curly.tact
28+
1729
receive() {}
1830
// <- keyword.other.function.tact
1931

tests/syntax_test_primary_expression.tact

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// SYNTAX TEST "Packages/Tact/package/Tact.tmLanguage"
2+
// fmt-ignore
23

34
struct Basic {
45
prop: Int;
@@ -58,6 +59,73 @@ extends fun c(self: Int, ) {
5859
// ^ punctuation.brackets.round.tact
5960
// ^ punctuation.semi.tact
6061

62+
// map
63+
map<> {};
64+
// <- entity.name.type.tact
65+
// ^^ punctuation.brackets.angle.tact
66+
// ^^ punctuation.brackets.curly.tact
67+
// ^ punctuation.semi.tact
68+
map<Int, Int,> {};
69+
// ^^^ entity.name.type.tact
70+
// ^ punctuation.comma.tact
71+
// ^^^ entity.name.type.tact
72+
// ^ punctuation.comma.tact
73+
// ^ punctuation.brackets.angle.tact
74+
map<Address, Int as uint8> {
75+
// ^^^ entity.name.type.tact
76+
// ^^ keyword.other.as.tact storage.modifier.tact
77+
// ^^^^^ entity.name.type.tact
78+
// ^ punctuation.brackets.angle.tact
79+
address("yo"): 15,
80+
// <- entity.name.function.tact
81+
// ^ punctuation.brackets.round.tact
82+
// ^ string.quoted.double.tact punctuation.definition.string.begin.tact
83+
// ^^ string.quoted.double.tact
84+
// ^ string.quoted.double.tact punctuation.definition.string.end.tact
85+
// ^ punctuation.brackets.round.tact
86+
// ^ punctuation.colon.tact
87+
// ^^ constant.numeric.decimal.tact
88+
// ^ punctuation.comma.tact
89+
address("yo2"): 16,
90+
// <- entity.name.function.tact
91+
// ^^^^^ string.quoted.double.tact
92+
};
93+
// ^ punctuation.brackets.curly.tact
94+
// ^ punctuation.semi.tact
95+
96+
// set
97+
set<> {};
98+
// <- entity.name.type.tact
99+
// ^^ punctuation.brackets.angle.tact
100+
// ^^ punctuation.brackets.curly.tact
101+
// ^ punctuation.semi.tact
102+
set<Int,> {
103+
// ^ punctuation.brackets.angle.tact
104+
// ^^^ entity.name.type.tact
105+
// ^ punctuation.comma.tact
106+
// ^ punctuation.brackets.angle.tact
107+
// ^ punctuation.brackets.curly.tact
108+
10,
109+
// <- constant.numeric.decimal.tact
110+
//^ punctuation.comma.tact
111+
20,
112+
// <- constant.numeric.decimal.tact
113+
//^ punctuation.comma.tact
114+
100,
115+
// <- constant.numeric.decimal.tact
116+
// ^ punctuation.comma.tact
117+
ascii("tact"),
118+
// <- entity.name.function.tact
119+
// ^ punctuation.brackets.round.tact
120+
// ^ string.quoted.double.tact punctuation.definition.string.begin.tact
121+
// ^^^^ string.quoted.double.tact
122+
// ^ string.quoted.double.tact punctuation.definition.string.end.tact
123+
// ^ punctuation.brackets.round.tact
124+
// ^ punctuation.comma.tact
125+
};
126+
// ^ punctuation.brackets.curly.tact
127+
// ^ punctuation.semi.tact
128+
61129
// parens_expression
62130
( 10 );
63131
// <- punctuation.brackets.round.tact

0 commit comments

Comments
 (0)