From: Matt Birkholz Date: Fri, 3 Mar 2017 23:59:01 +0000 (-0700) Subject: runtime/chrsyn: Pass TABLE through to char->syntax-code. X-Git-Tag: mit-scheme-pucked-9.2.12~198^2 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=10f6fdd9ac5dc7a4fd50a8e4f302bd9a3d14f71a;p=mit-scheme.git runtime/chrsyn: Pass TABLE through to char->syntax-code. --- diff --git a/src/runtime/chrsyn.scm b/src/runtime/chrsyn.scm index c27370324..d146c3395 100644 --- a/src/runtime/chrsyn.scm +++ b/src/runtime/chrsyn.scm @@ -151,7 +151,7 @@ USA. (define (substring-find-next-char-of-syntax string start end table code) (guarantee 8-bit-string? string 'substring-find-next-char-of-syntax) (let ((index - (string-find-first-index (syntax-code-predicate code) + (string-find-first-index (syntax-code-predicate table code) (string-slice string start end)))) (and index (fix:+ start index)))) @@ -159,16 +159,17 @@ USA. (define (substring-find-next-char-not-of-syntax string start end table code) (guarantee 8-bit-string? string 'substring-find-next-char-not-of-syntax) (let ((index - (string-find-first-index (let ((pred (syntax-code-predicate code))) + (string-find-first-index (let ((pred + (syntax-code-predicate table code))) (lambda (char) (not (pred char)))) (string-slice string start end)))) (and index (fix:+ start index)))) -(define (syntax-code-predicate code) +(define (syntax-code-predicate table code) (lambda (char) - (char=? code (char->syntax-code char)))) + (char=? code (char->syntax-code table char)))) (define (char->syntax-code table char) (string-ref (vector-ref char-syntax-codes