Skip to content

Concrete Syntax Tree #625

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

Closed
jednano opened this issue Sep 8, 2014 · 3 comments
Closed

Concrete Syntax Tree #625

jednano opened this issue Sep 8, 2014 · 3 comments
Labels
Needs More Info The issue still hasn't been fully clarified Suggestion An idea for TypeScript

Comments

@jednano
Copy link
Contributor

jednano commented Sep 8, 2014

It has been requested to supply a syntax tree in issues #438 and #254, in which @CyrusNajmabadi has rightly asked what such a syntax tree would be used for. To answer that question, I'm hoping that I can have access to not just an abstract syntax tree (AST), but more of a concrete syntax tree (CST) for code formatting without throwing away any original code (e.g., comments inside function arguments).

Concerning JavaScript, the need for a CST has been discussed at getify/concrete-syntax-tree. I'm hoping that any and all efforts to expose a syntax tree would take into account these needs and issues. Ideally, the AST would be generated from the CST or, at least, you could ask for whichever one in which you are interested.

@RyanCavanaugh RyanCavanaugh added Suggestion An idea for TypeScript Needs More Info The issue still hasn't been fully clarified labels Sep 8, 2014
@jednano
Copy link
Contributor Author

jednano commented Sep 28, 2014

Happy to provide more information where needed.

@vvakame
Copy link
Contributor

vvakame commented Sep 30, 2014

👍

@jednano
Copy link
Contributor Author

jednano commented Jan 16, 2019

I posted this issue so long ago. Since then, the industry standard appears to be running Prettier as a separate tool for formatting. Still, there are more reasons to desire a CST, but I really don't see this issue going anywhere and I don't want it to contribute to the growing number of issues on this repo, so I'm closing it for now.

@jednano jednano closed this as completed Jan 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs More Info The issue still hasn't been fully clarified Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

3 participants