Permalink
Switch branches/tags
Find file
Fetching contributors…
Cannot retrieve contributors at this time
10 lines (8 sloc) 266 Bytes
from context import *
def parse(filename):
with open(filename) as f:
filenode = File(filename)
filecontext = FileContext(filenode)
for i, line in enumerate(f):
filecontext.addline(LineContext(line.rstrip('\n'), filename, i+1).process())
return filenode