summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorahaase2008-01-23 18:26:32 (EST)
committer ahaase2008-01-23 18:26:32 (EST)
commitbc3bdfd4135d39195d2f5f6bf3e3d7101bce9624 (patch)
tree080dcc2904246db702e869b10dec8c2947f71500
parent4b45af6f134085e05ce4d06b88d8d6ca18cfb05a (diff)
downloadorg.eclipse.xpand-bc3bdfd4135d39195d2f5f6bf3e3d7101bce9624.zip
org.eclipse.xpand-bc3bdfd4135d39195d2f5f6bf3e3d7101bce9624.tar.gz
org.eclipse.xpand-bc3bdfd4135d39195d2f5f6bf3e3d7101bce9624.tar.bz2
added syslib functions for missing operators
-rw-r--r--plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/OldExpressionConverter.java19
1 files changed, 16 insertions, 3 deletions
diff --git a/plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/OldExpressionConverter.java b/plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/OldExpressionConverter.java
index d795042..a16f074 100644
--- a/plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/OldExpressionConverter.java
+++ b/plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/OldExpressionConverter.java
@@ -166,9 +166,6 @@ final class OldExpressionConverter {
* transform built-in operator names from the old to the new special names
*/
private String transformFunctionName (String functionName) {
- //TODO missing operators: !, ...
- //TODO make "!" a built-in operation?
-
if ("+".equals (functionName))
return SysLibNames.OPERATOR_PLUS;
if ("-".equals (functionName))
@@ -180,6 +177,22 @@ final class OldExpressionConverter {
if ("%".equals (functionName))
return SysLibNames.OPERATOR_MOD;
+ if ("==".equals (functionName))
+ return SysLibNames.OPERATOR_EQUALS;
+ if ("!=".equals (functionName))
+ return SysLibNames.OPERATOR_NOT_EQUALS;
+ if ("<".equals (functionName))
+ return SysLibNames.OPERATOR_LESS;
+ if ("<=".equals (functionName))
+ return SysLibNames.OPERATOR_LESS_OR_EQUALS;
+ if (">=".equals (functionName))
+ return SysLibNames.OPERATOR_GREATER_OR_EQUALS;
+ if (">".equals (functionName))
+ return SysLibNames.OPERATOR_GREATER;
+
+ if ("!".equals (functionName))
+ return SysLibNames.OPERATOR_NOT;
+
return functionName;
}