com.vaadin.sass.internal.parser
Class ArgumentList
java.lang.Object
com.vaadin.sass.internal.parser.SassList
com.vaadin.sass.internal.parser.ArgumentList
- All Implemented Interfaces:
- SassListItem, Serializable, Iterable<SassListItem>
public class ArgumentList
- extends SassList
- implements Serializable
An ArgumentList is used for packing arguments into a list. There can be named
and unnamed arguments, which are stored separately. ArgumentList is used for
representing the arguments of a function or a mixin. ArgumentList is also
used in ActualArgumentList to represent the unnamed (positional) and named
parameters of an @include or a function call.
- See Also:
- Serialized Form
| Methods inherited from class com.vaadin.sass.internal.parser.SassList |
buildString, containsArithmeticalOperator, containsVariable, equals, flatten, get, getColumnNumber, getContainedValue, getItems, getLineNumber, getSeparator, getStringWithNesting, hashCode, iterator, printState, setSeparator, setSourcePosition, size, unquotedString |
ArgumentList
public ArgumentList(SassList list)
ArgumentList
public ArgumentList(SassList.Separator separator,
List<SassListItem> list,
List<Variable> named)
ArgumentList
public ArgumentList(SassList.Separator sep,
SassListItem... items)
ArgumentList
public ArgumentList(SassList.Separator separator,
List<SassListItem> newParamValues)
getNamedVariables
public List<Variable> getNamedVariables()
replaceVariables
public ArgumentList replaceVariables(ScssContext context)
- Description copied from interface:
SassListItem
- Returns a new item that is otherwise equal to this one but all
occurrences of variables have been replaced by the values in the current
variable scope. Does not modify this item.
- Specified by:
replaceVariables in interface SassListItem- Overrides:
replaceVariables in class SassList
- Parameters:
context - the compilation context in which to evaluate functions,
variables etc.
- Returns:
- A SassListItem where all occurrences of variables have been
replaced by their values.
evaluateFunctionsAndExpressions
public ArgumentList evaluateFunctionsAndExpressions(ScssContext context,
boolean evaluateArithmetics)
- Description copied from interface:
SassListItem
- Evaluates the arithmetic expressions and functions of this item without
modifying this item.
- Specified by:
evaluateFunctionsAndExpressions in interface SassListItem- Overrides:
evaluateFunctionsAndExpressions in class SassList
- Parameters:
context - the compilation context in which to evaluate functions,
variables etc.evaluateArithmetics - True indicates that the arithmetic expressions in this item
should be evaluated. This parameter is used to handle the case
where the operator '/' should not be interpreted as an
arithmetic operation. The arithmetic expressions occurring in
the parameter lists of functions will be evaluated even if
evaluateArithmetics is false.
- Returns:
- For single values, the result of the arithmetic expression or
function. For a list, a copy of the list where the arithmetic
expressions and functions have been replaced with their evaluated
values.
getSeparator
protected SassList.Separator getSeparator(SassListItem expr)
toString
public String toString()
- Overrides:
toString in class SassList
updateUrl
public ArgumentList updateUrl(String prefix)
- Description copied from interface:
SassListItem
- Returns a new item that is obtained from this by updating all url's by,
e.g., adding the prefix to an url not starting with slash "/" and not
containing the symbol ":". Does not modify this item.
- Specified by:
updateUrl in interface SassListItem- Overrides:
updateUrl in class SassList
- Parameters:
prefix - The prefix to be added.
Copyright © 2013–2015 Vaadin. All rights reserved.