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

Unified Diff: pkg/analyzer_experimental/lib/src/services/formatter_impl.dart

Issue 22542003: analyzer_exp fixes (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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
Index: pkg/analyzer_experimental/lib/src/services/formatter_impl.dart
diff --git a/pkg/analyzer_experimental/lib/src/services/formatter_impl.dart b/pkg/analyzer_experimental/lib/src/services/formatter_impl.dart
index 7df474101c671987b37716dc1479a4fe0ebe6146..cb2b7b92b99704410bb21e363d7cf9b058d741e7 100644
--- a/pkg/analyzer_experimental/lib/src/services/formatter_impl.dart
+++ b/pkg/analyzer_experimental/lib/src/services/formatter_impl.dart
@@ -40,7 +40,7 @@ class FormatterOptions {
class FormatterException implements Exception {
/// A message describing the error.
- final message;
+ final String message;
pquitslund 2013/08/08 21:20:23 Hmmmm. The type seems gratuitous here. Or?
kevmoo-old 2013/08/08 21:23:34 Nope. It's great for the analyzer and doc generati
/// Creates a new FormatterException with an optional error [message].
const FormatterException([this.message = '']);
@@ -55,15 +55,15 @@ class FormatterException implements Exception {
/// Specifies the kind of code snippet to format.
class CodeKind {
- final index;
+ final int _index;
- const CodeKind(this.index);
+ const CodeKind._(this._index);
/// A compilation unit snippet.
- static const COMPILATION_UNIT = const CodeKind(0);
+ static const COMPILATION_UNIT = const CodeKind._(0);
/// A statement snippet.
- static const STATEMENT = const CodeKind(1);
+ static const STATEMENT = const CodeKind._(1);
}
@@ -118,7 +118,7 @@ class CodeFormatterImpl implements CodeFormatter, AnalysisErrorListener {
throw new FormatterException('Unsupported format kind: $kind');
}
- checkForErrors() {
+ void checkForErrors() {
pquitslund 2013/08/08 21:20:23 What's your thinking on when to specify a void ret
kevmoo-old 2013/08/08 21:23:34 If a public member returns nothing, flag it void.
if (errors.length > 0) {
throw new FormatterException.forError(errors);
}
@@ -142,7 +142,7 @@ class CodeFormatterImpl implements CodeFormatter, AnalysisErrorListener {
class SourceVisitor implements ASTVisitor {
/// The writer to which the source is to be written.
- SourceWriter writer;
+ final SourceWriter writer;
/// Cached line info for calculating blank lines.
LineInfo lineInfo;

Powered by Google App Engine
This is Rietveld 408576698