Bug 384317 - [1.8][compiler] More smarts needed in Scanner.jumpOver()
Summary: [1.8][compiler] More smarts needed in Scanner.jumpOver()
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.8   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: BETA J8   Edit
Assignee: Srikanth Sankaran CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 380188
  Show dependency tree
 
Reported: 2012-07-04 20:28 EDT by Srikanth Sankaran CLA
Modified: 2012-07-05 03:15 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Srikanth Sankaran CLA 2012-07-04 20:28:59 EDT
BETA_JAVA8:

(1) As it stands now, Scanner.jumpOver can wastefully look ahead until EOF on 
some ill formed programs (parenthesis imbalance early on). We need to build
some ways to fail early. A black list is one possible way already exploited
while looking ahead at '<'.  

(2) In the same method, we are reusing the counter `found` for various
token classes. It needs to be understood whether this is kosher to do.
Comment 1 Srikanth Sankaran CLA 2012-07-05 03:15:12 EDT
It is now arranged that the look ahead will never proceed past the next
semicolon, which is a token that cannot feature either in type arguments
or in lambda parameter list.

Released in BETA_JAVA8 via
http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?h=BETA_JAVA8&id=3255db62a2a31c2b7911a20dbb001663d6aa8d6e

(issue (2) from comment#0 turned out not to be a problem)