defunkt/mustache — pull request #151 by ernie (2013-05-22 15:10:53+00:00)
Title: Refactor to allow for easier extension of Parser

Mustache::Parser#scan_tags is a pretty hefty method. Right in the middle
of this method, we have a case statement that branches based on the
sigil of the parsed tag. By extracting these cases to methods, we can
instead dispatch via `Method#call`, which eliminates the branching and
also allow for extension of the Parser to support custom sigils. This is
roughly in line with what the Generator already supports, via definition
of `on_*` methods. There is a small performance increase due to this
change, as well, on my test machine with 1.9.3p392.