
org.serversass.ast.Expression Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of server-sass Show documentation
Show all versions of server-sass Show documentation
server-sass is a simple implementation of SASS (sass-lang.org)
/*
* Made with all the love in the world
* by scireum in Remshalden, Germany
*
* Copyright by scireum GmbH
* http://www.scireum.de - [email protected]
*/
package org.serversass.ast;
import org.serversass.Generator;
import org.serversass.Scope;
/**
* Base class for all AST classes
*
* @author Andreas Haufler ([email protected])
* @since 2014/02
*/
public abstract class Expression {
/**
* Determines if this expression is constant or if it depends on variables.
*
* @return true if the expression is constant, false otherwise
*/
public abstract boolean isConstant();
/**
* If possible the expression is evaluated and a simplified expression is returned.
*
* @param scope the scope used to resolve variables.
* @param gen the generator used to evaluate functions
* @return a possibly simplified version of the expression
*/
public abstract Expression eval(Scope scope, Generator gen);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy