CSSTokenizer

Undocumented in source.

Members

Functions

consumeBadUrl
void consumeBadUrl()
Undocumented in source. Be warned that the author may not have intended to support it.
consumeIdent
bool consumeIdent(char[] tokenText)

Consume identifier at current position, append it to tokenText

emitDelimToken
CSSTokenType emitDelimToken()
Undocumented in source. Be warned that the author may not have intended to support it.
emitDoubleCharToken
CSSTokenType emitDoubleCharToken(CSSTokenType type)

emit double char token like $= *=

emitSingleCharToken
CSSTokenType emitSingleCharToken(CSSTokenType type)

emit single char token like () {} [] : ;

eof
bool eof()
Undocumented in source. Be warned that the author may not have intended to support it.
isIdentStart
bool isIdentStart(size_t p)

returns true if current tokenEnd position is identifier start

next
CSSTokenType next()
Undocumented in source. Be warned that the author may not have intended to support it.
nextToken
CSSToken nextToken()

same as next() but returns filled CSSToken struct

parseComment
CSSTokenType parseComment()

current chars are /*

parseHashToken
CSSTokenType parseHashToken()
Undocumented in source. Be warned that the author may not have intended to support it.
parseIdent
bool parseIdent()

Parse identifier. Returns true if identifier is parsed. tokenText will contain identifier text.

parseNumber
bool parseNumber()

Parse identifier. Returns true if identifier is parsed. tokenText will contain identifier text.

parseString
bool parseString(char quotationChar)
Undocumented in source. Be warned that the author may not have intended to support it.
parseUnicodeRangeToken
CSSTokenType parseUnicodeRangeToken()

current chars are U+ or u+ followed by hex digit or ?

parseUrlToken
void parseUrlToken()
Undocumented in source. Be warned that the author may not have intended to support it.
skipWhiteSpace
bool skipWhiteSpace()

Skip whitespace; return true if at least one whitespace char is skipped; move tokenEnd position tokenType will be set to newline if any newline character found, otherwise - to whitespace

start
void start(string _src)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

dimensionUnit
char[] dimensionUnit;
Undocumented in source.
src
char[] src;

CSS source code (utf-8)

tokenDoubleValue
double tokenDoubleValue;
Undocumented in source.
tokenEnd
size_t tokenEnd;

current token end byte offset

tokenIntValue
long tokenIntValue;
Undocumented in source.
tokenStart
size_t tokenStart;

current token start byte offset

tokenText
char[] tokenText;
Undocumented in source.
tokenType
CSSTokenType tokenType;

current token type

tokenTypeFlagId
bool tokenTypeFlagId;
Undocumented in source.
tokenTypeInteger
bool tokenTypeInteger;
Undocumented in source.
unicodeRangeEnd
uint unicodeRangeEnd;
Undocumented in source.
unicodeRangeStart
uint unicodeRangeStart;
Undocumented in source.

Meta