-
Notifications
You must be signed in to change notification settings - Fork 0
/
helper.py
26 lines (24 loc) · 1.07 KB
/
helper.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
def getAllVariables(line, filename):
if "using" not in line:
split_line = line.split(' |=')
if split_line[0] in first_adj and split_line[1] not in second_adj:
dict[filename]['variables'].append(split_line[1])
# dot.node(split_line[2])
# dot.edge(filename, split_line[2], constraint='false')
elif split_line[0] in first_adj and split_line[1] in second_adj:
dict[filename]['variables'].append(split_line[2])
# print(filename + " " + split_line[1])
# dot.node(split_line[1])
# dot.edge(filename, split_line[1], constraint='false')
# else:
# dict[filename]['variables'].append(split_line[0])
def getAllObjects(filename, line):
split_line = line.split(' ')
if split_line[0] in first_adj and (split_line[1] == "class" or split_line[1] == "enum"):
dict[filename]['class'].append(split_line[2])
else:
return
class ClassStructure:
def __init__(self, members, functions):
self.members = members
self.functions = functions