All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.squarespace.less.NodeBuilder Maven / Gradle / Ivy
/**
* Copyright (c) 2014 SQUARESPACE, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.squarespace.less;
import com.squarespace.less.model.Block;
import com.squarespace.less.model.BlockDirective;
import com.squarespace.less.model.Comment;
import com.squarespace.less.model.Definition;
import com.squarespace.less.model.Directive;
import com.squarespace.less.model.Features;
import com.squarespace.less.model.Guard;
import com.squarespace.less.model.Media;
import com.squarespace.less.model.Mixin;
import com.squarespace.less.model.MixinCall;
import com.squarespace.less.model.MixinCallArgs;
import com.squarespace.less.model.MixinParams;
import com.squarespace.less.model.Node;
import com.squarespace.less.model.Operation;
import com.squarespace.less.model.Operator;
import com.squarespace.less.model.Parameter;
import com.squarespace.less.model.Rule;
import com.squarespace.less.model.Ruleset;
import com.squarespace.less.model.Selector;
import com.squarespace.less.model.Selectors;
import com.squarespace.less.model.Stylesheet;
import com.squarespace.less.model.Variable;
/**
* Allows clients to substitute custom implementations of nodes constructed by the parser.
*
* For example, when the parser needs to construct a Comment, it will
* call {@link #buildComment}.
*/
public interface NodeBuilder {
BlockDirective buildBlockDirective(String name, Block block);
Comment buildComment(String body, boolean block);
Comment buildComment(String body, boolean block, boolean newline);
Definition buildDefinition(Variable variable, Node value);
Definition buildDefinition(String name, Node value);
Directive buildDirective(String name, Node value);
Media buildMedia(Features features, Block block);
Mixin buildMixin(String name, MixinParams params, Guard guard);
Mixin buildMixin(String name, MixinParams params, Guard guard, Block block);
MixinCall buildMixinCall(Selector selector, MixinCallArgs args, boolean important);
Operation buildOperation(Operator operator, Node operand0, Node operand1);
Parameter buildParameter(String name);
Parameter buildParameter(String name, Node value);
Parameter buildParameter(String name, boolean variadic);
Rule buildRule(Node property, Node value);
Rule buildRule(Node property, Node value, boolean important);
Ruleset buildRuleset(Selectors group, Block block);
Selector buildSelector();
Stylesheet buildStylesheet(Block block);
Variable buildVariable(String name);
Variable buildVariable(String name, boolean curly);
}