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

Side by Side Diff: pkg/analyzer_experimental/lib/src/generated/ast.dart

Issue 29083004: Restore CompilationUnit.lineInfo in Java and Dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 | Annotate | Revision Log
OLDNEW
1 // This code was auto-generated, is not intended to be edited, and is subject to 1 // This code was auto-generated, is not intended to be edited, and is subject to
2 // significant change. Please see the README file for more information. 2 // significant change. Please see the README file for more information.
3 library engine.ast; 3 library engine.ast;
4 import 'dart:collection'; 4 import 'dart:collection';
5 import 'java_core.dart'; 5 import 'java_core.dart';
6 import 'java_engine.dart'; 6 import 'java_engine.dart';
7 import 'package:analyzer_experimental/src/generated/source.dart' show LineInfo; 7 import 'source.dart' show LineInfo;
8 import 'scanner.dart'; 8 import 'scanner.dart';
9 import 'engine.dart' show AnalysisEngine; 9 import 'engine.dart' show AnalysisEngine;
10 import 'utilities_dart.dart'; 10 import 'utilities_dart.dart';
11 import 'element.dart'; 11 import 'element.dart';
12 /** 12 /**
13 * The abstract class `ASTNode` defines the behavior common to all nodes in the AST structure 13 * The abstract class `ASTNode` defines the behavior common to all nodes in the AST structure
14 * for a Dart program. 14 * for a Dart program.
15 * 15 *
16 * @coverage dart.engine.ast 16 * @coverage dart.engine.ast
17 */ 17 */
(...skipping 2719 matching lines...) Expand 10 before | Expand all | Expand 10 after
2737 * [ImportDirective] 2737 * [ImportDirective]
2738 * | [ExportDirective] 2738 * | [ExportDirective]
2739 * 2739 *
2740 * declarations ::= 2740 * declarations ::=
2741 * [CompilationUnitMember]* 2741 * [CompilationUnitMember]*
2742 * </pre> 2742 * </pre>
2743 * 2743 *
2744 * @coverage dart.engine.ast 2744 * @coverage dart.engine.ast
2745 */ 2745 */
2746 class CompilationUnit extends ASTNode { 2746 class CompilationUnit extends ASTNode {
2747 /**
2748 * The line information for this compilation unit.
2749 */
2750 LineInfo lineInfo;
2751 2747
2752 /** 2748 /**
2753 * The first token in the token stream that was parsed to form this compilatio n unit. 2749 * The first token in the token stream that was parsed to form this compilatio n unit.
2754 */ 2750 */
2755 Token _beginToken; 2751 Token _beginToken;
2756 2752
2757 /** 2753 /**
2758 * The script tag at the beginning of the compilation unit, or `null` if there is no script 2754 * The script tag at the beginning of the compilation unit, or `null` if there is no script
2759 * tag in this compilation unit. 2755 * tag in this compilation unit.
2760 */ 2756 */
(...skipping 15 matching lines...) Expand all
2776 */ 2772 */
2777 Token _endToken; 2773 Token _endToken;
2778 2774
2779 /** 2775 /**
2780 * The element associated with this compilation unit, or `null` if the AST str ucture has not 2776 * The element associated with this compilation unit, or `null` if the AST str ucture has not
2781 * been resolved. 2777 * been resolved.
2782 */ 2778 */
2783 CompilationUnitElement element; 2779 CompilationUnitElement element;
2784 2780
2785 /** 2781 /**
2782 * The line information for this compilation unit.
2783 */
2784 LineInfo lineInfo;
2785
2786 /**
2786 * Initialize a newly created compilation unit to have the given directives an d declarations. 2787 * Initialize a newly created compilation unit to have the given directives an d declarations.
2787 * 2788 *
2788 * @param beginToken the first token in the token stream 2789 * @param beginToken the first token in the token stream
2789 * @param scriptTag the script tag at the beginning of the compilation unit 2790 * @param scriptTag the script tag at the beginning of the compilation unit
2790 * @param directives the directives contained in this compilation unit 2791 * @param directives the directives contained in this compilation unit
2791 * @param declarations the declarations contained in this compilation unit 2792 * @param declarations the declarations contained in this compilation unit
2792 * @param endToken the last token in the token stream 2793 * @param endToken the last token in the token stream
2793 */ 2794 */
2794 CompilationUnit.full(Token beginToken, ScriptTag scriptTag, List<Directive> di rectives, List<CompilationUnitMember> declarations, Token endToken) { 2795 CompilationUnit.full(Token beginToken, ScriptTag scriptTag, List<Directive> di rectives, List<CompilationUnitMember> declarations, Token endToken) {
2795 this.directives = new NodeList<Directive>(this); 2796 this.directives = new NodeList<Directive>(this);
(...skipping 11706 matching lines...) Expand 10 before | Expand all | Expand 10 after
14502 if (node.isDocumentation) { 14503 if (node.isDocumentation) {
14503 return Comment.createDocumentationComment2(node.tokens, clone3(node.refere nces)); 14504 return Comment.createDocumentationComment2(node.tokens, clone3(node.refere nces));
14504 } else if (node.isBlock) { 14505 } else if (node.isBlock) {
14505 return Comment.createBlockComment(node.tokens); 14506 return Comment.createBlockComment(node.tokens);
14506 } 14507 }
14507 return Comment.createEndOfLineComment(node.tokens); 14508 return Comment.createEndOfLineComment(node.tokens);
14508 } 14509 }
14509 CommentReference visitCommentReference(CommentReference node) => new CommentRe ference.full(node.newKeyword, clone2(node.identifier)); 14510 CommentReference visitCommentReference(CommentReference node) => new CommentRe ference.full(node.newKeyword, clone2(node.identifier));
14510 CompilationUnit visitCompilationUnit(CompilationUnit node) { 14511 CompilationUnit visitCompilationUnit(CompilationUnit node) {
14511 CompilationUnit clone = new CompilationUnit.full(node.beginToken, clone2(nod e.scriptTag), clone3(node.directives), clone3(node.declarations), node.endToken) ; 14512 CompilationUnit clone = new CompilationUnit.full(node.beginToken, clone2(nod e.scriptTag), clone3(node.directives), clone3(node.declarations), node.endToken) ;
14513 clone.lineInfo = node.lineInfo;
14512 return clone; 14514 return clone;
14513 } 14515 }
14514 ConditionalExpression visitConditionalExpression(ConditionalExpression node) = > new ConditionalExpression.full(clone2(node.condition), node.question, clone2(n ode.thenExpression), node.colon, clone2(node.elseExpression)); 14516 ConditionalExpression visitConditionalExpression(ConditionalExpression node) = > new ConditionalExpression.full(clone2(node.condition), node.question, clone2(n ode.thenExpression), node.colon, clone2(node.elseExpression));
14515 ConstructorDeclaration visitConstructorDeclaration(ConstructorDeclaration node ) => new ConstructorDeclaration.full(clone2(node.documentationComment), clone3(n ode.metadata), node.externalKeyword, node.constKeyword, node.factoryKeyword, clo ne2(node.returnType), node.period, clone2(node.name), clone2(node.parameters), n ode.separator, clone3(node.initializers), clone2(node.redirectedConstructor), cl one2(node.body)); 14517 ConstructorDeclaration visitConstructorDeclaration(ConstructorDeclaration node ) => new ConstructorDeclaration.full(clone2(node.documentationComment), clone3(n ode.metadata), node.externalKeyword, node.constKeyword, node.factoryKeyword, clo ne2(node.returnType), node.period, clone2(node.name), clone2(node.parameters), n ode.separator, clone3(node.initializers), clone2(node.redirectedConstructor), cl one2(node.body));
14516 ConstructorFieldInitializer visitConstructorFieldInitializer(ConstructorFieldI nitializer node) => new ConstructorFieldInitializer.full(node.keyword, node.peri od, clone2(node.fieldName), node.equals, clone2(node.expression)); 14518 ConstructorFieldInitializer visitConstructorFieldInitializer(ConstructorFieldI nitializer node) => new ConstructorFieldInitializer.full(node.keyword, node.peri od, clone2(node.fieldName), node.equals, clone2(node.expression));
14517 ConstructorName visitConstructorName(ConstructorName node) => new ConstructorN ame.full(clone2(node.type), node.period, clone2(node.name)); 14519 ConstructorName visitConstructorName(ConstructorName node) => new ConstructorN ame.full(clone2(node.type), node.period, clone2(node.name));
14518 ContinueStatement visitContinueStatement(ContinueStatement node) => new Contin ueStatement.full(node.keyword, clone2(node.label), node.semicolon); 14520 ContinueStatement visitContinueStatement(ContinueStatement node) => new Contin ueStatement.full(node.keyword, clone2(node.label), node.semicolon);
14519 DeclaredIdentifier visitDeclaredIdentifier(DeclaredIdentifier node) => new Dec laredIdentifier.full(clone2(node.documentationComment), clone3(node.metadata), n ode.keyword, clone2(node.type), clone2(node.identifier)); 14521 DeclaredIdentifier visitDeclaredIdentifier(DeclaredIdentifier node) => new Dec laredIdentifier.full(clone2(node.documentationComment), clone3(node.metadata), n ode.keyword, clone2(node.type), clone2(node.identifier));
14520 DefaultFormalParameter visitDefaultFormalParameter(DefaultFormalParameter node ) => new DefaultFormalParameter.full(clone2(node.parameter), node.kind, node.sep arator, clone2(node.defaultValue)); 14522 DefaultFormalParameter visitDefaultFormalParameter(DefaultFormalParameter node ) => new DefaultFormalParameter.full(clone2(node.parameter), node.kind, node.sep arator, clone2(node.defaultValue));
14521 DoStatement visitDoStatement(DoStatement node) => new DoStatement.full(node.do Keyword, clone2(node.body), node.whileKeyword, node.leftParenthesis, clone2(node .condition), node.rightParenthesis, node.semicolon); 14523 DoStatement visitDoStatement(DoStatement node) => new DoStatement.full(node.do Keyword, clone2(node.body), node.whileKeyword, node.leftParenthesis, clone2(node .condition), node.rightParenthesis, node.semicolon);
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
14889 void operator[]=(int index, E node) { 14891 void operator[]=(int index, E node) {
14890 if (index < 0 || index >= _elements.length) { 14892 if (index < 0 || index >= _elements.length) {
14891 throw new RangeError("Index: ${index}, Size: ${_elements.length}"); 14893 throw new RangeError("Index: ${index}, Size: ${_elements.length}");
14892 } 14894 }
14893 _elements[index] as E; 14895 _elements[index] as E;
14894 owner.becomeParentOf(node); 14896 owner.becomeParentOf(node);
14895 _elements[index] = node; 14897 _elements[index] = node;
14896 } 14898 }
14897 int get length => _elements.length; 14899 int get length => _elements.length;
14898 } 14900 }
OLDNEW
« no previous file with comments | « pkg/analyzer_experimental/lib/analyzer.dart ('k') | pkg/analyzer_experimental/lib/src/generated/engine.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698