Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Issue 2701513006: Begin adding top-level function declaration support to AstBuilder. (Closed)

Created:
3 years, 10 months ago by Paul Berry
Modified:
3 years, 10 months ago
Reviewers:
ahe, scheglov
CC:
reviews_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Begin adding top-level function declaration support to AstBuilder. R=ahe@google.com, scheglov@google.com Committed: https://github.com/dart-lang/sdk/commit/901dc916cf2d36c8075b053ade74b5e6e38b4306

Patch Set 1 #

Total comments: 11
Unified diffs Side-by-side diffs Delta from patch set Stats (+209 lines, -180 lines) Patch
M pkg/analyzer/test/generated/parser_fasta_test.dart View 8 chunks +11 lines, -51 lines 2 comments Download
M pkg/analyzer/test/generated/parser_test.dart View 1 chunk +8 lines, -0 lines 0 comments Download
M pkg/front_end/lib/src/fasta/analyzer/ast_builder.dart View 22 chunks +163 lines, -94 lines 9 comments Download
M pkg/front_end/lib/src/fasta/parser/listener.dart View 13 chunks +27 lines, -35 lines 0 comments Download

Messages

Total messages: 8 (2 generated)
Paul Berry
3 years, 10 months ago (2017-02-16 23:56:29 UTC) #2
scheglov
LGTM
3 years, 10 months ago (2017-02-17 00:48:05 UTC) #3
ahe
lgtm All my comments below are conversation, not action items for code review. https://codereview.chromium.org/2701513006/diff/1/pkg/analyzer/test/generated/parser_fasta_test.dart File ...
3 years, 10 months ago (2017-02-17 09:02:03 UTC) #4
Paul Berry
https://codereview.chromium.org/2701513006/diff/1/pkg/analyzer/test/generated/parser_fasta_test.dart File pkg/analyzer/test/generated/parser_fasta_test.dart (right): https://codereview.chromium.org/2701513006/diff/1/pkg/analyzer/test/generated/parser_fasta_test.dart#newcode643 pkg/analyzer/test/generated/parser_fasta_test.dart:643: // as the name of a top level function ...
3 years, 10 months ago (2017-02-17 16:14:26 UTC) #5
Paul Berry
Committed patchset #1 (id:1) manually as 901dc916cf2d36c8075b053ade74b5e6e38b4306 (presubmit successful).
3 years, 10 months ago (2017-02-17 16:25:50 UTC) #7
ahe
3 years, 10 months ago (2017-02-17 18:05:50 UTC) #8
Message was sent while issue was closed.
FYI

https://codereview.chromium.org/2701513006/diff/1/pkg/front_end/lib/src/fasta...
File pkg/front_end/lib/src/fasta/analyzer/ast_builder.dart (right):

https://codereview.chromium.org/2701513006/diff/1/pkg/front_end/lib/src/fasta...
pkg/front_end/lib/src/fasta/analyzer/ast_builder.dart:598: // the necessary
analyzer AST data structures.
On 2017/02/17 16:14:26, Paul Berry wrote:
> On 2017/02/17 09:02:02, ahe wrote:
> > What's missing? Position information?
> 
> Yes.  The analyzer ASTs expect to be able to point to the "async", "sync",
> and/or "*" tokens.  This is important for code completion, which needs to find
> the exact point in the AST matching the cursor position; the only way it can
do
> that is to be able to access the positions of all tokens.

OK. handleAsyncModifier should probably just create the object the analyzer
needs.

https://codereview.chromium.org/2701513006/diff/1/pkg/front_end/lib/src/fasta...
pkg/front_end/lib/src/fasta/analyzer/ast_builder.dart:649: ScriptTag scriptTag =
null; // TODO(paulberry)
On 2017/02/17 16:14:26, Paul Berry wrote:
> On 2017/02/17 09:02:02, ahe wrote:
> > What are script tags?
> 
> "script tag" is the Dart spec's name for the initial line of a file if it
starts
> with "#!".  See p.128 of
> http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-408.pdf

Ah. Shebang :-)

Assuming this is just the first line of such a file, it should be easy to
support, it must just have been overlooked when we added support for comments.
AbstractScanner.tokenizeTag just needs to call appendComment (or a new method
similar to appendComment).

Powered by Google App Engine
This is Rietveld 408576698