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

Side by Side Diff: dart/frog/tests/leg/src/mock_compiler.dart

Issue 9283031: Build script tags. (Closed) Base URL: ssh://aaricia.aar/home/ahe/Dart/all/dart.googlecode.com.git@script
Patch Set: Address review comments Created 8 years, 11 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
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 #library('mock_compiler'); 5 #library('mock_compiler');
6 6
7 #import("../../../leg/leg.dart"); 7 #import("../../../leg/leg.dart");
8 #import("../../../leg/elements/elements.dart"); 8 #import("../../../leg/elements/elements.dart");
9 #import("../../../leg/tree/tree.dart"); 9 #import("../../../leg/tree/tree.dart");
10 #import("../../../leg/util/util.dart"); 10 #import("../../../leg/util/util.dart");
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 new Element(buildSourceString(''), ElementKind.FUNCTION, null); 91 new Element(buildSourceString(''), ElementKind.FUNCTION, null);
92 ResolverVisitor visitor = new FullResolverVisitor(this, mockElement); 92 ResolverVisitor visitor = new FullResolverVisitor(this, mockElement);
93 visitor.context = new BlockScope(visitor.context); 93 visitor.context = new BlockScope(visitor.context);
94 return visitor; 94 return visitor;
95 } 95 }
96 96
97 parseScript(String text) { 97 parseScript(String text) {
98 for (Link<Element> link = parseUnit(text, this); 98 for (Link<Element> link = parseUnit(text, this);
99 !link.isEmpty(); 99 !link.isEmpty();
100 link = link.tail) { 100 link = link.tail) {
101 universe.define(link.head); 101 universe.define(link.head, this);
102 } 102 }
103 } 103 }
104 104
105 void enqueue(WorkItem work) { 105 void enqueue(WorkItem work) {
106 if (work.isBailoutVersion()) lastBailoutWork = work; 106 if (work.isBailoutVersion()) lastBailoutWork = work;
107 super.enqueue(work); 107 super.enqueue(work);
108 } 108 }
109 109
110 resolve(ClassElement element) { 110 resolve(ClassElement element) {
111 return resolver.resolveType(element); 111 return resolver.resolveType(element);
(...skipping 17 matching lines...) Expand all
129 } while (expected.hasNext()); 129 } while (expected.hasNext());
130 fail('Too few warnings'); 130 fail('Too few warnings');
131 } 131 }
132 if (found.hasNext()) { 132 if (found.hasNext()) {
133 do { 133 do {
134 print('Additional warning "${found.next()}"'); 134 print('Additional warning "${found.next()}"');
135 } while (found.hasNext()); 135 } while (found.hasNext());
136 fail('Too many warnings'); 136 fail('Too many warnings');
137 } 137 }
138 } 138 }
OLDNEW
« no previous file with comments | « dart/frog/tests/leg/src/TypeCheckerTest.dart ('k') | dart/frog/tests/leg/src/parser_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698