Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#ifdef breaks "Go to symbol" menu #27

Open
coccoinomane opened this issue May 9, 2015 · 0 comments
Open

#ifdef breaks "Go to symbol" menu #27

coccoinomane opened this issue May 9, 2015 · 0 comments

Comments

@coccoinomane
Copy link

Hi!
If you invoke the "Go to symbol" menu (cmd + shift+ t) in the following C standalone code, you'll see that all the parsing stops after the first #endif. That is, the function any_function() is not listed in the "Go to symbol" menu.

#include "stdio.h"

#define PREPROCESSOR_FLAG

int main (int argc, char const *argv[])
{

  short regular_flag = 1;

  #ifdef PREPROCESSOR_FLAG
  if (regular_flag) {
  #endif
    printf ("Hello world!\n");
  #ifdef PREPROCESSOR_FLAG
  }
  #endif  

  return 0;
}

int any_function () {
  return 0;
}

The issue goes away if I comment out the line inside the first #ifdef block, that is if (regular_flag) {. By doing so however the code does not compile anymore.

I run Textmate 2.0-beta.7.1 on a Retina MacBook Pro with Mac Os X 10.10.2 (Yosemite).

Thank you for your attention!
Cheers,
Guido

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant