Method: Packcr::Node::ErrorNode#to_h

Defined in:
lib/packcr/node/error_node.rb

#to_hObject



59
60
61
62
63
64
65
66
67
# File 'lib/packcr/node/error_node.rb', line 59

def to_h
  {
    type: :error,
    code: code&.text,
    vars: vars&.map(&:to_h),
    capts: capts&.map(&:to_h),
    index: @index,
  }
end