FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

bpo-33416: Add end positions to Python AST by ilevkivskyi · Pull Request #11605 · python/cpython · GitHub

Repository navigation

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
ba4ba82
Some initial infra
ilevkivskyi Jan 6, 2019
3e343e3
Regenerate nodes
ilevkivskyi Jan 6, 2019
1684c17
Mindless implementation: known bugs, notably in fstrings
ilevkivskyi Jan 6, 2019
514d4ea
Some test fixes
ilevkivskyi Jan 7, 2019
3ab2516
More test fixes
ilevkivskyi Jan 7, 2019
1d3e352
Add a TODO
ilevkivskyi Jan 8, 2019
dbf9cc9
Switch to better algorithm for finding end position
ilevkivskyi Jan 13, 2019
a44207b
Merge remote-tracking branch 'upstream/master' into add-end-line-col
ilevkivskyi Jan 13, 2019
5af33da
Be consistent for line_num
ilevkivskyi Jan 13, 2019
ce7f5ce
Minor fixes; start adding tests
ilevkivskyi Jan 13, 2019
2171eb9
Update two failing tests
ilevkivskyi Jan 13, 2019
10cf4bd
Fix multiline strings
ilevkivskyi Jan 14, 2019
ed05305
Fix end position for if statement
ilevkivskyi Jan 15, 2019
58fbfa6
Adjust end positions in while and for
ilevkivskyi Jan 15, 2019
f2589ff
Add also with
ilevkivskyi Jan 15, 2019
7d5ca5e
Fix try end position (concludes fixing suites)
ilevkivskyi Jan 15, 2019
aa62e3c
Some formatting plus minor fixes
ilevkivskyi Jan 15, 2019
96a0ec0
More formatting; fix import from
ilevkivskyi Jan 16, 2019
c169025
Fix f-strings
ilevkivskyi Jan 16, 2019
553a772
Add few more tests
ilevkivskyi Jan 16, 2019
5cc01e9
Add final bunch of tests
ilevkivskyi Jan 17, 2019
dce260e
Update docstrings
ilevkivskyi Jan 17, 2019
9ba6604
Update docs
ilevkivskyi Jan 17, 2019
69a6280
Add get_source_segment() helper
ilevkivskyi Jan 17, 2019
4af426f
Consistent formatting in docstring; use new helper in tests
ilevkivskyi Jan 17, 2019
e5a12c3
Fix bug
ilevkivskyi Jan 17, 2019
0275a93
Split few long lines
ilevkivskyi Jan 17, 2019
f20635b
Add tests and docs gor the helper
ilevkivskyi Jan 18, 2019
c9da8f5
Fix missing comma
ilevkivskyi Jan 18, 2019
f97f38a
📜🤖 Added by blurb_it.
blurb-it[bot] Jan 18, 2019
70cc16c
Fix .rst warning and a smelly symbol
ilevkivskyi Jan 18, 2019
48936b9
Fix get_source_segment
ilevkivskyi Jan 19, 2019
ac5b5cb
More CR
ilevkivskyi Jan 19, 2019
4726f17
rst fixes
ilevkivskyi Jan 19, 2019
eeea87d
Remove unused vars
ilevkivskyi Jan 19, 2019
027a4ca
📜🤖 Added by blurb_it.
blurb-it[bot] Jan 19, 2019
ff361f2
Remove old NEWS file
ilevkivskyi Jan 19, 2019
File filter

Filter by extension

Filter by extension .c  (2) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
Prev Previous commit
Next Next commit
Split few long lines
  • Loading branch information
ilevkivskyi committed Jan 17, 2019
commit 0275a93539b41074d4ffcc0999de7fddb2b0cf31
3 changes: 2 additions & 1 deletion Python/ast_opt.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,8 @@ astfold_body(asdl_seq *stmts, PyArena *ctx_, int optimize_)
return 0;
}
asdl_seq_SET(values, 0, st->v.Expr.value);
expr_ty expr = JoinedStr(values, st->lineno, st->col_offset, st->end_lineno, st->end_col_offset, ctx_);
expr_ty expr = JoinedStr(values, st->lineno, st->col_offset,
st->end_lineno, st->end_col_offset, ctx_);
if (!expr) {
return 0;
}
Expand Down
6 changes: 4 additions & 2 deletions Python/compile.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -4710,7 +4710,8 @@ compiler_augassign(struct compiler *c, stmt_ty s)
switch (e->kind) {
case Attribute_kind:
auge = Attribute(e->v.Attribute.value, e->v.Attribute.attr,
AugLoad, e->lineno, e->col_offset, e->end_lineno, e->end_col_offset, c->c_arena);
AugLoad, e->lineno, e->col_offset
e->end_lineno, e->end_col_offset, c->c_arena);
if (auge == NULL)
return 0;
VISIT(c, expr, auge);
Expand All @@ -4721,7 +4722,8 @@ compiler_augassign(struct compiler *c, stmt_ty s)
break;
case Subscript_kind:
auge = Subscript(e->v.Subscript.value, e->v.Subscript.slice,
AugLoad, e->lineno, e->col_offset, e->end_lineno, e->end_col_offset, c->c_arena);
AugLoad, e->lineno, e->col_offset,
e->end_lineno, e->end_col_offset, c->c_arena);
if (auge == NULL)
return 0;
VISIT(c, expr, auge);
Expand Down

Back | FazBrowse Home | New Git URL