Class: ParseTree

### Home Classes Methods

### In Files

- lib/parse_tree.rb

### Parent

RawParseTree

### Methods

- ::new
- #process

### Files

- History.txt
- Manifest.txt
- README.txt

### Class/Module Index

Quicksearch

- Class
- ClassInclude
- Method
- Mod1
- Mod2
- Module
- ParseTree
- ParseTreeGauntlet
- ParseTreeTestCase
- PostUnifier
- PreUnifier
- Proc
- ProcStoreTmp
- R2RTestCase
- RawParseTree
- Something
- SomethingWithInitialize
- TestParseTree
- TestRawParseTree
- TestUnifier
- UnboundMethod
- UnifiedRuby
- Unifier

No matching classes.

# ParseTree

### Public Class Methods

new(include_newlines=$DEBUG) click to toggle source

Initializes a ParseTree instance. Includes newline nodes if `include_newlines` which defaults to +$DEBUG+.

    # File lib/parse_tree.rb, line 1179
    def initialize(include_newlines=$DEBUG)
      super
      @unifier = Unifier.new
    end

### Public Instance Methods

process(input, verbose = nil, file = "(string)", line = -1) click to toggle source

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
    def process(input, verbose = nil, file = "(string)", line = -1)
      case input
      when Array then
        @unifier.process(input)
      when String then
        pt = self.parse_tree_for_string(input, file, line, verbose).first
        @unifier.process(pt)
      else
        raise ArgumentError, "Unknown input type #{input.inspect}"
      end
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.