Skip to content

Commit

Permalink
refactor: use optional parser for optionalSemicolon
Browse files Browse the repository at this point in the history
  • Loading branch information
Bikossor committed Jul 24, 2022
1 parent fb8fbf4 commit 9c0076e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/parser/JavaScript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const optionalWhitespace = optional(whitespace()).map(state => [
state.result,
]);

const optionalSemicolon = regex(/;?/).map(state => [
const optionalSemicolon = optional(string(";")).map(state => [
NodeType.Separator,
state.result,
]);
Expand Down

0 comments on commit 9c0076e

Please sign in to comment.