This is an N-API lib that exposes a single library, which takes a solidity source file's content, and returns its version pragmas and imports.
export interface AnalysisResult {
versionPragmas: Array<string>;
imports: Array<string>;
}
export function analyze(input: string): AnalysisResult;- Add tests for malformed version import statements where it still works
- Add tests for malformed version pragma statements where it still works
- Add tests for error recovery