lib/luobo/driver.rb in luobo-0.0.1 vs lib/luobo/driver.rb in luobo-0.0.2
- old
+ new
@@ -25,18 +25,26 @@
else
self.do__missing(token)
end
end
+ def dump output, contents
+ output.print contents if contents
+ end
+
def exit; end
def setup; end
def indent token
" " * token.indent_level
end
def do__raw token
- indent(token) + token.line_code.gsub(/^\s*/, "") + "\n"
+ if token.line_code.size > 0
+ indent(token) + token.line_code.gsub(/^\s*/, "") + "\n"
+ else
+ ""
+ end
end
def do__missing token
src = indent(token) + token.line
src += token.block_code + "\n" if token.block_code