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

Side by Side Diff: lib/src/compiler/ast_builder.dart

Issue 2132763002: Fix null aware generic invocation. (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Fix null aware generic invoke Created 4 years, 5 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 | « lib/runtime/dart_sdk.js ('k') | lib/src/compiler/code_generator.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) 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
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
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 }
OLDNEW
« no previous file with comments | « lib/runtime/dart_sdk.js ('k') | lib/src/compiler/code_generator.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698