summaryrefslogtreecommitdiffstats
path: root/Parser/pegen/pegen.c
diff options
context:
space:
mode:
authorPablo Galindo <Pablogsal@gmail.com>2020-04-29 09:42:21 (GMT)
committerGitHub <noreply@github.com>2020-04-29 09:42:21 (GMT)
commit4db245ee9ddbe6c53d375de59a35ff59dea2a8e0 (patch)
tree2a70d3590bb1c1f68ddfe681328061a3aa48c69f /Parser/pegen/pegen.c
parent9b64ef3ac7b434065dbff0048b9103999e4b491a (diff)
downloadcpython-4db245ee9ddbe6c53d375de59a35ff59dea2a8e0.zip
cpython-4db245ee9ddbe6c53d375de59a35ff59dea2a8e0.tar.gz
cpython-4db245ee9ddbe6c53d375de59a35ff59dea2a8e0.tar.bz2
bpo-40334: refactor and cleanup for the PEG generators (GH-19775)
Diffstat (limited to 'Parser/pegen/pegen.c')
-rw-r--r--Parser/pegen/pegen.c46
1 files changed, 0 insertions, 46 deletions
diff --git a/Parser/pegen/pegen.c b/Parser/pegen/pegen.c
index 39da270..942447b 100644
--- a/Parser/pegen/pegen.c
+++ b/Parser/pegen/pegen.c
@@ -693,16 +693,6 @@ _PyPegen_lookahead_with_name(int positive, expr_ty (func)(Parser *), Parser *p)
}
int
-_PyPegen_lookahead_with_string(int positive, void *(func)(Parser *, const char *), Parser *p,
- const char *arg)
-{
- int mark = p->mark;
- void *res = func(p, arg);
- p->mark = mark;
- return (res != NULL) == positive;
-}
-
-int
_PyPegen_lookahead_with_int(int positive, Token *(func)(Parser *, int), Parser *p, int arg)
{
int mark = p->mark;
@@ -751,24 +741,6 @@ _PyPegen_get_last_nonnwhitespace_token(Parser *p)
return token;
}
-void *
-_PyPegen_async_token(Parser *p)
-{
- return _PyPegen_expect_token(p, ASYNC);
-}
-
-void *
-_PyPegen_await_token(Parser *p)
-{
- return _PyPegen_expect_token(p, AWAIT);
-}
-
-void *
-_PyPegen_endmarker_token(Parser *p)
-{
- return _PyPegen_expect_token(p, ENDMARKER);
-}
-
expr_ty
_PyPegen_name_token(Parser *p)
{
@@ -794,24 +766,6 @@ _PyPegen_string_token(Parser *p)
return _PyPegen_expect_token(p, STRING);
}
-void *
-_PyPegen_newline_token(Parser *p)
-{
- return _PyPegen_expect_token(p, NEWLINE);
-}
-
-void *
-_PyPegen_indent_token(Parser *p)
-{
- return _PyPegen_expect_token(p, INDENT);
-}
-
-void *
-_PyPegen_dedent_token(Parser *p)
-{
- return _PyPegen_expect_token(p, DEDENT);
-}
-
static PyObject *
parsenumber_raw(const char *s)
{