Skip to content

Commit

Permalink
Cleaned up a couple of errors in the SExpression whitespace handling.
Browse files Browse the repository at this point in the history
  • Loading branch information
notahat committed May 7, 2009
1 parent 62af159 commit 7844a21
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions AikoSExpression.cpp
Expand Up @@ -5,7 +5,7 @@ namespace Aiko {

char* SExpression::scan(char* head, char* tail, SExpression* expression) {
char* s = skipWhitespace(head, tail);
switch(*head) {
switch(*s) {
case '(':
s = scanArray(s, tail, expression);
break;
Expand Down Expand Up @@ -61,12 +61,7 @@ namespace Aiko {

char* SExpressionArray::parse(char* head, char* tail, SExpressionArray* array) {
char* s = skipWhitespace(head, tail);

if (array) {
array->head_ = s;
array->tail_ = tail;
}

if (array) array->head_ = s;
if (s < tail && *s == '(') {
s++;

Expand All @@ -78,6 +73,7 @@ namespace Aiko {
}

if (s < tail && *s == ')') {
if (array) array->tail_ = s;
s = skipWhitespace(++s, tail);
return s;
}
Expand Down

0 comments on commit 7844a21

Please sign in to comment.