mozilla/rhino — pull request #88 by anba (2012-09-10 11:31:04+00:00)
Title: Patch for Bug 789277 ("JSC: "missing ; after statement" message prints out for the line after the problem one")

Change strict-mode warning for missing semi-colons to point to the actual statement which misses the semi-colon instead of the next token.

TokenStream:
- add helper methods charAt(int) and substring(int, int) to reduce string/reader input clutter
- change getLine() to use the new helper methods
- handle "\r\n" newline sequences in getLine()
- add getLine(int, int[]) to retrieve a line based on an absolute input source position
- getLine(int, int[]) may return `null` to signal the requested line is no longer available, which can happen in the reader input case

Parser:
- change warnMissingSemi(int, int) to use TokenStream#getLine(int, int[]), so the line information of the actual statement which misses the semi-colon can be retrieved