def visit_SliceIndirection(self, node): start = self.visit(node.start) if node.start is not None else None stop = self.visit(node.stop) if node.stop is not None else None result = qlast.Indirection( arg=self.visit(node.expr), indirection=[ qlast.Slice( start=(None if self._is_none(start) else start), stop=(None if self._is_none(stop) else stop), ) ]) return result
def reduce_LBRACKET_COLON_Expr_RBRACKET(self, *kids): self.val = qlast.Slice(start=None, stop=kids[2].val)
def reduce_LBRACKET_Expr_COLON_RBRACKET(self, *kids): self.val = qlast.Slice(start=kids[1].val, stop=None)