Back to the room

Pass 3 of 3 · Deep dive of PHAROSPass 1 · OverviewPass 2 · How it works

Code Observatory / function

_end_line

codeintel.parsers.treesitter_parser._end_line

PINNED SOURCE Source and edges from the index at this commit. An execution appears only where one was recorded.

PHAROS at 975a38dMIT license

Around this symbol

Search all symbols

Loading

Called by (1)
SymbolFileResolved by
parse_treesittertreesitter_parser.pysame file
Inside (1)
SymbolFileResolved by
treesitter_parsertreesitter_parser.pysame file
codeintel.parsers.treesitter_parser._end_linebackend/app/codeintel/parsers/treesitter_parser.py, lines 374–378Open source
def _end_line(node) -> int:    """1-based last line; a node that ends with its newline (C preprocessor    directives) ends on the line before the one its end point is on."""    row, column = node.end_point    return row if column == 0 and row > node.start_point[0] else row + 1

What the index recorded

Signature
def _end_line(node) -> int:
File
backend/app/codeintel/parsers/treesitter_parser.py
Lines
374–378
Parser
python-ast
Git blob
bf0c9a8044cadd3452ebf5ffa82b866ae00395a9

Read it on GitHub at this commit