Subscribe

why the c/c++ parser use the parser2?

You are viewing a single message from this topic. View all messages.

  1. 2010-11-08 04:11:27 PST
    Hi, from the source code c.c, I found that there are code like: extern parserDefinition* CParser (void) { static const char *const extensions [] = { "c", NULL }; parserDefinition* def = parserNew ("C"); def->kinds = CKinds; def->kindCount = KIND_COUNT (CKinds); def->extensions = extensions; def->parser2 = findCTags; def->initialize = initializeCParser; return def; } extern parserDefinition* CppParser (void) { static const char *const extensions [] = { "c++", "cc", "cp", "cpp", "cxx", "h", "h++", "hh", "hp", "hpp", "hxx", #ifndef CASE_INSENSITIVE_FILENAMES "C", "H", #endif NULL }; parserDefinition* def = parserNew ("C++"); def->kinds = CKinds; def->kindCount = KIND_COUNT (CKinds); def->extensions = extensions; def->parser2 = findCTags; def->initialize = initializeCppParser; return def; } I just wondering that why the parser2 is used? it seems the parser field is left, it is default set to NULL? thanks.
Jump To:
< Previous | 1 | Next >

Add a Reply

This forum does not allow anonymous participation.

Log in to add a reply. Not registered? Create an account to participate and receive email updates when replies are posted to this topic.