Skip to content

Instantly share code, notes, and snippets.

@koo5
Last active December 18, 2015 02:39
Show Gist options
  • Save koo5/5712620 to your computer and use it in GitHub Desktop.
Save koo5/5712620 to your computer and use it in GitHub Desktop.
#!/usr/bin/python
# -*- coding: utf-8 -*-
class if_node():
node_name = "if"
node_doc = "conditional evaluation"
def __init__():
def run():
if run(self.expression):
return run(self.then)
else:
if exists(self.else_):
return run(self.else_)
else:
return None
code = if_node()
code.then =
class function_declaration_node():
node_name = "function declaration"
def __init__():
def draw():
dprint [["to", self.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment