We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 254cff2 commit fa8fd87Copy full SHA for fa8fd87
1 file changed
src/slang-utils/create-parser.ts
@@ -1,7 +1,7 @@
1
import { NonterminalKind } from '@nomicfoundation/slang/cst';
2
import { Parser } from '@nomicfoundation/slang/parser';
3
import { LanguageFacts } from '@nomicfoundation/slang/utils';
4
-import { minSatisfying } from 'semver';
+import { maxSatisfying } from 'semver';
5
6
import type { ParseOutput } from '@nomicfoundation/slang/parser';
7
import type { ParserOptions } from 'prettier';
@@ -34,7 +34,7 @@ export function createParser(
34
text: string,
35
options: ParserOptions<AstNode>
36
): { parser: Parser; parseOutput: ParseOutput } {
37
- const compiler = minSatisfying(supportedVersions, options.compiler);
+ const compiler = maxSatisfying(supportedVersions, options.compiler);
38
if (compiler) {
39
const result = parserAndOutput(text, compiler);
40
0 commit comments