Branch: Tag:

2002-05-12

2002-05-12 00:27:46 by Martin Stjernholm <mast@lysator.liu.se>

Fixed print_tree so that it's possible to tell some types of nodes apart.

Rev: src/las.c:1.287

5:   \*/   /**/   #include "global.h" - RCSID("$Id: las.c,v 1.286 2002/05/10 23:52:34 nilsson Exp $"); + RCSID("$Id: las.c,v 1.287 2002/05/12 00:27:46 mast Exp $");      #include "language.h"   #include "interpret.h"
2427:    case F_IDENTIFIER:    if(needlval) fputc('&', stderr);    if (Pike_compiler->new_program) { -  fprintf(stderr, "%s",ID_FROM_INT(Pike_compiler->new_program, foo->u.id.number)->name->str); +  fprintf(stderr, "id(%s)",ID_FROM_INT(Pike_compiler->new_program, foo->u.id.number)->name->str);    } else {    fprintf(stderr, "unknown identifier");    }
2437:    if(needlval) fputc('&', stderr);    {    struct program_state *state = Pike_compiler; -  char *name = "external"; +  char *name = "?";    int program_id = foo->u.integer.a; -  +  int level = 0;    while(state && (state->new_program->id != program_id)) {    state = state->previous; -  +  level++;    }    if (state) {    int id_no = foo->u.integer.b;
2449:    name = id->name->str;    }    } -  fprintf(stderr, "%s", name); +  fprintf(stderr, "ext(%d:%s)", level, name);    }    break;   
2544:    init_buf();    describe_svalue(& foo->u.sval, 0, 0);    s=simple_free_buf(); -  fprintf(stderr, "%s",s); +  fprintf(stderr, "const(%s)",s);    free(s);    break;    }