Loading PKG-INFO +1 −1 Original line number Diff line number Diff line Metadata-Version: 1.1 Name: typed-ast Version: 1.0.4 Version: 1.1.0 Summary: a fork of Python 2 and 3 ast modules with type comment support Home-page: https://github.com/python/typed_ast Author: David Fisher Loading ast27/Custom/typed_ast.c +2 −1 Original line number Diff line number Diff line Loading @@ -239,6 +239,7 @@ string_object_to_py_ast(const char *str, PyObject *filename, int start, PyCompilerFlags *flags) { mod_ty mod; PyObject *result; PyArena *arena = PyArena_New(); if (arena == NULL) return NULL; Loading @@ -249,7 +250,7 @@ string_object_to_py_ast(const char *str, PyObject *filename, int start, return NULL; } PyObject *result = Ta27AST_mod2obj(mod); result = Ta27AST_mod2obj(mod); PyArena_Free(arena); return result; } Loading ast27/Parser/tokenizer.c +6 −2 Original line number Diff line number Diff line Loading @@ -1352,6 +1352,10 @@ tok_get(register struct tok_state *tok, char **p_start, char **p_end) }; char cbuf[80]; char *tp, **cp; /* used for type comment checks */ const char *prefix, *p, *type_start; tp = cbuf; do { *tp++ = c = tok_nextc(tok); Loading @@ -1377,7 +1381,7 @@ tok_get(register struct tok_state *tok, char **p_start, char **p_end) c = tok_nextc(tok); /* check for type comment */ const char *prefix, *p, *type_start; p = tok->start; prefix = type_comment_prefix; while (*prefix && p < tok->cur) { Loading ast27/Python/ast.c +4 −2 Original line number Diff line number Diff line Loading @@ -2303,6 +2303,7 @@ ast_for_class_bases(struct compiling *c, const node* n) static stmt_ty ast_for_expr_stmt(struct compiling *c, const node *n) { int num; REQ(n, expr_stmt); /* expr_stmt: testlist (augassign (yield_expr|testlist) | ('=' (yield_expr|testlist))* [TYPE_COMMENT]) Loading @@ -2311,7 +2312,7 @@ ast_for_expr_stmt(struct compiling *c, const node *n) | '<<=' | '>>=' | '**=' | '//=' test: ... here starts the operator precendence dance */ int num = NCH(n); num = NCH(n); if (num == 1 || (num == 2 && TYPE(CHILD(n, 1)) == TYPE_COMMENT)) { expr_ty e = ast_for_testlist(c, CHILD(n, 0)); Loading Loading @@ -3516,12 +3517,13 @@ parsenumber(struct compiling *c, const char *s) /* Make a copy without the trailing 'L' */ size_t len = end - s + 1; char *copy = malloc(len); PyObject *result; if (copy == NULL) return PyErr_NoMemory(); memcpy(copy, s, len); copy[len - 1] = '\0'; old_style_octal = len > 2 && copy[0] == '0' && copy[1] >= '0' && copy[1] <= '9'; PyObject *result = PyLong_FromString(copy, (char **)0, old_style_octal ? 8 : 0); result = PyLong_FromString(copy, (char **)0, old_style_octal ? 8 : 0); free(copy); return result; } Loading ast3/Custom/typed_ast.c +2 −1 Original line number Diff line number Diff line Loading @@ -249,6 +249,7 @@ string_object_to_py_ast(const char *str, PyObject *filename, int start, PyCompilerFlags *flags, int feature_version) { mod_ty mod; PyObject *result; PyArena *arena = PyArena_New(); if (arena == NULL) return NULL; Loading @@ -259,7 +260,7 @@ string_object_to_py_ast(const char *str, PyObject *filename, int start, return NULL; } PyObject *result = Ta3AST_mod2obj(mod); result = Ta3AST_mod2obj(mod); PyArena_Free(arena); return result; } Loading Loading
PKG-INFO +1 −1 Original line number Diff line number Diff line Metadata-Version: 1.1 Name: typed-ast Version: 1.0.4 Version: 1.1.0 Summary: a fork of Python 2 and 3 ast modules with type comment support Home-page: https://github.com/python/typed_ast Author: David Fisher Loading
ast27/Custom/typed_ast.c +2 −1 Original line number Diff line number Diff line Loading @@ -239,6 +239,7 @@ string_object_to_py_ast(const char *str, PyObject *filename, int start, PyCompilerFlags *flags) { mod_ty mod; PyObject *result; PyArena *arena = PyArena_New(); if (arena == NULL) return NULL; Loading @@ -249,7 +250,7 @@ string_object_to_py_ast(const char *str, PyObject *filename, int start, return NULL; } PyObject *result = Ta27AST_mod2obj(mod); result = Ta27AST_mod2obj(mod); PyArena_Free(arena); return result; } Loading
ast27/Parser/tokenizer.c +6 −2 Original line number Diff line number Diff line Loading @@ -1352,6 +1352,10 @@ tok_get(register struct tok_state *tok, char **p_start, char **p_end) }; char cbuf[80]; char *tp, **cp; /* used for type comment checks */ const char *prefix, *p, *type_start; tp = cbuf; do { *tp++ = c = tok_nextc(tok); Loading @@ -1377,7 +1381,7 @@ tok_get(register struct tok_state *tok, char **p_start, char **p_end) c = tok_nextc(tok); /* check for type comment */ const char *prefix, *p, *type_start; p = tok->start; prefix = type_comment_prefix; while (*prefix && p < tok->cur) { Loading
ast27/Python/ast.c +4 −2 Original line number Diff line number Diff line Loading @@ -2303,6 +2303,7 @@ ast_for_class_bases(struct compiling *c, const node* n) static stmt_ty ast_for_expr_stmt(struct compiling *c, const node *n) { int num; REQ(n, expr_stmt); /* expr_stmt: testlist (augassign (yield_expr|testlist) | ('=' (yield_expr|testlist))* [TYPE_COMMENT]) Loading @@ -2311,7 +2312,7 @@ ast_for_expr_stmt(struct compiling *c, const node *n) | '<<=' | '>>=' | '**=' | '//=' test: ... here starts the operator precendence dance */ int num = NCH(n); num = NCH(n); if (num == 1 || (num == 2 && TYPE(CHILD(n, 1)) == TYPE_COMMENT)) { expr_ty e = ast_for_testlist(c, CHILD(n, 0)); Loading Loading @@ -3516,12 +3517,13 @@ parsenumber(struct compiling *c, const char *s) /* Make a copy without the trailing 'L' */ size_t len = end - s + 1; char *copy = malloc(len); PyObject *result; if (copy == NULL) return PyErr_NoMemory(); memcpy(copy, s, len); copy[len - 1] = '\0'; old_style_octal = len > 2 && copy[0] == '0' && copy[1] >= '0' && copy[1] <= '9'; PyObject *result = PyLong_FromString(copy, (char **)0, old_style_octal ? 8 : 0); result = PyLong_FromString(copy, (char **)0, old_style_octal ? 8 : 0); free(copy); return result; } Loading
ast3/Custom/typed_ast.c +2 −1 Original line number Diff line number Diff line Loading @@ -249,6 +249,7 @@ string_object_to_py_ast(const char *str, PyObject *filename, int start, PyCompilerFlags *flags, int feature_version) { mod_ty mod; PyObject *result; PyArena *arena = PyArena_New(); if (arena == NULL) return NULL; Loading @@ -259,7 +260,7 @@ string_object_to_py_ast(const char *str, PyObject *filename, int start, return NULL; } PyObject *result = Ta3AST_mod2obj(mod); result = Ta3AST_mod2obj(mod); PyArena_Free(arena); return result; } Loading