| OLD | NEW |
| 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_test; | 3 library engine.ast_test; |
| 4 import 'package:analyzer_experimental/src/generated/java_core.dart'; | 4 import 'package:analyzer_experimental/src/generated/java_core.dart'; |
| 5 import 'package:analyzer_experimental/src/generated/java_junit.dart'; | 5 import 'package:analyzer_experimental/src/generated/java_junit.dart'; |
| 6 import 'package:analyzer_experimental/src/generated/scanner.dart'; | 6 import 'package:analyzer_experimental/src/generated/scanner.dart'; |
| 7 import 'package:analyzer_experimental/src/generated/ast.dart'; | 7 import 'package:analyzer_experimental/src/generated/ast.dart'; |
| 8 import 'package:analyzer_experimental/src/generated/utilities_dart.dart'; | 8 import 'package:analyzer_experimental/src/generated/utilities_dart.dart'; |
| 9 import 'package:analyzer_experimental/src/generated/element.dart' show ClassElem
ent; | 9 import 'package:analyzer_experimental/src/generated/element.dart' show ClassElem
ent; |
| 10 import 'package:unittest/unittest.dart' as _ut; | 10 import 'package:unittest/unittest.dart' as _ut; |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 static CatchClause catchClause5(TypeName exceptionType, String exceptionParame
ter, String stackTraceParameter, List<Statement> statements) => new CatchClause.
full(exceptionType == null ? null : TokenFactory.token4(TokenType.IDENTIFIER, "o
n"), exceptionType, exceptionParameter == null ? null : TokenFactory.token(Keywo
rd.CATCH), exceptionParameter == null ? null : TokenFactory.token3(TokenType.OPE
N_PAREN), identifier3(exceptionParameter), stackTraceParameter == null ? null :
TokenFactory.token3(TokenType.COMMA), stackTraceParameter == null ? null : ident
ifier3(stackTraceParameter), exceptionParameter == null ? null : TokenFactory.to
ken3(TokenType.CLOSE_PAREN), block(statements)); | 255 static CatchClause catchClause5(TypeName exceptionType, String exceptionParame
ter, String stackTraceParameter, List<Statement> statements) => new CatchClause.
full(exceptionType == null ? null : TokenFactory.token4(TokenType.IDENTIFIER, "o
n"), exceptionType, exceptionParameter == null ? null : TokenFactory.token(Keywo
rd.CATCH), exceptionParameter == null ? null : TokenFactory.token3(TokenType.OPE
N_PAREN), identifier3(exceptionParameter), stackTraceParameter == null ? null :
TokenFactory.token3(TokenType.COMMA), stackTraceParameter == null ? null : ident
ifier3(stackTraceParameter), exceptionParameter == null ? null : TokenFactory.to
ken3(TokenType.CLOSE_PAREN), block(statements)); |
| 256 static ClassDeclaration classDeclaration(Keyword abstractKeyword, String name,
TypeParameterList typeParameters, ExtendsClause extendsClause, WithClause withC
lause, ImplementsClause implementsClause, List<ClassMember> members) => new Clas
sDeclaration.full(null, null, abstractKeyword == null ? null : TokenFactory.toke
n(abstractKeyword), TokenFactory.token(Keyword.CLASS), identifier3(name), typePa
rameters, extendsClause, withClause, implementsClause, TokenFactory.token3(Token
Type.OPEN_CURLY_BRACKET), list(members), TokenFactory.token3(TokenType.CLOSE_CUR
LY_BRACKET)); | 256 static ClassDeclaration classDeclaration(Keyword abstractKeyword, String name,
TypeParameterList typeParameters, ExtendsClause extendsClause, WithClause withC
lause, ImplementsClause implementsClause, List<ClassMember> members) => new Clas
sDeclaration.full(null, null, abstractKeyword == null ? null : TokenFactory.toke
n(abstractKeyword), TokenFactory.token(Keyword.CLASS), identifier3(name), typePa
rameters, extendsClause, withClause, implementsClause, TokenFactory.token3(Token
Type.OPEN_CURLY_BRACKET), list(members), TokenFactory.token3(TokenType.CLOSE_CUR
LY_BRACKET)); |
| 257 static ClassTypeAlias classTypeAlias(String name, TypeParameterList typeParame
ters, Keyword abstractKeyword, TypeName superclass, WithClause withClause, Imple
mentsClause implementsClause) => new ClassTypeAlias.full(null, null, TokenFactor
y.token(Keyword.TYPEDEF), identifier3(name), typeParameters, TokenFactory.token3
(TokenType.EQ), abstractKeyword == null ? null : TokenFactory.token(abstractKeyw
ord), superclass, withClause, implementsClause, TokenFactory.token3(TokenType.SE
MICOLON)); | 257 static ClassTypeAlias classTypeAlias(String name, TypeParameterList typeParame
ters, Keyword abstractKeyword, TypeName superclass, WithClause withClause, Imple
mentsClause implementsClause) => new ClassTypeAlias.full(null, null, TokenFactor
y.token(Keyword.TYPEDEF), identifier3(name), typeParameters, TokenFactory.token3
(TokenType.EQ), abstractKeyword == null ? null : TokenFactory.token(abstractKeyw
ord), superclass, withClause, implementsClause, TokenFactory.token3(TokenType.SE
MICOLON)); |
| 258 static CompilationUnit compilationUnit() => compilationUnit8(null, null, null)
; | 258 static CompilationUnit compilationUnit() => compilationUnit8(null, null, null)
; |
| 259 static CompilationUnit compilationUnit2(List<CompilationUnitMember> declaratio
ns) => compilationUnit8(null, null, list(declarations)); | 259 static CompilationUnit compilationUnit2(List<CompilationUnitMember> declaratio
ns) => compilationUnit8(null, null, list(declarations)); |
| 260 static CompilationUnit compilationUnit3(List<Directive> directives) => compila
tionUnit8(null, list(directives), null); | 260 static CompilationUnit compilationUnit3(List<Directive> directives) => compila
tionUnit8(null, list(directives), null); |
| 261 static CompilationUnit compilationUnit4(List<Directive> directives, List<Compi
lationUnitMember> declarations) => compilationUnit8(null, directives, declaratio
ns); | 261 static CompilationUnit compilationUnit4(List<Directive> directives, List<Compi
lationUnitMember> declarations) => compilationUnit8(null, directives, declaratio
ns); |
| 262 static CompilationUnit compilationUnit5(String scriptTag) => compilationUnit8(
scriptTag, null, null); | 262 static CompilationUnit compilationUnit5(String scriptTag) => compilationUnit8(
scriptTag, null, null); |
| 263 static CompilationUnit compilationUnit6(String scriptTag, List<CompilationUnit
Member> declarations) => compilationUnit8(scriptTag, null, list(declarations)); | 263 static CompilationUnit compilationUnit6(String scriptTag, List<CompilationUnit
Member> declarations) => compilationUnit8(scriptTag, null, list(declarations)); |
| 264 static CompilationUnit compilationUnit7(String scriptTag, List<Directive> dire
ctives) => compilationUnit8(scriptTag, list(directives), null); | 264 static CompilationUnit compilationUnit7(String scriptTag, List<Directive> dire
ctives) => compilationUnit8(scriptTag, list(directives), null); |
| 265 static CompilationUnit compilationUnit8(String scriptTag2, List<Directive> dir
ectives, List<CompilationUnitMember> declarations) => new CompilationUnit.full(T
okenFactory.token3(TokenType.EOF), scriptTag2 == null ? null : scriptTag(scriptT
ag2), directives == null ? new List<Directive>() : directives, declarations == n
ull ? new List<CompilationUnitMember>() : declarations, TokenFactory.token3(Toke
nType.EOF)); | 265 static CompilationUnit compilationUnit8(String scriptTag, List<Directive> dire
ctives, List<CompilationUnitMember> declarations) => new CompilationUnit.full(To
kenFactory.token3(TokenType.EOF), scriptTag == null ? null : ASTFactory.scriptTa
g(scriptTag), directives == null ? new List<Directive>() : directives, declarati
ons == null ? new List<CompilationUnitMember>() : declarations, TokenFactory.tok
en3(TokenType.EOF)); |
| 266 static ConditionalExpression conditionalExpression(Expression condition, Expre
ssion thenExpression, Expression elseExpression) => new ConditionalExpression.fu
ll(condition, TokenFactory.token3(TokenType.QUESTION), thenExpression, TokenFact
ory.token3(TokenType.COLON), elseExpression); | 266 static ConditionalExpression conditionalExpression(Expression condition, Expre
ssion thenExpression, Expression elseExpression) => new ConditionalExpression.fu
ll(condition, TokenFactory.token3(TokenType.QUESTION), thenExpression, TokenFact
ory.token3(TokenType.COLON), elseExpression); |
| 267 static ConstructorDeclaration constructorDeclaration(Identifier returnType, St
ring name, FormalParameterList parameters, List<ConstructorInitializer> initiali
zers) => new ConstructorDeclaration.full(null, null, TokenFactory.token(Keyword.
EXTERNAL), null, null, returnType, name == null ? null : TokenFactory.token3(Tok
enType.PERIOD), name == null ? null : identifier3(name), parameters, initializer
s == null || initializers.isEmpty ? null : TokenFactory.token3(TokenType.PERIOD)
, initializers == null ? new List<ConstructorInitializer>() : initializers, null
, emptyFunctionBody()); | 267 static ConstructorDeclaration constructorDeclaration(Identifier returnType, St
ring name, FormalParameterList parameters, List<ConstructorInitializer> initiali
zers) => new ConstructorDeclaration.full(null, null, TokenFactory.token(Keyword.
EXTERNAL), null, null, returnType, name == null ? null : TokenFactory.token3(Tok
enType.PERIOD), name == null ? null : identifier3(name), parameters, initializer
s == null || initializers.isEmpty ? null : TokenFactory.token3(TokenType.PERIOD)
, initializers == null ? new List<ConstructorInitializer>() : initializers, null
, emptyFunctionBody()); |
| 268 static ConstructorDeclaration constructorDeclaration2(Keyword constKeyword, Ke
yword factoryKeyword, Identifier returnType, String name, FormalParameterList pa
rameters, List<ConstructorInitializer> initializers, FunctionBody body) => new C
onstructorDeclaration.full(null, null, null, constKeyword == null ? null : Token
Factory.token(constKeyword), factoryKeyword == null ? null : TokenFactory.token(
factoryKeyword), returnType, name == null ? null : TokenFactory.token3(TokenType
.PERIOD), name == null ? null : identifier3(name), parameters, initializers == n
ull || initializers.isEmpty ? null : TokenFactory.token3(TokenType.PERIOD), init
ializers == null ? new List<ConstructorInitializer>() : initializers, null, body
); | 268 static ConstructorDeclaration constructorDeclaration2(Keyword constKeyword, Ke
yword factoryKeyword, Identifier returnType, String name, FormalParameterList pa
rameters, List<ConstructorInitializer> initializers, FunctionBody body) => new C
onstructorDeclaration.full(null, null, null, constKeyword == null ? null : Token
Factory.token(constKeyword), factoryKeyword == null ? null : TokenFactory.token(
factoryKeyword), returnType, name == null ? null : TokenFactory.token3(TokenType
.PERIOD), name == null ? null : identifier3(name), parameters, initializers == n
ull || initializers.isEmpty ? null : TokenFactory.token3(TokenType.PERIOD), init
ializers == null ? new List<ConstructorInitializer>() : initializers, null, body
); |
| 269 static ConstructorFieldInitializer constructorFieldInitializer(bool prefixedWi
thThis, String fieldName, Expression expression) => new ConstructorFieldInitiali
zer.full(prefixedWithThis ? TokenFactory.token(Keyword.THIS) : null, prefixedWit
hThis ? TokenFactory.token3(TokenType.PERIOD) : null, identifier3(fieldName), To
kenFactory.token3(TokenType.EQ), expression); | 269 static ConstructorFieldInitializer constructorFieldInitializer(bool prefixedWi
thThis, String fieldName, Expression expression) => new ConstructorFieldInitiali
zer.full(prefixedWithThis ? TokenFactory.token(Keyword.THIS) : null, prefixedWit
hThis ? TokenFactory.token3(TokenType.PERIOD) : null, identifier3(fieldName), To
kenFactory.token3(TokenType.EQ), expression); |
| 270 static ConstructorName constructorName(TypeName type, String name) => new Cons
tructorName.full(type, name == null ? null : TokenFactory.token3(TokenType.PERIO
D), name == null ? null : identifier3(name)); | 270 static ConstructorName constructorName(TypeName type, String name) => new Cons
tructorName.full(type, name == null ? null : TokenFactory.token3(TokenType.PERIO
D), name == null ? null : identifier3(name)); |
| 271 static ContinueStatement continueStatement() => new ContinueStatement.full(Tok
enFactory.token(Keyword.CONTINUE), null, TokenFactory.token3(TokenType.SEMICOLON
)); | 271 static ContinueStatement continueStatement() => new ContinueStatement.full(Tok
enFactory.token(Keyword.CONTINUE), null, TokenFactory.token3(TokenType.SEMICOLON
)); |
| 272 static ContinueStatement continueStatement2(String label) => new ContinueState
ment.full(TokenFactory.token(Keyword.CONTINUE), identifier3(label), TokenFactory
.token3(TokenType.SEMICOLON)); | 272 static ContinueStatement continueStatement2(String label) => new ContinueState
ment.full(TokenFactory.token(Keyword.CONTINUE), identifier3(label), TokenFactory
.token3(TokenType.SEMICOLON)); |
| 273 static DeclaredIdentifier declaredIdentifier(Keyword keyword, String identifie
r) => declaredIdentifier2(keyword, null, identifier); | 273 static DeclaredIdentifier declaredIdentifier(Keyword keyword, String identifie
r) => declaredIdentifier2(keyword, null, identifier); |
| 274 static DeclaredIdentifier declaredIdentifier2(Keyword keyword, TypeName type,
String identifier) => new DeclaredIdentifier.full(null, null, keyword == null ?
null : TokenFactory.token(keyword), type, identifier3(identifier)); | 274 static DeclaredIdentifier declaredIdentifier2(Keyword keyword, TypeName type,
String identifier) => new DeclaredIdentifier.full(null, null, keyword == null ?
null : TokenFactory.token(keyword), type, identifier3(identifier)); |
| 275 static DeclaredIdentifier declaredIdentifier3(String identifier) => declaredId
entifier2(null, null, identifier); | 275 static DeclaredIdentifier declaredIdentifier3(String identifier) => declaredId
entifier2(null, null, identifier); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 299 static FunctionExpressionInvocation functionExpressionInvocation(Expression fu
nction, List<Expression> arguments) => new FunctionExpressionInvocation.full(fun
ction, argumentList(arguments)); | 299 static FunctionExpressionInvocation functionExpressionInvocation(Expression fu
nction, List<Expression> arguments) => new FunctionExpressionInvocation.full(fun
ction, argumentList(arguments)); |
| 300 static FunctionTypedFormalParameter functionTypedFormalParameter(TypeName retu
rnType, String identifier, List<FormalParameter> parameters) => new FunctionType
dFormalParameter.full(null, null, returnType, identifier3(identifier), formalPar
ameterList(parameters)); | 300 static FunctionTypedFormalParameter functionTypedFormalParameter(TypeName retu
rnType, String identifier, List<FormalParameter> parameters) => new FunctionType
dFormalParameter.full(null, null, returnType, identifier3(identifier), formalPar
ameterList(parameters)); |
| 301 static HideCombinator hideCombinator(List<SimpleIdentifier> identifiers) => ne
w HideCombinator.full(TokenFactory.token2("hide"), list(identifiers)); | 301 static HideCombinator hideCombinator(List<SimpleIdentifier> identifiers) => ne
w HideCombinator.full(TokenFactory.token2("hide"), list(identifiers)); |
| 302 static HideCombinator hideCombinator2(List<String> identifiers) { | 302 static HideCombinator hideCombinator2(List<String> identifiers) { |
| 303 List<SimpleIdentifier> identifierList = new List<SimpleIdentifier>(); | 303 List<SimpleIdentifier> identifierList = new List<SimpleIdentifier>(); |
| 304 for (String identifier in identifiers) { | 304 for (String identifier in identifiers) { |
| 305 identifierList.add(identifier3(identifier)); | 305 identifierList.add(identifier3(identifier)); |
| 306 } | 306 } |
| 307 return new HideCombinator.full(TokenFactory.token2("hide"), identifierList); | 307 return new HideCombinator.full(TokenFactory.token2("hide"), identifierList); |
| 308 } | 308 } |
| 309 static PrefixedIdentifier identifier(SimpleIdentifier prefix, SimpleIdentifier
identifier2) => new PrefixedIdentifier.full(prefix, TokenFactory.token3(TokenTy
pe.PERIOD), identifier2); | 309 static PrefixedIdentifier identifier(SimpleIdentifier prefix, SimpleIdentifier
identifier) => new PrefixedIdentifier.full(prefix, TokenFactory.token3(TokenTyp
e.PERIOD), identifier); |
| 310 static SimpleIdentifier identifier3(String lexeme) => new SimpleIdentifier.ful
l(TokenFactory.token4(TokenType.IDENTIFIER, lexeme)); | 310 static SimpleIdentifier identifier3(String lexeme) => new SimpleIdentifier.ful
l(TokenFactory.token4(TokenType.IDENTIFIER, lexeme)); |
| 311 static PrefixedIdentifier identifier4(String prefix, SimpleIdentifier identifi
er) => new PrefixedIdentifier.full(identifier3(prefix), TokenFactory.token3(Toke
nType.PERIOD), identifier); | 311 static PrefixedIdentifier identifier4(String prefix, SimpleIdentifier identifi
er) => new PrefixedIdentifier.full(identifier3(prefix), TokenFactory.token3(Toke
nType.PERIOD), identifier); |
| 312 static PrefixedIdentifier identifier5(String prefix, String identifier) => new
PrefixedIdentifier.full(identifier3(prefix), TokenFactory.token3(TokenType.PERI
OD), identifier3(identifier)); | 312 static PrefixedIdentifier identifier5(String prefix, String identifier) => new
PrefixedIdentifier.full(identifier3(prefix), TokenFactory.token3(TokenType.PERI
OD), identifier3(identifier)); |
| 313 static IfStatement ifStatement(Expression condition, Statement thenStatement)
=> ifStatement2(condition, thenStatement, null); | 313 static IfStatement ifStatement(Expression condition, Statement thenStatement)
=> ifStatement2(condition, thenStatement, null); |
| 314 static IfStatement ifStatement2(Expression condition, Statement thenStatement,
Statement elseStatement) => new IfStatement.full(TokenFactory.token(Keyword.IF)
, TokenFactory.token3(TokenType.OPEN_PAREN), condition, TokenFactory.token3(Toke
nType.CLOSE_PAREN), thenStatement, elseStatement == null ? null : TokenFactory.t
oken(Keyword.ELSE), elseStatement); | 314 static IfStatement ifStatement2(Expression condition, Statement thenStatement,
Statement elseStatement) => new IfStatement.full(TokenFactory.token(Keyword.IF)
, TokenFactory.token3(TokenType.OPEN_PAREN), condition, TokenFactory.token3(Toke
nType.CLOSE_PAREN), thenStatement, elseStatement == null ? null : TokenFactory.t
oken(Keyword.ELSE), elseStatement); |
| 315 static ImplementsClause implementsClause(List<TypeName> types) => new Implemen
tsClause.full(TokenFactory.token(Keyword.IMPLEMENTS), list(types)); | 315 static ImplementsClause implementsClause(List<TypeName> types) => new Implemen
tsClause.full(TokenFactory.token(Keyword.IMPLEMENTS), list(types)); |
| 316 static ImportDirective importDirective(List<Annotation> metadata, String uri,
String prefix, List<Combinator> combinators) => new ImportDirective.full(null, m
etadata, TokenFactory.token(Keyword.IMPORT), string2(uri), prefix == null ? null
: TokenFactory.token(Keyword.AS), prefix == null ? null : identifier3(prefix),
list(combinators), TokenFactory.token3(TokenType.SEMICOLON)); | 316 static ImportDirective importDirective(List<Annotation> metadata, String uri,
String prefix, List<Combinator> combinators) => new ImportDirective.full(null, m
etadata, TokenFactory.token(Keyword.IMPORT), string2(uri), prefix == null ? null
: TokenFactory.token(Keyword.AS), prefix == null ? null : identifier3(prefix),
list(combinators), TokenFactory.token3(TokenType.SEMICOLON)); |
| 317 static ImportDirective importDirective2(String uri, String prefix, List<Combin
ator> combinators) => importDirective(new List<Annotation>(), uri, prefix, combi
nators); | 317 static ImportDirective importDirective2(String uri, String prefix, List<Combin
ator> combinators) => importDirective(new List<Annotation>(), uri, prefix, combi
nators); |
| 318 static IndexExpression indexExpression(Expression array, Expression index) =>
new IndexExpression.forTarget_full(array, TokenFactory.token3(TokenType.OPEN_SQU
ARE_BRACKET), index, TokenFactory.token3(TokenType.CLOSE_SQUARE_BRACKET)); | 318 static IndexExpression indexExpression(Expression array, Expression index) =>
new IndexExpression.forTarget_full(array, TokenFactory.token3(TokenType.OPEN_SQU
ARE_BRACKET), index, TokenFactory.token3(TokenType.CLOSE_SQUARE_BRACKET)); |
| 319 static InstanceCreationExpression instanceCreationExpression(Keyword keyword,
ConstructorName name, List<Expression> arguments) => new InstanceCreationExpress
ion.full(keyword == null ? null : TokenFactory.token(keyword), name, argumentLis
t(arguments)); | 319 static InstanceCreationExpression instanceCreationExpression(Keyword keyword,
ConstructorName name, List<Expression> arguments) => new InstanceCreationExpress
ion.full(keyword == null ? null : TokenFactory.token(keyword), name, argumentLis
t(arguments)); |
| 320 static InstanceCreationExpression instanceCreationExpression2(Keyword keyword,
TypeName type, List<Expression> arguments) => instanceCreationExpression3(keywo
rd, type, null, arguments); | 320 static InstanceCreationExpression instanceCreationExpression2(Keyword keyword,
TypeName type, List<Expression> arguments) => instanceCreationExpression3(keywo
rd, type, null, arguments); |
| 321 static InstanceCreationExpression instanceCreationExpression3(Keyword keyword,
TypeName type, String identifier, List<Expression> arguments) => instanceCreati
onExpression(keyword, new ConstructorName.full(type, identifier == null ? null :
TokenFactory.token3(TokenType.PERIOD), identifier == null ? null : identifier3(
identifier)), arguments); | 321 static InstanceCreationExpression instanceCreationExpression3(Keyword keyword,
TypeName type, String identifier, List<Expression> arguments) => instanceCreati
onExpression(keyword, new ConstructorName.full(type, identifier == null ? null :
TokenFactory.token3(TokenType.PERIOD), identifier == null ? null : identifier3(
identifier)), arguments); |
| 322 static IntegerLiteral integer(int value) => new IntegerLiteral.full(TokenFacto
ry.token4(TokenType.INT, value.toString()), value); | 322 static IntegerLiteral integer(int value) => new IntegerLiteral.full(TokenFacto
ry.token4(TokenType.INT, value.toString()), value); |
| 323 static InterpolationExpression interpolationExpression(Expression expression)
=> new InterpolationExpression.full(TokenFactory.token3(TokenType.STRING_INTERPO
LATION_EXPRESSION), expression, TokenFactory.token3(TokenType.CLOSE_CURLY_BRACKE
T)); | 323 static InterpolationExpression interpolationExpression(Expression expression)
=> new InterpolationExpression.full(TokenFactory.token3(TokenType.STRING_INTERPO
LATION_EXPRESSION), expression, TokenFactory.token3(TokenType.CLOSE_CURLY_BRACKE
T)); |
| 324 static InterpolationExpression interpolationExpression2(String identifier) =>
new InterpolationExpression.full(TokenFactory.token3(TokenType.STRING_INTERPOLAT
ION_IDENTIFIER), identifier3(identifier), null); | 324 static InterpolationExpression interpolationExpression2(String identifier) =>
new InterpolationExpression.full(TokenFactory.token3(TokenType.STRING_INTERPOLAT
ION_IDENTIFIER), identifier3(identifier), null); |
| 325 static InterpolationString interpolationString(String contents, String value)
=> new InterpolationString.full(TokenFactory.token2(contents), value); | 325 static InterpolationString interpolationString(String contents, String value)
=> new InterpolationString.full(TokenFactory.token2(contents), value); |
| 326 static IsExpression isExpression(Expression expression, bool negated, TypeName
type) => new IsExpression.full(expression, TokenFactory.token(Keyword.IS), nega
ted ? TokenFactory.token3(TokenType.BANG) : null, type); | 326 static IsExpression isExpression(Expression expression, bool negated, TypeName
type) => new IsExpression.full(expression, TokenFactory.token(Keyword.IS), nega
ted ? TokenFactory.token3(TokenType.BANG) : null, type); |
| 327 static Label label(SimpleIdentifier label2) => new Label.full(label2, TokenFac
tory.token3(TokenType.COLON)); | 327 static Label label(SimpleIdentifier label) => new Label.full(label, TokenFacto
ry.token3(TokenType.COLON)); |
| 328 static Label label2(String label22) => label(identifier3(label22)); | 328 static Label label2(String label) => ASTFactory.label(identifier3(label)); |
| 329 static LabeledStatement labeledStatement(List<Label> labels, Statement stateme
nt) => new LabeledStatement.full(labels, statement); | 329 static LabeledStatement labeledStatement(List<Label> labels, Statement stateme
nt) => new LabeledStatement.full(labels, statement); |
| 330 static LibraryDirective libraryDirective(List<Annotation> metadata, LibraryIde
ntifier libraryName) => new LibraryDirective.full(null, metadata, TokenFactory.t
oken(Keyword.LIBRARY), libraryName, TokenFactory.token3(TokenType.SEMICOLON)); | 330 static LibraryDirective libraryDirective(List<Annotation> metadata, LibraryIde
ntifier libraryName) => new LibraryDirective.full(null, metadata, TokenFactory.t
oken(Keyword.LIBRARY), libraryName, TokenFactory.token3(TokenType.SEMICOLON)); |
| 331 static LibraryDirective libraryDirective2(String libraryName) => libraryDirect
ive(new List<Annotation>(), libraryIdentifier2([libraryName])); | 331 static LibraryDirective libraryDirective2(String libraryName) => libraryDirect
ive(new List<Annotation>(), libraryIdentifier2([libraryName])); |
| 332 static LibraryIdentifier libraryIdentifier(List<SimpleIdentifier> components)
=> new LibraryIdentifier.full(list(components)); | 332 static LibraryIdentifier libraryIdentifier(List<SimpleIdentifier> components)
=> new LibraryIdentifier.full(list(components)); |
| 333 static LibraryIdentifier libraryIdentifier2(List<String> components) { | 333 static LibraryIdentifier libraryIdentifier2(List<String> components) { |
| 334 List<SimpleIdentifier> componentList = new List<SimpleIdentifier>(); | 334 List<SimpleIdentifier> componentList = new List<SimpleIdentifier>(); |
| 335 for (String component in components) { | 335 for (String component in components) { |
| 336 componentList.add(identifier3(component)); | 336 componentList.add(identifier3(component)); |
| 337 } | 337 } |
| 338 return new LibraryIdentifier.full(componentList); | 338 return new LibraryIdentifier.full(componentList); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 367 static DefaultFormalParameter positionalFormalParameter(NormalFormalParameter
parameter, Expression expression) => new DefaultFormalParameter.full(parameter,
ParameterKind.POSITIONAL, expression == null ? null : TokenFactory.token3(TokenT
ype.EQ), expression); | 367 static DefaultFormalParameter positionalFormalParameter(NormalFormalParameter
parameter, Expression expression) => new DefaultFormalParameter.full(parameter,
ParameterKind.POSITIONAL, expression == null ? null : TokenFactory.token3(TokenT
ype.EQ), expression); |
| 368 static PostfixExpression postfixExpression(Expression expression, TokenType op
erator) => new PostfixExpression.full(expression, TokenFactory.token3(operator))
; | 368 static PostfixExpression postfixExpression(Expression expression, TokenType op
erator) => new PostfixExpression.full(expression, TokenFactory.token3(operator))
; |
| 369 static PrefixExpression prefixExpression(TokenType operator, Expression expres
sion) => new PrefixExpression.full(TokenFactory.token3(operator), expression); | 369 static PrefixExpression prefixExpression(TokenType operator, Expression expres
sion) => new PrefixExpression.full(TokenFactory.token3(operator), expression); |
| 370 static PropertyAccess propertyAccess(Expression target, SimpleIdentifier prope
rtyName) => new PropertyAccess.full(target, TokenFactory.token3(TokenType.PERIOD
), propertyName); | 370 static PropertyAccess propertyAccess(Expression target, SimpleIdentifier prope
rtyName) => new PropertyAccess.full(target, TokenFactory.token3(TokenType.PERIOD
), propertyName); |
| 371 static PropertyAccess propertyAccess2(Expression target, String propertyName)
=> new PropertyAccess.full(target, TokenFactory.token3(TokenType.PERIOD), identi
fier3(propertyName)); | 371 static PropertyAccess propertyAccess2(Expression target, String propertyName)
=> new PropertyAccess.full(target, TokenFactory.token3(TokenType.PERIOD), identi
fier3(propertyName)); |
| 372 static RedirectingConstructorInvocation redirectingConstructorInvocation(List<
Expression> arguments) => redirectingConstructorInvocation2(null, arguments); | 372 static RedirectingConstructorInvocation redirectingConstructorInvocation(List<
Expression> arguments) => redirectingConstructorInvocation2(null, arguments); |
| 373 static RedirectingConstructorInvocation redirectingConstructorInvocation2(Stri
ng constructorName, List<Expression> arguments) => new RedirectingConstructorInv
ocation.full(TokenFactory.token(Keyword.THIS), constructorName == null ? null :
TokenFactory.token3(TokenType.PERIOD), constructorName == null ? null : identifi
er3(constructorName), argumentList(arguments)); | 373 static RedirectingConstructorInvocation redirectingConstructorInvocation2(Stri
ng constructorName, List<Expression> arguments) => new RedirectingConstructorInv
ocation.full(TokenFactory.token(Keyword.THIS), constructorName == null ? null :
TokenFactory.token3(TokenType.PERIOD), constructorName == null ? null : identifi
er3(constructorName), argumentList(arguments)); |
| 374 static RethrowExpression rethrowExpression() => new RethrowExpression.full(Tok
enFactory.token(Keyword.RETHROW)); | 374 static RethrowExpression rethrowExpression() => new RethrowExpression.full(Tok
enFactory.token(Keyword.RETHROW)); |
| 375 static ReturnStatement returnStatement() => returnStatement2(null); | 375 static ReturnStatement returnStatement() => returnStatement2(null); |
| 376 static ReturnStatement returnStatement2(Expression expression) => new ReturnSt
atement.full(TokenFactory.token(Keyword.RETURN), expression, TokenFactory.token3
(TokenType.SEMICOLON)); | 376 static ReturnStatement returnStatement2(Expression expression) => new ReturnSt
atement.full(TokenFactory.token(Keyword.RETURN), expression, TokenFactory.token3
(TokenType.SEMICOLON)); |
| 377 static ScriptTag scriptTag(String scriptTag2) => new ScriptTag.full(TokenFacto
ry.token2(scriptTag2)); | 377 static ScriptTag scriptTag(String scriptTag) => new ScriptTag.full(TokenFactor
y.token2(scriptTag)); |
| 378 static ShowCombinator showCombinator(List<SimpleIdentifier> identifiers) => ne
w ShowCombinator.full(TokenFactory.token2("show"), list(identifiers)); | 378 static ShowCombinator showCombinator(List<SimpleIdentifier> identifiers) => ne
w ShowCombinator.full(TokenFactory.token2("show"), list(identifiers)); |
| 379 static ShowCombinator showCombinator2(List<String> identifiers) { | 379 static ShowCombinator showCombinator2(List<String> identifiers) { |
| 380 List<SimpleIdentifier> identifierList = new List<SimpleIdentifier>(); | 380 List<SimpleIdentifier> identifierList = new List<SimpleIdentifier>(); |
| 381 for (String identifier in identifiers) { | 381 for (String identifier in identifiers) { |
| 382 identifierList.add(identifier3(identifier)); | 382 identifierList.add(identifier3(identifier)); |
| 383 } | 383 } |
| 384 return new ShowCombinator.full(TokenFactory.token2("show"), identifierList); | 384 return new ShowCombinator.full(TokenFactory.token2("show"), identifierList); |
| 385 } | 385 } |
| 386 static SimpleFormalParameter simpleFormalParameter(Keyword keyword, String par
ameterName) => simpleFormalParameter2(keyword, null, parameterName); | 386 static SimpleFormalParameter simpleFormalParameter(Keyword keyword, String par
ameterName) => simpleFormalParameter2(keyword, null, parameterName); |
| 387 static SimpleFormalParameter simpleFormalParameter2(Keyword keyword, TypeName
type, String parameterName) => new SimpleFormalParameter.full(null, null, keywor
d == null ? null : TokenFactory.token(keyword), type, identifier3(parameterName)
); | 387 static SimpleFormalParameter simpleFormalParameter2(Keyword keyword, TypeName
type, String parameterName) => new SimpleFormalParameter.full(null, null, keywor
d == null ? null : TokenFactory.token(keyword), type, identifier3(parameterName)
); |
| (...skipping 1025 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1413 void test_visitCommentReference() { | 1413 void test_visitCommentReference() { |
| 1414 assertSource("", new CommentReference.full(null, ASTFactory.identifier3("a")
)); | 1414 assertSource("", new CommentReference.full(null, ASTFactory.identifier3("a")
)); |
| 1415 } | 1415 } |
| 1416 void test_visitCompilationUnit_declaration() { | 1416 void test_visitCompilationUnit_declaration() { |
| 1417 assertSource("var a;", ASTFactory.compilationUnit2([ASTFactory.topLevelVaria
bleDeclaration2(Keyword.VAR, [ASTFactory.variableDeclaration("a")])])); | 1417 assertSource("var a;", ASTFactory.compilationUnit2([ASTFactory.topLevelVaria
bleDeclaration2(Keyword.VAR, [ASTFactory.variableDeclaration("a")])])); |
| 1418 } | 1418 } |
| 1419 void test_visitCompilationUnit_directive() { | 1419 void test_visitCompilationUnit_directive() { |
| 1420 assertSource("library l;", ASTFactory.compilationUnit3([ASTFactory.libraryDi
rective2("l")])); | 1420 assertSource("library l;", ASTFactory.compilationUnit3([ASTFactory.libraryDi
rective2("l")])); |
| 1421 } | 1421 } |
| 1422 void test_visitCompilationUnit_directive_declaration() { | 1422 void test_visitCompilationUnit_directive_declaration() { |
| 1423 assertSource("library l; var a;", ASTFactory.compilationUnit4(ASTFactory.lis
t([(ASTFactory.libraryDirective2("l") as Directive)]), ASTFactory.list([(ASTFact
ory.topLevelVariableDeclaration2(Keyword.VAR, [ASTFactory.variableDeclaration("a
")]) as CompilationUnitMember)]))); | 1423 assertSource("library l; var a;", ASTFactory.compilationUnit4(ASTFactory.lis
t([ASTFactory.libraryDirective2("l") as Directive]), ASTFactory.list([ASTFactory
.topLevelVariableDeclaration2(Keyword.VAR, [ASTFactory.variableDeclaration("a")]
) as CompilationUnitMember]))); |
| 1424 } | 1424 } |
| 1425 void test_visitCompilationUnit_empty() { | 1425 void test_visitCompilationUnit_empty() { |
| 1426 assertSource("", ASTFactory.compilationUnit()); | 1426 assertSource("", ASTFactory.compilationUnit()); |
| 1427 } | 1427 } |
| 1428 void test_visitCompilationUnit_script() { | 1428 void test_visitCompilationUnit_script() { |
| 1429 assertSource("!#/bin/dartvm", ASTFactory.compilationUnit5("!#/bin/dartvm")); | 1429 assertSource("!#/bin/dartvm", ASTFactory.compilationUnit5("!#/bin/dartvm")); |
| 1430 } | 1430 } |
| 1431 void test_visitCompilationUnit_script_declaration() { | 1431 void test_visitCompilationUnit_script_declaration() { |
| 1432 assertSource("!#/bin/dartvm var a;", ASTFactory.compilationUnit6("!#/bin/dar
tvm", [ASTFactory.topLevelVariableDeclaration2(Keyword.VAR, [ASTFactory.variable
Declaration("a")])])); | 1432 assertSource("!#/bin/dartvm var a;", ASTFactory.compilationUnit6("!#/bin/dar
tvm", [ASTFactory.topLevelVariableDeclaration2(Keyword.VAR, [ASTFactory.variable
Declaration("a")])])); |
| 1433 } | 1433 } |
| 1434 void test_visitCompilationUnit_script_directive() { | 1434 void test_visitCompilationUnit_script_directive() { |
| 1435 assertSource("!#/bin/dartvm library l;", ASTFactory.compilationUnit7("!#/bin
/dartvm", [ASTFactory.libraryDirective2("l")])); | 1435 assertSource("!#/bin/dartvm library l;", ASTFactory.compilationUnit7("!#/bin
/dartvm", [ASTFactory.libraryDirective2("l")])); |
| 1436 } | 1436 } |
| 1437 void test_visitCompilationUnit_script_directives_declarations() { | 1437 void test_visitCompilationUnit_script_directives_declarations() { |
| 1438 assertSource("!#/bin/dartvm library l; var a;", ASTFactory.compilationUnit8(
"!#/bin/dartvm", ASTFactory.list([(ASTFactory.libraryDirective2("l") as Directiv
e)]), ASTFactory.list([(ASTFactory.topLevelVariableDeclaration2(Keyword.VAR, [AS
TFactory.variableDeclaration("a")]) as CompilationUnitMember)]))); | 1438 assertSource("!#/bin/dartvm library l; var a;", ASTFactory.compilationUnit8(
"!#/bin/dartvm", ASTFactory.list([ASTFactory.libraryDirective2("l") as Directive
]), ASTFactory.list([ASTFactory.topLevelVariableDeclaration2(Keyword.VAR, [ASTFa
ctory.variableDeclaration("a")]) as CompilationUnitMember]))); |
| 1439 } | 1439 } |
| 1440 void test_visitConditionalExpression() { | 1440 void test_visitConditionalExpression() { |
| 1441 assertSource("a ? b : c", ASTFactory.conditionalExpression(ASTFactory.identi
fier3("a"), ASTFactory.identifier3("b"), ASTFactory.identifier3("c"))); | 1441 assertSource("a ? b : c", ASTFactory.conditionalExpression(ASTFactory.identi
fier3("a"), ASTFactory.identifier3("b"), ASTFactory.identifier3("c"))); |
| 1442 } | 1442 } |
| 1443 void test_visitConstructorDeclaration_const() { | 1443 void test_visitConstructorDeclaration_const() { |
| 1444 assertSource("const C() {}", ASTFactory.constructorDeclaration2(Keyword.CONS
T, null, ASTFactory.identifier3("C"), null, ASTFactory.formalParameterList([]),
null, ASTFactory.blockFunctionBody2([]))); | 1444 assertSource("const C() {}", ASTFactory.constructorDeclaration2(Keyword.CONS
T, null, ASTFactory.identifier3("C"), null, ASTFactory.formalParameterList([]),
null, ASTFactory.blockFunctionBody2([]))); |
| 1445 } | 1445 } |
| 1446 void test_visitConstructorDeclaration_external() { | 1446 void test_visitConstructorDeclaration_external() { |
| 1447 assertSource("external C();", ASTFactory.constructorDeclaration(ASTFactory.i
dentifier3("C"), null, ASTFactory.formalParameterList([]), null)); | 1447 assertSource("external C();", ASTFactory.constructorDeclaration(ASTFactory.i
dentifier3("C"), null, ASTFactory.formalParameterList([]), null)); |
| 1448 } | 1448 } |
| 1449 void test_visitConstructorDeclaration_minimal() { | 1449 void test_visitConstructorDeclaration_minimal() { |
| 1450 assertSource("C() {}", ASTFactory.constructorDeclaration2(null, null, ASTFac
tory.identifier3("C"), null, ASTFactory.formalParameterList([]), null, ASTFactor
y.blockFunctionBody2([]))); | 1450 assertSource("C() {}", ASTFactory.constructorDeclaration2(null, null, ASTFac
tory.identifier3("C"), null, ASTFactory.formalParameterList([]), null, ASTFactor
y.blockFunctionBody2([]))); |
| 1451 } | 1451 } |
| 1452 void test_visitConstructorDeclaration_multipleInitializers() { | 1452 void test_visitConstructorDeclaration_multipleInitializers() { |
| 1453 assertSource("C() : a = b, c = d {}", ASTFactory.constructorDeclaration2(nul
l, null, ASTFactory.identifier3("C"), null, ASTFactory.formalParameterList([]),
ASTFactory.list([ | 1453 assertSource("C() : a = b, c = d {}", ASTFactory.constructorDeclaration2(nul
l, null, ASTFactory.identifier3("C"), null, ASTFactory.formalParameterList([]),
ASTFactory.list([ |
| 1454 (ASTFactory.constructorFieldInitializer(false, "a", ASTFactory.identifie
r3("b")) as ConstructorInitializer), | 1454 ASTFactory.constructorFieldInitializer(false, "a", ASTFactory.identifier
3("b")) as ConstructorInitializer, |
| 1455 ASTFactory.constructorFieldInitializer(false, "c", ASTFactory.identifier
3("d"))]), ASTFactory.blockFunctionBody2([]))); | 1455 ASTFactory.constructorFieldInitializer(false, "c", ASTFactory.identifier
3("d"))]), ASTFactory.blockFunctionBody2([]))); |
| 1456 } | 1456 } |
| 1457 void test_visitConstructorDeclaration_multipleParameters() { | 1457 void test_visitConstructorDeclaration_multipleParameters() { |
| 1458 assertSource("C(var a, var b) {}", ASTFactory.constructorDeclaration2(null,
null, ASTFactory.identifier3("C"), null, ASTFactory.formalParameterList([ | 1458 assertSource("C(var a, var b) {}", ASTFactory.constructorDeclaration2(null,
null, ASTFactory.identifier3("C"), null, ASTFactory.formalParameterList([ |
| 1459 ASTFactory.simpleFormalParameter(Keyword.VAR, "a"), | 1459 ASTFactory.simpleFormalParameter(Keyword.VAR, "a"), |
| 1460 ASTFactory.simpleFormalParameter(Keyword.VAR, "b")]), null, ASTFactory.b
lockFunctionBody2([]))); | 1460 ASTFactory.simpleFormalParameter(Keyword.VAR, "b")]), null, ASTFactory.b
lockFunctionBody2([]))); |
| 1461 } | 1461 } |
| 1462 void test_visitConstructorDeclaration_named() { | 1462 void test_visitConstructorDeclaration_named() { |
| 1463 assertSource("C.m() {}", ASTFactory.constructorDeclaration2(null, null, ASTF
actory.identifier3("C"), "m", ASTFactory.formalParameterList([]), null, ASTFacto
ry.blockFunctionBody2([]))); | 1463 assertSource("C.m() {}", ASTFactory.constructorDeclaration2(null, null, ASTF
actory.identifier3("C"), "m", ASTFactory.formalParameterList([]), null, ASTFacto
ry.blockFunctionBody2([]))); |
| 1464 } | 1464 } |
| 1465 void test_visitConstructorDeclaration_singleInitializer() { | 1465 void test_visitConstructorDeclaration_singleInitializer() { |
| 1466 assertSource("C() : a = b {}", ASTFactory.constructorDeclaration2(null, null
, ASTFactory.identifier3("C"), null, ASTFactory.formalParameterList([]), ASTFact
ory.list([(ASTFactory.constructorFieldInitializer(false, "a", ASTFactory.identif
ier3("b")) as ConstructorInitializer)]), ASTFactory.blockFunctionBody2([]))); | 1466 assertSource("C() : a = b {}", ASTFactory.constructorDeclaration2(null, null
, ASTFactory.identifier3("C"), null, ASTFactory.formalParameterList([]), ASTFact
ory.list([ASTFactory.constructorFieldInitializer(false, "a", ASTFactory.identifi
er3("b")) as ConstructorInitializer]), ASTFactory.blockFunctionBody2([]))); |
| 1467 } | 1467 } |
| 1468 void test_visitConstructorFieldInitializer_withoutThis() { | 1468 void test_visitConstructorFieldInitializer_withoutThis() { |
| 1469 assertSource("a = b", ASTFactory.constructorFieldInitializer(false, "a", AST
Factory.identifier3("b"))); | 1469 assertSource("a = b", ASTFactory.constructorFieldInitializer(false, "a", AST
Factory.identifier3("b"))); |
| 1470 } | 1470 } |
| 1471 void test_visitConstructorFieldInitializer_withThis() { | 1471 void test_visitConstructorFieldInitializer_withThis() { |
| 1472 assertSource("this.a = b", ASTFactory.constructorFieldInitializer(true, "a",
ASTFactory.identifier3("b"))); | 1472 assertSource("this.a = b", ASTFactory.constructorFieldInitializer(true, "a",
ASTFactory.identifier3("b"))); |
| 1473 } | 1473 } |
| 1474 void test_visitConstructorName_named_prefix() { | 1474 void test_visitConstructorName_named_prefix() { |
| 1475 assertSource("p.C.n", ASTFactory.constructorName(ASTFactory.typeName4("p.C.n
", []), null)); | 1475 assertSource("p.C.n", ASTFactory.constructorName(ASTFactory.typeName4("p.C.n
", []), null)); |
| 1476 } | 1476 } |
| (...skipping 27 matching lines...) Expand all Loading... |
| 1504 void test_visitDoubleLiteral() { | 1504 void test_visitDoubleLiteral() { |
| 1505 assertSource("4.2", ASTFactory.doubleLiteral(4.2)); | 1505 assertSource("4.2", ASTFactory.doubleLiteral(4.2)); |
| 1506 } | 1506 } |
| 1507 void test_visitEmptyFunctionBody() { | 1507 void test_visitEmptyFunctionBody() { |
| 1508 assertSource(";", ASTFactory.emptyFunctionBody()); | 1508 assertSource(";", ASTFactory.emptyFunctionBody()); |
| 1509 } | 1509 } |
| 1510 void test_visitEmptyStatement() { | 1510 void test_visitEmptyStatement() { |
| 1511 assertSource(";", ASTFactory.emptyStatement()); | 1511 assertSource(";", ASTFactory.emptyStatement()); |
| 1512 } | 1512 } |
| 1513 void test_visitExportDirective_combinator() { | 1513 void test_visitExportDirective_combinator() { |
| 1514 assertSource("export 'a.dart' show A;", ASTFactory.exportDirective2("a.dart"
, [(ASTFactory.showCombinator([ASTFactory.identifier3("A")]) as Combinator)])); | 1514 assertSource("export 'a.dart' show A;", ASTFactory.exportDirective2("a.dart"
, [ASTFactory.showCombinator([ASTFactory.identifier3("A")]) as Combinator])); |
| 1515 } | 1515 } |
| 1516 void test_visitExportDirective_combinators() { | 1516 void test_visitExportDirective_combinators() { |
| 1517 assertSource("export 'a.dart' show A hide B;", ASTFactory.exportDirective2("
a.dart", [ | 1517 assertSource("export 'a.dart' show A hide B;", ASTFactory.exportDirective2("
a.dart", [ |
| 1518 ASTFactory.showCombinator([ASTFactory.identifier3("A")]), | 1518 ASTFactory.showCombinator([ASTFactory.identifier3("A")]), |
| 1519 ASTFactory.hideCombinator([ASTFactory.identifier3("B")])])); | 1519 ASTFactory.hideCombinator([ASTFactory.identifier3("B")])])); |
| 1520 } | 1520 } |
| 1521 void test_visitExportDirective_minimal() { | 1521 void test_visitExportDirective_minimal() { |
| 1522 assertSource("export 'a.dart';", ASTFactory.exportDirective2("a.dart", [])); | 1522 assertSource("export 'a.dart';", ASTFactory.exportDirective2("a.dart", [])); |
| 1523 } | 1523 } |
| 1524 void test_visitExpressionFunctionBody() { | 1524 void test_visitExpressionFunctionBody() { |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1623 assertSource("(a, b, [c = 3, d = 4])", ASTFactory.formalParameterList([ | 1623 assertSource("(a, b, [c = 3, d = 4])", ASTFactory.formalParameterList([ |
| 1624 ASTFactory.simpleFormalParameter3("a"), | 1624 ASTFactory.simpleFormalParameter3("a"), |
| 1625 ASTFactory.simpleFormalParameter3("b"), | 1625 ASTFactory.simpleFormalParameter3("b"), |
| 1626 ASTFactory.positionalFormalParameter(ASTFactory.simpleFormalParameter3("
c"), ASTFactory.integer(3)), | 1626 ASTFactory.positionalFormalParameter(ASTFactory.simpleFormalParameter3("
c"), ASTFactory.integer(3)), |
| 1627 ASTFactory.positionalFormalParameter(ASTFactory.simpleFormalParameter3("
d"), ASTFactory.integer(4))])); | 1627 ASTFactory.positionalFormalParameter(ASTFactory.simpleFormalParameter3("
d"), ASTFactory.integer(4))])); |
| 1628 } | 1628 } |
| 1629 void test_visitForStatement_c() { | 1629 void test_visitForStatement_c() { |
| 1630 assertSource("for (; c;) {}", ASTFactory.forStatement(null as Expression, AS
TFactory.identifier3("c"), null, ASTFactory.block([]))); | 1630 assertSource("for (; c;) {}", ASTFactory.forStatement(null as Expression, AS
TFactory.identifier3("c"), null, ASTFactory.block([]))); |
| 1631 } | 1631 } |
| 1632 void test_visitForStatement_cu() { | 1632 void test_visitForStatement_cu() { |
| 1633 assertSource("for (; c; u) {}", ASTFactory.forStatement(null as Expression,
ASTFactory.identifier3("c"), ASTFactory.list([(ASTFactory.identifier3("u") as Ex
pression)]), ASTFactory.block([]))); | 1633 assertSource("for (; c; u) {}", ASTFactory.forStatement(null as Expression,
ASTFactory.identifier3("c"), ASTFactory.list([ASTFactory.identifier3("u") as Exp
ression]), ASTFactory.block([]))); |
| 1634 } | 1634 } |
| 1635 void test_visitForStatement_e() { | 1635 void test_visitForStatement_e() { |
| 1636 assertSource("for (e;;) {}", ASTFactory.forStatement(ASTFactory.identifier3(
"e"), null, null, ASTFactory.block([]))); | 1636 assertSource("for (e;;) {}", ASTFactory.forStatement(ASTFactory.identifier3(
"e"), null, null, ASTFactory.block([]))); |
| 1637 } | 1637 } |
| 1638 void test_visitForStatement_ec() { | 1638 void test_visitForStatement_ec() { |
| 1639 assertSource("for (e; c;) {}", ASTFactory.forStatement(ASTFactory.identifier
3("e"), ASTFactory.identifier3("c"), null, ASTFactory.block([]))); | 1639 assertSource("for (e; c;) {}", ASTFactory.forStatement(ASTFactory.identifier
3("e"), ASTFactory.identifier3("c"), null, ASTFactory.block([]))); |
| 1640 } | 1640 } |
| 1641 void test_visitForStatement_ecu() { | 1641 void test_visitForStatement_ecu() { |
| 1642 assertSource("for (e; c; u) {}", ASTFactory.forStatement(ASTFactory.identifi
er3("e"), ASTFactory.identifier3("c"), ASTFactory.list([(ASTFactory.identifier3(
"u") as Expression)]), ASTFactory.block([]))); | 1642 assertSource("for (e; c; u) {}", ASTFactory.forStatement(ASTFactory.identifi
er3("e"), ASTFactory.identifier3("c"), ASTFactory.list([ASTFactory.identifier3("
u") as Expression]), ASTFactory.block([]))); |
| 1643 } | 1643 } |
| 1644 void test_visitForStatement_eu() { | 1644 void test_visitForStatement_eu() { |
| 1645 assertSource("for (e;; u) {}", ASTFactory.forStatement(ASTFactory.identifier
3("e"), null, ASTFactory.list([(ASTFactory.identifier3("u") as Expression)]), AS
TFactory.block([]))); | 1645 assertSource("for (e;; u) {}", ASTFactory.forStatement(ASTFactory.identifier
3("e"), null, ASTFactory.list([ASTFactory.identifier3("u") as Expression]), ASTF
actory.block([]))); |
| 1646 } | 1646 } |
| 1647 void test_visitForStatement_i() { | 1647 void test_visitForStatement_i() { |
| 1648 assertSource("for (var i;;) {}", ASTFactory.forStatement2(ASTFactory.variabl
eDeclarationList2(Keyword.VAR, [ASTFactory.variableDeclaration("i")]), null, nul
l, ASTFactory.block([]))); | 1648 assertSource("for (var i;;) {}", ASTFactory.forStatement2(ASTFactory.variabl
eDeclarationList2(Keyword.VAR, [ASTFactory.variableDeclaration("i")]), null, nul
l, ASTFactory.block([]))); |
| 1649 } | 1649 } |
| 1650 void test_visitForStatement_ic() { | 1650 void test_visitForStatement_ic() { |
| 1651 assertSource("for (var i; c;) {}", ASTFactory.forStatement2(ASTFactory.varia
bleDeclarationList2(Keyword.VAR, [ASTFactory.variableDeclaration("i")]), ASTFact
ory.identifier3("c"), null, ASTFactory.block([]))); | 1651 assertSource("for (var i; c;) {}", ASTFactory.forStatement2(ASTFactory.varia
bleDeclarationList2(Keyword.VAR, [ASTFactory.variableDeclaration("i")]), ASTFact
ory.identifier3("c"), null, ASTFactory.block([]))); |
| 1652 } | 1652 } |
| 1653 void test_visitForStatement_icu() { | 1653 void test_visitForStatement_icu() { |
| 1654 assertSource("for (var i; c; u) {}", ASTFactory.forStatement2(ASTFactory.var
iableDeclarationList2(Keyword.VAR, [ASTFactory.variableDeclaration("i")]), ASTFa
ctory.identifier3("c"), ASTFactory.list([(ASTFactory.identifier3("u") as Express
ion)]), ASTFactory.block([]))); | 1654 assertSource("for (var i; c; u) {}", ASTFactory.forStatement2(ASTFactory.var
iableDeclarationList2(Keyword.VAR, [ASTFactory.variableDeclaration("i")]), ASTFa
ctory.identifier3("c"), ASTFactory.list([ASTFactory.identifier3("u") as Expressi
on]), ASTFactory.block([]))); |
| 1655 } | 1655 } |
| 1656 void test_visitForStatement_iu() { | 1656 void test_visitForStatement_iu() { |
| 1657 assertSource("for (var i;; u) {}", ASTFactory.forStatement2(ASTFactory.varia
bleDeclarationList2(Keyword.VAR, [ASTFactory.variableDeclaration("i")]), null, A
STFactory.list([(ASTFactory.identifier3("u") as Expression)]), ASTFactory.block(
[]))); | 1657 assertSource("for (var i;; u) {}", ASTFactory.forStatement2(ASTFactory.varia
bleDeclarationList2(Keyword.VAR, [ASTFactory.variableDeclaration("i")]), null, A
STFactory.list([ASTFactory.identifier3("u") as Expression]), ASTFactory.block([]
))); |
| 1658 } | 1658 } |
| 1659 void test_visitForStatement_u() { | 1659 void test_visitForStatement_u() { |
| 1660 assertSource("for (;; u) {}", ASTFactory.forStatement(null as Expression, nu
ll, ASTFactory.list([(ASTFactory.identifier3("u") as Expression)]), ASTFactory.b
lock([]))); | 1660 assertSource("for (;; u) {}", ASTFactory.forStatement(null as Expression, nu
ll, ASTFactory.list([ASTFactory.identifier3("u") as Expression]), ASTFactory.blo
ck([]))); |
| 1661 } | 1661 } |
| 1662 void test_visitFunctionDeclaration_getter() { | 1662 void test_visitFunctionDeclaration_getter() { |
| 1663 assertSource("get f() {}", ASTFactory.functionDeclaration(null, Keyword.GET,
"f", ASTFactory.functionExpression())); | 1663 assertSource("get f() {}", ASTFactory.functionDeclaration(null, Keyword.GET,
"f", ASTFactory.functionExpression())); |
| 1664 } | 1664 } |
| 1665 void test_visitFunctionDeclaration_normal() { | 1665 void test_visitFunctionDeclaration_normal() { |
| 1666 assertSource("f() {}", ASTFactory.functionDeclaration(null, null, "f", ASTFa
ctory.functionExpression())); | 1666 assertSource("f() {}", ASTFactory.functionDeclaration(null, null, "f", ASTFa
ctory.functionExpression())); |
| 1667 } | 1667 } |
| 1668 void test_visitFunctionDeclaration_setter() { | 1668 void test_visitFunctionDeclaration_setter() { |
| 1669 assertSource("set f() {}", ASTFactory.functionDeclaration(null, Keyword.SET,
"f", ASTFactory.functionExpression())); | 1669 assertSource("set f() {}", ASTFactory.functionDeclaration(null, Keyword.SET,
"f", ASTFactory.functionExpression())); |
| 1670 } | 1670 } |
| (...skipping 1426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3097 } | 3097 } |
| 3098 main() { | 3098 main() { |
| 3099 ConstantEvaluatorTest.dartSuite(); | 3099 ConstantEvaluatorTest.dartSuite(); |
| 3100 NodeLocatorTest.dartSuite(); | 3100 NodeLocatorTest.dartSuite(); |
| 3101 ToSourceVisitorTest.dartSuite(); | 3101 ToSourceVisitorTest.dartSuite(); |
| 3102 BreadthFirstVisitorTest.dartSuite(); | 3102 BreadthFirstVisitorTest.dartSuite(); |
| 3103 IndexExpressionTest.dartSuite(); | 3103 IndexExpressionTest.dartSuite(); |
| 3104 SimpleIdentifierTest.dartSuite(); | 3104 SimpleIdentifierTest.dartSuite(); |
| 3105 VariableDeclarationTest.dartSuite(); | 3105 VariableDeclarationTest.dartSuite(); |
| 3106 } | 3106 } |
| OLD | NEW |