Bug 84558 - Strange error message when using keywords "const" and "goto" as variable names
Summary: Strange error message when using keywords "const" and "goto" as variable names
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 minor (vote)
Target Milestone: 3.1 M5   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-07 07:06 EST by Markus Keller CLA
Modified: 2005-02-16 13:00 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2005-02-07 07:06:46 EST
I20050202-0800

double const= Math.PI;

The error message is:
'Syntax error on token "Invalid Character", invalid VariableDeclaratorId'

For keywords other than "const" and "goto", the error message includes the
offending constant's name in the error message, i.e.
'Syntax error on token "public", invalid VariableDeclaratorId'.
Comment 1 Olivier Thomann CLA 2005-02-07 20:58:48 EST
The problem comes from the fact that goto and const are not returned as tokens.
Comment 2 Olivier Thomann CLA 2005-02-07 21:38:12 EST
Added const and goto as tokens.
Error message are now consistent.
Fixed and released in HEAD.
Comment 3 David Audel CLA 2005-02-16 13:00:51 EST
Verified in I20050215-2300