texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: * tp/Texinfo/ParserNonXS.pm (_remove_empty_arg) (


From: Patrice Dumas
Subject: branch master updated: * tp/Texinfo/ParserNonXS.pm (_remove_empty_arg) (_expand_macro_arguments, _expand_macro_body, _handle_macro), tp/Texinfo/XS/parsetexi/macro.c (remove_empty_arg) (expand_macro_arguments, expand_macro_body, handle_macro): parse macro arguments in structures similar to the main elements tree, for consistency with the remaining of the code, and to hold source marks in macro arguments.
Date: Fri, 10 Feb 2023 16:18:56 -0500

This is an automated email from the git hooks/post-receive script.

pertusus pushed a commit to branch master
in repository texinfo.

The following commit(s) were added to refs/heads/master by this push:
     new 3b9af9bbf9 * tp/Texinfo/ParserNonXS.pm (_remove_empty_arg) 
(_expand_macro_arguments, _expand_macro_body, _handle_macro), 
tp/Texinfo/XS/parsetexi/macro.c (remove_empty_arg) (expand_macro_arguments, 
expand_macro_body, handle_macro): parse macro arguments in structures similar 
to the main elements tree, for consistency with the remaining of the code, and 
to hold source marks in macro arguments.
3b9af9bbf9 is described below

commit 3b9af9bbf91885ae6ffe12fcf85d06e55a2e0cc1
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Fri Feb 10 22:03:20 2023 +0100

    * tp/Texinfo/ParserNonXS.pm (_remove_empty_arg)
    (_expand_macro_arguments, _expand_macro_body, _handle_macro),
    tp/Texinfo/XS/parsetexi/macro.c (remove_empty_arg)
    (expand_macro_arguments, expand_macro_body, handle_macro):
    parse macro arguments in structures similar to the main elements
    tree, for consistency with the remaining of the code, and to hold
    source marks in macro arguments.
    
    * tp/Texinfo/ParserNonXS.pm (_merge_text): transfer source marks
    only if transfer_marks_element is defined.
    
    * tp/Texinfo/ParserNonXS.pm: avoid autovivification.
---
 ChangeLog                                          |  15 +
 tp/Texinfo/ParserNonXS.pm                          | 184 +++++---
 tp/Texinfo/XS/parsetexi/macro.c                    | 259 ++++++-----
 tp/Texinfo/XS/parsetexi/parser.h                   |   1 +
 tp/t/results/conditionals/macro_in_ifset.pl        |   5 -
 tp/t/results/conditionals/macro_in_ifset_set.pl    |   5 -
 tp/t/results/conditionals/nested_ifset_ifclear.pl  |  20 -
 .../results/converters_tests/at_commands_in_raw.pl |   5 -
 tp/t/results/coverage_braces/test_image.pl         |  25 --
 tp/t/results/include/cpp_lines.pl                  |  10 -
 .../macro_and_commands_in_early_commands.pl        |  15 -
 .../results/include/macro_definition_in_include.pl |   5 -
 tp/t/results/include/macro_in_early_commands.pl    |  29 +-
 tp/t/results/info_tests/def_in_copying.pl          |  10 -
 tp/t/results/macro/arg_body_expansion_order.pl     |  12 +-
 tp/t/results/macro/arg_not_closed.pl               |  12 +-
 tp/t/results/macro/backslash_in_arg.pl             |  38 +-
 tp/t/results/macro/bib_example.pl                  |  62 ++-
 tp/t/results/macro/complete_macro_for_end.pl       |   5 -
 tp/t/results/macro/complex_argument.pl             |  29 +-
 tp/t/results/macro/cpp_directives_after_macros.pl  |  10 -
 tp/t/results/macro/cpp_directives_in_macro.pl      |  13 +-
 tp/t/results/macro/double_recursive_macro_call.pl  |  10 -
 tp/t/results/macro/empty_macro_argument.pl         |  74 +--
 tp/t/results/macro/empty_macro_no_arg.pl           |   5 -
 tp/t/results/macro/expand_two_same.pl              |  24 +-
 tp/t/results/macro/expansion_order.pl              |  12 +-
 tp/t/results/macro/form_feeds.pl                   |  36 +-
 tp/t/results/macro/glossary.pl                     |  81 +++-
 tp/t/results/macro/ifclear_in_macro.pl             |  13 +-
 tp/t/results/macro/ifset_in_macro.pl               |  13 +-
 tp/t/results/macro/ifset_in_macro_set.pl           |  13 +-
 tp/t/results/macro/ignored_macro_definition.pl     |   5 -
 tp/t/results/macro/implicit_quoting_one_arg.pl     |   7 +-
 tp/t/results/macro/implicit_quoting_recursion.pl   | 109 ++++-
 tp/t/results/macro/include_after_empty_line_arg.pl |   5 -
 tp/t/results/macro/leading_spaces_no_ignore.pl     |   5 -
 tp/t/results/macro/macro_after_paragraph.pl        |   5 -
 .../macro_before_specific_line_command_args.pl     |   5 -
 tp/t/results/macro/macro_expands_to_empty.pl       |  12 +-
 tp/t/results/macro/macro_expansion.pl              |  83 +++-
 .../macro/macro_for_dot_in_menu_not_separator.pl   |  10 -
 tp/t/results/macro/macro_for_end.pl                |   5 -
 .../macro/macro_for_ignored_line_command.pl        |   5 -
 tp/t/results/macro/macro_in_accent.pl              |  30 --
 tp/t/results/macro/macro_in_brace_command.pl       |  10 -
 tp/t/results/macro/macro_in_def_delimiters.pl      |  20 -
 tp/t/results/macro/macro_in_empty_menu_comment.pl  |   5 -
 .../macro_in_empty_multitable_empty_before_item.pl |   5 -
 .../macro_in_empty_table_empty_before_item.pl      |   5 -
 tp/t/results/macro/macro_in_empty_text.pl          |   5 -
 tp/t/results/macro/macro_in_end_argument.pl        |   5 -
 tp/t/results/macro/macro_in_index_commands.pl      |  55 ---
 .../macro/macro_in_invalid_documentencoding.pl     |   5 -
 tp/t/results/macro/macro_in_macro_arg.pl           |  26 +-
 tp/t/results/macro/macro_in_macro_arg_simpler.pl   |  12 +-
 tp/t/results/macro/macro_in_menu.pl                |  50 ---
 .../macro_in_menu_comment_closed_by_detailmenu.pl  |   5 -
 .../macro/macro_in_menu_comment_like_entry.pl      |  20 -
 tp/t/results/macro/macro_in_menu_description.pl    |   5 -
 tp/t/results/macro/macro_in_misc_commands.pl       | 255 -----------
 .../macro/macro_in_multitable_empty_before_item.pl |   5 -
 .../macro/macro_in_table_empty_before_item.pl      |   5 -
 tp/t/results/macro/macro_name_with_digit.pl        |  17 +-
 tp/t/results/macro/macro_name_with_hyphen.pl       |  19 +-
 tp/t/results/macro/macro_no_arg_expansion.pl       |   5 -
 tp/t/results/macro/macro_one_arg_end_of_file.pl    |   5 -
 .../macro_with_error_at_end_line_after_macro.pl    |   7 +-
 tp/t/results/macro/macro_zero.pl                   |   5 -
 tp/t/results/macro/nested_macro_call.pl            |  10 -
 tp/t/results/macro/no_macrobody.pl                 |  19 +-
 tp/t/results/macro/paragraph_and_macro.pl          |  30 --
 tp/t/results/macro/protect_comma_macro_line.pl     |  12 +-
 tp/t/results/macro/protect_in_body.pl              |  24 +-
 tp/t/results/macro/protect_in_body_one_arg.pl      |  12 +-
 tp/t/results/macro/recursive_call_in_argument.pl   |   7 +-
 tp/t/results/macro/recursive_call_in_macro.pl      |   5 -
 tp/t/results/macro/recursive_call_in_rmacro.pl     | 500 ---------------------
 tp/t/results/macro/redefine_texinfo_macro.pl       |   7 +-
 tp/t/results/macro/simple_imbricated_macro.pl      |  10 -
 .../macro/simple_imbricated_macro_rmacro.pl        |  10 -
 tp/t/results/macro/space_macro_after_end.pl        |   5 -
 .../macro/space_macro_after_end_verbatim.pl        |   5 -
 tp/t/results/macro/too_much_args.pl                |  19 +-
 tp/t/results/macro/two_macros_on_a_line.pl         |  32 +-
 .../codequoteundirected_codequotebacktick.pl       |  60 ---
 tp/t/results/misc_commands/kbdinputstyle.pl        |  15 -
 .../misc_commands/kbdinputstyle_in_table.pl        |  15 -
 tp/t/results/misc_commands/test_allowcodebreaks.pl |  43 +-
 .../plaintext_tests/star_at_command_formatting.pl  |  15 -
 .../value_and_macro/comma_value_in_macro_arg.pl    |  12 +-
 .../results/value_and_macro/value_in_macro_body.pl |   7 +-
 tp/t/results/xtable/table_nested.pl                |  15 -
 93 files changed, 1007 insertions(+), 1774 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 75dd549fc0..026ad51663 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2023-02-10  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/ParserNonXS.pm (_remove_empty_arg)
+       (_expand_macro_arguments, _expand_macro_body, _handle_macro),
+       tp/Texinfo/XS/parsetexi/macro.c (remove_empty_arg)
+       (expand_macro_arguments, expand_macro_body, handle_macro):
+       parse macro arguments in structures similar to the main elements
+       tree, for consistency with the remaining of the code, and to hold
+       source marks in macro arguments.
+
+       * tp/Texinfo/ParserNonXS.pm (_merge_text): transfer source marks
+       only if transfer_marks_element is defined.
+
+       * tp/Texinfo/ParserNonXS.pm: avoid autovivification.
+
 2023-02-10  Gavin Smith <gavinsmith0123@gmail.com>
 
        * tp/Texinfo/command_data.txt: Remove @useindex as this
diff --git a/tp/Texinfo/ParserNonXS.pm b/tp/Texinfo/ParserNonXS.pm
index 53a498dd2c..5b1e841f52 100644
--- a/tp/Texinfo/ParserNonXS.pm
+++ b/tp/Texinfo/ParserNonXS.pm
@@ -1334,6 +1334,9 @@ sub _transfer_source_marks($$)
 {
   my $from_e = shift;
   my $element = shift;
+
+  if (!defined($from_e)) {confess()};
+
   if ($from_e->{'source_marks'}) {
     if (!$element->{'source_marks'}) {
       $element->{'source_marks'} = [];
@@ -1514,7 +1517,8 @@ sub _close_brace_command($$$;$$$)
   }
 
   pop @{$self->{'nesting_context'}->{'basic_inline_stack'}}
-    if ($self->{'basic_inline_commands'}->{$current->{'cmdname'}});
+    if ($self->{'basic_inline_commands'}
+        and $self->{'basic_inline_commands'}->{$current->{'cmdname'}});
 
   if ($current->{'cmdname'} ne 'verb'
       or $current->{'info'}->{'delimiter'} eq '') {
@@ -2270,7 +2274,8 @@ sub _merge_text {
          if ($self->{'DEBUG'});
   } else {
     my $new_element = { 'text' => $text, 'parent' => $current };
-    _transfer_source_marks($transfer_marks_element, $new_element);
+    _transfer_source_marks($transfer_marks_element, $new_element)
+      if ($transfer_marks_element);
     push @{$current->{'contents'}}, $new_element;
     print STDERR "NEW TEXT: $text|||\n" if ($self->{'DEBUG'});
   }
@@ -2506,13 +2511,36 @@ sub _new_line($;$)
   return ($new_line, $source_info);
 }
 
+# not done by _close_container as argument is in args and not in
+# contents.
+sub _remove_empty_arg($$)
+{
+  my $self = shift;
+  my $argument = shift;
+
+  my $current = _close_container($self, $argument);
+  if (_is_container_empty($argument)
+      and not $argument->{'source_marks'}) {
+    if ($current->{'args'}->[-1] eq $argument) {
+      pop @{$current->{'args'}};
+    }
+  }
+  return $current;
+}
+
 # $MACRO is the element in the tree defining the macro.
-sub _expand_macro_arguments($$$$)
+sub _expand_macro_arguments($$$$$)
 {
-  my ($self, $macro, $line, $source_info) = @_;
+  my ($self, $macro, $line, $source_info, $current) = @_;
 
   my $braces_level = 1;
-  my $arguments = [ '' ];
+  my $argument = {'type' => 'brace_command_arg',
+                  'contents' => [],
+                  'parent' => $current};
+  push @{$current->{'args'}}, $argument;
+  my $argument_content = {'text' => '',
+                          'parent' => $argument};
+  push @{$argument->{'contents'}}, $argument_content;
   my $arg_nr = 0;
   my $args_total = scalar(@{$macro->{'args'}}) -1;
   my $name = $macro->{'args'}->[0]->{'text'};
@@ -2522,25 +2550,38 @@ sub _expand_macro_arguments($$$$)
   while (1) {
     if ($line =~ s/([^\\{},]*)([\\{},])//) {
       my $separator = $2;
-      $arguments->[-1] .= $1;
+      $argument_content->{'text'} .= $1;
       if ($separator eq '\\') {
         if ($line =~ s/^(.)//) {
           my $protected_char = $1;
           if ($protected_char !~ /[\\{},]/) {
-            $arguments->[-1] .= '\\';
+            $argument_content->{'text'} .= '\\';
           }
-          $arguments->[-1] .= $protected_char;
+          $argument_content->{'text'} .= $protected_char;
           print STDERR "MACRO ARG: $separator: $protected_char\n"
             if ($self->{'DEBUG'});
         } else {
-          $arguments->[-1] .= '\\';
+          $argument_content->{'text'} .= '\\';
           print STDERR "MACRO ARG: $separator\n" if ($self->{'DEBUG'});
         }
       } elsif ($separator eq ',') {
         if ($braces_level == 1) {
-          if (scalar(@$arguments) < $args_total) {
-            push @$arguments, '';
-            $line =~ s/^\s*//;
+          if ($argument_content->{'text'} eq '') {
+            _remove_empty_arg($self, $argument);
+          }
+          if (scalar(@{$current->{'args'}}) < $args_total) {
+            $argument = {'type' => 'brace_command_arg',
+                         'contents' => [],
+                         'parent' => $current};
+            push @{$current->{'args'}}, $argument;
+            $argument_content = {'text' => '',
+                                 'parent' => $argument};
+            push @{$argument->{'contents'}}, $argument_content;
+            $line =~ s/^(\s*)//;
+            if ($1 ne '') {
+              $argument->{'info'}
+                = {'spaces_before_argument' => {'text' => $1}};
+            }
             print STDERR "MACRO NEW ARG\n" if ($self->{'DEBUG'});
           } else {
             # implicit quoting when there is one argument.
@@ -2549,39 +2590,47 @@ sub _expand_macro_arguments($$$$)
                                      "macro `%s' called with too many args"),
                                         $name), $source_info);
             }
-            $arguments->[-1] .= ',';
+            $argument_content->{'text'} .= ',';
           }
         } else {
-          $arguments->[-1] .= ',';
+          $argument_content->{'text'} .= ',';
         }
       } elsif ($separator eq '}') {
         $braces_level--;
-        last if ($braces_level == 0);
-        $arguments->[-1] .= $separator;
+        if ($braces_level == 0) {
+          if ($argument_content->{'text'} eq '') {
+            _remove_empty_arg($self, $argument);
+          }
+          last;
+        }
+        $argument_content->{'text'} .= $separator;
       } elsif ($separator eq '{') {
         $braces_level++;
-        $arguments->[-1] .= $separator;
+        $argument_content->{'text'} .= $separator;
       }
     } else {
       print STDERR "MACRO ARG end of line\n" if ($self->{'DEBUG'});
-      $arguments->[-1] .= $line;
+      $argument_content->{'text'} .= $line;
 
-      ($line, $source_info) = _new_line($self);
+      ($line, $source_info) = _new_line($self, $argument);
       if (!defined($line)) {
         $self->_line_error(sprintf(__("\@%s missing closing brace"),
            $name), $source_info_orig);
-        return ($arguments, "\n", $source_info);
+        if ($argument_content->{'text'} eq '') {
+          _remove_empty_arg($self, $argument);
+        }
+        return ("\n", $source_info);
       }
     }
   }
-  if ($args_total == 0 and $arguments->[0] ne '') {
+  if ($args_total == 0 and scalar(@{$current->{'args'}} > 0)) {
     $self->_line_error(sprintf(__(
                "macro `%s' declared without argument called with an argument"),
                                 $name), $source_info);
   }
-  print STDERR "END MACRO ARGS EXPANSION(".scalar(@$arguments)."): ".
-                  join("|\n", @$arguments) ."|\n" if ($self->{'DEBUG'});
-  return ($arguments, $line, $source_info);
+  print STDERR "END MACRO ARGS EXPANSION(".scalar(@{$current->{'args'}})."): "
+                 ."|\n" if ($self->{'DEBUG'});
+  return ($line, $source_info);
 }
 
 sub _lookup_macro_parameter($$) {
@@ -2618,8 +2667,10 @@ sub _expand_macro_body($$$$) {
         my $arg = $1;
         my $formal_arg_index = _lookup_macro_parameter($macro, $arg);
         if (defined($formal_arg_index)) {
-          if ($formal_arg_index < scalar(@$args)) {
-            $result .= $args->[$formal_arg_index];
+          if ($formal_arg_index < scalar(@$args)
+              and scalar(@$args) and $args->[$formal_arg_index]
+              and $args->[$formal_arg_index]->{'contents'}) {
+            $result .= $args->[$formal_arg_index]->{'contents'}->[0]->{'text'};
           }
         } else {
           $self->_line_error(sprintf(__(
@@ -3619,6 +3670,8 @@ sub _end_line_misc_line($$$)
              __("\@%s only meaningful on a \@multitable line"),
              $command);
     } else {
+      $current->{'parent'}->{'extra'} = {}
+        if (!defined($current->{'parent'}->{'extra'}));
       $current->{'parent'}->{'extra'}->{'columnfractions'} = $misc_cmd;
     }
   } elsif ($root_commands{$command}) {
@@ -3779,7 +3832,8 @@ sub _end_line_starting_block($$$)
 
   # @multitable args
   if ($command eq 'multitable'
-        and defined($current->{'parent'}->{'extra'}->{'columnfractions'})) {
+      and $current->{'parent'}->{'extra'}
+      and defined($current->{'parent'}->{'extra'}->{'columnfractions'})) {
     my $multitable = $current->{'parent'};
     my $misc_cmd = $current->{'parent'}->{'extra'}->{'columnfractions'};
 
@@ -4581,11 +4635,18 @@ sub _handle_macro($$$$$)
 
   my $expanded_macro = $self->{'macros'}->{$command}->{'element'};
   my $args_number = scalar(@{$expanded_macro->{'args'}}) -1;
-  my $arguments = [];
-  if ($line =~ s/^\s*{\s*//) { # macro with args
-    # FIXME keep separators information for source mark
-    ($arguments, $line, $source_info)
-     = _expand_macro_arguments($self, $expanded_macro, $line, $source_info);
+  my $arguments_container = {'type' => $expanded_macro->{'cmdname'}.'_call',
+                             'extra' => {'name' => $command},
+                             'args' => []};
+
+  if ($line =~ s/^\s*{(\s*)//) { # macro with args
+    if ($1 ne '') {
+      $arguments_container->{'info'}
+          = {'spaces_before_argument' => {'text' => $1}};
+    }
+    ($line, $source_info)
+     = _expand_macro_arguments($self, $expanded_macro, $line, $source_info,
+                               $arguments_container);
   } elsif (($args_number >= 2) or ($args_number <1)) {
   # as agreed on the bug-texinfo mailing list, no warn when zero
   # arg and not called with {}.
@@ -4594,19 +4655,42 @@ sub _handle_macro($$$$$)
                               $command), $source_info)
        if ($args_number >= 2);
   } else {
-    if ($line !~ /\n/) {
-      ($line, $source_info) = _new_line($self);
-      $line = '' if (!defined($line));
+    my $current = {'type' => 'line_arg',
+                   'parent' => $arguments_container};
+    push @{$arguments_container->{'args'}}, $current;
+    while (1) {
+      if ($line eq '') {
+        ($line, $source_info) = _new_line($self, $current);
+        if (!defined($line)) {
+          $line = '';
+          last;
+        }
+      } else {
+        if (not $current->{'contents'} and $line =~ s/^([^\S\r\n]+)//) {
+          my $internal_space = {'type' => 'internal_spaces_before_argument',
+                                'text' => $1,
+                                'parent' => $current,
+                                'extra' => {'spaces_associated_command'
+                                              => $arguments_container}};
+          push @{$current->{'contents'}}, $internal_space;
+        } else {
+          if ($line !~ /\n/) {
+            $current = _merge_text($self, $current, $line);
+            $line = '';
+          } else {
+            my $has_end_of_line = chomp $line;
+            $current = _merge_text($self, $current, $line);
+            $line = "\n" if ($has_end_of_line);
+            last;
+          }
+        }
+      }
     }
-    # FIXME keep separators information for source mark
-    $line =~ s/^\s*// if ($line =~ /\S/);
-    my $has_end_of_line = chomp $line;
-    $arguments = [$line];
-    $line = "\n" if ($has_end_of_line);
+    _remove_empty_arg($self, $arguments_container->{'args'}->[-1]);
   }
   my $expanded = _expand_macro_body($self,
                             $self->{'macros'}->{$command},
-                            $arguments, $source_info);
+                            $arguments_container->{'args'}, $source_info);
   print STDERR "MACROBODY: $expanded".'||||||'."\n"
     if ($self->{'DEBUG'});
   chomp($expanded);
@@ -4645,15 +4729,9 @@ sub _handle_macro($$$$$)
                    $expanded_macro->{'args'}->[0]->{'text'});
   my $macro_source_mark = {'sourcemark_type' => 'macro_expansion',
                            'status' => 'start'};
-  my $sm_macro_element = {'type' => $expanded_macro->{'cmdname'}.'_call',
-   'extra' => {'name' => $command}};
-  if (scalar(@$arguments)) {
-    $sm_macro_element->{'args'} = [];
-    foreach my $arg (@$arguments) {
-      push @{$sm_macro_element->{'args'}}, {'text' => $arg};
-    }
-  }
-  $macro_source_mark->{'element'} = $sm_macro_element;
+  delete $arguments_container->{'args'}
+     if (scalar(@{$arguments_container->{'args'}}) == 0);
+  $macro_source_mark->{'element'} = $arguments_container;
   _register_source_mark($self, $current, $macro_source_mark);
   $self->{'input'}->[0]->{'input_source_mark'} = $macro_source_mark;
   $line = '';
@@ -5669,7 +5747,8 @@ sub _process_remaining_on_line($$$$)
         $current = $current->{'contents'}->[-1];
         $current->{'args'} = [{ 'type' => 'line_arg',
                                 'parent' => $current }];
-        if ($self->{'basic_inline_commands'}->{$command}) {
+        if ($self->{'basic_inline_commands'}
+            and $self->{'basic_inline_commands'}->{$command}) {
           push @{$self->{'nesting_context'}->{'basic_inline_stack_on_line'}},
                $command;
         }
@@ -5987,7 +6066,8 @@ sub _process_remaining_on_line($$$$)
 
         $current = $current->{'args'}->[-1];
         push @{$self->{'nesting_context'}->{'basic_inline_stack'}}, $command
-          if ($self->{'basic_inline_commands'}->{$command});
+          if ($self->{'basic_inline_commands'}
+              and $self->{'basic_inline_commands'}->{$command});
         if ($self->{'brace_commands'}->{$command} eq 'context') {
           if ($command eq 'caption' or $command eq 'shortcaption') {
             my $float;
diff --git a/tp/Texinfo/XS/parsetexi/macro.c b/tp/Texinfo/XS/parsetexi/macro.c
index 6d1b304744..7c4ad846b0 100644
--- a/tp/Texinfo/XS/parsetexi/macro.c
+++ b/tp/Texinfo/XS/parsetexi/macro.c
@@ -237,31 +237,44 @@ lookup_macro_parameter (char *name, ELEMENT *macro)
   return -1;
 }
 
-/* LINE points the first non-whitespace character after the opening brace in a 
-   macro invocation.  CMD is the command identifier of the macro command.  
+/* not done by _close_container as argument is in args and not in
+   contents. */
+ELEMENT *
+remove_empty_arg (ELEMENT *argument)
+{
+  ELEMENT *current = close_container (argument);
+  if (is_container_empty (argument)
+      && argument->source_mark_list.number == 0)
+    {
+      ELEMENT *last_child = last_args_child (current);
+      if (last_child == argument)
+        destroy_element (pop_element_from_args (current));
+    }
+  return current;
+}
+
+/* LINE points the first non-whitespace character after the opening brace in a
+   macro invocation.  CMD is the command identifier of the macro command.
    Return array of the arguments.  Return value to be freed by caller.  */
-char **
-expand_macro_arguments (ELEMENT *macro, char **line_inout, enum command_id cmd)
+void
+expand_macro_arguments (ELEMENT *macro, char **line_inout, enum command_id cmd,
+                        ELEMENT *current)
 {
   char *line = *line_inout;
   char *pline = line;
-  TEXT arg;
+  TEXT *arg;
   int braces_level = 1;
   int args_total;
+  ELEMENT *argument = new_element (ET_brace_command_arg);
+  ELEMENT *argument_content = new_element (ET_NONE);
 
-  char **arg_list = 0;
-  size_t arg_number = 0;
-  /* arg_space is set to be comparable to arg_number, so need to allocate
-     1 more for the null delimiter */
-  /* start with an argument, which can be an empty string */
-  size_t arg_space = 1;
+  add_to_element_args (current, argument);
+  text_append_n (&argument_content->text, "", 0);
+  add_to_element_contents (argument, argument_content);
+  arg = &(argument_content->text);
 
-  /* allocate 1 more for the null delimiter */
-  arg_list = malloc (sizeof (char *) * (arg_space + 1));
   args_total = macro->args.number - 1;
 
-  text_init (&arg);
-
   while (braces_level > 0)
     {
       /* At the beginning of this loop pline is at the start
@@ -272,29 +285,30 @@ expand_macro_arguments (ELEMENT *macro, char 
**line_inout, enum command_id cmd)
       if (!*sep)
         {
           debug ("MACRO ARG end of line");
-          text_append (&arg, pline);
-          line = new_line (0);
+          text_append (arg, pline);
+          line = new_line (argument);
           if (!line)
             {
               line_error ("@%s missing closing brace", command_name(cmd));
+              if (arg->end == 0)
+                remove_empty_arg (argument);
               line = "\n";
-              arg_list[arg_number++] = arg.text;
               goto funexit;
             }
           pline = line;
           continue;
         }
 
-      text_append_n (&arg, pline, sep - pline);
+      text_append_n (arg, pline, sep - pline);
 
       switch (*sep)
         {
         case '\\':
           if (!strchr ("\\{},", sep[1]))
-            text_append_n (&arg, sep, 1);
+            text_append_n (arg, sep, 1);
           if (sep[1])
             {
-              text_append_n (&arg, &sep[1], 1);
+              text_append_n (arg, &sep[1], 1);
               pline = sep + 2;
             }
           else
@@ -302,14 +316,14 @@ expand_macro_arguments (ELEMENT *macro, char 
**line_inout, enum command_id cmd)
           break;
         case '{':
           braces_level++;
-          text_append_n (&arg, sep, 1);
+          text_append_n (arg, sep, 1);
           pline = sep + 1;
           break;
         case '}':
           braces_level--;
           if (braces_level > 0)
             {
-              text_append_n (&arg, sep, 1);
+              text_append_n (arg, sep, 1);
               pline = sep + 1;
               break;
             }
@@ -318,50 +332,45 @@ expand_macro_arguments (ELEMENT *macro, char 
**line_inout, enum command_id cmd)
         case ',':
           if (braces_level > 1)
             {
-              text_append_n (&arg, sep, 1);
+              text_append_n (arg, sep, 1);
               pline = sep + 1;
               break;
             }
 
           // check for too many args
-          if (*sep == '}' || arg_number < args_total - 1)
+          if (*sep == '}' || current->args.number < args_total)
             {
-              /* Add the last argument read to the list. */
-              if (arg_number == arg_space)
-                {
-                  /* note that if args_total is 0, new_alloc_space will be 1
-                     which is not enough for the minimum of an argument and
-                     the terminating null element.  However, it is not possible
-                     to have arg_number == arg_space in that case, as arg_space
-                     is minimum 1 and arg_number is maximum 0 if args_total is 
0 */
-                  /* Include space for terminating null element. */
-                  size_t new_alloc_space = args_total + 1;
-                  /* unless at the end, only allocate next 5 args */
-                  if (1 + arg_space + 5 < new_alloc_space)
-                    new_alloc_space = 1 + (arg_space += 5);
-                  arg_list = realloc (arg_list,
-                                      new_alloc_space * sizeof (char *));
-                  if (!arg_list)
-                    fatal ("realloc failed");
-                }
-              if (arg.space > 0)
-                arg_list[arg_number++] = arg.text;
-              else
-                arg_list[arg_number++] = strdup ("");
-              text_init (&arg);
+              if (arg->end == 0)
+                remove_empty_arg (argument);
 
               debug ("MACRO NEW ARG");
               pline = sep + 1;
 
               if (*sep == ',')
-                pline += strspn (pline, whitespace_chars);
+                {
+                  char *p = pline;
+                  argument = new_element (ET_brace_command_arg);
+                  argument_content = new_element (ET_NONE);
+                  add_to_element_args (current, argument);
+                  text_append_n (&argument_content->text, "", 0);
+                  add_to_element_contents (argument, argument_content);
+                  arg = &(argument_content->text);
+                  pline += strspn (pline, whitespace_chars);
+                  if (pline - p)
+                    {
+                      ELEMENT *spaces_element = new_element (ET_NONE);
+                      text_append_n (&spaces_element->text, p, pline - p);
+                      add_info_element_oot (argument, "spaces_before_argument",
+                                            spaces_element);
+                    }
+                }
             }
           else
             {
               if (args_total != 1)
                 line_error ("macro `%s' called with too many args",
                             command_name(cmd));
-              text_append_n (&arg, ",", 1);
+              text_append_n (arg, ",", 1);
               pline = sep + 1;
             }
           break;
@@ -371,8 +380,7 @@ expand_macro_arguments (ELEMENT *macro, char **line_inout, 
enum command_id cmd)
   debug ("END MACRO ARGS EXPANSION");
   line = pline;
 
-  if (args_total == 0 && arg_number > 0
-      && arg_list[0] && *arg_list[0])
+  if (args_total == 0 && current->args.number > 0)
     {
       line_error
         ("macro `%s' declared without argument called with an argument",
@@ -381,14 +389,12 @@ expand_macro_arguments (ELEMENT *macro, char 
**line_inout, enum command_id cmd)
 
 funexit:
   *line_inout = line;
-  arg_list[arg_number] = 0;
-  return arg_list;
 }
 
-/* ARGUMENTS are the arguments used in the macro invocation.  EXPANDED gets 
the 
-   result of the expansion. */
+/* ARGUMENTS element holds the arguments used in the macro invocation.
+   EXPANDED gets the result of the expansion. */
 static void
-expand_macro_body (MACRO *macro_record, char *arguments[], TEXT *expanded)
+expand_macro_body (MACRO *macro_record, ELEMENT *arguments, TEXT *expanded)
 {
   int pos; /* Index into arguments. */
   ELEMENT *macro;
@@ -446,8 +452,12 @@ expand_macro_body (MACRO *macro_record, char *arguments[], 
TEXT *expanded)
             }
           else
             {
-              if (arguments && arguments[pos])
-                text_append (expanded, arguments[pos]);
+              if (arguments && pos < arguments->args.number)
+                {
+                  text_append (expanded,
+                    last_contents_child (
+                       args_child_by_index (arguments, pos))->text.text);
+                }
             }
           *bs = '\\';
           ptext = bs + 1;
@@ -510,11 +520,9 @@ handle_macro (ELEMENT *current, char **line_inout, enum 
command_id cmd)
   ELEMENT *macro;
   TEXT expanded;
   char *expanded_macro_text;
-  char **arguments = 0;
   int args_number;
   SOURCE_MARK *macro_source_mark;
-  ELEMENT *sm_macro_element;
-  enum element_type sm_macro_elt_type;
+  ELEMENT *arguments_container = new_element (ET_NONE);
 
   line = *line_inout;
   text_init (&expanded);
@@ -524,16 +532,30 @@ handle_macro (ELEMENT *current, char **line_inout, enum 
command_id cmd)
     fatal ("no macro record");
   macro = macro_record->element;
 
+  if (macro->cmd == CM_macro)
+    arguments_container->type = ET_macro_call;
+  else if (macro->cmd == CM_rmacro)
+    arguments_container->type = ET_rmacro_call;
+  add_extra_string_dup (arguments_container, "name", command_name(cmd));
+
+  macro_record = lookup_macro (cmd);
   /* Get number of args. - 1 for the macro name. */
   args_number = macro->args.number - 1;
 
   p = line + strspn (line, whitespace_chars);
   if (*p == '{')
     {
+      p++;
       line = p;
-      line++;
       line += strspn (line, whitespace_chars);
-      arguments = expand_macro_arguments (macro, &line, cmd);
+      if (line - p)
+        {
+          ELEMENT *spaces_element = new_element (ET_NONE);
+          text_append_n (&spaces_element->text, p, line - p);
+          add_info_element_oot (arguments_container, "spaces_before_argument",
+                                spaces_element);
+        }
+      expand_macro_arguments (macro, &line, cmd, arguments_container);
     }
   /* Warning depending on the number of arguments this macro
      is supposed to take. */
@@ -547,30 +569,69 @@ handle_macro (ELEMENT *current, char **line_inout, enum 
command_id cmd)
     }
   else
     {
-      char *p;
-      /* If it takes a single line of input, and we don't have a full line of 
-         input already, call new_line. */
-      if (!strchr (line, '\n'))
-        {
-          line = new_line (0);
-          if (!line)
-            line = "";
-        }
-      line += strspn (line, whitespace_chars_except_newline);
+      ELEMENT *last_child;
+      ELEMENT *current = new_element (ET_line_arg);
+      add_to_element_args (arguments_container, current);
 
-      arguments = malloc (sizeof (char *) * 2);
-      arguments[0] = strdup (line);
-      arguments[1] = 0;
-
-      p = strchr (arguments[0], '\n');
-      if (p)
+      while (1)
         {
-          *p = '\0';
-          line = "\n";
+          if (*line == '\0')
+            {
+            /* If it takes a single line of input, and we don't have a
+               full line of input already, call new_line. */
+              line = new_line (current);
+              if (!line)
+                {
+                  line = "";
+                  break;
+                }
+            }
+          else
+            {
+              int leading_spaces_added = 0;
+              if (current->contents.number == 0)
+                {
+                  int leading_spaces_nr = strspn (line,
+                                           whitespace_chars_except_newline);
+                  if (leading_spaces_nr)
+                    {
+                      ELEMENT *internal_space
+                        = new_element (ET_internal_spaces_before_argument);
+                      text_append_n (&internal_space->text, line,
+                                     leading_spaces_nr);
+                      add_extra_element (internal_space,
+                                         "spaces_associated_command",
+                                         arguments_container);
+                      add_to_element_contents (current, internal_space);
+
+                      line += leading_spaces_nr;
+
+                      leading_spaces_added = 1;
+                    }
+                }
+              if (! leading_spaces_added)
+                {
+                  char *p = strchr (line, '\n');
+                  if (!p)
+                    {
+                      current = merge_text (current, line, 0);
+                      line += strlen(line);
+                    }
+                  else
+                    {
+                      *p = '\0';
+                      current = merge_text (current, line, 0);
+                      line = "\n";
+                      break;
+                    }
+                }
+            }
         }
+      last_child = last_args_child (arguments_container);
+      remove_empty_arg (last_child);
     }
 
-  expand_macro_body (macro_record, arguments, &expanded);
+  expand_macro_body (macro_record, arguments_container, &expanded);
   debug ("MACROBODY: %s||||||", expanded.text);
 
   if (expanded.end > 0 && expanded.text[expanded.end - 1] == '\n')
@@ -598,30 +659,11 @@ handle_macro (ELEMENT *current, char **line_inout, enum 
command_id cmd)
         }
     }
 
-  if (macro->cmd == CM_macro)
-    sm_macro_elt_type = ET_macro_call;
-  else
-    sm_macro_elt_type = ET_rmacro_call;
-
-  sm_macro_element = new_element (sm_macro_elt_type);
-  add_extra_string_dup (sm_macro_element, "name", command_name(cmd));
-  if (arguments)
-    {
-      int i = 0;
-      while (arguments[i] != 0)
-        {
-          ELEMENT *e = new_element (ET_NONE);
-          text_append (&e->text, arguments[i]);
-          add_to_element_args (sm_macro_element, e);
-          i++;
-        }
-    }
-
   // 3958 Pop macro stack
 
   macro_source_mark = new_source_mark (SM_type_macro_expansion);
   macro_source_mark->status = SM_status_start;
-  macro_source_mark->element = sm_macro_element;
+  macro_source_mark->element = arguments_container;
   register_source_mark(current, macro_source_mark);
 
   macro_expansion_nr++;
@@ -639,17 +681,6 @@ handle_macro (ELEMENT *current, char **line_inout, enum 
command_id cmd)
   set_input_source_mark (macro_source_mark);
 
  funexit:
-  /* Free arguments. */
-  if (arguments)
-    {
-      char **s = arguments;
-      while (*s)
-        {
-          free (*s);
-          s++;
-        }
-      free (arguments);
-    }
 
   *line_inout = line;
   return current;
diff --git a/tp/Texinfo/XS/parsetexi/parser.h b/tp/Texinfo/XS/parsetexi/parser.h
index 7a2fcd2378..95e4baeb12 100644
--- a/tp/Texinfo/XS/parsetexi/parser.h
+++ b/tp/Texinfo/XS/parsetexi/parser.h
@@ -107,6 +107,7 @@ typedef struct GLOBAL_INFO {
 
 
 /* In close.c */
+int is_container_empty (ELEMENT *current);
 ELEMENT *close_container (ELEMENT *current);
 void close_command_cleanup (ELEMENT *current);
 ELEMENT *close_commands (ELEMENT *current, enum command_id 
closed_block_command,
diff --git a/tp/t/results/conditionals/macro_in_ifset.pl 
b/tp/t/results/conditionals/macro_in_ifset.pl
index 35068f4938..859371cc47 100644
--- a/tp/t/results/conditionals/macro_in_ifset.pl
+++ b/tp/t/results/conditionals/macro_in_ifset.pl
@@ -81,11 +81,6 @@ $result_trees{'macro_in_ifset'} = {
             {
               'counter' => 1,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'truc'
                 },
diff --git a/tp/t/results/conditionals/macro_in_ifset_set.pl 
b/tp/t/results/conditionals/macro_in_ifset_set.pl
index 67d6da9a0a..f4d8639968 100644
--- a/tp/t/results/conditionals/macro_in_ifset_set.pl
+++ b/tp/t/results/conditionals/macro_in_ifset_set.pl
@@ -184,11 +184,6 @@ $result_trees{'macro_in_ifset_set'} = {
             {
               'counter' => 1,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'truc'
                 },
diff --git a/tp/t/results/conditionals/nested_ifset_ifclear.pl 
b/tp/t/results/conditionals/nested_ifset_ifclear.pl
index 73d0953677..9ba36cdf89 100644
--- a/tp/t/results/conditionals/nested_ifset_ifclear.pl
+++ b/tp/t/results/conditionals/nested_ifset_ifclear.pl
@@ -160,11 +160,6 @@ $result_trees{'nested_ifset_ifclear'} = {
             {
               'counter' => 1,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'conditionals'
                 },
@@ -233,11 +228,6 @@ $result_trees{'nested_ifset_ifclear'} = {
             {
               'counter' => 2,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'conditionals'
                 },
@@ -306,11 +296,6 @@ $result_trees{'nested_ifset_ifclear'} = {
             {
               'counter' => 3,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'conditionals'
                 },
@@ -370,11 +355,6 @@ $result_trees{'nested_ifset_ifclear'} = {
             {
               'counter' => 4,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'conditionals'
                 },
diff --git a/tp/t/results/converters_tests/at_commands_in_raw.pl 
b/tp/t/results/converters_tests/at_commands_in_raw.pl
index 0cf8f4e152..0f2bd08b4c 100644
--- a/tp/t/results/converters_tests/at_commands_in_raw.pl
+++ b/tp/t/results/converters_tests/at_commands_in_raw.pl
@@ -838,11 +838,6 @@ $result_trees{'at_commands_in_raw'} = {
                 {
                   'counter' => 1,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'othermacro'
                     },
diff --git a/tp/t/results/coverage_braces/test_image.pl 
b/tp/t/results/coverage_braces/test_image.pl
index 4721434c07..24188a2388 100644
--- a/tp/t/results/coverage_braces/test_image.pl
+++ b/tp/t/results/coverage_braces/test_image.pl
@@ -102,11 +102,6 @@ $result_trees{'test_image'} = {
                     {
                       'counter' => 1,
                       'element' => {
-                        'args' => [
-                          {
-                            'text' => ''
-                          }
-                        ],
                         'extra' => {
                           'name' => 'files-char'
                         },
@@ -627,11 +622,6 @@ $result_trees{'test_image'} = {
             {
               'counter' => 2,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'files-char'
                 },
@@ -1134,11 +1124,6 @@ $result_trees{'test_image'} = {
                     {
                       'counter' => 3,
                       'element' => {
-                        'args' => [
-                          {
-                            'text' => ''
-                          }
-                        ],
                         'extra' => {
                           'name' => 'files-char'
                         },
@@ -1660,11 +1645,6 @@ $result_trees{'test_image'} = {
                 {
                   'counter' => 4,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'files-char'
                     },
@@ -2123,11 +2103,6 @@ $result_trees{'test_image'} = {
                         {
                           'counter' => 5,
                           'element' => {
-                            'args' => [
-                              {
-                                'text' => ''
-                              }
-                            ],
                             'extra' => {
                               'name' => 'files-char'
                             },
diff --git a/tp/t/results/include/cpp_lines.pl 
b/tp/t/results/include/cpp_lines.pl
index 0458bad335..1caba9614c 100644
--- a/tp/t/results/include/cpp_lines.pl
+++ b/tp/t/results/include/cpp_lines.pl
@@ -310,11 +310,6 @@ $result_trees{'cpp_lines'} = {
             {
               'counter' => 1,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'macr'
                 },
@@ -482,11 +477,6 @@ $result_trees{'cpp_lines'} = {
             {
               'counter' => 2,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'macrtwo'
                 },
diff --git a/tp/t/results/include/macro_and_commands_in_early_commands.pl 
b/tp/t/results/include/macro_and_commands_in_early_commands.pl
index e75118dedb..17ec24ae49 100644
--- a/tp/t/results/include/macro_and_commands_in_early_commands.pl
+++ b/tp/t/results/include/macro_and_commands_in_early_commands.pl
@@ -111,11 +111,6 @@ $result_trees{'macro_and_commands_in_early_commands'} = {
                 {
                   'counter' => 1,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'begin-file'
                     },
@@ -239,11 +234,6 @@ $result_trees{'macro_and_commands_in_early_commands'} = {
                 {
                   'counter' => 2,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'latin1'
                     },
@@ -596,11 +586,6 @@ $result_trees{'macro_and_commands_in_early_commands'} = {
             {
               'counter' => 4,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'themacro'
                 },
diff --git a/tp/t/results/include/macro_definition_in_include.pl 
b/tp/t/results/include/macro_definition_in_include.pl
index 28b3d686f9..88d341991b 100644
--- a/tp/t/results/include/macro_definition_in_include.pl
+++ b/tp/t/results/include/macro_definition_in_include.pl
@@ -127,11 +127,6 @@ $result_trees{'macro_definition_in_include'} = {
                 {
                   'counter' => 1,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'themacro'
                     },
diff --git a/tp/t/results/include/macro_in_early_commands.pl 
b/tp/t/results/include/macro_in_early_commands.pl
index 8ffdcffd55..fa74e5b0f5 100644
--- a/tp/t/results/include/macro_in_early_commands.pl
+++ b/tp/t/results/include/macro_in_early_commands.pl
@@ -149,7 +149,12 @@ $result_trees{'macro_in_early_commands'} = {
                       'element' => {
                         'args' => [
                           {
-                            'text' => 'info'
+                            'contents' => [
+                              {
+                                'text' => 'info'
+                              }
+                            ],
+                            'type' => 'brace_command_arg'
                           }
                         ],
                         'extra' => {
@@ -190,11 +195,6 @@ $result_trees{'macro_in_early_commands'} = {
                 {
                   'counter' => 1,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'begin-file'
                     },
@@ -399,11 +399,6 @@ $result_trees{'macro_in_early_commands'} = {
                 {
                   'counter' => 4,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'latin1'
                     },
@@ -750,11 +745,6 @@ $result_trees{'macro_in_early_commands'} = {
             {
               'counter' => 6,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'themacro'
                 },
@@ -812,7 +802,12 @@ $result_trees{'macro_in_early_commands'} = {
                   'element' => {
                     'args' => [
                       {
-                        'text' => 'info'
+                        'contents' => [
+                          {
+                            'text' => 'info'
+                          }
+                        ],
+                        'type' => 'brace_command_arg'
                       }
                     ],
                     'extra' => {
diff --git a/tp/t/results/info_tests/def_in_copying.pl 
b/tp/t/results/info_tests/def_in_copying.pl
index 8562c9cc68..98e2515445 100644
--- a/tp/t/results/info_tests/def_in_copying.pl
+++ b/tp/t/results/info_tests/def_in_copying.pl
@@ -178,11 +178,6 @@ $result_trees{'def_in_copying'} = {
                     {
                       'counter' => 1,
                       'element' => {
-                        'args' => [
-                          {
-                            'text' => ''
-                          }
-                        ],
                         'extra' => {
                           'name' => 'mymacro'
                         },
@@ -479,11 +474,6 @@ $result_trees{'def_in_copying'} = {
                 {
                   'counter' => 2,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'mymacro'
                     },
diff --git a/tp/t/results/macro/arg_body_expansion_order.pl 
b/tp/t/results/macro/arg_body_expansion_order.pl
index 70a1870cb2..571a356ac4 100644
--- a/tp/t/results/macro/arg_body_expansion_order.pl
+++ b/tp/t/results/macro/arg_body_expansion_order.pl
@@ -164,7 +164,12 @@ $result_trees{'arg_body_expansion_order'} = {
               'element' => {
                 'args' => [
                   {
-                    'text' => '@othermacro{}'
+                    'contents' => [
+                      {
+                        'text' => '@othermacro{}'
+                      }
+                    ],
+                    'type' => 'brace_command_arg'
                   }
                 ],
                 'extra' => {
@@ -259,11 +264,6 @@ $result_trees{'arg_body_expansion_order'} = {
             {
               'counter' => 2,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'othermacro'
                 },
diff --git a/tp/t/results/macro/arg_not_closed.pl 
b/tp/t/results/macro/arg_not_closed.pl
index 368ecaedb2..5fbfff1c43 100644
--- a/tp/t/results/macro/arg_not_closed.pl
+++ b/tp/t/results/macro/arg_not_closed.pl
@@ -84,13 +84,23 @@ $result_trees{'arg_not_closed'} = {
                   'element' => {
                     'args' => [
                       {
-                        'text' => 'something
+                        'contents' => [
+                          {
+                            'text' => 'something
 '
+                          }
+                        ],
+                        'type' => 'brace_command_arg'
                       }
                     ],
                     'extra' => {
                       'name' => 'foo'
                     },
+                    'info' => {
+                      'spaces_before_argument' => {
+                        'text' => ' '
+                      }
+                    },
                     'type' => 'macro_call'
                   },
                   'position' => 5,
diff --git a/tp/t/results/macro/backslash_in_arg.pl 
b/tp/t/results/macro/backslash_in_arg.pl
index e6acd9e26d..738fe248cc 100644
--- a/tp/t/results/macro/backslash_in_arg.pl
+++ b/tp/t/results/macro/backslash_in_arg.pl
@@ -102,12 +102,22 @@ $result_trees{'backslash_in_arg'} = {
               'element' => {
                 'args' => [
                   {
-                    'text' => '\\\\q'
+                    'contents' => [
+                      {
+                        'text' => '\\\\q'
+                      }
+                    ],
+                    'type' => 'line_arg'
                   }
                 ],
                 'extra' => {
                   'name' => 'funindex'
                 },
+                'info' => {
+                  'spaces_before_argument' => {
+                    'text' => ' '
+                  }
+                },
                 'type' => 'macro_call'
               },
               'position' => 1,
@@ -175,7 +185,12 @@ $result_trees{'backslash_in_arg'} = {
               'element' => {
                 'args' => [
                   {
-                    'text' => '\\r'
+                    'contents' => [
+                      {
+                        'text' => '\\r'
+                      }
+                    ],
+                    'type' => 'brace_command_arg'
                   }
                 ],
                 'extra' => {
@@ -245,12 +260,22 @@ $result_trees{'backslash_in_arg'} = {
               'element' => {
                 'args' => [
                   {
-                    'text' => '\\q'
+                    'contents' => [
+                      {
+                        'text' => '\\q'
+                      }
+                    ],
+                    'type' => 'line_arg'
                   }
                 ],
                 'extra' => {
                   'name' => 'funindex'
                 },
+                'info' => {
+                  'spaces_before_argument' => {
+                    'text' => ' '
+                  }
+                },
                 'type' => 'macro_call'
               },
               'sourcemark_type' => 'macro_expansion',
@@ -315,7 +340,12 @@ $result_trees{'backslash_in_arg'} = {
               'element' => {
                 'args' => [
                   {
-                    'text' => '\\r'
+                    'contents' => [
+                      {
+                        'text' => '\\r'
+                      }
+                    ],
+                    'type' => 'brace_command_arg'
                   }
                 ],
                 'extra' => {
diff --git a/tp/t/results/macro/bib_example.pl 
b/tp/t/results/macro/bib_example.pl
index a4ad18290c..23fcbaaf67 100644
--- a/tp/t/results/macro/bib_example.pl
+++ b/tp/t/results/macro/bib_example.pl
@@ -3408,7 +3408,12 @@ $result_trees{'bib_example'} = {
                   'element' => {
                     'args' => [
                       {
-                        'text' => 'References'
+                        'contents' => [
+                          {
+                            'text' => 'References'
+                          }
+                        ],
+                        'type' => 'brace_command_arg'
                       }
                     ],
                     'extra' => {
@@ -3449,7 +3454,12 @@ $result_trees{'bib_example'} = {
                   'element' => {
                     'args' => [
                       {
-                        'text' => 'References'
+                        'contents' => [
+                          {
+                            'text' => 'References'
+                          }
+                        ],
+                        'type' => 'brace_command_arg'
                       }
                     ],
                     'extra' => {
@@ -3669,11 +3679,6 @@ $result_trees{'bib_example'} = {
                         {
                           'counter' => 3,
                           'element' => {
-                            'args' => [
-                              {
-                                'text' => ''
-                              }
-                            ],
                             'extra' => {
                               'name' => 'mybibnode'
                             },
@@ -3900,7 +3905,12 @@ $result_trees{'bib_example'} = {
                   'element' => {
                     'args' => [
                       {
-                        'text' => 'LaTeX2e'
+                        'contents' => [
+                          {
+                            'text' => 'LaTeX2e'
+                          }
+                        ],
+                        'type' => 'brace_command_arg'
                       }
                     ],
                     'extra' => {
@@ -3936,10 +3946,25 @@ $result_trees{'bib_example'} = {
                   'element' => {
                     'args' => [
                       {
-                        'text' => '@mybibnode{}'
+                        'contents' => [
+                          {
+                            'text' => '@mybibnode{}'
+                          }
+                        ],
+                        'type' => 'brace_command_arg'
                       },
                       {
-                        'text' => 'LaTeX2e'
+                        'contents' => [
+                          {
+                            'text' => 'LaTeX2e'
+                          }
+                        ],
+                        'info' => {
+                          'spaces_before_argument' => {
+                            'text' => ' '
+                          }
+                        },
+                        'type' => 'brace_command_arg'
                       }
                     ],
                     'extra' => {
@@ -3964,11 +3989,6 @@ $result_trees{'bib_example'} = {
                         {
                           'counter' => 6,
                           'element' => {
-                            'args' => [
-                              {
-                                'text' => ''
-                              }
-                            ],
                             'extra' => {
                               'name' => 'mybibnode'
                             },
@@ -4082,11 +4102,6 @@ $result_trees{'bib_example'} = {
                         {
                           'counter' => 7,
                           'element' => {
-                            'args' => [
-                              {
-                                'text' => ''
-                              }
-                            ],
                             'extra' => {
                               'name' => 'mybibnode'
                             },
@@ -4246,7 +4261,12 @@ $result_trees{'bib_example'} = {
                       'element' => {
                         'args' => [
                           {
-                            'text' => 'LaTeX2e'
+                            'contents' => [
+                              {
+                                'text' => 'LaTeX2e'
+                              }
+                            ],
+                            'type' => 'brace_command_arg'
                           }
                         ],
                         'extra' => {
diff --git a/tp/t/results/macro/complete_macro_for_end.pl 
b/tp/t/results/macro/complete_macro_for_end.pl
index 41e66d9dd4..cecaf79767 100644
--- a/tp/t/results/macro/complete_macro_for_end.pl
+++ b/tp/t/results/macro/complete_macro_for_end.pl
@@ -90,11 +90,6 @@ $result_trees{'complete_macro_for_end'} = {
                 {
                   'counter' => 1,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'theend'
                     },
diff --git a/tp/t/results/macro/complex_argument.pl 
b/tp/t/results/macro/complex_argument.pl
index 14e0fc38a1..55e9f61090 100644
--- a/tp/t/results/macro/complex_argument.pl
+++ b/tp/t/results/macro/complex_argument.pl
@@ -229,7 +229,9 @@ $result_trees{'complex_argument'} = {
               'element' => {
                 'args' => [
                   {
-                    'text' => '@verb{% @macrotwo %}
+                    'contents' => [
+                      {
+                        'text' => '@verb{% @macrotwo %}
 @c @macrofour
 @pagesizes 4 @macrofour{}
 @headings doubleafter @macrofour{}
@@ -251,6 +253,9 @@ macroseven defined
 @end iftex
 @macrofour{}
 '
+                      }
+                    ],
+                    'type' => 'brace_command_arg'
                   }
                 ],
                 'extra' => {
@@ -320,11 +325,6 @@ macroseven defined
                         {
                           'counter' => 2,
                           'element' => {
-                            'args' => [
-                              {
-                                'text' => ''
-                              }
-                            ],
                             'extra' => {
                               'name' => 'macrofour'
                             },
@@ -388,11 +388,6 @@ macroseven defined
                         {
                           'counter' => 3,
                           'element' => {
-                            'args' => [
-                              {
-                                'text' => ''
-                              }
-                            ],
                             'extra' => {
                               'name' => 'macrofour'
                             },
@@ -634,11 +629,6 @@ macroseven defined
                 {
                   'counter' => 4,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'macrofour'
                     },
@@ -715,7 +705,12 @@ macroseven defined
                   'element' => {
                     'args' => [
                       {
-                        'text' => 'aaa'
+                        'contents' => [
+                          {
+                            'text' => 'aaa'
+                          }
+                        ],
+                        'type' => 'brace_command_arg'
                       }
                     ],
                     'extra' => {
diff --git a/tp/t/results/macro/cpp_directives_after_macros.pl 
b/tp/t/results/macro/cpp_directives_after_macros.pl
index 03e860872b..6fed7d6096 100644
--- a/tp/t/results/macro/cpp_directives_after_macros.pl
+++ b/tp/t/results/macro/cpp_directives_after_macros.pl
@@ -155,11 +155,6 @@ $result_trees{'cpp_directives_after_macros'} = {
                 {
                   'counter' => 1,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'noargsspaces'
                     },
@@ -209,11 +204,6 @@ $result_trees{'cpp_directives_after_macros'} = {
             {
               'counter' => 2,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'emptyexpansion'
                 },
diff --git a/tp/t/results/macro/cpp_directives_in_macro.pl 
b/tp/t/results/macro/cpp_directives_in_macro.pl
index 2253cf5a2b..9495bab3fd 100644
--- a/tp/t/results/macro/cpp_directives_in_macro.pl
+++ b/tp/t/results/macro/cpp_directives_in_macro.pl
@@ -89,15 +89,26 @@ $result_trees{'cpp_directives_in_macro'} = {
                   'element' => {
                     'args' => [
                       {
-                        'text' => '#line 100 "in_arg_file"
+                        'contents' => [
+                          {
+                            'text' => '#line 100 "in_arg_file"
 
 @unknownin
 '
+                          }
+                        ],
+                        'type' => 'brace_command_arg'
                       }
                     ],
                     'extra' => {
                       'name' => 'simplemacro'
                     },
+                    'info' => {
+                      'spaces_before_argument' => {
+                        'text' => '
+'
+                      }
+                    },
                     'type' => 'macro_call'
                   },
                   'position' => 1,
diff --git a/tp/t/results/macro/double_recursive_macro_call.pl 
b/tp/t/results/macro/double_recursive_macro_call.pl
index 739fb47bea..4cf0d9431e 100644
--- a/tp/t/results/macro/double_recursive_macro_call.pl
+++ b/tp/t/results/macro/double_recursive_macro_call.pl
@@ -151,11 +151,6 @@ $result_trees{'double_recursive_macro_call'} = {
             {
               'counter' => 1,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'mactwo'
                 },
@@ -167,11 +162,6 @@ $result_trees{'double_recursive_macro_call'} = {
             {
               'counter' => 2,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'macone'
                 },
diff --git a/tp/t/results/macro/empty_macro_argument.pl 
b/tp/t/results/macro/empty_macro_argument.pl
index 7b0c468a93..270ef6a250 100644
--- a/tp/t/results/macro/empty_macro_argument.pl
+++ b/tp/t/results/macro/empty_macro_argument.pl
@@ -71,11 +71,6 @@ $result_trees{'empty_macro_argument'} = {
             {
               'counter' => 1,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'mymacro'
                 },
@@ -103,14 +98,14 @@ $result_trees{'empty_macro_argument'} = {
                 {
                   'counter' => 2,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'mymacro'
                     },
+                    'info' => {
+                      'spaces_before_argument' => {
+                        'text' => ' '
+                      }
+                    },
                     'type' => 'macro_call'
                   },
                   'position' => 5,
@@ -126,14 +121,14 @@ $result_trees{'empty_macro_argument'} = {
                 {
                   'counter' => 3,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'mymacro'
                     },
+                    'info' => {
+                      'spaces_before_argument' => {
+                        'text' => '  '
+                      }
+                    },
                     'type' => 'macro_call'
                   },
                   'position' => 10,
@@ -151,12 +146,22 @@ $result_trees{'empty_macro_argument'} = {
                   'element' => {
                     'args' => [
                       {
-                        'text' => 'x'
+                        'contents' => [
+                          {
+                            'text' => 'x'
+                          }
+                        ],
+                        'type' => 'brace_command_arg'
                       }
                     ],
                     'extra' => {
                       'name' => 'mymacro'
                     },
+                    'info' => {
+                      'spaces_before_argument' => {
+                        'text' => '  '
+                      }
+                    },
                     'type' => 'macro_call'
                   },
                   'position' => 15,
@@ -247,11 +252,6 @@ $result_trees{'empty_macro_argument'} = {
             {
               'counter' => 5,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'mytwo'
                 },
@@ -279,14 +279,14 @@ $result_trees{'empty_macro_argument'} = {
                 {
                   'counter' => 6,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'mytwo'
                     },
+                    'info' => {
+                      'spaces_before_argument' => {
+                        'text' => ' '
+                      }
+                    },
                     'type' => 'macro_call'
                   },
                   'position' => 3,
@@ -302,14 +302,14 @@ $result_trees{'empty_macro_argument'} = {
                 {
                   'counter' => 7,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'mytwo'
                     },
+                    'info' => {
+                      'spaces_before_argument' => {
+                        'text' => '  '
+                      }
+                    },
                     'type' => 'macro_call'
                   },
                   'position' => 6,
@@ -327,12 +327,22 @@ $result_trees{'empty_macro_argument'} = {
                   'element' => {
                     'args' => [
                       {
-                        'text' => 'x'
+                        'contents' => [
+                          {
+                            'text' => 'x'
+                          }
+                        ],
+                        'type' => 'brace_command_arg'
                       }
                     ],
                     'extra' => {
                       'name' => 'mytwo'
                     },
+                    'info' => {
+                      'spaces_before_argument' => {
+                        'text' => '  '
+                      }
+                    },
                     'type' => 'macro_call'
                   },
                   'position' => 9,
diff --git a/tp/t/results/macro/empty_macro_no_arg.pl 
b/tp/t/results/macro/empty_macro_no_arg.pl
index 6db0ca737b..eae8fdc90f 100644
--- a/tp/t/results/macro/empty_macro_no_arg.pl
+++ b/tp/t/results/macro/empty_macro_no_arg.pl
@@ -99,11 +99,6 @@ $result_trees{'empty_macro_no_arg'} = {
             {
               'counter' => 2,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'foo'
                 },
diff --git a/tp/t/results/macro/expand_two_same.pl 
b/tp/t/results/macro/expand_two_same.pl
index 55f3809370..a709f70854 100644
--- a/tp/t/results/macro/expand_two_same.pl
+++ b/tp/t/results/macro/expand_two_same.pl
@@ -84,14 +84,24 @@ $result_trees{'expand_two_same'} = {
                   'element' => {
                     'args' => [
                       {
-                        'text' => 'a simple @code{
+                        'contents' => [
+                          {
+                            'text' => 'a simple @code{
 arg}
 '
+                          }
+                        ],
+                        'type' => 'brace_command_arg'
                       }
                     ],
                     'extra' => {
                       'name' => 'macrotwo'
                     },
+                    'info' => {
+                      'spaces_before_argument' => {
+                        'text' => ' '
+                      }
+                    },
                     'type' => 'macro_call'
                   },
                   'position' => 12,
@@ -190,12 +200,22 @@ arg}
                   'element' => {
                     'args' => [
                       {
-                        'text' => 'arg with comma , here '
+                        'contents' => [
+                          {
+                            'text' => 'arg with comma , here '
+                          }
+                        ],
+                        'type' => 'brace_command_arg'
                       }
                     ],
                     'extra' => {
                       'name' => 'macrotwo'
                     },
+                    'info' => {
+                      'spaces_before_argument' => {
+                        'text' => ' '
+                      }
+                    },
                     'type' => 'macro_call'
                   },
                   'position' => 24,
diff --git a/tp/t/results/macro/expansion_order.pl 
b/tp/t/results/macro/expansion_order.pl
index 95b71f948e..4308e6f9f4 100644
--- a/tp/t/results/macro/expansion_order.pl
+++ b/tp/t/results/macro/expansion_order.pl
@@ -144,7 +144,12 @@ $result_trees{'expansion_order'} = {
               'element' => {
                 'args' => [
                   {
-                    'text' => 'ab'
+                    'contents' => [
+                      {
+                        'text' => 'ab'
+                      }
+                    ],
+                    'type' => 'brace_command_arg'
                   }
                 ],
                 'extra' => {
@@ -159,11 +164,6 @@ $result_trees{'expansion_order'} = {
             {
               'counter' => 2,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'machin'
                 },
diff --git a/tp/t/results/macro/form_feeds.pl b/tp/t/results/macro/form_feeds.pl
index 19ca89e363..0cf3eb3dde 100644
--- a/tp/t/results/macro/form_feeds.pl
+++ b/tp/t/results/macro/form_feeds.pl
@@ -147,15 +147,35 @@ $result_trees{'form_feeds'} = {
               'element' => {
                 'args' => [
                   {
-                    'text' => 'arg1'
+                    'contents' => [
+                      {
+                        'text' => 'arg1'
+                      }
+                    ],
+                    'type' => 'brace_command_arg'
                   },
                   {
-                    'text' => 'arg2'
+                    'contents' => [
+                      {
+                        'text' => 'arg2'
+                      }
+                    ],
+                    'info' => {
+                      'spaces_before_argument' => {
+                        'text' => ' '
+                      }
+                    },
+                    'type' => 'brace_command_arg'
                   }
                 ],
                 'extra' => {
                   'name' => 'mymacro'
                 },
+                'info' => {
+                  'spaces_before_argument' => {
+                    'text' => '  '
+                  }
+                },
                 'type' => 'macro_call'
               },
               'position' => 1,
@@ -207,12 +227,22 @@ $result_trees{'form_feeds'} = {
               'element' => {
                 'args' => [
                   {
-                    'text' => 'a@{rgline'
+                    'contents' => [
+                      {
+                        'text' => 'a@{rgline'
+                      }
+                    ],
+                    'type' => 'line_arg'
                   }
                 ],
                 'extra' => {
                   'name' => 'oneargmacro'
                 },
+                'info' => {
+                  'spaces_before_argument' => {
+                    'text' => '   '
+                  }
+                },
                 'type' => 'macro_call'
               },
               'position' => 1,
diff --git a/tp/t/results/macro/glossary.pl b/tp/t/results/macro/glossary.pl
index 8973214e55..2e0a39f595 100644
--- a/tp/t/results/macro/glossary.pl
+++ b/tp/t/results/macro/glossary.pl
@@ -544,13 +544,38 @@ $result_trees{'glossary'} = {
                   'element' => {
                     'args' => [
                       {
-                        'text' => 'id1'
+                        'contents' => [
+                          {
+                            'text' => 'id1'
+                          }
+                        ],
+                        'type' => 'brace_command_arg'
                       },
                       {
-                        'text' => 'name1'
+                        'contents' => [
+                          {
+                            'text' => 'name1'
+                          }
+                        ],
+                        'info' => {
+                          'spaces_before_argument' => {
+                            'text' => ' '
+                          }
+                        },
+                        'type' => 'brace_command_arg'
                       },
                       {
-                        'text' => 'text1, arg1 '
+                        'contents' => [
+                          {
+                            'text' => 'text1, arg1 '
+                          }
+                        ],
+                        'info' => {
+                          'spaces_before_argument' => {
+                            'text' => ' '
+                          }
+                        },
+                        'type' => 'brace_command_arg'
                       }
                     ],
                     'extra' => {
@@ -712,7 +737,12 @@ $result_trees{'glossary'} = {
                   'element' => {
                     'args' => [
                       {
-                        'text' => '@glossarytext{}'
+                        'contents' => [
+                          {
+                            'text' => '@glossarytext{}'
+                          }
+                        ],
+                        'type' => 'brace_command_arg'
                       }
                     ],
                     'extra' => {
@@ -832,13 +862,38 @@ $result_trees{'glossary'} = {
                   'element' => {
                     'args' => [
                       {
-                        'text' => 'id2'
+                        'contents' => [
+                          {
+                            'text' => 'id2'
+                          }
+                        ],
+                        'type' => 'brace_command_arg'
                       },
                       {
-                        'text' => 'name2'
+                        'contents' => [
+                          {
+                            'text' => 'name2'
+                          }
+                        ],
+                        'info' => {
+                          'spaces_before_argument' => {
+                            'text' => ' '
+                          }
+                        },
+                        'type' => 'brace_command_arg'
                       },
                       {
-                        'text' => 'text2'
+                        'contents' => [
+                          {
+                            'text' => 'text2'
+                          }
+                        ],
+                        'info' => {
+                          'spaces_before_argument' => {
+                            'text' => ' '
+                          }
+                        },
+                        'type' => 'brace_command_arg'
                       }
                     ],
                     'extra' => {
@@ -1025,7 +1080,12 @@ $result_trees{'glossary'} = {
                   'element' => {
                     'args' => [
                       {
-                        'text' => '@glossarytext{}'
+                        'contents' => [
+                          {
+                            'text' => '@glossarytext{}'
+                          }
+                        ],
+                        'type' => 'brace_command_arg'
                       }
                     ],
                     'extra' => {
@@ -1230,11 +1290,6 @@ $result_trees{'glossary'} = {
             {
               'counter' => 5,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'glossary'
                 },
diff --git a/tp/t/results/macro/ifclear_in_macro.pl 
b/tp/t/results/macro/ifclear_in_macro.pl
index c80c7a7168..178298e679 100644
--- a/tp/t/results/macro/ifclear_in_macro.pl
+++ b/tp/t/results/macro/ifclear_in_macro.pl
@@ -87,13 +87,24 @@ $result_trees{'ifclear_in_macro'} = {
               'element' => {
                 'args' => [
                   {
-                    'text' => 'arg
+                    'contents' => [
+                      {
+                        'text' => 'arg
 '
+                      }
+                    ],
+                    'type' => 'brace_command_arg'
                   }
                 ],
                 'extra' => {
                   'name' => 'note'
                 },
+                'info' => {
+                  'spaces_before_argument' => {
+                    'text' => '
+'
+                  }
+                },
                 'type' => 'macro_call'
               },
               'position' => 1,
diff --git a/tp/t/results/macro/ifset_in_macro.pl 
b/tp/t/results/macro/ifset_in_macro.pl
index 470a066106..094564fdd1 100644
--- a/tp/t/results/macro/ifset_in_macro.pl
+++ b/tp/t/results/macro/ifset_in_macro.pl
@@ -87,13 +87,24 @@ $result_trees{'ifset_in_macro'} = {
               'element' => {
                 'args' => [
                   {
-                    'text' => 'arg
+                    'contents' => [
+                      {
+                        'text' => 'arg
 '
+                      }
+                    ],
+                    'type' => 'brace_command_arg'
                   }
                 ],
                 'extra' => {
                   'name' => 'note'
                 },
+                'info' => {
+                  'spaces_before_argument' => {
+                    'text' => '
+'
+                  }
+                },
                 'type' => 'macro_call'
               },
               'position' => 1,
diff --git a/tp/t/results/macro/ifset_in_macro_set.pl 
b/tp/t/results/macro/ifset_in_macro_set.pl
index 26ae7b4df0..8977e120cc 100644
--- a/tp/t/results/macro/ifset_in_macro_set.pl
+++ b/tp/t/results/macro/ifset_in_macro_set.pl
@@ -87,13 +87,24 @@ $result_trees{'ifset_in_macro_set'} = {
               'element' => {
                 'args' => [
                   {
-                    'text' => 'arg
+                    'contents' => [
+                      {
+                        'text' => 'arg
 '
+                      }
+                    ],
+                    'type' => 'brace_command_arg'
                   }
                 ],
                 'extra' => {
                   'name' => 'note'
                 },
+                'info' => {
+                  'spaces_before_argument' => {
+                    'text' => '
+'
+                  }
+                },
                 'type' => 'macro_call'
               },
               'position' => 1,
diff --git a/tp/t/results/macro/ignored_macro_definition.pl 
b/tp/t/results/macro/ignored_macro_definition.pl
index f0f24e5e30..0eef68acda 100644
--- a/tp/t/results/macro/ignored_macro_definition.pl
+++ b/tp/t/results/macro/ignored_macro_definition.pl
@@ -114,11 +114,6 @@ $result_trees{'ignored_macro_definition'} = {
             {
               'counter' => 1,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'mymacro'
                 },
diff --git a/tp/t/results/macro/implicit_quoting_one_arg.pl 
b/tp/t/results/macro/implicit_quoting_one_arg.pl
index 6ce3f1f704..1b24645e11 100644
--- a/tp/t/results/macro/implicit_quoting_one_arg.pl
+++ b/tp/t/results/macro/implicit_quoting_one_arg.pl
@@ -82,7 +82,12 @@ $result_trees{'implicit_quoting_one_arg'} = {
               'element' => {
                 'args' => [
                   {
-                    'text' => 'Many arguments, separated by commas, are 
processed here'
+                    'contents' => [
+                      {
+                        'text' => 'Many arguments, separated by commas, are 
processed here'
+                      }
+                    ],
+                    'type' => 'brace_command_arg'
                   }
                 ],
                 'extra' => {
diff --git a/tp/t/results/macro/implicit_quoting_recursion.pl 
b/tp/t/results/macro/implicit_quoting_recursion.pl
index 19bf959079..e24a48e6e6 100644
--- a/tp/t/results/macro/implicit_quoting_recursion.pl
+++ b/tp/t/results/macro/implicit_quoting_recursion.pl
@@ -81,10 +81,20 @@ $result_trees{'implicit_quoting_recursion'} = {
               'element' => {
                 'args' => [
                   {
-                    'text' => '@cat{@cat{@cat{@cat{@cat{na, to}, po}, co}, 
tu}, oto}'
+                    'contents' => [
+                      {
+                        'text' => '@cat{@cat{@cat{@cat{@cat{na, to}, po}, co}, 
tu}, oto}'
+                      }
+                    ],
+                    'type' => 'brace_command_arg'
                   },
                   {
-                    'text' => 'tam'
+                    'contents' => [
+                      {
+                        'text' => 'tam'
+                      }
+                    ],
+                    'type' => 'brace_command_arg'
                   }
                 ],
                 'extra' => {
@@ -101,10 +111,25 @@ $result_trees{'implicit_quoting_recursion'} = {
               'element' => {
                 'args' => [
                   {
-                    'text' => '@cat{@cat{@cat{@cat{na, to}, po}, co}, tu}'
+                    'contents' => [
+                      {
+                        'text' => '@cat{@cat{@cat{@cat{na, to}, po}, co}, tu}'
+                      }
+                    ],
+                    'type' => 'brace_command_arg'
                   },
                   {
-                    'text' => 'oto'
+                    'contents' => [
+                      {
+                        'text' => 'oto'
+                      }
+                    ],
+                    'info' => {
+                      'spaces_before_argument' => {
+                        'text' => ' '
+                      }
+                    },
+                    'type' => 'brace_command_arg'
                   }
                 ],
                 'extra' => {
@@ -121,10 +146,25 @@ $result_trees{'implicit_quoting_recursion'} = {
               'element' => {
                 'args' => [
                   {
-                    'text' => '@cat{@cat{@cat{na, to}, po}, co}'
+                    'contents' => [
+                      {
+                        'text' => '@cat{@cat{@cat{na, to}, po}, co}'
+                      }
+                    ],
+                    'type' => 'brace_command_arg'
                   },
                   {
-                    'text' => 'tu'
+                    'contents' => [
+                      {
+                        'text' => 'tu'
+                      }
+                    ],
+                    'info' => {
+                      'spaces_before_argument' => {
+                        'text' => ' '
+                      }
+                    },
+                    'type' => 'brace_command_arg'
                   }
                 ],
                 'extra' => {
@@ -141,10 +181,25 @@ $result_trees{'implicit_quoting_recursion'} = {
               'element' => {
                 'args' => [
                   {
-                    'text' => '@cat{@cat{na, to}, po}'
+                    'contents' => [
+                      {
+                        'text' => '@cat{@cat{na, to}, po}'
+                      }
+                    ],
+                    'type' => 'brace_command_arg'
                   },
                   {
-                    'text' => 'co'
+                    'contents' => [
+                      {
+                        'text' => 'co'
+                      }
+                    ],
+                    'info' => {
+                      'spaces_before_argument' => {
+                        'text' => ' '
+                      }
+                    },
+                    'type' => 'brace_command_arg'
                   }
                 ],
                 'extra' => {
@@ -161,10 +216,25 @@ $result_trees{'implicit_quoting_recursion'} = {
               'element' => {
                 'args' => [
                   {
-                    'text' => '@cat{na, to}'
+                    'contents' => [
+                      {
+                        'text' => '@cat{na, to}'
+                      }
+                    ],
+                    'type' => 'brace_command_arg'
                   },
                   {
-                    'text' => 'po'
+                    'contents' => [
+                      {
+                        'text' => 'po'
+                      }
+                    ],
+                    'info' => {
+                      'spaces_before_argument' => {
+                        'text' => ' '
+                      }
+                    },
+                    'type' => 'brace_command_arg'
                   }
                 ],
                 'extra' => {
@@ -181,10 +251,25 @@ $result_trees{'implicit_quoting_recursion'} = {
               'element' => {
                 'args' => [
                   {
-                    'text' => 'na'
+                    'contents' => [
+                      {
+                        'text' => 'na'
+                      }
+                    ],
+                    'type' => 'brace_command_arg'
                   },
                   {
-                    'text' => 'to'
+                    'contents' => [
+                      {
+                        'text' => 'to'
+                      }
+                    ],
+                    'info' => {
+                      'spaces_before_argument' => {
+                        'text' => ' '
+                      }
+                    },
+                    'type' => 'brace_command_arg'
                   }
                 ],
                 'extra' => {
diff --git a/tp/t/results/macro/include_after_empty_line_arg.pl 
b/tp/t/results/macro/include_after_empty_line_arg.pl
index 4c201488e5..da9299490f 100644
--- a/tp/t/results/macro/include_after_empty_line_arg.pl
+++ b/tp/t/results/macro/include_after_empty_line_arg.pl
@@ -75,11 +75,6 @@ $result_trees{'include_after_empty_line_arg'} = {
             {
               'counter' => 1,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'mymacro'
                 },
diff --git a/tp/t/results/macro/leading_spaces_no_ignore.pl 
b/tp/t/results/macro/leading_spaces_no_ignore.pl
index af34ea6521..62e576b044 100644
--- a/tp/t/results/macro/leading_spaces_no_ignore.pl
+++ b/tp/t/results/macro/leading_spaces_no_ignore.pl
@@ -81,11 +81,6 @@ $result_trees{'leading_spaces_no_ignore'} = {
             {
               'counter' => 1,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'mymacro'
                 },
diff --git a/tp/t/results/macro/macro_after_paragraph.pl 
b/tp/t/results/macro/macro_after_paragraph.pl
index 8ffc5a4428..815e95f30b 100644
--- a/tp/t/results/macro/macro_after_paragraph.pl
+++ b/tp/t/results/macro/macro_after_paragraph.pl
@@ -90,11 +90,6 @@ $result_trees{'macro_after_paragraph'} = {
             {
               'counter' => 1,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'mymacro'
                 },
diff --git a/tp/t/results/macro/macro_before_specific_line_command_args.pl 
b/tp/t/results/macro/macro_before_specific_line_command_args.pl
index 8719b4a0fd..2fda65bab6 100644
--- a/tp/t/results/macro/macro_before_specific_line_command_args.pl
+++ b/tp/t/results/macro/macro_before_specific_line_command_args.pl
@@ -109,11 +109,6 @@ $result_trees{'macro_before_specific_line_command_args'} = 
{
                 {
                   'counter' => 1,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'cpfn'
                     },
diff --git a/tp/t/results/macro/macro_expands_to_empty.pl 
b/tp/t/results/macro/macro_expands_to_empty.pl
index 03a41ed43e..d1025b54ba 100644
--- a/tp/t/results/macro/macro_expands_to_empty.pl
+++ b/tp/t/results/macro/macro_expands_to_empty.pl
@@ -80,11 +80,6 @@ $result_trees{'macro_expands_to_empty'} = {
             {
               'counter' => 1,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'foo'
                 },
@@ -103,7 +98,12 @@ $result_trees{'macro_expands_to_empty'} = {
               'element' => {
                 'args' => [
                   {
-                    'text' => 'aa'
+                    'contents' => [
+                      {
+                        'text' => 'aa'
+                      }
+                    ],
+                    'type' => 'brace_command_arg'
                   }
                 ],
                 'extra' => {
diff --git a/tp/t/results/macro/macro_expansion.pl 
b/tp/t/results/macro/macro_expansion.pl
index 1d0d825db6..c74ad00d2b 100644
--- a/tp/t/results/macro/macro_expansion.pl
+++ b/tp/t/results/macro/macro_expansion.pl
@@ -108,10 +108,25 @@ $result_trees{'macro_expansion'} = {
                   'element' => {
                     'args' => [
                       {
-                        'text' => 'first arg'
+                        'contents' => [
+                          {
+                            'text' => 'first arg'
+                          }
+                        ],
+                        'type' => 'brace_command_arg'
                       },
                       {
-                        'text' => 'second arg'
+                        'contents' => [
+                          {
+                            'text' => 'second arg'
+                          }
+                        ],
+                        'info' => {
+                          'spaces_before_argument' => {
+                            'text' => ' '
+                          }
+                        },
+                        'type' => 'brace_command_arg'
                       }
                     ],
                     'extra' => {
@@ -210,7 +225,12 @@ $result_trees{'macro_expansion'} = {
                   'element' => {
                     'args' => [
                       {
-                        'text' => 'aaa @samp{a macro , } bbb'
+                        'contents' => [
+                          {
+                            'text' => 'aaa @samp{a macro , } bbb'
+                          }
+                        ],
+                        'type' => 'brace_command_arg'
                       }
                     ],
                     'extra' => {
@@ -424,10 +444,25 @@ $result_trees{'macro_expansion'} = {
                   'element' => {
                     'args' => [
                       {
-                        'text' => 'first arg'
+                        'contents' => [
+                          {
+                            'text' => 'first arg'
+                          }
+                        ],
+                        'type' => 'brace_command_arg'
                       },
                       {
-                        'text' => '@macroone{nested second arg}'
+                        'contents' => [
+                          {
+                            'text' => '@macroone{nested second arg}'
+                          }
+                        ],
+                        'info' => {
+                          'spaces_before_argument' => {
+                            'text' => ' '
+                          }
+                        },
+                        'type' => 'brace_command_arg'
                       }
                     ],
                     'extra' => {
@@ -526,10 +561,25 @@ $result_trees{'macro_expansion'} = {
                   'element' => {
                     'args' => [
                       {
-                        'text' => 'first , arg'
+                        'contents' => [
+                          {
+                            'text' => 'first , arg'
+                          }
+                        ],
+                        'type' => 'brace_command_arg'
                       },
                       {
-                        'text' => '{} \\ '
+                        'contents' => [
+                          {
+                            'text' => '{} \\ '
+                          }
+                        ],
+                        'info' => {
+                          'spaces_before_argument' => {
+                            'text' => ' '
+                          }
+                        },
+                        'type' => 'brace_command_arg'
                       }
                     ],
                     'extra' => {
@@ -628,14 +678,29 @@ $result_trees{'macro_expansion'} = {
                   'element' => {
                     'args' => [
                       {
-                        'text' => 'arg 1
+                        'contents' => [
+                          {
+                            'text' => 'arg 1
 
 now'
+                          }
+                        ],
+                        'type' => 'brace_command_arg'
                       },
                       {
-                        'text' => 'arg3
+                        'contents' => [
+                          {
+                            'text' => 'arg3
 
 '
+                          }
+                        ],
+                        'info' => {
+                          'spaces_before_argument' => {
+                            'text' => ' '
+                          }
+                        },
+                        'type' => 'brace_command_arg'
                       }
                     ],
                     'extra' => {
diff --git a/tp/t/results/macro/macro_for_dot_in_menu_not_separator.pl 
b/tp/t/results/macro/macro_for_dot_in_menu_not_separator.pl
index 8fae9ffb15..c4b693d8f4 100644
--- a/tp/t/results/macro/macro_for_dot_in_menu_not_separator.pl
+++ b/tp/t/results/macro/macro_for_dot_in_menu_not_separator.pl
@@ -110,11 +110,6 @@ $result_trees{'macro_for_dot_in_menu_not_separator'} = {
                         {
                           'counter' => 1,
                           'element' => {
-                            'args' => [
-                              {
-                                'text' => ''
-                              }
-                            ],
                             'extra' => {
                               'name' => 'macrodot'
                             },
@@ -133,11 +128,6 @@ $result_trees{'macro_for_dot_in_menu_not_separator'} = {
                         {
                           'counter' => 2,
                           'element' => {
-                            'args' => [
-                              {
-                                'text' => ''
-                              }
-                            ],
                             'extra' => {
                               'name' => 'macrodot'
                             },
diff --git a/tp/t/results/macro/macro_for_end.pl 
b/tp/t/results/macro/macro_for_end.pl
index 0cdb2372a8..0b5f97fefe 100644
--- a/tp/t/results/macro/macro_for_end.pl
+++ b/tp/t/results/macro/macro_for_end.pl
@@ -90,11 +90,6 @@ $result_trees{'macro_for_end'} = {
                 {
                   'counter' => 1,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'myend'
                     },
diff --git a/tp/t/results/macro/macro_for_ignored_line_command.pl 
b/tp/t/results/macro/macro_for_ignored_line_command.pl
index 208b078d00..77123e447f 100644
--- a/tp/t/results/macro/macro_for_ignored_line_command.pl
+++ b/tp/t/results/macro/macro_for_ignored_line_command.pl
@@ -71,11 +71,6 @@ $result_trees{'macro_for_ignored_line_command'} = {
             {
               'counter' => 1,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'pagemacro'
                 },
diff --git a/tp/t/results/macro/macro_in_accent.pl 
b/tp/t/results/macro/macro_in_accent.pl
index 25fdd20275..1747cdf46c 100644
--- a/tp/t/results/macro/macro_in_accent.pl
+++ b/tp/t/results/macro/macro_in_accent.pl
@@ -147,11 +147,6 @@ $result_trees{'macro_in_accent'} = {
                     {
                       'counter' => 1,
                       'element' => {
-                        'args' => [
-                          {
-                            'text' => ''
-                          }
-                        ],
                         'extra' => {
                           'name' => 'aletter'
                         },
@@ -197,11 +192,6 @@ $result_trees{'macro_in_accent'} = {
                     {
                       'counter' => 2,
                       'element' => {
-                        'args' => [
-                          {
-                            'text' => ''
-                          }
-                        ],
                         'extra' => {
                           'name' => 'aletter'
                         },
@@ -244,11 +234,6 @@ $result_trees{'macro_in_accent'} = {
                     {
                       'counter' => 3,
                       'element' => {
-                        'args' => [
-                          {
-                            'text' => ''
-                          }
-                        ],
                         'extra' => {
                           'name' => 'aletter'
                         },
@@ -288,11 +273,6 @@ $result_trees{'macro_in_accent'} = {
                         {
                           'counter' => 4,
                           'element' => {
-                            'args' => [
-                              {
-                                'text' => ''
-                              }
-                            ],
                             'extra' => {
                               'name' => 'aletter'
                             },
@@ -347,11 +327,6 @@ $result_trees{'macro_in_accent'} = {
                     {
                       'counter' => 5,
                       'element' => {
-                        'args' => [
-                          {
-                            'text' => ''
-                          }
-                        ],
                         'extra' => {
                           'name' => 'aspace'
                         },
@@ -368,11 +343,6 @@ $result_trees{'macro_in_accent'} = {
                     {
                       'counter' => 6,
                       'element' => {
-                        'args' => [
-                          {
-                            'text' => ''
-                          }
-                        ],
                         'extra' => {
                           'name' => 'aletter'
                         },
diff --git a/tp/t/results/macro/macro_in_brace_command.pl 
b/tp/t/results/macro/macro_in_brace_command.pl
index a4f7437786..2a8dd5324b 100644
--- a/tp/t/results/macro/macro_in_brace_command.pl
+++ b/tp/t/results/macro/macro_in_brace_command.pl
@@ -176,11 +176,6 @@ $result_trees{'macro_in_brace_command'} = {
                                 {
                                   'counter' => 1,
                                   'element' => {
-                                    'args' => [
-                                      {
-                                        'text' => ''
-                                      }
-                                    ],
                                     'extra' => {
                                       'name' => 'foo'
                                     },
@@ -209,11 +204,6 @@ $result_trees{'macro_in_brace_command'} = {
                                 {
                                   'counter' => 2,
                                   'element' => {
-                                    'args' => [
-                                      {
-                                        'text' => ''
-                                      }
-                                    ],
                                     'extra' => {
                                       'name' => 'abar'
                                     },
diff --git a/tp/t/results/macro/macro_in_def_delimiters.pl 
b/tp/t/results/macro/macro_in_def_delimiters.pl
index 452d6e7c3a..7f4c584a9f 100644
--- a/tp/t/results/macro/macro_in_def_delimiters.pl
+++ b/tp/t/results/macro/macro_in_def_delimiters.pl
@@ -125,11 +125,6 @@ $result_trees{'macro_in_def_delimiters'} = {
                         {
                           'counter' => 1,
                           'element' => {
-                            'args' => [
-                              {
-                                'text' => ''
-                              }
-                            ],
                             'extra' => {
                               'name' => 'string'
                             },
@@ -211,11 +206,6 @@ $result_trees{'macro_in_def_delimiters'} = {
                         {
                           'counter' => 2,
                           'element' => {
-                            'args' => [
-                              {
-                                'text' => ''
-                              }
-                            ],
                             'extra' => {
                               'name' => 'string'
                             },
@@ -291,11 +281,6 @@ $result_trees{'macro_in_def_delimiters'} = {
                         {
                           'counter' => 3,
                           'element' => {
-                            'args' => [
-                              {
-                                'text' => ''
-                              }
-                            ],
                             'extra' => {
                               'name' => 'string'
                             },
@@ -357,11 +342,6 @@ $result_trees{'macro_in_def_delimiters'} = {
                         {
                           'counter' => 4,
                           'element' => {
-                            'args' => [
-                              {
-                                'text' => ''
-                              }
-                            ],
                             'extra' => {
                               'name' => 'string'
                             },
diff --git a/tp/t/results/macro/macro_in_empty_menu_comment.pl 
b/tp/t/results/macro/macro_in_empty_menu_comment.pl
index 6da785ccd3..89fcc800f0 100644
--- a/tp/t/results/macro/macro_in_empty_menu_comment.pl
+++ b/tp/t/results/macro/macro_in_empty_menu_comment.pl
@@ -90,11 +90,6 @@ $result_trees{'macro_in_empty_menu_comment'} = {
                 {
                   'counter' => 1,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'emptystring'
                     },
diff --git a/tp/t/results/macro/macro_in_empty_multitable_empty_before_item.pl 
b/tp/t/results/macro/macro_in_empty_multitable_empty_before_item.pl
index c451e565df..da80d739f2 100644
--- a/tp/t/results/macro/macro_in_empty_multitable_empty_before_item.pl
+++ b/tp/t/results/macro/macro_in_empty_multitable_empty_before_item.pl
@@ -117,11 +117,6 @@ 
$result_trees{'macro_in_empty_multitable_empty_before_item'} = {
                 {
                   'counter' => 1,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'emptymacro'
                     },
diff --git a/tp/t/results/macro/macro_in_empty_table_empty_before_item.pl 
b/tp/t/results/macro/macro_in_empty_table_empty_before_item.pl
index e36397d38a..f2c1938250 100644
--- a/tp/t/results/macro/macro_in_empty_table_empty_before_item.pl
+++ b/tp/t/results/macro/macro_in_empty_table_empty_before_item.pl
@@ -96,11 +96,6 @@ $result_trees{'macro_in_empty_table_empty_before_item'} = {
                 {
                   'counter' => 1,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'emptymacro'
                     },
diff --git a/tp/t/results/macro/macro_in_empty_text.pl 
b/tp/t/results/macro/macro_in_empty_text.pl
index a1440f24e2..7b6a92ff2b 100644
--- a/tp/t/results/macro/macro_in_empty_text.pl
+++ b/tp/t/results/macro/macro_in_empty_text.pl
@@ -90,11 +90,6 @@ $result_trees{'macro_in_empty_text'} = {
                 {
                   'counter' => 1,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'emptystring'
                     },
diff --git a/tp/t/results/macro/macro_in_end_argument.pl 
b/tp/t/results/macro/macro_in_end_argument.pl
index 754cc977f7..72b4b92f90 100644
--- a/tp/t/results/macro/macro_in_end_argument.pl
+++ b/tp/t/results/macro/macro_in_end_argument.pl
@@ -120,11 +120,6 @@ $result_trees{'macro_in_end_argument'} = {
                     {
                       'counter' => 1,
                       'element' => {
-                        'args' => [
-                          {
-                            'text' => ''
-                          }
-                        ],
                         'extra' => {
                           'name' => 'acartouche'
                         },
diff --git a/tp/t/results/macro/macro_in_index_commands.pl 
b/tp/t/results/macro/macro_in_index_commands.pl
index 14c26402e0..4f3fd25d6c 100644
--- a/tp/t/results/macro/macro_in_index_commands.pl
+++ b/tp/t/results/macro/macro_in_index_commands.pl
@@ -200,11 +200,6 @@ $result_trees{'macro_in_index_commands'} = {
                     {
                       'counter' => 2,
                       'element' => {
-                        'args' => [
-                          {
-                            'text' => ''
-                          }
-                        ],
                         'extra' => {
                           'name' => 'fn'
                         },
@@ -246,11 +241,6 @@ $result_trees{'macro_in_index_commands'} = {
                 {
                   'counter' => 1,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'cp'
                     },
@@ -273,11 +263,6 @@ $result_trees{'macro_in_index_commands'} = {
             {
               'counter' => 3,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'syncodeindexcommand'
                 },
@@ -440,11 +425,6 @@ $result_trees{'macro_in_index_commands'} = {
                     {
                       'counter' => 4,
                       'element' => {
-                        'args' => [
-                          {
-                            'text' => ''
-                          }
-                        ],
                         'extra' => {
                           'name' => 'truc'
                         },
@@ -637,11 +617,6 @@ $result_trees{'macro_in_index_commands'} = {
                 {
                   'counter' => 5,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'codeidx'
                     },
@@ -755,11 +730,6 @@ $result_trees{'macro_in_index_commands'} = {
             {
               'counter' => 6,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'trucindexcommand'
                 },
@@ -950,11 +920,6 @@ $result_trees{'macro_in_index_commands'} = {
                 {
                   'counter' => 7,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'defcodeindexentry'
                     },
@@ -1026,11 +991,6 @@ $result_trees{'macro_in_index_commands'} = {
                 {
                   'counter' => 8,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'truc'
                     },
@@ -1060,11 +1020,6 @@ $result_trees{'macro_in_index_commands'} = {
                     {
                       'counter' => 9,
                       'element' => {
-                        'args' => [
-                          {
-                            'text' => ''
-                          }
-                        ],
                         'extra' => {
                           'name' => 'codeidx'
                         },
@@ -1171,11 +1126,6 @@ $result_trees{'macro_in_index_commands'} = {
                 {
                   'counter' => 10,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'truc'
                     },
@@ -1246,11 +1196,6 @@ $result_trees{'macro_in_index_commands'} = {
                 {
                   'counter' => 11,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'cp'
                     },
diff --git a/tp/t/results/macro/macro_in_invalid_documentencoding.pl 
b/tp/t/results/macro/macro_in_invalid_documentencoding.pl
index 862d573e75..09f0431f45 100644
--- a/tp/t/results/macro/macro_in_invalid_documentencoding.pl
+++ b/tp/t/results/macro/macro_in_invalid_documentencoding.pl
@@ -101,11 +101,6 @@ $result_trees{'macro_in_invalid_documentencoding'} = {
                 {
                   'counter' => 1,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'badmacro'
                     },
diff --git a/tp/t/results/macro/macro_in_macro_arg.pl 
b/tp/t/results/macro/macro_in_macro_arg.pl
index f2258dd35e..dc93137f1b 100644
--- a/tp/t/results/macro/macro_in_macro_arg.pl
+++ b/tp/t/results/macro/macro_in_macro_arg.pl
@@ -219,7 +219,12 @@ $result_trees{'macro_in_macro_arg'} = {
               'element' => {
                 'args' => [
                   {
-                    'text' => '@macroone{}text for macro2'
+                    'contents' => [
+                      {
+                        'text' => '@macroone{}text for macro2'
+                      }
+                    ],
+                    'type' => 'brace_command_arg'
                   }
                 ],
                 'extra' => {
@@ -234,11 +239,6 @@ $result_trees{'macro_in_macro_arg'} = {
             {
               'counter' => 2,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'macroone'
                 },
@@ -262,7 +262,19 @@ $result_trees{'macro_in_macro_arg'} = {
                   'element' => {
                     'args' => [
                       {
-                        'text' => 'text for macro2'
+                        'contents' => [
+                          {
+                            'source_marks' => [
+                              {
+                                'counter' => 2,
+                                'sourcemark_type' => 'macro_expansion',
+                                'status' => 'end'
+                              }
+                            ],
+                            'text' => 'text for macro2'
+                          }
+                        ],
+                        'type' => 'line_arg'
                       }
                     ],
                     'extra' => {
diff --git a/tp/t/results/macro/macro_in_macro_arg_simpler.pl 
b/tp/t/results/macro/macro_in_macro_arg_simpler.pl
index c1b0b39c75..e00fa6b08a 100644
--- a/tp/t/results/macro/macro_in_macro_arg_simpler.pl
+++ b/tp/t/results/macro/macro_in_macro_arg_simpler.pl
@@ -148,7 +148,12 @@ $result_trees{'macro_in_macro_arg_simpler'} = {
               'element' => {
                 'args' => [
                   {
-                    'text' => '@macrooneone{}text for macro2'
+                    'contents' => [
+                      {
+                        'text' => '@macrooneone{}text for macro2'
+                      }
+                    ],
+                    'type' => 'brace_command_arg'
                   }
                 ],
                 'extra' => {
@@ -163,11 +168,6 @@ $result_trees{'macro_in_macro_arg_simpler'} = {
             {
               'counter' => 2,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'macrooneone'
                 },
diff --git a/tp/t/results/macro/macro_in_menu.pl 
b/tp/t/results/macro/macro_in_menu.pl
index 8d15077650..5301dfb0ec 100644
--- a/tp/t/results/macro/macro_in_menu.pl
+++ b/tp/t/results/macro/macro_in_menu.pl
@@ -405,11 +405,6 @@ $result_trees{'macro_in_menu'} = {
                 {
                   'counter' => 1,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'starspaces'
                     },
@@ -438,11 +433,6 @@ $result_trees{'macro_in_menu'} = {
                         {
                           'counter' => 2,
                           'element' => {
-                            'args' => [
-                              {
-                                'text' => ''
-                              }
-                            ],
                             'extra' => {
                               'name' => 'twocolon'
                             },
@@ -509,11 +499,6 @@ $result_trees{'macro_in_menu'} = {
                         {
                           'counter' => 3,
                           'element' => {
-                            'args' => [
-                              {
-                                'text' => ''
-                              }
-                            ],
                             'extra' => {
                               'name' => 'spaces'
                             },
@@ -538,11 +523,6 @@ $result_trees{'macro_in_menu'} = {
                         {
                           'counter' => 4,
                           'element' => {
-                            'args' => [
-                              {
-                                'text' => ''
-                              }
-                            ],
                             'extra' => {
                               'name' => 'astar'
                             },
@@ -597,11 +577,6 @@ $result_trees{'macro_in_menu'} = {
                             {
                               'counter' => 5,
                               'element' => {
-                                'args' => [
-                                  {
-                                    'text' => ''
-                                  }
-                                ],
                                 'extra' => {
                                   'name' => 'astar'
                                 },
@@ -650,11 +625,6 @@ $result_trees{'macro_in_menu'} = {
                     {
                       'counter' => 6,
                       'element' => {
-                        'args' => [
-                          {
-                            'text' => ''
-                          }
-                        ],
                         'extra' => {
                           'name' => 'aspace'
                         },
@@ -730,11 +700,6 @@ $result_trees{'macro_in_menu'} = {
                         {
                           'counter' => 7,
                           'element' => {
-                            'args' => [
-                              {
-                                'text' => ''
-                              }
-                            ],
                             'extra' => {
                               'name' => 'acolon'
                             },
@@ -761,11 +726,6 @@ $result_trees{'macro_in_menu'} = {
                     {
                       'counter' => 8,
                       'element' => {
-                        'args' => [
-                          {
-                            'text' => ''
-                          }
-                        ],
                         'extra' => {
                           'name' => 'acolon'
                         },
@@ -784,11 +744,6 @@ $result_trees{'macro_in_menu'} = {
                     {
                       'counter' => 9,
                       'element' => {
-                        'args' => [
-                          {
-                            'text' => ''
-                          }
-                        ],
                         'extra' => {
                           'name' => 'aspace'
                         },
@@ -869,11 +824,6 @@ $result_trees{'macro_in_menu'} = {
                     {
                       'counter' => 10,
                       'element' => {
-                        'args' => [
-                          {
-                            'text' => ''
-                          }
-                        ],
                         'extra' => {
                           'name' => 'aspace'
                         },
diff --git a/tp/t/results/macro/macro_in_menu_comment_closed_by_detailmenu.pl 
b/tp/t/results/macro/macro_in_menu_comment_closed_by_detailmenu.pl
index 68babd6824..5e4404313c 100644
--- a/tp/t/results/macro/macro_in_menu_comment_closed_by_detailmenu.pl
+++ b/tp/t/results/macro/macro_in_menu_comment_closed_by_detailmenu.pl
@@ -90,11 +90,6 @@ $result_trees{'macro_in_menu_comment_closed_by_detailmenu'} 
= {
                 {
                   'counter' => 1,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'emptystring'
                     },
diff --git a/tp/t/results/macro/macro_in_menu_comment_like_entry.pl 
b/tp/t/results/macro/macro_in_menu_comment_like_entry.pl
index 9f8e98fbeb..f3944f2ee0 100644
--- a/tp/t/results/macro/macro_in_menu_comment_like_entry.pl
+++ b/tp/t/results/macro/macro_in_menu_comment_like_entry.pl
@@ -99,11 +99,6 @@ $result_trees{'macro_in_menu_comment_like_entry'} = {
                         {
                           'counter' => 1,
                           'element' => {
-                            'args' => [
-                              {
-                                'text' => ''
-                              }
-                            ],
                             'extra' => {
                               'name' => 'emptystring'
                             },
@@ -122,11 +117,6 @@ $result_trees{'macro_in_menu_comment_like_entry'} = {
                         {
                           'counter' => 2,
                           'element' => {
-                            'args' => [
-                              {
-                                'text' => ''
-                              }
-                            ],
                             'extra' => {
                               'name' => 'emptystring'
                             },
@@ -154,11 +144,6 @@ $result_trees{'macro_in_menu_comment_like_entry'} = {
                                 {
                                   'counter' => 3,
                                   'element' => {
-                                    'args' => [
-                                      {
-                                        'text' => ''
-                                      }
-                                    ],
                                     'extra' => {
                                       'name' => 'emptystring'
                                     },
@@ -191,11 +176,6 @@ $result_trees{'macro_in_menu_comment_like_entry'} = {
                         {
                           'counter' => 4,
                           'element' => {
-                            'args' => [
-                              {
-                                'text' => ''
-                              }
-                            ],
                             'extra' => {
                               'name' => 'emptystring'
                             },
diff --git a/tp/t/results/macro/macro_in_menu_description.pl 
b/tp/t/results/macro/macro_in_menu_description.pl
index cadf3dc21f..9f5e246d07 100644
--- a/tp/t/results/macro/macro_in_menu_description.pl
+++ b/tp/t/results/macro/macro_in_menu_description.pl
@@ -142,11 +142,6 @@ $result_trees{'macro_in_menu_description'} = {
                         {
                           'counter' => 1,
                           'element' => {
-                            'args' => [
-                              {
-                                'text' => ''
-                              }
-                            ],
                             'extra' => {
                               'name' => 'emptystring'
                             },
diff --git a/tp/t/results/macro/macro_in_misc_commands.pl 
b/tp/t/results/macro/macro_in_misc_commands.pl
index 3ab0009bff..08fc562f7e 100644
--- a/tp/t/results/macro/macro_in_misc_commands.pl
+++ b/tp/t/results/macro/macro_in_misc_commands.pl
@@ -182,11 +182,6 @@ $result_trees{'macro_in_misc_commands'} = {
             {
               'counter' => 1,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'Top'
                 },
@@ -215,11 +210,6 @@ $result_trees{'macro_in_misc_commands'} = {
                 {
                   'counter' => 2,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'text'
                     },
@@ -259,11 +249,6 @@ $result_trees{'macro_in_misc_commands'} = {
                     {
                       'counter' => 3,
                       'element' => {
-                        'args' => [
-                          {
-                            'text' => ''
-                          }
-                        ],
                         'extra' => {
                           'name' => 'text'
                         },
@@ -513,11 +498,6 @@ $result_trees{'macro_in_misc_commands'} = {
                     {
                       'counter' => 4,
                       'element' => {
-                        'args' => [
-                          {
-                            'text' => ''
-                          }
-                        ],
                         'extra' => {
                           'name' => 'en'
                         },
@@ -552,11 +532,6 @@ $result_trees{'macro_in_misc_commands'} = {
                 {
                   'counter' => 5,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'documentlanguagecommand'
                     },
@@ -777,11 +752,6 @@ $result_trees{'macro_in_misc_commands'} = {
                 {
                   'counter' => 6,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'pagesizesarg'
                     },
@@ -804,11 +774,6 @@ $result_trees{'macro_in_misc_commands'} = {
             {
               'counter' => 7,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'afourpapermacro'
                 },
@@ -848,11 +813,6 @@ $result_trees{'macro_in_misc_commands'} = {
                     {
                       'counter' => 8,
                       'element' => {
-                        'args' => [
-                          {
-                            'text' => ''
-                          }
-                        ],
                         'extra' => {
                           'name' => 'text'
                         },
@@ -902,11 +862,6 @@ $result_trees{'macro_in_misc_commands'} = {
                     {
                       'counter' => 9,
                       'element' => {
-                        'args' => [
-                          {
-                            'text' => ''
-                          }
-                        ],
                         'extra' => {
                           'name' => 'text'
                         },
@@ -956,11 +911,6 @@ $result_trees{'macro_in_misc_commands'} = {
                     {
                       'counter' => 10,
                       'element' => {
-                        'args' => [
-                          {
-                            'text' => ''
-                          }
-                        ],
                         'extra' => {
                           'name' => 'text'
                         },
@@ -1105,11 +1055,6 @@ $result_trees{'macro_in_misc_commands'} = {
                 {
                   'counter' => 11,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'needarg'
                     },
@@ -1194,11 +1139,6 @@ $result_trees{'macro_in_misc_commands'} = {
             {
               'counter' => 12,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'raisesectionsmacro'
                 },
@@ -1284,11 +1224,6 @@ $result_trees{'macro_in_misc_commands'} = {
             {
               'counter' => 13,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'lowersectionsmacro'
                 },
@@ -1504,11 +1439,6 @@ $result_trees{'macro_in_misc_commands'} = {
                 {
                   'counter' => 14,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'definfoenclosename'
                     },
@@ -1689,11 +1619,6 @@ $result_trees{'macro_in_misc_commands'} = {
             {
               'counter' => 15,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'strongmacro'
                 },
@@ -1767,11 +1692,6 @@ $result_trees{'macro_in_misc_commands'} = {
                     {
                       'counter' => 17,
                       'element' => {
-                        'args' => [
-                          {
-                            'text' => ''
-                          }
-                        ],
                         'extra' => {
                           'name' => 'strongname'
                         },
@@ -1814,11 +1734,6 @@ $result_trees{'macro_in_misc_commands'} = {
                 {
                   'counter' => 16,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'strongname'
                     },
@@ -1843,11 +1758,6 @@ $result_trees{'macro_in_misc_commands'} = {
             {
               'counter' => 18,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'strongmacro'
                 },
@@ -2037,11 +1947,6 @@ $result_trees{'macro_in_misc_commands'} = {
                 {
                   'counter' => 19,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'kbdinputstylearg'
                     },
@@ -2516,11 +2421,6 @@ $result_trees{'macro_in_misc_commands'} = {
                 {
                   'counter' => 20,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'asisarg'
                     },
@@ -2577,11 +2477,6 @@ $result_trees{'macro_in_misc_commands'} = {
                 {
                   'counter' => 21,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'zero'
                     },
@@ -2638,11 +2533,6 @@ $result_trees{'macro_in_misc_commands'} = {
                 {
                   'counter' => 22,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'nonearg'
                     },
@@ -2699,11 +2589,6 @@ $result_trees{'macro_in_misc_commands'} = {
                 {
                   'counter' => 23,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'four'
                     },
@@ -2760,11 +2645,6 @@ $result_trees{'macro_in_misc_commands'} = {
                 {
                   'counter' => 24,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'nonearg'
                     },
@@ -2821,11 +2701,6 @@ $result_trees{'macro_in_misc_commands'} = {
                 {
                   'counter' => 25,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'six'
                     },
@@ -3001,11 +2876,6 @@ $result_trees{'macro_in_misc_commands'} = {
                 {
                   'counter' => 26,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'endarg'
                     },
@@ -3062,11 +2932,6 @@ $result_trees{'macro_in_misc_commands'} = {
                 {
                   'counter' => 27,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'separatearg'
                     },
@@ -3242,11 +3107,6 @@ $result_trees{'macro_in_misc_commands'} = {
                 {
                   'counter' => 28,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'onarg'
                     },
@@ -3303,11 +3163,6 @@ $result_trees{'macro_in_misc_commands'} = {
                 {
                   'counter' => 29,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'offarg'
                     },
@@ -3442,11 +3297,6 @@ $result_trees{'macro_in_misc_commands'} = {
                 {
                   'counter' => 30,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'ten'
                     },
@@ -3633,11 +3483,6 @@ $result_trees{'macro_in_misc_commands'} = {
                 {
                   'counter' => 31,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'falsearg'
                     },
@@ -3699,11 +3544,6 @@ $result_trees{'macro_in_misc_commands'} = {
                 {
                   'counter' => 32,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'truearg'
                     },
@@ -3914,11 +3754,6 @@ $result_trees{'macro_in_misc_commands'} = {
                 {
                   'counter' => 33,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'pagemacro'
                     },
@@ -3961,11 +3796,6 @@ $result_trees{'macro_in_misc_commands'} = {
                 {
                   'counter' => 34,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'noindentmacro'
                     },
@@ -4005,11 +3835,6 @@ $result_trees{'macro_in_misc_commands'} = {
                 {
                   'counter' => 35,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'refillmacro'
                     },
@@ -4044,11 +3869,6 @@ $result_trees{'macro_in_misc_commands'} = {
             {
               'counter' => 36,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'noindentmacro'
                 },
@@ -4089,11 +3909,6 @@ $result_trees{'macro_in_misc_commands'} = {
                 {
                   'counter' => 37,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'noindentmacro'
                     },
@@ -4136,11 +3951,6 @@ $result_trees{'macro_in_misc_commands'} = {
                 {
                   'counter' => 38,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'noindentmacro'
                     },
@@ -4177,11 +3987,6 @@ $result_trees{'macro_in_misc_commands'} = {
                 {
                   'counter' => 39,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'pagemacro'
                     },
@@ -4221,11 +4026,6 @@ $result_trees{'macro_in_misc_commands'} = {
             {
               'counter' => 40,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'pagemacro'
                 },
@@ -4275,11 +4075,6 @@ $result_trees{'macro_in_misc_commands'} = {
                 {
                   'counter' => 41,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'pagemacro'
                     },
@@ -4325,11 +4120,6 @@ $result_trees{'macro_in_misc_commands'} = {
                 {
                   'counter' => 42,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'noindentmacro'
                     },
@@ -4369,11 +4159,6 @@ $result_trees{'macro_in_misc_commands'} = {
                 {
                   'counter' => 43,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'refillmacro'
                     },
@@ -4468,11 +4253,6 @@ $result_trees{'macro_in_misc_commands'} = {
             {
               'counter' => 44,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'contentsmacro'
                 },
@@ -4589,11 +4369,6 @@ $result_trees{'macro_in_misc_commands'} = {
             {
               'counter' => 45,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'exdentmacro'
                 },
@@ -4739,11 +4514,6 @@ $result_trees{'macro_in_misc_commands'} = {
                 {
                   'counter' => 46,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'two'
                     },
@@ -4885,11 +4655,6 @@ $result_trees{'macro_in_misc_commands'} = {
                         {
                           'counter' => 47,
                           'element' => {
-                            'args' => [
-                              {
-                                'text' => ''
-                              }
-                            ],
                             'extra' => {
                               'name' => 'text'
                             },
@@ -5011,11 +4776,6 @@ $result_trees{'macro_in_misc_commands'} = {
                 {
                   'counter' => 48,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'text'
                     },
@@ -5094,11 +4854,6 @@ $result_trees{'macro_in_misc_commands'} = {
             {
               'counter' => 49,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'contentsmacro'
                 },
@@ -5199,11 +4954,6 @@ $result_trees{'macro_in_misc_commands'} = {
             {
               'counter' => 50,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'shortcontentsmacro'
                 },
@@ -5301,11 +5051,6 @@ $result_trees{'macro_in_misc_commands'} = {
             {
               'counter' => 51,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'byemacro'
                 },
diff --git a/tp/t/results/macro/macro_in_multitable_empty_before_item.pl 
b/tp/t/results/macro/macro_in_multitable_empty_before_item.pl
index 968292337b..b88e3e2d34 100644
--- a/tp/t/results/macro/macro_in_multitable_empty_before_item.pl
+++ b/tp/t/results/macro/macro_in_multitable_empty_before_item.pl
@@ -119,11 +119,6 @@ $result_trees{'macro_in_multitable_empty_before_item'} = {
                     {
                       'counter' => 1,
                       'element' => {
-                        'args' => [
-                          {
-                            'text' => ''
-                          }
-                        ],
                         'extra' => {
                           'name' => 'emptymacro'
                         },
diff --git a/tp/t/results/macro/macro_in_table_empty_before_item.pl 
b/tp/t/results/macro/macro_in_table_empty_before_item.pl
index d52f272ccb..3328ce117c 100644
--- a/tp/t/results/macro/macro_in_table_empty_before_item.pl
+++ b/tp/t/results/macro/macro_in_table_empty_before_item.pl
@@ -98,11 +98,6 @@ $result_trees{'macro_in_table_empty_before_item'} = {
                     {
                       'counter' => 1,
                       'element' => {
-                        'args' => [
-                          {
-                            'text' => ''
-                          }
-                        ],
                         'extra' => {
                           'name' => 'emptymacro'
                         },
diff --git a/tp/t/results/macro/macro_name_with_digit.pl 
b/tp/t/results/macro/macro_name_with_digit.pl
index ceff6b0b28..52a07fa099 100644
--- a/tp/t/results/macro/macro_name_with_digit.pl
+++ b/tp/t/results/macro/macro_name_with_digit.pl
@@ -139,12 +139,22 @@ $result_trees{'macro_name_with_digit'} = {
               'element' => {
                 'args' => [
                   {
-                    'text' => 'some thing @macro1{}'
+                    'contents' => [
+                      {
+                        'text' => 'some thing @macro1{}'
+                      }
+                    ],
+                    'type' => 'line_arg'
                   }
                 ],
                 'extra' => {
                   'name' => 'macro11'
                 },
+                'info' => {
+                  'spaces_before_argument' => {
+                    'text' => ' '
+                  }
+                },
                 'type' => 'macro_call'
               },
               'position' => 1,
@@ -163,11 +173,6 @@ $result_trees{'macro_name_with_digit'} = {
                 {
                   'counter' => 2,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'macro1'
                     },
diff --git a/tp/t/results/macro/macro_name_with_hyphen.pl 
b/tp/t/results/macro/macro_name_with_hyphen.pl
index f1a40f6b9a..898a4c1249 100644
--- a/tp/t/results/macro/macro_name_with_hyphen.pl
+++ b/tp/t/results/macro/macro_name_with_hyphen.pl
@@ -81,10 +81,25 @@ $result_trees{'macro_name_with_hyphen'} = {
               'element' => {
                 'args' => [
                   {
-                    'text' => 'blah'
+                    'contents' => [
+                      {
+                        'text' => 'blah'
+                      }
+                    ],
+                    'type' => 'brace_command_arg'
                   },
                   {
-                    'text' => '@code{bli-bli}'
+                    'contents' => [
+                      {
+                        'text' => '@code{bli-bli}'
+                      }
+                    ],
+                    'info' => {
+                      'spaces_before_argument' => {
+                        'text' => ' '
+                      }
+                    },
+                    'type' => 'brace_command_arg'
                   }
                 ],
                 'extra' => {
diff --git a/tp/t/results/macro/macro_no_arg_expansion.pl 
b/tp/t/results/macro/macro_no_arg_expansion.pl
index 1721c4cb9d..9688345436 100644
--- a/tp/t/results/macro/macro_no_arg_expansion.pl
+++ b/tp/t/results/macro/macro_no_arg_expansion.pl
@@ -71,11 +71,6 @@ $result_trees{'macro_no_arg_expansion'} = {
             {
               'counter' => 1,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'testone'
                 },
diff --git a/tp/t/results/macro/macro_one_arg_end_of_file.pl 
b/tp/t/results/macro/macro_one_arg_end_of_file.pl
index 18c9c58b37..ef9fce6c35 100644
--- a/tp/t/results/macro/macro_one_arg_end_of_file.pl
+++ b/tp/t/results/macro/macro_one_arg_end_of_file.pl
@@ -75,11 +75,6 @@ $result_trees{'macro_one_arg_end_of_file'} = {
             {
               'counter' => 1,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'onearg'
                 },
diff --git a/tp/t/results/macro/macro_with_error_at_end_line_after_macro.pl 
b/tp/t/results/macro/macro_with_error_at_end_line_after_macro.pl
index e5d2b67330..3c789ff1f2 100644
--- a/tp/t/results/macro/macro_with_error_at_end_line_after_macro.pl
+++ b/tp/t/results/macro/macro_with_error_at_end_line_after_macro.pl
@@ -77,7 +77,12 @@ $result_trees{'macro_with_error_at_end_line_after_macro'} = {
               'element' => {
                 'args' => [
                   {
-                    'text' => 'aaa'
+                    'contents' => [
+                      {
+                        'text' => 'aaa'
+                      }
+                    ],
+                    'type' => 'brace_command_arg'
                   }
                 ],
                 'extra' => {
diff --git a/tp/t/results/macro/macro_zero.pl b/tp/t/results/macro/macro_zero.pl
index 09c0574ac9..69f7cb037c 100644
--- a/tp/t/results/macro/macro_zero.pl
+++ b/tp/t/results/macro/macro_zero.pl
@@ -78,11 +78,6 @@ $result_trees{'macro_zero'} = {
                 {
                   'counter' => 1,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'zero'
                     },
diff --git a/tp/t/results/macro/nested_macro_call.pl 
b/tp/t/results/macro/nested_macro_call.pl
index 6191260c05..efccffddb8 100644
--- a/tp/t/results/macro/nested_macro_call.pl
+++ b/tp/t/results/macro/nested_macro_call.pl
@@ -145,11 +145,6 @@ $result_trees{'nested_macro_call'} = {
                 {
                   'counter' => 1,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'truc'
                     },
@@ -162,11 +157,6 @@ $result_trees{'nested_macro_call'} = {
                 {
                   'counter' => 2,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'machin'
                     },
diff --git a/tp/t/results/macro/no_macrobody.pl 
b/tp/t/results/macro/no_macrobody.pl
index 1c9e46a6c8..6d7f3abebc 100644
--- a/tp/t/results/macro/no_macrobody.pl
+++ b/tp/t/results/macro/no_macrobody.pl
@@ -77,12 +77,22 @@ $result_trees{'no_macrobody'} = {
               'element' => {
                 'args' => [
                   {
-                    'text' => 'line arg'
+                    'contents' => [
+                      {
+                        'text' => 'line arg'
+                      }
+                    ],
+                    'type' => 'line_arg'
                   }
                 ],
                 'extra' => {
                   'name' => 'nomacrobody'
                 },
+                'info' => {
+                  'spaces_before_argument' => {
+                    'text' => ' '
+                  }
+                },
                 'type' => 'macro_call'
               },
               'sourcemark_type' => 'macro_expansion',
@@ -105,7 +115,12 @@ $result_trees{'no_macrobody'} = {
               'element' => {
                 'args' => [
                   {
-                    'text' => 'arg brace'
+                    'contents' => [
+                      {
+                        'text' => 'arg brace'
+                      }
+                    ],
+                    'type' => 'brace_command_arg'
                   }
                 ],
                 'extra' => {
diff --git a/tp/t/results/macro/paragraph_and_macro.pl 
b/tp/t/results/macro/paragraph_and_macro.pl
index 9dc7647079..cd1eb4c7a5 100644
--- a/tp/t/results/macro/paragraph_and_macro.pl
+++ b/tp/t/results/macro/paragraph_and_macro.pl
@@ -195,11 +195,6 @@ $result_trees{'paragraph_and_macro'} = {
             {
               'counter' => 1,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'aempty'
                 },
@@ -228,11 +223,6 @@ $result_trees{'paragraph_and_macro'} = {
             {
               'counter' => 2,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'aempty'
                 },
@@ -263,11 +253,6 @@ $result_trees{'paragraph_and_macro'} = {
             {
               'counter' => 3,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'aempty'
                 },
@@ -304,11 +289,6 @@ $result_trees{'paragraph_and_macro'} = {
             {
               'counter' => 4,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'aspace'
                 },
@@ -338,11 +318,6 @@ $result_trees{'paragraph_and_macro'} = {
             {
               'counter' => 5,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'aspace'
                 },
@@ -373,11 +348,6 @@ $result_trees{'paragraph_and_macro'} = {
             {
               'counter' => 6,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'aspace'
                 },
diff --git a/tp/t/results/macro/protect_comma_macro_line.pl 
b/tp/t/results/macro/protect_comma_macro_line.pl
index fad359fd69..c2daa48e68 100644
--- a/tp/t/results/macro/protect_comma_macro_line.pl
+++ b/tp/t/results/macro/protect_comma_macro_line.pl
@@ -92,12 +92,22 @@ $result_trees{'protect_comma_macro_line'} = {
               'element' => {
                 'args' => [
                   {
-                    'text' => 'arg,  comma \\,'
+                    'contents' => [
+                      {
+                        'text' => 'arg,  comma \\,'
+                      }
+                    ],
+                    'type' => 'line_arg'
                   }
                 ],
                 'extra' => {
                   'name' => 'macrotwo'
                 },
+                'info' => {
+                  'spaces_before_argument' => {
+                    'text' => '  '
+                  }
+                },
                 'type' => 'macro_call'
               },
               'position' => 1,
diff --git a/tp/t/results/macro/protect_in_body.pl 
b/tp/t/results/macro/protect_in_body.pl
index e1d0345ae1..8f8c044e00 100644
--- a/tp/t/results/macro/protect_in_body.pl
+++ b/tp/t/results/macro/protect_in_body.pl
@@ -88,15 +88,35 @@ $result_trees{'protect_in_body'} = {
                   'element' => {
                     'args' => [
                       {
-                        'text' => '@samp{f\\irst arg}'
+                        'contents' => [
+                          {
+                            'text' => '@samp{f\\irst arg}'
+                          }
+                        ],
+                        'type' => 'brace_command_arg'
                       },
                       {
-                        'text' => 'second arg '
+                        'contents' => [
+                          {
+                            'text' => 'second arg '
+                          }
+                        ],
+                        'info' => {
+                          'spaces_before_argument' => {
+                            'text' => ' '
+                          }
+                        },
+                        'type' => 'brace_command_arg'
                       }
                     ],
                     'extra' => {
                       'name' => 'macroone'
                     },
+                    'info' => {
+                      'spaces_before_argument' => {
+                        'text' => ' '
+                      }
+                    },
                     'type' => 'macro_call'
                   },
                   'position' => 4,
diff --git a/tp/t/results/macro/protect_in_body_one_arg.pl 
b/tp/t/results/macro/protect_in_body_one_arg.pl
index 6d5305b23e..13b75199da 100644
--- a/tp/t/results/macro/protect_in_body_one_arg.pl
+++ b/tp/t/results/macro/protect_in_body_one_arg.pl
@@ -81,12 +81,22 @@ $result_trees{'protect_in_body_one_arg'} = {
               'element' => {
                 'args' => [
                   {
-                    'text' => '@samp{f\\irst arg}'
+                    'contents' => [
+                      {
+                        'text' => '@samp{f\\irst arg}'
+                      }
+                    ],
+                    'type' => 'brace_command_arg'
                   }
                 ],
                 'extra' => {
                   'name' => 'macroone'
                 },
+                'info' => {
+                  'spaces_before_argument' => {
+                    'text' => ' '
+                  }
+                },
                 'type' => 'macro_call'
               },
               'position' => 1,
diff --git a/tp/t/results/macro/recursive_call_in_argument.pl 
b/tp/t/results/macro/recursive_call_in_argument.pl
index 8bbb88ee69..d7b9486eb1 100644
--- a/tp/t/results/macro/recursive_call_in_argument.pl
+++ b/tp/t/results/macro/recursive_call_in_argument.pl
@@ -77,7 +77,12 @@ $result_trees{'recursive_call_in_argument'} = {
               'element' => {
                 'args' => [
                   {
-                    'text' => '@anorecurse{}'
+                    'contents' => [
+                      {
+                        'text' => '@anorecurse{}'
+                      }
+                    ],
+                    'type' => 'brace_command_arg'
                   }
                 ],
                 'extra' => {
diff --git a/tp/t/results/macro/recursive_call_in_macro.pl 
b/tp/t/results/macro/recursive_call_in_macro.pl
index ff08e9f3ea..27719fb6b6 100644
--- a/tp/t/results/macro/recursive_call_in_macro.pl
+++ b/tp/t/results/macro/recursive_call_in_macro.pl
@@ -80,11 +80,6 @@ $result_trees{'recursive_call_in_macro'} = {
             {
               'counter' => 1,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'anorecurse'
                 },
diff --git a/tp/t/results/macro/recursive_call_in_rmacro.pl 
b/tp/t/results/macro/recursive_call_in_rmacro.pl
index 7ac0631111..f18c227d05 100644
--- a/tp/t/results/macro/recursive_call_in_rmacro.pl
+++ b/tp/t/results/macro/recursive_call_in_rmacro.pl
@@ -81,11 +81,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 1,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -97,11 +92,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 2,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -113,11 +103,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 3,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -129,11 +114,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 4,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -145,11 +125,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 5,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -161,11 +136,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 6,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -177,11 +147,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 7,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -193,11 +158,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 8,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -209,11 +169,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 9,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -225,11 +180,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 10,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -241,11 +191,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 11,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -257,11 +202,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 12,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -273,11 +213,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 13,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -289,11 +224,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 14,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -305,11 +235,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 15,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -321,11 +246,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 16,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -337,11 +257,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 17,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -353,11 +268,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 18,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -369,11 +279,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 19,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -385,11 +290,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 20,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -401,11 +301,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 21,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -417,11 +312,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 22,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -433,11 +323,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 23,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -449,11 +334,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 24,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -465,11 +345,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 25,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -481,11 +356,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 26,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -497,11 +367,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 27,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -513,11 +378,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 28,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -529,11 +389,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 29,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -545,11 +400,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 30,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -561,11 +411,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 31,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -577,11 +422,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 32,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -593,11 +433,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 33,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -609,11 +444,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 34,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -625,11 +455,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 35,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -641,11 +466,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 36,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -657,11 +477,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 37,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -673,11 +488,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 38,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -689,11 +499,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 39,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -705,11 +510,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 40,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -721,11 +521,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 41,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -737,11 +532,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 42,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -753,11 +543,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 43,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -769,11 +554,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 44,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -785,11 +565,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 45,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -801,11 +576,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 46,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -817,11 +587,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 47,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -833,11 +598,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 48,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -849,11 +609,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 49,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -865,11 +620,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 50,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -881,11 +631,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 51,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -897,11 +642,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 52,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -913,11 +653,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 53,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -929,11 +664,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 54,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -945,11 +675,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 55,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -961,11 +686,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 56,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -977,11 +697,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 57,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -993,11 +708,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 58,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -1009,11 +719,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 59,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -1025,11 +730,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 60,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -1041,11 +741,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 61,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -1057,11 +752,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 62,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -1073,11 +763,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 63,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -1089,11 +774,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 64,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -1105,11 +785,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 65,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -1121,11 +796,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 66,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -1137,11 +807,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 67,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -1153,11 +818,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 68,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -1169,11 +829,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 69,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -1185,11 +840,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 70,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -1201,11 +851,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 71,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -1217,11 +862,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 72,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -1233,11 +873,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 73,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -1249,11 +884,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 74,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -1265,11 +895,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 75,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -1281,11 +906,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 76,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -1297,11 +917,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 77,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -1313,11 +928,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 78,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -1329,11 +939,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 79,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -1345,11 +950,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 80,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -1361,11 +961,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 81,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -1377,11 +972,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 82,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -1393,11 +983,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 83,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -1409,11 +994,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 84,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -1425,11 +1005,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 85,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -1441,11 +1016,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 86,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -1457,11 +1027,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 87,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -1473,11 +1038,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 88,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -1489,11 +1049,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 89,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -1505,11 +1060,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 90,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -1521,11 +1071,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 91,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -1537,11 +1082,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 92,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -1553,11 +1093,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 93,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -1569,11 +1104,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 94,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -1585,11 +1115,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 95,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -1601,11 +1126,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 96,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -1617,11 +1137,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 97,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -1633,11 +1148,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 98,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -1649,11 +1159,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 99,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
@@ -1665,11 +1170,6 @@ $result_trees{'recursive_call_in_rmacro'} = {
             {
               'counter' => 100,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'rec'
                 },
diff --git a/tp/t/results/macro/redefine_texinfo_macro.pl 
b/tp/t/results/macro/redefine_texinfo_macro.pl
index 6fb0527e26..21b6ee1f2b 100644
--- a/tp/t/results/macro/redefine_texinfo_macro.pl
+++ b/tp/t/results/macro/redefine_texinfo_macro.pl
@@ -77,7 +77,12 @@ $result_trees{'redefine_texinfo_macro'} = {
               'element' => {
                 'args' => [
                   {
-                    'text' => 'code'
+                    'contents' => [
+                      {
+                        'text' => 'code'
+                      }
+                    ],
+                    'type' => 'brace_command_arg'
                   }
                 ],
                 'extra' => {
diff --git a/tp/t/results/macro/simple_imbricated_macro.pl 
b/tp/t/results/macro/simple_imbricated_macro.pl
index ad4ede510f..23b2b9b45e 100644
--- a/tp/t/results/macro/simple_imbricated_macro.pl
+++ b/tp/t/results/macro/simple_imbricated_macro.pl
@@ -86,11 +86,6 @@ $result_trees{'simple_imbricated_macro'} = {
             {
               'counter' => 1,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'truc'
                 },
@@ -184,11 +179,6 @@ $result_trees{'simple_imbricated_macro'} = {
             {
               'counter' => 2,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'bidule'
                 },
diff --git a/tp/t/results/macro/simple_imbricated_macro_rmacro.pl 
b/tp/t/results/macro/simple_imbricated_macro_rmacro.pl
index 63c685ebea..98d694ec01 100644
--- a/tp/t/results/macro/simple_imbricated_macro_rmacro.pl
+++ b/tp/t/results/macro/simple_imbricated_macro_rmacro.pl
@@ -86,11 +86,6 @@ $result_trees{'simple_imbricated_macro_rmacro'} = {
             {
               'counter' => 1,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'truc'
                 },
@@ -184,11 +179,6 @@ $result_trees{'simple_imbricated_macro_rmacro'} = {
             {
               'counter' => 2,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'bidule'
                 },
diff --git a/tp/t/results/macro/space_macro_after_end.pl 
b/tp/t/results/macro/space_macro_after_end.pl
index fd3e849b30..9af56e2f70 100644
--- a/tp/t/results/macro/space_macro_after_end.pl
+++ b/tp/t/results/macro/space_macro_after_end.pl
@@ -108,11 +108,6 @@ $result_trees{'space_macro_after_end'} = {
                         {
                           'counter' => 1,
                           'element' => {
-                            'args' => [
-                              {
-                                'text' => ''
-                              }
-                            ],
                             'extra' => {
                               'name' => 'spaces'
                             },
diff --git a/tp/t/results/macro/space_macro_after_end_verbatim.pl 
b/tp/t/results/macro/space_macro_after_end_verbatim.pl
index f87bcb6731..c6f3b9d5a3 100644
--- a/tp/t/results/macro/space_macro_after_end_verbatim.pl
+++ b/tp/t/results/macro/space_macro_after_end_verbatim.pl
@@ -104,11 +104,6 @@ $result_trees{'space_macro_after_end_verbatim'} = {
                         {
                           'counter' => 1,
                           'element' => {
-                            'args' => [
-                              {
-                                'text' => ''
-                              }
-                            ],
                             'extra' => {
                               'name' => 'spaces'
                             },
diff --git a/tp/t/results/macro/too_much_args.pl 
b/tp/t/results/macro/too_much_args.pl
index add563ce33..a30d8fc33f 100644
--- a/tp/t/results/macro/too_much_args.pl
+++ b/tp/t/results/macro/too_much_args.pl
@@ -86,10 +86,25 @@ $result_trees{'too_much_args'} = {
               'element' => {
                 'args' => [
                   {
-                    'text' => 'one'
+                    'contents' => [
+                      {
+                        'text' => 'one'
+                      }
+                    ],
+                    'type' => 'brace_command_arg'
                   },
                   {
-                    'text' => 'two, three'
+                    'contents' => [
+                      {
+                        'text' => 'two, three'
+                      }
+                    ],
+                    'info' => {
+                      'spaces_before_argument' => {
+                        'text' => ' '
+                      }
+                    },
+                    'type' => 'brace_command_arg'
                   }
                 ],
                 'extra' => {
diff --git a/tp/t/results/macro/two_macros_on_a_line.pl 
b/tp/t/results/macro/two_macros_on_a_line.pl
index 8eecfb0021..effd26d770 100644
--- a/tp/t/results/macro/two_macros_on_a_line.pl
+++ b/tp/t/results/macro/two_macros_on_a_line.pl
@@ -186,11 +186,6 @@ $result_trees{'two_macros_on_a_line'} = {
                 {
                   'counter' => 1,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'mymacro'
                     },
@@ -215,11 +210,6 @@ $result_trees{'two_macros_on_a_line'} = {
                 {
                   'counter' => 2,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'mymacro'
                     },
@@ -296,11 +286,6 @@ $result_trees{'two_macros_on_a_line'} = {
                 {
                   'counter' => 4,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'mymacro'
                     },
@@ -353,11 +338,6 @@ $result_trees{'two_macros_on_a_line'} = {
                 {
                   'counter' => 5,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'mymacro'
                     },
@@ -418,10 +398,15 @@ $result_trees{'two_macros_on_a_line'} = {
                   'element' => {
                     'args' => [
                       {
-                        'text' => 'an
+                        'contents' => [
+                          {
+                            'text' => 'an
 arg
 
 in macro'
+                          }
+                        ],
+                        'type' => 'brace_command_arg'
                       }
                     ],
                     'extra' => {
@@ -474,11 +459,6 @@ in macro'
                 {
                   'counter' => 8,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'mymacro'
                     },
diff --git 
a/tp/t/results/misc_commands/codequoteundirected_codequotebacktick.pl 
b/tp/t/results/misc_commands/codequoteundirected_codequotebacktick.pl
index ce40f2b6e1..b480037818 100644
--- a/tp/t/results/misc_commands/codequoteundirected_codequotebacktick.pl
+++ b/tp/t/results/misc_commands/codequoteundirected_codequotebacktick.pl
@@ -259,11 +259,6 @@ $result_trees{'codequoteundirected_codequotebacktick'} = {
                     {
                       'counter' => 1,
                       'element' => {
-                        'args' => [
-                          {
-                            'text' => ''
-                          }
-                        ],
                         'extra' => {
                           'name' => 'allquotes'
                         },
@@ -275,11 +270,6 @@ $result_trees{'codequoteundirected_codequotebacktick'} = {
                     {
                       'counter' => 2,
                       'element' => {
-                        'args' => [
-                          {
-                            'text' => ''
-                          }
-                        ],
                         'extra' => {
                           'name' => 'quotes'
                         },
@@ -673,11 +663,6 @@ $result_trees{'codequoteundirected_codequotebacktick'} = {
                     {
                       'counter' => 3,
                       'element' => {
-                        'args' => [
-                          {
-                            'text' => ''
-                          }
-                        ],
                         'extra' => {
                           'name' => 'quotes'
                         },
@@ -1094,11 +1079,6 @@ $result_trees{'codequoteundirected_codequotebacktick'} = 
{
                     {
                       'counter' => 4,
                       'element' => {
-                        'args' => [
-                          {
-                            'text' => ''
-                          }
-                        ],
                         'extra' => {
                           'name' => 'quotes'
                         },
@@ -1651,11 +1631,6 @@ $result_trees{'codequoteundirected_codequotebacktick'} = 
{
             {
               'counter' => 5,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'allquotes'
                 },
@@ -1668,11 +1643,6 @@ $result_trees{'codequoteundirected_codequotebacktick'} = 
{
             {
               'counter' => 6,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'quotes'
                 },
@@ -2069,11 +2039,6 @@ $result_trees{'codequoteundirected_codequotebacktick'} = 
{
             {
               'counter' => 7,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'quotes'
                 },
@@ -2490,11 +2455,6 @@ $result_trees{'codequoteundirected_codequotebacktick'} = 
{
             {
               'counter' => 8,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'quotes'
                 },
@@ -2794,11 +2754,6 @@ $result_trees{'codequoteundirected_codequotebacktick'} = 
{
                     {
                       'counter' => 9,
                       'element' => {
-                        'args' => [
-                          {
-                            'text' => ''
-                          }
-                        ],
                         'extra' => {
                           'name' => 'allquotes'
                         },
@@ -2810,11 +2765,6 @@ $result_trees{'codequoteundirected_codequotebacktick'} = 
{
                     {
                       'counter' => 10,
                       'element' => {
-                        'args' => [
-                          {
-                            'text' => ''
-                          }
-                        ],
                         'extra' => {
                           'name' => 'quotes'
                         },
@@ -3205,11 +3155,6 @@ $result_trees{'codequoteundirected_codequotebacktick'} = 
{
                     {
                       'counter' => 11,
                       'element' => {
-                        'args' => [
-                          {
-                            'text' => ''
-                          }
-                        ],
                         'extra' => {
                           'name' => 'quotes'
                         },
@@ -3626,11 +3571,6 @@ $result_trees{'codequoteundirected_codequotebacktick'} = 
{
                     {
                       'counter' => 12,
                       'element' => {
-                        'args' => [
-                          {
-                            'text' => ''
-                          }
-                        ],
                         'extra' => {
                           'name' => 'quotes'
                         },
diff --git a/tp/t/results/misc_commands/kbdinputstyle.pl 
b/tp/t/results/misc_commands/kbdinputstyle.pl
index 69235a906f..e805abcd3a 100644
--- a/tp/t/results/misc_commands/kbdinputstyle.pl
+++ b/tp/t/results/misc_commands/kbdinputstyle.pl
@@ -182,11 +182,6 @@ $result_trees{'kbdinputstyle'} = {
             {
               'counter' => 1,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'codekbdmacro'
                 },
@@ -688,11 +683,6 @@ $result_trees{'kbdinputstyle'} = {
             {
               'counter' => 2,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'codekbdmacro'
                 },
@@ -1185,11 +1175,6 @@ $result_trees{'kbdinputstyle'} = {
             {
               'counter' => 3,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'codekbdmacro'
                 },
diff --git a/tp/t/results/misc_commands/kbdinputstyle_in_table.pl 
b/tp/t/results/misc_commands/kbdinputstyle_in_table.pl
index be90e399df..709e81f03e 100644
--- a/tp/t/results/misc_commands/kbdinputstyle_in_table.pl
+++ b/tp/t/results/misc_commands/kbdinputstyle_in_table.pl
@@ -207,11 +207,6 @@ $result_trees{'kbdinputstyle_in_table'} = {
             {
               'counter' => 1,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'codekbdmacro'
                 },
@@ -837,11 +832,6 @@ $result_trees{'kbdinputstyle_in_table'} = {
             {
               'counter' => 2,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'codekbdmacro'
                 },
@@ -1459,11 +1449,6 @@ $result_trees{'kbdinputstyle_in_table'} = {
             {
               'counter' => 3,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'codekbdmacro'
                 },
diff --git a/tp/t/results/misc_commands/test_allowcodebreaks.pl 
b/tp/t/results/misc_commands/test_allowcodebreaks.pl
index 7ea9e9b1ff..2124b8a4ea 100644
--- a/tp/t/results/misc_commands/test_allowcodebreaks.pl
+++ b/tp/t/results/misc_commands/test_allowcodebreaks.pl
@@ -217,7 +217,12 @@ $result_trees{'test_allowcodebreaks'} = {
                   'element' => {
                     'args' => [
                       {
-                        'text' => '0'
+                        'contents' => [
+                          {
+                            'text' => '0'
+                          }
+                        ],
+                        'type' => 'brace_command_arg'
                       }
                     ],
                     'extra' => {
@@ -552,11 +557,6 @@ $result_trees{'test_allowcodebreaks'} = {
             {
               'counter' => 2,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'testallowcodebreaksexample'
                 },
@@ -706,7 +706,12 @@ $result_trees{'test_allowcodebreaks'} = {
                   'element' => {
                     'args' => [
                       {
-                        'text' => '1'
+                        'contents' => [
+                          {
+                            'text' => '1'
+                          }
+                        ],
+                        'type' => 'brace_command_arg'
                       }
                     ],
                     'extra' => {
@@ -1041,11 +1046,6 @@ $result_trees{'test_allowcodebreaks'} = {
             {
               'counter' => 4,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'testallowcodebreaksexample'
                 },
@@ -1169,7 +1169,12 @@ $result_trees{'test_allowcodebreaks'} = {
                           'element' => {
                             'args' => [
                               {
-                                'text' => 'w'
+                                'contents' => [
+                                  {
+                                    'text' => 'w'
+                                  }
+                                ],
+                                'type' => 'brace_command_arg'
                               }
                             ],
                             'extra' => {
@@ -1657,7 +1662,12 @@ $result_trees{'test_allowcodebreaks'} = {
                   'element' => {
                     'args' => [
                       {
-                        'text' => '2'
+                        'contents' => [
+                          {
+                            'text' => '2'
+                          }
+                        ],
+                        'type' => 'brace_command_arg'
                       }
                     ],
                     'extra' => {
@@ -1992,11 +2002,6 @@ $result_trees{'test_allowcodebreaks'} = {
             {
               'counter' => 7,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'testallowcodebreaksexample'
                 },
diff --git a/tp/t/results/plaintext_tests/star_at_command_formatting.pl 
b/tp/t/results/plaintext_tests/star_at_command_formatting.pl
index 93ebf309bb..aa21630bf2 100644
--- a/tp/t/results/plaintext_tests/star_at_command_formatting.pl
+++ b/tp/t/results/plaintext_tests/star_at_command_formatting.pl
@@ -126,11 +126,6 @@ $result_trees{'star_at_command_formatting'} = {
             {
               'counter' => 1,
               'element' => {
-                'args' => [
-                  {
-                    'text' => ''
-                  }
-                ],
                 'extra' => {
                   'name' => 'mymacro'
                 },
@@ -399,11 +394,6 @@ $result_trees{'star_at_command_formatting'} = {
                     {
                       'counter' => 2,
                       'element' => {
-                        'args' => [
-                          {
-                            'text' => ''
-                          }
-                        ],
                         'extra' => {
                           'name' => 'mymacro'
                         },
@@ -703,11 +693,6 @@ $result_trees{'star_at_command_formatting'} = {
                     {
                       'counter' => 3,
                       'element' => {
-                        'args' => [
-                          {
-                            'text' => ''
-                          }
-                        ],
                         'extra' => {
                           'name' => 'mymacro'
                         },
diff --git a/tp/t/results/value_and_macro/comma_value_in_macro_arg.pl 
b/tp/t/results/value_and_macro/comma_value_in_macro_arg.pl
index 9eafc73d4b..5911c0968d 100644
--- a/tp/t/results/value_and_macro/comma_value_in_macro_arg.pl
+++ b/tp/t/results/value_and_macro/comma_value_in_macro_arg.pl
@@ -109,12 +109,22 @@ $result_trees{'comma_value_in_macro_arg'} = {
               'element' => {
                 'args' => [
                   {
-                    'text' => 'arg1 @value{comma} arg2 '
+                    'contents' => [
+                      {
+                        'text' => 'arg1 @value{comma} arg2 '
+                      }
+                    ],
+                    'type' => 'brace_command_arg'
                   }
                 ],
                 'extra' => {
                   'name' => 'macro1'
                 },
+                'info' => {
+                  'spaces_before_argument' => {
+                    'text' => ' '
+                  }
+                },
                 'type' => 'macro_call'
               },
               'position' => 1,
diff --git a/tp/t/results/value_and_macro/value_in_macro_body.pl 
b/tp/t/results/value_and_macro/value_in_macro_body.pl
index 1d81a99f0e..a93a4eff93 100644
--- a/tp/t/results/value_and_macro/value_in_macro_body.pl
+++ b/tp/t/results/value_and_macro/value_in_macro_body.pl
@@ -105,7 +105,12 @@ $result_trees{'value_in_macro_body'} = {
               'element' => {
                 'args' => [
                   {
-                    'text' => 'macro_arg1'
+                    'contents' => [
+                      {
+                        'text' => 'macro_arg1'
+                      }
+                    ],
+                    'type' => 'brace_command_arg'
                   }
                 ],
                 'extra' => {
diff --git a/tp/t/results/xtable/table_nested.pl 
b/tp/t/results/xtable/table_nested.pl
index 8e62e2caf0..d0235da74c 100644
--- a/tp/t/results/xtable/table_nested.pl
+++ b/tp/t/results/xtable/table_nested.pl
@@ -199,11 +199,6 @@ $result_trees{'table_nested'} = {
                 {
                   'counter' => 1,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'myvtable'
                     },
@@ -814,11 +809,6 @@ $result_trees{'table_nested'} = {
                 {
                   'counter' => 2,
                   'element' => {
-                    'args' => [
-                      {
-                        'text' => ''
-                      }
-                    ],
                     'extra' => {
                       'name' => 'myvtable'
                     },
@@ -1442,11 +1432,6 @@ $result_trees{'table_nested'} = {
                     {
                       'counter' => 3,
                       'element' => {
-                        'args' => [
-                          {
-                            'text' => ''
-                          }
-                        ],
                         'extra' => {
                           'name' => 'myvtable'
                         },



reply via email to

[Prev in Thread] Current Thread [Next in Thread]