-
Notifications
You must be signed in to change notification settings - Fork 630
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1964 from masatake/cleanup-inclusions
Defining interface for parsers (part 6 of 6)
- Loading branch information
Showing
15 changed files
with
328 additions
and
260 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
/* | ||
* | ||
* Copyright (c) 2015, Red Hat, Inc. | ||
* Copyright (c) 2015, Masatake YAMATO | ||
* | ||
* Author: Masatake YAMATO <yamato@redhat.com> | ||
* | ||
* This source code is released for free distribution under the terms of the | ||
* GNU General Public License version 2 or (at your option) any later version. | ||
* | ||
*/ | ||
#ifndef CTAGS_MAIN_FIELD_PRIVATE_H | ||
#define CTAGS_MAIN_FIELD_PRIVATE_H | ||
|
||
/* | ||
* INCLUDE FILES | ||
*/ | ||
#include "general.h" | ||
#include "colprint_p.h" | ||
#include "field.h" | ||
|
||
/* | ||
* DATA DECLARATIONS | ||
*/ | ||
|
||
|
||
/* | ||
* FUNCTION PROTOTYPES | ||
*/ | ||
|
||
extern fieldType getFieldTypeForOption (char letter); | ||
|
||
/* | ||
`getFieldTypeForName' is for looking for a field not owned by any parser, | ||
`getFieldTypeForNameAndLanguage' can be used for getting all fields having | ||
the same name; specify `LANG_AUTO' as `language' parameter to get the first | ||
field having the name. With the returned fieldType, `nextSiblingField' gets | ||
the next field having the same name. `nextSiblingField' returns `FIELD_UNKNOWN' | ||
at the end of iteration. | ||
Specifying `LANG_IGNORE' has the same effects as `LANG_AUTO'. However, | ||
internally, each parser is not initialized. `LANG_IGNORE' is a bit faster. */ | ||
extern fieldType getFieldTypeForName (const char *name); | ||
extern fieldType getFieldTypeForNameAndLanguage (const char *fieldName, langType language); | ||
extern bool enableField (fieldType type, bool state, bool warnIfFixedField); | ||
extern bool isCommonField (fieldType type); | ||
extern int getFieldOwner (fieldType type); | ||
extern const char* getFieldName (fieldType type); | ||
extern unsigned int getFieldDataType (fieldType type); | ||
extern void printFields (int language); | ||
|
||
/* Whether the field specified with TYPE has a | ||
method for rendering in the current format. */ | ||
extern bool doesFieldHaveRenderer (fieldType type, bool noEscaping); | ||
|
||
extern bool doesFieldHaveValue (fieldType type, const tagEntryInfo *tag); | ||
|
||
extern const char* renderField (fieldType type, const tagEntryInfo *tag, int index); | ||
extern const char* renderFieldNoEscaping (fieldType type, const tagEntryInfo *tag, int index); | ||
extern bool doesFieldHaveWhitespaceChar (fieldType type, const tagEntryInfo *tag, int index); | ||
|
||
extern void initFieldObjects (void); | ||
extern int countFields (void); | ||
|
||
/* language should be typed to langType. | ||
Use int here to avoid circular dependency */ | ||
extern int defineField (fieldDefinition *spec, langType language); | ||
extern fieldType nextSiblingField (fieldType type); | ||
|
||
/* --list-fields implementation. LANGUAGE must be initialized. */ | ||
extern struct colprintTable * fieldColprintTableNew (void); | ||
extern void fieldColprintAddCommonLines (struct colprintTable *table); | ||
extern void fieldColprintAddLanguageLines (struct colprintTable *table, langType language); | ||
extern void fieldColprintTablePrint (struct colprintTable *table, | ||
bool withListHeader, bool machinable, FILE *fp); | ||
|
||
#endif /* CTAGS_MAIN_FIELD_PRIVATE_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.