Added support for basic case of function literal.
This commit is contained in:
@@ -276,4 +276,9 @@ public class AstUtil {
|
||||
public static JsStatement newAssignmentStatement(JsNameRef nameRef, JsExpression expr) {
|
||||
return convertToStatement(new JsBinaryOperation(JsBinaryOperator.ASG, nameRef, expr));
|
||||
}
|
||||
|
||||
public static JsExpression extractExpressionFromStatement(JsStatement statement) {
|
||||
assert statement instanceof JsExprStmt : "Cannot extract exprssion form statement: " + statement;
|
||||
return (((JsExprStmt) statement).getExpression());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user