OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013, the Dart project authors. | 2 * Copyright (c) 2013, the Dart project authors. |
3 * | 3 * |
4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u
se this file except | 4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u
se this file except |
5 * in compliance with the License. You may obtain a copy of the License at | 5 * in compliance with the License. You may obtain a copy of the License at |
6 * | 6 * |
7 * http://www.eclipse.org/legal/epl-v10.html | 7 * http://www.eclipse.org/legal/epl-v10.html |
8 * | 8 * |
9 * Unless required by applicable law or agreed to in writing, software distribut
ed under the License | 9 * Unless required by applicable law or agreed to in writing, software distribut
ed under the License |
10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K
IND, either express | 10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K
IND, either express |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 ErrorReporter errorReporter = new ErrorReporter(errorListener, source); | 190 ErrorReporter errorReporter = new ErrorReporter(errorListener, source); |
191 TypeProvider typeProvider = getContext().getTypeProvider(); | 191 TypeProvider typeProvider = getContext().getTypeProvider(); |
192 // | 192 // |
193 // Validate the directives | 193 // Validate the directives |
194 // | 194 // |
195 validateDirectives(getContext(), source, unit, errorListener); | 195 validateDirectives(getContext(), source, unit, errorListener); |
196 // | 196 // |
197 // Use the ConstantVerifier to verify the use of constants. This needs to
happen before using | 197 // Use the ConstantVerifier to verify the use of constants. This needs to
happen before using |
198 // the ErrorVerifier because some error codes need the computed constant v
alues. | 198 // the ErrorVerifier because some error codes need the computed constant v
alues. |
199 // | 199 // |
200 ConstantVerifier constantVerifier = new ConstantVerifier(errorReporter, ty
peProvider); | 200 ConstantVerifier constantVerifier = new ConstantVerifier( |
| 201 errorReporter, |
| 202 libraryElement, |
| 203 typeProvider); |
201 unit.accept(constantVerifier); | 204 unit.accept(constantVerifier); |
202 // | 205 // |
203 // Use the ErrorVerifier to compute the rest of the errors. | 206 // Use the ErrorVerifier to compute the rest of the errors. |
204 // | 207 // |
205 ErrorVerifier errorVerifier = new ErrorVerifier( | 208 ErrorVerifier errorVerifier = new ErrorVerifier( |
206 errorReporter, | 209 errorReporter, |
207 libraryElement, | 210 libraryElement, |
208 typeProvider, | 211 typeProvider, |
209 new InheritanceManager(libraryElement)); | 212 new InheritanceManager(libraryElement)); |
210 unit.accept(errorVerifier); | 213 unit.accept(errorVerifier); |
211 errors = errorListener.getErrorsForSource(source); | 214 errors = errorListener.getErrorsForSource(source); |
212 } finally { | 215 } finally { |
213 timeCounter.stop(); | 216 timeCounter.stop(); |
214 } | 217 } |
215 } | 218 } |
216 } | 219 } |
OLD | NEW |