source: project/release/4/colorize/trunk/tests/quickrep.scheme.in @ 27131

Last change on this file since 27131 was 27131, checked in by sjamaan, 9 years ago

colorize: Improve support for Scheme keyword syntax

File size: 606 bytes
Line 
1
2(use irregex) ; irregex, the regular expression library, is one of the
3              ; libraries included with CHICKEN.
4
5(define (process-line line re rplc)
6  (irregex-replace/all re line rplc))
7
8(define (quickrep re #!key rplc)
9  (let ((line (read-line)))
10    (if (not (eof-object? line))
11        (begin
12          (display (process-line line re rplc))
13          (newline)
14          (quickrep re rplc)))))
15
16;;; Does a lousy job of error checking!
17(define (main args)
18  (quickrep (irregex (car args)) rplc: (cadr args)))
19(define (alternative-main args)
20  (quickrep (irregex (car args)) #:rplc (cadr args)))
Note: See TracBrowser for help on using the repository browser.