# File lib/parslet/bytecode/compiler.rb, line 89 def visit_alternative(alternatives) emit_block do adr_end = fwd_address add EnterFrame.new add PushPos.new alternatives.each_with_index do |alternative, idx| alternative.accept(self) add BranchOnSuccess.new(adr_end, idx) end add Fail.new(["Expected one of ", alternatives.inspect], alternatives.size) adr_end.resolve(self) end end