src/compiler/parser.ts exports function with return type of private interface

Export ReferencePathMatchResult interface to fix 'error TS4060: Return type of exported function has or is using private name' when generating declarations from `src/compiler/*.ts`.

See #1111

Tests run just fine.
>   29974 passing (2m)
The parser should not include the checker. it is the other way around. think of them as layers. the type system is a higher layer than syntax.