Class: RD::RD2RMIVisitor

Inherits:
RDVisitor show all
Includes:
AutoLabel, MethodParse
Defined in:
lib/rd/rd2rmi-lib.rb

Constant Summary collapse

OUTPUT_SUFFIX =
"rmi"
INCLUDE_SUFFIX =
["rmi"]

Constants included from MethodParse

MethodParse::KIND2NUM

Constants inherited from Visitor

Visitor::SYSTEM_NAME, Visitor::SYSTEM_VERSION, Visitor::VERSION

Instance Attribute Summary

Attributes inherited from OutputFormatVisitor

#filename, #include_suffix, #input_filename

Instance Method Summary collapse

Methods included from MethodParse

analize_method, kind2num, kind2str, make_method_index, make_mindex_label, str2kind, tr_method

Methods inherited from RDVisitor

#apply_to_DescListItemTerm, #apply_to_MethodListItemTerm, #prepare_labels, #refer_external

Methods inherited from OutputFormatVisitor

#apply_to_Include, #initialize

Methods included from SearchFile

#search_file

Methods inherited from Visitor

define_visit_Nonterminal, define_visit_Terminal, version, #visit_DescListItem, #visit_MethodListItem, #visit_Reference, #visit_children

Constructor Details

This class inherits a constructor from RD::OutputFormatVisitor

Instance Method Details

#visit(tree) ⇒ Object



15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/rd/rd2rmi-lib.rb', line 15

def visit(tree)
  ret = ""

  prepare_labels(tree)
  
  index = make_method_index(tree)
  index.each do |i|
	i[1] = kind2str(i[1])
	i[3] = @filename
	i[4] = refer(i[0]+i[1]+i[2])
	ret << "$method_index.push(#{i.inspect})\n"
  end
  ret
end