Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

Commit 53f6327

Browse files
committed
nits
1 parent fb00b99 commit 53f6327

File tree

3 files changed

+9
-13
lines changed

3 files changed

+9
-13
lines changed

lib/src/codegen/js_codegen.dart

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import 'package:dev_compiler/src/codegen/reify_coercions.dart'
2323
import 'package:dev_compiler/src/js/js_ast.dart' as JS;
2424
import 'package:dev_compiler/src/js/js_ast.dart' show js;
2525

26+
import 'package:dev_compiler/src/closure/closure_codegen.dart' show ClosureCodegen;
2627
import 'package:dev_compiler/src/compiler.dart' show AbstractCompiler;
2728
import 'package:dev_compiler/src/checker/rules.dart';
2829
import 'package:dev_compiler/src/info.dart';
@@ -36,7 +37,6 @@ import 'js_metalet.dart' as JS;
3637
import 'js_module_item_order.dart';
3738
import 'js_printer.dart' show writeJsLibrary;
3839
import 'side_effect_analysis.dart';
39-
import 'package:dev_compiler/src/closure/closure_codegen.dart';
4040

4141
// Various dynamic helpers we call.
4242
// If renaming these, make sure to check other places like the
@@ -876,7 +876,7 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ClosureCodegen {
876876
new JS.Method(name, js.call('function() { #; }', body) as JS.Fun),
877877
node.element);
878878
}
879-
879+
880880
JS.Method _emitConstructor(ConstructorDeclaration node, InterfaceType type,
881881
List<FieldDeclaration> fields, bool isObject) {
882882
if (_externalOrNative(node)) return null;
@@ -945,7 +945,7 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ClosureCodegen {
945945
// It also avoids V8 restrictions on `super` in default constructors.
946946
return annotate(
947947
new JS.Method(
948-
name, new JS.Fun(_visit(node.parameters) as List<JS.Parameter>, body))
948+
name, new JS.Fun(_visit(node.parameters) as List<JS.Parameter>, body))
949949
..sourceInformation = node,
950950
node.element);
951951
}
@@ -1209,10 +1209,10 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ClosureCodegen {
12091209

12101210
return annotate(
12111211
new JS.Method(
1212-
_elementMemberName(node.element), _emitFunctionBody(params, node.body),
1213-
isGetter: node.isGetter,
1214-
isSetter: node.isSetter,
1215-
isStatic: node.isStatic),
1212+
_elementMemberName(node.element), _emitFunctionBody(params, node.body),
1213+
isGetter: node.isGetter,
1214+
isSetter: node.isSetter,
1215+
isStatic: node.isStatic),
12161216
node.element);
12171217
}
12181218

lib/src/js/printer.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1086,15 +1086,11 @@ class Printer implements NodeVisitor {
10861086
localNamer.leaveScope();
10871087
}
10881088

1089-
void outClosureAnnotation(Node node, {bool withNewLine: true}) {
1089+
void outClosureAnnotation(Node node) {
10901090
if (node != null && node.closureAnnotation != null) {
10911091
String comment = node.closureAnnotation.toString(indentation);
10921092
if (comment.isNotEmpty) {
10931093
out(comment);
1094-
if (withNewLine) {
1095-
lineOut();
1096-
indent();
1097-
}
10981094
}
10991095
}
11001096
}

lib/src/options.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ final ArgParser argParser = StrongModeOptions.addArguments(new ArgParser()
302302
help: 'Port to serve files from (used only when --serve is on)',
303303
defaultsTo: '8080')
304304
..addFlag('closure',
305-
help: 'Emit Closure-Compiler-friendly code (experimental)', defaultsTo: _CLOSURE_DEFAULT)
305+
help: 'Emit Closure Compiler-friendly code (experimental)', defaultsTo: _CLOSURE_DEFAULT)
306306
..addFlag('force-compile',
307307
help: 'Compile code with static errors', defaultsTo: false)
308308
..addOption('log', abbr: 'l', help: 'Logging level (defaults to severe)')

0 commit comments

Comments
 (0)