Skip to content

Commit

Permalink
guard against blank lines in db.tct
Browse files Browse the repository at this point in the history
  • Loading branch information
gartung committed Oct 1, 2014
1 parent ca8d7eb commit 6c2a5ab
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Utilities/StaticAnalyzers/scripts/data-class-funcs.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#! /usr/bin/env python
import re
datacl = re.compile("^class ")
bfunc = re.compile("^function ")
mbcl = re.compile("(base|data) class")
farg = re.compile("(.*)\(\w+\)")
nsep = re.compile("\:\:")
Expand Down Expand Up @@ -65,6 +66,7 @@
f = open('db.txt')

for line in f :
if not bfunc.search(line) : continue
fields = line.split("'")
if fields[2] == ' calls function ' :
G.add_edge(fields[1],fields[3],kind=' calls function ')
Expand Down

0 comments on commit 6c2a5ab

Please sign in to comment.