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

Side by Side Diff: lib/compiler/implementation/elements/elements.dart

Issue 10913133: Allow closures inside lazy initializers. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 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 #library('elements'); 5 #library('elements');
6 6
7 #import('dart:uri'); 7 #import('dart:uri');
8 8
9 #import('../tree/tree.dart'); 9 #import('../tree/tree.dart');
10 #import('../scanner/scannerlib.dart'); 10 #import('../scanner/scannerlib.dart');
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 // cases, for example, for function typed parameters. 655 // cases, for example, for function typed parameters.
656 Token position() => findMyName(variables.position()); 656 Token position() => findMyName(variables.position());
657 657
658 VariableElement cloneTo(Element enclosing, DiagnosticListener listener) { 658 VariableElement cloneTo(Element enclosing, DiagnosticListener listener) {
659 VariableListElement clonedVariables = 659 VariableListElement clonedVariables =
660 variables.cloneTo(enclosing, listener); 660 variables.cloneTo(enclosing, listener);
661 VariableElement result = new VariableElement( 661 VariableElement result = new VariableElement(
662 name, clonedVariables, kind, enclosing, cachedNode); 662 name, clonedVariables, kind, enclosing, cachedNode);
663 return result; 663 return result;
664 } 664 }
665
666 Scope buildScope() => variables.buildScope();
665 } 667 }
666 668
667 /** 669 /**
668 * Parameters in constructors that directly initialize fields. For example: 670 * Parameters in constructors that directly initialize fields. For example:
669 * [:A(this.field):]. 671 * [:A(this.field):].
670 */ 672 */
671 class FieldParameterElement extends VariableElement { 673 class FieldParameterElement extends VariableElement {
672 VariableElement fieldElement; 674 VariableElement fieldElement;
673 675
674 FieldParameterElement(SourceString name, 676 FieldParameterElement(SourceString name,
(...skipping 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after
1688 1690
1689 MetadataAnnotation ensureResolved(Compiler compiler) { 1691 MetadataAnnotation ensureResolved(Compiler compiler) {
1690 if (resolutionState == STATE_NOT_STARTED) { 1692 if (resolutionState == STATE_NOT_STARTED) {
1691 compiler.resolver.resolveMetadataAnnotation(this); 1693 compiler.resolver.resolveMetadataAnnotation(this);
1692 } 1694 }
1693 return this; 1695 return this;
1694 } 1696 }
1695 1697
1696 String toString() => 'MetadataAnnotation($value, $resolutionState)'; 1698 String toString() => 'MetadataAnnotation($value, $resolutionState)';
1697 } 1699 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698