Does the Peg.js engine backstep after a lookahead like regexs do?
问题 According to regular-expressions.info on lookarounds, the engine backsteps after a lookahead: Let's take one more look inside, to make sure you understand the implications of the lookahead. Let's apply q(?=u)i to quit. The lookahead is now positive and is followed by another token. Again, q matches q and u matches u. Again, the match from the lookahead must be discarded, so the engine steps back from i in the string to u. The lookahead was successful, so the engine continues with i. But i