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

Side by Side Diff: lib/html/scripts/idlparser.dart

Issue 11238035: Make isEmpty a getter. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status file with co19 issue number. Created 8 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « lib/html/dartium/html_dartium.dart ('k') | lib/html/scripts/idlrenderer.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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 // IDL grammar variants. 5 // IDL grammar variants.
6 const int WEBIDL_SYNTAX = 0; 6 const int WEBIDL_SYNTAX = 0;
7 const int WEBKIT_SYNTAX = 1; 7 const int WEBKIT_SYNTAX = 1;
8 const int FREMONTCUT_SYNTAX = 2; 8 const int FREMONTCUT_SYNTAX = 2;
9 9
10 /** 10 /**
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 for (var element in associationList) { 170 for (var element in associationList) {
171 var name = element[0]; 171 var name = element[0];
172 var value = element[1]; 172 var value = element[1];
173 map[name] = value; 173 map[name] = value;
174 } 174 }
175 } 175 }
176 176
177 bool has(String key) => map.containsKey(key); 177 bool has(String key) => map.containsKey(key);
178 178
179 formatMap() { 179 formatMap() {
180 if (map.isEmpty()) 180 if (map.isEmpty)
181 return ''; 181 return '';
182 StringBuffer sb = new StringBuffer(); 182 StringBuffer sb = new StringBuffer();
183 map.forEach((k, v) { 183 map.forEach((k, v) {
184 sb.add(' $k'); 184 sb.add(' $k');
185 if (v != null) { 185 if (v != null) {
186 sb.add('=$v'); 186 sb.add('=$v');
187 } 187 }
188 }); 188 });
189 return sb.toString(); 189 return sb.toString();
190 } 190 }
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 OR([MANY(CHAR(' \t\r\n')), 540 OR([MANY(CHAR(' \t\r\n')),
541 ['//', MANY0([NOT(CHAR('\r\n')), CHAR()])], 541 ['//', MANY0([NOT(CHAR('\r\n')), CHAR()])],
542 ['#', MANY0([NOT(CHAR('\r\n')), CHAR()])], 542 ['#', MANY0([NOT(CHAR('\r\n')), CHAR()])],
543 ['/*', MANY0([NOT('*/'), CHAR()]), '*/']]); 543 ['/*', MANY0([NOT('*/'), CHAR()]), '*/']]);
544 544
545 // Top level - at least one definition. 545 // Top level - at least one definition.
546 return MANY(Definition); 546 return MANY(Definition);
547 547
548 } 548 }
549 } 549 }
OLDNEW
« no previous file with comments | « lib/html/dartium/html_dartium.dart ('k') | lib/html/scripts/idlrenderer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698