Skip to content

Combination of alt and many runs infinitely #58

@venil7

Description

@venil7
const keyword = C.many1(C.notSpace);
const whitespace = S.spaces;

const lang = pipe(
  keyword,
  P.alt(() => whitespace)
);

const input = `hello world mickey mouse`;
const res = run(P.many(lang), input);

expectation: ['hello', ' ', 'word', ' ', 'mickey', ' ' ,'mouse']
actual: runs forever...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions