OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012, the Dart project authors. | 2 * Copyright (c) 2012, the Dart project authors. |
3 * | 3 * |
4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u
se this file except | 4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u
se this file except |
5 * in compliance with the License. You may obtain a copy of the License at | 5 * in compliance with the License. You may obtain a copy of the License at |
6 * | 6 * |
7 * http://www.eclipse.org/legal/epl-v10.html | 7 * http://www.eclipse.org/legal/epl-v10.html |
8 * | 8 * |
9 * Unless required by applicable law or agreed to in writing, software distribut
ed under the License | 9 * Unless required by applicable law or agreed to in writing, software distribut
ed under the License |
10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K
IND, either express | 10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K
IND, either express |
(...skipping 877 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
888 return done(methodInvocation("identical", left, right)); | 888 return done(methodInvocation("identical", left, right)); |
889 } | 889 } |
890 } | 890 } |
891 if (javaOperator == org.eclipse.jdt.core.dom.InfixExpression.Operator.NOT_EQ
UALS) { | 891 if (javaOperator == org.eclipse.jdt.core.dom.InfixExpression.Operator.NOT_EQ
UALS) { |
892 tokenType = TokenType.BANG_EQ; | 892 tokenType = TokenType.BANG_EQ; |
893 } | 893 } |
894 Assert.isNotNull(tokenType, "No token for: " + javaOperator); | 894 Assert.isNotNull(tokenType, "No token for: " + javaOperator); |
895 // create BinaryExpression | 895 // create BinaryExpression |
896 BinaryExpression binary = binaryExpression(left, tokenType, right); | 896 BinaryExpression binary = binaryExpression(left, tokenType, right); |
897 for (Object javaOperand : node.extendedOperands()) { | 897 for (Object javaOperand : node.extendedOperands()) { |
| 898 context.putNodeTypeBinding(binary, node.resolveTypeBinding()); |
898 Expression operand = translate((org.eclipse.jdt.core.dom.ASTNode) javaOper
and); | 899 Expression operand = translate((org.eclipse.jdt.core.dom.ASTNode) javaOper
and); |
899 binary = binaryExpression(binary, tokenType, operand); | 900 binary = binaryExpression(binary, tokenType, operand); |
900 } | 901 } |
901 return done(binary); | 902 return done(binary); |
902 } | 903 } |
903 | 904 |
904 @Override | 905 @Override |
905 public boolean visit(org.eclipse.jdt.core.dom.InstanceofExpression node) { | 906 public boolean visit(org.eclipse.jdt.core.dom.InstanceofExpression node) { |
906 return done(isExpression( | 907 return done(isExpression( |
907 translateExpression(node.getLeftOperand()), | 908 translateExpression(node.getLeftOperand()), |
(...skipping 1102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2010 org.eclipse.jdt.core.dom.VariableDeclarationFragment javaFragment = (org.e
clipse.jdt.core.dom.VariableDeclarationFragment) I.next(); | 2011 org.eclipse.jdt.core.dom.VariableDeclarationFragment javaFragment = (org.e
clipse.jdt.core.dom.VariableDeclarationFragment) I.next(); |
2011 VariableDeclaration var = translate(javaFragment); | 2012 VariableDeclaration var = translate(javaFragment); |
2012 variableDeclarations.add(var); | 2013 variableDeclarations.add(var); |
2013 } | 2014 } |
2014 return variableDeclarationList( | 2015 return variableDeclarationList( |
2015 isFinal ? Keyword.FINAL : null, | 2016 isFinal ? Keyword.FINAL : null, |
2016 (TypeName) translate(javaType), | 2017 (TypeName) translate(javaType), |
2017 variableDeclarations); | 2018 variableDeclarations); |
2018 } | 2019 } |
2019 } | 2020 } |
OLD | NEW |