investflow / mqlidea

MQL4 plugin for Intellij Idea
http://investflow.ru/mqlidea
GNU General Public License v3.0
52 stars 20 forks source link

"Identifier expected" and "Unexpected token" errors at an instance declaration #7

Closed canaryw1127 closed 3 years ago

canaryw1127 commented 3 years ago

Hi!

I found the following errors. It would be great if they were fixed.

Regards,


1st error:

image

2nd error:

image

Code sample:

This code has no compile error.

#define SOME_CONVERSION(arg) (arg - 1)

class ClassA {
public:
  ClassA(int arg1, int arg2) {};
};

ClassA a(SOME_CONVERSION(1), 2);
mfursov commented 3 years ago

The parser in the plugin is not very advanced and can't separate constructor calls from function declaration statements. This way the best solution today would be to avoid false positive results: I will turn off such errors completely.