/[ascend]/trunk/base/generic/compiler/typelint.c
ViewVC logotype

Diff of /trunk/base/generic/compiler/typelint.c

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

revision 614 by ben.allan, Mon Apr 17 03:18:06 2006 UTC revision 615 by johnpye, Wed May 17 06:29:40 2006 UTC
# Line 506  enum typelinterr TypeLintIllegalBodyStat Line 506  enum typelinterr TypeLintIllegalBodyStat
506        break;        break;
507      case EXT:      case EXT:
508        if (ExternalStatMode(s) == ek_method) {        if (ExternalStatMode(s) == ek_method) {
509          Asc_StatErrMsg_NotAllowedDeclarative(fp,s);          Asc_StatErrMsg_NotAllowedDeclarative(fp,s,"");
510          rval = DEF_STAT_MISLOCATED;          rval = DEF_STAT_MISLOCATED;
511        }        }
512        break;        break;
# Line 848  TypeLintIllegalMethodStatList(FILE *fp, Line 848  TypeLintIllegalMethodStatList(FILE *fp,
848      case COND:      case COND:
849      case WILLBE:      case WILLBE:
850      case FNAME:      case FNAME:
851        Asc_StatErrMsg_NotAllowedMethod(fp,s);        Asc_StatErrMsg_NotAllowedMethod(fp,s,"");
852        rval = DEF_STAT_MISLOCATED;        rval = DEF_STAT_MISLOCATED;
853        break;        break;
854      case REL:      case REL:
855      case LOGREL:      case LOGREL:
856        Asc_StatErrMsg_NotAllowedMethod(fp,s);        Asc_StatErrMsg_NotAllowedMethod(fp,s,"Perhaps '=' or '==' should be ':='?");
857        rval = DEF_STAT_MISLOCATED;        rval = DEF_STAT_MISLOCATED;
       FPRINTF(stderr,"  Perhaps = or == should be := ?\n");  
858        break;        break;
859      case WHEN:      case WHEN:
860        Asc_StatErrMsg_NotAllowedMethod(fp,s);        Asc_StatErrMsg_NotAllowedMethod(fp,s,"Perhaps WHEN should be SWITCH?");
861        rval = DEF_STAT_MISLOCATED;        rval = DEF_STAT_MISLOCATED;
       FPRINTF(stderr,"  Perhaps WHEN should be SWITCH?\n");  
862        break;        break;
863      case SELECT:      case SELECT:
864        Asc_StatErrMsg_NotAllowedMethod(fp,s);        Asc_StatErrMsg_NotAllowedMethod(fp,s,"Perhaps SELECT should be SWITCH?");
865        rval = DEF_STAT_MISLOCATED;        rval = DEF_STAT_MISLOCATED;
       FPRINTF(stderr,"  Perhaps SELECT should be SWITCH?\n");  
866        break;        break;
867      case FOR:      case FOR:
868        if (ForLoopKind(s) != fk_do) {        if (ForLoopKind(s) != fk_do) {
# Line 881  TypeLintIllegalMethodStatList(FILE *fp, Line 878  TypeLintIllegalMethodStatList(FILE *fp,
878        break;        break;
879      case EXT:      case EXT:
880        if (ExternalStatMode(s) != ek_method) {        if (ExternalStatMode(s) != ek_method) {
881          Asc_StatErrMsg_NotAllowedMethod(fp,s);          Asc_StatErrMsg_NotAllowedMethod(fp,s,"");
882          rval = DEF_STAT_MISLOCATED;          rval = DEF_STAT_MISLOCATED;
883        }        }
884        break;        break;

Legend:
Removed from v.614  
changed lines
  Added in v.615

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22