html.c

来自「ctags-5.5.4.tar.gz,一个很好的代码开发以及编辑源码」· C语言 代码 · 共 48 行

C
48
字号
/**   $Id: html.c,v 1.1 2003/03/03 03:59:19 darren Exp $**   Copyright (c) 2003, Darren Hiebert**   This source code is released for free distribution under the terms of the*   GNU General Public License.**   This module contains functions for generating tags for HTML language*   files.*//**   INCLUDE FILES*/#include "general.h"	/* must always come first */#include "parse.h"/**   FUNCTION DEFINITIONS*/static void installHtmlRegex (const langType language){#define POSSIBLE_ATTRIBUTES "([ \t]+[a-z]+=\"?[^>\"]*\"?)*"    addTagRegex (language,	    "<a"	    POSSIBLE_ATTRIBUTES	    "[ \t]+name=\"?([^>\"]+)\"?"	    POSSIBLE_ATTRIBUTES	    "[ \t]*>",	    "\\2", "a,anchor,named anchors", "i");    addTagRegex (language, "^[ \t]*function[ \t]*([A-Za-z0-9_]+)[ \t]*\\(",	    "\\1", "f,function,JavaScript functions", NULL);}/* Create parser definition stucture */extern parserDefinition* HtmlParser (void){    static const char *const extensions [] = { "htm", "html", NULL };    parserDefinition *const def = parserNew ("HTML");    def->extensions = extensions;    def->initialize = installHtmlRegex;    def->regex      = TRUE;    return def;}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?