Donner
C++20 SVG rendering library
Loading...
Searching...
No Matches
Token.h File Reference
#include <optional>
#include <ostream>
#include <variant>
#include "donner/base/Length.h"
#include "donner/base/RcString.h"
#include "donner/base/parser/FileOffset.h"
Include dependency graph for Token.h:
This graph shows which files directly or indirectly include this file:

Classes

struct  donner::css::Token
 A CSS token, which are created as a first step when parsing a CSS string. More...
 
struct  donner::css::Token::Ident
 <ident-token>, which represents a CSS identifier, which is an unquoted string. More...
 
struct  donner::css::Token::Function
 <function-token>, which indicates the start of a function call. More...
 
struct  donner::css::Token::AtKeyword
 <at-keyword-token>, representing @ followed by an identifier. More...
 
struct  donner::css::Token::Hash
 <hash-token>, representing a CSS identifier that starts with a #. More...
 
struct  donner::css::Token::String
 <string-token>, which represents a quoted string, either with double or single quotes ("foo" or ‘'foo’`). More...
 
struct  donner::css::Token::BadString
 <bad-string-token>, which is generated when a string contains an unescaped newline. More...
 
struct  donner::css::Token::Url
 <url-token>, which represents a url() function. More...
 
struct  donner::css::Token::BadUrl
 <bad-url-token>, which represents an invalid url() function. More...
 
struct  donner::css::Token::Delim
 <delim-token>, which contains a single character. More...
 
struct  donner::css::Token::Number
 <number-token>, which represents a number, either integer or floating point. More...
 
struct  donner::css::Token::Percentage
 <percentage-token>, which represents a percentage such as '50'. More...
 
struct  donner::css::Token::Dimension
 <dimension-token>, which represents a dimension such as '50px'. More...
 
struct  donner::css::Token::Whitespace
 <whitespace-token>, which contains one or more whitespace characters in the source. More...
 
struct  donner::css::Token::CDO
 <CDO-token>, which represents <!-- in the source. More...
 
struct  donner::css::Token::CDC
 <CDC-token>, which represents --> in the source. More...
 
struct  donner::css::Token::Colon
 <colon-token>, which represents ':' in the source. More...
 
struct  donner::css::Token::Semicolon
 <semicolon-token>, which represents ';' in the source. More...
 
struct  donner::css::Token::Comma
 <comma-token>, which represents ',' in the source. More...
 
struct  donner::css::Token::SquareBracket
 <[-token>, which represents [ in the source. More...
 
struct  donner::css::Token::Parenthesis
 <(-token>, which represents ( in the source. More...
 
struct  donner::css::Token::CurlyBracket
 <{-token>, which represents { in the source. More...
 
struct  donner::css::Token::CloseSquareBracket
 <]-token>, which represents ] in the source. More...
 
struct  donner::css::Token::CloseParenthesis
 <)-token>, which represents ) in the source. More...
 
struct  donner::css::Token::CloseCurlyBracket
 <}-token>, which represents } in the source. More...
 
struct  donner::css::Token::ErrorToken
 Special error token, used to mark named parsing errors. More...
 
struct  donner::css::Token::EofToken
 <EOF-token>, which marks the end of the input stream and is always output at the end of a token list. More...
 

Namespaces

namespace  donner
 Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css.
 
namespace  donner::css
 Donner CSS library, a standalone composable CSS parser.
 

Typedefs

using donner::css::TokenIndex = size_t
 Type of the token unique identifier, which is returned by Token::tokenIndex() and Token::indexOf<T>().
 

Enumerations

enum class  donner::css::NumberType {
  donner::css::Integer ,
  donner::css::Number
}
 Indicates if a number is an integer or a floating point number, used for number-containing tokens such as `Token::Number` and Token::Dimension. More...