Class: RubyUnderscore::VcallEnhancer

Inherits:
AbstractProcessor show all
Includes:
EnhancerHelper
Defined in:
lib/tree_converters.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from EnhancerHelper

#assertSexpIs, #chain, #clone, #needsEnhancing, #sexpEnhancingCount, #sexpNeedsEnhancing, #sexpOf

Methods inherited from AbstractProcessor

#assert_empty, #proceed

Constructor Details

#initializeVcallEnhancer

Returns a new instance of VcallEnhancer.



188
189
190
191
# File 'lib/tree_converters.rb', line 188

def initialize
  super
  self.vcallCount = nil
end

Instance Attribute Details

#vcallCountObject

Returns the value of attribute vcallCount.



184
185
186
# File 'lib/tree_converters.rb', line 184

def vcallCount
  @vcallCount
end

Instance Method Details

#changeGenericCall(sexp) ⇒ Object



211
212
213
# File 'lib/tree_converters.rb', line 211

def changeGenericCall(sexp)
  sexpClass(sexp.first).new(sexp, self).enhance
end

#process_call(sexp) ⇒ Object



203
204
205
# File 'lib/tree_converters.rb', line 203

def process_call(sexp)
  changeGenericCall sexp
end

#process_fcall(sexp) ⇒ Object



207
208
209
# File 'lib/tree_converters.rb', line 207

def process_fcall(sexp)
  changeGenericCall sexp
end

#process_vcall(sexp) ⇒ Object



198
199
200
201
# File 'lib/tree_converters.rb', line 198

def process_vcall(sexp)
  return s *sexp unless sexp[1] == :_
  s(:dvar, variableName)
end

#variableNameObject



193
194
195
# File 'lib/tree_converters.rb', line 193

def variableName
  :"__vcall_enhancer_i"
end