Skip to content

Commit 6d7a62d

Browse files
committed
Merge branch 'ar/userdiff-scheme'
Userdiff patterns for "Scheme" has been added. * ar/userdiff-scheme: userdiff: add support for Scheme
2 parents b0c09ab + a437390 commit 6d7a62d

18 files changed

+101
-0
lines changed

Documentation/gitattributes.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -845,6 +845,8 @@ patterns are available:
845845

846846
- `rust` suitable for source code in the Rust language.
847847

848+
- `scheme` suitable for source code in the Scheme language.
849+
848850
- `tex` suitable for source code for LaTeX documents.
849851

850852

t/t4018-diff-funcname.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ diffpatterns="
4848
python
4949
ruby
5050
rust
51+
scheme
5152
tex
5253
custom1
5354
custom2

t/t4018/scheme-class

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
(define book-class%
2+
(class* () object% RIGHT
3+
(field (pages 5))
4+
(field (ChangeMe 5))
5+
(define/public (letters)
6+
(* pages 500))
7+
(super-new)))

t/t4018/scheme-def

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
(def (some-func x y z) RIGHT
2+
(let ((a x)
3+
(b y))
4+
(ChangeMe a b)))

t/t4018/scheme-def-variant

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
(defmethod {print point} RIGHT
2+
(lambda (self)
3+
(with ((point x y) self)
4+
(printf "{ChangeMe x:~a y:~a}~n" x y))))

t/t4018/scheme-define-slash-public

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
(define bar-class%
2+
(class object%
3+
(field (info 5))
4+
(define/public (foo) RIGHT
5+
(+ info 42)
6+
(* info ChangeMe))
7+
(super-new)))

t/t4018/scheme-define-syntax

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
(define-syntax define-test-suite RIGHT
2+
(syntax-rules ()
3+
((_ suite-name (name test) ChangeMe ...)
4+
(define suite-name
5+
(let ((tests
6+
`((name . ,test) ...)))
7+
(lambda ()
8+
(run-suite 'suite-name tests)))))))

t/t4018/scheme-define-variant

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
(define* (some-func x y z) RIGHT
2+
(let ((a x)
3+
(b y))
4+
(ChangeMe a b)))

t/t4018/scheme-library

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
(library (my-helpers id-stuff) RIGHT
2+
(export find-dup)
3+
(import (ChangeMe))
4+
(define (find-dup l)
5+
(and (pair? l)
6+
(let loop ((rest (cdr l)))
7+
(cond
8+
[(null? rest) (find-dup (cdr l))]
9+
[(bound-identifier=? (car l) (car rest))
10+
(car rest)]
11+
[else (loop (cdr rest))])))))

t/t4018/scheme-local-define

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
(define (higher-order)
2+
(define local-function RIGHT
3+
(lambda (x)
4+
(car "this is" "ChangeMe"))))

0 commit comments

Comments
 (0)