lib/cutaneous/lexer.rb in cutaneous-0.1.4 vs lib/cutaneous/lexer.rb in cutaneous-0.1.5
- old
+ new
@@ -12,9 +12,19 @@
def tokens
@tokens ||= parse
end
+ def convert(to_syntax)
+ template = ""
+ tags = to_syntax.tags
+ tokens.each do |token|
+ open, close = tags[token[0]]
+ template << open.to_s << token[1] << close.to_s
+ end
+ template
+ end
+
# def script
# @script ||= compile
# end
protected