Lines Matching refs:content
432 content = None # Optional content matching pattern variable in BasePattern
441 args = [type_repr(self.type), self.content, self.name]
467 if self.content is not None:
502 def __init__(self, type=None, content=None, name=None): argument
516 if content is not None:
517 assert isinstance(content, str), repr(content)
519 self.content = content
541 return self.content == node.value
548 def __init__(self, type=None, content=None, name=None): argument
566 if content is not None:
567 assert not isinstance(content, str), repr(content)
568 content = list(content)
569 for i, item in enumerate(content):
574 self.content = content
591 for c, r in generate_matches(self.content, node.children):
597 if len(self.content) != len(node.children):
599 for subpattern, child in zip(self.content, node.children):
619 def __init__(self, content=None, min=0, max=HUGE, name=None): argument
643 if content is not None:
644 content = tuple(map(tuple, content)) # Protect against alterations
646 assert len(content), repr(content) # Can't have zero alternatives
647 for alt in content:
649 self.content = content
657 if (self.content is not None and
658 len(self.content) == 1 and len(self.content[0]) == 1):
659 subpattern = self.content[0][0]
661 if self.content is None:
667 return WildcardPattern(subpattern.content,
700 if self.content is None:
741 for alt in self.content:
752 for alt in self.content:
770 for leaf in self.content:
780 assert self.content is not None
784 for alt in self.content:
795 def __init__(self, content=None): argument
804 if content is not None:
805 assert isinstance(content, BasePattern), repr(content)
806 self.content = content
817 if self.content is None:
823 for c, r in self.content.generate_matches(nodes):