/[guile]/guile/guile-core/libguile/eval.c
ViewVC logotype

Diff of /guile/guile-core/libguile/eval.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.339 by dirk, Sun Nov 2 11:39:35 2003 UTC revision 1.340 by dirk, Sat Nov 8 08:11:13 2003 UTC
# Line 114  static const char s_expression[] = "Miss Line 114  static const char s_expression[] = "Miss
114   * context, a 'Missing expression' error is signalled.  */   * context, a 'Missing expression' error is signalled.  */
115  static const char s_missing_expression[] = "Missing expression in";  static const char s_missing_expression[] = "Missing expression in";
116    
117    /* A body may hold an arbitrary number of internal defines, followed by a
118     * non-empty sequence of expressions.  If a body with an empty sequence of
119     * expressions is detected, a 'Missing body expression' error is signalled.
120     */
121    static const char s_missing_body_expression[] = "Missing body expression in";
122    
123  /* If a form is detected that holds more expressions than are allowed in that  /* If a form is detected that holds more expressions than are allowed in that
124   * context, an 'Extra expression' error is signalled.  */   * context, an 'Extra expression' error is signalled.  */
125  static const char s_extra_expression[] = "Extra expression in";  static const char s_extra_expression[] = "Extra expression in";
# Line 408  SCM_REC_MUTEX (source_mutex); Line 414  SCM_REC_MUTEX (source_mutex);
414    
415    
416  static const char s_test[] = "bad test";  static const char s_test[] = "bad test";
 static const char s_body[] = "bad body";  
417  static const char s_bindings[] = "bad bindings";  static const char s_bindings[] = "bad bindings";
418  static const char s_duplicate_bindings[] = "duplicate bindings";  static const char s_duplicate_bindings[] = "duplicate bindings";
419  static const char s_variable[] = "bad variable";  static const char s_variable[] = "bad variable";
# Line 1826  SCM Line 1831  SCM
1831  scm_m_expand_body (SCM xorig, SCM env)  scm_m_expand_body (SCM xorig, SCM env)
1832  {  {
1833    SCM x = SCM_CDR (xorig), defs = SCM_EOL;    SCM x = SCM_CDR (xorig), defs = SCM_EOL;
   char *what = SCM_ISYMCHARS (SCM_CAR (xorig)) + 2;  
1834    
1835    while (SCM_NIMP (x))    while (SCM_NIMP (x))
1836      {      {
# Line 1861  scm_m_expand_body (SCM xorig, SCM env) Line 1865  scm_m_expand_body (SCM xorig, SCM env)
1865          }          }
1866      }      }
1867    
1868      /* FIXME: xorig is already partially memoized and does not hold information
1869       * about the file location.  */
1870      ASSERT_SYNTAX (SCM_CONSP (x), s_missing_body_expression, xorig);
1871    
1872    if (!SCM_NULLP (defs))    if (!SCM_NULLP (defs))
1873      {      {
1874        SCM rvars, inits, body, letrec;        SCM rvars, inits, body, letrec;
# Line 1873  scm_m_expand_body (SCM xorig, SCM env) Line 1881  scm_m_expand_body (SCM xorig, SCM env)
1881      }      }
1882    else    else
1883      {      {
       SCM_ASSYNT (SCM_CONSP (x), s_body, what);  
1884        SCM_SETCAR (xorig, SCM_CAR (x));        SCM_SETCAR (xorig, SCM_CAR (x));
1885        SCM_SETCDR (xorig, SCM_CDR (x));        SCM_SETCDR (xorig, SCM_CDR (x));
1886      }      }

Legend:
Removed from v.1.339  
changed lines
  Added in v.1.340

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26