Fix bug: file with no indents infinite loops
add two unittests to parse function