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

Unified Diff: pkg/observe/lib/transformer.dart

Issue 178683003: [observe] use consistent comment style (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/observe/lib/transform.dart ('k') | pkg/observe/test/transformer_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/observe/lib/transformer.dart
diff --git a/pkg/observe/lib/transformer.dart b/pkg/observe/lib/transformer.dart
index a9e1a9413a2e587e83cbf05e39a687737d4a0374..18173bc7209d2363d80819a4af548a1180f33d5f 100644
--- a/pkg/observe/lib/transformer.dart
+++ b/pkg/observe/lib/transformer.dart
@@ -2,10 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-/**
- * Code transform for @observable. The core transformation is relatively
- * straightforward, and essentially like an editor refactoring.
- */
+/// Code transform for @observable. The core transformation is relatively
+/// straightforward, and essentially like an editor refactoring.
library observe.transformer;
import 'dart:async';
@@ -18,13 +16,11 @@ import 'package:barback/barback.dart';
import 'package:source_maps/refactor.dart';
import 'package:source_maps/span.dart' show SourceFile;
-/**
- * A [Transformer] that replaces observables based on dirty-checking with an
- * implementation based on change notifications.
- *
- * The transformation adds hooks for field setters and notifies the observation
- * system of the change.
- */
+/// A [Transformer] that replaces observables based on dirty-checking with an
+/// implementation based on change notifications.
+///
+/// The transformation adds hooks for field setters and notifies the observation
+/// system of the change.
class ObservableTransformer extends Transformer {
final List<String> _files;
@@ -112,7 +108,7 @@ TextEditTransaction _transformCompilationUnit(
return code;
}
-/** Parse [code] using analyzer. */
+/// Parse [code] using analyzer.
CompilationUnit _parseCompilationUnit(String code) {
var errorListener = new _ErrorCollector();
var reader = new CharSequenceReader(code);
@@ -129,7 +125,7 @@ class _ErrorCollector extends AnalysisErrorListener {
_getSpan(SourceFile file, ASTNode node) => file.span(node.offset, node.end);
-/** True if the node has the `@observable` or `@published` annotation. */
+/// True if the node has the `@observable` or `@published` annotation.
// TODO(jmesserly): it is not good to be hard coding Polymer support here.
bool _hasObservable(AnnotatedNode node) =>
node.metadata.any(_isObservableAnnotation);
@@ -262,7 +258,7 @@ void _transformClass(ClassDeclaration cls, TextEditTransaction code,
}
}
-/** Adds "with ChangeNotifier" and associated implementation. */
+/// Adds "with ChangeNotifier" and associated implementation.
void _mixinObservable(ClassDeclaration cls, TextEditTransaction code) {
// Note: we need to be careful to put the with clause after extends, but
// before implements clause.
« no previous file with comments | « pkg/observe/lib/transform.dart ('k') | pkg/observe/test/transformer_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698