Commit Graph

108 Commits

Author SHA1 Message Date
pquitslund@google.com 07e4dfdb43 Ensure formatted CUs end with a newline (dartbug.com/13188).
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//23458038

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27352 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-10 21:17:21 +00:00
pquitslund@google.com 79f133550d Optional trailing comma support for list and map literals.
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//23451037

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27350 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-10 18:34:05 +00:00
pquitslund@google.com 1d8cee96ee Fix to NOT traverse linked directories when formatting (dartbug.com/13187).
We *may* allow support for this in the future but either way the default (as set here) should be false.

R=brianwilkerson@google.com, kevmoo@j832.com

Review URL: https://codereview.chromium.org//23461044

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27349 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-10 18:32:21 +00:00
pquitslund@google.com 8c13dc887a Formatter sanity-checking (via token stream verification).
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//23480055

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27343 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-10 17:10:41 +00:00
lrn@google.com 0f1e912d9d Reapply "Make LinkedHashMap also have a factory constructor and be customizable""
The change was reverted due to failing Dartium tests that were not easily handelable on a Friday afternoon.

Review URL: https://codereview.chromium.org//23872008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27284 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-09 10:49:32 +00:00
lrn@google.com 761f55b1b9 Revert "Make LinkedHashMap also have a factory constructor and be customizable"
Dartium expectations expects "LinkedHashMap" and gets "_LinkedHashMap".

Review URL: https://codereview.chromium.org//23890008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27250 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-06 14:29:04 +00:00
lrn@google.com 64359158ab Make LinkedHashMap also have a factory constructor and be customizable
R=floitsch@google.com

Review URL: https://codereview.chromium.org//23494027

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27246 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-06 13:01:54 +00:00
scheglov@google.com 7f0d7dfd18 Tweaks for previous java2dart CL.
Missed them in previous CL...

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//23874014

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27155 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-04 22:00:55 +00:00
scheglov@google.com e6ce94adab java2dart improvement - use field if getter/setter are trivial.
Also analyzer_experimental snapshot.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//23769004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27138 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-04 19:17:38 +00:00
scheglov@google.com e8f8262517 New analyzer_experimental snapshot.
And java2dart improvements for better inner classes support.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//23461019

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27078 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-03 21:46:33 +00:00
pquitslund@google.com f8c8395201 Formatter comment-handling improvements.
A bit messy but ready to checkpoint. Should handle the major cases.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//23589005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27074 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-03 19:21:14 +00:00
scheglov@google.com 5f27a4f4ad java2dart improvements and new analyzer_experimental snapshot.
1. All enums extend Enum class.
2. Remove more unneeded parentheses.
3. Remove type arugments for types with all wildcards.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//23852002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27020 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-02 19:01:22 +00:00
scheglov@google.com 0b6ae2575c Fix analyzer_experimental hints: remove unused imports.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//23496027

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26944 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-30 21:11:46 +00:00
scheglov@google.com e1157956e4 Fix StringSource.
R=brianwilkerson@google.com, nweiz@google.com
BUG=

Review URL: https://codereview.chromium.org//23566017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26885 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-29 18:19:20 +00:00
scheglov@google.com 663530693f New analysis_experimental snapshot.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//23080005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26876 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-29 16:30:24 +00:00
pquitslund@google.com ecb28b573a Formatter main overwrite flag fix.
R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org//23534016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26821 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-28 22:31:08 +00:00
pquitslund@google.com fc536769a1 Path fixes for formatter main.
R=rnystrom@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org//23726002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26815 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-28 20:29:51 +00:00
pquitslund@google.com 803a98a3c9 Directory processing for the formatter main.
R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org//23441007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26805 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-28 17:51:43 +00:00
pquitslund@google.com 2a88e8858b Improved comment handling (and misc. formatter fixes).
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//23440011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26746 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-27 21:55:58 +00:00
lrn@google.com 0fa1bbdf15 Reapply "Make Map constructors return LinkedHashMap."
Updated tests assuming a specific ordering of an unlinked hash map
to not be daft.

R=floitsch@google.com, jmesserly@google.com

Review URL: https://codereview.chromium.org//22859069

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26693 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-27 08:43:46 +00:00
nweiz@google.com e84b9dba61 Add a parseDartString method to pkg/analyzer.
R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org//22865035

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26673 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-26 22:06:55 +00:00
pquitslund@google.com c23446c37c Updated reference to missing UTF8 codec.
R=devoncarew@google.com

Review URL: https://codereview.chromium.org//23416005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26657 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-26 16:55:31 +00:00
pquitslund@google.com 4502a116e9 Minor formatter tweaks and a few more tests.
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//23121006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26655 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-26 16:38:04 +00:00
floitsch@google.com 35d7140e66 Remove Encoding-enum from dart:io and add interface in dart:convert.
BUG= http://dartbug.com/6284
BUG= http://dartbug.com/7966
R=nweiz@google.com, sgjesse@google.com

Review URL: https://codereview.chromium.org//22872012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26632 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-26 10:37:25 +00:00
pquitslund@google.com faac3d0e06 Formatter checkpoint.
Some fixes and a progress towards the elimination of references to String literals in visit methods.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//23301021

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26608 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-23 20:17:01 +00:00
pquitslund@google.com 0ba745e63d Formatter fixes and tweaks.
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//22928013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26462 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-21 19:40:53 +00:00
sgjesse@google.com 38506f9d57 Remove the LineTransformer from dart:io
The LineTransformer has been retired, and is replaced with LineSplitter from dart:convert

R=floitsch@google.com, nweiz@google.com

Review URL: https://codereview.chromium.org//22927016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26419 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-21 07:35:46 +00:00
pquitslund@google.com 8951d19925 Formatter checkpoint.
Largely cleanup in a move from string literals to accessing the corresponding node tokens.

I'm also trying on an approach to tracking the need for preceding (and trailing) newlines.  In general I don't love state flags where I can avoid them but the alternatives were even more ungainly to my eye.

Thoughts, of course, are most welcome!

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//23308004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26370 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-20 16:50:03 +00:00
scheglov@google.com a3b42c7b8f Fix warnings in analyzer_experimental
R=pquitslund@google.com
BUG=

Review URL: https://codereview.chromium.org//22865011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26212 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-15 20:07:49 +00:00
sgjesse@google.com 353428a918 Remove the Path class from dart:io
The Path class in dart:io has been deprecated for some time
now. It was scheduled to be removed on August 11th, so here it
goes.

dart:io still uses the Path class internally, but now it is
private. I will trim it down to what is actually used in a
follow-up change.

R=ahe@google.com, devoncarew@google.com, whesse@google.com
BUG=http://dartbug.com/11666

Review URL: https://codereview.chromium.org//23054008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26181 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-15 10:10:53 +00:00
pquitslund@google.com 693d048c15 Provisional formatter main.
For testing purposes primarily, a formatter main entry point.

Revisions and refinements to follow.

R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org//23125002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26087 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-13 21:48:43 +00:00
pquitslund@google.com 6b3d069dd2 Formatter cleanup.
Migration to emitToken begins...

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//23044004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26079 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-13 20:08:41 +00:00
pquitslund@google.com 88e634dba0 Formatter token emission baby-steps.
Still playing around with emitToken(..) as a general strategy.  Next step will likely be to migrate all appropriate print(..) calls to it.  (Along the way a great rename will happen too.)

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//22937006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26064 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-13 17:06:23 +00:00
kevmoo@j832.com 47e8d45430 analyzer_exp fixes
R=scheglov@google.com

Review URL: https://codereview.chromium.org//22542003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25946 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-08 21:07:01 +00:00
pquitslund@google.com f6b9baced7 Formatter checkpoint.
Review URL: https://codereview.chromium.org//22403004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25941 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-08 19:51:32 +00:00
scheglov@google.com 0039dfca51 Remove dart:io dependency from scanner/ast/parser tests.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//22325013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25935 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-08 17:46:50 +00:00
scheglov@google.com c52c1736ee New analyzer_experimental snapshot.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//22285004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25902 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-07 21:15:25 +00:00
scheglov@google.com 62d6ac752c Fix for NPE when convert error without source.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//21162003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25615 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-30 14:53:41 +00:00
gram@google.com fb62473ebf Add missing newline after Actual value in fail message.
Remove the BasMatcher class; it made some sense when we had both 'interface'
and 'class' but adds no value now.
Fix a comment in the CustomMatcher documentation.
Fix tests affected by these changes.

R=sigmund@google.com

Review URL: https://codereview.chromium.org//18442002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25356 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-23 19:48:26 +00:00
pquitslund@google.com a5ed18ebdb Formatter check-point (blank-space preservation experiment).
Possibly not the long-term approach but an early checkpoint of one approach to preserving user defined blank spaces (between members).

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//19668003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25125 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-17 21:44:28 +00:00
scheglov@google.com 4ac2a1452c New analyzer_experimental snapshot.
FYI bot is red, as I can see this is caused by VM crashes.
https://code.google.com/p/dart/issues/detail?id=11873

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//19590006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25121 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-17 19:32:30 +00:00
scheglov@google.com b022ab975f Use pathos.fromUri() to make it work on Windows.
I was able to reproduce failure on Windows bots.
With this CL should work on both Windows and Posix.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//19266005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25055 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-16 16:35:44 +00:00
scheglov@google.com 3aaa360346 Complete java_io.dart rallback.
TBR

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//19266004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25029 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-15 22:36:13 +00:00
scheglov@google.com 9783051dfb Try to fix Windows bots. Use absolute path instead of canonical.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//19297002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25027 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-15 22:20:12 +00:00
scheglov@google.com 0f5432dc17 Fix for JavaFile.getCanonicalPath(), don't use Path.
I've tested JavaFile manually separately; and ran shared tests.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//19262002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25016 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-15 19:35:15 +00:00
rnystrom@google.com a9d24edd0f Rename "pathos" package to "path".
R=ajohnsen@google.com

Review URL: https://codereview.chromium.org//18356011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24964 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-12 17:54:48 +00:00
scheglov@google.com cdfb38b317 New analyzer_experimental snapshot.
The biggest change is in formatting long list literals.
It looks now better and also does not turn Editor into text mode for couple files.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//18612009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24903 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-11 01:51:53 +00:00
pquitslund@google.com 319f5b5425 Initial indent fix and a few more tests.
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//18487005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24825 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-08 21:58:55 +00:00
pquitslund@google.com 00845ce4c6 Formatter re-think/updates.
A redesign striving for simplicity and a riff on ToSourceASTVisitor.  Some shuffling and renaming still to come.  Line and Token abstractions are also quite likely to change.  Consider this a baby-step.

R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org//18346013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24758 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-03 22:22:20 +00:00
scheglov@google.com 532aa2fab4 New analyzer_experimental snapshot.
Fixes also compilation problem in java2dart translator.

R=pquitslund@google.com
BUG=

Review URL: https://codereview.chromium.org//18325018

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24744 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-03 19:47:59 +00:00