示例#1
0
bool tokenSkipToType (tokenInfo *token, tokenType t)
{
	while (! (TOKEN_IS_EOF (token)
			  || token->type == t))
		tokenRead (token);

	return (token->type == t)? true: false;
}
示例#2
0
文件: tcloo.c 项目: masatake/ctags
static void parseMethod (tokenInfo *token, int owner)
{
	tokenRead (token);
	if (tokenIsType (token, TCL_IDENTIFIER))
	{
		tagEntryInfo e;

		initTagEntry(&e, vStringValue (token->string), K_METHOD);
		e.extensionFields.scopeIndex = owner;
		makeTagEntry (&e);
	}
	skipToEndOfTclCmdline (token);
}
示例#3
0
文件: tcloo.c 项目: masatake/ctags
static void parseSuperclass (tokenInfo *token, int this_class)
{
	tokenRead (token);
	if (tokenIsType (token, TCL_IDENTIFIER))
	{
		tagEntryInfo *e = getEntryInCorkQueue(this_class);

		if (e)
		{
			if (e->extensionFields.inheritance)
			{   /* superclass is used twice in a class. */
				eFree ((void *)e->extensionFields.inheritance);
			}
			e->extensionFields.inheritance = eStrdup(tokenString(token));
		}
	}
	skipToEndOfTclCmdline (token);
}
示例#4
0
bool tokenSkipOverPair (tokenInfo *token)
{
	int start = token->type;
	int end = token->klass->typeForUndefined;
	int i;

	for (i = 0; i < token->klass->pairCount; i++)
		if (start == token->klass->pairs[i].start)
			end = token->klass->pairs[i].end;

	if (end == token->klass->typeForUndefined)
		return false;

	int depth = 1;
	do {
		tokenRead (token);
		if (token->type == start)
			depth ++;
		else if (token->type == end)
			depth--;
	} while ((!TOKEN_IS_EOF(token)) && (depth > 0));

	return (depth == 0)? true: false;
}