+ /* XXX Should this handle balanced inner parentheses? */
+ while (!lex_match (lexer, T_RPAREN))
+ {
+ if (lex_token (lexer) == T_ENDCMD)
+ {
+ lex_error_expecting (lexer, ")");
+ goto error;
+ }
+ char *syntax = lex_next_representation (lexer, 0, 0);
+ const struct macro_token mt = {
+ .token = *lex_next (lexer, 0),
+ .syntax = ss_cstr (syntax),
+ };
+ macro_tokens_add (&p->def, &mt);
+ free (syntax);
+
+ lex_get (lexer);
+ }
+ }
+ else if (match_macro_id (lexer, "!NOEXPAND"))
+ p->expand_arg = false;
+ else if (match_macro_id (lexer, "!TOKENS"))
+ {
+ if (!dup_arg_type (lexer, &saw_arg_type)
+ || !lex_force_match (lexer, T_LPAREN)
+ || !lex_force_int_range (lexer, "!TOKENS", 1, INT_MAX))
+ goto error;
+ p->arg_type = ARG_N_TOKENS;
+ p->n_tokens = lex_integer (lexer);