mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-17 01:00:20 +02:00
* libguile/eval.c (s_mixed_body_forms): New static identifier.
(canonicalize_define, scm_m_define): The check for a bad expression is performed in canonicalize_define now. (try_macro_lookup, expand_user_macros, is_system_macro_p): New static helper functions for m_expand_body. (m_expand_body): Use ASSERT_SYNTAX to signal syntax errors. Only expand user defined macros. Fixed handling of the definition/ expression boundary. Fixed handling of definitions grouped with 'begin. Use canonicalize_define to expand definitions. * test-suite/tests/syntax.test: Tests that check for the correct handling of internal defines with begin work now.
This commit is contained in:
parent
c3d948015a
commit
c86c440b17
4 changed files with 224 additions and 61 deletions
|
@ -619,7 +619,7 @@
|
|||
(eq? 'c (a 2) (a 5))))
|
||||
(interaction-environment)))
|
||||
|
||||
(expect-fail "internal defines with begin"
|
||||
(pass-if "internal defines with begin"
|
||||
(false-if-exception
|
||||
(eval '(let ((a identity) (b identity) (c identity))
|
||||
(define (a x) (if (= x 0) 'a (b (- x 1))))
|
||||
|
@ -631,7 +631,7 @@
|
|||
(eq? 'c (a 2) (a 5))))
|
||||
(interaction-environment))))
|
||||
|
||||
(expect-fail "internal defines with empty begin"
|
||||
(pass-if "internal defines with empty begin"
|
||||
(false-if-exception
|
||||
(eval '(let ((a identity) (b identity) (c identity))
|
||||
(define (a x) (if (= x 0) 'a (b (- x 1))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue