Skip to content

Commit b45e73f

Browse files
committed
ensure no reallocation happens
1 parent f0b1281 commit b45e73f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/parser/parser_lib.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ type InnerParser<T> = (input: Source) => ParserResult<T>;
88

99
class SourceMemo<T> {
1010
#source = "";
11-
#map: Map<number, T> = new Map();
11+
readonly #map: Map<number, T> = new Map();
1212
set(key: Source, value: T): void {
1313
if (this.#source !== key.source) {
1414
this.#source = key.source;

0 commit comments

Comments
 (0)