• Home
  • Raw
  • Download

Lines Matching refs:content

466     content = None  # Optional content matching pattern  variable in BasePattern
475 args = [type_repr(self.type), self.content, self.name]
501 if self.content is not None:
536 def __init__(self, type=None, content=None, name=None): argument
550 if content is not None:
551 assert isinstance(content, basestring), repr(content)
553 self.content = content
575 return self.content == node.value
582 def __init__(self, type=None, content=None, name=None): argument
600 if content is not None:
601 assert not isinstance(content, basestring), repr(content)
602 content = list(content)
603 for i, item in enumerate(content):
608 self.content = content
625 for c, r in generate_matches(self.content, node.children):
631 if len(self.content) != len(node.children):
633 for subpattern, child in zip(self.content, node.children):
653 def __init__(self, content=None, min=0, max=HUGE, name=None): argument
677 if content is not None:
678 content = tuple(map(tuple, content)) # Protect against alterations
680 assert len(content), repr(content) # Can't have zero alternatives
681 for alt in content:
683 self.content = content
691 if (self.content is not None and
692 len(self.content) == 1 and len(self.content[0]) == 1):
693 subpattern = self.content[0][0]
695 if self.content is None:
701 return WildcardPattern(subpattern.content,
734 if self.content is None:
775 for alt in self.content:
786 for alt in self.content:
804 for leaf in self.content:
814 assert self.content is not None
818 for alt in self.content:
829 def __init__(self, content=None): argument
838 if content is not None:
839 assert isinstance(content, BasePattern), repr(content)
840 self.content = content
851 if self.content is None:
857 for c, r in self.content.generate_matches(nodes):