| Index: pkg/compiler/lib/src/scanner/listener.dart
|
| diff --git a/pkg/compiler/lib/src/scanner/listener.dart b/pkg/compiler/lib/src/scanner/listener.dart
|
| index 4add7ec1f9afb688499808a30c550c527b541a5f..d26257edb678b0ad55121f1d3fe46d53ecebdd83 100644
|
| --- a/pkg/compiler/lib/src/scanner/listener.dart
|
| +++ b/pkg/compiler/lib/src/scanner/listener.dart
|
| @@ -1570,7 +1570,7 @@ class NodeListener extends ElementListener {
|
| if (name.asSend() == null) {
|
| name = new Send(thisIdentifier, name);
|
| } else {
|
| - name = name.asSend().copyWithReceiver(thisIdentifier);
|
| + name = name.asSend().copyWithReceiver(thisIdentifier, false);
|
| }
|
| }
|
| TypeAnnotation type = popNode();
|
| @@ -1700,7 +1700,9 @@ class NodeListener extends ElementListener {
|
| Node argument = popNode();
|
| Node receiver = popNode();
|
| String tokenString = token.stringValue;
|
| - if (identical(tokenString, '.') || identical(tokenString, '..')) {
|
| + if (identical(tokenString, '.') ||
|
| + identical(tokenString, '..') ||
|
| + identical(tokenString, '?.')) {
|
| Send argumentSend = argument.asSend();
|
| if (argumentSend == null) {
|
| // TODO(ahe): The parser should diagnose this problem, not
|
| @@ -1710,7 +1712,8 @@ class NodeListener extends ElementListener {
|
| }
|
| if (argumentSend.receiver != null) internalError(node: argument);
|
| if (argument is SendSet) internalError(node: argument);
|
| - pushNode(argument.asSend().copyWithReceiver(receiver));
|
| + pushNode(argument.asSend().copyWithReceiver(receiver,
|
| + identical(tokenString, '?.')));
|
| } else {
|
| NodeList arguments = new NodeList.singleton(argument);
|
| pushNode(new Send(receiver, new Operator(token), arguments));
|
| @@ -1757,7 +1760,8 @@ class NodeListener extends ElementListener {
|
| arguments = new NodeList.singleton(arg);
|
| }
|
| Operator op = new Operator(token);
|
| - pushNode(new SendSet(send.receiver, send.selector, op, arguments));
|
| + pushNode(new SendSet(send.receiver, send.selector, op, arguments,
|
| + send.isConditional));
|
| }
|
|
|
| void reportNotAssignable(Node node) {
|
| @@ -1924,9 +1928,11 @@ class NodeListener extends ElementListener {
|
| Operator op = new Operator(token);
|
|
|
| if (isPrefix) {
|
| - pushNode(new SendSet.prefix(send.receiver, send.selector, op, argument));
|
| + pushNode(new SendSet.prefix(send.receiver, send.selector, op, argument,
|
| + send.isConditional));
|
| } else {
|
| - pushNode(new SendSet.postfix(send.receiver, send.selector, op, argument));
|
| + pushNode(new SendSet.postfix(send.receiver, send.selector, op, argument,
|
| + send.isConditional));
|
| }
|
| }
|
|
|
|
|