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

Side by Side Diff: pkg/kernel/lib/ast.dart

Issue 2999633002: [kernel] Offsets on loops (Closed)
Patch Set: Fix Created 3 years, 4 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 | « pkg/kernel/binary.md ('k') | pkg/kernel/lib/binary/ast_from_binary.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) 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 /// ----------------------------------------------------------------------- 5 /// -----------------------------------------------------------------------
6 /// ERROR HANDLING 6 /// ERROR HANDLING
7 /// ----------------------------------------------------------------------- 7 /// -----------------------------------------------------------------------
8 /// 8 ///
9 /// As a rule of thumb, errors that can be detected statically are handled by 9 /// As a rule of thumb, errors that can be detected statically are handled by
10 /// the frontend, typically by translating the erroneous code into a 'throw' or 10 /// the frontend, typically by translating the erroneous code into a 'throw' or
(...skipping 3414 matching lines...) Expand 10 before | Expand all | Expand 10 after
3425 } 3425 }
3426 transformList(updates, v, this); 3426 transformList(updates, v, this);
3427 if (body != null) { 3427 if (body != null) {
3428 body = body.accept(v); 3428 body = body.accept(v);
3429 body?.parent = this; 3429 body?.parent = this;
3430 } 3430 }
3431 } 3431 }
3432 } 3432 }
3433 3433
3434 class ForInStatement extends Statement { 3434 class ForInStatement extends Statement {
3435 /// Offset in the source file it comes from.
3436 ///
3437 /// Valid values are from 0 and up, or -1 ([TreeNode.noOffset]) if the file of fset is
Johnni Winther 2017/08/08 11:00:42 Long line.
3438 /// not available (this is the default if none is specifically set).
3439 int bodyOffset = TreeNode.noOffset;
3440
3435 VariableDeclaration variable; // Has no initializer. 3441 VariableDeclaration variable; // Has no initializer.
3436 Expression iterable; 3442 Expression iterable;
3437 Statement body; 3443 Statement body;
3438 bool isAsync; // True if this is an 'await for' loop. 3444 bool isAsync; // True if this is an 'await for' loop.
3439 3445
3440 ForInStatement(this.variable, this.iterable, this.body, 3446 ForInStatement(this.variable, this.iterable, this.body,
3441 {this.isAsync: false}) { 3447 {this.isAsync: false}) {
3442 variable?.parent = this; 3448 variable?.parent = this;
3443 iterable?.parent = this; 3449 iterable?.parent = this;
3444 body?.parent = this; 3450 body?.parent = this;
(...skipping 1295 matching lines...) Expand 10 before | Expand all | Expand 10 after
4740 if (typedef_.canonicalName == null) { 4746 if (typedef_.canonicalName == null) {
4741 throw '$typedef_ has no canonical name'; 4747 throw '$typedef_ has no canonical name';
4742 } 4748 }
4743 return typedef_.canonicalName; 4749 return typedef_.canonicalName;
4744 } 4750 }
4745 4751
4746 /// Annotation describing information which is not part of Dart semantics; in 4752 /// Annotation describing information which is not part of Dart semantics; in
4747 /// other words, if this information (or any information it refers to) changes, 4753 /// other words, if this information (or any information it refers to) changes,
4748 /// static analysis and runtime behavior of the library are unaffected. 4754 /// static analysis and runtime behavior of the library are unaffected.
4749 const informative = null; 4755 const informative = null;
OLDNEW
« no previous file with comments | « pkg/kernel/binary.md ('k') | pkg/kernel/lib/binary/ast_from_binary.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698