Implements a circular (ring) buffer of characters with specialized application logic in order to determine the context of some Javascript content that is being parsed. This is a specialized class - of no use to external code - which aims to be 100% compatible with the corresponding logic in the C-version of the HtmlParser, specifically jsparser.c. In particular:
The API is odd, using negative indexes to access content in the buffer. Changing the API would mean changing the test cases and have more difficulty determining whether we are remaining compatible with the C-version. It is left as an exercise for once the code is very stable and proven.
Repeated whitespace is folded into just one character to use the space available efficiently.
The buffer size is fixed. There is currently no need to make it variable so we avoid the need for constructors.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.