Class: ParseTree

Inherits:
Object
  • Object
show all
Defined in:
lib/redparse/replacing/parse_tree.rb

Instance Method Summary collapse

Constructor Details

#initializeParseTree

Returns a new instance of ParseTree.



21
22
23
# File 'lib/redparse/replacing/parse_tree.rb', line 21

def initialize

end

Instance Method Details

#parse_tree_for_string(source, filename = '(string)', line = 1, verbose = true) ⇒ Object



25
26
27
28
29
# File 'lib/redparse/replacing/parse_tree.rb', line 25

def parse_tree_for_string(source,
                          filename = '(string)', line = 1, verbose = true)
  @parser=RedParse.new(source,filename,line)
  @parser.parse.to_parsetree
end