fromAst static method
Implementation
static FunctionExpression? fromAst(Map? ast) {
if (ast != null &&
ast['type'] == astNodeNameValue(AstNodeName.FunctionExpression)) {
var astParameters = ast['parameters']['parameterList'] as List?;
var parameters = <SimpleFormalParameter?>[];
astParameters?.forEach((p) {
parameters.add(SimpleFormalParameter.fromAst(p));
});
return FunctionExpression(parameters, BlockStatement.fromAst(ast['body']),
isAsync: ast['isAsync'] as bool, ast: ast);
}
return null;
}