Browse Source

Simplification code

Arthur Brandao 6 năm trước cách đây
mục cha
commit
56f9df9fe0
1 tập tin đã thay đổi với 2 bổ sung5 xóa
  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());