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

Analyzer should offer an API for analyzing an AST without generating source first #17223

Closed
DartBot opened this issue Mar 1, 2014 · 7 comments
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug

Comments

@DartBot
Copy link

DartBot commented Mar 1, 2014

This issue was originally filed by @zoechi


What steps will reproduce the problem?
1.
I made an attempt to build a graphical designer which produces Dart code as output.
I prefer building an AST instead concatenating strings.
It seems that there is no API to make the analyzer analyze the AST without generating source code from the AST first.
This seems very inefficient to me because the first thing the analyzer seems to doing is parsing the source and generating an AST.
See also this discussion https://groups.google.com/a/dartlang.org/forum/#!topic/misc/XIOYIAwzCLE

2.
3.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?
Dart VM version: 1.3.0-dev.0.1 (Thu Feb 27 08:23:24 2014) on "linux_x64"
Analyzer 0.11.10
Please provide any additional information below.

@bwilkerson
Copy link
Member

Added this to the 1.3 milestone.
Removed Type-Defect, Priority-Unassigned labels.
Added Type-Enhancement, Priority-Medium, Area-Analyzer, Triaged labels.

@clayberg
Copy link

clayberg commented Apr 9, 2014

Removed this from the 1.3 milestone.
Added this to the 1.4 milestone.

@kasperl
Copy link

kasperl commented May 8, 2014

Removed this from the 1.4 milestone.
Added this to the 1.5 milestone.

@bwilkerson
Copy link
Member

Removed this from the 1.5 milestone.
Added this to the Later milestone.

@kasperl
Copy link

kasperl commented Jul 10, 2014

Removed this from the Later milestone.
Added Oldschool-Milestone-Later label.

@kasperl
Copy link

kasperl commented Aug 4, 2014

Removed Oldschool-Milestone-Later label.

@DartBot DartBot added Type-Enhancement area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. labels Aug 4, 2014
@kevmoo kevmoo added P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug and removed triaged labels Mar 1, 2016
@srawlins
Copy link
Member

srawlins commented Jul 1, 2018

The analyzer now has an AST that supports both reading and writing. The Angular compiler uses it to great benefit, and many other tools use the provided visitors (SimpleAstVisitor, RecursiveAstVisitor, etc) as well to work with Dart AST.

@srawlins srawlins closed this as completed Jul 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

6 participants