fromAst static method

BinaryExpression? fromAst(
  1. Map? ast
)

Implementation

static BinaryExpression? fromAst(Map? ast) {
  if (ast != null && ast['type'] == astNodeNameValue(AstNodeName.BinaryExpression)) {
    return BinaryExpression(ast['operator'], Expression.fromAst(ast['left']),
        Expression.fromAst(ast['right']),
        ast: ast);
  }
  return null;
}