remove ENTITY_INVALID
authorMatthias Braun <matze@braunis.de>
Sat, 13 Aug 2011 11:55:29 +0000 (13:55 +0200)
committerMatthias Braun <matze@braunis.de>
Sat, 13 Aug 2011 11:55:29 +0000 (13:55 +0200)
ast.c
entity.c
entity_t.h
walk.c

diff --git a/ast.c b/ast.c
index d421dcf..6224cad 100644 (file)
--- a/ast.c
+++ b/ast.c
@@ -1501,8 +1501,6 @@ print_compound:
        case ENTITY_LABEL:
        case ENTITY_ENUM_VALUE:
                panic("print_entity used on unexpected entity type");
-       case ENTITY_INVALID:
-               break;
        }
        panic("Invalid entity type encountered");
 }
index d828c8a..23fab8b 100644 (file)
--- a/entity.c
+++ b/entity.c
@@ -43,7 +43,6 @@ const char *get_entity_kind_name(entity_kind_t kind)
        case ENTITY_LOCAL_LABEL:     return "local label";
        case ENTITY_TYPEDEF:         return "typedef";
        case ENTITY_NAMESPACE:       return "namespace";
-       case ENTITY_INVALID:         break;
        }
 
        panic("Invalid entity kind encountered in get_entity_kind_name");
index 673a0e2..fe0ad0b 100644 (file)
@@ -28,8 +28,7 @@
 #include "builtins.h"
 
 typedef enum {
-       ENTITY_INVALID,
-       ENTITY_VARIABLE,
+       ENTITY_VARIABLE = 1,
        ENTITY_COMPOUND_MEMBER,
        ENTITY_PARAMETER,
        ENTITY_FUNCTION,
diff --git a/walk.c b/walk.c
index f7876e0..7183d38 100644 (file)
--- a/walk.c
+++ b/walk.c
@@ -268,8 +268,6 @@ static void walk_entity(entity_t *entity, const walk_env_t *const env)
        case ENTITY_LABEL:
        case ENTITY_LOCAL_LABEL:
                return;
-       case ENTITY_INVALID:
-               break;
        }
        panic("invalid entity found");
 }