e->args = args;
e->callback = callback;
e->definition = definition;
- return hash_add(expansions, name, &e,
- ((flags & EXP_TYPE_MASK) == EXP_MACRO)
- ? HASH_INSERT : HASH_INSERT_OR_REPLACE);
+ return hash_add(expansions, name, &e, HASH_INSERT_OR_REPLACE);
}
/** @brief Register a simple expansion rule
const struct mx_node *definition) {
if(mx__register(EXP_MACRO, name, nargs, nargs, args, 0/*callback*/,
definition)) {
+#if 0
/* This locates the error to the definition, which may be a line or two
* beyond the @define command itself. The backtrace generated by
* mx_expand() may help more. */
error(0, "%s:%d: duplicate definition of '%s'",
definition->filename, definition->line, name);
+#endif
return -2;
}
return 0;