guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] GNU Guile branch, master, updated. release_1-9-13-33-g28


From: Ludovic Courtès
Subject: [Guile-commits] GNU Guile branch, master, updated. release_1-9-13-33-g289c3a6
Date: Sun, 07 Nov 2010 22:35:28 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

http://git.savannah.gnu.org/cgit/guile.git/commit/?id=289c3a6112171a2c951f92825e8f2dc8c080d642

The branch, master has been updated
       via  289c3a6112171a2c951f92825e8f2dc8c080d642 (commit)
       via  253f26085e514a85105f924b3fc81ca1f3e08b49 (commit)
      from  d41c62f579f9a820874c1316bea36ea7befadcbe (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 289c3a6112171a2c951f92825e8f2dc8c080d642
Author: Ludovic Courtès <address@hidden>
Date:   Sun Nov 7 23:31:53 2010 +0100

    Fix `reader.test'.
    
    This is a followup to a4e472294423bb796db3132c73027384fdfff820 ("need
    read error for extra closing square brackets".)
    
    * test-suite/tests/reader.test (exception:unexpected-rsqbracket): New
      variable.
      ("reading")["paren mismatch (2)"]: Change exception type to
      EXCEPTION:UNEXPECTED-RSQBRACKET.
      ["paren mismatch (3)", "paren mismatch (4)"]: New tests.
      ("mismatching parentheses")["closing square bracket following
      mismatched opening"]: New test.

commit 253f26085e514a85105f924b3fc81ca1f3e08b49
Author: Ludovic Courtès <address@hidden>
Date:   Sat Nov 6 12:12:09 2010 +0100

    pretty-print: Suitably indent macro-related constructs.
    
    * module/ice-9/pretty-print.scm (generic-write)[pp-SYNTAX-CASE]: New
      procedure.
      [style]: Add support for `define-public', `define-syntax',
      `let-syntax', `letrec-syntax', `syntax-rules', and `syntax-case'.

-----------------------------------------------------------------------

Summary of changes:
 module/ice-9/pretty-print.scm |    9 ++++++++-
 test-suite/tests/reader.test  |   17 ++++++++++++++---
 2 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/module/ice-9/pretty-print.scm b/module/ice-9/pretty-print.scm
index 8e67145..8e4cbac 100644
--- a/module/ice-9/pretty-print.scm
+++ b/module/ice-9/pretty-print.scm
@@ -214,6 +214,9 @@
     (define (pp-DO expr col extra)
       (pp-general expr col extra #f pp-expr-list pp-expr-list pp-expr))
 
+    (define (pp-SYNTAX-CASE expr col extra)
+      (pp-general expr col extra #t pp-expr-list #f pp-expr))
+
     ; define formatting style (change these to suit your style)
 
     (define indent-general 2)
@@ -224,7 +227,9 @@
 
     (define (style head)
       (case head
-        ((lambda let* letrec define) pp-LAMBDA)
+        ((lambda let* letrec define define-public
+          define-syntax let-syntax letrec-syntax)
+                                     pp-LAMBDA)
         ((if set!)                   pp-IF)
         ((cond)                      pp-COND)
         ((case)                      pp-CASE)
@@ -232,6 +237,8 @@
         ((let)                       pp-LET)
         ((begin)                     pp-BEGIN)
         ((do)                        pp-DO)
+        ((syntax-rules)              pp-LAMBDA)
+        ((syntax-case)               pp-SYNTAX-CASE)
         (else                        #f)))
 
     (pr obj col 0 pp-expr))
diff --git a/test-suite/tests/reader.test b/test-suite/tests/reader.test
index 0027da7..6f0ed1d 100644
--- a/test-suite/tests/reader.test
+++ b/test-suite/tests/reader.test
@@ -26,6 +26,8 @@
   (cons 'read-error "end of file$"))
 (define exception:unexpected-rparen
   (cons 'read-error "unexpected \")\"$"))
+(define exception:unexpected-rsqbracket
+  (cons 'read-error "unexpected \"]\"$"))
 (define exception:unterminated-block-comment
   (cons 'read-error "unterminated `#. \\.\\.\\. .#' comment$"))
 (define exception:unknown-character-name
@@ -135,12 +137,18 @@
 
   (pass-if "square brackets are parens"
     (equal? '() (read-string "[]")))
-  
+
   (pass-if-exception "paren mismatch" exception:unexpected-rparen
                      (read-string "'[)"))
 
-  (pass-if-exception "paren mismatch (2)" exception:mismatched-paren
-                     (read-string "'(]")))
+  (pass-if-exception "paren mismatch (2)" exception:unexpected-rsqbracket
+                     (read-string "'(]"))
+
+  (pass-if-exception "paren mismatch (3)" exception:mismatched-paren
+                     (read-string "'(foo bar]"))
+
+  (pass-if-exception "paren mismatch (4)" exception:mismatched-paren
+                     (read-string "'[foo bar)")))
 
 
 
@@ -159,6 +167,9 @@
   (pass-if-exception "closing parenthesis following mismatched opening"
     exception:unexpected-rparen
     (read-string ")"))
+  (pass-if-exception "closing square bracket following mismatched opening"
+    exception:unexpected-rsqbracket
+    (read-string "]"))
   (pass-if-exception "opening vector parenthesis"
     exception:eof
     (read-string "#("))


hooks/post-receive
-- 
GNU Guile



reply via email to

[Prev in Thread] Current Thread [Next in Thread]