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

Side by Side Diff: lib/src/js/nodes.dart

Issue 974703003: fix dummy setters -- grammar requires an identifier (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 9 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 | « lib/src/codegen/js_codegen.dart ('k') | test/codegen/expect/_isolate_helper/_isolate_helper.js » ('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 part of js_ast; 5 part of js_ast;
6 6
7 abstract class NodeVisitor<T> { 7 abstract class NodeVisitor<T> {
8 T visitProgram(Program node); 8 T visitProgram(Program node);
9 9
10 T visitBlock(Block node); 10 T visitBlock(Block node);
(...skipping 1183 matching lines...) Expand 10 before | Expand all | Expand 10 after
1194 int get precedenceLevel => PRIMARY; 1194 int get precedenceLevel => PRIMARY;
1195 } 1195 }
1196 1196
1197 class Method extends Property { 1197 class Method extends Property {
1198 final bool isGetter; 1198 final bool isGetter;
1199 final bool isSetter; 1199 final bool isSetter;
1200 final bool isStatic; 1200 final bool isStatic;
1201 1201
1202 Method(Expression name, Fun function, 1202 Method(Expression name, Fun function,
1203 {this.isGetter: false, this.isSetter: false, this.isStatic: false}) 1203 {this.isGetter: false, this.isSetter: false, this.isStatic: false})
1204 : super(name, function); 1204 : super(name, function) {
1205 assert(!isGetter || function.params.length == 0);
1206 assert(!isSetter || function.params.length == 1);
1207 }
1205 1208
1206 Fun get function => super.value; 1209 Fun get function => super.value;
1207 1210
1208 accept(NodeVisitor visitor) => visitor.visitMethod(this); 1211 accept(NodeVisitor visitor) => visitor.visitMethod(this);
1209 1212
1210 void visitChildren(NodeVisitor visitor) { 1213 void visitChildren(NodeVisitor visitor) {
1211 name.accept(visitor); 1214 name.accept(visitor);
1212 function.accept(visitor); 1215 function.accept(visitor);
1213 } 1216 }
1214 1217
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
1404 final Expression expression; 1407 final Expression expression;
1405 1408
1406 CommentExpression(this.comment, this.expression); 1409 CommentExpression(this.comment, this.expression);
1407 1410
1408 int get precedenceLevel => PRIMARY; 1411 int get precedenceLevel => PRIMARY;
1409 accept(NodeVisitor visitor) => visitor.visitCommentExpression(this); 1412 accept(NodeVisitor visitor) => visitor.visitCommentExpression(this);
1410 CommentExpression _clone() => new CommentExpression(comment, expression); 1413 CommentExpression _clone() => new CommentExpression(comment, expression);
1411 1414
1412 void visitChildren(NodeVisitor visitor) => expression.accept(visitor); 1415 void visitChildren(NodeVisitor visitor) => expression.accept(visitor);
1413 } 1416 }
OLDNEW
« no previous file with comments | « lib/src/codegen/js_codegen.dart ('k') | test/codegen/expect/_isolate_helper/_isolate_helper.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698