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 1397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1408 // translate name | 1408 // translate name |
1409 SimpleIdentifier nameNode = identifier(name); | 1409 SimpleIdentifier nameNode = identifier(name); |
1410 putReference(binding, nameNode); | 1410 putReference(binding, nameNode); |
1411 { | 1411 { |
1412 if ("Void".equals(name)) { | 1412 if ("Void".equals(name)) { |
1413 nameNode = identifier("Object"); | 1413 nameNode = identifier("Object"); |
1414 } | 1414 } |
1415 if ("Boolean".equals(name)) { | 1415 if ("Boolean".equals(name)) { |
1416 nameNode = identifier("bool"); | 1416 nameNode = identifier("bool"); |
1417 } | 1417 } |
| 1418 if ("Number".equals(name)) { |
| 1419 nameNode = identifier("num"); |
| 1420 } |
1418 if ("Short".equals(name) || "Integer".equals(name) || "Long".equals(name))
{ | 1421 if ("Short".equals(name) || "Integer".equals(name) || "Long".equals(name))
{ |
1419 nameNode = identifier("int"); | 1422 nameNode = identifier("int"); |
1420 } | 1423 } |
1421 if ("Float".equals(name) || "Double".equals(name)) { | 1424 if ("Float".equals(name) || "Double".equals(name)) { |
1422 nameNode = identifier("double"); | 1425 nameNode = identifier("double"); |
1423 } | 1426 } |
1424 if ("BigInteger".equals(name)) { | 1427 if ("BigInteger".equals(name)) { |
1425 nameNode = identifier("int"); | 1428 nameNode = identifier("int"); |
1426 } | 1429 } |
1427 } | 1430 } |
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1954 org.eclipse.jdt.core.dom.VariableDeclarationFragment javaFragment = (org.e
clipse.jdt.core.dom.VariableDeclarationFragment) I.next(); | 1957 org.eclipse.jdt.core.dom.VariableDeclarationFragment javaFragment = (org.e
clipse.jdt.core.dom.VariableDeclarationFragment) I.next(); |
1955 VariableDeclaration var = translate(javaFragment); | 1958 VariableDeclaration var = translate(javaFragment); |
1956 variableDeclarations.add(var); | 1959 variableDeclarations.add(var); |
1957 } | 1960 } |
1958 return variableDeclarationList( | 1961 return variableDeclarationList( |
1959 isFinal ? Keyword.FINAL : null, | 1962 isFinal ? Keyword.FINAL : null, |
1960 (TypeName) translate(javaType), | 1963 (TypeName) translate(javaType), |
1961 variableDeclarations); | 1964 variableDeclarations); |
1962 } | 1965 } |
1963 } | 1966 } |
OLD | NEW |