abujehad139 / js-addin

Automatically exported from code.google.com/p/js-addin
0 stars 0 forks source link

Use of unused reserved words causes the parser to stop parsing past that point #18

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Open a file with JS that uses a JS reserved word that isn't currently in use 
in the current JS specification. Here's some code that will reproduce the 
problem:

function ThisFunctionIsVisible(rootTitle, subTitle)
{
    this._rootTitle = rootTitle;
    this._subTitle = subTitle;
}

function BuggyFunction(whatever)
{
    whatever.static();
}

function ThisFunctionDoesntShowUp()
{
    return false;
}

What is the expected output? 
I expect to see the "ThisFunctionDoesntShowUp" function visible in the parser, 
or failing that, an error explaining the problem with the code.

What do you see instead?
It is not visible.

What version of the product are you using? On what operating system?
v3.2 on VS 2010 Ultimate
Windows Server 2008 R2
Other VS Extensions:
- JSEnhancements
- Productivity Power Tools
- Quick Open File for VS 2010

Please provide any additional information below.
I know that it probably isn't technically correct to support using reserved 
words this way, however when dealing with a large codebase where coding 
conventions are not strictly followed, reserved words can often sneak in. It is 
much more useful for JS Parser to be liberal in what it accepts, since many 
browsers do tha same.

Perhaps you could offer a strict mode that treats these as errors, exposing 
them to the user as well.

Original issue reported on code.google.com by timothy....@gmail.com on 19 Sep 2011 at 10:14

GoogleCodeExporter commented 9 years ago
Thank you for the detailed described issue.

Yes, it is possible to display parsing errors, and this particular error is 
handled correctly, in near future I will release new version with this 
functionality.

Original comment by mega.boich@gmail.com on 20 Sep 2011 at 9:18

GoogleCodeExporter commented 9 years ago

Original comment by mega.boich@gmail.com on 20 Sep 2011 at 9:19

GoogleCodeExporter commented 9 years ago
Fixed in 3.3

Original comment by mega.boich@gmail.com on 13 Oct 2011 at 8:02