Initializes a ParseTree instance. Includes newline nodes if include_newlines which defaults to +$DEBUG+.
# File lib/parse_tree.rb, line 1179 1179: def initialize(include_newlines=$DEBUG) 1180: super 1181: @unifier = Unifier.new 1182: end
Main driver for ParseTree. Returns a Sexp instance containing the AST representing the input given. This is a UnifiedRuby sexp, not a raw sexp from ruby. If you want raw, use the old parse_tree_for_xxx methods... Please tell me if/why you want raw, I’d like to know so I can justify keeping the code around.
# File lib/parse_tree.rb, line 1191 1191: def process(input, verbose = nil, file = "(string)", line = 1) 1192: case input 1193: when Array then 1194: @unifier.process(input) 1195: when String then 1196: pt = self.parse_tree_for_string(input, file, line, verbose).first 1197: @unifier.process(pt) 1198: else 1199: raise ArgumentError, "Unknown input type #{input.inspect}" 1200: end 1201: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.