Handles the parsing of CSS content.
|
| CssLexer (string text, Node scope) |
|
Rule | ReadRules (out Rule[] set) |
| Reads a rule from this lexer. More...
|
|
Selector | ReadSelector () |
| Reads one selector without a block. More...
|
|
void | ReadSelectors (List< Selector > all) |
| Reads one or more selectors without a block. More...
|
|
void | SkipJunk () |
| Skips any junk such as whitespaces or comments. More...
|
|
Css.Value | GetVariable (string name) |
| Gets the value of a CSS variable from the variable set. More...
|
|
void | AddVariable (string name, Css.Value value) |
| Adds a CSS variable to the variable set. More...
|
|
void | ErrorRecovery () |
| Attempt to recover the stream to a new readable state. More...
|
|
Css.Value | ReadFunction (string name) |
| Reads a function with the given lowercase name. There must be a bracket at the current read head. More...
|
|
void | SkipBlock () |
| Skips a whole block. More...
|
|
Css.Value | ReadValue () |
| The lexer must be in literal mode for this. Reads a value from the stream. May read a whole set or null if there's a ) or ; at the read head. More...
|
|
Css.Value | ReadLiteralValue () |
| Reads a single value from the stream in literal mode. More...
|
|
Css.Value | ReadSingleValue () |
| Reads a single value from the stream. More...
|
|
string | ReadString () |
| Reads a single value as a string only. More...
|
|
| StringReader (byte[] str) |
| Creates a new reader for the raw single-byte encoded string. Useful if you're talking to e.g. a webserver with a binary protocol. More...
|
|
| StringReader (string str) |
| Creates a new reader for the given string. More...
|
|
bool | More () |
| Checks if there is anything left to read. More...
|
|
bool | Peek (string str) |
| Checks if the given string is next. More...
|
|
bool | PeekLower (string str) |
| Checks if the given string is next; it checks by lowercasing the target character. More...
|
|
char | Peek () |
| Takes a peek at the next character in the stream without reading it. More...
|
|
char | Peek (int delta) |
| Takes a peek at the character that is a number of characters away from the next one without actually reading it. Peek(0) is the next character, Peek(1) is the one after that etc. More...
|
|
void | StepBack () |
| Steps back one place in the stream. More...
|
|
void | Advance () |
| Steps forward one place in the stream. More...
|
|
void | Advance (int places) |
| Steps forward the given number of places in the stream. More...
|
|
int | Length () |
| The length of the string. More...
|
|
string | ReadString (int length) |
| Reads a substring of the given length. Note that this does not do bounds checking. More...
|
|
virtual char | Read () |
| Reads a character from the stream and advances the stream one place. More...
|
|
void | ReadUntil (char character) |
| Keeps reading the given character from the stream until it's no longer next. Used for e.g. stripping an unknown length block of whitespaces in the stream. More...
|
|
void | ReadOff (char[] chars) |
| Keeps reading from the stream until no characters in the given set are next. Used for e.g. stripping an unknown number of newlines (
or ) from this stream. More...
|
|
void | ReadOff (char[] chars, out int count) |
| Keeps reading from the stream until no characters in the given set are next. Used for e.g. stripping an unknown number of newlines (
or ) from this stream. More...
|
|
int | NextIndexOf (char character) |
| Gets the next index of the given character. The length is returned if it wasn't found at all. More...
|
|
int | NextIndexOf (char character, int limit) |
| Gets the next index of the given character, up to limit. Limit is returned if it wasn't found at all. More...
|
|
virtual int | GetLineNumber () |
| Gets the line number that the pointer is currently at. More...
|
|
int | GetLineNumber (out int charOnLine) |
| Gets the line number and character number that the pointer is currently at. More...
|
|
string | ReadLine (int lineNumber) |
| Reads the numbered line from this stream. More...
|
|
|
static Rule | ConvertToRule (Rule parentRule, Css.Value value, StyleSheet sheet, out Rule[] ruleSet) |
| Converts a value to a rule. Note that it can be a set of rules (RuleSet). More...
|
|
static SelectorMatcher | ReadSelectorMatcher (Css.Value value) |
| Reads a single selector matcher. E.g. :hover or .test More...
|
|
static Selector | ReadSelectors (StyleSheet sheet, Css.Value value, List< Selector > all) |
| Reads one or more selectors from the given value. More...
|
|
static int | NextIndexOf (int position, string input, char character, int limit) |
| Gets the next index of the given character, up to limit. Limit is returned if it wasn't found at all. More...
|
|
static int | NextIndexOf (int position, string input, char character) |
| Gets the next index of the given character. The length is returned if it wasn't found at all. More...
|
|