Skip to content
This repository has been archived by the owner on Apr 26, 2023. It is now read-only.

Commit

Permalink
update for tact-lang 0.10.1
Browse files Browse the repository at this point in the history
  • Loading branch information
xtonwallet committed Feb 26, 2023
1 parent cd10829 commit 2f49cab
Show file tree
Hide file tree
Showing 9 changed files with 201 additions and 168 deletions.
14 changes: 9 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Tact language (for .tact file) extension to use together with Tact compiler for Visual Studio Code to develop smart contract for TON blockchain",
"publisher": "ton-core",
"icon": "icons/logo.png",
"version": "0.1.3",
"version": "0.1.4",
"keywords": [
"tact",
"blockchain",
Expand All @@ -25,7 +25,9 @@
"engines": {
"vscode": "^1.50.1"
},
"activationEvents": ["onLanguage:tact"],
"activationEvents": [
"onLanguage:tact"
],
"contributors": [
"Steve Korshakov (ex3ndr) <[email protected]>",
"XTON crypto wallet team <[email protected]>"
Expand Down Expand Up @@ -64,16 +66,18 @@
"ignore": "^5.1.8",
"js-string-escape": "^1.0.1",
"lodash": "^4.17.21",
"mkdirp": "^0.5.1",
"mkdirp": "^2.1.3",
"path-normalize": "^6.0.10",
"pegjs": "^0.10.0",
"require-from-string": "^2.0.2",
"semver": "^7.3.5",
"string-width": "^4.2.2",
"ton": "^13.1.0",
"ton-core": ">=0.44.0",
"ton-core": "^0.47.1",
"ton-crypto": "^3.2.0",
"ton-emulator": "^1.3.0",
"ton-emulator": "^2.1.1",
"ton-tact": "^0.8.11",
"tvm-disassembler": "^2.0.0",
"vsce": "^1.103.1",
"vscode-languageclient": "^7.0.0",
"vscode-languageserver": "^7.0.0",
Expand Down
4 changes: 4 additions & 0 deletions snippets/tact.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@
"documentation for function": {
"prefix": "doc",
"body": "//\n/// @notice What does it do?;\n///\n/// @param name - description;\n/// @return Struct - description;"
},
"require expression": {
"prefix": "req",
"body": "require(${1:Bool}, ${2:String});"
}
}
}
23 changes: 0 additions & 23 deletions src/completionService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -779,9 +779,6 @@ export function GetContextualAutoCompleteByGlobalVariable(lineText: string, word
if (isAutocompleteTrigeredByVariableName('math', lineText, wordEndPosition)) {
return getMathCompletionItems();
}
if (isAutocompleteTrigeredByVariableName('address', lineText, wordEndPosition)) {
return getAddressCompletionItems();
}
if (isAutocompleteTrigeredByVariableName('context', lineText, wordEndPosition)) {
return getContextCompletionItems();
}
Expand Down Expand Up @@ -1020,26 +1017,6 @@ function getContextCompletionItems(): CompletionItem[] {
];
}

function getAddressCompletionItems(): CompletionItem[] {
return [
{
detail: 'Constructs an address of type addr_std with given workchain id wid and value address_value.',
kind: CompletionItemKind.Property,
label: 'makeAddrStd',
},
{
detail: 'Constructs an address of type addr_none.',
kind: CompletionItemKind.Property,
label: 'makeAddrNone',
},
{
detail: 'Constructs an address of type addr_extern with given value with bitCnt bit length.',
kind: CompletionItemKind.Property,
label: 'makeAddrExtern',
},
]
}

function getMapCompletionItems(): CompletionItem[] {
return [
{
Expand Down
7 changes: 7 additions & 0 deletions src/hoverService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,13 @@ const hoverDescription = {
"a contract or trait."
]
},
"require": {
"pattern": "require",
"type": "global",
"description": [
"fun require(condition: Bool, error: String);\nChecks condition and throws an exception with error message if condition is false."
]
},
"getConfigParam": {
"pattern": "getConfigParam",
"type": "global",
Expand Down
Loading

0 comments on commit 2f49cab

Please sign in to comment.