fromAst static method

NamedExpression? fromAst(
  1. Map? ast
)

Implementation

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