Search up the file for the nearest method when current line isn't part of a statement