public class BaseTokenFactory extends Object implements TokenFactory
TokenFactory
s.
Subclasses can override methods as appropriate to specify alternative or additional tokens to recognize as various delimiters.
Modifier and Type | Field and Description |
---|---|
protected static Token |
AT_RULE_BLOCK_BEGIN |
protected static Token |
AT_RULE_BLOCK_END |
protected static Token |
AT_RULE_EXPRESSION_END |
protected static Token |
AT_RULE_TERMINATION |
protected static Token |
DECLARATION_END |
protected static Token |
SELECTOR_BEGIN |
protected static Token |
SELECTOR_DELIMITER |
protected static Token |
SELECTOR_END |
Constructor and Description |
---|
BaseTokenFactory() |
Modifier and Type | Method and Description |
---|---|
Token |
atRuleBlockBegin()
Gets the
Token representing the opening of an at-rule block. |
Token |
atRuleBlockEnd()
Gets the
Token representing the closing of an at-rule block. |
Token |
atRuleExpressionEnd()
Gets the
Token representing the end of an at-rule's expression. |
Token |
atRuleTermination()
Gets the
Token designating that the content of an at-rule is terminated (usually a semi-colon). |
Token |
declarationBlockBegin()
Gets the
Token representing the beginning of a declaration block. |
Token |
declarationBlockEnd()
Gets the
Token representing the end of a declaration block. |
Token |
declarationDelimiter()
Gets the
Token representing the delimiter between Declaration s. |
Token |
declarationEnd()
Gets the
Token representing what indicates the end of a Declaration . |
Token |
propertyNameEnd()
Gets the
Token representing what indicates the end of a Declaration 's property name. |
Token |
selectorBegin()
Gets the
Token representing what the first character of a Selector must be. |
Token |
selectorDelimiter()
Gets the
Token representing the delimiter between Selector s. |
Token |
selectorEnd()
Gets the
Token representing what indicates the end of a Selector . |
Optional<Token> |
specialDeclarationBegin()
Gets the
Token representing an optional special character that may appear before a normal property name in a Declaration . |
protected static final Token AT_RULE_BLOCK_BEGIN
protected static final Token AT_RULE_BLOCK_END
protected static final Token AT_RULE_TERMINATION
protected static final Token AT_RULE_EXPRESSION_END
protected static final Token SELECTOR_BEGIN
protected static final Token SELECTOR_DELIMITER
protected static final Token SELECTOR_END
protected static final Token DECLARATION_END
public Token atRuleExpressionEnd()
TokenFactory
Token
representing the end of an at-rule's expression.atRuleExpressionEnd
in interface TokenFactory
Token
representing the end of an at-rule's expression.public Token atRuleTermination()
TokenFactory
Token
designating that the content of an at-rule is terminated (usually a semi-colon).atRuleTermination
in interface TokenFactory
Token
designating that the content of an at-rule is terminated.public Token atRuleBlockBegin()
TokenFactory
Token
representing the opening of an at-rule block.atRuleBlockBegin
in interface TokenFactory
Token
representing the opening of an at-rule block.public Token atRuleBlockEnd()
TokenFactory
Token
representing the closing of an at-rule block.atRuleBlockEnd
in interface TokenFactory
Token
representing the closing of an at-rule block.public Token selectorBegin()
TokenFactory
Token
representing what the first character of a Selector
must be.selectorBegin
in interface TokenFactory
Token
representing the first character of a Selector
.public Token selectorDelimiter()
TokenFactory
Token
representing the delimiter between Selector
s.selectorDelimiter
in interface TokenFactory
Token
representing the Selector
delimiter.public Token selectorEnd()
TokenFactory
Token
representing what indicates the end of a Selector
.selectorEnd
in interface TokenFactory
Token
representing the end of the Selector
.public Token declarationBlockBegin()
TokenFactory
Token
representing the beginning of a declaration block.declarationBlockBegin
in interface TokenFactory
Token
representing the beginning of a declaration block.public Token declarationBlockEnd()
TokenFactory
Token
representing the end of a declaration block.declarationBlockEnd
in interface TokenFactory
Token
representing the end of a declaration block.public Token declarationDelimiter()
TokenFactory
Token
representing the delimiter between Declaration
s.declarationDelimiter
in interface TokenFactory
Token
representing the delimiter between Declaration
s.public Token declarationEnd()
TokenFactory
Token
representing what indicates the end of a Declaration
.declarationEnd
in interface TokenFactory
Token
representing the end of a Declaration
.public Token propertyNameEnd()
TokenFactory
Token
representing what indicates the end of a Declaration
's property name.propertyNameEnd
in interface TokenFactory
Token
representing what indicates the end of a property name.public Optional<Token> specialDeclarationBegin()
TokenFactory
Token
representing an optional special character that may appear before a normal property name in a Declaration
.
For example, to enable the star hack the "*" token could be returned. If overriding this method, consider using a CompoundToken
of the super class implementation.
specialDeclarationBegin
in interface TokenFactory
Token
representing an optional special Declaration
start character.Copyright (c) 2019, Salesforce.com, Inc. All rights reserved. Licensed under the BSD 3-Clause license. For full license text, see the LICENSE file in the repository.