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

Side by Side Diff: pkg/analyzer/lib/src/generated/testing/ast_factory.dart

Issue 1820743002: Issue 26051. Fix for MethodDeclartion.beginToken for external. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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/analyzer/lib/src/dart/ast/ast.dart ('k') | pkg/analyzer/test/dart/ast/ast_test.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) 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 library analyzer.src.generated.testing.ast_factory; 5 library analyzer.src.generated.testing.ast_factory;
6 6
7 import 'package:analyzer/dart/ast/ast.dart'; 7 import 'package:analyzer/dart/ast/ast.dart';
8 import 'package:analyzer/dart/ast/token.dart'; 8 import 'package:analyzer/dart/ast/token.dart';
9 import 'package:analyzer/dart/element/element.dart'; 9 import 'package:analyzer/dart/element/element.dart';
10 import 'package:analyzer/src/dart/ast/ast.dart'; 10 import 'package:analyzer/src/dart/ast/ast.dart';
(...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 null, 862 null,
863 modifier == null ? null : TokenFactory.tokenFromKeyword(modifier), 863 modifier == null ? null : TokenFactory.tokenFromKeyword(modifier),
864 returnType, 864 returnType,
865 property == null ? null : TokenFactory.tokenFromKeyword(property), 865 property == null ? null : TokenFactory.tokenFromKeyword(property),
866 operator == null ? null : TokenFactory.tokenFromKeyword(operator), 866 operator == null ? null : TokenFactory.tokenFromKeyword(operator),
867 name, 867 name,
868 typeParameters, 868 typeParameters,
869 parameters, 869 parameters,
870 body); 870 body);
871 871
872 static MethodDeclaration methodDeclaration4(
873 {bool external: false,
874 Keyword modifier,
875 TypeName returnType,
876 Keyword property,
877 bool operator: false,
878 String name,
879 FormalParameterList parameters,
880 FunctionBody body}) =>
881 new MethodDeclaration(
882 null,
883 null,
884 external ? TokenFactory.tokenFromKeyword(Keyword.EXTERNAL) : null,
885 modifier == null ? null : TokenFactory.tokenFromKeyword(modifier),
886 returnType,
887 property == null ? null : TokenFactory.tokenFromKeyword(property),
888 operator ? TokenFactory.tokenFromKeyword(Keyword.OPERATOR) : null,
889 identifier3(name),
890 null,
891 parameters,
892 body);
893
872 static MethodInvocation methodInvocation(Expression target, String methodName, 894 static MethodInvocation methodInvocation(Expression target, String methodName,
873 [List<Expression> arguments, 895 [List<Expression> arguments,
874 TokenType operator = TokenType.PERIOD]) => 896 TokenType operator = TokenType.PERIOD]) =>
875 new MethodInvocation( 897 new MethodInvocation(
876 target, 898 target,
877 target == null ? null : TokenFactory.tokenFromType(operator), 899 target == null ? null : TokenFactory.tokenFromType(operator),
878 identifier3(methodName), 900 identifier3(methodName),
879 null, 901 null,
880 argumentList(arguments)); 902 argumentList(arguments));
881 903
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
1263 expression, 1285 expression,
1264 TokenFactory.tokenFromType(TokenType.SEMICOLON)); 1286 TokenFactory.tokenFromType(TokenType.SEMICOLON));
1265 1287
1266 static YieldStatement yieldStatement(Expression expression) => 1288 static YieldStatement yieldStatement(Expression expression) =>
1267 new YieldStatement( 1289 new YieldStatement(
1268 TokenFactory.tokenFromTypeAndString(TokenType.IDENTIFIER, "yield"), 1290 TokenFactory.tokenFromTypeAndString(TokenType.IDENTIFIER, "yield"),
1269 null, 1291 null,
1270 expression, 1292 expression,
1271 TokenFactory.tokenFromType(TokenType.SEMICOLON)); 1293 TokenFactory.tokenFromType(TokenType.SEMICOLON));
1272 } 1294 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/dart/ast/ast.dart ('k') | pkg/analyzer/test/dart/ast/ast_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698