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

Introduce a compile or similar function to the API #285

Open
novusnota opened this issue Apr 23, 2024 · 1 comment
Open

Introduce a compile or similar function to the API #285

novusnota opened this issue Apr 23, 2024 · 1 comment
Assignees
Labels
api Tact's TypeScript API for third-party tools tooling

Comments

@novusnota
Copy link
Member

novusnota commented Apr 23, 2024

It would greatly benefit for tools to be able to get results of the compilation without waiting for the whole build() to complete with all the wrappers and following. Just to have all the things parsed by the AST and exposed directly for tools such as LSP to consume.

This may be a wrapper around this function:
https://github.com/tact-lang/tact/blob/8e61206f8c2d6dab5007627fcffda5102caa1f68/src/pipeline/precompile.ts

Additionally, it's nice to update the check() function to return the list of expected items in addition to the whole message. And with that, the parse() function (import { parse } from '@tact-lang/compiler/dist/grammar/grammar';) can also get promoted to the first-class export from the compiler.

Partially related to #254.

@novusnota novusnota self-assigned this Apr 23, 2024
@anton-trunov anton-trunov added the api Tact's TypeScript API for third-party tools label Apr 23, 2024
@novusnota
Copy link
Member Author

novusnota commented Apr 23, 2024

As Ohm supports incremental parsing, we should start using and exposing its APIs too. Perhaps, in that proposed compile API function. Referenced that in #291.

P.S.: Having this update will make tact.vim drastically smarter and allow a much simpler implementation of tact play going forward!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Tact's TypeScript API for third-party tools tooling
Projects
None yet
Development

No branches or pull requests

2 participants