-
Notifications
You must be signed in to change notification settings - Fork 454
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
Document the process for increasing language support #126
Comments
I think that we should mention assignment, at least for now, since we’re still several months away from the new-style grammar-derived ASTs – if only to impress on people that adding new languages is, for now, a lot of work. |
Took a first stab at this. I described the addition process in terms of how it is now, rather than how it will be when we compile tree-sitter ASTs directly into Core. I anticipate that this will impress upon the public the amount of work required to add a new language, and hopefully encourage people to wait until the new generation of AST parsing lands before they invest a ton of time into what will be a deprecated code path.
Fair point. Can we at least say “please don’t do this to yourself”? 😊 |
Are these new style AST's not based on tree-sitter? I got about 50% through a C# grammar when I worked on the Atom team I'd be keen on picking back up if it'll be used on GitHub for this but obviously don't want to waste effort if something new is in the pipeline. |
@damieng The new-style ASTs will be based on tree-sitter, so we’ll still need a tree-sitter-c# grammar/package: indeed, we'll generate Haskell type definitions generated directly from the tree-sitter grammar. What will change is that the internal sum-of-products AST representation (see Data.Term and Language.Syntax.*) will be obviated, as we’ll instead translate the new-style ASTs directly into |
The TH code to generate the datatypes is already on |
Note that non-analytical (i.e. syntactic rather than truly semantic) computations won’t need this last step, as we should be able to e.g. diff generically over the new ASTs too (once we get that far). |
Tracking in #131 |
Document the process of adding new languages. (#126)
Fixed with #131. |
We’re getting interest in adding support for languages, so we should document the overall process.
Given that we’re migrating away from using assignment &c., I think we should explicitly leave that out (tho prolly we should note that we don’t support diffing for the new-style grammar-derived ASTs just yet).
I think that makes the steps something like:
tree-sitter
parser (link totree-sitter
docs)haskell-tree-sitter
(link to an example PR?)semantic
We should also be careful to document what you get with each step. Like, the first one gives you Atom support, the second & third give you
semantic
support (modulo any generic functionality we haven’t implemented yet), and the fourth gives you full analysis support.The text was updated successfully, but these errors were encountered: