while (psi_plist_get(tokens, i++, &tok)) {
struct psi_token *new_tok;
+ if (tok->type == PSI_T_EOL) {
+ continue;
+ }
if (tok->type == PSI_T_HASH) {
- if (stringify) {
- stringify = false;
- paste = true;
- } else {
- stringify = true;
- }
+ stringify = true;
+ continue;
+ }
+ if (tok->type == PSI_T_CPP_PASTE) {
+ paste = true;
continue;
}
struct psi_token *cpy = psi_token_copy(tok);
if (stringify) {
- cpy = psi_token_append(NULL,
- psi_token_prepend(NULL, cpy, 1, "\""), 1, "\"");
cpy->type = PSI_T_QUOTED_STRING;
}
exp_tokens[n++] = cpy;
fprintf(stderr, "PSI: CPP expand > ");
psi_token_dump(2, tok);
#endif
+
paste = false;
stringify = false;
}