ariya/esprima — pull request #2 by Constellation (2011-12-04 18:21:49+00:00)
Title: Add matchEOF and fix EOF check in parse phase.

Since lookahead operation restores the last position,
index < length EOF check in parser phase doesn't work properly.
So adding matchEOF function and using it in parser phase.

All unit tests are passed. Performance loss is not found.

I reported it in
http://code.google.com/p/esprima/issues/detail?id=66