Class CssConstantReferenceNode
java.lang.Object
com.google.common.css.compiler.ast.CssNode
com.google.common.css.compiler.ast.CssValueNode
com.google.common.css.compiler.ast.CssConstantReferenceNode
- All Implemented Interfaces:
Locatable
A node holding a reference to a constant or an argument of a mixin
definition.
Because references can be valid within one block, each reference has a scope where it is valid. For example, references to arguments of mixin definitions are only valid in the block of the mixin definition whereas references to global definitions are valid everywhere.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new constant reference node that is a deep copy of the given node.CssConstantReferenceNode(String value) CssConstantReferenceNode(String value, SourceCodeLocation sourceCodeLocation) -
Method Summary
Modifier and TypeMethodDescriptiondeepCopy()getScope()Returns the scope of the reference.static booleanisDefinitionReference(String ident) Returns if the given identifier matches the pattern of a constant.voidMethods inherited from class com.google.common.css.compiler.ast.CssValueNode
getIsDefault, getValue, setIsDefault, setValue, toStringMethods inherited from class com.google.common.css.compiler.ast.CssNode
ancestors, appendComment, deepCopyNodes, equals, getComments, getParent, getShouldBeFlipped, getSourceCodeLocation, getVisitController, hasComment, hashCode, inFunArgs, setComments, setShouldBeFlipped, setSourceCodeLocation
-
Constructor Details
-
CssConstantReferenceNode
-
CssConstantReferenceNode
-
CssConstantReferenceNode
Creates a new constant reference node that is a deep copy of the given node.- Parameters:
node- node
-
-
Method Details
-
deepCopy
- Specified by:
deepCopyin classCssValueNode
-
getScope
Returns the scope of the reference. If the reference belongs to a global definition, the scope is the 'global scope'. If the reference belongs to an argument of a mixin definition, the scope is the mixin definition.- Returns:
- scope
-
setScope
-
isDefinitionReference
Returns if the given identifier matches the pattern of a constant.- Parameters:
ident- identifier
-