Parser errors (e.g. ERROR error while parsing file) can occur when parsing Apex and VisualForce code. This can occur in various scenarios:
- You are running an old version of CodeScan: please upgrade
- Your file is running a very old apiVersion: upgrade the code to a more recent apiVersion. Some things that parse on older versions no longer parse on newer versions of Salesforce, we generally only support fairly new versions of the Salesforce code.
- Maybe you’ve found a bug: please tell us about it so we can fix it. Please send the full error and the file that it failed on - if you can’t send the whole file please send the line of code it fails on and a few lines above and below for context (the error message mentions the line that the error occurs on).