Token, Lexer and Parser¶
Token¶
Lexer¶
-
class
stilus.lexer.Lexer(s: str, options: dict)[source]¶ -
-
__init__(s: str, options: dict)[source]¶ Initialize self. See help(type(self)) for accurate signature.
-
__weakref__¶ list of weak references to the object (if defined)
-
Parser¶
-
class
stilus.parser.Parser(s, options: dict)[source]¶ -
-
__weakref__¶ list of weak references to the object (if defined)
-
is_selector_token(n: int) → bool[source]¶ Check if the token at n is a valid selector token. :param n: :return:
-
parse() → stilus.nodes.node.Node[source]¶ Parse the given source string.
Returns: The root Node. Return type: Node
-