Class: PreUnifier

### Home Classes Methods

### In Files

- lib/unified_ruby.rb

### Parent

SexpProcessor

### Methods

- ::new
- #rewrite_call
- #rewrite_fcall

### 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.

# PreUnifier

### Public Class Methods

new() click to toggle source

    # File lib/unified_ruby.rb, line 381
    def initialize
      super
      @unsupported.delete :newline
    end

### Public Instance Methods

rewrite_call(exp) click to toggle source

    # File lib/unified_ruby.rb, line 386
    def rewrite_call exp
      exp << s(:arglist) if exp.size < 4
      exp.last[0] = :arglist if exp.last.first == :array
      exp
    end

rewrite_fcall(exp) click to toggle source

    # File lib/unified_ruby.rb, line 392
    def rewrite_fcall exp
      exp << s(:arglist) if exp.size < 3
      if exp[-1][0] == :array then
        has_splat = exp[-1].find { |s| Array === s && s.first == :splat }
        exp[-1] = s(:arglist, exp[-1]) if has_splat
        exp[-1][0] = :arglist
      end
      exp
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.