Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FunC v0.5.0 logic and dependencies updates #212

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

unserialize
Copy link
Collaborator

Since FunC v0.5.0 introduces new keywords and new syntax for get methods, contracts written in v0.5.0+ should be correctly parsed and highlighted in TON verifier.

Highlighing is implemented in ton-community/contract-verifier-sdk#324, so we just need to update the dependency.

To parse sources, tree-sitter-func.wasm is copied (surprisingly) from VS Code plugin, implemented here.

The file getterParser.ts contains logic for AST traversing, also modified by this MR (supports both method_id from v0.4.x and get from v0.5.0).

When ton-community/contract-verifier-sdk#324 and ton-community/vscode-func#11 are merged, I'll take the latest wasm and regenerate dependencies for proper package.lock changes, and this MR will become non-draft

* tree-sitter-func.wasm copied from vscode with v0.5.0 support
* getterParser modified to support `get` keyword
* updated sdk dep
* added v0.5.0 dep from func-js-bin
@@ -35,6 +35,8 @@
"func-js-bin-0.4.2": "npm:@ton-community/func-js-bin@^0.4.2",
"func-js-bin-0.4.3": "npm:@ton-community/func-js-bin@^0.4.3",
"func-js-bin-0.4.4": "npm:@ton-community/func-js-bin@^0.4.4",
"func-js-bin-0.5.0": "npm:@ton-community/func-js-bin@^0.5.0",
"highlight.js": "^11.6.0",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the reason highlight.js wasn't included so far is because contract-verifier-sdk has it with it. just otherwise there may be a version discrepancy which is the downside with this approach.

@wlofman021

This comment was marked as spam.

Copy link

@wlofman021 wlofman021 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Aho38wkw

This comment was marked as spam.

@Aho38wkw

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants