Returns the input text line of the token. :param token: Token of which the column number has to be calculated. :type token: ply.lex.token :return: Text of the input line. :rtype: str
(token)
| 310 | return (token.lexpos - line_start) + 1 |
| 311 | |
| 312 | def _get_input_line(token): |
| 313 | """ |
| 314 | Returns the input text line of the token. |
| 315 | |
| 316 | :param token: Token of which the column number has to be calculated. |
| 317 | :type token: ply.lex.token |
| 318 | |
| 319 | :return: Text of the input line. |
| 320 | :rtype: str |
| 321 | """ |
| 322 | return lexer.lexdata.splitlines()[token.lineno] |
| 323 | |
| 324 | lexer = lex.lex() |
| 325 |