U:RDoc::NormalClass[iI" Parser:ETI"RDoc::Parser;TI" Object;To:RDoc::Markup::Document: @parts[o;;[ o:RDoc::Markup::Paragraph;[I"RA parser is simple a class that subclasses RDoc::Parser and implements #scan ;TI"3to fill in an RDoc::TopLevel with parsed data.;To:RDoc::Markup::BlankLineo; ;[ I"PThe initialize method takes an RDoc::TopLevel to fill with parsed content, ;TI"Rthe name of the file to be parsed, the content of the file, an RDoc::Options ;TI"Oobject and an RDoc::Stats object to inform the user of parsed items. The ;TI"Fscan method is then called to parse the file and must return the ;TI"NRDoc::TopLevel object. By calling super these items will be set for you.;T@o; ;[I"RIn order to be used by RDoc the parser needs to register the file extensions ;TI"Fit can parse. Use ::parse_files_matching to register extensions.;T@o:RDoc::Markup::Verbatim;[I"require 'rdoc' ;TI" ;TI",class RDoc::Parser::Xyz < RDoc::Parser ;TI"% parse_files_matching /\.xyz$/ ;TI" ;TI"D def initialize top_level, file_name, content, options, stats ;TI" super ;TI" ;TI"* # extra initialization if needed ;TI" end ;TI" ;TI" def scan ;TI"- # parse file and fill in @top_level ;TI" end ;TI"end;T: @format0: @fileI"lib/rdoc/parser.rb;T:0@omit_headings_from_table_of_contents_below0; 0;0[[ I" parsers;TI"R;T: publicTI"lib/rdoc/parser.rb;T[ I"file_name;TI"R;T;F@4[[[[I" class;T[[;[[I"alias_extension;F@4[I" binary?;F@4[I"can_parse;F@4[I"can_parse_by_name;F@4[I"check_modeline;F@4[I"for;F@4[I"new;T@4[I"parse_files_matching;F@4[I"process_directive;F@4[I"remove_modeline;F@4[I"use_markup;F@4[I" zip?;F@4[:protected[[: private[[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0;0[@/I"lib/rdoc/top_level.rb;T@/cRDoc::TopLevel