This looks correct. Most probably, the line before the line:
var A = {};
Should have the issue. And if you try to remove this line, there will be error thrown in the same line again, but it would have a different code. Check for missing semi-colons in the previous line.
solved Error creating an empty object literal