size_t cdecl_explain(char *buf, size_t n, struct cdecl *decl);
size_t cdecl_declare(char *buf, size_t n, struct cdecl *decl);
-static inline int cdecl_spec_kind(struct cdecl_declspec *spec)
+static inline int cdecl_spec_kind(const struct cdecl_declspec *spec)
{
return spec->type & ~(CDECL_SPEC_TYPE-1u);
}
+static inline _Bool cdecl_is_abstract(const struct cdecl_declarator *d)
+{
+ while (d->child)
+ d = d->child;
+
+ return d->type != CDECL_DECL_IDENT;
+}
+
/* Error handling. */
enum {
CDECL_ENOMEM,