diff options
author | David Thompson <dthompson2@worcester.edu> | 2015-10-18 09:41:21 -0400 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2015-10-18 09:41:21 -0400 |
commit | 59c59f758de403dda6a00c4f62d3ddec36243340 (patch) | |
tree | 1f54c9a35b443ef74ba896cedf438bbfe8c49802 /syntax-highlight/parsers.scm | |
parent | fe8496e529b1f04e0a3153cc5219cc13e552a6d8 (diff) |
parsers: Fix parse-delimited.
The 'until' string needs to be reversed before stringification, since
the rest of the character list is in reverse order.
* syntax-highlight/parsers.scm (parse-delimited): Reverse 'until' string
when stringifying.
Diffstat (limited to 'syntax-highlight/parsers.scm')
-rw-r--r-- | syntax-highlight/parsers.scm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/syntax-highlight/parsers.scm b/syntax-highlight/parsers.scm index 2569b04..a1c3a37 100644 --- a/syntax-highlight/parsers.scm +++ b/syntax-highlight/parsers.scm @@ -187,7 +187,8 @@ Within the sequence, ESCAPE is recognized as the escape character." (loop rest (cons* head escape result))))) ((parse-until-maybe stream) => (lambda (remaining) - (stringify (append (string->list until) result) remaining))) + (stringify (append (reverse (string->list until)) result) + remaining))) (else (loop (stream-cdr stream) (cons (stream-car stream) result))))) (parse-fail stream)))))) |