public class Value extends Object implements Expression
| Constructor and Description |
|---|
Value(String contents)
Creates a new value representing the given contents a value.
|
| Modifier and Type | Method and Description |
|---|---|
Expression |
eval(Scope scope,
Generator gen)
If possible the expression is evaluated and a simplified expression is returned.
|
String |
getContents()
Returns the represented value
|
boolean |
isConstant()
Determines if this expression is constant or if it depends on variables.
|
String |
toString() |
public Value(String contents)
contents - the value to be representedpublic String getContents()
public boolean isConstant()
ExpressionisConstant in interface Expressionpublic Expression eval(Scope scope, Generator gen)
Expressioneval in interface Expressionscope - the scope used to resolve variables.gen - the generator used to evaluate functionsCopyright © 2016. All rights reserved.