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

Add a continuously updated (not necessarily incremental) code model to the compiler API #291

Open
novusnota opened this issue Apr 24, 2024 · 0 comments
Assignees
Labels
api Tact's TypeScript API for third-party tools tooling

Comments

@novusnota
Copy link
Member

novusnota commented Apr 24, 2024

To position itself well for the future in terms of IDE support, I think it would be nice if the compiler gets the basic data model for IDE use-case. That is, there should be an API to create a persistent analyzer process, which ingests a stream of code edits, and produces a continuously updated model of the code without explicit compilation requests. The model can be very simple, just “give me an AST of this file at this point in time” would do — all the fancy IDE features can be filled in later. What matters is a shape of data flow through the compiler — not an edit-compile cycle, but rather a continuously updated view of the world.
— from https://matklad.github.io/2023/03/26/zig-and-rust.html

As of today, this should be possible using Ohm's incremental parsing capabilities or at least providing the parsed AST, but without analyzed semantics. Ohm is not error-resilient or even error-recovering, so until we have #286, IDE-related tools like Language Server are likely to augment the compiler's/Ohm's parsing capabilities by tree-sitter-tact.

If you want to get something working quickly, I think today the best answer is “just use Tree-sitter”, so you’d better read its docs rather than this tutorial.
— from https://matklad.github.io/2023/05/21/resilient-ll-parsing-tutorial.html

Related to #285.

@novusnota novusnota added tooling api Tact's TypeScript API for third-party tools labels Apr 24, 2024
@novusnota novusnota self-assigned this Apr 24, 2024
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

1 participant