macro: Make ARG_CHAREND and ARG_ENCLOSE more uniform in struct macro_param.
[pspp] / src / language / control / define.c
index 48dda4c7afb0331afa63113d9cc0fc5e36ae7a08..23749eb69eef61dad94e3a4a8d403f0a8b443680 100644 (file)
@@ -219,10 +219,9 @@ cmd_define (struct lexer *lexer, struct dataset *ds UNUSED)
                 goto error;
 
               p->arg_type = ARG_CHAREND;
-              p->charend = (struct token) { .type = T_STOP };
 
               if (!lex_force_match (lexer, T_LPAREN)
-                  || !parse_quoted_token (lexer, &p->charend)
+                  || !parse_quoted_token (lexer, &p->end)
                   || !lex_force_match (lexer, T_RPAREN))
                 goto error;
             }
@@ -232,12 +231,11 @@ cmd_define (struct lexer *lexer, struct dataset *ds UNUSED)
                 goto error;
 
               p->arg_type = ARG_ENCLOSE;
-              p->enclose[0] = p->enclose[1] = (struct token) { .type = T_STOP };
 
               if (!lex_force_match (lexer, T_LPAREN)
-                  || !parse_quoted_token (lexer, &p->enclose[0])
+                  || !parse_quoted_token (lexer, &p->start)
                   || !lex_force_match (lexer, T_COMMA)
-                  || !parse_quoted_token (lexer, &p->enclose[1])
+                  || !parse_quoted_token (lexer, &p->end)
                   || !lex_force_match (lexer, T_RPAREN))
                 goto error;
             }