method
parse
ruby latest stable - Class:
RDoc::RD::BlockParser
Method deprecated or moved
This method is deprecated or moved on the latest stable version. The last existing version (v2_2_9) is shown here.
parse(src)public
Parses src and returns an RDoc::Markup::Document.
# File lib/rdoc/rd/block_parser.rb, line 64
def parse src
@src = src
@src.push false
@footnotes = []
@labels = {}
# @i: index(line no.) of src
@i = 0
# stack for current indentation
@indent_stack = []
# how indented.
@current_indent = @indent_stack.join("")
# RDoc::RD::BlockParser for tmp src
@subparser = nil
# which part is in now
@in_part = nil
@part_content = []
@in_verbatim = false
@yydebug = true
document = do_parse
unless @footnotes.empty? then
blankline = document.parts.pop
document.parts << RDoc::Markup::Rule.new(1)
document.parts.concat @footnotes
document.parts.push blankline
end
document
end Related methods
- Instance methods
- add_footnote
- add_label
- content
- line_index
- next_token
- on_error
- paragraph
- parse
- Class methods
- new
- Private methods
-
cut_off -
format_line_num -
get_included -
if_current_indent_equal -
parse_subtree -
set_term_to_element