diff --git a/parser.ts b/parser.ts index 275bd3e..d7ebdc4 100644 --- a/parser.ts +++ b/parser.ts @@ -366,8 +366,8 @@ export function string(s: string): Parser { /** * `string` matches string `token` and consumes any trailing spaces, or fails. */ -export function token(token: Parser): Parser { - return first(token, optSpaces()); +export function token(tok: Parser): Parser { + return first(tok, optSpaces); } type UnwrapParser = T extends Parser ? U : T;