| 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.testing.ast_factory; | 8 library engine.testing.ast_factory; |
| 9 | 9 |
| 10 import 'package:analyzer/src/generated/utilities_dart.dart'; | 10 import 'package:analyzer/src/generated/utilities_dart.dart'; |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 | 356 |
| 357 static SwitchDefault switchDefault2(List<Statement> statements) => switchDefau
lt(new List<Label>(), statements); | 357 static SwitchDefault switchDefault2(List<Statement> statements) => switchDefau
lt(new List<Label>(), statements); |
| 358 | 358 |
| 359 static SwitchStatement switchStatement(Expression expression, List<SwitchMembe
r> members) => new SwitchStatement(TokenFactory.tokenFromKeyword(Keyword.SWITCH)
, TokenFactory.tokenFromType(TokenType.OPEN_PAREN), expression, TokenFactory.tok
enFromType(TokenType.CLOSE_PAREN), TokenFactory.tokenFromType(TokenType.OPEN_CUR
LY_BRACKET), list(members), TokenFactory.tokenFromType(TokenType.CLOSE_CURLY_BRA
CKET)); | 359 static SwitchStatement switchStatement(Expression expression, List<SwitchMembe
r> members) => new SwitchStatement(TokenFactory.tokenFromKeyword(Keyword.SWITCH)
, TokenFactory.tokenFromType(TokenType.OPEN_PAREN), expression, TokenFactory.tok
enFromType(TokenType.CLOSE_PAREN), TokenFactory.tokenFromType(TokenType.OPEN_CUR
LY_BRACKET), list(members), TokenFactory.tokenFromType(TokenType.CLOSE_CURLY_BRA
CKET)); |
| 360 | 360 |
| 361 static SymbolLiteral symbolLiteral(List<String> components) { | 361 static SymbolLiteral symbolLiteral(List<String> components) { |
| 362 List<Token> identifierList = new List<Token>(); | 362 List<Token> identifierList = new List<Token>(); |
| 363 for (String component in components) { | 363 for (String component in components) { |
| 364 identifierList.add(TokenFactory.tokenFromTypeAndString(TokenType.IDENTIFIE
R, component)); | 364 identifierList.add(TokenFactory.tokenFromTypeAndString(TokenType.IDENTIFIE
R, component)); |
| 365 } | 365 } |
| 366 return new SymbolLiteral(TokenFactory.tokenFromType(TokenType.HASH), new Lis
t.from(identifierList)); | 366 return new SymbolLiteral(TokenFactory.tokenFromType(TokenType.HASH), identif
ierList); |
| 367 } | 367 } |
| 368 | 368 |
| 369 static BlockFunctionBody syncBlockFunctionBody(List<Statement> statements) =>
new BlockFunctionBody(TokenFactory.tokenFromTypeAndString(TokenType.IDENTIFIER,
"sync"), null, block(statements)); | 369 static BlockFunctionBody syncBlockFunctionBody(List<Statement> statements) =>
new BlockFunctionBody(TokenFactory.tokenFromTypeAndString(TokenType.IDENTIFIER,
"sync"), null, block(statements)); |
| 370 | 370 |
| 371 static BlockFunctionBody syncGeneratorBlockFunctionBody(List<Statement> statem
ents) => new BlockFunctionBody(TokenFactory.tokenFromTypeAndString(TokenType.IDE
NTIFIER, "sync"), TokenFactory.tokenFromType(TokenType.STAR), block(statements))
; | 371 static BlockFunctionBody syncGeneratorBlockFunctionBody(List<Statement> statem
ents) => new BlockFunctionBody(TokenFactory.tokenFromTypeAndString(TokenType.IDE
NTIFIER, "sync"), TokenFactory.tokenFromType(TokenType.STAR), block(statements))
; |
| 372 | 372 |
| 373 static ThisExpression thisExpression() => new ThisExpression(TokenFactory.toke
nFromKeyword(Keyword.THIS)); | 373 static ThisExpression thisExpression() => new ThisExpression(TokenFactory.toke
nFromKeyword(Keyword.THIS)); |
| 374 | 374 |
| 375 static ThrowExpression throwExpression() => throwExpression2(null); | 375 static ThrowExpression throwExpression() => throwExpression2(null); |
| 376 | 376 |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 446 static VariableDeclarationStatement variableDeclarationStatement2(Keyword keyw
ord, List<VariableDeclaration> variables) => variableDeclarationStatement(keywor
d, null, variables); | 446 static VariableDeclarationStatement variableDeclarationStatement2(Keyword keyw
ord, List<VariableDeclaration> variables) => variableDeclarationStatement(keywor
d, null, variables); |
| 447 | 447 |
| 448 static WhileStatement whileStatement(Expression condition, Statement body) =>
new WhileStatement(TokenFactory.tokenFromKeyword(Keyword.WHILE), TokenFactory.to
kenFromType(TokenType.OPEN_PAREN), condition, TokenFactory.tokenFromType(TokenTy
pe.CLOSE_PAREN), body); | 448 static WhileStatement whileStatement(Expression condition, Statement body) =>
new WhileStatement(TokenFactory.tokenFromKeyword(Keyword.WHILE), TokenFactory.to
kenFromType(TokenType.OPEN_PAREN), condition, TokenFactory.tokenFromType(TokenTy
pe.CLOSE_PAREN), body); |
| 449 | 449 |
| 450 static WithClause withClause(List<TypeName> types) => new WithClause(TokenFact
ory.tokenFromKeyword(Keyword.WITH), list(types)); | 450 static WithClause withClause(List<TypeName> types) => new WithClause(TokenFact
ory.tokenFromKeyword(Keyword.WITH), list(types)); |
| 451 | 451 |
| 452 static YieldStatement yieldEachStatement(Expression expression) => new YieldSt
atement(TokenFactory.tokenFromTypeAndString(TokenType.IDENTIFIER, "yield"), Toke
nFactory.tokenFromType(TokenType.STAR), expression, TokenFactory.tokenFromType(T
okenType.SEMICOLON)); | 452 static YieldStatement yieldEachStatement(Expression expression) => new YieldSt
atement(TokenFactory.tokenFromTypeAndString(TokenType.IDENTIFIER, "yield"), Toke
nFactory.tokenFromType(TokenType.STAR), expression, TokenFactory.tokenFromType(T
okenType.SEMICOLON)); |
| 453 | 453 |
| 454 static YieldStatement yieldStatement(Expression expression) => new YieldStatem
ent(TokenFactory.tokenFromTypeAndString(TokenType.IDENTIFIER, "yield"), null, ex
pression, TokenFactory.tokenFromType(TokenType.SEMICOLON)); | 454 static YieldStatement yieldStatement(Expression expression) => new YieldStatem
ent(TokenFactory.tokenFromTypeAndString(TokenType.IDENTIFIER, "yield"), null, ex
pression, TokenFactory.tokenFromType(TokenType.SEMICOLON)); |
| 455 } | 455 } |
| OLD | NEW |