Skip to content

Instantly share code, notes, and snippets.

@krono
Created September 11, 2012 10:57
Show Gist options
  • Save krono/3697585 to your computer and use it in GitHub Desktop.
Save krono/3697585 to your computer and use it in GitHub Desktop.
from pypy.rlib.parsing.tree import Node as PyNode
from pypy.rlib.parsing.lexer import SourcePos
class Node(PyNode):
def __init__(self, source_position=None):
self.source_position = source_position or SourcePos(-1,-1,-1)
def __eq__(self, other): pass #...
def dot(self): pass # ...
def getsourcepos(self): # ...
class SelfSource(Node):
def __init__(self, expressions=[], source_position=None):
Node.__init__(self, source_position=source_position)
self.expressions = expressions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment