public Declaration getDeclaration(String name) { for (Declaration d : declarations.getDeclarations()) { if (d.getName().equalsIgnoreCase(name)) { return d; } } return null; }
public Expression getValue(String name) { Declaration declaration = getDeclaration(name); return (declaration != null) ? declaration.getExpression() : null; }