Skip to content

Commit

Permalink
release: v1.4.1 (#21)
Browse files Browse the repository at this point in the history
* feat: new doc page links in completions

* fix: relax requirements on FunC identifiers to `(.*?)`

The regex to approximate actual FunC naming options is gigantic and too
unwieldy to be put here. That's especially true considering that this
will only be used for highlighting and only in a very contained native
function name mapping scenarios.

The similar "include everything" approach was taken previously in
tact.vim:
https://github.com/tact-lang/tact.vim/blob/ddee48224ac89f4aa93f49d4544193ecd6b6948b/syntax/tact.vim#L77-L83
  • Loading branch information
novusnota authored Jul 28, 2024
1 parent a028cf9 commit 440f907
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
21 changes: 14 additions & 7 deletions package/Tact.sublime-completions
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
{
"trigger": "interface\t@interface(\"...\")",
"contents": "interface(\"$1\")",
"kind": ["function", "a", "Attribute"]
"kind": ["function", "a", "Attribute"],
"details": "<a href=\"https://docs.tact-lang.org/book/contracts#interfaces\">Tact Docs</a>"
},

// Literals, Base trait and constants
Expand Down Expand Up @@ -304,17 +305,20 @@
{
"trigger": "bytes32\tfor Slices",
"contents": "bytes32",
"kind": "type"
"kind": "type",
"details": "<a href=\"https://docs.tact-lang.org/book/cells#serialization-bytes32\">Tact Docs</a>"
},
{
"trigger": "bytes64\tfor Slices",
"contents": "bytes64",
"kind": "type"
"kind": "type",
"details": "<a href=\"https://docs.tact-lang.org/book/cells#serialization-bytes64\">Tact Docs</a>"
},
{
"trigger": "remaining\tfor Cells, Builders and Slices",
"contents": "remaining",
"kind": "type"
"kind": "type",
"details": "<a href=\"https://docs.tact-lang.org/book/cells#serialization-remaining\">Tact Docs</a>"
},

// Keywords
Expand Down Expand Up @@ -446,17 +450,20 @@
{
"trigger": "abstract\tconstant or function to be defined",
"contents": "abstract $0",
"kind": "keyword"
"kind": "keyword",
"details": "<a href=\"https://docs.tact-lang.org/book/contracts#traits\">Tact Docs</a>"
},
{
"trigger": "virtual\tconstant or function allowing overrides",
"contents": "virtual $0",
"kind": "keyword"
"kind": "keyword",
"details": "<a href=\"https://docs.tact-lang.org/book/contracts#traits\">Tact Docs</a>"
},
{
"trigger": "override\tconstant or function to be overridden",
"contents": "override $0",
"kind": "keyword"
"kind": "keyword",
"details": "<a href=\"https://docs.tact-lang.org/book/contracts#traits\">Tact Docs</a>"
},
{
"trigger": "extends\textension function",
Expand Down
2 changes: 1 addition & 1 deletion package/Tact.tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
<key>comment</key>
<string>FunC identifier</string>
<key>match</key>
<string>((?:[a-zA-Z_\'\?!&amp;]|::)(?:[a-zA-Z0-9_\'\?!&amp;]|::)*)</string>
<string>(.*?)</string>
<key>name</key>
<string>entity.name.function.func.tact</string>
</dict>
Expand Down
2 changes: 1 addition & 1 deletion package/Tact.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
"patterns": [
{
"comment": "FunC identifier",
"match": "((?:[a-zA-Z_\\'\\?!&]|::)(?:[a-zA-Z0-9_\\'\\?!&]|::)*)",
"match": "(.*?)",
"name": "entity.name.function.func.tact"
}
],
Expand Down

0 comments on commit 440f907

Please sign in to comment.