def to_sexp
args = []
args.push(*@filters.to_sexp_array) if type != :detail_page
args.push(@options.to_sexp) if !@options.empty?
sexp = [:fcall, @name, [:array, *args]]
if type == :detail_page
detail_root = @evaluation_context.extractor.get_detail_extractor(self)
sexp = [:iter, sexp, nil, [:block, detail_root.to_sexp]]
else
sexp = [:iter, sexp, nil, [:block, *@children.to_sexp_array ]] if !@children.empty?
end
@modifier_calls.each do |modifier_sexp|
sexp = [:call, sexp, *modifier_sexp]
end
sexp
end