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

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

Issue 14969004: Implement continue for switch. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Comment updated. Created 7 years, 7 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
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/resolution/members.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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.modelx; 5 library elements.modelx;
6 6
7 import 'dart:uri'; 7 import 'dart:uri';
8 import 'dart:collection' show LinkedHashMap; 8 import 'dart:collection' show LinkedHashMap;
9 9
10 import 'elements.dart'; 10 import 'elements.dart';
(...skipping 1989 matching lines...) Expand 10 before | Expand all | Expand 10 after
2000 // Represents a reference to a statement or switch-case, either by label or the 2000 // Represents a reference to a statement or switch-case, either by label or the
2001 // default target of a break or continue. 2001 // default target of a break or continue.
2002 class TargetElementX extends ElementX implements TargetElement { 2002 class TargetElementX extends ElementX implements TargetElement {
2003 final Node statement; 2003 final Node statement;
2004 final int nestingLevel; 2004 final int nestingLevel;
2005 Link<LabelElement> labels = const Link<LabelElement>(); 2005 Link<LabelElement> labels = const Link<LabelElement>();
2006 bool isBreakTarget = false; 2006 bool isBreakTarget = false;
2007 bool isContinueTarget = false; 2007 bool isContinueTarget = false;
2008 2008
2009 TargetElementX(this.statement, this.nestingLevel, Element enclosingElement) 2009 TargetElementX(this.statement, this.nestingLevel, Element enclosingElement)
2010 : super(const SourceString(""), ElementKind.STATEMENT, enclosingElement); 2010 : super(const SourceString("target"),
2011 ElementKind.STATEMENT, enclosingElement);
2011 bool get isTarget => isBreakTarget || isContinueTarget; 2012 bool get isTarget => isBreakTarget || isContinueTarget;
2012 2013
2013 LabelElement addLabel(Label label, String labelName) { 2014 LabelElement addLabel(Label label, String labelName) {
2014 LabelElement result = new LabelElementX(label, labelName, this, 2015 LabelElement result = new LabelElementX(label, labelName, this,
2015 enclosingElement); 2016 enclosingElement);
2016 labels = labels.prepend(result); 2017 labels = labels.prepend(result);
2017 return result; 2018 return result;
2018 } 2019 }
2019 2020
2020 Node parseNode(DiagnosticListener l) => statement; 2021 Node parseNode(DiagnosticListener l) => statement;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
2085 2086
2086 MetadataAnnotation ensureResolved(Compiler compiler) { 2087 MetadataAnnotation ensureResolved(Compiler compiler) {
2087 if (resolutionState == STATE_NOT_STARTED) { 2088 if (resolutionState == STATE_NOT_STARTED) {
2088 compiler.resolver.resolveMetadataAnnotation(this); 2089 compiler.resolver.resolveMetadataAnnotation(this);
2089 } 2090 }
2090 return this; 2091 return this;
2091 } 2092 }
2092 2093
2093 String toString() => 'MetadataAnnotation($value, $resolutionState)'; 2094 String toString() => 'MetadataAnnotation($value, $resolutionState)';
2094 } 2095 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/resolution/members.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698