let n=1;
C.char(',').drop().then(C.string('test').debug('Why is this being executed twice?')).occurrence(n).then(C.char(',')).then(C.string('test')).parse(Streams.ofString(",test,test,test,test"))
the string gets executed n+1 times, however it seems wasteful, when n is for example 0, there is no need to "lookahead".. So it should just look ahead the times it wants to actually parse.
In this toy example, this is irrelevant, however when parsing big files, this can add up significantly...
the string gets executed n+1 times, however it seems wasteful, when n is for example 0, there is no need to "lookahead".. So it should just look ahead the times it wants to actually parse.
In this toy example, this is irrelevant, however when parsing big files, this can add up significantly...