Skip to content

Commit 8c1cb74

Browse files
committed
fix small parser errors
1 parent 3e5d1d1 commit 8c1cb74

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/parser/parser_lib.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,15 @@ export class Parser<T> {
6060
this
6161
.rawParser(source)
6262
.flatMap(({ value, size }) =>
63-
mapper(value).rawParser({
64-
source: source.source,
65-
position: source.position + size,
66-
})
63+
mapper(value)
64+
.rawParser({
65+
source: source.source,
66+
position: source.position + size,
67+
})
68+
.map(({ value, size: addedSize }) => ({
69+
value,
70+
size: size + addedSize,
71+
}))
6772
)
6873
);
6974
}

0 commit comments

Comments
 (0)