fromAst static method

VariableExpression? fromAst(
  1. Map? ast
)

Implementation

static VariableExpression? fromAst(Map? ast) {
  if (ast != null) {
    var expressions = ast['expression']?.toString().split(' ');
    var expression = ast['expression'];
    if (expressions != null && expressions.isNotEmpty) {
      expression = expressions[0];
    }
    return VariableExpression(expression, ast: ast);
  }
  return null;
}