diff options
author | Sylvain Thénault <sylvain.thenault@logilab.fr> | 2009-03-19 09:55:41 +0100 |
---|---|---|
committer | Sylvain Thénault <sylvain.thenault@logilab.fr> | 2009-03-19 09:55:41 +0100 |
commit | 3993719a083006b98df1d06258f7a1b31b049e5f (patch) | |
tree | cd2021fe422a018d7ededef7f5c5280527100b00 /patchcomptransformer.py | |
parent | 439dea370cdb048a0871510dae9818ec7fbaa5c4 (diff) | |
download | astroid-git-3993719a083006b98df1d06258f7a1b31b049e5f.tar.gz |
fix line numbering of
* decorated function for _ast
* decorators node for compiler
--HG--
branch : _ast_compat
Diffstat (limited to 'patchcomptransformer.py')
-rw-r--r-- | patchcomptransformer.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/patchcomptransformer.py b/patchcomptransformer.py index b14d249e..5f3e3c92 100644 --- a/patchcomptransformer.py +++ b/patchcomptransformer.py @@ -112,7 +112,8 @@ class ASTNGTransformer(BaseTransformer): def funcdef(self, nodelist): node = BaseTransformer.funcdef(self, nodelist) - # XXX decorators + if node.decorators is not None: + fix_lineno(node.decorators, nodelist[0]) return fix_lineno(node, nodelist[-5], nodelist[-1], nodelist[-3]) def lambdef(self, nodelist): |