selector.e
来自「HTML-XML-utils由一套小型C程序(过滤器)组成」· E 代码 · 共 32 行
E
32 行
typedef enum { Root, NthChild, NthOfType, FirstChild, FirstOfType, Lang} PseudoType; typedef struct _PseudoCond { PseudoType type; int a, b; string s; struct _PseudoCond *next;} PseudoCond; typedef enum { Exists, Equals, Includes, StartsWith, EndsWidth, Contains, LangMatch, HasClass, HasID } Operator; typedef struct _AttribCond { Operator op; string name; string value; struct _AttribCond *next;} AttribCond; typedef enum { Descendant, Child, Adjacent, Sibling} Combinator; typedef struct _SimpleSelector { string name; AttribCond *attribs; PseudoCond *pseudos; Combinator combinator; struct _SimpleSelector *context;} SimpleSelector, *Selector; string selector_to_string(const Selector selector); Selector parse_selector(const string selector);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?