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

Unified Diff: pkg/analyzer/lib/src/generated/ast.dart

Issue 535543003: New analyzer snapshot. (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: pkg/analyzer/lib/src/generated/ast.dart
diff --git a/pkg/analyzer/lib/src/generated/ast.dart b/pkg/analyzer/lib/src/generated/ast.dart
index cb81866ac7e9f6712d103b7eb467d1817c70c342..1a7a21d0f67dca9695bb65712b4f8e85a950f06b 100644
--- a/pkg/analyzer/lib/src/generated/ast.dart
+++ b/pkg/analyzer/lib/src/generated/ast.dart
@@ -926,10 +926,29 @@ class AssignmentExpression extends Expression {
* operand will be bound
*/
ParameterElement get propagatedParameterElementForRightHandSide {
- if (_propagatedElement == null) {
+ ExecutableElement executableElement = null;
+ if (_propagatedElement != null) {
+ executableElement = _propagatedElement;
+ } else {
+ if (_leftHandSide is Identifier) {
+ Identifier identifier = _leftHandSide as Identifier;
+ Element leftElement = identifier.propagatedElement;
+ if (leftElement is ExecutableElement) {
+ executableElement = leftElement;
+ }
+ }
+ if (_leftHandSide is PropertyAccess) {
+ SimpleIdentifier identifier = (_leftHandSide as PropertyAccess).propertyName;
+ Element leftElement = identifier.propagatedElement;
+ if (leftElement is ExecutableElement) {
+ executableElement = leftElement;
+ }
+ }
+ }
+ if (executableElement == null) {
return null;
}
- List<ParameterElement> parameters = _propagatedElement.parameters;
+ List<ParameterElement> parameters = executableElement.parameters;
if (parameters.length < 1) {
return null;
}
@@ -947,10 +966,27 @@ class AssignmentExpression extends Expression {
* operand will be bound
*/
ParameterElement get staticParameterElementForRightHandSide {
- if (_staticElement == null) {
+ ExecutableElement executableElement = null;
+ if (_staticElement != null) {
+ executableElement = _staticElement;
+ } else {
+ if (_leftHandSide is Identifier) {
+ Element leftElement = (_leftHandSide as Identifier).staticElement;
+ if (leftElement is ExecutableElement) {
+ executableElement = leftElement;
+ }
+ }
+ if (_leftHandSide is PropertyAccess) {
+ Element leftElement = (_leftHandSide as PropertyAccess).propertyName.staticElement;
+ if (leftElement is ExecutableElement) {
+ executableElement = leftElement;
+ }
+ }
+ }
+ if (executableElement == null) {
return null;
}
- List<ParameterElement> parameters = _staticElement.parameters;
+ List<ParameterElement> parameters = executableElement.parameters;
if (parameters.length < 1) {
return null;
}
@@ -7519,6 +7555,21 @@ class FormalParameterList extends AstNode {
*/
abstract class FunctionBody extends AstNode {
/**
+ * Return the token representing the 'async' or 'sync' keyword, or `null` if there is no
+ * such keyword.
+ *
+ * @return the token representing the 'async' or 'sync' keyword
+ */
+ Token get keyword => null;
+
+ /**
+ * Return the star following the 'async' or 'sync' keyword, or `null` if there is no star.
+ *
+ * @return the star following the 'async' or 'sync' keyword
+ */
+ Token get star => null;
+
+ /**
* Return `true` if this function body is asynchronous.
*
* @return `true` if this function body is asynchronous
« no previous file with comments | « pkg/analysis_server/test/integration/analysis/get_hover_test.dart ('k') | pkg/analyzer/lib/src/generated/error.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698