Skip to content

Instantly share code, notes, and snippets.

@qoh
Created March 2, 2013 08:14
Show Gist options
  • Save qoh/5070141 to your computer and use it in GitHub Desktop.
Save qoh/5070141 to your computer and use it in GitHub Desktop.
>>> t = ast.parse("""
... def foo(x, y):
... y = -y
...
... if x == 4:
... print 'hi'
... else:
... print 'bye'
... """)
>>> print tspy.to_torquescript(t)
function foo(%x, %y)
{
%y = (-%y);
if ((%x $= 4))
{
echo("hi");
}
else
{
echo("bye");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment