Skip to content

Commit 9c0076e

Browse files
committed
refactor: use optional parser for optionalSemicolon
#119
1 parent fb8fbf4 commit 9c0076e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/parser/JavaScript.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const optionalWhitespace = optional(whitespace()).map(state => [
1616
state.result,
1717
]);
1818

19-
const optionalSemicolon = regex(/;?/).map(state => [
19+
const optionalSemicolon = optional(string(";")).map(state => [
2020
NodeType.Separator,
2121
state.result,
2222
]);

0 commit comments

Comments
 (0)