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

Unified Diff: sdk/lib/_internal/compiler/implementation/mirrors/mirrors.dart

Issue 18323004: Add lookupInScope to DeclarationMirror. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add test + fix implementation. Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: sdk/lib/_internal/compiler/implementation/mirrors/mirrors.dart
diff --git a/sdk/lib/_internal/compiler/implementation/mirrors/mirrors.dart b/sdk/lib/_internal/compiler/implementation/mirrors/mirrors.dart
index 54e71ad4d3a285f4f69a3f913b27419a2191b4d3..930403b305f43bc1c13a78cf35cf353274a49bd8 100644
--- a/sdk/lib/_internal/compiler/implementation/mirrors/mirrors.dart
+++ b/sdk/lib/_internal/compiler/implementation/mirrors/mirrors.dart
@@ -105,6 +105,23 @@ abstract class DeclarationMirror implements Mirror {
* A list of the metadata associated with this declaration.
*/
List<InstanceMirror> get metadata;
+
+ /**
+ * Looks up [name] in the scope of this declaration.
+ *
+ * [name] may be either a single identifier or of the form [: prefix.id :].
+ * For methods and constructors, the scope includes the parameters. For
+ * classes and typedefs, the scope includes the type variables.
+ * For classes and class members, the scope includes inherited members.
+ *
+ * See also:
+ *
+ * * [Lexical Scope](https://www.dartlang.org/docs/dart-up-and-running/contents/ch02.html#ch02-lexical-scope)
+ * in Dart Up and Running.
+ * * [Lexical Scoping](http://www.dartlang.org/docs/spec/latest/dart-language-specification.html#h.jb82efuudrc5)
+ * in the Dart Specification.
+ */
+ DeclarationMirror lookupInScope(String name);
}
abstract class ObjectMirror implements Mirror {

Powered by Google App Engine
This is Rietveld 408576698