Mercurial > ~dholland > hg > tradcpp > index.cgi
comparison eval.c @ 63:5e24746d8335
Assert on trailing whitespace.
(it is supposed to have been pruned by the caller)
author | David A. Holland |
---|---|
date | Sun, 31 Mar 2013 02:02:16 -0400 |
parents | 2e25e55dba6b |
children | bd1b7a09da89 |
comparison
equal
deleted
inserted
replaced
62:90c6052410ce | 63:5e24746d8335 |
---|---|
645 pos = 0; | 645 pos = 0; |
646 while (expr[pos] != '\0') { | 646 while (expr[pos] != '\0') { |
647 len = strspn(expr+pos, ws); | 647 len = strspn(expr+pos, ws); |
648 pos += len; | 648 pos += len; |
649 p->column += len; | 649 p->column += len; |
650 /* trailing whitespace is supposed to have been pruned */ | |
651 assert(expr[pos] != '\0'); | |
650 if (check_word(p, expr, pos, &len)) { | 652 if (check_word(p, expr, pos, &len)) { |
651 pos += len; | 653 pos += len; |
652 p->column += len; | 654 p->column += len; |
653 continue; | 655 continue; |
654 } | 656 } |