$changes++;
}
- # only *ONE* LITERAL element
+ # only *ONE* LITERAL or placeholder element
elsif (
- @{$child->[1]} == 1 && $child->[1][0][0] eq 'LITERAL'
+ @{$child->[1]} == 1 && (
+ $child->[1][0][0] eq 'LITERAL'
+ or
+ $child->[1][0][0] eq 'PLACEHOLDER'
+ )
) {
push @children, $child->[1][0];
$changes++;
# mathop, and our content is:
# a single non-mathop child with a single PAREN grandchild which
# would indicate mathop ( nonmathop ( ... ) )
- # or a single non-mathop with a single LITERAL ( nonmathop ? )
+ # or a single non-mathop with a single LITERAL ( nonmathop foo )
+ # or a single non-mathop with a single PLACEHOLDER ( nonmathop ? )
elsif (
@{$child->[1]} == 1
and
and
(
$child->[1][0][1][0][0] eq 'PAREN'
- or
+ or
$child->[1][0][1][0][0] eq 'LITERAL'
+ or
+ $child->[1][0][1][0][0] eq 'PLACEHOLDER'
)
) {
push @children, $child->[1][0];