ELinks 0.18.0
scanner.h File Reference
#include "dom/scanner.h"
Include dependency graph for scanner.h:
This graph shows which files directly or indirectly include this file:

Macros

#define skip_css_tokens(scanner, type)
#define get_css_precedence(token_type)

Enumerations

enum  css_token_type {
  CSS_TOKEN_IDENT = 256 , CSS_TOKEN_NUMBER , CSS_TOKEN_PERCENTAGE , CSS_TOKEN_STRING ,
  CSS_TOKEN_ANGLE , CSS_TOKEN_DIMENSION , CSS_TOKEN_EM , CSS_TOKEN_EX ,
  CSS_TOKEN_FREQUENCY , CSS_TOKEN_LENGTH , CSS_TOKEN_TIME , CSS_TOKEN_HASH ,
  CSS_TOKEN_HEX_COLOR , CSS_TOKEN_FUNCTION , CSS_TOKEN_RGB , CSS_TOKEN_URL ,
  CSS_TOKEN_AT_KEYWORD , CSS_TOKEN_AT_CHARSET , CSS_TOKEN_AT_FONT_FACE , CSS_TOKEN_AT_IMPORT ,
  CSS_TOKEN_AT_MEDIA , CSS_TOKEN_AT_PAGE , CSS_TOKEN_IMPORTANT , CSS_TOKEN_SELECT_SPACE_LIST ,
  CSS_TOKEN_SELECT_HYPHEN_LIST , CSS_TOKEN_SELECT_BEGIN , CSS_TOKEN_SELECT_END , CSS_TOKEN_SELECT_CONTAINS ,
  CSS_TOKEN_GARBAGE , CSS_TOKEN_SKIP , CSS_TOKEN_NONE = 0
}

Functions

static int check_css_precedence (int type, int skipto)

Variables

struct dom_scanner_info dom_css_scanner_info

Macro Definition Documentation

◆ get_css_precedence

#define get_css_precedence ( token_type)
Value:
((token_type) == '}' ? (1 << 10) : \
(token_type) == '{' ? (1 << 9) : \
(token_type) == ';' ? (1 << 8) : \
(token_type) == ')' ? (1 << 7) : 0)

◆ skip_css_tokens

#define skip_css_tokens ( scanner,
type )
Value:
#define get_css_precedence(token_type)
Definition scanner.h:109
struct dom_scanner_token * skip_dom_scanner_tokens(struct dom_scanner *scanner, int skipto, int precedence)
Conditionally skip tokens.
Definition scanner.c:35
const char * type
Definition download.c:1899
The struct scanner describes the current state of the scanner.
Definition scanner.h:107

Enumeration Type Documentation

◆ css_token_type

Enumerator
CSS_TOKEN_IDENT 
CSS_TOKEN_NUMBER 
CSS_TOKEN_PERCENTAGE 
CSS_TOKEN_STRING 
CSS_TOKEN_ANGLE 
CSS_TOKEN_DIMENSION 
CSS_TOKEN_EM 
CSS_TOKEN_EX 
CSS_TOKEN_FREQUENCY 
CSS_TOKEN_LENGTH 
CSS_TOKEN_TIME 
CSS_TOKEN_HASH 
CSS_TOKEN_HEX_COLOR 
CSS_TOKEN_FUNCTION 
CSS_TOKEN_RGB 
CSS_TOKEN_URL 
CSS_TOKEN_AT_KEYWORD 
CSS_TOKEN_AT_CHARSET 
CSS_TOKEN_AT_FONT_FACE 
CSS_TOKEN_AT_IMPORT 
CSS_TOKEN_AT_MEDIA 
CSS_TOKEN_AT_PAGE 
CSS_TOKEN_IMPORTANT 
CSS_TOKEN_SELECT_SPACE_LIST 
CSS_TOKEN_SELECT_HYPHEN_LIST 
CSS_TOKEN_SELECT_BEGIN 
CSS_TOKEN_SELECT_END 
CSS_TOKEN_SELECT_CONTAINS 
CSS_TOKEN_GARBAGE 
CSS_TOKEN_SKIP 
CSS_TOKEN_NONE 

Function Documentation

◆ check_css_precedence()

int check_css_precedence ( int type,
int skipto )
inlinestatic

Variable Documentation

◆ dom_css_scanner_info

struct dom_scanner_info dom_css_scanner_info
extern