OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 import 'package:analyzer/dart/ast/ast.dart'; | 5 import 'package:analyzer/dart/ast/ast.dart'; |
6 import 'package:analyzer/dart/ast/token.dart'; | 6 import 'package:analyzer/dart/ast/token.dart'; |
7 import 'package:analyzer/src/dart/ast/token.dart'; | 7 import 'package:analyzer/src/dart/ast/token.dart'; |
8 import 'package:analyzer/src/generated/utilities_dart.dart'; | 8 import 'package:analyzer/src/generated/utilities_dart.dart'; |
9 import 'package:logging/logging.dart' as logger; | 9 import 'package:logging/logging.dart' as logger; |
10 | 10 |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 exp is MethodInvocation) return exp; | 98 exp is MethodInvocation) return exp; |
99 return parenthesizedExpression(exp); | 99 return parenthesizedExpression(exp); |
100 } | 100 } |
101 | 101 |
102 static PropertyAccess propertyAccess( | 102 static PropertyAccess propertyAccess( |
103 Expression target, SimpleIdentifier name) { | 103 Expression target, SimpleIdentifier name) { |
104 var p = new Token(TokenType.PERIOD, 0); | 104 var p = new Token(TokenType.PERIOD, 0); |
105 return new PropertyAccess(target, p, name); | 105 return new PropertyAccess(target, p, name); |
106 } | 106 } |
107 | 107 |
108 static MethodInvocation methodInvoke( | 108 static MethodInvocation methodInvoke(Expression target, SimpleIdentifier name, |
109 Expression target, SimpleIdentifier name, NodeList<Expression> args) { | 109 TypeArgumentList typeArguments, NodeList<Expression> args) { |
110 var p = new Token(TokenType.PERIOD, 0); | 110 var p = new Token(TokenType.PERIOD, 0); |
111 return new MethodInvocation(target, p, name, null, argumentList(args)); | 111 return new MethodInvocation( |
| 112 target, p, name, typeArguments, argumentList(args)); |
112 } | 113 } |
113 | 114 |
114 static TokenType getTokenType(String lexeme) { | 115 static TokenType getTokenType(String lexeme) { |
115 switch (lexeme) { | 116 switch (lexeme) { |
116 case "&": | 117 case "&": |
117 return TokenType.AMPERSAND; | 118 return TokenType.AMPERSAND; |
118 case "&&": | 119 case "&&": |
119 return TokenType.AMPERSAND_AMPERSAND; | 120 return TokenType.AMPERSAND_AMPERSAND; |
120 case "&=": | 121 case "&=": |
121 return TokenType.AMPERSAND_EQ; | 122 return TokenType.AMPERSAND_EQ; |
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
590 Label l = new Label(s, new Token(TokenType.COLON, 0)); | 591 Label l = new Label(s, new Token(TokenType.COLON, 0)); |
591 return new NamedExpression(l, e); | 592 return new NamedExpression(l, e); |
592 } | 593 } |
593 | 594 |
594 static VariableDeclarationStatement variableDeclarationStatement( | 595 static VariableDeclarationStatement variableDeclarationStatement( |
595 VariableDeclarationList varDecl) { | 596 VariableDeclarationList varDecl) { |
596 var semi = new Token(TokenType.SEMICOLON, 0); | 597 var semi = new Token(TokenType.SEMICOLON, 0); |
597 return new VariableDeclarationStatement(varDecl, semi); | 598 return new VariableDeclarationStatement(varDecl, semi); |
598 } | 599 } |
599 } | 600 } |
OLD | NEW |