Class: TypeProf::Core::AST::OperatorNode

Inherits:
CallBaseNode show all
Defined in:
lib/typeprof/core/ast/call.rb

Instance Attribute Summary

Attributes inherited from CallBaseNode

#block_body, #block_f_args, #block_pass, #block_tbl, #keyword_args, #mid, #mid_code_range, #positional_args, #recv, #splat_flags, #yield

Attributes inherited from Node

#changes, #lenv, #prev_node, #ret, #static_ret

Instance Method Summary collapse

Methods inherited from CallBaseNode

#attrs, #block_last_stmt_code_range, #install0, #modified_vars, #retrieve_at, #subnodes

Methods inherited from Node

#attrs, #boxes, #code_range, #define, #define0, #define_copy, #diagnostics, #diff, #each_subnode, #get_vertexes, #install, #install0, #install_copy, #modified_vars, #pretty_print_instance_variables, #retrieve_at, #subnodes, #traverse, #undefine, #undefine0, #uninstall

Constructor Details

#initialize(raw_node, recv, lenv) ⇒ OperatorNode

Returns a new instance of OperatorNode.



207
208
209
210
211
212
# File 'lib/typeprof/core/ast/call.rb', line 207

def initialize(raw_node, recv, lenv)
  mid = raw_node.binary_operator
  mid_code_range = TypeProf::CodeRange.from_node(raw_node.binary_operator_loc)
  last_arg = AST.create_node(raw_node.value, lenv)
  super(raw_node, recv, mid, mid_code_range, nil, last_arg, nil, lenv)
end