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

Issue 10701090: Some enhancements of PrettyPrinter for NodeList, LiteralList. (Closed)

Created:
8 years, 5 months ago by Roman
Modified:
8 years, 5 months ago
Reviewers:
Anton Muhin
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Some enhancements of PrettyPrinter for NodeList, LiteralList. Committed: https://code.google.com/p/dart/source/detail?r=9437

Patch Set 1 #

Total comments: 8

Patch Set 2 : Address Anton comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+44 lines, -15 lines) Patch
M lib/compiler/implementation/tree/prettyprint.dart View 1 8 chunks +44 lines, -15 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Roman
8 years, 5 months ago (2012-07-06 10:13:27 UTC) #1
Roman
Fixed subject.
8 years, 5 months ago (2012-07-06 10:13:56 UTC) #2
Anton Muhin
lgtm https://chromiumcodereview.appspot.com/10701090/diff/1/lib/compiler/implementation/tree/prettyprint.dart File lib/compiler/implementation/tree/prettyprint.dart (right): https://chromiumcodereview.appspot.com/10701090/diff/1/lib/compiler/implementation/tree/prettyprint.dart#newcode204 lib/compiler/implementation/tree/prettyprint.dart:204: if (token == null) { nit: === instead ...
8 years, 5 months ago (2012-07-06 10:19:07 UTC) #3
Roman
8 years, 5 months ago (2012-07-06 11:28:32 UTC) #4
https://chromiumcodereview.appspot.com/10701090/diff/1/lib/compiler/implement...
File lib/compiler/implementation/tree/prettyprint.dart (right):

https://chromiumcodereview.appspot.com/10701090/diff/1/lib/compiler/implement...
lib/compiler/implementation/tree/prettyprint.dart:204: if (token == null) {
On 2012/07/06 10:19:07, antonmuhin wrote:
> nit: === instead of == and single line:
> 
> if (token === null) return null;
> 
> Another option:
> 
> tTSON(Token token) => token === null ? null : token.stringValue;

Done.

https://chromiumcodereview.appspot.com/10701090/diff/1/lib/compiler/implement...
lib/compiler/implementation/tree/prettyprint.dart:249: "delimiter" :
node.delimiter != null ? node.delimiter.stringValue : null,
On 2012/07/06 10:19:07, antonmuhin wrote:
> nit: !==
> 
> And apparently you can use your function above for it.

Done. delimiter is a SourceString, not a Token.

https://chromiumcodereview.appspot.com/10701090/diff/1/lib/compiler/implement...
lib/compiler/implementation/tree/prettyprint.dart:284: if (node !== null) {
On 2012/07/06 10:19:07, antonmuhin wrote:
> another option: if (node === null) return;

Done.

https://chromiumcodereview.appspot.com/10701090/diff/1/lib/compiler/implement...
lib/compiler/implementation/tree/prettyprint.dart:355: "endToken" :
"${node.endToken.stringValue}"
On 2012/07/06 10:19:07, antonmuhin wrote:
> that applies to the diff above as well: I believe you should stick to
> get{Begin,End}Token.

Done. Changed everywhere.

Powered by Google App Engine
This is Rietveld 408576698