Bug 273554 - Unexpected error message for mathematical term (wrong detection of Regex)
Summary: Unexpected error message for mathematical term (wrong detection of Regex)
Status: RESOLVED FIXED
Alias: None
Product: JSDT
Classification: WebTools
Component: General (show other bugs)
Version: 3.0.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0.5   Edit
Assignee: Chris Jaun CLA
QA Contact: Nitin Dahyabhai CLA
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2009-04-24 03:31 EDT by Jens Beyer CLA
Modified: 2010-03-03 11:12 EST (History)
1 user (show)

See Also:
thatnitind: review+


Attachments
Fixes the scanner in the checkIfDivide method. (981 bytes, patch)
2009-04-28 13:47 EDT, Chris Jaun CLA
thatnitind: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jens Beyer CLA 2009-04-24 03:31:49 EDT
Build ID: Version: 3.4.2 Build id: M20090211-1700

Steps To Reproduce:
The following line

var a = 1.2 / 3 + 4.5 / 6;

shows an error "Syntax error on token (Invalid Regular Expression Options), no accurate correction available".

This is not expected, since it is a standard mathematical term, not a Regular expression.

I believe it is triggered by the combination of two slashes (/) in one line (which happens to be the division operator) and at least one dot (.) (for floating point numbers) before the first / sign.

More information:
JSDT 1.0.4
Comment 1 Jens Beyer CLA 2009-04-24 03:34:30 EDT
Sorry, changed "component" from "wst.javascript" to "wst.jsdt".
Comment 2 Chris Jaun CLA 2009-04-28 13:47:14 EDT
Created attachment 133599 [details]
Fixes the scanner in the checkIfDivide method.
Comment 3 Chris Jaun CLA 2009-04-28 13:47:43 EDT
This patch should go in 3.0.5 and 3.1.
Comment 4 Nitin Dahyabhai CLA 2009-04-29 00:12:13 EDT
Approved.  Also added TokenNameLongLiteral to 3.1 branch.