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

Side by Side Diff: lib/parser.dart

Issue 1899133010: Fix two checked mode bugs introduced by 0.13.0. (Closed) Base URL: https://github.com/dart-lang/csslib.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « CHANGELOG.md ('k') | lib/src/tree.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_span/source_span.dart'; 9 import 'package:source_span/source_span.dart';
10 10
(...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after
768 * 768 *
769 * @mixin IDENT [(args,...)] '{' 769 * @mixin IDENT [(args,...)] '{'
770 * [ruleset | property | directive]* 770 * [ruleset | property | directive]*
771 * '}' 771 * '}'
772 */ 772 */
773 MixinDefinition processMixin() { 773 MixinDefinition processMixin() {
774 _next(); 774 _next();
775 775
776 var name = identifier(); 776 var name = identifier();
777 777
778 var params = <VarDefinition>[]; 778 var params = <TreeNode>[];
779 // Any parameters? 779 // Any parameters?
780 if (_maybeEat(TokenKind.LPAREN)) { 780 if (_maybeEat(TokenKind.LPAREN)) {
781 var mustHaveParam = false; 781 var mustHaveParam = false;
782 var keepGoing = true; 782 var keepGoing = true;
783 while (keepGoing) { 783 while (keepGoing) {
784 var varDef = processVariableOrDirective(mixinParameter: true); 784 var varDef = processVariableOrDirective(mixinParameter: true);
785 if (varDef is VarDefinitionDirective || varDef is VarDefinition) { 785 if (varDef is VarDefinitionDirective || varDef is VarDefinition) {
786 params.add(varDef); 786 params.add(varDef);
787 } else if (mustHaveParam) { 787 } else if (mustHaveParam) {
788 _warning("Expecting parameter", _makeSpan(_peekToken.span)); 788 _warning("Expecting parameter", _makeSpan(_peekToken.span));
(...skipping 1958 matching lines...) Expand 10 before | Expand all | Expand 10 after
2747 2747
2748 if (replace != null && result == null) { 2748 if (replace != null && result == null) {
2749 result = new StringBuffer(text.substring(0, i)); 2749 result = new StringBuffer(text.substring(0, i));
2750 } 2750 }
2751 2751
2752 if (result != null) result.write(replace != null ? replace : text[i]); 2752 if (result != null) result.write(replace != null ? replace : text[i]);
2753 } 2753 }
2754 2754
2755 return result == null ? text : result.toString(); 2755 return result == null ? text : result.toString();
2756 } 2756 }
OLDNEW
« no previous file with comments | « CHANGELOG.md ('k') | lib/src/tree.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698