Lines Matching full:none
44 type = None # int: token number (< 256) or symbol number (>= 256)
45 parent = None # Parent node pointer, or None
65 __hash__ = None # For Py3 compatibility.
134 assert self.parent is not None, str(self)
135 assert new is not None
143 if new is not None:
153 self.parent = None
179 self.parent = None
186 list. If the invocant does not have a next sibling, it is None
188 if self.parent is None:
189 return None
197 return None
203 list. If the invocant does not have a previous sibling, it is None.
205 if self.parent is None:
206 return None
212 return None
221 if self.parent is None:
231 if next_sib is None:
244 context=None,
245 prefix=None,
246 fixers_applied=None):
259 assert ch.parent is None, repr(ch)
261 if prefix is not None:
266 self.fixers_applied = None
328 self.children[i].parent = None
361 context=None,
362 prefix=None,
371 if context is not None:
375 if prefix is not None:
465 type = None # Node type (token if < 256, symbol if >= 256)
466 content = None # Optional content matching pattern
467 name = None # Optional name used to store match in results dict
476 while args and args[-1] is None:
488 def match(self, node, results=None):
494 If results is not None, it must be a dict which will be
499 if self.type is not None and node.type != self.type:
501 if self.content is not None:
502 r = None
503 if results is not None:
509 if results is not None and self.name:
513 def match_seq(self, nodes, results=None):
536 def __init__(self, type=None, content=None, name=None):
548 if type is not None:
550 if content is not None:
556 def match(self, node, results=None):
562 def _submatch(self, node, results=None):
566 This assumes the node type matches and self.content is not None.
570 If results is not None, it must be a dict which will be
582 def __init__(self, type=None, content=None, name=None):
587 type is None this matches *any* single node (leaf or not),
588 except if content is not None, in which it only matches
591 The content, if not None, must be a sequence of Patterns that
593 given, the type must not be None.
598 if type is not None:
600 if content is not None:
611 def _submatch(self, node, results=None):
615 This assumes the node type matches and self.content is not None.
619 If results is not None, it must be a dict which will be
627 if results is not None:
653 def __init__(self, content=None, min=0, max=HUGE, name=None):
666 equivalent to (a b c | d e | f g h); if content is None,
673 If content is not None, replace the dot with the parenthesized
677 if content is not None:
690 subpattern = None
691 if (self.content is not None and
695 if self.content is None:
697 if subpattern is not None and self.name == subpattern.name:
707 def match(self, node, results=None):
711 def match_seq(self, nodes, results=None):
715 if results is not None:
734 if self.content is None:
814 assert self.content is not None
829 def __init__(self, content=None):
833 The argument is either a pattern or None. If it is None, this
835 lingo). If it is not None, this matches whenever the argument
838 if content is not None:
851 if self.content is None: