示例#1
0
文件: vim.c 项目: Cognoscan/ctags
static boolean parseVimLine (const unsigned char *line)
{
	boolean readNextLine = TRUE;

	if ( (!strncmp ((const char*) line, "comp", (size_t) 4) == 0) && 
			(!strncmp ((const char*) line, "comc", (size_t) 4) == 0) && 
			(strncmp ((const char*) line, "com", (size_t) 3) == 0) )
	{
		readNextLine = parseCommand(line);
		/* TODO - Handle parseCommand returning FALSE */
	}

	if (isMap(line))
	{
		parseMap(line);
	}

	if (strncmp ((const char*) line, "fu", (size_t) 2) == 0)
	{
		parseFunction(line);
	}

	if	(strncmp ((const char*) line, "aug", (size_t) 3) == 0)
	{
		parseAutogroup(line);
	}

	if ( strncmp ((const char*) line, "let", (size_t) 3) == 0 )
	{
		parseLet(line);
	}

	return readNextLine;
}
示例#2
0
文件: vim.c 项目: Monits/ctags
static boolean parseVimLine (const unsigned char *line, int infunction)
{
	boolean readNextLine = TRUE;

	if (wordMatchLen (line, "command", 3))
	{
		readNextLine = parseCommand(line);
		/* TODO - Handle parseCommand returning FALSE */
	}

	else if (isMap(line))
	{
		parseMap(skipWord(line));
	}

	else if (wordMatchLen (line, "function", 2))
	{
		parseFunction(skipWord(line));
	}

	else if	(wordMatchLen (line, "augroup", 3))
	{
		parseAutogroup(skipWord(line));
	}

	else if (wordMatchLen (line, "let", 3))
	{
		parseLet(skipWord(line), infunction);
	}

	return readNextLine;
}