OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |