diff options
author | Claudiu Popa <pcmanticore@gmail.com> | 2015-09-07 23:53:41 +0300 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2015-09-07 23:53:41 +0300 |
commit | 59cf61033937cdcadf355095f588d8b744f55dad (patch) | |
tree | 14d43d0243537556c45abd306e1cc1ec3a9fe386 /astroid/node_classes.py | |
parent | a1f308f23554a55c732ddea741ecb52903c75b52 (diff) | |
download | astroid-59cf61033937cdcadf355095f588d8b744f55dad.tar.gz |
Second pass of the Python 3.5 support: adding Async nodes.
Diffstat (limited to 'astroid/node_classes.py')
-rw-r--r-- | astroid/node_classes.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/astroid/node_classes.py b/astroid/node_classes.py index 6bee2e9..1efd139 100644 --- a/astroid/node_classes.py +++ b/astroid/node_classes.py @@ -903,6 +903,20 @@ class For(mixins.BlockRangeMixIn, mixins.AssignTypeMixin, bases.Statement): return self.iter.tolineno +class AsyncFor(For): + """Asynchronous For built with `async` keyword.""" + + +class Await(bases.NodeNG): + """Await node for the `await` keyword.""" + + _astroid_fields = ('value', ) + value = None + + def postinit(self, value=None): + self.value = value + + class ImportFrom(mixins.ImportFromMixin, bases.Statement): """class representing a ImportFrom node""" _other_fields = ('modname', 'names', 'level') @@ -1264,6 +1278,10 @@ class With(mixins.BlockRangeMixIn, mixins.AssignTypeMixin, bases.Statement): yield elt +class AsyncWith(With): + """Asynchronous `with` built with the `async` keyword.""" + + class Yield(bases.NodeNG): """class representing a Yield node""" _astroid_fields = ('value',) |