fromAst static method

FunctionDeclaration? fromAst(
  1. Map? ast
)

Implementation

static FunctionDeclaration? fromAst(Map? ast) {
  if (ast != null &&
      ast['type'] == astNodeNameValue(AstNodeName.FunctionDeclaration)) {
    return FunctionDeclaration(Identifier.fromAst(ast['id'])?.name,
        FunctionExpression.fromAst(ast['expression']),
        ast: ast);
  }
  return null;
}