From 10f6fdd9ac5dc7a4fd50a8e4f302bd9a3d14f71a Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Fri, 3 Mar 2017 16:59:01 -0700 Subject: [PATCH] runtime/chrsyn: Pass TABLE through to char->syntax-code. --- src/runtime/chrsyn.scm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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 -- 2.25.1