Skip to content

Commit 68702c2

Browse files
committed
this is better
1 parent 5472ed4 commit 68702c2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/parser/parser_lib.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { assertGreater } from "@std/assert/greater";
2-
import { assertGreaterOrEqual } from "@std/assert/greater-or-equal";
2+
import { assertLessOrEqual } from "@std/assert/less-or-equal";
33
import { MemoizationCacheResult, memoize } from "@std/cache/memoize";
44
import { ArrayResult, ArrayResultError } from "../array_result.ts";
55

@@ -61,7 +61,7 @@ export class Parser<T> {
6161
>(
6262
(input) => {
6363
// TODO: remove assertion
64-
assertGreaterOrEqual(input.source.length, input.position);
64+
assertLessOrEqual(input.position, input.source.length);
6565
return parser(input);
6666
},
6767
{ cache: new SourceMemo() },

0 commit comments

Comments
 (0)