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

Side by Side Diff: compiler/java/com/google/dart/compiler/resolver/MethodElementImplementation.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.resolver; 5 package com.google.dart.compiler.resolver;
6 6
7 import com.google.common.annotations.VisibleForTesting; 7 import com.google.common.annotations.VisibleForTesting;
8 import com.google.common.collect.ImmutableSet; 8 import com.google.common.collect.ImmutableSet;
9 import com.google.dart.compiler.ast.DartBlock; 9 import com.google.dart.compiler.ast.DartBlock;
10 import com.google.dart.compiler.ast.DartClass; 10 import com.google.dart.compiler.ast.DartClass;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 this.nameLocation = node.getName().getSourceInfo(); 48 this.nameLocation = node.getName().getSourceInfo();
49 } else { 49 } else {
50 this.nameLocation = SourceInfo.UNKNOWN; 50 this.nameLocation = SourceInfo.UNKNOWN;
51 } 51 }
52 } 52 }
53 53
54 protected MethodElementImplementation(DartMethodDefinition node, String name, 54 protected MethodElementImplementation(DartMethodDefinition node, String name,
55 EnclosingElement holder) { 55 EnclosingElement holder) {
56 super(node, name); 56 super(node, name);
57 if (node != null) { 57 if (node != null) {
58 this.metadata = node.getMetadata(); 58 this.metadata = node.getObsoleteMetadata();
59 this.modifiers = node.getModifiers(); 59 this.modifiers = node.getModifiers();
60 this.nameLocation = node.getName().getSourceInfo(); 60 this.nameLocation = node.getName().getSourceInfo();
61 DartBlock body = node.getFunction().getBody(); 61 DartBlock body = node.getFunction().getBody();
62 this.hasBody = body != null && !(body instanceof DartNativeBlock); 62 this.hasBody = body != null && !(body instanceof DartNativeBlock);
63 } else { 63 } else {
64 this.metadata = DartObsoleteMetadata.EMPTY; 64 this.metadata = DartObsoleteMetadata.EMPTY;
65 this.modifiers = Modifiers.NONE; 65 this.modifiers = Modifiers.NONE;
66 this.nameLocation = SourceInfo.UNKNOWN; 66 this.nameLocation = SourceInfo.UNKNOWN;
67 this.hasBody = false; 67 this.hasBody = false;
68 } 68 }
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 } 188 }
189 189
190 public void setOverridden(Set<Element> overridden) { 190 public void setOverridden(Set<Element> overridden) {
191 this.overridden = overridden; 191 this.overridden = overridden;
192 } 192 }
193 193
194 public Set<Element> getOverridden() { 194 public Set<Element> getOverridden() {
195 return overridden; 195 return overridden;
196 } 196 }
197 } 197 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698