Quellcode durchsuchen

Simplification code

Arthur Brandao vor 6 Jahren
Ursprung
Commit
56f9df9fe0
1 geänderte Dateien mit 2 neuen und 5 gelöschten Zeilen
  1. 2 5
      src/migl/lisp/LispEval.java

+ 2 - 5
src/migl/lisp/LispEval.java

@@ -331,11 +331,8 @@ public class LispEval {
 		String operator = LispElement.generate(lisp.car()).toStr();
 		LispOperator op = this.operators.get(operator);
 		if(op == null) {
-			if(this.define.isLambda(operator)) {
-				return this.operators.get("lambda").apply(this, operator, lisp.cdr());
-			} else {
-				throw new LispError(operator + LispError.ERR_UNKNOW, new UnsupportedOperationException("Unknow operator"));
-			}
+			//On suppose que l'operateur est une expression lambda
+			return this.operators.get("lambda").apply(this, operator, lisp.cdr());
 		}
 		try {
 			return op.apply(this, operator, lisp.cdr());