com.vaadin.sass.internal.tree
Class MixinNode
java.lang.Object
com.vaadin.sass.internal.tree.Node
com.vaadin.sass.internal.tree.MixinNode
- All Implemented Interfaces:
- IVariableNode, NodeWithUrlContent, Serializable
public class MixinNode
- extends Node
- implements IVariableNode, NodeWithUrlContent
Node for including a Mixin.
MixinNode handles argument lists with support for variable arguments. When
variable arguments are used, a MixinNode expands a list into separate
arguments, whereas a DefNode packs several arguments into a list. The
corresponding definition node is MixinDefNode.
- Author:
- Vaadin
- See Also:
- Serialized Form
MixinNode
public MixinNode(String name)
MixinNode
public MixinNode(String name,
Collection<Variable> args,
boolean hasVariableArgs)
getArglist
public ActualArgumentList getArglist()
expandVariableArguments
protected void expandVariableArguments()
getName
public String getName()
replaceVariables
public void replaceVariables(ScssContext context)
- Replace variable references with their values in the argument list and
name.
- Specified by:
replaceVariables in interface IVariableNode
printState
public String printState()
- Description copied from class:
Node
- Prints out the current state of the node tree. Will return SCSS before
compile and CSS after.
Result value could be null.
- Overrides:
printState in class Node
- Returns:
- State as a string
toString
public String toString()
- Overrides:
toString in class Object
replaceVariablesForChildren
protected void replaceVariablesForChildren(ScssContext context)
traverse
public Collection<Node> traverse(ScssContext context)
- Description copied from class:
Node
- Method for manipulating the data contained within the
Node.
Traversing a node is allowed to modify the node, replace it with one or
more nodes at the same or later position in its parent and modify the
children of the node, but not modify or remove preceding nodes in its
parent. Traversing a node is also allowed to modify the definitions
currently in scope as its side-effect.
- Specified by:
traverse in class Node
- Parameters:
context - current compilation context
- Returns:
- nodes replacing the current node
copy
public MixinNode copy()
- Description copied from class:
Node
- Copy a node (deep copy including children).
The copy is detached from the original tree, with null as parent, and
data that is not relevant to handling of function or mixin expansion is
not copied.
- Specified by:
copy in class Node
- Returns:
- copy of the node
updateUrl
public NodeWithUrlContent updateUrl(String prefix)
- Description copied from interface:
NodeWithUrlContent
- Returns a new Node that is otherwise identical to this but has all urls
updated by adding the specified prefix and cleaning the resulting path
to, e.g., eliminate redundant parent folder references. Does not modify
this node.
- Specified by:
updateUrl in interface NodeWithUrlContent
- Parameters:
prefix - the prefix to be added to all urls contained in this Node.
Copyright © 2013–2015 Vaadin. All rights reserved.