Of course you can always compile your code to an .exe and run it as any other CLI program. But this section is all about running boo programs directly from memory.
booi examples/HelloWorld.boo |
To execute a script read directly from stdin:
booi - |
<boo>
print("Hello from nant task!")
</boo>
|
import Boo.Lang.Compiler
import Boo.Lang.Compiler.IO
import Boo.Lang.Compiler.Pipelines
compiler = BooCompiler()
compiler.Parameters.Input.Add(StringInput("<script>", "print('Hello!')"))
compiler.Parameters.Pipeline = Run()
compiler.Run()
|