add Lexer.resolve_pos to resolve positions within non-hx files (closes #1979)