Forráskód Böngészése

Amelioration parseList

Arthur Brandao 6 éve
szülő
commit
fdc88a3689
1 módosított fájl, 2 hozzáadás és 1 törlés
  1. 2 1
      src/migl/lisp/LispImpl.java

+ 2 - 1
src/migl/lisp/LispImpl.java

@@ -58,7 +58,7 @@ public class LispImpl implements Lisp {
 						result.add(str.substring(1));
 					}
 				} else if(str.charAt(str.length() - 1) == ')'){
-					result.add(str.substring(0, str.length() - 2));
+					result.add(str.substring(0, str.length() - 1));
 					result.add("" + str.charAt(str.length() - 1));
 				} else {
 					result.add(str);
@@ -100,6 +100,7 @@ public class LispImpl implements Lisp {
 		String val = pile.remove(0);
 		while(pile.size() > 0 && !val.equals(")")) {
 			if(val.equals("(")) {
+				//list = list.append(this.parse("(" + val));
 				list = list.append(this.parseList(pile));
 			} else {
 				list = list.append(this.parseElement(val));