fromAst static method

FunctionExpression? fromAst(
  1. Map? ast
)

Implementation

static FunctionExpression? fromAst(Map? ast) {
  if (ast != null &&
      ast['type'] ==
          astNodeNameValue(AstRuntimeNodeName.FunctionExpression)) {
    return FunctionExpression(FormalParameterList.fromAst(ast['parameters']),
        AstRuntimeNodeParser.fromAst(ast['body']) as FunctionBody?);
  }
  logDebug(_tag, 'Can not parse ast to FunctionExpression');
  return null;
}