MCPcopy Create free account
hub / github.com/scottrogowski/code2flow / lineno

Function lineno

code2flow/javascript.py:10–21  ·  view source on GitHub ↗

Get the first line number of ast element :param ast el: :rtype: int

(el)

Source from the content-addressed store, hash-verified

8
9
10def lineno(el):
11 """
12 Get the first line number of ast element
13
14 :param ast el:
15 :rtype: int
16 """
17 if isinstance(el, list):
18 el = el[0]
19 ret = el['loc']['start']['line']
20 assert type(ret) == int
21 return ret
22
23
24def walk(tree):

Callers 6

make_callsFunction · 0.70
process_assignFunction · 0.70
make_local_variablesFunction · 0.70
make_nodesMethod · 0.70
make_class_groupMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected