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

Side by Side Diff: compiler/java/com/google/dart/compiler/ast/DartFieldDefinition.java

Issue 10860012: Add support for metadata annotation syntax (issue 4056) (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
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 package com.google.dart.compiler.ast; 5 package com.google.dart.compiler.ast;
6 6
7 import java.util.List; 7 import java.util.List;
8 8
9 /** 9 /**
10 * Represents a Dart field definition. 10 * Represents a Dart field definition.
11 */ 11 */
12 public class DartFieldDefinition extends DartNode { 12 public class DartFieldDefinition extends DartNodeWithMetadata {
13 13
14 private DartTypeNode typeNode; 14 private DartTypeNode typeNode;
15 private final NodeList<DartField> fields = NodeList.create(this); 15 private final NodeList<DartField> fields = NodeList.create(this);
16 16
17 public DartFieldDefinition(DartTypeNode typeNode, List<DartField> fields) { 17 public DartFieldDefinition(DartTypeNode typeNode, List<DartField> fields) {
18 this.setTypeNode(typeNode); 18 this.setTypeNode(typeNode);
19 this.fields.addAll(fields); 19 this.fields.addAll(fields);
20 } 20 }
21 21
22 public DartTypeNode getTypeNode() { 22 public DartTypeNode getTypeNode() {
(...skipping 12 matching lines...) Expand all
35 public void visitChildren(ASTVisitor<?> visitor) { 35 public void visitChildren(ASTVisitor<?> visitor) {
36 safelyVisitChild(typeNode, visitor); 36 safelyVisitChild(typeNode, visitor);
37 fields.accept(visitor); 37 fields.accept(visitor);
38 } 38 }
39 39
40 @Override 40 @Override
41 public <R> R accept(ASTVisitor<R> visitor) { 41 public <R> R accept(ASTVisitor<R> visitor) {
42 return visitor.visitFieldDefinition(this); 42 return visitor.visitFieldDefinition(this);
43 } 43 }
44 } 44 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698