Commits

shl...@52c325ad-5fd0-0310-8a0f-c43feede02cc  committed f929277

Refactoring: removed an old method - _parse_inner_desc().

  • Participants
  • Parent commits 6a31534

Comments (0)

Files changed (1)

File perl/modules/XML-Grammar-Fiction/lib/XML/Grammar/Fiction/FromProto/Parser/QnD.pm

     return $self->_parse_inner_text();
 }
 
-sub _parse_inner_desc
-{
-    my $self = shift;
-
-    my $start_line = $self->_curr_line_idx();
-
-    # Skip the [
-    $self->_with_curr_line(
-        sub {
-            my $l = shift;
-
-            $$l =~ m{\G\[}g;
-        }
-    );
-
-    my $inside = $self->_parse_inner_text();
-
-    $self->_with_curr_line(
-        sub {
-            my $l = shift;
-
-            if ($$l !~ m{\G\]}g)
-            {
-                Carp::confess (
-                      "Inner description that started on line "
-                      . ($start_line+1) 
-                      . " did not terminate with a \"]\"!"
-                );
-            }
-        }
-    );
-
-    return
-        $self->_new_node(
-            {
-                t => "InnerDesc",
-                start => $start_line,
-                children => $self->_new_list($inside),
-            }
-        );
-}
-
 sub _parse_inner_tag
 {
     my $self = shift;
 
                 $curr_text .= (defined($1) ? $1 : "");
 
-                if ($$l =~ m{\G\[})
-                {
-                    $which_tag = "open_desc";
-                }
-                elsif ($$l =~ m{\G\&})
+                if ($$l =~ m{\G\&})
                 {
                     $which_tag = "entity";
                 }                
         }
         else
         {
-            if (($which_tag eq "open_desc") || ($which_tag eq "open_tag"))
+            if ($which_tag eq "open_tag")
             {
-                push @contents, 
-                    (($which_tag eq "open_tag")
-                        ? $self->_parse_inner_tag()
-                        : $self->_parse_inner_desc()
-                    );
+                push @contents, $self->_parse_inner_tag();
+
                 # Avoid skipping to the next line.
                 # Gotta love teh Perl!
                 redo CONTENTS_LOOP;