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

Unified Diff: sdk/lib/_internal/compiler/implementation/elements/modelx.dart

Issue 562123002: Support parameter access in analyzer2dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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/elements/modelx.dart
diff --git a/sdk/lib/_internal/compiler/implementation/elements/modelx.dart b/sdk/lib/_internal/compiler/implementation/elements/modelx.dart
index 0a27aee18e6f302a6ed701f0387c5baf2cd3c5c5..48cdc49f534bd79f1010e81be937d8bc7bcf0ab3 100644
--- a/sdk/lib/_internal/compiler/implementation/elements/modelx.dart
+++ b/sdk/lib/_internal/compiler/implementation/elements/modelx.dart
@@ -118,6 +118,8 @@ abstract class ElementX extends Element {
bool get isMixinApplication => false;
+ bool get isLocal => false;
+
// TODO(johnniwinther): This breaks for libraries (for which enclosing
// elements are null) and is invalid for top level variable declarations for
// which the enclosing element is a VariableDeclarations and not a compilation
@@ -1229,6 +1231,8 @@ class LocalVariableElementX extends VariableElementX
ExecutableElement get executableContext => enclosingElement;
ExecutableElement get memberContext => executableContext.memberContext;
+
+ bool get isLocal => true;
}
class FieldElementX extends VariableElementX
@@ -1335,6 +1339,8 @@ abstract class ParameterElementX extends FormalElementX
MemberElement get memberContext => executableContext.memberContext;
accept(ElementVisitor visitor) => visitor.visitParameterElement(this);
+
+ bool get isLocal => true;
}
class LocalParameterElementX extends ParameterElementX
@@ -1364,6 +1370,8 @@ class InitializingFormalElementX extends ParameterElementX
accept(ElementVisitor visitor) => visitor.visitFieldParameterElement(this);
MemberElement get memberContext => enclosingElement;
+
+ bool get isLocal => false;
}
@@ -1639,6 +1647,8 @@ class LocalFunctionElementX extends BaseFunctionElementX
return node.getBeginToken();
}
}
+
+ bool get isLocal => true;
}
abstract class ConstructorElementX extends FunctionElementX

Powered by Google App Engine
This is Rietveld 408576698