* Declares the (typed) expression as a variable with the given name. (e.g. "int foo = 5" or
* "Data foo = Data.getChild("a.b")"
*/
public JavaExpression declareAsVariable(String name, PExpression csExpression) {
JavaExpression expression = translateUntyped(csExpression);
Type type = expression.getType();
assert type != null : "all subexpressions should be typed";
return declare(type, name, expression);
}