restructured api_classes, use the same base class

This commit is contained in:
David Halter
2012-11-07 23:29:40 +01:00
parent 5550bb4c9a
commit 20ef1ffd18
4 changed files with 65 additions and 71 deletions
+3 -2
View File
@@ -35,12 +35,13 @@ def get_operator(string, pos):
class Keyword(object):
def __init__(self, name, pos):
self.name = name
self.parent = lambda: None
self.start_pos = pos
def get_parent_until(self):
def parent(self):
return builtin.Builtin.scope
get_parent_until = parent
@property
def names(self):
""" For a `parsing.Name` like comparision """