Add source code documentation for the CSS Selectors parsers

This commit is contained in:
iska
2015-12-21 17:17:51 +01:00
parent 8d672cf0cf
commit 032c428725
2 changed files with 26 additions and 0 deletions
+11
View File
@@ -11,8 +11,19 @@
NS_ASSUME_NONNULL_BEGIN
/**
The Nth-Expression Parser.
Parses CSS nth-expressions, e.g. '-2n+3', 'odd', ...etc.
*/
@interface CSSNthExpressionParser : NSObject
/**
Parses a CSS nth-exrepssion string.
@param expression The expression string to parse.
@see CSSNthExpression
*/
+ (CSSNthExpression)parseExpression:(NSString *)expression;
@end
+15
View File
@@ -12,8 +12,23 @@ NS_ASSUME_NONNULL_BEGIN
@class CSSSelector;
/**
The CSS Selectors Parser.
Parses CSS Level 3 Selectors:
http://www.w3.org/TR/css3-selectors/
*/
@interface CSSSelectorParser : NSObject
/**
Parses a CSS3 selector string.
@param string The CSS3 selector string.
@param error If an error occurs, upon return contains an `NSError` object that describes the problem.
@returns A parsed CSSSelector, `nil` if an error occurred.
@see CSSelector
*/
+ (CSSSelector *)parseSelector:(NSString *)string error:(NSError **)error;
@end