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.parser; | 5 library csslib.parser; |
6 | 6 |
7 import 'dart:math' as math; | 7 import 'dart:math' as math; |
8 | 8 |
9 import 'package:source_maps/span.dart' show SourceFile, Span, FileSpan; | 9 import 'package:source_maps/span.dart' show SourceFile, Span, FileSpan; |
10 | 10 |
(...skipping 984 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
995 * | 995 * |
996 * Two tag name selectors div and span equivalent to: | 996 * Two tag name selectors div and span equivalent to: |
997 * | 997 * |
998 * div { | 998 * div { |
999 * width: 20px; | 999 * width: 20px; |
1000 * } | 1000 * } |
1001 * div span { | 1001 * div span { |
1002 * color: red; | 1002 * color: red; |
1003 * } | 1003 * } |
1004 * | 1004 * |
1005 * Return [null] if no selector or [SelectorGroup] if a selector was parsed. | 1005 * Return [:null:] if no selector or [SelectorGroup] if a selector was parsed. |
1006 */ | 1006 */ |
1007 SelectorGroup _nestedSelector() { | 1007 SelectorGroup _nestedSelector() { |
1008 Messages oldMessages = messages; | 1008 Messages oldMessages = messages; |
1009 _createMessages(); | 1009 _createMessages(); |
1010 | 1010 |
1011 var markedData = _mark; | 1011 var markedData = _mark; |
1012 | 1012 |
1013 // Look a head do we have a nested selector instead of a declaration? | 1013 // Look a head do we have a nested selector instead of a declaration? |
1014 SelectorGroup selGroup = processSelectorGroup(); | 1014 SelectorGroup selGroup = processSelectorGroup(); |
1015 | 1015 |
(...skipping 1648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2664 | 2664 |
2665 if (replace != null && result == null) { | 2665 if (replace != null && result == null) { |
2666 result = new StringBuffer(text.substring(0, i)); | 2666 result = new StringBuffer(text.substring(0, i)); |
2667 } | 2667 } |
2668 | 2668 |
2669 if (result != null) result.write(replace != null ? replace : text[i]); | 2669 if (result != null) result.write(replace != null ? replace : text[i]); |
2670 } | 2670 } |
2671 | 2671 |
2672 return result == null ? text : result.toString(); | 2672 return result == null ? text : result.toString(); |
2673 } | 2673 } |
OLD | NEW |