org.serversass.ast.Expression Maven / Gradle / Ivy
/*
* 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
*/
public interface Expression {
/**
* Determines if this expression is constant or if it depends on variables.
*
* @return true if the expression is constant, false otherwise
*/
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
*/
Expression eval(Scope scope, Generator gen);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy