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

Side by Side Diff: lib/compiler/implementation/unparse_validator.dart

Issue 10575030: Add a typeannotation and a missing argument to remove warnings. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « lib/compiler/implementation/ssa/nodes.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 class ValidatorListener implements DiagnosticListener { 5 class ValidatorListener implements DiagnosticListener {
6 final SourceFile sourceFile; 6 final SourceFile sourceFile;
7 7
8 ValidatorListener(this.sourceFile); 8 ValidatorListener(this.sourceFile);
9 9
10 void cancel([String reason, node, token, instruction, element]) { 10 void cancel([String reason, node, token, instruction, element]) {
11 assert(token !== null); 11 assert(token !== null);
12 SourceSpan.withOffsets(token, token, (beginOffset, endOffset) { 12 SourceSpan.withOffsets(token, token, (beginOffset, endOffset) {
13 String errorMessage = 13 String errorMessage =
14 sourceFile.getLocationMessage(reason, beginOffset, endOffset, true); 14 sourceFile.getLocationMessage(reason, beginOffset, endOffset, true,
15 (s) => s /* no color */);
15 print(errorMessage); 16 print(errorMessage);
16 }); 17 });
17 throw new CompilerCancelledException(reason); 18 throw new CompilerCancelledException(reason);
18 } 19 }
19 20
20 void log(message) {} 21 void log(message) {}
21 } 22 }
22 23
23 /** 24 /**
24 * Checks result's of [Node] unparse. 25 * Checks result's of [Node] unparse.
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 new Script(originalScript.uri, synthesizedSourceFile); 60 new Script(originalScript.uri, synthesizedSourceFile);
60 LibraryElement lib = new LibraryElement(synthesizedScript); 61 LibraryElement lib = new LibraryElement(synthesizedScript);
61 NodeListener listener = 62 NodeListener listener =
62 new NodeListener(new ValidatorListener(synthesizedSourceFile), lib); 63 new NodeListener(new ValidatorListener(synthesizedSourceFile), lib);
63 parser = new Parser(listener); 64 parser = new Parser(listener);
64 parser.parseFunction(newTokens, getOrSet); 65 parser.parseFunction(newTokens, getOrSet);
65 FunctionExpression newNode = listener.popNode(); 66 FunctionExpression newNode = listener.popNode();
66 // TODO(antonm): add Node comparison. 67 // TODO(antonm): add Node comparison.
67 } 68 }
68 } 69 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/ssa/nodes.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698