| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
| 6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
| 7 | 7 |
| 8 library engine.ast; | 8 library engine.ast; |
| 9 | 9 |
| 10 import 'dart:collection'; | 10 import 'dart:collection'; |
| (...skipping 3837 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3848 * The label associated with the statement, or `null` if there is no label. | 3848 * The label associated with the statement, or `null` if there is no label. |
| 3849 */ | 3849 */ |
| 3850 SimpleIdentifier _label; | 3850 SimpleIdentifier _label; |
| 3851 | 3851 |
| 3852 /** | 3852 /** |
| 3853 * The semicolon terminating the statement. | 3853 * The semicolon terminating the statement. |
| 3854 */ | 3854 */ |
| 3855 Token semicolon; | 3855 Token semicolon; |
| 3856 | 3856 |
| 3857 /** | 3857 /** |
| 3858 * The AstNode which this break statement is breaking from. This will be |
| 3859 * either a Statement (in the case of breaking out of a loop) or a |
| 3860 * SwitchMember (in the case of a labeled break statement whose label matches |
| 3861 * a label on a switch case in an enclosing switch statement). Null if the |
| 3862 * AST has not yet been resolved or if the target could not be resolved. |
| 3863 * Note that if the source code has errors, the target may be invalid (e.g. |
| 3864 * trying to break to a switch case). |
| 3865 */ |
| 3866 AstNode target; |
| 3867 |
| 3868 /** |
| 3858 * Initialize a newly created break statement. | 3869 * Initialize a newly created break statement. |
| 3859 * | 3870 * |
| 3860 * @param keyword the token representing the 'break' keyword | 3871 * @param keyword the token representing the 'break' keyword |
| 3861 * @param label the label associated with the statement | 3872 * @param label the label associated with the statement |
| 3862 * @param semicolon the semicolon terminating the statement | 3873 * @param semicolon the semicolon terminating the statement |
| 3863 */ | 3874 */ |
| 3864 BreakStatement(this.keyword, SimpleIdentifier label, this.semicolon) { | 3875 BreakStatement(this.keyword, SimpleIdentifier label, this.semicolon) { |
| 3865 _label = becomeParentOf(label); | 3876 _label = becomeParentOf(label); |
| 3866 } | 3877 } |
| 3867 | 3878 |
| (...skipping 2216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6084 * The label associated with the statement, or `null` if there is no label. | 6095 * The label associated with the statement, or `null` if there is no label. |
| 6085 */ | 6096 */ |
| 6086 SimpleIdentifier _label; | 6097 SimpleIdentifier _label; |
| 6087 | 6098 |
| 6088 /** | 6099 /** |
| 6089 * The semicolon terminating the statement. | 6100 * The semicolon terminating the statement. |
| 6090 */ | 6101 */ |
| 6091 Token semicolon; | 6102 Token semicolon; |
| 6092 | 6103 |
| 6093 /** | 6104 /** |
| 6105 * The AstNode which this continue statement is continuing to. This will be |
| 6106 * either a Statement (in the case of continuing a loop) or a SwitchMember |
| 6107 * (in the case of continuing from one switch case to another). Null if the |
| 6108 * AST has not yet been resolved or if the target could not be resolved. |
| 6109 * Note that if the source code has errors, the target may be invalid (e.g. |
| 6110 * the target may be in an enclosing function). |
| 6111 */ |
| 6112 AstNode target; |
| 6113 |
| 6114 /** |
| 6094 * Initialize a newly created continue statement. | 6115 * Initialize a newly created continue statement. |
| 6095 * | 6116 * |
| 6096 * @param keyword the token representing the 'continue' keyword | 6117 * @param keyword the token representing the 'continue' keyword |
| 6097 * @param label the label associated with the statement | 6118 * @param label the label associated with the statement |
| 6098 * @param semicolon the semicolon terminating the statement | 6119 * @param semicolon the semicolon terminating the statement |
| 6099 */ | 6120 */ |
| 6100 ContinueStatement(this.keyword, SimpleIdentifier label, this.semicolon) { | 6121 ContinueStatement(this.keyword, SimpleIdentifier label, this.semicolon) { |
| 6101 _label = becomeParentOf(label); | 6122 _label = becomeParentOf(label); |
| 6102 } | 6123 } |
| 6103 | 6124 |
| (...skipping 1672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7776 } | 7797 } |
| 7777 | 7798 |
| 7778 /** | 7799 /** |
| 7779 * Return the expression evaluated to produce the iterator. | 7800 * Return the expression evaluated to produce the iterator. |
| 7780 * | 7801 * |
| 7781 * @return the expression evaluated to produce the iterator | 7802 * @return the expression evaluated to produce the iterator |
| 7782 */ | 7803 */ |
| 7783 Expression get iterable => _iterable; | 7804 Expression get iterable => _iterable; |
| 7784 | 7805 |
| 7785 /** | 7806 /** |
| 7786 * Return the expression evaluated to produce the iterator. | |
| 7787 * | |
| 7788 * Deprecated, use [iterable] instead. | |
| 7789 */ | |
| 7790 @deprecated | |
| 7791 Expression get iterator => iterable; | |
| 7792 | |
| 7793 /** | |
| 7794 * Set the expression evaluated to produce the iterator to the given expressio
n. | 7807 * Set the expression evaluated to produce the iterator to the given expressio
n. |
| 7795 * | 7808 * |
| 7796 * @param expression the expression evaluated to produce the iterator | 7809 * @param expression the expression evaluated to produce the iterator |
| 7797 */ | 7810 */ |
| 7798 void set iterable(Expression expression) { | 7811 void set iterable(Expression expression) { |
| 7799 _iterable = becomeParentOf(expression); | 7812 _iterable = becomeParentOf(expression); |
| 7800 } | 7813 } |
| 7801 | 7814 |
| 7802 /** | 7815 /** |
| 7816 * Return the expression evaluated to produce the iterator. |
| 7817 * |
| 7818 * Deprecated, use [iterable] instead. |
| 7819 */ |
| 7820 @deprecated |
| 7821 Expression get iterator => iterable; |
| 7822 |
| 7823 /** |
| 7803 * Return the declaration of the loop variable, or `null` if the loop variable
is a simple | 7824 * Return the declaration of the loop variable, or `null` if the loop variable
is a simple |
| 7804 * identifier. | 7825 * identifier. |
| 7805 * | 7826 * |
| 7806 * @return the declaration of the loop variable | 7827 * @return the declaration of the loop variable |
| 7807 */ | 7828 */ |
| 7808 DeclaredIdentifier get loopVariable => _loopVariable; | 7829 DeclaredIdentifier get loopVariable => _loopVariable; |
| 7809 | 7830 |
| 7810 /** | 7831 /** |
| 7811 * Set the declaration of the loop variable to the given variable. | 7832 * Set the declaration of the loop variable to the given variable. |
| 7812 * | 7833 * |
| (...skipping 3911 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11724 /** | 11745 /** |
| 11725 * Set the statement with which the labels are being associated to the given s
tatement. | 11746 * Set the statement with which the labels are being associated to the given s
tatement. |
| 11726 * | 11747 * |
| 11727 * @param statement the statement with which the labels are being associated | 11748 * @param statement the statement with which the labels are being associated |
| 11728 */ | 11749 */ |
| 11729 void set statement(Statement statement) { | 11750 void set statement(Statement statement) { |
| 11730 _statement = becomeParentOf(statement); | 11751 _statement = becomeParentOf(statement); |
| 11731 } | 11752 } |
| 11732 | 11753 |
| 11733 @override | 11754 @override |
| 11755 Statement get unlabeled => _statement.unlabeled; |
| 11756 |
| 11757 @override |
| 11734 accept(AstVisitor visitor) => visitor.visitLabeledStatement(this); | 11758 accept(AstVisitor visitor) => visitor.visitLabeledStatement(this); |
| 11735 | 11759 |
| 11736 @override | 11760 @override |
| 11737 void visitChildren(AstVisitor visitor) { | 11761 void visitChildren(AstVisitor visitor) { |
| 11738 _labels.accept(visitor); | 11762 _labels.accept(visitor); |
| 11739 safelyVisitChild(_statement, visitor); | 11763 safelyVisitChild(_statement, visitor); |
| 11740 } | 11764 } |
| 11741 } | 11765 } |
| 11742 | 11766 |
| 11743 /** | 11767 /** |
| (...skipping 5474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 17218 * | [IfStatement] | 17242 * | [IfStatement] |
| 17219 * | [TryStatement] | 17243 * | [TryStatement] |
| 17220 * | [BreakStatement] | 17244 * | [BreakStatement] |
| 17221 * | [ContinueStatement] | 17245 * | [ContinueStatement] |
| 17222 * | [ReturnStatement] | 17246 * | [ReturnStatement] |
| 17223 * | [ExpressionStatement] | 17247 * | [ExpressionStatement] |
| 17224 * | [FunctionDeclarationStatement] | 17248 * | [FunctionDeclarationStatement] |
| 17225 * </pre> | 17249 * </pre> |
| 17226 */ | 17250 */ |
| 17227 abstract class Statement extends AstNode { | 17251 abstract class Statement extends AstNode { |
| 17252 /** |
| 17253 * If this is a labeled statement, return the unlabeled portion of the |
| 17254 * statement. Otherwise return the statement itself. |
| 17255 */ |
| 17256 Statement get unlabeled => this; |
| 17228 } | 17257 } |
| 17229 | 17258 |
| 17230 /** | 17259 /** |
| 17231 * Instances of the class `StringInterpolation` represent a string interpolation
literal. | 17260 * Instances of the class `StringInterpolation` represent a string interpolation
literal. |
| 17232 * | 17261 * |
| 17233 * <pre> | 17262 * <pre> |
| 17234 * stringInterpolation ::= | 17263 * stringInterpolation ::= |
| 17235 * ''' [InterpolationElement]* ''' | 17264 * ''' [InterpolationElement]* ''' |
| 17236 * | '"' [InterpolationElement]* '"' | 17265 * | '"' [InterpolationElement]* '"' |
| 17237 * </pre> | 17266 * </pre> |
| (...skipping 3436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 20674 } | 20703 } |
| 20675 | 20704 |
| 20676 @override | 20705 @override |
| 20677 accept(AstVisitor visitor) => visitor.visitYieldStatement(this); | 20706 accept(AstVisitor visitor) => visitor.visitYieldStatement(this); |
| 20678 | 20707 |
| 20679 @override | 20708 @override |
| 20680 void visitChildren(AstVisitor visitor) { | 20709 void visitChildren(AstVisitor visitor) { |
| 20681 safelyVisitChild(_expression, visitor); | 20710 safelyVisitChild(_expression, visitor); |
| 20682 } | 20711 } |
| 20683 } | 20712 } |
| OLD | NEW |