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

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

Issue 2971903006: Add fileEndOffset to Class. (Closed)
Patch Set: Created 3 years, 5 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 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 Body, 578 Body,
579 } 579 }
580 580
581 /// Declaration of a regular class or a mixin application. 581 /// Declaration of a regular class or a mixin application.
582 /// 582 ///
583 /// Mixin applications may not contain fields or procedures, as they implicitly 583 /// Mixin applications may not contain fields or procedures, as they implicitly
584 /// use those from its mixed-in type. However, the IR does not enforce this 584 /// use those from its mixed-in type. However, the IR does not enforce this
585 /// rule directly, as doing so can obstruct transformations. It is possible to 585 /// rule directly, as doing so can obstruct transformations. It is possible to
586 /// transform a mixin application to become a regular class, and vice versa. 586 /// transform a mixin application to become a regular class, and vice versa.
587 class Class extends NamedNode { 587 class Class extends NamedNode {
588 /// End offset in the source file it comes from. Valid values are from 0 and
589 /// up, or -1 ([TreeNode.noOffset]) if the file end offset is not available
590 /// (this is the default if none is specifically set).
591 int fileEndOffset = TreeNode.noOffset;
592
588 /// Offset of the declaration, set and used when writing the binary. 593 /// Offset of the declaration, set and used when writing the binary.
589 int binaryOffset = -1; 594 int binaryOffset = -1;
590 595
591 /// The degree to which the contents of the class have been loaded. 596 /// The degree to which the contents of the class have been loaded.
592 ClassLevel level = ClassLevel.Body; 597 ClassLevel level = ClassLevel.Body;
593 598
594 /// List of metadata annotations on the class. 599 /// List of metadata annotations on the class.
595 /// 600 ///
596 /// This defaults to an immutable empty list. Use [addAnnotation] to add 601 /// This defaults to an immutable empty list. Use [addAnnotation] to add
597 /// annotations if needed. 602 /// annotations if needed.
(...skipping 4024 matching lines...) Expand 10 before | Expand all | Expand 10 after
4622 /// typedef has not been assigned a canonical name yet. 4627 /// typedef has not been assigned a canonical name yet.
4623 /// 4628 ///
4624 /// Returns `null` if the typedef is `null`. 4629 /// Returns `null` if the typedef is `null`.
4625 CanonicalName getCanonicalNameOfTypedef(Typedef typedef_) { 4630 CanonicalName getCanonicalNameOfTypedef(Typedef typedef_) {
4626 if (typedef_ == null) return null; 4631 if (typedef_ == null) return null;
4627 if (typedef_.canonicalName == null) { 4632 if (typedef_.canonicalName == null) {
4628 throw '$typedef_ has no canonical name'; 4633 throw '$typedef_ has no canonical name';
4629 } 4634 }
4630 return typedef_.canonicalName; 4635 return typedef_.canonicalName;
4631 } 4636 }
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