Bug 246682

Summary: Inconsistent parser/scanner encoding for commentStart position
Product: [Eclipse Project] JDT Reporter: Philipe Mulet <philippe_mulet>
Component: CoreAssignee: Frederic Fusier <frederic_fusier>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: david_audel
Version: 3.4   
Target Milestone: 3.5 M2   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed patch none

Description Philipe Mulet CLA 2008-09-09 04:21:25 EDT
Build 3.5M1

Though it does not cause some user code issues right now, the parser comment stack does not encode comment positions in same way across the parser hierarchy.
In particular, the commentStart position (stored in Scanner) is always positive when used from Parser, and can be negative for CommentRecorderParser. 

This can cause some problem when implementing algorithms which are to be inherited across the hierarchy.
Comment 1 Philipe Mulet CLA 2008-09-09 04:24:44 EDT
We need to use negative commentStart also in root Parser class, and check all algorithms to ensure they are expecting it.
Comment 2 Frederic Fusier CLA 2008-09-09 10:01:58 EDT
Created attachment 112079 [details]
Proposed patch
Comment 3 Frederic Fusier CLA 2008-09-09 10:02:22 EDT
Released for 3.5M2
Comment 4 David Audel CLA 2008-09-15 09:47:22 EDT
Verified for 3.5M2 using I20080914-2000