Skip to content

Commit

Permalink
Lists now print as a list
Browse files Browse the repository at this point in the history
  • Loading branch information
jimtahu committed May 16, 2013
1 parent 563759a commit c9df973
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ListValue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ void ListValue::add(Value *item){
}

string ListValue::getValue(){
return "%LIST%";
string value="[ ";
value+=items[0]->getValue();
for(std::vector<Value *>::iterator i=items.begin()+1; i!=items.end(); i++)
value+=", "+(*i)->getValue();
value+=" ]";
return value;
}

ListValue::~ListValue() {
Expand Down

0 comments on commit c9df973

Please sign in to comment.