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

Side by Side Diff: pkg/front_end/lib/src/fasta/kernel/body_builder.dart

Issue 3004693002: [kernel] Add offset to SwitchContinueStatement; add debugging test (Closed)
Patch Set: ... Created 3 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
« no previous file with comments | « no previous file | pkg/kernel/binary.md » ('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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 fasta.body_builder; 5 library fasta.body_builder;
6 6
7 import 'package:kernel/ast.dart' 7 import 'package:kernel/ast.dart'
8 hide InvalidExpression, InvalidInitializer, InvalidStatement; 8 hide InvalidExpression, InvalidInitializer, InvalidStatement;
9 9
10 import 'package:kernel/class_hierarchy.dart' show ClassHierarchy; 10 import 'package:kernel/class_hierarchy.dart' show ClassHierarchy;
(...skipping 2976 matching lines...) Expand 10 before | Expand all | Expand 10 after
2987 push(deprecated_buildCompileTimeErrorStatement( 2987 push(deprecated_buildCompileTimeErrorStatement(
2988 "Can't find label '$name'.", continueKeyword.next.charOffset)); 2988 "Can't find label '$name'.", continueKeyword.next.charOffset));
2989 return; 2989 return;
2990 } 2990 }
2991 switchScope.forwardDeclareLabel(identifier.name, 2991 switchScope.forwardDeclareLabel(identifier.name,
2992 target = createGotoTarget(offsetForToken(identifier.token))); 2992 target = createGotoTarget(offsetForToken(identifier.token)));
2993 } 2993 }
2994 if (target.isGotoTarget && 2994 if (target.isGotoTarget &&
2995 target.functionNestingLevel == functionNestingLevel) { 2995 target.functionNestingLevel == functionNestingLevel) {
2996 ContinueSwitchStatement statement = 2996 ContinueSwitchStatement statement =
2997 new KernelContinueSwitchStatement(null); 2997 new KernelContinueSwitchStatement(null)
2998 ..fileOffset = continueKeyword.charOffset;
2998 target.addGoto(statement); 2999 target.addGoto(statement);
2999 push(statement); 3000 push(statement);
3000 return; 3001 return;
3001 } 3002 }
3002 } 3003 }
3003 if (target == null) { 3004 if (target == null) {
3004 push(compileTimeErrorInLoopOrSwitch = 3005 push(compileTimeErrorInLoopOrSwitch =
3005 deprecated_buildCompileTimeErrorStatement( 3006 deprecated_buildCompileTimeErrorStatement(
3006 "No target of continue.", continueKeyword.charOffset)); 3007 "No target of continue.", continueKeyword.charOffset));
3007 } else if (!target.isContinueTarget) { 3008 } else if (!target.isContinueTarget) {
(...skipping 814 matching lines...) Expand 10 before | Expand all | Expand 10 after
3822 return AsyncMarker.Async; 3823 return AsyncMarker.Async;
3823 } else { 3824 } else {
3824 assert(identical(starToken.stringValue, "*")); 3825 assert(identical(starToken.stringValue, "*"));
3825 return AsyncMarker.AsyncStar; 3826 return AsyncMarker.AsyncStar;
3826 } 3827 }
3827 } else { 3828 } else {
3828 return unhandled(asyncToken.lexeme, "asyncMarkerFromTokens", 3829 return unhandled(asyncToken.lexeme, "asyncMarkerFromTokens",
3829 asyncToken.charOffset, null); 3830 asyncToken.charOffset, null);
3830 } 3831 }
3831 } 3832 }
OLDNEW
« no previous file with comments | « no previous file | pkg/kernel/binary.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698