Sha256: 7039769f5a48541e6cdf0eee9943db190727d81605d6475b60a564a24844cfc4
Contents?: true
Size: 743 Bytes
Versions: 25
Compression:
Stored size: 743 Bytes
Contents
class Template class Parser class Template < Language def code ::Code::Parser::Code end def opening_curly_bracket str("{") end def closing_curly_bracket str("}") end def backslash str("\\") end def code_part opening_curly_bracket << code << (closing_curly_bracket | any.absent) end def text_character (backslash.ignore << opening_curly_bracket) | (opening_curly_bracket.absent << any) end def text_part text_character.repeat(1) end def root (code_part.aka(:code) | text_part.aka(:text)).repeat | str("").aka(:text).repeat(1, 1) end end end end
Version data entries
25 entries across 25 versions & 3 rubygems