-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In almost all cases, an elided "new"/"const" is parsed as a normal method call by analyzer, so the existing formatting behavior for those does the right thing. The only edge case is a named constructor on a generic class. That syntax can *only* be a constructor call, so it's parsed as an instance creation expression. When we get to that code path, we need to not add an extra space before the class name if there is no preceding "new" or "const" keyword. Fix #652.
- Loading branch information
1 parent
13389c0
commit ef767a8
Showing
7 changed files
with
32 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
# 1.0.10 | ||
|
||
* Support optional `new`/`const` (#652). | ||
|
||
# 1.0.9 | ||
|
||
* Updated tests. No user-facing changes. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
name: dart_style | ||
# Note: See tool/grind.dart for how to bump the version. | ||
version: 1.0.9+1 | ||
version: 1.0.10 | ||
author: Dart Team <[email protected]> | ||
description: Opinionated, automatic Dart source code formatter. | ||
homepage: https://github.com/dart-lang/dart_style | ||
environment: | ||
sdk: ">=1.8.0 <2.0.0" | ||
sdk: '>=1.8.0 <2.0.0' | ||
dependencies: | ||
analyzer: '>=0.30.0 <0.32.0' | ||
analyzer: ^0.31.2-alpha.0 | ||
args: '>=0.12.1 <2.0.0' | ||
path: '>=1.0.0 <2.0.0' | ||
source_span: '>=1.4.0 <2.0.0' | ||
path: ^1.0.0 | ||
source_span: ^1.4.0 | ||
dev_dependencies: | ||
async: '>=1.0.0 <=3.0.0' | ||
browser: '>=0.10.0 <0.11.0' | ||
grinder: '^0.8.0' | ||
browser: ^0.10.0 | ||
grinder: ^0.8.0 | ||
js: ^0.6.0 | ||
node_preamble: ^1.0.0 | ||
pub_semver: '^1.2.3' | ||
test: '>=0.12.0 <0.13.0' | ||
test_descriptor: "^1.0.0" | ||
test_process: "^1.0.0" | ||
yaml: '^2.0.0' | ||
pub_semver: ^1.2.3 | ||
test: ^0.12.0 | ||
test_descriptor: ^1.0.0 | ||
test_process: ^1.0.0 | ||
yaml: ^2.0.0 | ||
executables: | ||
dartfmt: format | ||
dartformat: format # Allow the old name for compatibility. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters