- if(input < end && isspace((unsigned char)*input)) {
- /* There is at least some whitespace after the '}'. Look
- * ahead and see what is after all the whitespace. */
- for(p = input; p < end && isspace((unsigned char)*p); ++p)
- ;
- /* Now we are looking after the whitespace. If it's
- * anything other than '{', including the end of the input,
- * then we infer that this expansion finished at the '}' we
- * just saw. (NB that we don't move input forward to p -
- * the whitespace is NOT part of the expansion.) */
- if(p == end || *p != '{')
- omitted_terminator = 1;
- }
- } else {
- /* We are looking at an unbracketed argument. (A common example would
- * be the expansion or macro name.) This is terminated by an '@'
- * (indicating the end of the expansion), a ':' (allowing a subsequent
- * unbracketed argument) or a '{' (allowing a bracketed argument). The
- * end of the input will also do. */
- argument_start = input;
- argument_start_line = line;
- while(input < end
- && *input != '@' && *input != '{' && *input != ':') {
- if(*input == '\n') ++line;
- ++input;
- }
- argument_end = input;
- /* Trailing whitespace is not significant in unquoted arguments (and
- * leading whitespace is eliminated by the whitespace skip above). */
- while(argument_end > argument_start
- && isspace((unsigned char)argument_end[-1]))
- --argument_end;
- /* Step over the ':' if that's what we see */
- if(input < end && *input == ':')
- ++input;
- }
- /* Now we have an argument in [argument_start, argument_end), and we know
- * its filename and initial line number. This is sufficient to parse
- * it. */
- mx_node_vector_append(v, mx_parse(filename, argument_start_line,
- argument_start, argument_end));
- }
- /* We're at the end of an expansion. We might have hit the end of the
- * input, we might have hit an '@' or we might have matched the
- * omitted_terminator criteria. */
- if(input < end) {
- if(!omitted_terminator) {
- assert(*input == '@');
- ++input;
+ /* Now we have an argument in [argument_start, argument_end), and we
+ * know its filename and initial line number. This is sufficient to
+ * parse it. */
+ mx_node_vector_append(v, mx_parse(filename, argument_start_line,
+ argument_start, argument_end));