MCPcopy Create free account
hub / github.com/SLiCAP/SLiCAP_python / _get_input_line

Function _get_input_line

SLiCAP/SLiCAPlex.py:312–322  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

310 return (token.lexpos - line_start) + 1
311
312def _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
324lexer = lex.lex()
325

Callers 1

_printErrorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected