1
0
Fork 0
mirror of https://github.com/MillironX/XAM.jl.git synced 2024-11-14 22:33:14 +00:00

Pipe into eval

This commit is contained in:
Ciarán O'Mara 2019-09-08 09:08:12 +10:00
parent e63ce2e398
commit 892ad0d7dc

View file

@ -317,14 +317,16 @@ const sam_metainfo_actions = Dict(
end, end,
:anchor => :(), :anchor => :(),
:mark1 => :(mark1 = p), :mark1 => :(mark1 = p),
:mark2 => :(mark2 = p)) :mark2 => :(mark2 = p)
eval( )
generate_index_function( generate_index_function(
MetaInfo, MetaInfo,
sam_metainfo_machine, sam_metainfo_machine,
:(mark1 = mark2 = offset = 0), :(mark1 = mark2 = offset = 0),
sam_metainfo_actions)) sam_metainfo_actions
eval( ) |> eval
generate_readheader_function( generate_readheader_function(
Reader, Reader,
MetaInfo, MetaInfo,
@ -346,7 +348,8 @@ eval(
if !eof(stream) if !eof(stream)
stream.position -= 1 # cancel look-ahead stream.position -= 1 # cancel look-ahead
end end
end)) end
) |> eval
const sam_record_actions = Dict( const sam_record_actions = Dict(
:record_qname => :(record.qname = (mark:p-1) .- offset), :record_qname => :(record.qname = (mark:p-1) .- offset),
@ -366,14 +369,16 @@ const sam_record_actions = Dict(
record.filled = (offset+1:p-1) .- offset record.filled = (offset+1:p-1) .- offset
end, end,
:anchor => :(), :anchor => :(),
:mark => :(mark = p)) :mark => :(mark = p)
eval( )
generate_index_function( generate_index_function(
Record, Record,
sam_record_machine, sam_record_machine,
:(mark = offset = 0), :(mark = offset = 0),
sam_record_actions)) sam_record_actions
eval( ) |> eval
generate_read_function( generate_read_function(
Reader, Reader,
sam_body_machine, sam_body_machine,
@ -386,4 +391,6 @@ eval(
@escape @escape
end, end,
:countline => :(linenum += 1), :countline => :(linenum += 1),
:anchor => :(anchor!(stream, p); offset = p - 1))))) :anchor => :(anchor!(stream, p); offset = p - 1))
)
) |> eval