Expression: Rename getList() to getFlatList().

Because it flattens deeply nested sequences.
M src/main/java/nl/grauw/glass/expressions/Expression.java +4 -4
@@ 89,17 89,17 @@ public abstract class Expression {
 		return null;
 	}
 
-	public List<Expression> getList() {
+	public List<Expression> getFlatList() {
 		List<Expression> list = new ArrayList<>();
-		addToList(list);
+		addToFlatList(list);
 		return list;
 	}
 
-	private void addToList(List<Expression> list) {
+	private void addToFlatList(List<Expression> list) {
 		Expression tail = this;
 		while (tail.is(Type.SEQUENCE)) {
 			Expression sequence = tail.get(Type.SEQUENCE);
-			sequence.getHead().addToList(list);
+			sequence.getHead().addToFlatList(list);
 			tail = sequence.getTail();
 		}
 		list.add(tail);

          
M src/main/java/nl/grauw/glass/instructions/Db.java +1 -1
@@ 10,7 10,7 @@ public class Db extends InstructionFacto
 	@Override
 	public InstructionObject createObject(Scope context, Expression arguments) {
 		if (arguments != null)
-			return new Db_N(context, arguments.getList());
+			return new Db_N(context, arguments.getFlatList());
 		throw new ArgumentException();
 	}
 

          
M src/main/java/nl/grauw/glass/instructions/Dd.java +1 -1
@@ 10,7 10,7 @@ public class Dd extends InstructionFacto
 	@Override
 	public InstructionObject createObject(Scope context, Expression arguments) {
 		if (arguments != null)
-			return new Dd_N(context, arguments.getList());
+			return new Dd_N(context, arguments.getFlatList());
 		throw new ArgumentException();
 	}
 

          
M src/main/java/nl/grauw/glass/instructions/Dw.java +1 -1
@@ 10,7 10,7 @@ public class Dw extends InstructionFacto
 	@Override
 	public InstructionObject createObject(Scope context, Expression arguments) {
 		if (arguments != null)
-			return new Dw_N(context, arguments.getList());
+			return new Dw_N(context, arguments.getFlatList());
 		throw new ArgumentException();
 	}
 

          
M src/test/java/nl/grauw/glass/expressions/ExpressionTest.java +4 -4
@@ 200,8 200,8 @@ public class ExpressionTest extends Test
 	}
 
 	@Test
-	public void testSequenceList() {
-		List<Expression> list = parse("4, 5, 6").getList();
+	public void testSequenceFlatList() {
+		List<Expression> list = parse("4, 5, 6").getFlatList();
 		assertEquals(3, list.size());
 		assertEquals(4, list.get(0).getInteger());
 		assertEquals(5, list.get(1).getInteger());

          
@@ 209,8 209,8 @@ public class ExpressionTest extends Test
 	}
 
 	@Test
-	public void testSequenceListDeep() {
-		List<Expression> list = parse("4, (5, 6), (7, 8)").getList();
+	public void testSequenceFlatListDeep() {
+		List<Expression> list = parse("4, (5, 6), (7, 8)").getFlatList();
 		assertEquals(5, list.size());
 		assertEquals(4, list.get(0).getInteger());
 		assertEquals(5, list.get(1).getInteger());