|
|
|
@ -336,7 +336,7 @@ class Class(_GenericDeclaration): |
|
|
|
|
# TODO(nnorwitz): handle namespaces, etc. |
|
|
|
|
if self.bases: |
|
|
|
|
for token_list in self.bases: |
|
|
|
|
# TODO(nnorwitz): bases are tokens, do name comparision. |
|
|
|
|
# TODO(nnorwitz): bases are tokens, do name comparison. |
|
|
|
|
for token in token_list: |
|
|
|
|
if token.name == node.name: |
|
|
|
|
return True |
|
|
|
@ -379,7 +379,7 @@ class Function(_GenericDeclaration): |
|
|
|
|
|
|
|
|
|
def Requires(self, node): |
|
|
|
|
if self.parameters: |
|
|
|
|
# TODO(nnorwitz): parameters are tokens, do name comparision. |
|
|
|
|
# TODO(nnorwitz): parameters are tokens, do name comparison. |
|
|
|
|
for p in self.parameters: |
|
|
|
|
if p.name == node.name: |
|
|
|
|
return True |
|
|
|
@ -895,7 +895,7 @@ class AstBuilder(object): |
|
|
|
|
nesting -= 1 |
|
|
|
|
return tokens, last_token |
|
|
|
|
|
|
|
|
|
# TODO(nnorwitz): remove _IgnoreUpTo() it shouldn't be necesary. |
|
|
|
|
# TODO(nnorwitz): remove _IgnoreUpTo() it shouldn't be necessary. |
|
|
|
|
def _IgnoreUpTo(self, token_type, token): |
|
|
|
|
unused_tokens = self._GetTokensUpTo(token_type, token) |
|
|
|
|
|
|
|
|
|