| 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 22 matching lines...) Expand all Loading... |
| 33 static Annotation annotation2(Identifier name, SimpleIdentifier constructorNam
e, ArgumentList arguments) => new Annotation(TokenFactory.tokenFromType(TokenTyp
e.AT), name, TokenFactory.tokenFromType(TokenType.PERIOD), constructorName, argu
ments); | 33 static Annotation annotation2(Identifier name, SimpleIdentifier constructorNam
e, ArgumentList arguments) => new Annotation(TokenFactory.tokenFromType(TokenTyp
e.AT), name, TokenFactory.tokenFromType(TokenType.PERIOD), constructorName, argu
ments); |
| 34 | 34 |
| 35 static ArgumentList argumentList(List<Expression> arguments) => new ArgumentLi
st(TokenFactory.tokenFromType(TokenType.OPEN_PAREN), list(arguments), TokenFacto
ry.tokenFromType(TokenType.CLOSE_PAREN)); | 35 static ArgumentList argumentList(List<Expression> arguments) => new ArgumentLi
st(TokenFactory.tokenFromType(TokenType.OPEN_PAREN), list(arguments), TokenFacto
ry.tokenFromType(TokenType.CLOSE_PAREN)); |
| 36 | 36 |
| 37 static AsExpression asExpression(Expression expression, TypeName type) => new
AsExpression(expression, TokenFactory.tokenFromKeyword(Keyword.AS), type); | 37 static AsExpression asExpression(Expression expression, TypeName type) => new
AsExpression(expression, TokenFactory.tokenFromKeyword(Keyword.AS), type); |
| 38 | 38 |
| 39 static AssertStatement assertStatement(Expression condition) => new AssertStat
ement(TokenFactory.tokenFromKeyword(Keyword.ASSERT), TokenFactory.tokenFromType(
TokenType.OPEN_PAREN), condition, TokenFactory.tokenFromType(TokenType.CLOSE_PAR
EN), TokenFactory.tokenFromType(TokenType.SEMICOLON)); | 39 static AssertStatement assertStatement(Expression condition) => new AssertStat
ement(TokenFactory.tokenFromKeyword(Keyword.ASSERT), TokenFactory.tokenFromType(
TokenType.OPEN_PAREN), condition, TokenFactory.tokenFromType(TokenType.CLOSE_PAR
EN), TokenFactory.tokenFromType(TokenType.SEMICOLON)); |
| 40 | 40 |
| 41 static AssignmentExpression assignmentExpression(Expression leftHandSide, Toke
nType operator, Expression rightHandSide) => new AssignmentExpression(leftHandSi
de, TokenFactory.tokenFromType(operator), rightHandSide); | 41 static AssignmentExpression assignmentExpression(Expression leftHandSide, Toke
nType operator, Expression rightHandSide) => new AssignmentExpression(leftHandSi
de, TokenFactory.tokenFromType(operator), rightHandSide); |
| 42 | 42 |
| 43 static BlockFunctionBody asyncBlockFunctionBody(List<Statement> statements) =>
new BlockFunctionBody(TokenFactory.tokenFromTypeAndString(TokenType.IDENTIFIER,
"async"), null, block(statements)); |
| 44 |
| 45 static ExpressionFunctionBody asyncExpressionFunctionBody(Expression expressio
n) => new ExpressionFunctionBody(TokenFactory.tokenFromTypeAndString(TokenType.I
DENTIFIER, "async"), TokenFactory.tokenFromType(TokenType.FUNCTION), expression,
TokenFactory.tokenFromType(TokenType.SEMICOLON)); |
| 46 |
| 47 static BlockFunctionBody asyncGeneratorBlockFunctionBody(List<Statement> state
ments) => new BlockFunctionBody(TokenFactory.tokenFromTypeAndString(TokenType.ID
ENTIFIER, "async"), TokenFactory.tokenFromType(TokenType.STAR), block(statements
)); |
| 48 |
| 49 static AwaitExpression awaitExpression(Expression expression) => new AwaitExpr
ession(TokenFactory.tokenFromTypeAndString(TokenType.IDENTIFIER, "await"), expre
ssion, TokenFactory.tokenFromType(TokenType.SEMICOLON)); |
| 50 |
| 43 static BinaryExpression binaryExpression(Expression leftOperand, TokenType ope
rator, Expression rightOperand) => new BinaryExpression(leftOperand, TokenFactor
y.tokenFromType(operator), rightOperand); | 51 static BinaryExpression binaryExpression(Expression leftOperand, TokenType ope
rator, Expression rightOperand) => new BinaryExpression(leftOperand, TokenFactor
y.tokenFromType(operator), rightOperand); |
| 44 | 52 |
| 45 static Block block(List<Statement> statements) => new Block(TokenFactory.token
FromType(TokenType.OPEN_CURLY_BRACKET), list(statements), TokenFactory.tokenFrom
Type(TokenType.CLOSE_CURLY_BRACKET)); | 53 static Block block(List<Statement> statements) => new Block(TokenFactory.token
FromType(TokenType.OPEN_CURLY_BRACKET), list(statements), TokenFactory.tokenFrom
Type(TokenType.CLOSE_CURLY_BRACKET)); |
| 46 | 54 |
| 47 static BlockFunctionBody blockFunctionBody(Block block) => new BlockFunctionBo
dy(block); | 55 static BlockFunctionBody blockFunctionBody(Block block) => new BlockFunctionBo
dy(null, null, block); |
| 48 | 56 |
| 49 static BlockFunctionBody blockFunctionBody2(List<Statement> statements) => new
BlockFunctionBody(block(statements)); | 57 static BlockFunctionBody blockFunctionBody2(List<Statement> statements) => new
BlockFunctionBody(null, null, block(statements)); |
| 50 | 58 |
| 51 static BooleanLiteral booleanLiteral(bool value) => new BooleanLiteral(value ?
TokenFactory.tokenFromKeyword(Keyword.TRUE) : TokenFactory.tokenFromKeyword(Key
word.FALSE), value); | 59 static BooleanLiteral booleanLiteral(bool value) => new BooleanLiteral(value ?
TokenFactory.tokenFromKeyword(Keyword.TRUE) : TokenFactory.tokenFromKeyword(Key
word.FALSE), value); |
| 52 | 60 |
| 53 static BreakStatement breakStatement() => new BreakStatement(TokenFactory.toke
nFromKeyword(Keyword.BREAK), null, TokenFactory.tokenFromType(TokenType.SEMICOLO
N)); | 61 static BreakStatement breakStatement() => new BreakStatement(TokenFactory.toke
nFromKeyword(Keyword.BREAK), null, TokenFactory.tokenFromType(TokenType.SEMICOLO
N)); |
| 54 | 62 |
| 55 static BreakStatement breakStatement2(String label) => new BreakStatement(Toke
nFactory.tokenFromKeyword(Keyword.BREAK), identifier3(label), TokenFactory.token
FromType(TokenType.SEMICOLON)); | 63 static BreakStatement breakStatement2(String label) => new BreakStatement(Toke
nFactory.tokenFromKeyword(Keyword.BREAK), identifier3(label), TokenFactory.token
FromType(TokenType.SEMICOLON)); |
| 56 | 64 |
| 57 static IndexExpression cascadedIndexExpression(Expression index) => new IndexE
xpression.forCascade(TokenFactory.tokenFromType(TokenType.PERIOD_PERIOD), TokenF
actory.tokenFromType(TokenType.OPEN_SQUARE_BRACKET), index, TokenFactory.tokenFr
omType(TokenType.CLOSE_SQUARE_BRACKET)); | 65 static IndexExpression cascadedIndexExpression(Expression index) => new IndexE
xpression.forCascade(TokenFactory.tokenFromType(TokenType.PERIOD_PERIOD), TokenF
actory.tokenFromType(TokenType.OPEN_SQUARE_BRACKET), index, TokenFactory.tokenFr
omType(TokenType.CLOSE_SQUARE_BRACKET)); |
| 58 | 66 |
| 59 static MethodInvocation cascadedMethodInvocation(String methodName, List<Expre
ssion> arguments) => new MethodInvocation(null, TokenFactory.tokenFromType(Token
Type.PERIOD_PERIOD), identifier3(methodName), argumentList(arguments)); | 67 static MethodInvocation cascadedMethodInvocation(String methodName, List<Expre
ssion> arguments) => new MethodInvocation(null, TokenFactory.tokenFromType(Token
Type.PERIOD_PERIOD), identifier3(methodName), argumentList(arguments)); |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 static DoubleLiteral doubleLiteral(double value) => new DoubleLiteral(TokenFac
tory.tokenFromString(value.toString()), value); | 128 static DoubleLiteral doubleLiteral(double value) => new DoubleLiteral(TokenFac
tory.tokenFromString(value.toString()), value); |
| 121 | 129 |
| 122 static EmptyFunctionBody emptyFunctionBody() => new EmptyFunctionBody(TokenFac
tory.tokenFromType(TokenType.SEMICOLON)); | 130 static EmptyFunctionBody emptyFunctionBody() => new EmptyFunctionBody(TokenFac
tory.tokenFromType(TokenType.SEMICOLON)); |
| 123 | 131 |
| 124 static EmptyStatement emptyStatement() => new EmptyStatement(TokenFactory.toke
nFromType(TokenType.SEMICOLON)); | 132 static EmptyStatement emptyStatement() => new EmptyStatement(TokenFactory.toke
nFromType(TokenType.SEMICOLON)); |
| 125 | 133 |
| 126 static ExportDirective exportDirective(List<Annotation> metadata, String uri,
List<Combinator> combinators) => new ExportDirective(null, metadata, TokenFactor
y.tokenFromKeyword(Keyword.EXPORT), string2(uri), list(combinators), TokenFactor
y.tokenFromType(TokenType.SEMICOLON)); | 134 static ExportDirective exportDirective(List<Annotation> metadata, String uri,
List<Combinator> combinators) => new ExportDirective(null, metadata, TokenFactor
y.tokenFromKeyword(Keyword.EXPORT), string2(uri), list(combinators), TokenFactor
y.tokenFromType(TokenType.SEMICOLON)); |
| 127 | 135 |
| 128 static ExportDirective exportDirective2(String uri, List<Combinator> combinato
rs) => exportDirective(new List<Annotation>(), uri, combinators); | 136 static ExportDirective exportDirective2(String uri, List<Combinator> combinato
rs) => exportDirective(new List<Annotation>(), uri, combinators); |
| 129 | 137 |
| 130 static ExpressionFunctionBody expressionFunctionBody(Expression expression) =>
new ExpressionFunctionBody(TokenFactory.tokenFromType(TokenType.FUNCTION), expr
ession, TokenFactory.tokenFromType(TokenType.SEMICOLON)); | 138 static ExpressionFunctionBody expressionFunctionBody(Expression expression) =>
new ExpressionFunctionBody(null, TokenFactory.tokenFromType(TokenType.FUNCTION)
, expression, TokenFactory.tokenFromType(TokenType.SEMICOLON)); |
| 131 | 139 |
| 132 static ExpressionStatement expressionStatement(Expression expression) => new E
xpressionStatement(expression, TokenFactory.tokenFromType(TokenType.SEMICOLON)); | 140 static ExpressionStatement expressionStatement(Expression expression) => new E
xpressionStatement(expression, TokenFactory.tokenFromType(TokenType.SEMICOLON)); |
| 133 | 141 |
| 134 static ExtendsClause extendsClause(TypeName type) => new ExtendsClause(TokenFa
ctory.tokenFromKeyword(Keyword.EXTENDS), type); | 142 static ExtendsClause extendsClause(TypeName type) => new ExtendsClause(TokenFa
ctory.tokenFromKeyword(Keyword.EXTENDS), type); |
| 135 | 143 |
| 136 static FieldDeclaration fieldDeclaration(bool isStatic, Keyword keyword, TypeN
ame type, List<VariableDeclaration> variables) => new FieldDeclaration(null, nul
l, isStatic ? TokenFactory.tokenFromKeyword(Keyword.STATIC) : null, variableDecl
arationList(keyword, type, variables), TokenFactory.tokenFromType(TokenType.SEMI
COLON)); | 144 static FieldDeclaration fieldDeclaration(bool isStatic, Keyword keyword, TypeN
ame type, List<VariableDeclaration> variables) => new FieldDeclaration(null, nul
l, isStatic ? TokenFactory.tokenFromKeyword(Keyword.STATIC) : null, variableDecl
arationList(keyword, type, variables), TokenFactory.tokenFromType(TokenType.SEMI
COLON)); |
| 137 | 145 |
| 138 static FieldDeclaration fieldDeclaration2(bool isStatic, Keyword keyword, List
<VariableDeclaration> variables) => fieldDeclaration(isStatic, keyword, null, va
riables); | 146 static FieldDeclaration fieldDeclaration2(bool isStatic, Keyword keyword, List
<VariableDeclaration> variables) => fieldDeclaration(isStatic, keyword, null, va
riables); |
| 139 | 147 |
| 140 static FieldFormalParameter fieldFormalParameter(Keyword keyword, TypeName typ
e, String identifier, [FormalParameterList parameterList]) => new FieldFormalPar
ameter(null, null, keyword == null ? null : TokenFactory.tokenFromKeyword(keywor
d), type, TokenFactory.tokenFromKeyword(Keyword.THIS), TokenFactory.tokenFromTyp
e(TokenType.PERIOD), identifier3(identifier), parameterList); | 148 static FieldFormalParameter fieldFormalParameter(Keyword keyword, TypeName typ
e, String identifier, [FormalParameterList parameterList]) => new FieldFormalPar
ameter(null, null, keyword == null ? null : TokenFactory.tokenFromKeyword(keywor
d), type, TokenFactory.tokenFromKeyword(Keyword.THIS), TokenFactory.tokenFromTyp
e(TokenType.PERIOD), identifier3(identifier), parameterList); |
| 141 | 149 |
| 142 static FieldFormalParameter fieldFormalParameter2(String identifier) => fieldF
ormalParameter(null, null, identifier); | 150 static FieldFormalParameter fieldFormalParameter2(String identifier) => fieldF
ormalParameter(null, null, identifier); |
| 143 | 151 |
| 144 static ForEachStatement forEachStatement(DeclaredIdentifier loopVariable, Expr
ession iterator, Statement body) => new ForEachStatement.con1(TokenFactory.token
FromKeyword(Keyword.FOR), TokenFactory.tokenFromType(TokenType.OPEN_PAREN), loop
Variable, TokenFactory.tokenFromKeyword(Keyword.IN), iterator, TokenFactory.toke
nFromType(TokenType.CLOSE_PAREN), body); | 152 static ForEachStatement forEachStatement(DeclaredIdentifier loopVariable, Expr
ession iterator, Statement body) => new ForEachStatement.con1(null, TokenFactory
.tokenFromKeyword(Keyword.FOR), TokenFactory.tokenFromType(TokenType.OPEN_PAREN)
, loopVariable, TokenFactory.tokenFromKeyword(Keyword.IN), iterator, TokenFactor
y.tokenFromType(TokenType.CLOSE_PAREN), body); |
| 145 | 153 |
| 146 static ForEachStatement forEachStatement2(SimpleIdentifier identifier, Express
ion iterator, Statement body) => new ForEachStatement.con2(TokenFactory.tokenFro
mKeyword(Keyword.FOR), TokenFactory.tokenFromType(TokenType.OPEN_PAREN), identif
ier, TokenFactory.tokenFromKeyword(Keyword.IN), iterator, TokenFactory.tokenFrom
Type(TokenType.CLOSE_PAREN), body); | 154 static ForEachStatement forEachStatement2(SimpleIdentifier identifier, Express
ion iterator, Statement body) => new ForEachStatement.con2(null, TokenFactory.to
kenFromKeyword(Keyword.FOR), TokenFactory.tokenFromType(TokenType.OPEN_PAREN), i
dentifier, TokenFactory.tokenFromKeyword(Keyword.IN), iterator, TokenFactory.tok
enFromType(TokenType.CLOSE_PAREN), body); |
| 147 | 155 |
| 148 static FormalParameterList formalParameterList(List<FormalParameter> parameter
s) => new FormalParameterList(TokenFactory.tokenFromType(TokenType.OPEN_PAREN),
list(parameters), null, null, TokenFactory.tokenFromType(TokenType.CLOSE_PAREN))
; | 156 static FormalParameterList formalParameterList(List<FormalParameter> parameter
s) => new FormalParameterList(TokenFactory.tokenFromType(TokenType.OPEN_PAREN),
list(parameters), null, null, TokenFactory.tokenFromType(TokenType.CLOSE_PAREN))
; |
| 149 | 157 |
| 150 static ForStatement forStatement(Expression initialization, Expression conditi
on, List<Expression> updaters, Statement body) => new ForStatement(TokenFactory.
tokenFromKeyword(Keyword.FOR), TokenFactory.tokenFromType(TokenType.OPEN_PAREN),
null, initialization, TokenFactory.tokenFromType(TokenType.SEMICOLON), conditio
n, TokenFactory.tokenFromType(TokenType.SEMICOLON), updaters, TokenFactory.token
FromType(TokenType.CLOSE_PAREN), body); | 158 static ForStatement forStatement(Expression initialization, Expression conditi
on, List<Expression> updaters, Statement body) => new ForStatement(TokenFactory.
tokenFromKeyword(Keyword.FOR), TokenFactory.tokenFromType(TokenType.OPEN_PAREN),
null, initialization, TokenFactory.tokenFromType(TokenType.SEMICOLON), conditio
n, TokenFactory.tokenFromType(TokenType.SEMICOLON), updaters, TokenFactory.token
FromType(TokenType.CLOSE_PAREN), body); |
| 151 | 159 |
| 152 static ForStatement forStatement2(VariableDeclarationList variableList, Expres
sion condition, List<Expression> updaters, Statement body) => new ForStatement(T
okenFactory.tokenFromKeyword(Keyword.FOR), TokenFactory.tokenFromType(TokenType.
OPEN_PAREN), variableList, null, TokenFactory.tokenFromType(TokenType.SEMICOLON)
, condition, TokenFactory.tokenFromType(TokenType.SEMICOLON), updaters, TokenFac
tory.tokenFromType(TokenType.CLOSE_PAREN), body); | 160 static ForStatement forStatement2(VariableDeclarationList variableList, Expres
sion condition, List<Expression> updaters, Statement body) => new ForStatement(T
okenFactory.tokenFromKeyword(Keyword.FOR), TokenFactory.tokenFromType(TokenType.
OPEN_PAREN), variableList, null, TokenFactory.tokenFromType(TokenType.SEMICOLON)
, condition, TokenFactory.tokenFromType(TokenType.SEMICOLON), updaters, TokenFac
tory.tokenFromType(TokenType.CLOSE_PAREN), body); |
| 153 | 161 |
| 154 static FunctionDeclaration functionDeclaration(TypeName type, Keyword keyword,
String name, FunctionExpression functionExpression) => new FunctionDeclaration(
null, null, null, type, keyword == null ? null : TokenFactory.tokenFromKeyword(k
eyword), identifier3(name), functionExpression); | 162 static FunctionDeclaration functionDeclaration(TypeName type, Keyword keyword,
String name, FunctionExpression functionExpression) => new FunctionDeclaration(
null, null, null, type, keyword == null ? null : TokenFactory.tokenFromKeyword(k
eyword), identifier3(name), functionExpression); |
| 155 | 163 |
| 156 static FunctionDeclarationStatement functionDeclarationStatement(TypeName type
, Keyword keyword, String name, FunctionExpression functionExpression) => new Fu
nctionDeclarationStatement(functionDeclaration(type, keyword, name, functionExpr
ession)); | 164 static FunctionDeclarationStatement functionDeclarationStatement(TypeName type
, Keyword keyword, String name, FunctionExpression functionExpression) => new Fu
nctionDeclarationStatement(functionDeclaration(type, keyword, name, functionExpr
ession)); |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 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)); | 348 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)); |
| 341 | 349 |
| 342 static SymbolLiteral symbolLiteral(List<String> components) { | 350 static SymbolLiteral symbolLiteral(List<String> components) { |
| 343 List<Token> identifierList = new List<Token>(); | 351 List<Token> identifierList = new List<Token>(); |
| 344 for (String component in components) { | 352 for (String component in components) { |
| 345 identifierList.add(TokenFactory.tokenFromTypeAndString(TokenType.IDENTIFIE
R, component)); | 353 identifierList.add(TokenFactory.tokenFromTypeAndString(TokenType.IDENTIFIE
R, component)); |
| 346 } | 354 } |
| 347 return new SymbolLiteral(TokenFactory.tokenFromType(TokenType.HASH), new Lis
t.from(identifierList)); | 355 return new SymbolLiteral(TokenFactory.tokenFromType(TokenType.HASH), new Lis
t.from(identifierList)); |
| 348 } | 356 } |
| 349 | 357 |
| 358 static BlockFunctionBody syncBlockFunctionBody(List<Statement> statements) =>
new BlockFunctionBody(TokenFactory.tokenFromTypeAndString(TokenType.IDENTIFIER,
"sync"), null, block(statements)); |
| 359 |
| 360 static BlockFunctionBody syncGeneratorBlockFunctionBody(List<Statement> statem
ents) => new BlockFunctionBody(TokenFactory.tokenFromTypeAndString(TokenType.IDE
NTIFIER, "sync"), TokenFactory.tokenFromType(TokenType.STAR), block(statements))
; |
| 361 |
| 350 static ThisExpression thisExpression() => new ThisExpression(TokenFactory.toke
nFromKeyword(Keyword.THIS)); | 362 static ThisExpression thisExpression() => new ThisExpression(TokenFactory.toke
nFromKeyword(Keyword.THIS)); |
| 351 | 363 |
| 352 static ThrowExpression throwExpression() => throwExpression2(null); | 364 static ThrowExpression throwExpression() => throwExpression2(null); |
| 353 | 365 |
| 354 static ThrowExpression throwExpression2(Expression expression) => new ThrowExp
ression(TokenFactory.tokenFromKeyword(Keyword.THROW), expression); | 366 static ThrowExpression throwExpression2(Expression expression) => new ThrowExp
ression(TokenFactory.tokenFromKeyword(Keyword.THROW), expression); |
| 355 | 367 |
| 356 static TopLevelVariableDeclaration topLevelVariableDeclaration(Keyword keyword
, TypeName type, List<VariableDeclaration> variables) => new TopLevelVariableDec
laration(null, null, variableDeclarationList(keyword, type, variables), TokenFac
tory.tokenFromType(TokenType.SEMICOLON)); | 368 static TopLevelVariableDeclaration topLevelVariableDeclaration(Keyword keyword
, TypeName type, List<VariableDeclaration> variables) => new TopLevelVariableDec
laration(null, null, variableDeclarationList(keyword, type, variables), TokenFac
tory.tokenFromType(TokenType.SEMICOLON)); |
| 357 | 369 |
| 358 static TopLevelVariableDeclaration topLevelVariableDeclaration2(Keyword keywor
d, List<VariableDeclaration> variables) => new TopLevelVariableDeclaration(null,
null, variableDeclarationList(keyword, null, variables), TokenFactory.tokenFrom
Type(TokenType.SEMICOLON)); | 370 static TopLevelVariableDeclaration topLevelVariableDeclaration2(Keyword keywor
d, List<VariableDeclaration> variables) => new TopLevelVariableDeclaration(null,
null, variableDeclarationList(keyword, null, variables), TokenFactory.tokenFrom
Type(TokenType.SEMICOLON)); |
| 359 | 371 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 418 | 430 |
| 419 static VariableDeclarationList variableDeclarationList2(Keyword keyword, List<
VariableDeclaration> variables) => variableDeclarationList(keyword, null, variab
les); | 431 static VariableDeclarationList variableDeclarationList2(Keyword keyword, List<
VariableDeclaration> variables) => variableDeclarationList(keyword, null, variab
les); |
| 420 | 432 |
| 421 static VariableDeclarationStatement variableDeclarationStatement(Keyword keywo
rd, TypeName type, List<VariableDeclaration> variables) => new VariableDeclarati
onStatement(variableDeclarationList(keyword, type, variables), TokenFactory.toke
nFromType(TokenType.SEMICOLON)); | 433 static VariableDeclarationStatement variableDeclarationStatement(Keyword keywo
rd, TypeName type, List<VariableDeclaration> variables) => new VariableDeclarati
onStatement(variableDeclarationList(keyword, type, variables), TokenFactory.toke
nFromType(TokenType.SEMICOLON)); |
| 422 | 434 |
| 423 static VariableDeclarationStatement variableDeclarationStatement2(Keyword keyw
ord, List<VariableDeclaration> variables) => variableDeclarationStatement(keywor
d, null, variables); | 435 static VariableDeclarationStatement variableDeclarationStatement2(Keyword keyw
ord, List<VariableDeclaration> variables) => variableDeclarationStatement(keywor
d, null, variables); |
| 424 | 436 |
| 425 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); | 437 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); |
| 426 | 438 |
| 427 static WithClause withClause(List<TypeName> types) => new WithClause(TokenFact
ory.tokenFromKeyword(Keyword.WITH), list(types)); | 439 static WithClause withClause(List<TypeName> types) => new WithClause(TokenFact
ory.tokenFromKeyword(Keyword.WITH), list(types)); |
| 440 |
| 441 static YieldStatement yieldEachStatement(Expression expression) => new YieldSt
atement(TokenFactory.tokenFromTypeAndString(TokenType.IDENTIFIER, "yield"), Toke
nFactory.tokenFromType(TokenType.STAR), expression, TokenFactory.tokenFromType(T
okenType.SEMICOLON)); |
| 442 |
| 443 static YieldStatement yieldStatement(Expression expression) => new YieldStatem
ent(TokenFactory.tokenFromTypeAndString(TokenType.IDENTIFIER, "yield"), null, ex
pression, TokenFactory.tokenFromType(TokenType.SEMICOLON)); |
| 428 } | 444 } |
| OLD | NEW |