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

Side by Side Diff: dart/lib/compiler/implementation/patch_parser.dart

Issue 10876008: Remove most superfluous getter arguments from dart2js. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 4 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
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("patchparser"); 5 #library("patchparser");
6 #import("dart:uri"); 6 #import("dart:uri");
7 7
8 #import("tree/tree.dart", prefix: "tree"); 8 #import("tree/tree.dart", prefix: "tree");
9 #import("leg.dart", prefix: 'leg'); // CompilerTask, Compiler. 9 #import("leg.dart", prefix: 'leg'); // CompilerTask, Compiler.
10 #import("apiimpl.dart"); 10 #import("apiimpl.dart");
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 void endPatch(Token patch); 88 void endPatch(Token patch);
89 } 89 }
90 90
91 /** 91 /**
92 * Partial parser that extends the top-level and class grammars to allow the 92 * Partial parser that extends the top-level and class grammars to allow the
93 * word "patch" in front of some declarations. 93 * word "patch" in front of some declarations.
94 */ 94 */
95 class PatchParser extends PartialParser { 95 class PatchParser extends PartialParser {
96 PatchParser(PatchListener listener) : super(listener); 96 PatchParser(PatchListener listener) : super(listener);
97 97
98 PatchListener get patchListener() => listener; 98 PatchListener get patchListener => listener;
99 99
100 bool isPatch(Token token) { 100 bool isPatch(Token token) {
101 return token.stringValue === null && 101 return token.stringValue === null &&
102 token.slowToString() == "patch"; 102 token.slowToString() == "patch";
103 } 103 }
104 104
105 /** 105 /**
106 * Parse top-level declarations, and allow "patch" in front of functions 106 * Parse top-level declarations, and allow "patch" in front of functions
107 * and classes. 107 * and classes.
108 */ 108 */
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 } 279 }
280 } 280 }
281 281
282 void addMember(Element element) { 282 void addMember(Element element) {
283 if (isMemberPatch || (isClassPatch && element is ClassElement)) { 283 if (isMemberPatch || (isClassPatch && element is ClassElement)) {
284 element.addMetadata(popNode()); 284 element.addMetadata(popNode());
285 } 285 }
286 super.addMember(element); 286 super.addMember(element);
287 } 287 }
288 } 288 }
OLDNEW
« no previous file with comments | « dart/lib/compiler/implementation/namer.dart ('k') | dart/lib/compiler/implementation/resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698