+
+ free(target);
+ ++cpp->expanded;
+ return true;
+}
+
+static bool psi_cpp_tokiter_expand_def(struct psi_cpp *cpp,
+ struct psi_token *target, struct psi_cpp_macro_decl *macro)
+{
+ size_t index = psi_cpp_tokiter_index(cpp);
+
+ /* delete current token from stream */
+ psi_cpp_tokiter_del_cur(cpp, false);
+
+ if (index != psi_cpp_tokiter_index(cpp)) {
+ /* might have been last token */
+ psi_cpp_tokiter_next(cpp);
+ }
+ /* replace with tokens from macro */
+ psi_cpp_tokiter_expand_tokens(cpp, target, macro->tokens);
+
+ free(target);