Reuse parseSourceLocation function.