[issue16806] col_offset is -1 for multiline string expressions resembling docstrings

2012-12-29 Thread Carsten Klein
Carsten Klein added the comment: Please see the attached patch that will resolve the issue. It also includes a test case in test_ast.py. What the patch does is as follows: - tok_state is extended by two fields, namely first_lineno and multi_line_start - first_lineno will be set by tok_get a

[issue16806] col_offset is -1 for multiline string expressions resembling docstrings

2012-12-28 Thread Carsten Klein
Carsten Klein added the comment: In addition, the reported lineno will be set to the last line of the multi line string instead of the first line where parsing the parse began parsing the string. -- ___ Python tracker

[issue16806] col_offset is -1 for multiline string expressions resembling docstrings

2012-12-28 Thread Carsten Klein
Carsten Klein added the comment: Please note that, regardless of the indent level, the col_offset for multi line str expressions will always be -1. -- ___ Python tracker ___ ___

[issue16806] col_offset is -1 for multiline string expressions resembling docstrings

2012-12-28 Thread Carsten Klein
New submission from Carsten Klein: Given an input module such as class klass(object): """multi line comment continued on this line """ """single line comment""" """ Another multi line comment""" and implementing a custom ast.NodeVisitor such as import as cl