tweak: add printout of undecipherable #constant to aid in debugging

git-svn-id: svn://localhost/root/svnrepo/trunk@12 bee25f81-8ba7-4b93-944d-dfac3d1a11cc
This commit is contained in:
colin.smith 2008-06-16 17:52:57 +00:00
parent 6acf5eaf16
commit 30a867f44b
2 changed files with 16 additions and 19 deletions

View File

@ -254,7 +254,7 @@ TOP:
error ("indecipherable #o constant");
}
error ("indecipherable #constant");
error ("indecipherable #constant:", lexeme.str());
}
else if (c == '"')
{

View File

@ -1570,22 +1570,20 @@ static Cell* put_property (Context * ctx, Cell * arglist)
return unspecified;
}
static Cell* get_property (Context * ctx, Cell * arglist)
{
psymbol p = car (arglist)->SymbolValue ();
psymbol q = cadr (arglist)->SymbolValue ();
static Cell* get_property (Context * ctx, Cell * arglist) {
psymbol const p = car (arglist)->SymbolValue ();
psymbol const q = cadr (arglist)->SymbolValue ();
if (p->plist)
for (int ix = 0; ix < p->plist->size (); ++ix)
{
Cell * elt = p->plist->get (ix);
if (car (elt)->SymbolValue () == q)
return cdr (elt);
}
return ctx->make_boolean (false);
if (p->plist)
for (int ix = 0; ix < p->plist->size (); ++ix) {
Cell * elt = p->plist->get (ix);
if (car (elt)->SymbolValue () == q)
return cdr (elt);
}
return ctx->make_boolean (false);
}
// Imported from Common Lisp. Returns #t if the given symbol is
// bound in the global environment (lexical bindings are not consulted),
// #f otherwise.
@ -1868,11 +1866,10 @@ void Context::provision ()
SchemeExtension::RunInstall (this, envt);
}
void Context::bind_subr (const char * name, subr_f subr)
{
psymbol s = intern (name);
set_var (envt, s, make_subr (subr, name));
}
void Context::bind_subr (const char * name, subr_f subr) {
psymbol s = intern (name);
set_var (envt, s, make_subr (subr, name));
}
cellvector* SchemeExtension::extensions = 0;
SchemeExtension* SchemeExtension::main = 0;