| 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 library csslib.src.validate; | 5 library csslib.src.validate; |
| 6 | 6 |
| 7 import 'package:csslib/parser.dart'; | |
| 8 import 'package:csslib/visitor.dart'; | 7 import 'package:csslib/visitor.dart'; |
| 9 import 'package:source_maps/span.dart' show Span; | 8 import 'package:source_maps/span.dart' show Span; |
| 10 | 9 |
| 11 /** Can be thrown on any Css runtime problem includes source location. */ | 10 /** Can be thrown on any Css runtime problem includes source location. */ |
| 12 class CssSelectorException implements Exception { | 11 class CssSelectorException implements Exception { |
| 13 final String _message; | 12 final String _message; |
| 14 final Span _span; | 13 final Span _span; |
| 15 | 14 |
| 16 CssSelectorException(this._message, [this._span]); | 15 CssSelectorException(this._message, [this._span]); |
| 17 | 16 |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 } | 125 } |
| 127 } | 126 } |
| 128 | 127 |
| 129 // Every selector must match. | 128 // Every selector must match. |
| 130 Selector selector = selectors[0]; | 129 Selector selector = selectors[0]; |
| 131 assert((matches >= 0 ? matches : -matches) == | 130 assert((matches >= 0 ? matches : -matches) == |
| 132 selector.simpleSelectorSequences.length); | 131 selector.simpleSelectorSequences.length); |
| 133 } | 132 } |
| 134 } | 133 } |
| 135 | 134 |
| OLD | NEW |