| OLD | NEW |
| 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 ScannerTask extends CompilerTask { | 5 class ScannerTask extends CompilerTask { |
| 6 ScannerTask(Compiler compiler) : super(compiler); | 6 ScannerTask(Compiler compiler) : super(compiler); |
| 7 String get name => 'Scanner'; | 7 String get name => 'Scanner'; |
| 8 | 8 |
| 9 void scanLibrary(LibraryElement library) { | 9 void scanLibrary(LibraryElement library) { |
| 10 var compilationUnit = library.entryCompilationUnit; | 10 var compilationUnit = library.entryCompilationUnit; |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 parser.parseUnit(tokens); | 215 parser.parseUnit(tokens); |
| 216 }); | 216 }); |
| 217 } | 217 } |
| 218 } | 218 } |
| 219 | 219 |
| 220 /** | 220 /** |
| 221 * The fields of this class models a state machine for checking script | 221 * The fields of this class models a state machine for checking script |
| 222 * tags come in the correct order. | 222 * tags come in the correct order. |
| 223 */ | 223 */ |
| 224 class TagState { | 224 class TagState { |
| 225 static final int NO_TAG_SEEN = 0; | 225 static const int NO_TAG_SEEN = 0; |
| 226 static final int LIBRARY = 1; | 226 static const int LIBRARY = 1; |
| 227 static final int IMPORT = 2; | 227 static const int IMPORT = 2; |
| 228 static final int SOURCE = 3; | 228 static const int SOURCE = 3; |
| 229 static final int RESOURCE = 4; | 229 static const int RESOURCE = 4; |
| 230 | 230 |
| 231 /** Next state. */ | 231 /** Next state. */ |
| 232 static final List<int> NEXT = | 232 static const List<int> NEXT = |
| 233 const <int>[NO_TAG_SEEN, | 233 const <int>[NO_TAG_SEEN, |
| 234 IMPORT, // Only one library tag is allowed. | 234 IMPORT, // Only one library tag is allowed. |
| 235 IMPORT, | 235 IMPORT, |
| 236 SOURCE, | 236 SOURCE, |
| 237 RESOURCE]; | 237 RESOURCE]; |
| 238 } | 238 } |
| OLD | NEW |