def baresubquery(self, kids, meta): assert len(kids) == 1 epos = meta.end_pos spos = meta.start_pos subq = s_ast.SubQuery(kids) subq.text = self.text[spos:epos] return subq
def baresubquery(self, kids, meta): assert len(kids) == 1 epos = getattr(meta, 'end_pos', 0) spos = getattr(meta, 'start_pos', 0) subq = s_ast.SubQuery(kids) subq.text = self.text[spos:epos] return subq
def subquery(self): self.ignore(whitespace) self.nextmust('{') q = self.query() subq = s_ast.SubQuery(kids=(q,)) self.ignore(whitespace) self.nextmust('}') return subq
def baresubquery(self, kids, meta): assert len(kids) == 1 ast = s_ast.SubQuery(kids) # Keep the text of the subquery in case used by command ast.text = self.text[meta.start_pos:meta.end_pos] return ast