adding compilation over stdin/stdout. Use --stdio or -s, and pipe away.

This commit is contained in:
Jeremy Ashkenas
2010-02-24 18:18:29 -05:00
parent aba8cb1b08
commit 9f8710b631
4 changed files with 57 additions and 27 deletions

View File

@@ -156,7 +156,7 @@ Expressions: exports.Expressions: inherit Node, {
o.scope: new Scope(null, this, null)
code: if o.globals then @compile_node(o) else @compile_with_declarations(o)
code: code.replace(TRAILING_WHITESPACE, '')
if o.no_wrap then code else "(function(){\n"+code+"\n})();"
if o.no_wrap then code else "(function(){\n"+code+"\n})();\n"
# Compile the expressions body, with declarations of all inner variables
# pushed up to the top.