1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-27 02:56:18 -04:00
elinks/src/document/css/parser.h
Witold Filipczyk 0fea79cc8f [cflags] Removed -Wno-pointer-sign
Likely some new bugs were introduced by this change.
The long term goal is clean compilation by g++.
2021-01-02 16:20:27 +01:00

38 lines
1.1 KiB
C

/*! @file
* This is interface for the value parser. It is intended to be used
* only internally inside of the CSS engine. */
#ifndef EL__DOCUMENT_CSS_PARSER_H
#define EL__DOCUMENT_CSS_PARSER_H
#include "util/lists.h"
#ifdef __cplusplus
extern "C" {
#endif
struct scanner;
struct css_stylesheet;
struct uri;
/** This function takes a semicolon separated list of declarations
* from the given string, parses them to atoms, and chains the newly
* created struct css_property objects to the specified list.
* @returns positive value in case it recognized a property in the
* given string, or zero in case of an error. */
void css_parse_properties(LIST_OF(struct css_property) *props,
struct scanner *scanner);
/** Parses the @a string and adds any recognized selectors + properties to the
* given stylesheet @a css. If the selector is already in the stylesheet it
* properties are added to the that selector. */
void css_parse_stylesheet(struct css_stylesheet *css, struct uri *base_uri,
const char *string, const char *end);
#ifdef __cplusplus
}
#endif
#endif