X-Git-Url: http://andersk.mit.edu/gitweb/splint.git/blobdiff_plain/28bf4b0bfd405a2057d865910f8589c54a40f17b..8c56b1d88bedb8a9f88581737bf4cc97ff541291:/src/Headers/mtContextNode.h diff --git a/src/Headers/mtContextNode.h b/src/Headers/mtContextNode.h index b87e6d9..567d2a9 100644 --- a/src/Headers/mtContextNode.h +++ b/src/Headers/mtContextNode.h @@ -12,9 +12,14 @@ typedef enum { - MTC_ANY, MTC_PARAM, MTC_REFERENCE, MTC_CLAUSE + MTC_ANY = 0, MTC_PARAM, MTC_RESULT, MTC_REFERENCE, MTC_CLAUSE, MTC_LITERAL, MTC_NULL } mtContextKind ; +/*@constant int MTC_NUMCONTEXTS@*/ +/*@+enumint@*/ +# define MTC_NUMCONTEXTS (MTC_NULL + 1) +/*@=enumint@*/ + struct s_mtContextNode { mtContextKind context; ctype type; /* This state only applies to types matching. */ @@ -31,13 +36,19 @@ extern cstring mtContextNode_unparse (mtContextNode) /*@*/ ; extern mtContextNode mtContextNode_createAny (void) /*@*/ ; extern mtContextNode mtContextNode_createParameter (ctype) /*@*/ ; extern mtContextNode mtContextNode_createReference (ctype) /*@*/ ; +extern mtContextNode mtContextNode_createResult (ctype) /*@*/ ; extern mtContextNode mtContextNode_createClause (ctype) /*@*/ ; +extern mtContextNode mtContextNode_createNull (ctype) /*@*/ ; +extern mtContextNode mtContextNode_createLiteral (ctype) /*@*/ ; extern void mtContextNode_free (/*@only@*/ mtContextNode) ; -extern bool mtContextNode_isRef (mtContextNode) /*@*/; +extern bool mtContextNode_isReference (mtContextNode) /*@*/; +extern bool mtContextNode_isResult (mtContextNode) /*@*/; extern bool mtContextNode_isParameter (mtContextNode) /*@*/; extern bool mtContextNode_isClause (mtContextNode) /*@*/; +extern bool mtContextNode_isLiteral (mtContextNode) /*@*/; +extern bool mtContextNode_isNull (mtContextNode) /*@*/; extern bool mtContextNode_matchesEntry (mtContextNode, uentry) /*@*/ ; extern bool mtContextNode_matchesRef (mtContextNode, sRef) /*@*/ ; @@ -45,6 +56,8 @@ extern bool mtContextNode_matchesRef (mtContextNode, sRef) /*@*/ ; extern bool mtContextNode_matchesRefStrict (mtContextNode, sRef) /*@*/ ; /* Doesn't allow matches with unknown type. */ +extern void mtContextNode_showRefError (mtContextNode, sRef) ; + # else # error "Multiple include" # endif