Skip to content
This repository has been archived by the owner on Nov 1, 2024. It is now read-only.

Commit

Permalink
Fix the travis build by running dartfmt (#34)
Browse files Browse the repository at this point in the history
* Various changes.

* Update presubmit.

* Dartfmt to fix travis build.

* And bug fix.
  • Loading branch information
matanlurey authored Nov 22, 2016
1 parent f0d8541 commit 5fc2c91
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
12 changes: 8 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
## 1.0.0-alpha+6

- `MethodBuilder.closure` emits properly as a top-level function

## 1.0.0-alpha+5

- MethodBuilder with no statements will create an empty block instead of a
semicolon.
- MethodBuilder with no statements will create an empty block instead of
a semicolon.

```dart
// main() {}
method('main')
```

- Fix lambdas and closures to not include a trailing semicolon when used as an
expression.
- Fix lambdas and closures to not include a trailing semicolon when used
as an expression.

```dart
// () => false
Expand Down
11 changes: 7 additions & 4 deletions lib/src/builders/method.dart
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,9 @@ class _LambdaMethodBuilder extends Object
),
);
}

@override
CompilationUnitMember buildTopLevelAst([Scope scope]) => buildFunction(scope);
}

class _MethodBuilderImpl extends Object
Expand Down Expand Up @@ -412,10 +415,10 @@ class _MethodBuilderImpl extends Object
null,
_property != Keyword.GET ? buildParameterList(scope) : null,
new BlockFunctionBody(
null,
null,
buildBlock(scope),
),
null,
null,
buildBlock(scope),
),
);
}

Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: code_builder
version: 1.0.0-alpha+5
version: 1.0.0-alpha+6
description: A fluent API for generating Dart code
author: Dart Team <[email protected]>
homepage: https://github.com/dart-lang/code_builder
Expand Down

0 comments on commit 5fc2c91

Please sign in to comment.