homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author carsten.klein@axn-software.de
Recipients carsten.klein@axn-software.de
Date 2012年12月29日.10:50:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1356778256.96.0.831280645084.issue16806@psf.upfronthosting.co.za>
In-reply-to
Content
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 as soon as the beginning
 of a STRING is detected and it will be set to the current line
 tok->lineno.
- multi_line_start is the beginning of the first line of a string
- in parsetok we now distinguish between STRING nodes and other
 nodes. in case of STRING nodes, we will use the values of the
 above fields for determining the actual lineno and the col_offset,
 otherwise tok->col_offset and tok->lineno will be used when
 creating the token.
The included test case ensures that the col_offset and lineno of
multi line strings is calculated correctly.
History
Date User Action Args
2012年12月29日 10:50:57carsten.klein@axn-software.desetrecipients: + carsten.klein@axn-software.de
2012年12月29日 10:50:56carsten.klein@axn-software.desetmessageid: <1356778256.96.0.831280645084.issue16806@psf.upfronthosting.co.za>
2012年12月29日 10:50:56carsten.klein@axn-software.delinkissue16806 messages
2012年12月29日 10:50:56carsten.klein@axn-software.decreate

AltStyle によって変換されたページ (->オリジナル) /