mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-40334: Fix build errors and warnings in test_peg_generator (GH-19672)
This commit is contained in:
parent
ee40e4b856
commit
1df5a9e88c
4 changed files with 17 additions and 2 deletions
|
@ -93,7 +93,9 @@ class CCallMakerVisitor(GrammarVisitor):
|
|||
func, args = call.split("(", 1)
|
||||
assert args[-1] == ")"
|
||||
args = args[:-1]
|
||||
if not args.startswith("p,"):
|
||||
if "name_token" in call:
|
||||
return None, f"_PyPegen_lookahead_with_name({positive}, {func}, {args})"
|
||||
elif not args.startswith("p,"):
|
||||
return None, f"_PyPegen_lookahead({positive}, {func}, {args})"
|
||||
elif args[2:].strip().isalnum():
|
||||
return None, f"_PyPegen_lookahead_with_int({positive}, {func}, {args})"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue