MCPcopy
hub / github.com/psf/black / pop

Method pop

src/blib2to3/pgen2/parse.py:382–395  ·  view source on GitHub ↗

Pop a nonterminal. (Internal)

(self)

Source from the content-addressed store, hash-verified

380 self.stack.append((newdfa, 0, newnode))
381
382 def pop(self) -> None:
383 """Pop a nonterminal. (Internal)"""
384 if self.is_backtracking:
385 self.stack.pop()
386 else:
387 popdfa, popstate, popnode = self.stack.pop()
388 newnode = convert(self.grammar, popnode)
389 if self.stack:
390 dfa, state, node = self.stack[-1]
391 assert node[-1] is not None
392 node[-1].append(newnode)
393 else:
394 self.rootnode = newnode
395 self.rootnode.used_names = self.used_names

Callers 15

_addtokenMethod · 0.95
remove_trailing_commaMethod · 0.80
_maybe_empty_linesMethod · 0.80
is_line_short_enoughFunction · 0.80
mainFunction · 0.80
markMethod · 0.80
_splitlines_no_ffFunction · 0.80
_first_right_hand_splitFunction · 0.80

Calls 2

convertFunction · 0.90
appendMethod · 0.45

Tested by 1