def operrelprop_pivot(self, kids, isjoin=False): kids = self._convert_children(kids) relprop, rest = kids[0], kids[1:] if not rest: return s_ast.PropPivotOut(kids=kids, isjoin=isjoin) pval = s_ast.RelPropValue(kids=(relprop, )) return s_ast.PropPivot(kids=(pval, *kids[1:]), isjoin=isjoin)
def proppivot(self, prop): ''' :foo:bar -> baz:faz ''' pval = s_ast.RelPropValue(kids=(prop,)) self.ignore(whitespace) self.nextmust('->') self.ignore(whitespace) if self.nextchar() == '*': self.offs += 1 return s_ast.PropPivotOut(kids=(prop,)) dest = self.absprop() return s_ast.PropPivot(kids=(pval, dest))