Author Topic: Parsing problem with concatenated strings  (Read 205 times)

rjpontefract

  • Community Member
  • Posts: 85
  • Hero Points: 4
Parsing problem with concatenated strings
« on: February 24, 2021, 08:29:27 pm »
Using SE 25.0.1, the following macro usage for FORMAT_STRING is highlighted as "symbol not found".  If I insert spaces around the macro usage it works as expected.  Unfortunately this is code that I can't change.  Is it possible to improve SEs parsing in this case?

Code: [Select]
#define FORMAT_STRING "%d"

int main(int argc, char**argv)
{
  int x = 42;
  printf("This is an example "FORMAT_STRING" with a format string", x);
}

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 3212
  • Hero Points: 459
Re: Parsing problem with concatenated strings
« Reply #1 on: February 24, 2021, 10:27:01 pm »
I will look into it.  Is the language mode C/C++ or ANSI-C ?  I think it is probably trying to resolved a user-defined string name.

rjpontefract

  • Community Member
  • Posts: 85
  • Hero Points: 4
Re: Parsing problem with concatenated strings
« Reply #2 on: February 24, 2021, 10:29:44 pm »
Hi Dennis
The language mode is C/C++.

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 3212
  • Hero Points: 459
Re: Parsing problem with concatenated strings
« Reply #3 on: March 02, 2021, 06:07:43 pm »
This will be fixed in the next hot fix for 25.0.1.  Thanks for catching this!

rjpontefract

  • Community Member
  • Posts: 85
  • Hero Points: 4
Re: Parsing problem with concatenated strings
« Reply #4 on: March 02, 2021, 06:32:00 pm »
That's good to hear, thanks Dennis