#define describe_lookup0(A, b) \
static inline ANN A nspc_lookup_##b##0(const Nspc n, const Symbol s){ \
- return (A)scope_lookup0(n->info->b, (vtype)s); \
+ return (A)scope_lookup0(n->info->b, (vtype)s); \
}
#define describe_lookup1(A, b) \
static inline ANN A nspc_lookup_##b##1(const Nspc n, const Symbol s) { \
- const A a = (A)scope_lookup1(n->info->b, (vtype)s); \
+ const A a = (A)scope_lookup1(n->info->b, (vtype)s); \
if(!a && n->parent) \
return nspc_lookup_##b##1(n->parent, s); \
return a; \
}
+#define describe_lookup2(A, b) \
+static inline ANN A nspc_lookup_##b##2(const Nspc n, const Symbol s) { \
+ return (A)scope_lookup1(n->info->b, (vtype)s); \
+}
+
#define describe_lookups(A, b) \
describe_lookup0(A, b) \
describe_lookup1(A, b) \
+describe_lookup2(A, b)
#define describe_nspc_func(A, b) \
static inline ANN void nspc_add_##b(const Nspc n, const Symbol s, const A a) { \
#define describe_find(name, t) \
ANN t find_##name(const Type type, const Symbol xid) { \
if(type->nspc) { \
- const t val = nspc_lookup_##name##0(type->nspc, xid); \
+ const t val = nspc_lookup_##name##2(type->nspc, xid); \
if(val) \
return val; \
} \