On February 21, 2009 at 14:20, Rusty Fobe said...
I wonder if it is possible to get the statement line number from the prontoscript compiler.
Barry, in case you missed the last 2 words of the original question...
Rusty wants the line # from the compiler on the remote, not from dev time. My suggestion for using JSLint was not an end-all be all as out of the box, it does not check object field name name syntax. So, for that JSLint is rather useless as I typically create classes and use member fields vs using vars.
For example:
function MyClass()
{
this.myField = 'Hello';
};
MyClass.prototype.func = function()
{
var extra = " world!";
System.print(this.myField + extra);
}
var myClass = new MyClass();
myClass.func();
In this case you have object member fields and only use var inside a function. In my case, this is not typically the source of errors, it is fat-fingering the member field name such as "this.myfield" and requires debugging.
Does your tool catch this sort of error? If it does, it might be worth me investigating because it then supports JS "pseudo-classes" and might save me some time.